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
9390ddfa
Commit
9390ddfa
authored
May 17, 2023
by
“yiyousong”
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.scsmile.cn/zxf/device-new-platform
parents
cc414884
091e9b9a
Changes
68
Hide whitespace changes
Inline
Side-by-side
Showing
68 changed files
with
631 additions
and
761 deletions
+631
-761
device-manager-ui/admin/public/index.html
device-manager-ui/admin/public/index.html
+1
-1
device-manager-ui/admin/public/sbgl.ico
device-manager-ui/admin/public/sbgl.ico
+0
-0
device-manager-ui/admin/src/assets/less/common.less
device-manager-ui/admin/src/assets/less/common.less
+4
-0
device-manager-ui/admin/src/assets/mixins/table.js
device-manager-ui/admin/src/assets/mixins/table.js
+1
-1
device-manager-ui/admin/src/components/Confirm.vue
device-manager-ui/admin/src/components/Confirm.vue
+1
-1
device-manager-ui/admin/src/components/DeviceSwitch.vue
device-manager-ui/admin/src/components/DeviceSwitch.vue
+1
-1
device-manager-ui/admin/src/components/FileUpload.vue
device-manager-ui/admin/src/components/FileUpload.vue
+1
-1
device-manager-ui/admin/src/components/Header.vue
device-manager-ui/admin/src/components/Header.vue
+9
-5
device-manager-ui/admin/src/components/HeaderSite.vue
device-manager-ui/admin/src/components/HeaderSite.vue
+2
-2
device-manager-ui/admin/src/components/MapDetail.vue
device-manager-ui/admin/src/components/MapDetail.vue
+1
-1
device-manager-ui/admin/src/components/SearchForm.vue
device-manager-ui/admin/src/components/SearchForm.vue
+1
-1
device-manager-ui/admin/src/components/Switch.vue
device-manager-ui/admin/src/components/Switch.vue
+1
-1
device-manager-ui/admin/src/components/Table.vue
device-manager-ui/admin/src/components/Table.vue
+2
-2
device-manager-ui/admin/src/components/tools/FormButtons.vue
device-manager-ui/admin/src/components/tools/FormButtons.vue
+1
-1
device-manager-ui/admin/src/views/Home.vue
device-manager-ui/admin/src/views/Home.vue
+84
-150
device-manager-ui/admin/src/views/alarm/config/dialogshow.vue
...ce-manager-ui/admin/src/views/alarm/config/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/alarm/config/view.vue
device-manager-ui/admin/src/views/alarm/config/view.vue
+1
-1
device-manager-ui/admin/src/views/alarm/sms/send/dialogshow.vue
...-manager-ui/admin/src/views/alarm/sms/send/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/alarm/sms/send/list.vue
device-manager-ui/admin/src/views/alarm/sms/send/list.vue
+3
-9
device-manager-ui/admin/src/views/alarm/sms/send/view.vue
device-manager-ui/admin/src/views/alarm/sms/send/view.vue
+1
-1
device-manager-ui/admin/src/views/analysis/components/HeaderSite.vue
...ger-ui/admin/src/views/analysis/components/HeaderSite.vue
+1
-1
device-manager-ui/admin/src/views/app/publish/dialogshow.vue
device-manager-ui/admin/src/views/app/publish/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/app/publish/view.vue
device-manager-ui/admin/src/views/app/publish/view.vue
+1
-1
device-manager-ui/admin/src/views/device/alarm/info/dialogshow.vue
...nager-ui/admin/src/views/device/alarm/info/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/device/alarm/info/list.vue
device-manager-ui/admin/src/views/device/alarm/info/list.vue
+9
-33
device-manager-ui/admin/src/views/device/dialogshow.vue
device-manager-ui/admin/src/views/device/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/device/list.vue
device-manager-ui/admin/src/views/device/list.vue
+219
-352
device-manager-ui/admin/src/views/device/log/dialogshow.vue
device-manager-ui/admin/src/views/device/log/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/device/log/view.vue
device-manager-ui/admin/src/views/device/log/view.vue
+1
-1
device-manager-ui/admin/src/views/device/module/dialogshow.vue
...e-manager-ui/admin/src/views/device/module/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/device/module/distribute/dialogshow.vue
...i/admin/src/views/device/module/distribute/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/device/module/distribute/view.vue
...ager-ui/admin/src/views/device/module/distribute/view.vue
+1
-1
device-manager-ui/admin/src/views/device/module/use/dialogshow.vue
...nager-ui/admin/src/views/device/module/use/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/device/module/use/view.vue
device-manager-ui/admin/src/views/device/module/use/view.vue
+1
-1
device-manager-ui/admin/src/views/device/module/view.vue
device-manager-ui/admin/src/views/device/module/view.vue
+1
-1
device-manager-ui/admin/src/views/firm/dialogshow.vue
device-manager-ui/admin/src/views/firm/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/firm/list.vue
device-manager-ui/admin/src/views/firm/list.vue
+24
-2
device-manager-ui/admin/src/views/firm/view.vue
device-manager-ui/admin/src/views/firm/view.vue
+1
-1
device-manager-ui/admin/src/views/login/login.vue
device-manager-ui/admin/src/views/login/login.vue
+1
-1
device-manager-ui/admin/src/views/platform/dialogshow.vue
device-manager-ui/admin/src/views/platform/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/product/dialogshow.vue
device-manager-ui/admin/src/views/product/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/product/version/view.vue
device-manager-ui/admin/src/views/product/version/view.vue
+1
-1
device-manager-ui/admin/src/views/site/dialogshow.vue
device-manager-ui/admin/src/views/site/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/sitestat/dialogshow.vue
device-manager-ui/admin/src/views/sitestat/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/sitestat/list.vue
device-manager-ui/admin/src/views/sitestat/list.vue
+21
-46
device-manager-ui/admin/src/views/sitestat/mapDetail.vue
device-manager-ui/admin/src/views/sitestat/mapDetail.vue
+43
-89
device-manager-ui/admin/src/views/system/menu/dialogshow.vue
device-manager-ui/admin/src/views/system/menu/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/system/param/dialogshow.vue
...ce-manager-ui/admin/src/views/system/param/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/system/resource/dialogshow.vue
...manager-ui/admin/src/views/system/resource/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/system/role/dialogshow.vue
device-manager-ui/admin/src/views/system/role/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/system/role/list.vue
device-manager-ui/admin/src/views/system/role/list.vue
+3
-3
device-manager-ui/admin/src/views/system/task/dialogshow.vue
device-manager-ui/admin/src/views/system/task/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/system/user/dialogshow.vue
device-manager-ui/admin/src/views/system/user/dialogshow.vue
+1
-1
device-manager-ui/admin/src/views/system/user/list.vue
device-manager-ui/admin/src/views/system/user/list.vue
+1
-1
device-manager/pom.xml
device-manager/pom.xml
+3
-1
device-manager/src/main/java/com/mortals/xhx/base/framework/listener/CustomerKeyExpirationListener.java
...ase/framework/listener/CustomerKeyExpirationListener.java
+10
-1
device-manager/src/main/java/com/mortals/xhx/base/framework/listener/DirectDynamicListener.java
...ls/xhx/base/framework/listener/DirectDynamicListener.java
+4
-4
device-manager/src/main/java/com/mortals/xhx/busiz/req/UploadDeviceReq.java
.../main/java/com/mortals/xhx/busiz/req/UploadDeviceReq.java
+6
-1
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
...n/java/com/mortals/xhx/busiz/web/DeviceApiController.java
+14
-1
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceSendMsgController.java
...va/com/mortals/xhx/busiz/web/DeviceSendMsgController.java
+68
-6
device-manager/src/main/java/com/mortals/xhx/busiz/web/TestSendMsgController.java
...java/com/mortals/xhx/busiz/web/TestSendMsgController.java
+12
-0
device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceComsumersRegisterService.java
...on/applicationservice/DeviceComsumersRegisterService.java
+1
-8
device-manager/src/main/java/com/mortals/xhx/daemon/task/DeviceRestartTaskImpl.java
...va/com/mortals/xhx/daemon/task/DeviceRestartTaskImpl.java
+1
-2
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
...als/xhx/module/device/service/impl/DeviceServiceImpl.java
+0
-1
device-manager/src/main/resources/bootstrap.yml
device-manager/src/main/resources/bootstrap.yml
+3
-0
device-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
.../java/com/mortals/httpclient/device/DeviceController.http
+2
-2
device-manager/src/test/java/com/mortals/httpclient/system.http
...-manager/src/test/java/com/mortals/httpclient/system.http
+5
-0
doc/api.md
doc/api.md
+38
-0
No files found.
device-manager-ui/admin/public/index.html
View file @
9390ddfa
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<meta
charset=
"utf-8"
/>
<meta
charset=
"utf-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
/>
<meta
name=
"viewport"
content=
"width=device-width,initial-scale=1.0"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>
favicon
.ico"
/>
<link
rel=
"icon"
href=
"<%= BASE_URL %>
sbgl
.ico"
/>
<title>
设备管理平台
</title>
<title>
设备管理平台
</title>
<link
<link
rel=
"stylesheet"
rel=
"stylesheet"
...
...
device-manager-ui/admin/public/sbgl.ico
0 → 100644
View file @
9390ddfa
1.81 KB
device-manager-ui/admin/src/assets/less/common.less
View file @
9390ddfa
...
@@ -328,3 +328,7 @@
...
@@ -328,3 +328,7 @@
text-align: right;
text-align: right;
}
}
.addclass {
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important;
color: #fff !important;
}
device-manager-ui/admin/src/assets/mixins/table.js
View file @
9390ddfa
...
@@ -199,7 +199,7 @@ export default {
...
@@ -199,7 +199,7 @@ export default {
formatterLink
(
row
,
column
,
val
)
{
formatterLink
(
row
,
column
,
val
)
{
//const content = formatter(this.tableData, column-2, val);
//const content = formatter(this.tableData, column-2, val);
return
<
el
-
link
type
=
"
primary
"
href
=
{
val
}
target
=
"
_blank
"
>
{
row
.
fileName
}
<
/el-link
>
return
<
el
-
link
type
=
"
primary
"
class
=
"
addclass
"
href
=
{
val
}
target
=
"
_blank
"
>
{
row
.
fileName
}
<
/el-link
>
//return content;
//return content;
// return content ? <el-tag type={'info'} size='mini'>{content}</el-tag> : val
// return content ? <el-tag type={'info'} size='mini'>{content}</el-tag> : val
},
},
...
...
device-manager-ui/admin/src/components/Confirm.vue
View file @
9390ddfa
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<p>
{{
message
}}
</p>
<p>
{{
message
}}
</p>
<div
style=
"text-align: right; margin: 0"
>
<div
style=
"text-align: right; margin: 0"
>
<el-button
size=
"mini"
type=
"text"
@
click=
"visible = false"
>
取消
</el-button>
<el-button
size=
"mini"
type=
"text"
@
click=
"visible = false"
>
取消
</el-button>
<el-button
type=
"primary"
size=
"mini"
@
click=
"change"
>
确定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"change"
>
确定
</el-button>
</div>
</div>
<label
slot=
"reference"
>
<label
slot=
"reference"
>
<slot></slot>
<slot></slot>
...
...
device-manager-ui/admin/src/components/DeviceSwitch.vue
View file @
9390ddfa
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<el-button
size=
"mini"
type=
"text"
@
click=
"visible = false"
<el-button
size=
"mini"
type=
"text"
@
click=
"visible = false"
>
取消
</el-button
>
取消
</el-button
>
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"statusClick"
<el-button
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"statusClick"
>
确定
</el-button
>
确定
</el-button
>
>
</div>
</div>
...
...
device-manager-ui/admin/src/components/FileUpload.vue
View file @
9390ddfa
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
ref=
"upload"
ref=
"upload"
>
>
<!-- 上传按钮 -->
<!-- 上传按钮 -->
<el-button
size=
"mini"
type=
"primary"
>
选取文件
</el-button>
<el-button
size=
"mini"
type=
"primary"
class=
"addclass"
>
选取文件
</el-button>
<!-- 上传提示 -->
<!-- 上传提示 -->
<div
class=
"el-upload__tip"
slot=
"tip"
v-if=
"showTip"
>
<div
class=
"el-upload__tip"
slot=
"tip"
v-if=
"showTip"
>
...
...
device-manager-ui/admin/src/components/Header.vue
View file @
9390ddfa
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
height=
"27"
height=
"27"
width=
"27"
width=
"27"
/>
/>
<b
style=
"color: white; font-size:
18px; margin-right: 42
px"
>
<b
style=
"color: white; font-size:
20px; font-weight: bold; margin-right: 20
px"
>
AIOT智慧边缘物联网系统
</b
AIOT智慧边缘物联网系统
</b
>
>
</router-link>
</router-link>
...
@@ -250,9 +250,10 @@ export default {
...
@@ -250,9 +250,10 @@ export default {
line-height: 66px;
line-height: 66px;
font-size: 14px;
font-size: 14px;
color: #eee;
color: #eee;
background:
#2681e8
;
background:
linear-gradient(90deg, #1845c6 0%, #2999ff 100%)
;
.layout-logo {
.layout-logo {
height: 50px;
height: 50px;
padding-left: 23px;
.el-icon-menu {
.el-icon-menu {
display: none;
display: none;
}
}
...
@@ -276,8 +277,9 @@ export default {
...
@@ -276,8 +277,9 @@ export default {
//background: #1890ff;
//background: #1890ff;
color: #fff;
color: #fff;
list-style-type: none;
list-style-type: none;
border-bottom: 3px solid #fff;
//
border-bottom: 3px solid #fff;
padding-bottom: 2px;
padding-bottom: 2px;
background-color: #1890ff;
}
}
}
}
}
}
...
@@ -305,7 +307,7 @@ export default {
...
@@ -305,7 +307,7 @@ export default {
li {
li {
a {
a {
display: block;
display: block;
padding: 0 1
0
px;
padding: 0 1
5
px;
height: 40px;
height: 40px;
line-height: 40px;
line-height: 40px;
font-size: 14px;
font-size: 14px;
...
@@ -313,6 +315,7 @@ export default {
...
@@ -313,6 +315,7 @@ export default {
&.router-link-active,
&.router-link-active,
&[active] {
&[active] {
color: #1890ff;
color: #1890ff;
font-weight: 600;
border-bottom: 2px solid #1890ff;
border-bottom: 2px solid #1890ff;
}
}
}
}
...
@@ -321,7 +324,7 @@ export default {
...
@@ -321,7 +324,7 @@ export default {
}
}
}
}
@media screen and (max-width:
8
00px) {
@media screen and (max-width:
15
00px) {
.layout-header {
.layout-header {
.mobile-menu-list {
.mobile-menu-list {
display: flex;
display: flex;
...
@@ -351,6 +354,7 @@ export default {
...
@@ -351,6 +354,7 @@ export default {
width: 100%;
width: 100%;
.layout-logo {
.layout-logo {
width: 40px;
width: 40px;
height: 66px;
.el-icon-menu {
.el-icon-menu {
margin: auto;
margin: auto;
display: inline-block;
display: inline-block;
...
...
device-manager-ui/admin/src/components/HeaderSite.vue
View file @
9390ddfa
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
</div>
</div>
<div
class=
"site-btn"
>
<div
class=
"site-btn"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
size=
"small"
size=
"small"
style=
"margin-right: 10px"
style=
"margin-right: 10px"
@
click=
"onSucessSite"
@
click=
"onSucessSite"
...
@@ -156,7 +156,7 @@ export default {
...
@@ -156,7 +156,7 @@ export default {
}
}
.ant-dropdown-link {
.ant-dropdown-link {
padding: 0 20px;
padding: 0 20px;
font-size: 1
4
px;
font-size: 1
6
px;
min-width: 200px;
min-width: 200px;
color: #eee;
color: #eee;
display: inline-block;
display: inline-block;
...
...
device-manager-ui/admin/src/components/MapDetail.vue
View file @
9390ddfa
...
@@ -146,7 +146,7 @@ export default {
...
@@ -146,7 +146,7 @@ export default {
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.tuli {
.tuli {
width: 400px;
width: 400px;
top:
6
0px;
top:
2
0px;
left: 34px;
left: 34px;
position: absolute;
position: absolute;
float: left;
float: left;
...
...
device-manager-ui/admin/src/components/SearchForm.vue
View file @
9390ddfa
...
@@ -153,7 +153,7 @@
...
@@ -153,7 +153,7 @@
<el-form-item>
<el-form-item>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
icon=
"el-icon-search"
icon=
"el-icon-search"
@
click=
"onSubmit"
@
click=
"onSubmit"
title=
"查询"
title=
"查询"
...
...
device-manager-ui/admin/src/components/Switch.vue
View file @
9390ddfa
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<el-button
size=
"mini"
type=
"text"
@
click=
"visible = false"
<el-button
size=
"mini"
type=
"text"
@
click=
"visible = false"
>
取消
</el-button
>
取消
</el-button
>
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"statusClick"
<el-button
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"statusClick"
>
确定
</el-button
>
确定
</el-button
>
>
</div>
</div>
...
...
device-manager-ui/admin/src/components/Table.vue
View file @
9390ddfa
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
<slot
name=
"table-head-center"
>
<slot
name=
"table-head-center"
>
<el-button
<el-button
v-if=
"isShowButton('notAdd')"
v-if=
"isShowButton('notAdd')"
type=
"primary"
type=
"primary"
class=
"addclass"
icon=
"el-icon-plus"
icon=
"el-icon-plus"
plain
plain
size=
"mini"
size=
"mini"
...
@@ -316,7 +316,7 @@ export default {
...
@@ -316,7 +316,7 @@ export default {
margin-bottom: 10px;
margin-bottom: 10px;
//padding-bottom: 12px;
//padding-bottom: 12px;
// padding-top: 7px;
// padding-top: 7px;
border-bottom: 1px solid #ededed;
//
border-bottom: 1px solid #ededed;
.el-breadcrumb {
.el-breadcrumb {
margin-right: 30px;
margin-right: 30px;
}
}
...
...
device-manager-ui/admin/src/components/tools/FormButtons.vue
View file @
9390ddfa
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<el-form-item>
<el-form-item>
<slot
name=
"prepend"
></slot>
<slot
name=
"prepend"
></slot>
<slot>
<slot>
<el-button
v-if=
"!noSaveBtn"
type=
"primary"
@
click=
'$emit("submit")'
size=
'small'
icon=
'el-icon-circle-check-outline'
>
保存
</el-button>
<el-button
v-if=
"!noSaveBtn"
type=
"primary"
class=
"addclass"
@
click=
'$emit("submit")'
size=
'small'
icon=
'el-icon-circle-check-outline'
>
保存
</el-button>
<el-button
v-if=
"!noCancelBtn"
@
click=
"$router.go(-1)"
size=
'small'
icon=
'el-icon-circle-close-outline'
>
取消
</el-button>
<el-button
v-if=
"!noCancelBtn"
@
click=
"$router.go(-1)"
size=
'small'
icon=
'el-icon-circle-close-outline'
>
取消
</el-button>
</slot>
</slot>
<slot
name=
"append"
></slot>
<slot
name=
"append"
></slot>
...
...
device-manager-ui/admin/src/views/Home.vue
View file @
9390ddfa
<
template
>
<
template
>
<div
class=
"page page-home homeIndex"
style=
"min-height: 100vh"
>
<div
class=
"page page-home homeIndex"
style=
"min-height: 100vh"
>
<el-row
:gutter=
"10"
>
<el-row
:gutter=
"10"
>
<el-row
<el-row
style=
"margin-left: 50px; margin-right: 50px"
type=
"flex"
justify=
"end"
:gutter=
"10"
>
style=
"margin-left: 50px; margin-right: 50px"
<el-button
type=
"text"
size=
"mini"
style=
"color: #fff"
>
数据更新:
{{
type=
"flex"
formatterDate
(
statData
.
updateTime
)
justify=
"end"
}}
:gutter=
"10"
2分钟后自动更新
</el-button>
>
<el-button
icon=
"el-icon-refresh"
style=
"color: #fff"
size=
"mini"
@
click=
"syncDeviceStat"
<el-button
type=
"text"
size=
"mini"
style=
"color: #fff"
type=
"text"
>
手动刷新
</el-button>
>
数据更新:
{{
formatterDate
(
statData
.
updateTime
)
}}
2分钟后自动更新
</el-button
>
<el-button
icon=
"el-icon-refresh"
style=
"color: #fff"
size=
"mini"
@
click=
"syncDeviceStat"
type=
"text"
>
手动刷新
</el-button
>
</el-row>
</el-row>
<el-card
<el-card
style=
"
style=
"
margin-left: 50px;
margin-left: 50px;
margin-right: 50px;
margin-right: 50px;
margin-top: 10px;
margin-top: 10px;
height: 160px;
height: 160px;
"
>
"
>
<div
class=
"total-list"
>
<div
class=
"total-list"
>
<!-- 设备总数 -->
<!-- 设备总数 -->
<div
class=
"total-item"
>
<div
class=
"total-item"
>
<p
class=
"total-item-count"
>
{{
statData
.
deviceTotalCount
}}
</p>
<p
class=
"total-item-count"
>
{{
statData
.
deviceTotalCount
}}
</p>
<span
style=
"font-size: 12px"
<span
style=
"font-size: 12px"
><span
class=
"tips"
>
昨日
</span><span
:class=
"
{
><span
class=
"tips"
>
昨日
</span
success: statData.deviceAddCount >= 0,
><span
warn: statData.deviceAddCount
<
0
,
:class=
"
{
}"
>
{{
success: statData.deviceAddCount >= 0,
statData
.
deviceAddCount
>=
0
warn: statData.deviceAddCount
<
0
,
?
"
+
"
+
statData
.
deviceAddCount
}"
:
"
-
"
+
statData
.
deviceAddCount
>
{{
}}
</span></span>
statData
.
deviceAddCount
>=
0
?
"
+
"
+
statData
.
deviceAddCount
:
"
-
"
+
statData
.
deviceAddCount
}}
</span
></span
>
<p
class=
"total-item-title"
>
<p
class=
"total-item-title"
>
<img
src=
"../assets/images/abzs.png"
alt=
""
/>
<img
src=
"../assets/images/abzs.png"
alt=
""
/>
<span>
设备总数
</span>
<span>
设备总数
</span>
...
@@ -57,20 +36,14 @@
...
@@ -57,20 +36,14 @@
<!-- 监控站点数 -->
<!-- 监控站点数 -->
<div
class=
"total-item"
>
<div
class=
"total-item"
>
<p
class=
"total-item-count"
>
{{
statData
.
siteTotalCount
}}
</p>
<p
class=
"total-item-count"
>
{{
statData
.
siteTotalCount
}}
</p>
<span
style=
"font-size: 12px"
<span
style=
"font-size: 12px"
><span
class=
"tips"
>
昨日
</span><span
:class=
"
{
><span
class=
"tips"
>
昨日
</span
success: statData.siteAddCount >= 0,
><span
warn: statData.siteAddCount
<
0
,
:class=
"
{
}"
>
{{
success: statData.siteAddCount >= 0,
statData
.
siteAddCount
>=
0
warn: statData.siteAddCount
<
0
,
?
"
+
"
+
statData
.
siteAddCount
}"
:
"
-
"
+
statData
.
siteAddCount
>
{{
}}
</span></span>
statData
.
siteAddCount
>=
0
?
"
+
"
+
statData
.
siteAddCount
:
"
-
"
+
statData
.
siteAddCount
}}
</span
></span
>
<p
class=
"total-item-title"
>
<p
class=
"total-item-title"
>
<img
src=
"../assets/images/jczds.png"
alt=
""
/>
<img
src=
"../assets/images/jczds.png"
alt=
""
/>
<span>
监控站点数
</span>
<span>
监控站点数
</span>
...
@@ -79,12 +52,9 @@
...
@@ -79,12 +52,9 @@
<!-- 在线设备 -->
<!-- 在线设备 -->
<div
class=
"total-item"
>
<div
class=
"total-item"
>
<p
class=
"total-item-count"
>
{{
statData
.
deviceOnlineCount
}}
</p>
<p
class=
"total-item-count"
>
{{
statData
.
deviceOnlineCount
}}
</p>
<span
style=
"font-size: 12px"
<span
style=
"font-size: 12px"
><span
class=
"tips"
>
上线率
</span><span
><span
class=
"tips"
>
上线率
</span
v-bind:class=
"
{ success: statData.deviceOnlineRatio >= 0 }">
{{
(
statData
.
deviceOnlineRatio
*
><span
v-bind:class=
"
{ success: statData.deviceOnlineRatio >= 0 }"
100
).
toFixed
(
2
)
}}
%
</span></span>
>
{{
(
statData
.
deviceOnlineRatio
*
100
).
toFixed
(
2
)
}}
%
</span
></span
>
<p
class=
"total-item-title"
>
<p
class=
"total-item-title"
>
<img
src=
"../assets/images/zxsb.png"
alt=
""
/>
<img
src=
"../assets/images/zxsb.png"
alt=
""
/>
<span>
在线设备
</span>
<span>
在线设备
</span>
...
@@ -93,12 +63,9 @@
...
@@ -93,12 +63,9 @@
<!-- 离线率 -->
<!-- 离线率 -->
<div
class=
"total-item"
>
<div
class=
"total-item"
>
<p
class=
"total-item-count"
>
{{
statData
.
deviceOfflineCount
}}
</p>
<p
class=
"total-item-count"
>
{{
statData
.
deviceOfflineCount
}}
</p>
<span
style=
"font-size: 12px"
<span
style=
"font-size: 12px"
><span
class=
"tips"
>
离线率
</span><span
><span
class=
"tips"
>
离线率
</span
v-bind:class=
"
{ warn: statData.deviceOfflineRatio >= 0 }">
{{
(
statData
.
deviceOfflineRatio
*
><span
v-bind:class=
"
{ warn: statData.deviceOfflineRatio >= 0 }"
100
).
toFixed
(
2
)
}}
%
</span></span>
>
{{
(
statData
.
deviceOfflineRatio
*
100
).
toFixed
(
2
)
}}
%
</span
></span
>
<p
class=
"total-item-title"
>
<p
class=
"total-item-title"
>
<img
src=
"../assets/images/lxsb.png"
alt=
""
/>
<img
src=
"../assets/images/lxsb.png"
alt=
""
/>
<span>
离线设备
</span>
<span>
离线设备
</span>
...
@@ -107,12 +74,9 @@
...
@@ -107,12 +74,9 @@
<!-- 停用设备 -->
<!-- 停用设备 -->
<div
class=
"total-item"
>
<div
class=
"total-item"
>
<p
class=
"total-item-count"
>
{{
statData
.
deviceStopRatio
}}
</p>
<p
class=
"total-item-count"
>
{{
statData
.
deviceStopRatio
}}
</p>
<span
style=
"font-size: 12px"
<span
style=
"font-size: 12px"
><span
class=
"tips"
>
停用率
</span><span
><span
class=
"tips"
>
停用率
</span
v-bind:class=
"
{ warn: statData.deviceStopRatio >= 0 }">
{{
(
statData
.
deviceStopRatio
*
100
).
toFixed
(
2
)
><span
v-bind:class=
"
{ warn: statData.deviceStopRatio >= 0 }"
}}
%
</span></span>
>
{{
(
statData
.
deviceStopRatio
*
100
).
toFixed
(
2
)
}}
%
</span
></span
>
<p
class=
"total-item-title"
>
<p
class=
"total-item-title"
>
<img
src=
"../assets/images/tusb.png"
alt=
""
/>
<img
src=
"../assets/images/tusb.png"
alt=
""
/>
<span>
停用设备
</span>
<span>
停用设备
</span>
...
@@ -121,12 +85,9 @@
...
@@ -121,12 +85,9 @@
<!-- 未激活设备 -->
<!-- 未激活设备 -->
<div
class=
"total-item"
>
<div
class=
"total-item"
>
<p
class=
"total-item-count"
>
{{
statData
.
deviceUnActiveRatio
}}
</p>
<p
class=
"total-item-count"
>
{{
statData
.
deviceUnActiveRatio
}}
</p>
<span
style=
"font-size: 12px"
<span
style=
"font-size: 12px"
><span
class=
"tips"
>
未激活率
</span><span
><span
class=
"tips"
>
未激活率
</span
v-bind:class=
"
{ warn: statData.deviceUnActiveRatio >= 0 }">
{{
(
statData
.
deviceUnActiveRatio
*
><span
v-bind:class=
"
{ warn: statData.deviceUnActiveRatio >= 0 }"
100
).
toFixed
(
2
)
}}
%
</span></span>
>
{{
(
statData
.
deviceUnActiveRatio
*
100
).
toFixed
(
2
)
}}
%
</span
></span
>
<p
class=
"total-item-title"
>
<p
class=
"total-item-title"
>
<img
src=
"../assets/images/wjhsb.png"
alt=
""
/>
<img
src=
"../assets/images/wjhsb.png"
alt=
""
/>
<span>
未激活设备
</span>
<span>
未激活设备
</span>
...
@@ -135,20 +96,14 @@
...
@@ -135,20 +96,14 @@
<!-- 今日警告次数 -->
<!-- 今日警告次数 -->
<div
class=
"total-item"
>
<div
class=
"total-item"
>
<p
class=
"total-item-count"
>
{{
statData
.
alarmTotalCount
}}
</p>
<p
class=
"total-item-count"
>
{{
statData
.
alarmTotalCount
}}
</p>
<span
style=
"font-size: 12px"
<span
style=
"font-size: 12px"
><span
class=
"tips"
>
昨日
</span><span
v-bind:class=
"
{
><span
class=
"tips"
>
昨日
</span
success: statData.alarmAddCount >= 0,
><span
warn: statData.alarmAddCount
<
0
,
v-bind:class=
"
{
}"
>
{{
success: statData.alarmAddCount >= 0,
statData
.
alarmAddCount
>=
0
warn: statData.alarmAddCount
<
0
,
?
"
+
"
+
statData
.
alarmAddCount
}"
:
"
-
"
+
statData
.
alarmAddCount
>
{{
}}
</span></span>
statData
.
alarmAddCount
>=
0
?
"
+
"
+
statData
.
alarmAddCount
:
"
-
"
+
statData
.
alarmAddCount
}}
</span
></span
>
<p
class=
"total-item-title"
>
<p
class=
"total-item-title"
>
<img
src=
"../assets/images/gjcs.png"
alt=
""
/>
<img
src=
"../assets/images/gjcs.png"
alt=
""
/>
<span>
今日告警次数
</span>
<span>
今日告警次数
</span>
...
@@ -157,20 +112,14 @@
...
@@ -157,20 +112,14 @@
<!-- 今日消息推送 -->
<!-- 今日消息推送 -->
<div
class=
"total-item"
>
<div
class=
"total-item"
>
<p
class=
"total-item-count"
>
{{
statData
.
pushTotalCount
}}
</p>
<p
class=
"total-item-count"
>
{{
statData
.
pushTotalCount
}}
</p>
<span
style=
"font-size: 12px"
<span
style=
"font-size: 12px"
><span
class=
"tips"
>
昨日
</span><span
v-bind:class=
"
{
><span
class=
"tips"
>
昨日
</span
success: statData.pushAddCount >= 0,
><span
warn: statData.pushAddCount
<
0
,
v-bind:class=
"
{
}"
>
{{
success: statData.pushAddCount >= 0,
statData
.
pushAddCount
>=
0
warn: statData.pushAddCount
<
0
,
?
"
+
"
+
statData
.
pushAddCount
}"
:
"
-
"
+
statData
.
pushAddCount
>
{{
}}
</span></span>
statData
.
pushAddCount
>=
0
?
"
+
"
+
statData
.
pushAddCount
:
"
-
"
+
statData
.
pushAddCount
}}
</span
></span
>
<p
class=
"total-item-title"
>
<p
class=
"total-item-title"
>
<img
src=
"../assets/images/xits.png"
alt=
""
/>
<img
src=
"../assets/images/xits.png"
alt=
""
/>
<span>
今日消息推送次数
</span>
<span>
今日消息推送次数
</span>
...
@@ -364,21 +313,13 @@
...
@@ -364,21 +313,13 @@
</el-card>
</el-card>
</el-row>
</el-row>
<el-row
<el-row
style=
"margin-left: 35px; margin-right: 35px; margin-top: 15px"
:gutter=
"20"
>
style=
"margin-left: 35px; margin-right: 35px; margin-top: 15px"
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<!-- 设备数据 -->
<!-- 设备数据 -->
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<div
id=
"deviceTotal"
style=
"width: 100%; height: 300px"
></div>
<div
id=
"deviceTotal"
style=
"width: 100%; height: 300px"
></div>
<!-- 天数选择 -->
<!-- 天数选择 -->
<el-select
<el-select
class=
"change-day"
v-model=
"myEchartsDay"
size=
"mini"
placeholder=
"请选择"
>
class=
"change-day"
v-model=
"myEchartsDay"
size=
"mini"
placeholder=
"请选择"
>
<el-option
label=
"近15天"
:value=
"15"
>
</el-option>
<el-option
label=
"近15天"
:value=
"15"
>
</el-option>
<el-option
label=
"近30天"
:value=
"30"
>
</el-option>
<el-option
label=
"近30天"
:value=
"30"
>
</el-option>
</el-select>
</el-select>
...
@@ -389,12 +330,7 @@
...
@@ -389,12 +330,7 @@
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<div
id=
"deviceStat"
style=
"width: 100%; height: 300px"
></div>
<div
id=
"deviceStat"
style=
"width: 100%; height: 300px"
></div>
<!-- 天数选择 -->
<!-- 天数选择 -->
<el-select
<el-select
class=
"change-day"
size=
"mini"
placeholder=
"请选择"
v-model=
"deviceStatEchartsDay"
>
class=
"change-day"
size=
"mini"
placeholder=
"请选择"
v-model=
"deviceStatEchartsDay"
>
<el-option
label=
"近15天"
:value=
"15"
>
</el-option>
<el-option
label=
"近15天"
:value=
"15"
>
</el-option>
<el-option
label=
"近30天"
:value=
"30"
>
</el-option>
<el-option
label=
"近30天"
:value=
"30"
>
</el-option>
</el-select>
</el-select>
...
@@ -402,22 +338,14 @@
...
@@ -402,22 +338,14 @@
</el-col>
</el-col>
</el-row>
</el-row>
<el-row
<el-row
style=
"margin-left: 35px; margin-right: 35px; margin-top: 10px"
:gutter=
"20"
>
style=
"margin-left: 35px; margin-right: 35px; margin-top: 10px"
:gutter=
"20"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<!-- 设备告警 -->
<!-- 设备告警 -->
<el-card
class=
"box-card device-alarm"
>
<el-card
class=
"box-card device-alarm"
>
<div
id=
"deviceAlarm"
style=
"width: 70%; height: 300px"
></div>
<div
id=
"deviceAlarm"
style=
"width: 70%; height: 300px"
></div>
<div
id=
"PieEcharts"
style=
"width: 30%; height: 300px"
></div>
<div
id=
"PieEcharts"
style=
"width: 30%; height: 300px"
></div>
<!-- 天数选择 -->
<!-- 天数选择 -->
<el-select
<el-select
class=
"change-day"
v-model=
"deviceAlarmEchartsDay"
size=
"mini"
placeholder=
"请选择"
>
class=
"change-day"
v-model=
"deviceAlarmEchartsDay"
size=
"mini"
placeholder=
"请选择"
>
<el-option
label=
"近15天"
:value=
"15"
>
</el-option>
<el-option
label=
"近15天"
:value=
"15"
>
</el-option>
<el-option
label=
"近30天"
:value=
"30"
>
</el-option>
<el-option
label=
"近30天"
:value=
"30"
>
</el-option>
</el-select>
</el-select>
...
@@ -428,12 +356,7 @@
...
@@ -428,12 +356,7 @@
<el-card
class=
"box-card"
>
<el-card
class=
"box-card"
>
<div
id=
"devicePush"
style=
"width: 100%; height: 300px"
></div>
<div
id=
"devicePush"
style=
"width: 100%; height: 300px"
></div>
<!-- 天数选择 -->
<!-- 天数选择 -->
<el-select
<el-select
class=
"change-day"
v-model=
"devicePushEchartsDay"
size=
"mini"
placeholder=
"请选择"
>
class=
"change-day"
v-model=
"devicePushEchartsDay"
size=
"mini"
placeholder=
"请选择"
>
<el-option
label=
"近15天"
:value=
"15"
>
</el-option>
<el-option
label=
"近15天"
:value=
"15"
>
</el-option>
<el-option
label=
"近30天"
:value=
"30"
>
</el-option>
<el-option
label=
"近30天"
:value=
"30"
>
</el-option>
</el-select>
</el-select>
...
@@ -649,8 +572,10 @@ export default {
...
@@ -649,8 +572,10 @@ export default {
let
option
=
{
let
option
=
{
title
:
{
title
:
{
text
:
"
设备数据
"
,
text
:
"
设备数据
"
,
top
:
"
40px
"
,
top
:
"
0
"
,
subtext
:
""
,
subtext
:
""
,
fontSize
:
"
16px
"
,
color
:
"
#333
"
},
},
// 图例提示框
// 图例提示框
tooltip
:
{
tooltip
:
{
...
@@ -677,7 +602,7 @@ export default {
...
@@ -677,7 +602,7 @@ export default {
legend
:
{
legend
:
{
orient
:
"
horizontal
"
,
orient
:
"
horizontal
"
,
top
:
"
40px
"
,
top
:
"
40px
"
,
left
:
"
98
"
,
left
:
"
0
"
,
y
:
"
top
"
,
y
:
"
top
"
,
itemWidth
:
14
,
itemWidth
:
14
,
data
:
[
"
设备总量
"
,
"
在线趋势
"
],
data
:
[
"
设备总量
"
,
"
在线趋势
"
],
...
@@ -758,7 +683,7 @@ export default {
...
@@ -758,7 +683,7 @@ export default {
let
deviceStatOption
=
{
let
deviceStatOption
=
{
title
:
{
title
:
{
text
:
"
设备状态
"
,
text
:
"
设备状态
"
,
top
:
"
40px
"
,
top
:
"
0
"
,
},
},
tooltip
:
{
tooltip
:
{
trigger
:
"
axis
"
,
trigger
:
"
axis
"
,
...
@@ -775,7 +700,7 @@ export default {
...
@@ -775,7 +700,7 @@ export default {
},
},
legend
:
{
legend
:
{
top
:
"
40px
"
,
top
:
"
40px
"
,
left
:
"
98
"
,
left
:
"
0
"
,
itemWidth
:
14
,
itemWidth
:
14
,
data
:
[
"
在线率
"
,
"
离线率
"
],
data
:
[
"
在线率
"
,
"
离线率
"
],
icon
:
"
roundRect
"
,
icon
:
"
roundRect
"
,
...
@@ -868,7 +793,7 @@ export default {
...
@@ -868,7 +793,7 @@ export default {
let
option
=
{
let
option
=
{
title
:
{
title
:
{
text
:
"
设备告警趋势
"
,
text
:
"
设备告警趋势
"
,
top
:
"
40px
"
,
top
:
"
0
"
,
},
},
tooltip
:
{
tooltip
:
{
trigger
:
"
axis
"
,
trigger
:
"
axis
"
,
...
@@ -886,8 +811,7 @@ export default {
...
@@ -886,8 +811,7 @@ export default {
legend
:
{
legend
:
{
itemWidth
:
14
,
itemWidth
:
14
,
top
:
"
40px
"
,
top
:
"
40px
"
,
left
:
""
,
left
:
"
120
"
,
data
:
[
"
告警次数
"
],
data
:
[
"
告警次数
"
],
icon
:
"
roundRect
"
,
icon
:
"
roundRect
"
,
},
},
...
@@ -1027,7 +951,7 @@ export default {
...
@@ -1027,7 +951,7 @@ export default {
let
option
=
{
let
option
=
{
title
:
{
title
:
{
text
:
"
设备消息推送趋势
"
,
text
:
"
设备消息推送趋势
"
,
top
:
"
40px
"
,
top
:
"
0
"
,
},
},
tooltip
:
{
tooltip
:
{
trigger
:
"
axis
"
,
trigger
:
"
axis
"
,
...
@@ -1045,7 +969,7 @@ export default {
...
@@ -1045,7 +969,7 @@ export default {
legend
:
{
legend
:
{
top
:
"
40px
"
,
top
:
"
40px
"
,
itemWidth
:
14
,
itemWidth
:
14
,
left
:
"
16
0
"
,
left
:
"
0
"
,
data
:
[
"
告警次数
"
],
data
:
[
"
告警次数
"
],
icon
:
"
roundRect
"
,
icon
:
"
roundRect
"
,
},
},
...
@@ -1136,32 +1060,38 @@ export default {
...
@@ -1136,32 +1060,38 @@ export default {
width: 100%;
width: 100%;
height: 100%;
height: 100%;
}
}
.total-list {
.total-list {
width: inherit;
width: inherit;
height: inherit;
height: inherit;
display: flex;
display: flex;
justify-content: space-around;
justify-content: space-around;
align-items: center;
align-items: center;
.total-item {
.total-item {
height: 90px;
height: 90px;
display: flex;
display: flex;
flex-direction: column;
flex-direction: column;
align-items: center;
align-items: center;
justify-content: space-between;
justify-content: space-between;
.total-item-count {
.total-item-count {
font-size: 24px;
font-size: 24px;
font-family: Source Han Sans CN;
font-family: Source Han Sans CN;
font-weight: bold;
font-weight: bold;
color: #333333;
color: #333333;
}
}
.total-item-title {
.total-item-title {
display: flex;
display: flex;
align-items: center;
align-items: center;
img {
img {
width: 14px;
width: 14px;
height: 14px;
height: 14px;
margin-right: 4px;
margin-right: 4px;
}
}
span {
span {
font-size: 14px;
font-size: 14px;
font-family: Source Han Sans CN;
font-family: Source Han Sans CN;
...
@@ -1171,9 +1101,11 @@ export default {
...
@@ -1171,9 +1101,11 @@ export default {
}
}
}
}
}
}
.success {
.success {
color: green;
color: green;
}
}
.warn {
.warn {
color: rgb(215, 25, 25);
color: rgb(215, 25, 25);
}
}
...
@@ -1187,6 +1119,7 @@ export default {
...
@@ -1187,6 +1119,7 @@ export default {
display: flex;
display: flex;
position: relative;
position: relative;
}
}
.change-day {
.change-day {
width: 120px !important;
width: 120px !important;
position: absolute;
position: absolute;
...
@@ -1194,6 +1127,7 @@ export default {
...
@@ -1194,6 +1127,7 @@ export default {
right: 20px;
right: 20px;
z-index: 100;
z-index: 100;
}
}
.homeIndex::before {
.homeIndex::before {
content: "";
content: "";
position: absolute;
position: absolute;
...
@@ -1201,7 +1135,7 @@ export default {
...
@@ -1201,7 +1135,7 @@ export default {
left: 0;
left: 0;
width: 100%;
width: 100%;
height: 35%;
height: 35%;
background:
#2681e8
;
background:
linear-gradient(90deg, #1845c6 0%, #2999ff 100%)
;
}
}
</
style
>
</
style
>
device-manager-ui/admin/src/views/alarm/config/dialogshow.vue
View file @
9390ddfa
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
@
click=
"submitForm"
>
确 定
</el-button
>
确 定
</el-button
...
...
device-manager-ui/admin/src/views/alarm/config/view.vue
View file @
9390ddfa
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
基本详细信息
基本详细信息
</
template
>
</
template
>
<
template
slot=
"extra"
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
<el-button
type=
"primary"
class=
"addclass"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button
>
返回
</el-button
>
>
</
template
>
</
template
>
...
...
device-manager-ui/admin/src/views/alarm/sms/send/dialogshow.vue
View file @
9390ddfa
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/alarm/sms/send/list.vue
View file @
9390ddfa
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
notAdd
notDel
:config=
"tableConfig"
>
<LayoutTable
:data=
"tableData"
notAdd
notDel
:config=
"tableConfig"
>
<el-button
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
size=
"mini"
@
click=
"doExport"
slot=
"table-head-left2"
:disabled=
"isExport"
>
导出
</el-button>
style=
"margin-left: 10px"
icon=
"el-icon-tickets"
size=
"mini"
@
click=
"doExport"
:disabled=
"isExport"
>
导出
</el-button
>
</LayoutTable>
</LayoutTable>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
...
@@ -135,6 +128,7 @@ export default {
...
@@ -135,6 +128,7 @@ export default {
<
style
lang=
"less"
>
<
style
lang=
"less"
>
.buttons {
.buttons {
display: flex;
display: flex;
.el-row {
.el-row {
margin-left: 20px;
margin-left: 20px;
}
}
...
...
device-manager-ui/admin/src/views/alarm/sms/send/view.vue
View file @
9390ddfa
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
基本详细信息
基本详细信息
</
template
>
</
template
>
<
template
slot=
"extra"
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</
template
>
</
template
>
<el-descriptions-item
label=
"电话号码"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
label=
"电话号码"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.mobile}}
{{form.mobile}}
...
...
device-manager-ui/admin/src/views/analysis/components/HeaderSite.vue
View file @
9390ddfa
...
@@ -28,7 +28,7 @@
...
@@ -28,7 +28,7 @@
</div>
</div>
<div
class=
"site-btn"
>
<div
class=
"site-btn"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
size=
"small"
size=
"small"
style=
"margin-right: 10px"
style=
"margin-right: 10px"
@
click=
"onSucessSite"
@
click=
"onSucessSite"
...
...
device-manager-ui/admin/src/views/app/publish/dialogshow.vue
View file @
9390ddfa
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/app/publish/view.vue
View file @
9390ddfa
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
基本详细信息
基本详细信息
</
template
>
</
template
>
<
template
slot=
"extra"
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</
template
>
</
template
>
<el-descriptions-item
label=
"应用编码"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
label=
"应用编码"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.appCode}}
{{form.appCode}}
...
...
device-manager-ui/admin/src/views/device/alarm/info/dialogshow.vue
View file @
9390ddfa
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
@
click=
"submitForm"
>
确 定
</el-button
>
确 定
</el-button
...
...
device-manager-ui/admin/src/views/device/alarm/info/list.vue
View file @
9390ddfa
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<LayoutTable
:data=
"tableData"
notAdd
notDel
:config=
"tableConfig"
>
<LayoutTable
:data=
"tableData"
notAdd
notDel
:config=
"tableConfig"
>
<el-button
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"doExport"
slot=
"table-head-left2"
:disabled=
"isExport"
>
导出
</el-button>
style=
"margin-left: 10px"
icon=
"el-icon-tickets"
size=
"mini"
@
click=
"doExport"
:disabled=
"isExport"
>
导出
</el-button
>
<el-tag
slot=
"table-head-row2-left"
size=
"mini"
<el-tag
slot=
"table-head-row2-left"
size=
"mini"
style=
"margin: 10px"
>
告警次数:
{{
tableData
.
totalCount
}}
次
</el-tag>
>
告警次数:
{{
tableData
.
totalCount
}}
次
</el-tag
>
<el-tag
<el-tag
slot=
"table-head-row2-left"
size=
"mini"
style=
"margin: 10px"
type=
"danger"
>
危险:
{{
tableData
.
dangerCount
slot=
"table-head-row2-left"
}}
次
</el-tag>
size=
"mini"
style=
"margin: 5px"
type=
"danger"
>
危险:
{{
tableData
.
dangerCount
}}
次
</el-tag
>
<el-tag
<el-tag
slot=
"table-head-row2-left"
size=
"mini"
style=
"margin: 10px"
type=
"warning"
>
次要:
{{
tableData
.
subCount
slot=
"table-head-row2-left"
}}
次
</el-tag>
size=
"mini"
style=
"margin: 5px"
type=
"warning"
>
次要:
{{
tableData
.
subCount
}}
次
</el-tag
>
<el-tag
<el-tag
slot=
"table-head-row2-left"
size=
"mini"
style=
"margin: 10px"
type=
"info"
>
一般:
{{
tableData
.
normalCount
slot=
"table-head-row2-left"
}}
次
</el-tag>
size=
"mini"
style=
"margin: 5px"
type=
"info"
>
一般:
{{
tableData
.
normalCount
}}
次
</el-tag
>
</LayoutTable>
</LayoutTable>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
...
...
device-manager-ui/admin/src/views/device/dialogshow.vue
View file @
9390ddfa
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/device/list.vue
View file @
9390ddfa
...
@@ -2,259 +2,126 @@
...
@@ -2,259 +2,126 @@
<div
class=
"page"
>
<div
class=
"page"
>
<div
class=
"page-header"
>
<div
class=
"page-header"
>
<div>
<div>
<span
style=
"font-size: 14px"
<span
style=
"font-size: 14px"
><b>
设备列表
</b>
(
><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
</el-link>
style=
"margin-left: 10px"
type=
"primary"
@
click=
"switchMap"
:underline=
"false"
>
地图模式
</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
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"handleImport"
>
导入
slot=
"table-head-left2"
</el-button>
style=
"margin-left: 10px"
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"doExport"
icon=
"el-icon-tickets"
:disabled=
"isExport"
>
导出
size=
"mini"
</el-button>
@
click=
"handleImport"
>
导入
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
</el-button
@
click=
"batchActiveDevice"
>
批量激活
>
</el-button>
<el-button
slot=
"table-head-left2"
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
style=
"margin-left: 10px"
@
click=
"batchUpdateHall"
>
更新大厅
icon=
"el-icon-tickets"
</el-button>
size=
"mini"
@
click=
"doExport"
:disabled=
"isExport"
<el-button
slot=
"table-head-left2"
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>
<el-button
slot=
"table-head-left2"
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"success"
class=
"cursord"
style=
"margin-left: 10px"
@
click=
"changeStat(2)"
>
在线:
{{
tableData
.
onlineCount
}}
台
icon=
"el-icon-tickets"
</el-tag>
size=
"mini"
@
click=
"batchActiveDevice"
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"danger"
class=
"cursord"
>
批量激活
@
click=
"changeStat(1)"
>
离线:
{{
tableData
.
offlineCount
}}
台
</el-button
</el-tag>
>
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"danger"
class=
"cursord"
<el-button
@
click=
"changeStatEnabled(0)"
>
停用:
{{
tableData
.
stopCount
}}
台
slot=
"table-head-left2"
</el-tag>
style=
"margin-left: 10px"
icon=
"el-icon-tickets"
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"danger"
class=
"cursord"
size=
"mini"
@
click=
"changeStat(0)"
>
未激活:
{{
tableData
.
unActiveCount
}}
台
@
click=
"batchUpdateHall"
</el-tag>
>
更新大厅
</el-button
>
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
icon=
"el-icon-tickets"
size=
"mini"
@
click=
"batchRestartApp"
>
批量重启
</el-button
>
<el-tag
slot=
"table-body-head"
size=
"mini"
class=
"cursord"
@
click=
"changeStatAll()"
>
设备总数:
{{
tableData
.
totalCount
}}
台
</el-tag
>
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"success"
class=
"cursord"
@
click=
"changeStat(2)"
>
在线:
{{
tableData
.
onlineCount
}}
台
</el-tag
>
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"danger"
class=
"cursord"
@
click=
"changeStat(1)"
>
离线:
{{
tableData
.
offlineCount
}}
台
</el-tag
>
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"danger"
class=
"cursord"
@
click=
"changeStatEnabled( 0)"
>
停用:
{{
tableData
.
stopCount
}}
台
</el-tag
>
<el-tag
slot=
"table-body-head"
size=
"mini"
style=
"margin: 5px"
type=
"danger"
class=
"cursord"
@
click=
"changeStat(0)"
>
未激活:
{{
tableData
.
unActiveCount
}}
台
</el-tag
>
</LayoutTable>
</LayoutTable>
<!-- 设备导入对话框 -->
<!-- 设备导入对话框 -->
<el-dialog
<el-dialog
:title=
"upload.title"
:visible.sync=
"upload.open"
width=
"400px"
append-to-body
>
:title=
"upload.title"
<el-upload
ref=
"upload"
:limit=
"1"
accept=
".xlsx, .xls"
:headers=
"upload.headers"
:visible.sync=
"upload.open"
:action=
"upload.url + '?siteId=' + siteId"
:disabled=
"upload.isUploading"
:on-progress=
"handleFileUploadProgress"
width=
"400px"
:on-success=
"handleFileSuccess"
:auto-upload=
"false"
drag
>
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"
>
将文件拖到此处,或
将文件拖到此处,或
<em>
点击上传
</em>
<em>
点击上传
</em>
</div>
</div>
<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
<el-link
type=
"primary"
class=
"addclass"
style=
"font-size: 14px"
@
click=
"downloadTemplate"
>
下载模板
type=
"primary"
</el-link>
style=
"font-size: 14px"
@
click=
"downloadTemplate"
>
下载模板
</el-link
>
</div>
</div>
<div
class=
"el-upload__tip"
style=
"color: red"
slot=
"tip"
>
<div
class=
"el-upload__tip"
style=
"color: red"
slot=
"tip"
>
提示:仅允许导入“xls”或“xlsx”格式文件!
提示:仅允许导入“xls”或“xlsx”格式文件!
</div>
</div>
</el-upload>
</el-upload>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
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
<el-dialog
:title=
"tree.title"
:visible.sync=
"tree.open"
width=
"40%"
append-to-body
>
:title=
"tree.title"
<span
style=
"font-size: 13px"
><b>
当前站点:
</b>
(
<el-link
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
:visible.sync=
"tree.open"
:underline=
"false"
>
{{
siteName
}}
</el-link>
width=
"40%"
站点编码:
{{
siteCode
}}
)
</span>
append-to-body
>
<span
style=
"font-size: 13px"
><b>
当前站点:
</b>
(
<el-link
style=
"margin-left: 10px"
type=
"primary"
: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
<el-tree
size=
"mini"
ref=
"siteTree"
:data=
"areaData"
id=
"el-tree"
node-key=
"id"
indent=
"4"
:props=
"treeProps"
size=
"mini"
:load=
"loadNode"
highlight-current
default-expand-all
:expand-on-click-node=
"false"
ref=
"siteTree"
:render-content=
"renderContent"
@
node-click=
"handleNodeClick"
>
: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"
@
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
<el-dialog
:title=
"hallDialog.title"
:visible.sync=
"hallDialog.open"
width=
"60%"
append-to-body
>
:title=
"hallDialog.title"
<el-form
label-width=
"120px"
>
:visible.sync=
"hallDialog.open"
width=
"60%"
<Field
label=
"站点大厅"
v-model=
"hallId"
type=
"radio"
:enumData=
"tableData.dict.hallId"
placeholder=
"请选择所属大厅"
/>
append-to-body
>
<el-form
label-width=
"120px"
>
<Field
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"
@
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
<el-dialog
title=
"设备二维码"
:visible.sync=
"qrCodeDialog.visible"
width=
"350px"
>
title=
"设备二维码"
<img
:src=
"qrCodeDialog.qrCode"
/>
:visible.sync=
"qrCodeDialog.visible"
width=
"350px"
>
<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>
<!--
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
-->
<!--
<dialog-show
ref=
"dialogform"
@
ok=
"getData"
/>
-->
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
<drawer-view
ref=
"drawerViewform"
@
ok=
"getData"
/>
<drawer-view
ref=
"drawerViewform"
@
ok=
"getData"
/>
</div>
</div>
</
template
>
</
template
>
...
@@ -267,26 +134,26 @@ import tree from "@/assets/mixins/tree";
...
@@ -267,26 +134,26 @@ import tree from "@/assets/mixins/tree";
export
default
{
export
default
{
name
:
"
Device
"
,
name
:
"
Device
"
,
components
:
{
drawerShow
,
drawerView
},
components
:
{
drawerShow
,
drawerView
},
mixins
:
[
table
,
tree
],
mixins
:
[
table
,
tree
],
created
()
{
created
()
{
this
.
siteId
=
this
.
$route
.
query
.
siteId
;
this
.
siteId
=
this
.
$route
.
query
.
siteId
;
this
.
info
=
this
.
$route
.
query
;
this
.
info
=
this
.
$route
.
query
;
this
.
query
=
{
siteId
:
this
.
siteId
};
this
.
query
=
{
siteId
:
this
.
siteId
};
this
.
$get
(
"
/sitestat/siteInfo
"
,
{
this
.
$get
(
"
/sitestat/siteInfo
"
,
{
siteId
:
this
.
siteId
,
siteId
:
this
.
siteId
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
if
(
res
.
code
==
1
)
{
//this.info=res.data
//this.info=res.data
this
.
siteName
=
res
.
data
.
siteName
;
this
.
siteName
=
res
.
data
.
siteName
;
this
.
siteCode
=
res
.
data
.
siteCode
;
this
.
siteCode
=
res
.
data
.
siteCode
;
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
});
});
// this.$router.push({ query: {siteId:this.siteId } });
// this.$router.push({ query: {siteId:this.siteId } });
},
},
...
@@ -309,15 +176,15 @@ export default {
...
@@ -309,15 +176,15 @@ export default {
downloadTemplate
()
{
downloadTemplate
()
{
this
.
isExport
=
true
;
this
.
isExport
=
true
;
this
.
$download
(
this
.
$download
(
"
/device/downloadTemplate
"
,
"
/device/downloadTemplate
"
,
{},
{},
{
type
:
"
excel
"
,
fileName
:
"
设备导入模板
"
}
{
type
:
"
excel
"
,
fileName
:
"
设备导入模板
"
}
)
)
.
then
(()
=>
(
this
.
isExport
=
false
))
.
then
(()
=>
(
this
.
isExport
=
false
))
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
isExport
=
false
;
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
});
});
},
},
/** 文件上传中处理 */
/** 文件上传中处理 */
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
handleFileUploadProgress
(
event
,
file
,
fileList
)
{
...
@@ -328,7 +195,7 @@ export default {
...
@@ -328,7 +195,7 @@ export default {
this
.
upload
.
open
=
false
;
this
.
upload
.
open
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
upload
.
isUploading
=
false
;
this
.
$refs
.
upload
.
clearFiles
();
this
.
$refs
.
upload
.
clearFiles
();
this
.
$alert
(
response
.
msg
,
"
导入结果
"
,
{
dangerouslyUseHTMLString
:
true
});
this
.
$alert
(
response
.
msg
,
"
导入结果
"
,
{
dangerouslyUseHTMLString
:
true
});
this
.
getData
();
this
.
getData
();
},
},
/** 提交上传文件 */
/** 提交上传文件 */
...
@@ -339,19 +206,19 @@ export default {
...
@@ -339,19 +206,19 @@ export default {
doExport
()
{
doExport
()
{
this
.
isExport
=
true
;
this
.
isExport
=
true
;
this
.
$download
(
this
.
$download
(
"
/device/exportExcel
"
,
"
/device/exportExcel
"
,
{
{
idList
:
this
.
selection
,
idList
:
this
.
selection
,
deviceName
:
this
.
$route
.
query
[
"
deviceName
"
],
deviceName
:
this
.
$route
.
query
[
"
deviceName
"
],
siteId
:
this
.
$route
.
query
[
"
siteId
"
],
siteId
:
this
.
$route
.
query
[
"
siteId
"
],
},
},
{
type
:
"
excel
"
,
fileName
:
"
设备表
"
}
{
type
:
"
excel
"
,
fileName
:
"
设备表
"
}
)
)
.
then
(()
=>
(
this
.
isExport
=
false
))
.
then
(()
=>
(
this
.
isExport
=
false
))
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
isExport
=
false
;
this
.
isExport
=
false
;
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
});
});
},
},
/** 重写新增方法 */
/** 重写新增方法 */
toAdd
(
row
)
{
toAdd
(
row
)
{
...
@@ -404,7 +271,7 @@ export default {
...
@@ -404,7 +271,7 @@ export default {
// delete this.query["productId"]
// delete this.query["productId"]
//delete this.query["deviceName"]
//delete this.query["deviceName"]
// delete this.query["deviceCode"]
// delete this.query["deviceCode"]
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
();
},
},
...
@@ -414,60 +281,60 @@ export default {
...
@@ -414,60 +281,60 @@ export default {
this
.
$post
(
"
/device/active
"
,
{
this
.
$post
(
"
/device/active
"
,
{
deviceCode
:
row
.
deviceCode
,
deviceCode
:
row
.
deviceCode
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
if
(
res
.
code
==
1
)
{
this
.
$message
.
success
(
"
激活设备成功!
"
);
this
.
$message
.
success
(
"
激活设备成功!
"
);
this
.
getData
();
this
.
getData
();
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
});
});
},
},
batchActiveDevice
(
row
)
{
batchActiveDevice
(
row
)
{
this
.
$post
(
"
/device/batchActive
"
,
{
this
.
$post
(
"
/device/batchActive
"
,
{
idList
:
this
.
selection
,
idList
:
this
.
selection
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
if
(
res
.
code
==
1
)
{
this
.
$message
.
success
(
"
批量激活设备成功!
"
);
this
.
$message
.
success
(
"
批量激活设备成功!
"
);
this
.
getData
();
this
.
getData
();
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
});
});
},
},
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
();
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
});
});
},
},
...
@@ -475,34 +342,34 @@ export default {
...
@@ -475,34 +342,34 @@ export default {
this
.
$post
(
"
/device/batchRestartApp
"
,
{
this
.
$post
(
"
/device/batchRestartApp
"
,
{
idList
:
this
.
selection
,
idList
:
this
.
selection
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
if
(
res
.
code
==
1
)
{
this
.
$message
.
success
(
"
批量重启设备应用成功!
"
);
this
.
$message
.
success
(
"
批量重启设备应用成功!
"
);
this
.
getData
();
this
.
getData
();
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
});
});
},
},
restartApp
(
row
)
{
restartApp
(
row
)
{
this
.
$post
(
"
/device/batchRestartApp
"
,
{
this
.
$post
(
"
/device/batchRestartApp
"
,
{
idList
:
[
row
.
id
],
idList
:
[
row
.
id
],
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
if
(
res
.
code
==
1
)
{
this
.
$message
.
success
(
"
重启设备应用成功!
"
);
this
.
$message
.
success
(
"
重启设备应用成功!
"
);
this
.
getData
();
this
.
getData
();
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
});
});
},
},
updateSite
(
row
)
{
updateSite
(
row
)
{
this
.
$get
(
"
/sitestat/siteTree
"
,
{}).
then
(({
data
})
=>
{
this
.
$get
(
"
/sitestat/siteTree
"
,
{}).
then
(({
data
})
=>
{
this
.
areaData
=
data
.
siteTree
;
this
.
areaData
=
data
.
siteTree
;
this
.
tree
.
open
=
true
;
this
.
tree
.
open
=
true
;
this
.
tree
.
id
=
row
.
id
;
this
.
tree
.
id
=
row
.
id
;
...
@@ -526,37 +393,37 @@ export default {
...
@@ -526,37 +393,37 @@ export default {
siteCode
:
this
.
currentNode
.
siteCode
,
siteCode
:
this
.
currentNode
.
siteCode
,
siteName
:
this
.
currentNode
.
label
,
siteName
:
this
.
currentNode
.
label
,
})
})
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
code
==
1
)
{
if
(
res
.
code
==
1
)
{
this
.
$message
.
success
(
"
编辑站点成功!
"
);
this
.
$message
.
success
(
"
编辑站点成功!
"
);
this
.
tree
.
open
=
false
;
this
.
tree
.
open
=
false
;
this
.
getData
();
this
.
getData
();
}
}
})
})
.
catch
((
error
)
=>
{
.
catch
((
error
)
=>
{
this
.
loading
=
false
;
this
.
loading
=
false
;
this
.
$message
.
error
(
error
.
message
);
this
.
$message
.
error
(
error
.
message
);
});
});
},
},
// 操作菜单状态
// 操作菜单状态
changeStatus
(
row
,
column
)
{
changeStatus
(
row
,
column
)
{
return
(
return
(
<
device
-
switch
<
device
-
switch
confirm
confirm
url
=
"
/device/enable
"
url
=
"
/device/enable
"
row
=
{
row
}
row
=
{
row
}
onChange
=
{
this
.
statusChange
}
onChange
=
{
this
.
statusChange
}
value
=
{
this
.
tableData
.
data
}
value
=
{
this
.
tableData
.
data
}
onInput
=
{(
data
)
=>
{
onInput
=
{(
data
)
=>
{
this
.
tableData
.
data
=
data
;
this
.
tableData
.
data
=
data
;
}}
}}
/
>
/
>
);
);
},
},
async
viewQrCode
(
id
)
{
async
viewQrCode
(
id
)
{
try
{
try
{
const
{
qrCode
,
qrCodeUrl
}
=
await
this
.
$post
(
"
/device/viewQrCode
"
,
{
const
{
qrCode
,
qrCodeUrl
}
=
await
this
.
$post
(
"
/device/viewQrCode
"
,
{
id
:
id
,
id
:
id
,
});
});
this
.
qrCodeDialog
.
qrCode
=
qrCode
;
this
.
qrCodeDialog
.
qrCode
=
qrCode
;
...
@@ -618,7 +485,7 @@ export default {
...
@@ -618,7 +485,7 @@ export default {
config
:
{
config
:
{
getsocketData
:
null
,
getsocketData
:
null
,
tableName
:
"
table
"
,
tableName
:
"
table
"
,
search
:
[
search
:
[
{
{
name
:
"
deviceName
"
,
name
:
"
deviceName
"
,
...
@@ -645,9 +512,9 @@ export default {
...
@@ -645,9 +512,9 @@ export default {
reserveSelection
:
true
,
reserveSelection
:
true
,
width
:
60
,
width
:
60
,
},
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
align
:
"
center
"
,
width
:
50
},
{
type
:
"
index
"
,
label
:
"
序号
"
,
align
:
"
center
"
,
width
:
50
},
{
label
:
"
设备名称
"
,
align
:
"
center
"
,
prop
:
"
deviceName
"
},
{
label
:
"
设备名称
"
,
align
:
"
center
"
,
prop
:
"
deviceName
"
},
{
{
label
:
"
设备类型
"
,
label
:
"
设备类型
"
,
...
@@ -656,9 +523,9 @@ export default {
...
@@ -656,9 +523,9 @@ export default {
formatter
:
this
.
formatter
,
formatter
:
this
.
formatter
,
},
},
{
label
:
"
设备编码
"
,
align
:
"
center
"
,
prop
:
"
deviceCode
"
},
{
label
:
"
设备编码
"
,
align
:
"
center
"
,
prop
:
"
deviceCode
"
},
{
label
:
"
所属大厅
"
,
prop
:
"
hallName
"
},
{
label
:
"
所属大厅
"
,
prop
:
"
hallName
"
},
{
{
label
:
"
设备生产商
"
,
label
:
"
设备生产商
"
,
...
@@ -667,7 +534,7 @@ export default {
...
@@ -667,7 +534,7 @@ export default {
formatter
:
this
.
formatter
,
formatter
:
this
.
formatter
,
width
:
250
,
width
:
250
,
},
},
{
label
:
"
负责人
"
,
align
:
"
center
"
,
prop
:
"
leadingOfficial
"
},
{
label
:
"
负责人
"
,
align
:
"
center
"
,
prop
:
"
leadingOfficial
"
},
{
{
label
:
"
联系电话
"
,
label
:
"
联系电话
"
,
align
:
"
center
"
,
align
:
"
center
"
,
...
@@ -708,46 +575,46 @@ export default {
...
@@ -708,46 +575,46 @@ export default {
width
:
240
,
width
:
240
,
formatter
:
(
row
)
=>
{
formatter
:
(
row
)
=>
{
return
(
return
(
<
div
>
<
div
>
<
table
-
buttons
<
table
-
buttons
noAdd
noAdd
row
=
{
row
}
row
=
{
row
}
onEdit
=
{
this
.
toEdit
}
onEdit
=
{
this
.
toEdit
}
onView
=
{
this
.
toView
}
onView
=
{
this
.
toView
}
onDel
=
{
this
.
toDel
}
onDel
=
{
this
.
toDel
}
/
>
/
>
<
span
>
<
/span
>
<
span
>
<
/span
>
{
row
.
deviceStatus
===
0
?
(
{
row
.
deviceStatus
===
0
?
(
<
el
-
button
size
=
"
mini
"
type
=
"
text
"
icon
=
"
el-icon-open
"
onClick
=
{()
=>
{
this
.
activeDevice
(
row
);
}}
>
激活
<
/el-button
>
)
:
(
""
)}
<
span
>
<
/span
>
<
el
-
button
type
=
"
text
"
size
=
"
mini
"
onClick
=
{()
=>
this
.
viewQrCode
(
row
.
id
)}
>
二维码
<
/el-button
>
<
span
>
<
/span
>
<
el
-
button
<
el
-
button
type
=
"
text
"
size
=
"
mini
"
size
=
"
mini
"
type
=
"
text
"
onClick
=
{()
=>
this
.
restartApp
(
row
)}
icon
=
"
el-icon-open
"
onClick
=
{()
=>
{
this
.
activeDevice
(
row
);
}}
>
>
重启
激活
<
/el-button
>
<
/el-button
>
<
/div
>
)
:
(
""
)}
<
span
>
<
/span
>
<
el
-
button
type
=
"
text
"
size
=
"
mini
"
onClick
=
{()
=>
this
.
viewQrCode
(
row
.
id
)}
>
二维码
<
/el-button
>
<
span
>
<
/span
>
<
el
-
button
type
=
"
text
"
size
=
"
mini
"
onClick
=
{()
=>
this
.
restartApp
(
row
)}
>
重启
<
/el-button
>
<
/div
>
);
);
},
},
},
},
...
...
device-manager-ui/admin/src/views/device/log/dialogshow.vue
View file @
9390ddfa
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/device/log/view.vue
View file @
9390ddfa
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
基本详细信息
基本详细信息
</
template
>
</
template
>
<
template
slot=
"extra"
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</
template
>
</
template
>
<el-descriptions-item
label=
"设备编号"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
label=
"设备编号"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.deviceNum}}
{{form.deviceNum}}
...
...
device-manager-ui/admin/src/views/device/module/dialogshow.vue
View file @
9390ddfa
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/device/module/distribute/dialogshow.vue
View file @
9390ddfa
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/device/module/distribute/view.vue
View file @
9390ddfa
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
基本详细信息
基本详细信息
</
template
>
</
template
>
<
template
slot=
"extra"
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</
template
>
</
template
>
<el-descriptions-item
label=
"产品Id"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
label=
"产品Id"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.productId}}
{{form.productId}}
...
...
device-manager-ui/admin/src/views/device/module/use/dialogshow.vue
View file @
9390ddfa
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/device/module/use/view.vue
View file @
9390ddfa
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
基本详细信息
基本详细信息
</
template
>
</
template
>
<
template
slot=
"extra"
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</
template
>
</
template
>
<el-descriptions-item
label=
"模块名称"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
label=
"模块名称"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.moduleName}}
{{form.moduleName}}
...
...
device-manager-ui/admin/src/views/device/module/view.vue
View file @
9390ddfa
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
基本详细信息
基本详细信息
</
template
>
</
template
>
<
template
slot=
"extra"
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</
template
>
</
template
>
<el-descriptions-item
label=
"模块名称"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
label=
"模块名称"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.moduleName}}
{{form.moduleName}}
...
...
device-manager-ui/admin/src/views/firm/dialogshow.vue
View file @
9390ddfa
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/firm/list.vue
View file @
9390ddfa
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<div
class=
"xs-title"
>
<div
class=
"active"
>
生产产商
</div>
</div>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
</LayoutTable>
<LayoutTable
:data=
"tableData"
:config=
"tableConfig"
>
</LayoutTable>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
<drawer-show
ref=
"drawerform"
@
ok=
"getData"
/>
...
@@ -17,7 +20,7 @@ export default {
...
@@ -17,7 +20,7 @@ export default {
drawerShow
,
drawerShow
,
},
},
mixins
:
[
table
],
mixins
:
[
table
],
created
()
{},
created
()
{
},
methods
:
{
methods
:
{
/** 重写新增方法 */
/** 重写新增方法 */
toAdd
(
row
)
{
toAdd
(
row
)
{
...
@@ -85,4 +88,23 @@ export default {
...
@@ -85,4 +88,23 @@ export default {
};
};
},
},
};
};
</
script
>
</
script
>
\ No newline at end of file
<
style
scoped
lang=
"less"
>
.xs-title {
padding-left: 20px;
background: #fff;
border-bottom: 1px solid #ededed;
display: flex;
height: 40px;
line-height: 40px;
font-size: 14px;
.active {
color: #1890ff;
font-weight: 600;
border-bottom: 2px solid #1890ff;
padding: 0 15px;
}
}
</
style
>
\ No newline at end of file
device-manager-ui/admin/src/views/firm/view.vue
View file @
9390ddfa
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
基本详细信息
基本详细信息
</
template
>
</
template
>
<
template
slot=
"extra"
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</
template
>
</
template
>
<el-descriptions-item
label=
"设备生产厂商名称"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
label=
"设备生产厂商名称"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.firmName}}
{{form.firmName}}
...
...
device-manager-ui/admin/src/views/login/login.vue
View file @
9390ddfa
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
</el-form-item>
</el-form-item>
<el-form-item
size=
"large"
>
<el-form-item
size=
"large"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
native-type=
"submit"
native-type=
"submit"
:loading=
"loading"
:loading=
"loading"
@
click=
"onSubmit"
@
click=
"onSubmit"
...
...
device-manager-ui/admin/src/views/platform/dialogshow.vue
View file @
9390ddfa
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/product/dialogshow.vue
View file @
9390ddfa
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/product/version/view.vue
View file @
9390ddfa
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
基本详细信息
基本详细信息
</
template
>
</
template
>
<
template
slot=
"extra"
>
<
template
slot=
"extra"
>
<el-button
type=
"primary"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"$router.go(-1)"
size=
"small"
>
返回
</el-button>
</
template
>
</
template
>
<el-descriptions-item
label=
"产品Id"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
<el-descriptions-item
label=
"产品Id"
label-class-name=
"labelClass"
content-class-name=
"contentClass"
>
{{form.productId}}
{{form.productId}}
...
...
device-manager-ui/admin/src/views/site/dialogshow.vue
View file @
9390ddfa
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/sitestat/dialogshow.vue
View file @
9390ddfa
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
@
click=
"submitForm"
>
确 定
</el-button
>
确 定
</el-button
...
...
device-manager-ui/admin/src/views/sitestat/list.vue
View file @
9390ddfa
<
template
>
<
template
>
<div
class=
"page"
>
<div
class=
"page"
>
<el-row
:gutter=
"20"
>
<el-row
:gutter=
"20"
class=
"pd20"
>
<el-col
:span=
"6"
:xs=
"12"
class=
"mytree"
>
<el-col
:span=
"6"
:xs=
"12"
class=
"mytree"
>
<el-card>
<el-card>
<div
slot=
"header"
>
<div
slot=
"header"
>
<span><b
class=
"cardTitle"
>
站点分布
</b></span>
<span><b
class=
"cardTitle"
>
站点分布
</b></span>
<el-button
style=
"float: right"
@
click=
"switchStat"
type=
"text"
<el-button
style=
"float: right"
@
click=
"switchStat"
type=
"text"
>
切换为地图模式
</el-button>
>
切换为地图模式
</el-button
>
</div>
</div>
<el-scrollbar
style=
"height: 100%"
>
<el-scrollbar
style=
"height: 100%"
>
<el-tree
<el-tree
size=
"mini"
ref=
"siteTree"
:data=
"areaData"
id=
"el-tree"
node-key=
"id"
indent=
"4"
:props=
"treeProps"
size=
"mini"
:load=
"loadNode"
highlight-current
default-expand-all
:expand-on-click-node=
"false"
ref=
"siteTree"
:render-content=
"renderContent"
@
node-click=
"handleNodeClick"
>
: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>
</el-card>
</el-card>
...
@@ -33,22 +19,9 @@
...
@@ -33,22 +19,9 @@
<el-col
:span=
"18"
:xs=
"12"
>
<el-col
:span=
"18"
:xs=
"12"
>
<el-card>
<el-card>
<el-row>
<el-row>
<LayoutTable
<LayoutTable
ref=
"layoutTable"
:data=
"tableData"
notAdd
notDel
:config=
"tableConfig"
>
ref=
"layoutTable"
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"doExport"
:data=
"tableData"
:disabled=
"isExport"
>
导出
</el-button>
notAdd
notDel
:config=
"tableConfig"
>
<el-button
slot=
"table-head-left2"
style=
"margin-left: 10px"
icon=
"el-icon-tickets"
size=
"mini"
@
click=
"doExport"
:disabled=
"isExport"
>
导出
</el-button
>
</LayoutTable>
</LayoutTable>
</el-row>
</el-row>
</el-card>
</el-card>
...
@@ -245,9 +218,11 @@ export default {
...
@@ -245,9 +218,11 @@ export default {
.el-card__body
{
.el-card__body
{
padding
:
10px
;
padding
:
10px
;
}
}
.el-calendar-table
.el-calendar-day
{
.el-calendar-table
.el-calendar-day
{
height
:
70px
;
height
:
70px
;
}
}
.is-selected
{
.is-selected
{
color
:
#fa3b19
;
color
:
#fa3b19
;
}
}
...
@@ -261,32 +236,32 @@ export default {
...
@@ -261,32 +236,32 @@ export default {
border-bottom
:
3px
solid
rgb
(
20
,
134
,
248
);
border-bottom
:
3px
solid
rgb
(
20
,
134
,
248
);
padding-bottom
:
2px
;
padding-bottom
:
2px
;
}
}
.
mytree
:
:
v-deep
{
.
mytree
:
:
v-deep
{
.
el-tree--highlight-current
.
el-tree--highlight-current
:
:
v-deep
.
el-tree-node
.
is-checked
>.
el-tree-node__content
{
:
:
v-deep
.
el-tree-node
.
is-checked
>
.
el-tree-node__content
{
background-color
:
rgb
(
255
,
255
,
255
);
background-color
:
rgb
(
255
,
255
,
255
);
color
:
rgb
(
64
,
158
,
255
);
color
:
rgb
(
64
,
158
,
255
);
}
}
.
el-tree--highlight-current
:
:
v-deep
.
el-tree--highlight-current
:
:
v-deep
.
el-tree-node
.
is-current
>.
el-tree-node__content
{
.
el-tree-node
.
is-current
>
.
el-tree-node__content
{
background-color
:
rgb
(
255
,
255
,
255
);
background-color
:
rgb
(
255
,
255
,
255
);
color
:
rgb
(
64
,
158
,
255
);
color
:
rgb
(
64
,
158
,
255
);
}
}
.el-tree
>
.el-tree-node
:after
{
.el-tree
>
.el-tree-node
:after
{
border-top
:
none
;
border-top
:
none
;
}
}
.el-tree-node
{
.el-tree-node
{
position
:
relative
;
position
:
relative
;
padding-left
:
16px
;
padding-left
:
16px
;
}
}
//节点有间隙,隐藏掉展开按钮就好了,如果觉得空隙没事可以删掉
//节点有间隙,隐藏掉展开按钮就好了,如果觉得空隙没事可以删掉
.el-tree-node__expand-icon.is-leaf
{
.el-tree-node__expand-icon.is-leaf
{
display
:
none
;
display
:
none
;
}
}
.el-tree-node__children
{
.el-tree-node__children
{
padding-left
:
16px
;
padding-left
:
16px
;
}
}
...
@@ -295,11 +270,11 @@ export default {
...
@@ -295,11 +270,11 @@ export default {
height
:
38px
;
height
:
38px
;
}
}
.el-tree
>
.el-tree-node
:before
{
.el-tree
>
.el-tree-node
:before
{
border-left
:
none
;
border-left
:
none
;
}
}
.el-tree
>
.el-tree-node
:after
{
.el-tree
>
.el-tree-node
:after
{
border-top
:
none
;
border-top
:
none
;
}
}
...
...
device-manager-ui/admin/src/views/sitestat/mapDetail.vue
View file @
9390ddfa
...
@@ -2,21 +2,13 @@
...
@@ -2,21 +2,13 @@
<div>
<div>
<MapDetail
ref=
"map"
:markersData=
"originData"
@
choose=
"getDetailData"
>
<MapDetail
ref=
"map"
:markersData=
"originData"
@
choose=
"getDetailData"
>
<el-card
body-style=
"padding:0px;"
slot=
"leftTop1"
>
<el-card
body-style=
"padding:0px;"
slot=
"leftTop1"
>
<el-button
<el-button
type=
"text"
size=
"mini"
style=
"margin-left: 10px"
icon=
"el-icon-back"
type=
"text"
@
click=
"switchStat"
>
返回至站点分布
</el-button>
size=
"mini"
style=
"margin-left: 10px"
icon=
"el-icon-back"
@
click=
"switchStat"
>
返回至站点分布
</el-button
>
</el-card>
</el-card>
<el-card
slot=
"leftTop"
>
<el-card
slot=
"leftTop"
>
<el-row
type=
"flex"
justify=
"space-between"
>
<el-row
type=
"flex"
justify=
"space-between"
>
<span
style=
"font-size: 18px"
<span
style=
"font-size: 18px"
><b>
{{
info
.
siteName
}}
</b></span>
><b>
{{
info
.
siteName
}}
</b></span
>
</el-row>
</el-row>
<el-divider></el-divider>
<el-divider></el-divider>
...
@@ -27,11 +19,8 @@
...
@@ -27,11 +19,8 @@
<el-descriptions-item
label=
"站点地址"
>
{{
<el-descriptions-item
label=
"站点地址"
>
{{
info
.
address
info
.
address
}}
</el-descriptions-item>
}}
</el-descriptions-item>
<el-descriptions-item
<el-descriptions-item
label=
"联系人"
:labelStyle=
"
{ 'text-align': 'right', width: '50px' }">
{{
info
.
leadingOfficial
label=
"联系人"
}}
</el-descriptions-item>
:labelStyle=
"
{ 'text-align': 'right', width: '50px' }"
>
{{
info
.
leadingOfficial
}}
</el-descriptions-item
>
<el-descriptions-item
label=
"联系电话"
>
<el-descriptions-item
label=
"联系电话"
>
{{
info
.
leadingOfficialTelephone
}}
{{
info
.
leadingOfficialTelephone
}}
</el-descriptions-item>
</el-descriptions-item>
...
@@ -43,33 +32,23 @@
...
@@ -43,33 +32,23 @@
<el-divider></el-divider>
<el-divider></el-divider>
<el-row
type=
"flex"
justify=
"space-around"
>
<el-row
type=
"flex"
justify=
"space-around"
>
<el-col
:span=
"4"
>
<el-col
:span=
"4"
>
<span
style=
"font-size: 13px"
<span
style=
"font-size: 13px"
><b>
{{
info
.
deviceTotal
}}
</b></span><br
/>
><b>
{{
info
.
deviceTotal
}}
</b></span
><br
/>
<span
style=
"font-size: 12px"
>
设备总数
</span>
<span
style=
"font-size: 12px"
>
设备总数
</span>
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
:span=
"4"
>
<span
style=
"font-size: 13px"
<span
style=
"font-size: 13px"
><b
style=
"color: green"
>
{{
info
.
onlineCount
}}
</b></span><br
/>
><b
style=
"color: green"
>
{{
info
.
onlineCount
}}
</b></span
><br
/>
<span
style=
"font-size: 12px"
>
在线
</span>
<span
style=
"font-size: 12px"
>
在线
</span>
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
:span=
"4"
>
<span
style=
"font-size: 13px"
<span
style=
"font-size: 13px"
><b
style=
"color: red"
>
{{
info
.
offlineCount
}}
</b></span><br
/>
><b
style=
"color: red"
>
{{
info
.
offlineCount
}}
</b></span
><br
/>
<span
style=
"font-size: 12px"
>
离线
</span>
<span
style=
"font-size: 12px"
>
离线
</span>
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
:span=
"4"
>
<span
style=
"font-size: 13px"
<span
style=
"font-size: 13px"
><b
style=
"color: orange"
>
{{
info
.
stopCount
}}
</b></span><br
/>
><b
style=
"color: orange"
>
{{
info
.
stopCount
}}
</b></span
><br
/>
<span
style=
"font-size: 12px"
>
停用
</span>
<span
style=
"font-size: 12px"
>
停用
</span>
</el-col>
</el-col>
<el-col
:span=
"4"
>
<el-col
:span=
"4"
>
<span
style=
"font-size: 13px"
<span
style=
"font-size: 13px"
><b
style=
"color: grey"
>
{{
info
.
unActiveCount
}}
</b></span><br
/>
><b
style=
"color: grey"
>
{{
info
.
unActiveCount
}}
</b></span
><br
/>
<span
style=
"font-size: 12px"
>
待激活
</span>
<span
style=
"font-size: 12px"
>
待激活
</span>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -77,81 +56,39 @@
...
@@ -77,81 +56,39 @@
<el-divider></el-divider>
<el-divider></el-divider>
<el-row
type=
"flex"
justify=
"space-around"
style=
"margin-top: 10px"
>
<el-row
type=
"flex"
justify=
"space-around"
style=
"margin-top: 10px"
>
<el-button
<el-button
type=
"primary"
class=
"addclass"
@
click=
"switchList"
size=
"mini"
>
列表模式
</el-button>
type=
"primary"
@
click=
"switchList"
<el-button
type=
"primary"
class=
"addclass"
size=
"mini"
icon=
"el-icon-edit-outline"
>
编辑站点
</el-button>
size=
"mini"
icon=
"el-icon-tickets"
<el-button
type=
"primary"
class=
"addclass"
size=
"mini"
@
click=
"addDevice"
icon=
"el-icon-plus"
>
添加设备
</el-button>
>
列表模式
</el-button
>
<el-button
type=
"primary"
size=
"mini"
icon=
"el-icon-edit-outline"
>
编辑站点
</el-button
>
<el-button
type=
"primary"
size=
"mini"
@
click=
"addDevice"
icon=
"el-icon-plus"
>
添加设备
</el-button
>
</el-row>
</el-row>
</el-card>
</el-card>
<el-col
<el-col
slot=
"rightTop"
style=
"box-shadow: 12px 2px 12px 12px rgba(0, 0, 0, 0.1)"
>
slot=
"rightTop"
style=
"box-shadow: 12px 2px 12px 12px rgba(0, 0, 0, 0.1)"
>
<el-row
type=
"flex"
justify=
"space-around"
>
<el-row
type=
"flex"
justify=
"space-around"
>
<el-select
<el-select
style=
"padding: 5px"
size=
"mini"
@
change=
"deviceStatuschange"
v-model=
"deviceStatus"
style=
"padding: 5px"
placeholder=
"请选择设备状态"
>
size=
"mini"
<el-option
v-for=
"($label, $value) in tableData.dict.deviceStatus"
:key=
"$value"
:label=
"$label"
@
change=
"deviceStatuschange"
:value=
"$value"
></el-option>
v-model=
"deviceStatus"
placeholder=
"请选择设备状态"
>
<el-option
v-for=
"($label, $value) in tableData.dict.deviceStatus"
:key=
"$value"
:label=
"$label"
:value=
"$value"
></el-option>
</el-select>
</el-select>
<span>
</span>
<span>
</span>
</el-row>
</el-row>
<el-row>
<el-row>
<el-input
<el-input
size=
"mini"
v-model=
"deviceName"
@
change=
"deviceNameChange"
style=
"padding: 5px"
size=
"mini"
placeholder=
"请输入设备编码"
></el-input>
v-model=
"deviceName"
@
change=
"deviceNameChange"
style=
"padding: 5px"
placeholder=
"请输入设备编码"
></el-input>
</el-row>
</el-row>
<el-divider></el-divider>
<el-divider></el-divider>
<el-row
<el-row
v-for=
"(label, value, index) in tableData.dict.productId"
:key=
"index"
type=
"flex"
v-for=
"(label, value, index) in tableData.dict.productId"
style=
"border-bottom: 1px solid #e8eaec; padding: 10px"
justify=
"space-between"
>
:key=
"index"
type=
"flex"
style=
"border-bottom: 1px solid #e8eaec; padding: 10px"
justify=
"space-between"
>
<!--
<img
src=
"../../assets/images/排队机.png"
alt=
""
/>
-->
<!--
<img
src=
"../../assets/images/排队机.png"
alt=
""
/>
-->
<img
:src=
"require(`../../assets/images/$
{label}.png`)" />
<img
:src=
"require(`../../assets/images/$
{label}.png`)" />
<!--
<i
style=
"font-size: 20px"
class=
"el-icon-location-information"
></i>
-->
<!--
<i
style=
"font-size: 20px"
class=
"el-icon-location-information"
></i>
-->
<span
style=
"font-size: 12px"
>
{{
label
}}
</span>
<span
style=
"font-size: 12px"
>
{{
label
}}
</span>
<el-switch
<el-switch
v-model=
"items[index]"
:active-value=
"value"
:inactive-value=
"0"
@
change=
"switchChange"
v-model=
"items[index]"
active-color=
"#2882ED"
inactive-color=
"#8C8B8E"
>
:active-value=
"value"
:inactive-value=
"0"
@
change=
"switchChange"
active-color=
"#2882ED"
inactive-color=
"#8C8B8E"
>
</el-switch>
</el-switch>
</el-row>
</el-row>
</el-col>
</el-col>
...
@@ -363,6 +300,7 @@ export default {
...
@@ -363,6 +300,7 @@ export default {
background: 0 0;
background: 0 0;
border-top: 1px solid #e8eaec;
border-top: 1px solid #e8eaec;
}
}
.back {
.back {
width: 200px;
width: 200px;
top: 20px;
top: 20px;
...
@@ -370,9 +308,11 @@ export default {
...
@@ -370,9 +308,11 @@ export default {
position: absolute;
position: absolute;
float: left;
float: left;
}
}
.el-row {
.el-row {
margin-bottom: 5px;
margin-bottom: 5px;
margin-top: 5px;
margin-top: 5px;
&:last-child {
&:last-child {
margin: 0;
margin: 0;
}
}
...
@@ -384,58 +324,72 @@ export default {
...
@@ -384,58 +324,72 @@ export default {
font-size
:
18px
;
font-size
:
18px
;
color
:
red
;
color
:
red
;
}
}
.location1
{
.location1
{
font-size
:
18px
;
font-size
:
18px
;
color
:
blueviolet
;
color
:
blueviolet
;
}
}
.location2
{
.location2
{
font-size
:
18px
;
font-size
:
18px
;
color
:
aqua
;
color
:
aqua
;
}
}
.location3
{
.location3
{
font-size
:
18px
;
font-size
:
18px
;
color
:
coral
;
color
:
coral
;
}
}
.location4
{
.location4
{
font-size
:
18px
;
font-size
:
18px
;
color
:
slateblue
;
color
:
slateblue
;
}
}
.location5
{
.location5
{
font-size
:
18px
;
font-size
:
18px
;
color
:
purple
;
color
:
purple
;
}
}
.location6
{
.location6
{
font-size
:
18px
;
font-size
:
18px
;
color
:
darkgreen
;
color
:
darkgreen
;
}
}
.location7
{
.location7
{
font-size
:
18px
;
font-size
:
18px
;
color
:
magenta
;
color
:
magenta
;
}
}
.location8
{
.location8
{
font-size
:
18px
;
font-size
:
18px
;
color
:
goldenrod
;
color
:
goldenrod
;
}
}
.location9
{
.location9
{
font-size
:
18px
;
font-size
:
18px
;
color
:
orchid
;
color
:
orchid
;
}
}
.location10
{
.location10
{
font-size
:
18px
;
font-size
:
18px
;
color
:
navy
;
color
:
navy
;
}
}
.location11
{
.location11
{
font-size
:
18px
;
font-size
:
18px
;
color
:
darkred
;
color
:
darkred
;
}
}
.location12
{
.location12
{
font-size
:
18px
;
font-size
:
18px
;
color
:
forestgreen
;
color
:
forestgreen
;
}
}
.location13
{
.location13
{
font-size
:
18px
;
font-size
:
18px
;
color
:
cyan
;
color
:
cyan
;
}
}
.location14
{
.location14
{
font-size
:
18px
;
font-size
:
18px
;
color
:
deepskyblue
;
color
:
deepskyblue
;
...
...
device-manager-ui/admin/src/views/system/menu/dialogshow.vue
View file @
9390ddfa
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
@
click=
"submitForm"
>
确 定
</el-button
>
确 定
</el-button
...
...
device-manager-ui/admin/src/views/system/param/dialogshow.vue
View file @
9390ddfa
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
</el-row>
</el-row>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"submitForm"
>
确 定
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
<el-button
@
click=
"cancel"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager-ui/admin/src/views/system/resource/dialogshow.vue
View file @
9390ddfa
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
@
click=
"submitForm"
>
确 定
</el-button
>
确 定
</el-button
...
...
device-manager-ui/admin/src/views/system/role/dialogshow.vue
View file @
9390ddfa
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
@
click=
"submitForm"
>
确 定
</el-button
>
确 定
</el-button
...
...
device-manager-ui/admin/src/views/system/role/list.vue
View file @
9390ddfa
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"mini"
@
click=
"auth.visible = false"
>
取 消
</el-button>
<el-button
size=
"mini"
@
click=
"auth.visible = false"
>
取 消
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"saveAuth"
<el-button
size=
"mini"
type=
"primary"
class=
"addclass"
@
click=
"saveAuth"
>
确 定
</el-button
>
确 定
</el-button
>
>
</div>
</div>
...
@@ -74,7 +74,7 @@
...
@@ -74,7 +74,7 @@
/>
/>
<el-col
style=
"text-align: center"
>
<el-col
style=
"text-align: center"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
size=
"mini"
size=
"mini"
icon=
"el-icon-search"
icon=
"el-icon-search"
@
click=
"searchUserList"
@
click=
"searchUserList"
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"mini"
@
click=
"user.visible = false"
>
取 消
</el-button>
<el-button
size=
"mini"
@
click=
"user.visible = false"
>
取 消
</el-button>
<el-button
size=
"mini"
type=
"primary"
@
click=
"saveUser"
<el-button
size=
"mini"
type=
"primary"
class=
"addclass"
@
click=
"saveUser"
>
确 定
</el-button
>
确 定
</el-button
>
>
</div>
</div>
...
...
device-manager-ui/admin/src/views/system/task/dialogshow.vue
View file @
9390ddfa
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
@
click=
"submitForm"
>
确 定
</el-button
>
确 定
</el-button
...
...
device-manager-ui/admin/src/views/system/user/dialogshow.vue
View file @
9390ddfa
...
@@ -55,7 +55,7 @@
...
@@ -55,7 +55,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
<el-button
type=
"primary"
type=
"primary"
class=
"addclass"
v-if=
"pageInfo.type !== 'view'"
v-if=
"pageInfo.type !== 'view'"
@
click=
"submitForm"
@
click=
"submitForm"
>
确 定
</el-button
>
确 定
</el-button
...
...
device-manager-ui/admin/src/views/system/user/list.vue
View file @
9390ddfa
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
/>
/>
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
type=
"primary"
@
click=
"userRoleConfirm"
>
确 定
</el-button>
<el-button
type=
"primary"
class=
"addclass"
@
click=
"userRoleConfirm"
>
确 定
</el-button>
<el-button
@
click=
"userRoleDialog.open = false"
>
取 消
</el-button>
<el-button
@
click=
"userRoleDialog.open = false"
>
取 消
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
...
device-manager/pom.xml
View file @
9390ddfa
...
@@ -72,7 +72,8 @@
...
@@ -72,7 +72,8 @@
<profiles.redis.port>
6379
</profiles.redis.port>
<profiles.redis.port>
6379
</profiles.redis.port>
<profiles.redis.username></profiles.redis.username>
<profiles.redis.username></profiles.redis.username>
<profiles.redis.password>
hotel@2020
</profiles.redis.password>
<profiles.redis.password>
hotel@2020
</profiles.redis.password>
<profiles.redis.database>
6
</profiles.redis.database>
<profiles.redis.database>
3
</profiles.redis.database>
<profiles.redis.sentinel>
192.168.0.252:26379,192.168.0.251:26379,192.168.0.98:26379
</profiles.redis.sentinel>
<profiles.rabbitmq.host>
192.168.0.98
</profiles.rabbitmq.host>
<profiles.rabbitmq.host>
192.168.0.98
</profiles.rabbitmq.host>
<profiles.rabbitmq.port>
5672
</profiles.rabbitmq.port>
<profiles.rabbitmq.port>
5672
</profiles.rabbitmq.port>
<profiles.rabbitmq.username>
taxi_mq
</profiles.rabbitmq.username>
<profiles.rabbitmq.username>
taxi_mq
</profiles.rabbitmq.username>
...
@@ -147,6 +148,7 @@
...
@@ -147,6 +148,7 @@
<profiles.redis.username></profiles.redis.username>
<profiles.redis.username></profiles.redis.username>
<profiles.redis.password>
hotel@2020
</profiles.redis.password>
<profiles.redis.password>
hotel@2020
</profiles.redis.password>
<profiles.redis.database>
6
</profiles.redis.database>
<profiles.redis.database>
6
</profiles.redis.database>
<profiles.redis.database>
6
</profiles.redis.database>
<profiles.rabbitmq.host>
172.15.28.115
</profiles.rabbitmq.host>
<profiles.rabbitmq.host>
172.15.28.115
</profiles.rabbitmq.host>
<profiles.rabbitmq.port>
5672
</profiles.rabbitmq.port>
<profiles.rabbitmq.port>
5672
</profiles.rabbitmq.port>
<profiles.rabbitmq.username>
taxi_mq
</profiles.rabbitmq.username>
<profiles.rabbitmq.username>
taxi_mq
</profiles.rabbitmq.username>
...
...
device-manager/src/main/java/com/mortals/xhx/base/framework/listener/CustomerKeyExpirationListener.java
View file @
9390ddfa
...
@@ -71,8 +71,17 @@ public class CustomerKeyExpirationListener implements MessageListener {
...
@@ -71,8 +71,17 @@ public class CustomerKeyExpirationListener implements MessageListener {
if
(
deviceEntity
.
getDeviceStatus
()
==
DeviceStatusEnum
.
在线
.
getValue
())
{
if
(
deviceEntity
.
getDeviceStatus
()
==
DeviceStatusEnum
.
在线
.
getValue
())
{
deviceEntity
.
setOfflineTime
(
new
Date
());
deviceEntity
.
setOfflineTime
(
new
Date
());
deviceEntity
.
setDeviceStatus
(
DeviceStatusEnum
.
离线
.
getValue
());
deviceEntity
.
setDeviceStatus
(
DeviceStatusEnum
.
离线
.
getValue
());
deviceService
.
update
(
deviceEntity
);
DeviceEntity
entity
=
new
DeviceEntity
();
entity
.
setOnlineTime
(
new
Date
());
entity
.
setUpdateTime
(
new
Date
());
entity
.
setDeviceStatus
(
DeviceStatusEnum
.
离线
.
getValue
());
DeviceEntity
condition
=
new
DeviceEntity
();
condition
.
setId
(
deviceEntity
.
getId
());
deviceService
.
getDeviceDao
().
update
(
entity
,
condition
);
deviceService
.
putCache
(
deviceEntity
.
getId
().
toString
(),
deviceEntity
);
log
.
info
(
"deviceCode:{},deviceName:{}==>离线"
,
deviceEntity
.
getDeviceCode
(),
deviceEntity
.
getDeviceName
());
// deviceService.update(deviceEntity);
PlatformEntity
platformEntity
=
platformService
.
get
(
deviceEntity
.
getPlatformId
());
PlatformEntity
platformEntity
=
platformService
.
get
(
deviceEntity
.
getPlatformId
());
ProductEntity
productEntity
=
productService
.
get
(
deviceEntity
.
getProductId
());
ProductEntity
productEntity
=
productService
.
get
(
deviceEntity
.
getProductId
());
if
(!
ObjectUtils
.
isEmpty
(
platformEntity
)
&&
!
ObjectUtils
.
isEmpty
(
productEntity
))
{
if
(!
ObjectUtils
.
isEmpty
(
platformEntity
)
&&
!
ObjectUtils
.
isEmpty
(
productEntity
))
{
...
...
device-manager/src/main/java/com/mortals/xhx/base/framework/listener/DirectDynamicListener.java
View file @
9390ddfa
...
@@ -67,7 +67,7 @@ public class DirectDynamicListener implements MessageListener {
...
@@ -67,7 +67,7 @@ public class DirectDynamicListener implements MessageListener {
String
messageType
=
queueMsg
.
getHeaders
().
getData
().
get
(
MESSAGETYPE
);
String
messageType
=
queueMsg
.
getHeaders
().
getData
().
get
(
MESSAGETYPE
);
try
{
try
{
if
(
ObjectUtils
.
isEmpty
(
deviceCode
))
{
if
(
ObjectUtils
.
isEmpty
(
deviceCode
))
{
log
.
info
(
"onMessage deviceCode is null,receive data:{},queue:{}"
,
data
,
queue
);
log
.
info
(
"onMessage deviceCode is null,receive data:{},queue:{}"
,
data
,
queue
);
return
;
return
;
}
}
...
@@ -82,10 +82,9 @@ public class DirectDynamicListener implements MessageListener {
...
@@ -82,10 +82,9 @@ public class DirectDynamicListener implements MessageListener {
entity
.
setDeviceStatus
(
DeviceStatusEnum
.
在线
.
getValue
());
entity
.
setDeviceStatus
(
DeviceStatusEnum
.
在线
.
getValue
());
DeviceEntity
condition
=
new
DeviceEntity
();
DeviceEntity
condition
=
new
DeviceEntity
();
condition
.
setId
(
deviceEntity
.
getId
());
condition
.
setId
(
deviceEntity
.
getId
());
int
update
=
deviceService
.
getDeviceDao
().
update
(
entity
,
condition
);
deviceService
.
getDeviceDao
().
update
(
entity
,
condition
);
// deviceService.update(deviceEntity);
// deviceService.update(deviceEntity);
deviceService
.
putCache
(
deviceEntity
.
getId
().
toString
(),
deviceEntity
);
PlatformEntity
platformEntity
=
platformService
.
get
(
deviceEntity
.
getPlatformId
());
PlatformEntity
platformEntity
=
platformService
.
get
(
deviceEntity
.
getPlatformId
());
ProductEntity
productEntity
=
productService
.
get
(
deviceEntity
.
getProductId
());
ProductEntity
productEntity
=
productService
.
get
(
deviceEntity
.
getProductId
());
...
@@ -93,6 +92,7 @@ public class DirectDynamicListener implements MessageListener {
...
@@ -93,6 +92,7 @@ public class DirectDynamicListener implements MessageListener {
//新增设备通知第三方平台
//新增设备通知第三方平台
deviceService
.
sendThirdParty
(
deviceEntity
,
productEntity
,
platformEntity
,
DeviceMethodEnum
.
ONLINE
);
deviceService
.
sendThirdParty
(
deviceEntity
,
productEntity
,
platformEntity
,
DeviceMethodEnum
.
ONLINE
);
}
}
log
.
info
(
"id:{},deviceCode:{} deviceStatus:{}==>上线 "
,
deviceEntity
.
getId
(),
deviceEntity
.
getDeviceCode
(),
deviceEntity
.
getDeviceStatus
());
}
}
if
(!
Constant
.
MESSAGETYPE_HEARTBEAT
.
equalsIgnoreCase
(
messageType
))
{
if
(!
Constant
.
MESSAGETYPE_HEARTBEAT
.
equalsIgnoreCase
(
messageType
))
{
DeviceLogEntity
deviceLogEntity
=
new
DeviceLogEntity
();
DeviceLogEntity
deviceLogEntity
=
new
DeviceLogEntity
();
...
...
device-manager/src/main/java/com/mortals/xhx/busiz/req/UploadDeviceReq.java
View file @
9390ddfa
...
@@ -2,7 +2,7 @@ package com.mortals.xhx.busiz.req;
...
@@ -2,7 +2,7 @@ package com.mortals.xhx.busiz.req;
import
lombok.Data
;
import
lombok.Data
;
import
java.
io.Serializable
;
import
java.
util.List
;
@Data
@Data
...
@@ -14,5 +14,10 @@ public class UploadDeviceReq extends DeviceReq {
...
@@ -14,5 +14,10 @@ public class UploadDeviceReq extends DeviceReq {
private
String
action
;
private
String
action
;
private
List
<
String
>
deviceCodeList
;
private
String
content
;
}
}
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceApiController.java
View file @
9390ddfa
package
com.mortals.xhx.busiz.web
;
package
com.mortals.xhx.busiz.web
;
import
cn.hutool.core.codec.Base64
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.io.FileUtil
;
import
cn.hutool.core.lang.Validator
;
import
cn.hutool.core.lang.Validator
;
import
cn.hutool.core.net.URLDecoder
;
import
cn.hutool.core.net.URLDecoder
;
...
@@ -990,7 +991,7 @@ public class DeviceApiController {
...
@@ -990,7 +991,7 @@ public class DeviceApiController {
}
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
throws
Exception
{
String
domain
=
"http://10.12.185.213:11078"
;
String
domain
=
"http://10.12.185.213:11078"
;
UrlBuilder
urlBuilder
=
UrlBuilder
.
ofHttp
(
domain
).
addPath
(
"test"
);
UrlBuilder
urlBuilder
=
UrlBuilder
.
ofHttp
(
domain
).
addPath
(
"test"
);
...
@@ -1025,6 +1026,18 @@ public class DeviceApiController {
...
@@ -1025,6 +1026,18 @@ public class DeviceApiController {
System.out.println(decrypt);*/
System.out.println(decrypt);*/
//String content = EncryptUtil.myEnscrt("", 9, DES_STR, ENCRYPT_STR);
//System.out.println(content);
/* String decrypt = EncryptUtil.decrypt("W10=", ENCRYPT_STR);
System.out.println(decrypt);*/
System
.
out
.
println
(
new
String
(
Base64
.
decode
(
"W10="
)));
}
}
...
...
device-manager/src/main/java/com/mortals/xhx/busiz/web/DeviceSendMsgController.java
View file @
9390ddfa
package
com.mortals.xhx.busiz.web
;
package
com.mortals.xhx.busiz.web
;
import
cn.hutool.core.codec.Base64
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.collection.ListUtil
;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.IdUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
...
@@ -25,6 +26,7 @@ import com.mortals.xhx.queue.TbQueueMsg;
...
@@ -25,6 +26,7 @@ import com.mortals.xhx.queue.TbQueueMsg;
import
com.mortals.xhx.queue.TbQueueMsgHeaders
;
import
com.mortals.xhx.queue.TbQueueMsgHeaders
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -66,9 +68,9 @@ public class DeviceSendMsgController {
...
@@ -66,9 +68,9 @@ public class DeviceSendMsgController {
TbQueueMsgHeaders
header
=
new
DefaultTbQueueMsgHeaders
();
TbQueueMsgHeaders
header
=
new
DefaultTbQueueMsgHeaders
();
header
.
put
(
MessageHeader
.
MESSAGETYPE
,
MESSAGETYPE_NOTIFY_REFRESH
);
header
.
put
(
MessageHeader
.
MESSAGETYPE
,
MESSAGETYPE_NOTIFY_REFRESH
);
header
.
put
(
MessageHeader
.
DEVICECODE
,
deviceEntity
.
getDeviceCode
());
header
.
put
(
MessageHeader
.
DEVICECODE
,
deviceEntity
.
getDeviceCode
());
header
.
put
(
MessageHeader
.
TIMESTAMP
,
DateUtils
.
getCurrStrDateTime
());
header
.
put
(
MessageHeader
.
TIMESTAMP
,
DateUtils
.
getCurrStrDateTime
());
TbQueueMsg
queueMsg
=
new
DefaultTbQueueMsg
(
IdUtil
.
fastUUID
(),
"W10="
,
header
);
TbQueueMsg
queueMsg
=
new
DefaultTbQueueMsg
(
IdUtil
.
fastUUID
(),
"W10="
,
header
);
messageProducer
.
sendMsg
(
QueueKey
.
DEFAULT_EXCHANGE
,
Constant
.
DOWN_TOPIC
+
deviceEntity
.
getDeviceCode
(),
JSON
.
toJSONString
(
queueMsg
));
messageProducer
.
sendMsg
(
QueueKey
.
DEFAULT_EXCHANGE
,
Constant
.
DOWN_TOPIC
+
deviceEntity
.
getDeviceCode
(),
JSON
.
toJSONString
(
queueMsg
));
DeviceLogEntity
deviceLogEntity
=
new
DeviceLogEntity
();
DeviceLogEntity
deviceLogEntity
=
new
DeviceLogEntity
();
deviceLogEntity
.
initAttrValue
();
deviceLogEntity
.
initAttrValue
();
...
@@ -82,13 +84,12 @@ public class DeviceSendMsgController {
...
@@ -82,13 +84,12 @@ public class DeviceSendMsgController {
deviceLogEntity
.
setLogType
(
LogTypeEnum
.
下发服务
.
getValue
());
deviceLogEntity
.
setLogType
(
LogTypeEnum
.
下发服务
.
getValue
());
deviceLogEntity
.
setCreateUserId
(
1L
);
deviceLogEntity
.
setCreateUserId
(
1L
);
deviceLogEntity
.
setCreateTime
(
new
Date
());
deviceLogEntity
.
setCreateTime
(
new
Date
());
deviceLogService
.
save
(
deviceLogEntity
,
null
);
deviceLogService
.
save
(
deviceLogEntity
,
null
);
}
}
TimeUnit
.
SECONDS
.
sleep
(
1
);
TimeUnit
.
SECONDS
.
sleep
(
1
);
}
}
}
}
catch
(
InterruptedException
e
)
{
catch
(
InterruptedException
e
)
{
log
.
error
(
"异常"
,
e
);
log
.
error
(
"异常"
,
e
);
}
}
};
};
Thread
thread
=
new
Thread
(
runnable
);
Thread
thread
=
new
Thread
(
runnable
);
...
@@ -105,5 +106,66 @@ public class DeviceSendMsgController {
...
@@ -105,5 +106,66 @@ public class DeviceSendMsgController {
}
}
/**
* 下发消息
*
* @param req
* @return
*/
@PostMapping
(
"downMsg"
)
@UnAuth
public
String
downMsg
(
@RequestBody
UploadDeviceReq
req
)
{
log
.
info
(
"【设备通知数据】【请求体】--> "
+
JSONObject
.
toJSONString
(
req
));
ApiResp
<
String
>
rsp
=
new
ApiResp
<>();
rsp
.
setMsg
(
ApiRespCodeEnum
.
SUCCESS
.
getLabel
());
rsp
.
setCode
(
ApiRespCodeEnum
.
SUCCESS
.
getValue
());
try
{
if
(!
ObjectUtils
.
isEmpty
(
req
.
getDeviceCodeList
()))
{
DeviceQuery
deviceQuery
=
new
DeviceQuery
();
deviceQuery
.
setDeviceCodeList
(
req
.
getDeviceCodeList
());
//查询站点设备并通知每个设备
List
<
DeviceEntity
>
deviceList
=
deviceService
.
find
(
deviceQuery
);
String
content
=
"W10="
;
if
(!
ObjectUtils
.
isEmpty
(
req
.
getContent
()))
{
content
=
Base64
.
encode
(
req
.
getContent
());
}
try
{
for
(
DeviceEntity
deviceEntity
:
deviceList
)
{
TbQueueMsgHeaders
header
=
new
DefaultTbQueueMsgHeaders
();
header
.
put
(
MessageHeader
.
MESSAGETYPE
,
req
.
getAction
());
header
.
put
(
MessageHeader
.
DEVICECODE
,
deviceEntity
.
getDeviceCode
());
header
.
put
(
MessageHeader
.
TIMESTAMP
,
DateUtils
.
getCurrStrDateTime
());
TbQueueMsg
queueMsg
=
new
DefaultTbQueueMsg
(
IdUtil
.
fastUUID
(),
content
,
header
);
messageProducer
.
sendMsg
(
QueueKey
.
DEFAULT_EXCHANGE
,
Constant
.
DOWN_TOPIC
+
deviceEntity
.
getDeviceCode
(),
JSON
.
toJSONString
(
queueMsg
));
DeviceLogEntity
deviceLogEntity
=
new
DeviceLogEntity
();
deviceLogEntity
.
initAttrValue
();
deviceLogEntity
.
setTraceID
(
IdUtil
.
fastSimpleUUID
());
deviceLogEntity
.
setSiteId
(
deviceEntity
.
getSiteId
());
deviceLogEntity
.
setDeviceId
(
deviceEntity
.
getId
());
deviceLogEntity
.
setDeviceName
(
deviceEntity
.
getDeviceName
());
deviceLogEntity
.
setDeviceCode
(
deviceEntity
.
getDeviceCode
());
deviceLogEntity
.
setMessageHead
(
req
.
getAction
());
deviceLogEntity
.
setContent
(
content
);
deviceLogEntity
.
setLogType
(
LogTypeEnum
.
下发服务
.
getValue
());
deviceLogEntity
.
setCreateUserId
(
1L
);
deviceLogEntity
.
setCreateTime
(
new
Date
());
deviceLogService
.
save
(
deviceLogEntity
,
null
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
"异常"
,
e
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"接收数据失败"
,
e
);
rsp
.
setCode
(
ApiRespCodeEnum
.
FAILED
.
getValue
());
rsp
.
setMsg
(
e
.
getMessage
());
return
JSON
.
toJSONString
(
rsp
);
}
log
.
debug
(
"响应【设备通知刷新数据】【响应体】--> "
+
JSONObject
.
toJSONString
(
rsp
));
return
JSON
.
toJSONString
(
rsp
);
}
}
}
device-manager/src/main/java/com/mortals/xhx/busiz/web/TestSendMsgController.java
View file @
9390ddfa
...
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
...
@@ -5,6 +5,7 @@ import cn.hutool.core.util.StrUtil;
import
cn.hutool.http.HttpUtil
;
import
cn.hutool.http.HttpUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mortals.framework.service.ICacheService
;
import
com.mortals.framework.service.ILogService
;
import
com.mortals.framework.service.ILogService
;
import
com.mortals.framework.service.impl.FileLogServiceImpl
;
import
com.mortals.framework.service.impl.FileLogServiceImpl
;
import
com.mortals.xhx.busiz.req.TestReq
;
import
com.mortals.xhx.busiz.req.TestReq
;
...
@@ -43,6 +44,8 @@ public class TestSendMsgController {
...
@@ -43,6 +44,8 @@ public class TestSendMsgController {
private
ProductService
productService
;
private
ProductService
productService
;
@Autowired
@Autowired
private
DeviceService
deviceService
;
private
DeviceService
deviceService
;
@Autowired
private
ICacheService
cacheService
;
/**
/**
* 发送日志消息
* 发送日志消息
...
@@ -126,6 +129,15 @@ public class TestSendMsgController {
...
@@ -126,6 +129,15 @@ public class TestSendMsgController {
}
}
@RequestMapping
(
value
=
"{key}/{value}"
,
method
=
RequestMethod
.
GET
)
public
String
setData
(
@PathVariable
(
"key"
)
String
key
,
@PathVariable
(
"value"
)
String
value
)
{
cacheService
.
set
(
key
,
value
);
String
s
=
cacheService
.
get
(
key
);
return
s
;
}
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
String
resp
=
HttpUtil
.
get
(
"http://59.225.206.13:8331/oauth-pro/admin-pro/sys/randomImage/1675827431800?_t=1675827431"
);
String
resp
=
HttpUtil
.
get
(
"http://59.225.206.13:8331/oauth-pro/admin-pro/sys/randomImage/1675827431800?_t=1675827431"
);
...
...
device-manager/src/main/java/com/mortals/xhx/daemon/applicationservice/DeviceComsumersRegisterService.java
View file @
9390ddfa
package
com.mortals.xhx.daemon.applicationservice
;
package
com.mortals.xhx.daemon.applicationservice
;
import
com.alibaba.fastjson.JSON
;
import
com.mortals.framework.springcloud.service.IApplicationStartedService
;
import
com.mortals.framework.springcloud.service.IApplicationStartedService
;
import
com.mortals.xhx.base.framework.listener.DirectDynamicListener
;
import
com.mortals.xhx.base.framework.listener.DirectDynamicListener
;
import
com.mortals.xhx.base.system.message.impl.MessageProducer
;
import
com.mortals.xhx.base.system.message.impl.MessageProducer
;
...
@@ -12,14 +11,11 @@ import com.mortals.xhx.module.device.service.DeviceService;
...
@@ -12,14 +11,11 @@ import com.mortals.xhx.module.device.service.DeviceService;
import
com.mortals.xhx.module.platform.service.PlatformService
;
import
com.mortals.xhx.module.platform.service.PlatformService
;
import
com.mortals.xhx.module.product.service.ProductService
;
import
com.mortals.xhx.module.product.service.ProductService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.amqp.rabbit.core.RabbitTemplate
;
import
org.springframework.amqp.rabbit.listener.DirectMessageListenerContainer
;
import
org.springframework.amqp.rabbit.listener.DirectMessageListenerContainer
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
import
java.util.Collection
;
/**
/**
* 初始化设备消费者注册
* 初始化设备消费者注册
*
*
...
@@ -44,8 +40,6 @@ public class DeviceComsumersRegisterService implements IApplicationStartedServic
...
@@ -44,8 +40,6 @@ public class DeviceComsumersRegisterService implements IApplicationStartedServic
private
SendTaskThreadPool
sendTaskThreadPool
;
private
SendTaskThreadPool
sendTaskThreadPool
;
@Autowired
@Autowired
private
DirectDynamicListener
directDynamicListener
;
private
DirectDynamicListener
directDynamicListener
;
@Autowired
private
RabbitTemplate
rabbitTemplate
;
@Override
@Override
public
void
start
()
{
public
void
start
()
{
...
@@ -53,8 +47,6 @@ public class DeviceComsumersRegisterService implements IApplicationStartedServic
...
@@ -53,8 +47,6 @@ public class DeviceComsumersRegisterService implements IApplicationStartedServic
sendTaskThreadPool
.
init
(
20
);
sendTaskThreadPool
.
init
(
20
);
log
.
info
(
"服务端消息队列初始化服务开始.."
);
log
.
info
(
"服务端消息队列初始化服务开始.."
);
Collection
<
String
>
rabbitmqQueues
=
rabbitTemplate
.
expectedQueueNames
();
log
.
info
(
"queues:{}"
,
JSON
.
toJSONString
(
rabbitmqQueues
));
deviceService
.
find
(
new
DeviceEntity
())
deviceService
.
find
(
new
DeviceEntity
())
...
@@ -71,6 +63,7 @@ public class DeviceComsumersRegisterService implements IApplicationStartedServic
...
@@ -71,6 +63,7 @@ public class DeviceComsumersRegisterService implements IApplicationStartedServic
.
stream
()
.
stream
()
.
filter
(
f
->
!
ObjectUtils
.
isEmpty
(
platformService
.
get
(
f
.
getPlatformId
())))
.
filter
(
f
->
!
ObjectUtils
.
isEmpty
(
platformService
.
get
(
f
.
getPlatformId
())))
.
filter
(
f
->
!
ObjectUtils
.
isEmpty
(
productService
.
get
(
f
.
getProductId
())))
.
filter
(
f
->
!
ObjectUtils
.
isEmpty
(
productService
.
get
(
f
.
getProductId
())))
.
filter
(
f
->!
ObjectUtils
.
isEmpty
(
f
.
getDeviceCode
()))
.
map
(
item
->
Constant
.
UPLOAD_TOPIC
+
item
.
getDeviceCode
())
.
map
(
item
->
Constant
.
UPLOAD_TOPIC
+
item
.
getDeviceCode
())
.
toArray
(
String
[]::
new
);
.
toArray
(
String
[]::
new
);
...
...
device-manager/src/main/java/com/mortals/xhx/daemon/task/DeviceRestartTaskImpl.java
View file @
9390ddfa
...
@@ -80,8 +80,7 @@ public class DeviceRestartTaskImpl implements ITaskExcuteService {
...
@@ -80,8 +80,7 @@ public class DeviceRestartTaskImpl implements ITaskExcuteService {
});
});
//定时删除日志 7天前
//定时删除日志 7天前
DeviceLogQuery
contidion
=
new
DeviceLogQuery
();
DeviceLogQuery
contidion
=
new
DeviceLogQuery
();
DateUtils
.
addCurrDate
(-
7
);
contidion
.
setCreateTimeEnd
(
DateUtils
.
getDateTimeStr
(
DateUtils
.
addCurrDate
(-
3
),
DateUtils
.
P_yyyy_MM_dd_HH_mm_ss
));
contidion
.
setCreateTimeEnd
(
DateUtils
.
getDateTimeStr
(
DateUtils
.
addCurrDate
(-
7
),
DateUtils
.
P_yyyy_MM_dd_HH_mm_ss
));
deviceLogService
.
getDao
().
delete
(
contidion
);
deviceLogService
.
getDao
().
delete
(
contidion
);
}
}
...
...
device-manager/src/main/java/com/mortals/xhx/module/device/service/impl/DeviceServiceImpl.java
View file @
9390ddfa
...
@@ -596,7 +596,6 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
...
@@ -596,7 +596,6 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
@Override
@Override
protected
void
removeBefore
(
Long
[]
ids
,
Context
context
)
throws
AppException
{
protected
void
removeBefore
(
Long
[]
ids
,
Context
context
)
throws
AppException
{
Long
[]
removeIds
=
Arrays
.
asList
(
ids
).
stream
().
map
(
id
->
{
Long
[]
removeIds
=
Arrays
.
asList
(
ids
).
stream
().
map
(
id
->
{
DeviceEntity
deviceEntity
=
this
.
get
(
id
,
context
);
DeviceEntity
deviceEntity
=
this
.
get
(
id
,
context
);
if
(!
ObjectUtils
.
isEmpty
(
deviceEntity
))
{
if
(!
ObjectUtils
.
isEmpty
(
deviceEntity
))
{
...
...
device-manager/src/main/resources/bootstrap.yml
View file @
9390ddfa
...
@@ -32,6 +32,9 @@ spring:
...
@@ -32,6 +32,9 @@ spring:
min-idle
:
0
min-idle
:
0
max-active
:
100
max-active
:
100
max-wait
:
1000
max-wait
:
1000
# sentinel:
# master: mymaster
# nodes: @profiles.redis.sentinel@
cloud
:
cloud
:
loadbalancer
:
loadbalancer
:
ribbon
:
ribbon
:
...
...
device-manager/src/test/java/com/mortals/httpclient/device/DeviceController.http
View file @
9390ddfa
...
@@ -179,13 +179,13 @@ Content-Type: application/json
...
@@ -179,13 +179,13 @@ Content-Type: application/json
[
[
{
{
"data": "
{xxxx}
",
"data": "
xxxx
",
"deviceCode": "a102",
"deviceCode": "a102",
"messageType": "aaaa",
"messageType": "aaaa",
"timestamp": 1654656951795
"timestamp": 1654656951795
},
},
{
{
"data": "
{bbbbbb}
",
"data": "
bbbbbb
",
"deviceCode": "a102",
"deviceCode": "a102",
"messageType": "bbbb",
"messageType": "bbbb",
"timestamp": 1654656951795
"timestamp": 1654656951795
...
...
device-manager/src/test/java/com/mortals/httpclient/system.http
View file @
9390ddfa
...
@@ -42,5 +42,10 @@ GET {{baseUrl}}/sms/set/delete?id={{SmsSet_id}}
...
@@ -42,5 +42,10 @@ GET {{baseUrl}}/sms/set/delete?id={{SmsSet_id}}
Accept: application/json
Accept: application/json
###redis 测试
GET {{baseUrl}}/test/one/49
Accept: application/json
doc/api.md
View file @
9390ddfa
...
@@ -726,6 +726,44 @@ data|object|数据对象|-
...
@@ -726,6 +726,44 @@ data|object|数据对象|-
```
```
### 接收第三方平台下发设备消息
**请求URL:**
m/notify/downMsg
**请求方式:**
POST
**内容类型:**
application/json;charset=utf-8
**简要描述:**
**请求参数:**
参数名称| 类型 |备注|必填|其它
:------|:--------|:--|:---|:---
deviceCodeList| Arrays |设备编码列表|是|-
action| String |设备下发消息行为,消息类型编号|是|-
content| String |下发消息内容|是|默认为[]数组内容
**请求样例:**
```
{}
```
**响应参数:**
参数名称 |参数类型|备注|其它
---|---|---|---
code|Integer|结果码|见附录码表
msg|String|消息|-
data|object|数据对象|-
**响应消息样例:**
```
```
### 接收第三方平台命令消息
### 接收第三方平台命令消息
**请求URL:**
m/api/callback
**请求URL:**
m/api/callback
...
...
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