Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
device-new-platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
device-new-platform
Commits
143ea601
Commit
143ea601
authored
Jul 17, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref:修改按钮颜色
parent
007e058c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
192 additions
and
65 deletions
+192
-65
device-manager-ui/admin/src/assets/less/common.less
device-manager-ui/admin/src/assets/less/common.less
+1
-1
device-manager-ui/admin/src/views/device/list.vue
device-manager-ui/admin/src/views/device/list.vue
+191
-64
No files found.
device-manager-ui/admin/src/assets/less/common.less
View file @
143ea601
...
@@ -328,7 +328,7 @@
...
@@ -328,7 +328,7 @@
text-align: right;
text-align: right;
}
}
.
addclass
{
.
el-button--primary
{
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important;
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important;
color: #fff !important;
color: #fff !important;
}
}
device-manager-ui/admin/src/views/device/list.vue
View file @
143ea601
...
@@ -2,62 +2,145 @@
...
@@ -2,62 +2,145 @@
<div
class=
"page"
>
<div
class=
"page"
>
<div
class=
"page-header"
>
<div
class=
"page-header"
>
<div>
<div>
<span
style=
"font-size: 14px"
><b>
设备列表
</b>
(
<span
style=
"font-size: 14px"
><b>
设备列表
</b>
(
<span
style=
"margin-right: 6px"
>
{{
siteName
}}
</span>
站点编码:
{{
<span
style=
"margin-right: 6px"
>
{{
siteName
}}
</span>
站点编码:
{{
siteCode
siteCode
}}
}}
)
</span>
)
</span
<el-link
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
@
click=
"switchMap"
:underline=
"false"
>
地图模式
>
<el-link
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
@
click=
"switchMap"
:underline=
"false"
>
地图模式
</el-link>
</el-link>
</div>
</div>
<el-button
style=
"margin-right: 10px"
@
click=
"$router.back()"
size=
"small"
>
返回上一级
<el-button
style=
"margin-right: 10px"
@
click=
"$router.back()"
size=
"small"
>
返回上一级
</el-button>
</el-button>
</div>
</div>
<el-divider></el-divider>
<el-divider></el-divider>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"handleImport"
>
导入
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"handleImport"
>
导入
</el-button>
</el-button>
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"doExport"
<el-button
:disabled=
"isExport"
>
导出
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"doExport"
:disabled=
"isExport"
>
导出
</el-button>
</el-button>
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
<el-button
@
click=
"batchActiveDevice"
>
批量激活
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"batchActiveDevice"
>
批量激活
</el-button>
</el-button>
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
<el-button
@
click=
"batchUpdateHall"
>
更新大厅
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"batchUpdateHall"
>
更新大厅
</el-button>
</el-button>
<el-button
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
slot=
"table-head-left2"
@
click=
"batchRestartApp"
>
批量重启
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"batchRestartApp"
>
批量重启
</el-button>
</el-button>
<el-tag
slot=
"table-body-head"
size=
"mini"
class=
"cursord"
@
click=
"changeStatAll()"
>
设备总数:
{{
tableData
.
totalCount
}}
台
<el-tag
slot=
"table-body-head"
size=
"mini"
class=
"cursord"
@
click=
"changeStatAll()"
>
设备总数:
{{
tableData
.
totalCount
}}
台
</el-tag>
</el-tag>
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"success"
class=
"cursord"
<el-tag
@
click=
"changeStat(2)"
>
在线:
{{
tableData
.
onlineCount
}}
台
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"success"
class=
"cursord"
@
click=
"changeStat(2)"
>
在线:
{{
tableData
.
onlineCount
}}
台
</el-tag>
</el-tag>
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"danger"
class=
"cursord"
<el-tag
@
click=
"changeStat(1)"
>
离线:
{{
tableData
.
offlineCount
}}
台
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"danger"
class=
"cursord"
@
click=
"changeStat(1)"
>
离线:
{{
tableData
.
offlineCount
}}
台
</el-tag>
</el-tag>
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"danger"
class=
"cursord"
<el-tag
@
click=
"changeStatEnabled(0)"
>
停用:
{{
tableData
.
stopCount
}}
台
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"danger"
class=
"cursord"
@
click=
"changeStatEnabled(0)"
>
停用:
{{
tableData
.
stopCount
}}
台
</el-tag>
</el-tag>
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"danger"
class=
"cursord"
<el-tag
@
click=
"changeStat(0)"
>
未激活:
{{
tableData
.
unActiveCount
}}
台
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"warning"
class=
"cursord"
@
click=
"changeStat(0)"
>
未激活:
{{
tableData
.
unActiveCount
}}
台
</el-tag>
</el-tag>
</LayoutTable>
</LayoutTable>
<!-- 设备导入对话框 -->
<!-- 设备导入对话框 -->
<el-dialog
:title=
"upload.title"
:visible.sync=
"upload.open"
width=
"400px"
append-to-body
>
<el-dialog
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".xlsx, .xls"
:headers=
"upload.headers"
:title=
"upload.title"
:action=
"upload.url + '?siteId=' + siteId"
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
:visible.sync=
"upload.open"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
drag
>
width=
"400px"
append-to-body
>
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".xlsx, .xls"
:headers=
"upload.headers"
:action=
"upload.url + '?siteId=' + siteId"
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
drag
>
<i
class=
"el-icon-upload"
></i>
<i
class=
"el-icon-upload"
></i>
<div
class=
"el-upload__text"
>
<div
class=
"el-upload__text"
>
将文件拖到此处,或
将文件拖到此处,或
...
@@ -66,7 +149,12 @@
...
@@ -66,7 +149,12 @@
<div
class=
"el-upload__tip"
slot=
"tip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
>
<el-checkbox
v-model=
"upload.updateSupport"
/>
<el-checkbox
v-model=
"upload.updateSupport"
/>
是否更新已经存在的数据
是否更新已经存在的数据
<el-link
type=
"primary"
class=
"addclass"
style=
"font-size: 14px"
@
click=
"downloadTemplate"
>
下载模板
<el-link
type=
"primary"
class=
"addclass"
style=
"font-size: 14px"
@
click=
"downloadTemplate"
>
下载模板
</el-link>
</el-link>
</div>
</div>
<div
class=
"el-upload__tip"
style=
"color: red"
slot=
"tip"
>
<div
class=
"el-upload__tip"
style=
"color: red"
slot=
"tip"
>
...
@@ -74,46 +162,91 @@
...
@@ -74,46 +162,91 @@
</div>
</div>
</el-upload>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"submitFileForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"submitFileForm"
>
确 定
</el-button
>
<el-button
@
click=
"upload.open = false"
>
取 消
</el-button>
<el-button
@
click=
"upload.open = false"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<!-- 站点修改对话框 -->
<!-- 站点修改对话框 -->
<el-dialog
:title=
"tree.title"
:visible.sync=
"tree.open"
width=
"40%"
append-to-body
>
<el-dialog
<span
style=
"font-size: 13px"
><b>
当前站点:
</b>
(
<el-link
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
:title=
"tree.title"
:underline=
"false"
>
{{
siteName
}}
</el-link>
:visible.sync=
"tree.open"
站点编码:
{{
siteCode
}}
)
</span>
width=
"40%"
append-to-body
>
<span
style=
"font-size: 13px"
><b>
当前站点:
</b>
(
<el-link
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
:underline=
"false"
>
{{
siteName
}}
</el-link
>
站点编码:
{{
siteCode
}}
)
</span
>
<el-divider></el-divider>
<el-divider></el-divider>
<el-scrollbar
style=
"height: 100%"
>
<el-scrollbar
style=
"height: 100%"
>
<el-tree
size=
"mini"
ref=
"siteTree"
:data=
"areaData"
id=
"el-tree"
node-key=
"id"
indent=
"4"
:props=
"treeProps"
<el-tree
:load=
"loadNode"
highlight-current
default-expand-all
:expand-on-click-node=
"false"
size=
"mini"
:render-content=
"renderContent"
@
node-click=
"handleNodeClick"
>
ref=
"siteTree"
:data=
"areaData"
id=
"el-tree"
node-key=
"id"
indent=
"4"
:props=
"treeProps"
:load=
"loadNode"
highlight-current
default-expand-all
:expand-on-click-node=
"false"
:render-content=
"renderContent"
@
node-click=
"handleNodeClick"
>
</el-tree>
</el-tree>
</el-scrollbar>
</el-scrollbar>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"updateSiteConform"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"updateSiteConform"
>
确 定
</el-button
>
<el-button
@
click=
"tree.open = false"
>
取 消
</el-button>
<el-button
@
click=
"tree.open = false"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<!-- 大厅修改对话框 -->
<!-- 大厅修改对话框 -->
<el-dialog
:title=
"hallDialog.title"
:visible.sync=
"hallDialog.open"
width=
"60%"
append-to-body
>
<el-dialog
:title=
"hallDialog.title"
:visible.sync=
"hallDialog.open"
width=
"60%"
append-to-body
>
<el-form
label-width=
"120px"
>
<el-form
label-width=
"120px"
>
<Field
<Field
label=
"站点大厅"
v-model=
"hallId"
type=
"radio"
:enumData=
"tableData.dict.hallId"
placeholder=
"请选择所属大厅"
/>
label=
"站点大厅"
v-model=
"hallId"
type=
"radio"
:enumData=
"tableData.dict.hallId"
placeholder=
"请选择所属大厅"
/>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"updateBatchHallConform"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"updateBatchHallConform"
>
确 定
</el-button
>
<el-button
@
click=
"hallDialog.open = false"
>
取 消
</el-button>
<el-button
@
click=
"hallDialog.open = false"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
<!-- 查看二维码弹窗 -->
<!-- 查看二维码弹窗 -->
<el-dialog
title=
"设备二维码"
:visible.sync=
"qrCodeDialog.visible"
width=
"350px"
>
<el-dialog
title=
"设备二维码"
:visible.sync=
"qrCodeDialog.visible"
width=
"350px"
>
<img
:src=
"qrCodeDialog.qrCode"
/>
<img
:src=
"qrCodeDialog.qrCode"
/>
<p
style=
"word-wrap: break-word"
>
{{
qrCodeDialog
.
qrCodeUrl
}}
</p>
<p
style=
"word-wrap: break-word"
>
{{
qrCodeDialog
.
qrCodeUrl
}}
</p>
</el-dialog>
</el-dialog>
...
@@ -170,8 +303,6 @@ export default {
...
@@ -170,8 +303,6 @@ export default {
this
.
upload
.
open
=
true
;
this
.
upload
.
open
=
true
;
},
},
/** 下载模板操作 */
/** 下载模板操作 */
downloadTemplate
()
{
downloadTemplate
()
{
this
.
isExport
=
true
;
this
.
isExport
=
true
;
...
@@ -241,12 +372,12 @@ export default {
...
@@ -241,12 +372,12 @@ export default {
},
},
changeStatAll
()
{
changeStatAll
()
{
delete
this
.
query
[
"
productId
"
]
delete
this
.
query
[
"
productId
"
]
;
delete
this
.
query
[
"
deviceName
"
]
delete
this
.
query
[
"
deviceName
"
]
;
delete
this
.
query
[
"
deviceCode
"
]
delete
this
.
query
[
"
deviceCode
"
]
;
delete
this
.
query
[
"
deviceStatus
"
]
delete
this
.
query
[
"
deviceStatus
"
]
;
this
.
query
[
"
page
"
]
=
1
this
.
query
[
"
page
"
]
=
1
;
this
.
query
=
Object
.
assign
(
this
.
query
,
{
this
.
query
=
Object
.
assign
(
this
.
query
,
{
//deviceStatusList: [1, 2],
//deviceStatusList: [1, 2],
// enabled: 1,
// enabled: 1,
...
@@ -257,7 +388,7 @@ export default {
...
@@ -257,7 +388,7 @@ export default {
changeStatEnabled
(
enabled
)
{
changeStatEnabled
(
enabled
)
{
//去除其它条件
//去除其它条件
this
.
query
[
"
page
"
]
=
1
this
.
query
[
"
page
"
]
=
1
;
this
.
query
=
Object
.
assign
(
this
.
query
,
{
this
.
query
=
Object
.
assign
(
this
.
query
,
{
// deviceStatusList: [1, 2],
// deviceStatusList: [1, 2],
enabled
:
enabled
,
enabled
:
enabled
,
...
@@ -270,13 +401,12 @@ export default {
...
@@ -270,13 +401,12 @@ export default {
//去除其它条件
//去除其它条件
// delete this.query["productId"]
// delete this.query["productId"]
//delete this.query["deviceName"]
//delete this.query["deviceName"]
delete
this
.
query
[
"
enabled
"
]
delete
this
.
query
[
"
enabled
"
]
;
this
.
query
=
Object
.
assign
(
this
.
query
,
{
deviceStatus
:
val
});
this
.
query
=
Object
.
assign
(
this
.
query
,
{
deviceStatus
:
val
});
this
.
query
[
"
page
"
]
=
1
this
.
query
[
"
page
"
]
=
1
;
this
.
getData
();
this
.
getData
();
},
},
activeDevice
(
row
)
{
activeDevice
(
row
)
{
this
.
$post
(
"
/device/active
"
,
{
this
.
$post
(
"
/device/active
"
,
{
deviceCode
:
row
.
deviceCode
,
deviceCode
:
row
.
deviceCode
,
...
@@ -307,28 +437,26 @@ export default {
...
@@ -307,28 +437,26 @@ export default {
});
});
},
},
batchUpdateHall
()
{
batchUpdateHall
()
{
this
.
hallId
=
null
;
this
.
hallId
=
null
;
this
.
hallName
=
""
this
.
hallName
=
""
;
this
.
hallDialog
.
title
=
"
设备所属大厅设置
"
;
this
.
hallDialog
.
title
=
"
设备所属大厅设置
"
;
this
.
hallDialog
.
open
=
true
;
this
.
hallDialog
.
open
=
true
;
},
},
updateBatchHallConform
(
row
)
{
updateBatchHallConform
(
row
)
{
this
.
hallName
=
this
.
tableData
.
dict
.
hallId
[
this
.
hallId
];
this
.
hallName
=
this
.
tableData
.
dict
.
hallId
[
this
.
hallId
];
this
.
$post
(
"
/device/batchUpdateHall
"
,
{
this
.
$post
(
"
/device/batchUpdateHall
"
,
{
idList
:
this
.
selection
,
idList
:
this
.
selection
,
hallId
:
this
.
hallId
,
hallId
:
this
.
hallId
,
hallName
:
this
.
hallName
hallName
:
this
.
hallName
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
if
(
res
.
code
==
1
)
{
this
.
$message
.
success
(
"
批量更新大厅设备成功!
"
);
this
.
$message
.
success
(
"
批量更新大厅设备成功!
"
);
this
.
hallDialog
.
open
=
false
;
this
.
hallDialog
.
open
=
false
;
console
.
log
(
this
.
$refs
)
console
.
log
(
this
.
$refs
)
;
this
.
selection
=
[]
this
.
selection
=
[]
;
this
.
getData
();
this
.
getData
();
}
}
})
})
...
@@ -337,7 +465,6 @@ export default {
...
@@ -337,7 +465,6 @@ export default {
});
});
},
},
batchRestartApp
(
row
)
{
batchRestartApp
(
row
)
{
this
.
$post
(
"
/device/batchRestartApp
"
,
{
this
.
$post
(
"
/device/batchRestartApp
"
,
{
idList
:
this
.
selection
,
idList
:
this
.
selection
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment