Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
micro-customization-system
/
micro-trialrun
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit ff27c2c1
authored
Nov 14, 2022
by
wuwx
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
信息解析按钮
1 parent
bb4eadc2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
182 additions
and
5 deletions
src/views/reportManage/informationDialog.vue
src/views/reportManage/statistics.vue
src/views/vehicleManage/freqModal.vue
src/views/reportManage/informationDialog.vue
0 → 100644
View file @
ff27c2c
<
template
>
<div>
<glsx-dialog
:show=
"showDialog"
:title=
"!showResult?'批量操作':'提示'"
width=
"560px"
@
close=
"closeDialog()"
>
<div>
<div
class=
"upload_box"
v-show=
"!showResult"
>
<div
class=
"input_box"
>
<el-input
v-model=
"uploadFile.name"
placeholder=
"未选择任何文件..."
class=
"a_input"
size=
"small"
readonly
></el-input>
<el-upload
ref=
"elUpload"
:action=
"IMPORT_FAKEOFFLINE_FILES"
:headers=
"uploadHeaders"
:accept=
"acceptFile"
:show-file-list=
"false"
:auto-upload=
"false"
:file-list=
"fileList"
:on-change=
"onFileChange"
:on-success=
"onSuccess"
>
<el-button
size=
"small"
type=
"primary"
>
浏览
</el-button>
</el-upload>
</div>
<div
class=
"tips"
>
*请选择需要导入的条件模板*
</div>
<div>
<el-button
type=
"primary"
size=
"small"
v-if=
"!showResult"
@
click=
"downloadTemplate()"
>
SN号导入模板
</el-button>
<el-button
type=
"primary"
size=
"small"
v-if=
"!showResult"
@
click=
"downloadTemplate()"
>
工单号导入模板
</el-button>
<el-button
type=
"primary"
size=
"small"
v-if=
"!showResult"
@
click=
"downloadTemplate()"
>
车架号导入模板
</el-button>
</div>
</div>
<div
class=
"upload_result"
v-show=
"showResult && !exportDialog"
>
<div
class=
"cell"
>
<span
class=
"num"
>
{{
uploadResult
.
succNum
}}
</span>
<span>
成功记录
</span>
</div>
<div
class=
"cell"
>
<span
class=
"num cred"
>
{{
uploadResult
.
failNum
}}
</span>
<span>
失败记录
</span>
</div>
</div>
<div
class=
"upload_result"
v-show=
"exportDialog"
>
<el-alert
type=
"warning"
description=
"请等待解析结果,解析完成后将自动为您下载,请勿关闭当前浏览器!"
:closable=
"false"
show-icon
>
</el-alert>
</div>
</div>
<div
slot=
"footer"
>
<div
class=
"dialog_links"
>
<div>
<el-button
type=
"primary"
size=
"small"
v-if=
"showResult && uploadResult.failFile"
@
click=
"downloadFail()"
>
导出失败记录
</el-button>
</div>
<div>
<el-button
type=
"primary"
size=
"small"
:loading=
"aloading"
:disabled=
"!uploadFile.name"
v-if=
"!showResult"
@
click=
"saveFile()"
>
确认
</el-button>
<el-button
type=
"default"
size=
"small"
@
click=
"closeDialog()"
v-if=
"!exportDialog"
>
{{
!
showResult
?
'取消'
:
'关闭'
}}
</el-button>
<el-button
type=
"default"
size=
"small"
@
click=
"closeDialog()"
v-if=
"exportDialog"
><i
class=
"el-icon-loading"
v-show=
"exportDialog"
></i>
完成
</el-button>
</div>
</div>
</div>
</glsx-dialog>
</div>
</
template
>
<
script
>
import
{
IMPORT_FAKEOFFLINE_FILES
}
from
"services/report"
;
import
GlsxDialog
from
"@/components/dialog"
;
export
default
{
name
:
"informationDialog"
,
components
:
{
GlsxDialog
},
data
()
{
return
{
showDialog
:
false
,
showResult
:
false
,
uploadFile
:
{},
IMPORT_FAKEOFFLINE_FILES
,
acceptFile
:
".xlsx,.xls"
,
fileList
:
[],
uploadResult
:
{},
aloading
:
false
,
}
},
props
:
{
uploadHeaders
:
Object
,
// 导出按钮互动参数
exportDialog
:
{
type
:
Boolean
,
default
:
false
}
},
methods
:
{
openDialog
()
{
this
.
showDialog
=
true
},
// 监听文件导入
onFileChange
(
file
,
fileList
)
{
console
.
log
(
file
);
if
(
!
file
.
response
)
{
this
.
uploadFile
=
file
;
this
.
fileList
=
[
file
];
}
},
// 监听文件上传成功
onSuccess
(
response
,
file
,
fileList
)
{
this
.
aloading
=
false
;
if
(
response
.
code
!=
200
)
{
showToast
({
message
:
response
.
message
,
});
this
.
uploadFile
=
{};
this
.
$refs
.
elUpload
.
clearFiles
();
return
false
;
}
this
.
uploadResult
=
response
.
data
;
this
.
showResult
=
true
;
// this.getList(); 刷新表格
this
.
$emit
(
"successData"
,
true
)
},
// 确认上传文件
saveFile
()
{
let
o
=
this
.
uploadFile
;
console
.
log
(
o
);
if
(
!
this
.
uploadFile
.
name
)
{
showToast
({
message
:
"请选择上传文件"
,
});
return
false
;
}
let
list
=
o
.
name
.
split
(
"."
);
let
acceptFile
=
this
.
acceptFile
;
let
_type
=
list
[
list
.
length
-
1
];
console
.
log
(
_type
);
let
idx
=
acceptFile
.
includes
(
_type
);
if
(
!
idx
)
{
showToast
({
message
:
`导入文件只支持
${
acceptFile
}
`
,
});
return
false
;
}
this
.
aloading
=
true
;
this
.
$refs
.
elUpload
.
submit
();
},
// 下载失败模板
downloadFail
()
{
let
o
=
this
.
uploadResult
;
window
.
open
(
o
.
failFile
);
},
// 关闭弹框
closeDialog
()
{
this
.
showDialog
=
false
;
this
.
uploadFile
=
{};
this
.
uploadResult
=
{};
this
.
showResult
=
false
;
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
@import
"@/styles/offline.scss"
;
.upload_result
::v-deep
.el-alert
.el-alert__description
{
margin
:
0
;
}
</
style
>
\ No newline at end of file
\ No newline at end of file
src/views/reportManage/statistics.vue
View file @
ff27c2c
...
@@ -4,6 +4,7 @@
...
@@ -4,6 +4,7 @@
<div
class=
"page_head_title"
>
<div
class=
"page_head_title"
>
<h2
class=
"h2"
>
运营统计报表
</h2>
<h2
class=
"h2"
>
运营统计报表
</h2>
<h3
class=
"h3"
>
通过车辆或设备纬度,统计系统内设备数据,并支持宽表输出
</h3>
<h3
class=
"h3"
>
通过车辆或设备纬度,统计系统内设备数据,并支持宽表输出
</h3>
<!--
<el-button
class=
"informationBtn"
type=
"primary"
size=
"mini"
@
click=
"informationClick"
>
信息解析
</el-button>
-->
</div>
</div>
<el-tabs
v-model=
"tabActive"
>
<el-tabs
v-model=
"tabActive"
>
...
@@ -14,7 +15,7 @@
...
@@ -14,7 +15,7 @@
<statistics-device></statistics-device>
<statistics-device></statistics-device>
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
<informationDialog
ref=
"informationDialog"
:uploadHeaders=
"uploadHeaders"
@
successData=
"successData"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -22,22 +23,41 @@
...
@@ -22,22 +23,41 @@
import
{}
from
"services/report"
;
import
{}
from
"services/report"
;
import
StatisticsCar
from
'./statistics_car'
import
StatisticsCar
from
'./statistics_car'
import
StatisticsDevice
from
'./statistics_device'
import
StatisticsDevice
from
'./statistics_device'
import
informationDialog
from
'./informationDialog'
export
default
{
export
default
{
components
:
{
components
:
{
StatisticsCar
,
StatisticsCar
,
StatisticsDevice
StatisticsDevice
,
informationDialog
},
},
data
()
{
data
()
{
return
{
return
{
tabActive
:
"car"
,
tabActive
:
"car"
,
uploadHeaders
:
{}
};
};
},
},
mounted
()
{},
mounted
()
{
methods
:
{},
let
token
=
localStorage
.
getItem
(
"token"
);
this
.
uploadHeaders
=
{
Authorization
:
token
};
},
methods
:
{
informationClick
()
{
this
.
$refs
.
informationDialog
.
openDialog
()
// this.$refs.informationDialog.showResult = true
},
successData
(
val
)
{
console
.
log
(
'val'
,
val
);
}
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
"@/styles/common.scss"
;
@import
"@/styles/common.scss"
;
.informationBtn
{
position
:
absolute
;
right
:
24px
;
z-index
:
2
;
}
</
style
>
>
</
style
>
>
\ No newline at end of file
\ No newline at end of file
src/views/vehicleManage/freqModal.vue
View file @
ff27c2c
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
</div>
</div>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<span
v-if=
"tenantFlag"
>
提示:每周五晚,系统自动恢复无线设备调频状态
</span>
<span
v-if=
"tenantFlag"
>
*
提示:每周五晚,系统自动恢复无线设备调频状态
</span>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
:loading=
"loading"
size=
"small"
>
确认
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm"
:loading=
"loading"
size=
"small"
>
确认
</el-button>
<el-button
@
click=
"$emit('onFreqModalChange', false)"
size=
"small"
>
取消
</el-button>
<el-button
@
click=
"$emit('onFreqModalChange', false)"
size=
"small"
>
取消
</el-button>
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment