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
8a7c0a70
Commit
8a7c0a70
authored
May 10, 2021
by
co_dengxiongwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
3b8d99bf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
165 additions
and
265 deletions
+165
-265
App.vue
src/App.vue
+6
-237
index.vue
src/pages/ol/demo/index.vue
+1
-1
index.vue
src/pages/ol/kanban/index.vue
+158
-27
No files found.
src/App.vue
View file @
8a7c0a70
...
...
@@ -89,47 +89,6 @@
</div>
</div>
<dispose-info
v-if=
"queryDetailVisible"
ref=
"queryDetail"
></dispose-info>
<el-dialog
:close-on-click-modal=
"false"
title=
"申请接管站点信息"
:visible
.
sync=
"dialogVisible"
width=
"30%"
class=
"takeover_dialog"
:before-close=
"takeoverClose"
:show-close=
"false"
>
<div
slot=
"title"
>
<span
class=
"title-bold"
>
申请接管站点信息
</span>
</div>
<el-form
ref=
"takeoverForm"
:model=
"takeoverInfo"
label-width=
"140px"
size=
"mini"
>
<el-form-item
label=
"申请接管站点单位:"
>
<font>
{{
takeoverInfo
.
takeoverOrgName
}}
</font>
</el-form-item>
<el-form-item
label=
"申请人:"
>
<font>
{{
takeoverInfo
.
applyUserName
}}
</font>
</el-form-item>
<el-form-item
label=
"接管类型:"
>
<font>
{{
takeoverInfo
.
takeoverType
===
1
?
'主动接管'
:
'被动接管'
}}
</font>
</el-form-item>
<el-form-item
label=
"申请时间:"
>
<font>
{{
takeoverInfo
.
applyTime
}}
</font>
</el-form-item>
<el-form-item
label=
"申请理由:"
>
<font>
{{
takeoverInfo
.
reason
}}
</font>
</el-form-item>
</el-form>
<div
slot=
"footer"
align=
"center"
>
<el-button
class=
"btn"
type=
"primary"
@
click=
"disagree"
>
拒绝
</el-button>
<el-button
class=
"btn"
type=
"primary"
@
click=
"agreed"
>
同意
</el-button>
</div>
</el-dialog>
</div>
</
template
>
...
...
@@ -152,26 +111,11 @@ export default {
urlPath
:
window
.
CONFIG
.
urlPath
,
tipList
:
[],
showList
:
[],
src
:
window
.
CONFIG
.
bimPath
,
takeoverInfo
:
''
}
},
watch
:
{
takeover
(
newValue
)
{
// console.log(2222, newValue)
if
(
newValue
)
{
this
.
takeoverInfo
=
newValue
this
.
dialogVisible
=
true
}
else
{
this
.
dialogVisible
=
false
}
}
},
computed
:
{
takeover
()
{
return
this
.
$store
.
state
.
d2admin
.
takeover
.
takeover
src
:
window
.
CONFIG
.
bimPath
}
},
watch
:
{},
computed
:
{},
mounted
()
{
//let token = util.cookies.get('token')
this
.
initWebSocket
()
...
...
@@ -380,9 +324,6 @@ export default {
//连接成功
websocketonopen2
()
{
console
.
log
(
'WebSocket连接成功2'
)
// this.takeoverInfo = 1
// this.send2()
},
//接收后端返回的数据
websocketonmessage2
(
e
)
{
...
...
@@ -397,68 +338,10 @@ export default {
//登录才能获取
// this.tipList = JSON.parse(e.data)
console
.
log
(
'接管数据'
+
e
.
data
)
let
st
=
e
.
data
.
split
(
'_'
)[
0
]
let
bean
=
JSON
.
parse
(
e
.
data
.
split
(
'_'
)[
1
])
if
(
st
===
'one'
)
{
//重连查询接管信息--站点用
if
(
bean
&&
bean
.
status
===
1
)
{
// 申请接管
sessionStorage
.
removeItem
(
'takeover'
)
this
.
takeoverInfo
=
bean
this
.
dialogVisible
=
true
}
else
if
(
bean
&&
bean
.
valids
===
1
&&
bean
.
status
===
2
)
{
// 已经被接管
this
.
ishowAlarm
=
false
sessionStorage
.
setItem
(
'takeover'
,
true
)
}
else
{
//没有被接管
sessionStorage
.
removeItem
(
'takeover'
)
}
return
}
else
if
(
st
===
'list'
)
{
//重连查询---线路路网用
return
}
if
(
bean
&&
bean
.
status
===
1
)
{
// 申请接管
this
.
takeoverInfo
=
bean
this
.
dialogVisible
=
true
}
else
if
(
bean
&&
bean
.
status
===
5
&&
bean
.
valids
===
0
)
{
// 提示断开接管
sessionStorage
.
removeItem
(
'takeover'
)
this
.
$message
.
warning
(
bean
.
lineName
+
'放弃了对此站点的接管'
)
// this.dialogVisible = false
this
.
ishowAlarm
=
true
}
else
if
(
bean
&&
bean
.
valids
===
1
&&
bean
.
status
===
2
)
{
this
.
ishowAlarm
=
false
this
.
$message
.
success
(
'同意了接管申请'
)
sessionStorage
.
setItem
(
'takeover'
,
true
)
this
.
takeoverClose
()
location
.
reload
(
true
)
}
else
if
(
bean
&&
bean
.
valids
===
1
&&
bean
.
status
===
3
)
{
this
.
ishowAlarm
=
true
this
.
$message
.
success
(
'拒绝了接管申请'
)
sessionStorage
.
removeItem
(
'takeover'
)
this
.
$store
.
dispatch
(
'd2admin/typeList/set'
,
true
)
this
.
takeoverClose
()
}
else
if
(
bean
&&
bean
.
valids
===
0
&&
bean
.
status
===
4
)
{
sessionStorage
.
removeItem
(
'takeover'
)
this
.
$message
.
success
(
'中断了接管'
)
this
.
ishowAlarm
=
true
location
.
reload
(
true
)
}
// 设置刷新页面(站点接管管理页面)
this
.
$store
.
dispatch
(
'd2admin/typeList/set'
,
true
)
// console.log(this.takeoverInfo, '-------')
}
},
//关闭连接
takeoverClose
()
{
//直接关闭
this
.
takeoverInfo
=
{}
this
.
dialogVisible
=
false
this
.
$store
.
dispatch
(
'd2admin/takeover/setTakeover'
,
null
)
},
takeoverClose
()
{},
clickClose
(
id
)
{
if
(
id
&&
id
===
this
.
takeoverInfo
.
id
)
{
//有id的话只关闭id跟后台传递过来id相同的弹出层,不一样不关。防止一边同意一边立马申请,申请后发的但是先到了。websocket先发但是后到
...
...
@@ -479,57 +362,9 @@ export default {
send2
()
{
this
.
websock
.
send
(
'2'
)
},
// 同意被接管
agreed
()
{
let
item
=
this
.
takeoverInfo
item
.
status
=
2
// 修改表中数据
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/sysStationTakeover/agree'
),
method
:
'post'
,
data
:
item
}).
then
((
data
)
=>
{
if
(
data
&&
data
.
code
===
0
)
{
// this.$message.success('操作成功')
sessionStorage
.
setItem
(
'takeover'
,
true
)
this
.
takeoverClose
()
location
.
reload
(
true
)
}
})
},
// 不同意
disagree
()
{
let
item
=
this
.
takeoverInfo
item
.
status
=
3
// 修改表中数据
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/sysStationTakeover/agree'
),
method
:
'post'
,
data
:
item
}).
then
((
data
)
=>
{
if
(
data
&&
data
.
code
===
0
)
{
// this.$message.success('操作成功')
sessionStorage
.
removeItem
(
'takeover'
)
this
.
$store
.
dispatch
(
'd2admin/typeList/set'
,
true
)
this
.
takeoverClose
()
}
})
},
// ====================================
//登录后页面刷新的时候获取
getDateList
()
{
console
.
log
(
'takeover:'
,
sessionStorage
.
getItem
(
'takeover'
))
if
(
sessionStorage
.
getItem
(
'takeover'
)
!=
undefined
&&
sessionStorage
.
getItem
(
'takeover'
)
==
'true'
)
{
this
.
ishowAlarm
=
false
}
else
{
this
.
ishowAlarm
=
true
}
console
.
log
(
'ishowAlarm:'
,
this
.
ishowAlarm
)
this
.
tipList
=
[]
this
.
showList
=
[]
if
(
...
...
@@ -566,9 +401,6 @@ export default {
this
.
$store
.
dispatch
(
'd2admin/toast/set'
,
this
.
tipList
.
length
)
}
})
}
else
{
//清空接管提示框
this
.
$store
.
dispatch
(
'd2admin/takeover/setTakeover'
,
null
)
}
},
/**数组根据数组对象中的某个属性值进行排序的方法
...
...
@@ -624,65 +456,6 @@ export default {
</
script
>
<
style
lang=
"scss"
>
@import
'~@/assets/style/public-class.scss'
;
// .takeover_warp {
// width: 400px;
// height: 220px;
// position: fixed;
// z-index: 100;
// bottom: 80px;
// right: 20px;
// border: 1px solid #ccc;
// background: white;
// .title {
// width: 100%;
// height: 30px;
// line-height: 30px;
// text-indent: 10px;
// border-bottom: 1px solid #ccc;
// i {
// float: right;
// line-height: 30px;
// margin-right: 5px;
// }
// }
// .info {
// width: 400px;
// text-indent: 20px;
// div {
// margin-top: 5px;
// }
// }
// .btn_group {
// text-align: center;
// margin-top: 15px;
// .btn {
// width: 100px;
// height: 30px;
// line-height: 30px;
// }
// /deep/.el-button {
// padding: 0 !important;
// }
// }
// }
.takeover_dialog
{
.el-form-item--mini.el-form-item
{
margin-bottom
:
0
!
important
;
}
}
// body{
// padding-right:0 !important
// }
// openlayer 样式
.resource-container
{
.ol-overviewmap
{
left
:
89%
;
...
...
@@ -935,10 +708,6 @@ export default {
flex-basis
:
auto
!
important
;
}
.d2-theme-container-main-body
{
/*background-color: white !important;*/
}
.box_footer
{
background-color
:
white
;
}
...
...
src/pages/ol/demo/index.vue
View file @
8a7c0a70
...
...
@@ -641,7 +641,7 @@ export default {
let
node
=
this
.
$refs
.
tree
.
getCurrentNode
()
// console.log(node)
if
(
node
.
level
!==
6
)
{
this
.
$message
.
warning
(
'只能收藏资源点
或防区
'
)
this
.
$message
.
warning
(
'只能收藏资源点'
)
return
}
let
dForm
=
{}
...
...
src/pages/ol/kanban/index.vue
View file @
8a7c0a70
<
template
lang=
'pug'
>
<
template
lang=
"pug"
>
el-container(style="padding: 0px; height: 77.6vh")
el-header(
style="height: 42px; line-height: 42px; border: 1px solid rgba(195, 195, 195, 1); background: #f4f4f4"
)
span.title-bold
el-select(v-model="roomId", size="mini")
el-option(label="c区1房间", value="11")
el-option(label="c区2房间", value="22")
el-select(v-model="mapId" size="mini" @change="handleChange")
el-option(v-for="(item,index) in mapList" :key="index" :label="item.stationName +'-'+item.name" :value="item.id")
el-main.box_main
el-row(:gutter="20")
el-col(
...
...
@@ -37,7 +36,8 @@ el-container(style="padding: 0px; height: 77.6vh")
export
default
{
data
()
{
return
{
roomId
:
'11'
,
mapId
:
''
,
mapList
:
[],
dataList
:
[
{
name
:
'喷淋系统'
,
...
...
@@ -49,13 +49,11 @@ export default {
value
:
'0.319mp'
,
scope
:
'参考值:0.2~0.8mp'
}
]
},
{
name
:
'喷淋系统'
,
list
:
[
{
leftName
:
'喷淋系统'
,
rightName
:
'一氧化碳'
,
...
...
@@ -157,11 +155,144 @@ export default {
]
}
},
computed
:
{
computed
:
{
// 类型列表
// typeList() {
// return this.$store.state.d2admin.typeList
// }
},
created
()
{
this
.
getMapList
()
},
methods
:
{
getMapList
()
{
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
`/liStationMap/list`
),
method
:
'post'
,
data
:
{}
})
.
then
((
data
)
=>
{
if
(
data
&&
data
.
code
===
0
)
{
this
.
mapList
=
data
.
list
console
.
log
(
'111111---'
,
this
.
mapList
)
this
.
mapId
=
this
.
mapList
[
0
].
id
console
.
log
(
'222222---'
,
this
.
mapId
)
}
})
.
then
(()
=>
{
this
.
getDataList
()
})
},
handleChange
(
res
)
{
console
.
log
(
'333333---'
,
res
)
this
.
mapId
=
res
this
.
getDataList
()
},
getDataList
()
{
this
.
dataList
=
[]
this
.
$http
({
url
:
this
.
$http
.
adornUrl
(
'/liResource/getKanBanList'
),
method
:
'post'
,
data
:
{
tierId
:
this
.
mapId
//场景id
}
}).
then
((
data
)
=>
{
if
(
data
&&
data
.
code
===
0
)
{
console
.
log
(
'数据'
,
data
)
data
.
list
.
forEach
((
e
)
=>
{
let
item
=
{
name
:
''
,
list
:
[]
}
let
list
=
[]
e
.
list
.
forEach
((
el
)
=>
{
if
(
e
.
id
===
'b47661ca1d454f9792ba5369f3cb2bc5'
)
{
//无线压力计
list
.
push
({
leftName
:
el
.
resourceName
,
rightName
:
'水流压力'
,
type
:
'slyl'
,
value
:
'0.319mp'
,
scope
:
'参考值:0.2~0.8mp'
})
}
else
if
(
e
.
id
===
'c788ce98c1f248f590434394da485ce4'
)
{
//4合1环境探测器
list
.
push
({
leftName
:
el
.
resourceName
,
rightName
:
'一氧化碳'
,
type
:
'co'
,
value
:
'22.5℃'
,
scope
:
'参考值:0.0~50℃'
})
list
.
push
({
leftName
:
el
.
resourceName
,
rightName
:
'二氧化碳'
,
type
:
'co2'
,
value
:
'22.5℃'
,
scope
:
'参考值:0.0~50℃'
})
list
.
push
({
leftName
:
el
.
resourceName
,
rightName
:
'温度'
,
type
:
'wd'
,
value
:
'22.5℃'
,
scope
:
'参考值:0.0~50℃'
})
list
.
push
({
leftName
:
el
.
resourceName
,
rightName
:
'湿度'
,
type
:
'sd'
,
value
:
'22.5℃'
,
scope
:
'参考值:0.0~50℃'
})
}
else
if
(
e
.
id
===
'b45827c068254695864ee3c1d42573cb'
)
{
//流量计
list
.
push
({
leftName
:
el
.
resourceName
,
rightName
:
'水流流量'
,
type
:
'slyl'
,
value
:
'0.319mp'
,
scope
:
'参考值:0.2~0.8mp'
})
}
else
if
(
e
.
id
===
'303310efddb34a2e9bf269bdff8a7dc5'
)
{
//无线液位仪
list
.
push
({
leftName
:
el
.
resourceName
,
rightName
:
'水流压力'
,
type
:
'slyl'
,
value
:
'0.319mp'
,
scope
:
'参考值:0.2~0.8mp'
})
}
else
if
(
e
.
id
===
'f4c840711eae4bcb9536a890cdfda493'
)
{
//风速仪
list
.
push
({
leftName
:
el
.
resourceName
,
rightName
:
'风速'
,
type
:
'slyl'
,
value
:
'0.319mp'
,
scope
:
'参考值:0.2~0.8mp'
})
}
else
if
(
e
.
id
===
'5b26f6c8f2a143048bd0e327ca5c186d'
)
{
//风压仪
list
.
push
({
leftName
:
el
.
resourceName
,
rightName
:
'风压'
,
type
:
'slyl'
,
value
:
'0.319mp'
,
scope
:
'参考值:0.2~0.8mp'
})
}
console
.
log
(
'list:'
,
list
)
})
item
.
name
=
e
.
name
item
.
list
=
list
this
.
dataList
.
push
(
item
)
})
console
.
log
(
'dataList:'
,
this
.
dataList
)
}
})
}
}
}
</
script
>
...
...
@@ -181,109 +312,109 @@ computed: {
.co2
{
width
:
100px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/co2.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/co2.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.co2h
{
width
:
100px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/co2h.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/co2h.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.co
{
width
:
73px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/co.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/co.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.coh
{
width
:
73px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/coh.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/coh.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.swgd
{
width
:
65px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/swgd.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/swgd.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.swgdh
{
width
:
65px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/swgdh.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/swgdh.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.wd
{
width
:
57px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/wd.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/wd.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.wdh
{
width
:
57px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/wdh.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/wdh.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.slll
{
width
:
65px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/slll.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/slll.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.slllh
{
width
:
65px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/slllh.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/slllh.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.slyl
{
width
:
65px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/slyl.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/slyl.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.slylh
{
width
:
65px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/slylh.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/slylh.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.sd
{
width
:
65px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/sd.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/sd.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.sdh
{
width
:
65px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/sdh.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/sdh.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.fs
{
width
:
61px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/fs.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/fs.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.fsh
{
width
:
61px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/fsh.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/fsh.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.fy
{
width
:
72px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/fy.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/fy.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
.fyh
{
width
:
72px
;
height
:
75px
;
background
:
url(
"~@/assets/images/imgs/fyh.png"
)
no-repeat
;
background
:
url(
'~@/assets/images/imgs/fyh.png'
)
no-repeat
;
background-size
:
100%
100%
;
}
}
...
...
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