Commit 8a7c0a70 authored by co_dengxiongwen's avatar co_dengxiongwen

tj

parent 3b8d99bf
...@@ -89,47 +89,6 @@ ...@@ -89,47 +89,6 @@
</div> </div>
</div> </div>
<dispose-info v-if="queryDetailVisible" ref="queryDetail"></dispose-info> <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> </div>
</template> </template>
...@@ -152,26 +111,11 @@ export default { ...@@ -152,26 +111,11 @@ export default {
urlPath: window.CONFIG.urlPath, urlPath: window.CONFIG.urlPath,
tipList: [], tipList: [],
showList: [], showList: [],
src: window.CONFIG.bimPath, 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
} }
}, },
watch: {},
computed: {},
mounted() { mounted() {
//let token = util.cookies.get('token') //let token = util.cookies.get('token')
this.initWebSocket() this.initWebSocket()
...@@ -380,9 +324,6 @@ export default { ...@@ -380,9 +324,6 @@ export default {
//连接成功 //连接成功
websocketonopen2() { websocketonopen2() {
console.log('WebSocket连接成功2') console.log('WebSocket连接成功2')
// this.takeoverInfo = 1
// this.send2()
}, },
//接收后端返回的数据 //接收后端返回的数据
websocketonmessage2(e) { websocketonmessage2(e) {
...@@ -391,74 +332,16 @@ export default { ...@@ -391,74 +332,16 @@ export default {
sessionStorage.getItem('token') && sessionStorage.getItem('token') &&
sessionStorage.getItem('token') != undefined sessionStorage.getItem('token') != undefined
) { ) {
// 集合 // 集合
// this.$store.dispatch('d2admin/typeList/set', e.typeList) // this.$store.dispatch('d2admin/typeList/set', e.typeList)
//登录才能获取 //登录才能获取
// this.tipList = JSON.parse(e.data) // this.tipList = JSON.parse(e.data)
console.log('接管数据' + 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() { takeoverClose() {},
//直接关闭
this.takeoverInfo = {}
this.dialogVisible = false
this.$store.dispatch('d2admin/takeover/setTakeover', null)
},
clickClose(id) { clickClose(id) {
if (id && id === this.takeoverInfo.id) { if (id && id === this.takeoverInfo.id) {
//有id的话只关闭id跟后台传递过来id相同的弹出层,不一样不关。防止一边同意一边立马申请,申请后发的但是先到了。websocket先发但是后到 //有id的话只关闭id跟后台传递过来id相同的弹出层,不一样不关。防止一边同意一边立马申请,申请后发的但是先到了。websocket先发但是后到
...@@ -479,57 +362,9 @@ export default { ...@@ -479,57 +362,9 @@ export default {
send2() { send2() {
this.websock.send('2') 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() { 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.tipList = []
this.showList = [] this.showList = []
if ( if (
...@@ -566,9 +401,6 @@ export default { ...@@ -566,9 +401,6 @@ export default {
this.$store.dispatch('d2admin/toast/set', this.tipList.length) this.$store.dispatch('d2admin/toast/set', this.tipList.length)
} }
}) })
} else {
//清空接管提示框
this.$store.dispatch('d2admin/takeover/setTakeover', null)
} }
}, },
/**数组根据数组对象中的某个属性值进行排序的方法 /**数组根据数组对象中的某个属性值进行排序的方法
...@@ -624,65 +456,6 @@ export default { ...@@ -624,65 +456,6 @@ export default {
</script> </script>
<style lang="scss"> <style lang="scss">
@import '~@/assets/style/public-class.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 { .resource-container {
.ol-overviewmap { .ol-overviewmap {
left: 89%; left: 89%;
...@@ -935,10 +708,6 @@ export default { ...@@ -935,10 +708,6 @@ export default {
flex-basis: auto !important; flex-basis: auto !important;
} }
.d2-theme-container-main-body {
/*background-color: white !important;*/
}
.box_footer { .box_footer {
background-color: white; background-color: white;
} }
......
...@@ -641,7 +641,7 @@ export default { ...@@ -641,7 +641,7 @@ export default {
let node = this.$refs.tree.getCurrentNode() let node = this.$refs.tree.getCurrentNode()
// console.log(node) // console.log(node)
if (node.level !== 6) { if (node.level !== 6) {
this.$message.warning('只能收藏资源点或防区') this.$message.warning('只能收藏资源点')
return return
} }
let dForm = {} let dForm = {}
......
<template lang='pug'> <template lang="pug">
el-container(style="padding: 0px; height: 77.6vh") el-container(style="padding: 0px; height: 77.6vh")
el-header( el-header(
style="height: 42px; line-height: 42px; border: 1px solid rgba(195, 195, 195, 1); background: #f4f4f4" style="height: 42px; line-height: 42px; border: 1px solid rgba(195, 195, 195, 1); background: #f4f4f4"
) )
span.title-bold span.title-bold
el-select(v-model="roomId", size="mini") el-select(v-model="mapId" size="mini" @change="handleChange")
el-option(label="c区1房间", value="11") el-option(v-for="(item,index) in mapList" :key="index" :label="item.stationName +'-'+item.name" :value="item.id")
el-option(label="c区2房间", value="22")
el-main.box_main el-main.box_main
el-row(:gutter="20") el-row(:gutter="20")
el-col( el-col(
...@@ -37,7 +36,8 @@ el-container(style="padding: 0px; height: 77.6vh") ...@@ -37,7 +36,8 @@ el-container(style="padding: 0px; height: 77.6vh")
export default { export default {
data() { data() {
return { return {
roomId: '11', mapId: '',
mapList: [],
dataList: [ dataList: [
{ {
name: '喷淋系统', name: '喷淋系统',
...@@ -49,13 +49,11 @@ export default { ...@@ -49,13 +49,11 @@ export default {
value: '0.319mp', value: '0.319mp',
scope: '参考值:0.2~0.8mp' scope: '参考值:0.2~0.8mp'
} }
] ]
}, },
{ {
name: '喷淋系统', name: '喷淋系统',
list: [ list: [
{ {
leftName: '喷淋系统', leftName: '喷淋系统',
rightName: '一氧化碳', rightName: '一氧化碳',
...@@ -157,11 +155,144 @@ export default { ...@@ -157,11 +155,144 @@ export default {
] ]
} }
}, },
computed: { computed: {
// 类型列表 // 类型列表
// typeList() { // typeList() {
// return this.$store.state.d2admin.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> </script>
...@@ -181,109 +312,109 @@ computed: { ...@@ -181,109 +312,109 @@ computed: {
.co2 { .co2 {
width: 100px; width: 100px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/co2.png") no-repeat; background: url('~@/assets/images/imgs/co2.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.co2h { .co2h {
width: 100px; width: 100px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/co2h.png") no-repeat; background: url('~@/assets/images/imgs/co2h.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.co { .co {
width: 73px; width: 73px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/co.png") no-repeat; background: url('~@/assets/images/imgs/co.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.coh { .coh {
width: 73px; width: 73px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/coh.png") no-repeat; background: url('~@/assets/images/imgs/coh.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.swgd { .swgd {
width: 65px; width: 65px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/swgd.png") no-repeat; background: url('~@/assets/images/imgs/swgd.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.swgdh { .swgdh {
width: 65px; width: 65px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/swgdh.png") no-repeat; background: url('~@/assets/images/imgs/swgdh.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.wd { .wd {
width: 57px; width: 57px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/wd.png") no-repeat; background: url('~@/assets/images/imgs/wd.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.wdh { .wdh {
width: 57px; width: 57px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/wdh.png") no-repeat; background: url('~@/assets/images/imgs/wdh.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.slll { .slll {
width: 65px; width: 65px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/slll.png") no-repeat; background: url('~@/assets/images/imgs/slll.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.slllh { .slllh {
width: 65px; width: 65px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/slllh.png") no-repeat; background: url('~@/assets/images/imgs/slllh.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.slyl { .slyl {
width: 65px; width: 65px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/slyl.png") no-repeat; background: url('~@/assets/images/imgs/slyl.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.slylh { .slylh {
width: 65px; width: 65px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/slylh.png") no-repeat; background: url('~@/assets/images/imgs/slylh.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.sd { .sd {
width: 65px; width: 65px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/sd.png") no-repeat; background: url('~@/assets/images/imgs/sd.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.sdh { .sdh {
width: 65px; width: 65px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/sdh.png") no-repeat; background: url('~@/assets/images/imgs/sdh.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.fs { .fs {
width: 61px; width: 61px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/fs.png") no-repeat; background: url('~@/assets/images/imgs/fs.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.fsh { .fsh {
width: 61px; width: 61px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/fsh.png") no-repeat; background: url('~@/assets/images/imgs/fsh.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.fy { .fy {
width: 72px; width: 72px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/fy.png") no-repeat; background: url('~@/assets/images/imgs/fy.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
.fyh { .fyh {
width: 72px; width: 72px;
height: 75px; height: 75px;
background: url("~@/assets/images/imgs/fyh.png") no-repeat; background: url('~@/assets/images/imgs/fyh.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment