修改拓扑获取数据
This commit is contained in:
@ -254,7 +254,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<dispositionPointDialog
|
||||
<DispositionPointData
|
||||
is-topology
|
||||
:show-div-location="true"
|
||||
:max-length="12"
|
||||
@ -350,12 +350,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.$store.getters.menuList.length) {
|
||||
this.permissionId = this.$store.getters.menuList.find((item) => {
|
||||
return item.url === this.$route.path
|
||||
}).id
|
||||
}
|
||||
this.queryDynamicConfigTitle()
|
||||
|
||||
},
|
||||
methods: {
|
||||
commandKey(item) {
|
||||
@ -444,6 +439,12 @@ export default {
|
||||
this.getPcsData()
|
||||
},
|
||||
async getPcsData() {
|
||||
if (this.$store.getters.menuList.length) {
|
||||
this.permissionId = this.$store.getters.menuList.find((item) => {
|
||||
return item.url === this.$route.path
|
||||
}).id
|
||||
}
|
||||
this.queryDynamicConfigTitle()
|
||||
this.loading = true
|
||||
try {
|
||||
const res = await DynamicConfigPoint({
|
||||
@ -524,8 +525,6 @@ export default {
|
||||
},
|
||||
getPcsDataValue(item, index) {
|
||||
const dataKey = `pcsData_${item}`
|
||||
console.log(this[dataKey], dataKey)
|
||||
|
||||
return this[dataKey] && this[dataKey].length > index ? this[dataKey][index].value : ''
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<dispostionDialog :visible="show_dispostion" page-location="runChart" @close="close" @getData="getDynamicData" />
|
||||
<DispositionChartData :visible="show_dispostion" page-location="runChart" @close="close" @getData="getDynamicData" />
|
||||
<!-- <el-dialog
|
||||
:append-to-body="true" title="站点拓扑" :visible.sync="dialogVisible" width="90%" top="40px" center :close-on-click-modal="false">
|
||||
|
||||
@ -42,7 +42,8 @@ export default {
|
||||
stationId: null,
|
||||
interval: null,
|
||||
show_dispostion: false,
|
||||
dialogVisible: false
|
||||
dialogVisible: false,
|
||||
permissionId: null
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -67,24 +68,41 @@ export default {
|
||||
self.interval = null
|
||||
}
|
||||
this.stationId = val.id
|
||||
this.$nextTick(() => {
|
||||
this.getAllData()
|
||||
self.interval = setInterval(() => {
|
||||
this.getAllData()
|
||||
}, 30000)
|
||||
})
|
||||
const timer = setInterval(() => {
|
||||
if (self.$store.getters.menuList.length) {
|
||||
self.getPermissionId()
|
||||
if (this.permissionId) {
|
||||
clearInterval(timer)
|
||||
}
|
||||
}
|
||||
}, 500)
|
||||
}
|
||||
},
|
||||
deep: true,
|
||||
immediate: true
|
||||
},
|
||||
language: {
|
||||
handler() {
|
||||
this.$refs.leftBottom.getData()
|
||||
permissionId: {
|
||||
handler(val) {
|
||||
if (val && this.permissionId) {
|
||||
setTimeout(() => {
|
||||
this.getAllData()
|
||||
}, 100)
|
||||
|
||||
this.interval = setInterval(() => {
|
||||
this.getAllData()
|
||||
}, 1000 * 60 * 2)
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
language: {
|
||||
handler() {
|
||||
this.$refs.leftBottom.getData()
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
created() {
|
||||
|
||||
@ -97,6 +115,11 @@ export default {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getPermissionId() {
|
||||
this.permissionId = this.$store.getters.menuList.find(item => {
|
||||
return item.url === this.$route.path
|
||||
})?.id
|
||||
},
|
||||
toScale() {
|
||||
this.dialogVisible = true
|
||||
this.$nextTick(() => {
|
||||
@ -123,10 +146,13 @@ export default {
|
||||
this.$refs.topRight.show_point_dispostion = true
|
||||
},
|
||||
getAllData() {
|
||||
setTimeout(() => {
|
||||
this.getPermissionId()
|
||||
this.$refs.leftTop.getData()
|
||||
this.$refs.leftBottom.getData()
|
||||
this.$refs.topRight.getData()
|
||||
// this.$refs.bottomRight.getData()
|
||||
}, 800)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user