Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in
Toggle navigation
Z
zhxf_vue
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
葛齐林
zhxf_vue
Commits
11907e95
Commit
11907e95
authored
May 10, 2021
by
co_dengxiongwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
826ccb50
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
258 additions
and
295 deletions
+258
-295
App.vue
src/App.vue
+29
-72
page.vue
src/pages/login/page.vue
+116
-110
index.vue
src/pages/ol/kanban/index.vue
+112
-113
index.js
src/plugin/axios/index.js
+1
-0
No files found.
src/App.vue
View file @
11907e95
...
@@ -2,11 +2,7 @@
...
@@ -2,11 +2,7 @@
<div
id=
"app"
>
<div
id=
"app"
>
<router-view
v-if=
"isRouterAlive"
/>
<router-view
v-if=
"isRouterAlive"
/>
<div>
<div>
<div
<div
v-for=
"(item, index) in showList"
:key=
"index"
v-if=
"index
<
4
"
>
v-for=
"(item, index) in showList"
:key=
"index"
v-if=
"index
<
4
&&
ishowAlarm
"
>
<div
:class=
"'tip' + (index + 1)"
>
<div
:class=
"'tip' + (index + 1)"
>
<div
class=
"title"
>
<div
class=
"title"
>
<el-row
:span=
"24"
>
<el-row
:span=
"24"
>
...
@@ -104,7 +100,6 @@ export default {
...
@@ -104,7 +100,6 @@ export default {
data
()
{
data
()
{
return
{
return
{
is3DShow
:
false
,
is3DShow
:
false
,
ishowAlarm
:
true
,
dialogVisible
:
false
,
dialogVisible
:
false
,
isRouterAlive
:
true
,
isRouterAlive
:
true
,
queryDetailVisible
:
false
,
queryDetailVisible
:
false
,
...
@@ -117,10 +112,10 @@ export default {
...
@@ -117,10 +112,10 @@ export default {
watch
:
{},
watch
:
{},
computed
:
{},
computed
:
{},
mounted
()
{
mounted
()
{
//let token = util.cookies.get('token')
this
.
initWebSocket
()
this
.
initWebSocket
()
this
.
initWebSocket2
()
this
.
initWebSocket2
()
this
.
getDateList
()
this
.
getDateList
()
this
.
getDateList2
()
},
},
destroyed
:
function
()
{
destroyed
:
function
()
{
this
.
websocketclose
()
this
.
websocketclose
()
...
@@ -169,24 +164,14 @@ export default {
...
@@ -169,24 +164,14 @@ export default {
},
},
//接收后端返回的数据
//接收后端返回的数据
websocketonmessage
(
e
)
{
websocketonmessage
(
e
)
{
console
.
log
(
'takeover:'
,
sessionStorage
.
getItem
(
'takeover'
))
if
(
sessionStorage
.
getItem
(
'takeover'
)
!=
undefined
&&
sessionStorage
.
getItem
(
'takeover'
)
==
'true'
)
{
this
.
ishowAlarm
=
false
}
else
{
this
.
ishowAlarm
=
true
}
// 在这里使用后端返回的数据,对数据进行处理渲染
// 在这里使用后端返回的数据,对数据进行处理渲染
// this.tipList = []
// this.tipList = []
this
.
showList
=
[]
this
.
showList
=
[]
if
(
if
(
sessionStorage
.
getItem
(
'token'
)
&&
sessionStorage
.
getItem
(
'token'
)
&&
sessionStorage
.
getItem
(
'token'
)
!=
undefined
sessionStorage
.
getItem
(
'token'
)
!=
=
undefined
)
{
)
{
// if (util.cookies.get('token') && util.cookies.get('token') != undefined) { //登录才能获取
//登录才能获取
// this.tipList = JSON.parse(e.data)
var
alarmsInfo
=
JSON
.
parse
(
e
.
data
)
var
alarmsInfo
=
JSON
.
parse
(
e
.
data
)
//console.log(alarmsInfo, '-------')
//console.log(alarmsInfo, '-------')
if
(
alarmsInfo
.
status
!=
1
)
{
if
(
alarmsInfo
.
status
!=
1
)
{
...
@@ -206,7 +191,6 @@ export default {
...
@@ -206,7 +191,6 @@ export default {
}
}
}
}
this
.
tipList
.
push
(
alarmsInfo
)
this
.
tipList
.
push
(
alarmsInfo
)
// this.sendMessage(alarmsInfo.resourceCode)
if
(
flag
)
{
if
(
flag
)
{
var
x
=
0
var
x
=
0
var
resourceCode
=
this
.
$store
.
state
.
d2admin
.
bjCode
.
resourceCode
var
resourceCode
=
this
.
$store
.
state
.
d2admin
.
bjCode
.
resourceCode
...
@@ -214,30 +198,19 @@ export default {
...
@@ -214,30 +198,19 @@ export default {
if
(
if
(
resourceCode
&&
resourceCode
&&
resourceCode
.
split
(
'+'
)[
0
]
===
alarmsInfo
.
resourceCode
&&
resourceCode
.
split
(
'+'
)[
0
]
===
alarmsInfo
.
resourceCode
&&
resourceCode
.
split
(
'+'
)[
2
]
===
alarmsInfo
.
lineId
&&
resourceCode
.
split
(
'+'
)[
2
]
===
alarmsInfo
.
stationId
resourceCode
.
split
(
'+'
)[
3
]
===
alarmsInfo
.
stationId
)
{
)
{
x
=
x
=
Number
(
resourceCode
.
substring
(
resourceCode
.
indexOf
(
'+'
)
+
1
))
+
Number
(
resourceCode
.
substring
(
resourceCode
.
indexOf
(
'+'
)
+
1
))
+
1
1
this
.
$store
.
dispatch
(
this
.
$store
.
dispatch
(
'd2admin/bjCode/set'
,
'd2admin/bjCode/set'
,
alarmsInfo
.
resourceCode
+
alarmsInfo
.
resourceCode
+
'+'
+
x
+
'+'
+
alarmsInfo
.
stationId
'+'
+
x
+
'+'
+
alarmsInfo
.
lineId
+
'+'
+
alarmsInfo
.
stationId
)
)
}
else
{
}
else
{
this
.
$store
.
dispatch
(
this
.
$store
.
dispatch
(
'd2admin/bjCode/set'
,
'd2admin/bjCode/set'
,
alarmsInfo
.
resourceCode
+
alarmsInfo
.
resourceCode
+
'+0+'
+
alarmsInfo
.
stationId
'+0+'
+
alarmsInfo
.
lineId
+
'+'
+
alarmsInfo
.
stationId
)
)
}
}
}
}
...
@@ -286,10 +259,6 @@ export default {
...
@@ -286,10 +259,6 @@ export default {
websocketclose
(
e
)
{
websocketclose
(
e
)
{
console
.
log
(
'断开连接'
,
e
)
console
.
log
(
'断开连接'
,
e
)
},
},
send
()
{
this
.
websock
.
send
(
'1'
)
},
// ====================================
// ====================================
//初始化weosocket2
//初始化weosocket2
initWebSocket2
()
{
initWebSocket2
()
{
...
@@ -332,12 +301,10 @@ export default {
...
@@ -332,12 +301,10 @@ export default {
sessionStorage
.
getItem
(
'token'
)
&&
sessionStorage
.
getItem
(
'token'
)
&&
sessionStorage
.
getItem
(
'token'
)
!=
undefined
sessionStorage
.
getItem
(
'token'
)
!=
undefined
)
{
)
{
var
paramsInfo
=
JSON
.
parse
(
e
.
data
)
console
.
log
(
'paramsInfo:'
,
paramsInfo
)
// 集合
// 集合
// this.$store.dispatch('d2admin/typeList/set', e.typeList)
this
.
$store
.
dispatch
(
'd2admin/typeList/set'
,
paramsInfo
)
//登录才能获取
// this.tipList = JSON.parse(e.data)
console
.
log
(
'接管数据'
+
e
.
data
)
}
}
},
},
//连接建立失败重连
//连接建立失败重连
...
@@ -349,24 +316,19 @@ export default {
...
@@ -349,24 +316,19 @@ export default {
websocketclose2
(
e
)
{
websocketclose2
(
e
)
{
console
.
log
(
'断开连接2'
,
e
)
console
.
log
(
'断开连接2'
,
e
)
},
},
send2
()
{
this
.
websock
.
send
(
'2'
)
},
//登录后页面刷新的时候获取
//登录后页面刷新的时候获取
getDateList
()
{
getDateList
()
{
this
.
tipList
=
[]
this
.
tipList
=
[]
this
.
showList
=
[]
this
.
showList
=
[]
if
(
if
(
sessionStorage
.
getItem
(
'token'
)
&&
sessionStorage
.
getItem
(
'token'
)
&&
sessionStorage
.
getItem
(
'token'
)
!=
undefined
sessionStorage
.
getItem
(
'token'
)
!=
=
undefined
)
{
)
{
this
.
$http
({
this
.
$http
({
url
:
this
.
$http
.
adornUrlAlarm
(
'/alarmsInfo/queryList'
),
url
:
this
.
$http
.
adornUrlAlarm
(
'/alarmsInfo/queryList'
),
method
:
'post'
,
method
:
'post'
,
params
:
this
.
$http
.
adornParams
({
params
:
this
.
$http
.
adornParams
({
status
:
1
,
status
:
1
stationId
:
localStorage
.
getItem
(
'stationId'
)
})
})
}).
then
((
data
)
=>
{
}).
then
((
data
)
=>
{
if
(
data
&&
data
.
code
===
0
)
{
if
(
data
&&
data
.
code
===
0
)
{
...
@@ -384,15 +346,28 @@ export default {
...
@@ -384,15 +346,28 @@ export default {
if
(
this
.
showList
)
{
if
(
this
.
showList
)
{
this
.
showList
.
sort
(
this
.
sortBy
(
'occurrenceTime'
,
true
))
this
.
showList
.
sort
(
this
.
sortBy
(
'occurrenceTime'
,
true
))
}
}
// console.log(this.tipList, '-------')
// console.log(this.showList, '-------')
//console.log(this.showList, '1----------1')
this
.
$store
.
dispatch
(
'd2admin/toast/set'
,
this
.
tipList
.
length
)
this
.
$store
.
dispatch
(
'd2admin/toast/set'
,
this
.
tipList
.
length
)
}
}
})
})
}
}
},
},
getDateList2
()
{
if
(
sessionStorage
.
getItem
(
'token'
)
&&
sessionStorage
.
getItem
(
'token'
)
!==
undefined
)
{
this
.
$http
({
url
:
this
.
$http
.
adornUrlAlarm
(
'/kanban/getListParam'
),
method
:
'post'
,
params
:
this
.
$http
.
adornParams
({})
}).
then
((
data
)
=>
{
if
(
data
&&
data
.
code
===
0
)
{
console
.
log
(
'typeList:'
,
data
.
bean
)
this
.
$store
.
dispatch
(
'd2admin/typeList/set'
,
data
.
bean
)
}
})
}
},
/**数组根据数组对象中的某个属性值进行排序的方法
/**数组根据数组对象中的某个属性值进行排序的方法
* 使用例子:newArray.sort(sortBy('number',false)) //表示根据number属性降序排列;若第二个参数不传递,默认表示升序排序
* 使用例子:newArray.sort(sortBy('number',false)) //表示根据number属性降序排列;若第二个参数不传递,默认表示升序排序
* @param attr 排序的属性 如number属性
* @param attr 排序的属性 如number属性
...
@@ -473,24 +448,6 @@ export default {
...
@@ -473,24 +448,6 @@ export default {
background-color
:
#b9c9e3
!
important
;
background-color
:
#b9c9e3
!
important
;
}
}
// 状态-点
// .danger,
// .success,
// .warning {
// width: 5px;
// height: 5px;
// border-radius: 100%;
// background: #ff3723;
// display: inline-block;
// vertical-align: middle;
// }
// .success {
// background: #42cd00;
// }
// .warning {
// background: #ffa101;
// }
// 弹出框
// 弹出框
.el-dialog__title
{
.el-dialog__title
{
line-height
:
24px
;
line-height
:
24px
;
...
...
src/pages/login/page.vue
View file @
11907e95
This diff is collapsed.
Click to expand it.
src/pages/ol/kanban/index.vue
View file @
11907e95
...
@@ -39,119 +39,118 @@ export default {
...
@@ -39,119 +39,118 @@ export default {
mapId
:
''
,
mapId
:
''
,
mapList
:
[],
mapList
:
[],
dataList
:
[
dataList
:
[
{
// {
name
:
'喷淋系统'
,
// name: '喷淋系统',
list
:
[
// list: [
{
// {
leftName
:
'喷淋系统'
,
// leftName: '喷淋系统',
rightName
:
'水流压力'
,
// rightName: '水流压力',
type
:
'slyl'
,
// type: 'slyl',
value
:
'0.319mp'
,
// value: '0.319mp',
scope
:
'参考值:0.2~0.8mp'
// scope: '参考值:0.2~0.8mp'
}
// }
]
// ]
},
// },
{
// {
name
:
'喷淋系统'
,
// name: '喷淋系统',
list
:
[
// list: [
{
// {
leftName
:
'喷淋系统'
,
// leftName: '喷淋系统',
rightName
:
'一氧化碳'
,
// rightName: '一氧化碳',
type
:
'co'
,
// type: 'co',
value
:
'22.5℃'
,
// value: '22.5℃',
scope
:
'参考值:0.0~50℃'
// scope: '参考值:0.0~50℃'
},
// },
{
// {
leftName
:
'喷淋系统'
,
// leftName: '喷淋系统',
rightName
:
'湿度'
,
// rightName: '湿度',
type
:
'sd'
,
// type: 'sd',
value
:
'22.5℃'
,
// value: '22.5℃',
scope
:
'参考值:0.0~50℃'
// scope: '参考值:0.0~50℃'
},
// },
{
// {
leftName
:
'喷淋系统'
,
// leftName: '喷淋系统',
rightName
:
'风速'
,
// rightName: '风速',
type
:
'fs'
,
// type: 'fs',
value
:
'22.5℃'
,
// value: '22.5℃',
scope
:
'参考值:0.0~50℃'
// scope: '参考值:0.0~50℃'
},
// },
{
// {
leftName
:
'喷淋系统'
,
// leftName: '喷淋系统',
rightName
:
'风速'
,
// rightName: '风速',
type
:
'fs'
,
// type: 'fs',
value
:
'22.5℃'
,
// value: '22.5℃',
scope
:
'参考值:0.0~50℃'
// scope: '参考值:0.0~50℃'
}
// }
]
// ]
},
// },
{
// {
name
:
'喷淋系统'
,
// name: '喷淋系统',
list
:
[
// list: [
{
// {
leftName
:
'喷淋系统'
,
// leftName: '喷淋系统',
rightName
:
'风压'
,
// rightName: '风压',
type
:
'fy'
,
// type: 'fy',
value
:
'0.319mp'
,
// value: '0.319mp',
scope
:
'参考值:0.2~0.8mp'
// scope: '参考值:0.2~0.8mp'
},
// },
{
// {
leftName
:
'喷淋系统'
,
// leftName: '喷淋系统',
rightName
:
'泵房温度'
,
// rightName: '泵房温度',
type
:
'wd'
,
// type: 'wd',
value
:
'22.5℃'
,
// value: '22.5℃',
scope
:
'参考值:0.0~50℃'
// scope: '参考值:0.0~50℃'
},
// },
{
// {
leftName
:
'喷淋系统'
,
// leftName: '喷淋系统',
rightName
:
'水位高度'
,
// rightName: '水位高度',
type
:
'swgd'
,
// type: 'swgd',
value
:
'22.5℃'
,
// value: '22.5℃',
scope
:
'参考值:0.0~50℃'
// scope: '参考值:0.0~50℃'
},
// },
{
// {
leftName
:
'喷淋系统'
,
// leftName: '喷淋系统',
rightName
:
'水位高度'
,
// rightName: '水位高度',
type
:
'swgd'
,
// type: 'swgd',
value
:
'22.5℃'
,
// value: '22.5℃',
scope
:
'参考值:0.0~50℃'
// scope: '参考值:0.0~50℃'
}
// }
]
// ]
},
// },
{
// {
name
:
'喷淋系统'
,
// name: '喷淋系统',
list
:
[
// list: [
{
// {
leftName
:
'喷淋系统'
,
// leftName: '喷淋系统',
rightName
:
'水流压力'
,
// rightName: '水流压力',
type
:
'slyl'
,
// type: 'slyl',
value
:
'0.319mp'
,
// value: '0.319mp',
scope
:
'参考值:0.2~0.8mp'
// scope: '参考值:0.2~0.8mp'
},
// },
{
// {
leftName
:
'喷淋系统'
,
// leftName: '喷淋系统',
rightName
:
'泵房温度'
,
// rightName: '泵房温度',
type
:
'wdh'
,
// type: 'wdh',
value
:
'60.5℃'
,
// value: '60.5℃',
over
:
true
,
// over: true,
// scope: '参考值:0.0~50℃'
scope
:
'参考值:0.0~50℃'
// },
},
// {
{
// leftName: '喷淋系统',
leftName
:
'喷淋系统'
,
// rightName: '水位高度',
rightName
:
'水位高度'
,
// type: 'swgd',
type
:
'swgd'
,
// value: '22.5℃',
value
:
'22.5℃'
,
// scope: '参考值:0.0~50℃'
scope
:
'参考值:0.0~50℃'
// },
},
// {
{
// leftName: '喷淋系统',
leftName
:
'喷淋系统'
,
// rightName: '水位高度',
rightName
:
'水位高度'
,
// type: 'swgd',
type
:
'swgd'
,
// value: '22.5℃',
value
:
'22.5℃'
,
// scope: '参考值:0.0~50℃'
scope
:
'参考值:0.0~50℃'
// }
}
// ]
]
// }
}
]
]
}
}
},
},
...
...
src/plugin/axios/index.js
View file @
11907e95
...
@@ -231,6 +231,7 @@ service.interceptors.response.use(
...
@@ -231,6 +231,7 @@ service.interceptors.response.use(
sessionStorage
.
removeItem
(
'uuid'
)
sessionStorage
.
removeItem
(
'uuid'
)
if
(
this
)
{
if
(
this
)
{
this
.
$parent
.
getDateList
()
this
.
$parent
.
getDateList
()
this
.
$parent
.
getDateList2
()
//清空接管提示框
//清空接管提示框
// this.$store.dispatch('d2admin/takeover/setTakeover', null)
// this.$store.dispatch('d2admin/takeover/setTakeover', null)
}
}
...
...
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