|
@@ -105,12 +105,12 @@
|
|
|
</el-dialog>
|
|
|
|
|
|
<ScadaMapCom
|
|
|
- ref="scadaMapCom"
|
|
|
+ ref="scadaMapComAll"
|
|
|
:map-view="mapView"
|
|
|
:site-data="siteData"
|
|
|
:isscadashow="true"
|
|
|
:ismapok="false"
|
|
|
- maplayer-name="scada"
|
|
|
+ maplayer-name="scadaAll"
|
|
|
/>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -183,20 +183,42 @@ export default {
|
|
|
watch: {
|
|
|
sidePanelOn(newTab, oldTab) {
|
|
|
if (newTab == oldTab) return
|
|
|
- if (newTab == 'scadaMonitor') {
|
|
|
+ if (newTab == 'scadaMonitorAll') {
|
|
|
this.$nextTick(() => {
|
|
|
- this.layer.visible = true
|
|
|
- for (var i = 0, il = this.divs, ii = il.length; i < ii; i++) {
|
|
|
- il[i].div.style.display = ''
|
|
|
+ // if(this.layer){
|
|
|
+ // this.layer.visible = true
|
|
|
+ // }
|
|
|
+
|
|
|
+ const scadalayer = this.data.mapView.map.findLayerById('scadaAll')
|
|
|
+ const scadahitlayer = this.data.mapView.map.findLayerById('scadaAllhit')
|
|
|
+ if (scadalayer !== null && scadalayer !== undefined) {
|
|
|
+ scadalayer.visible = true
|
|
|
}
|
|
|
- this.addWatch()
|
|
|
- if (this.ids.length > 0) this.loadRealTimeSiteValue()
|
|
|
+ if (scadahitlayer !== null && scadahitlayer !== undefined) {
|
|
|
+ scadahitlayer.visible = true
|
|
|
+ }
|
|
|
+ if(this.$refs.scadaMapComAll&&this.$refs.scadaMapComAll.divs){
|
|
|
+ for (var i = 0, il =this.$refs.scadaMapComAll.divs, ii = il.length; i < ii; i++) {
|
|
|
+ il[i].div.style.display = ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.addWatch&&this.addWatch()
|
|
|
+ if (this.ids&&this.ids.length > 0) this.loadRealTimeSiteValue()
|
|
|
})
|
|
|
}
|
|
|
- if (oldTab == 'scadaMonitor') {
|
|
|
- this.layer.visible = false
|
|
|
- for (var i = 0, il = this.divs, ii = il.length; i < ii; i++) {
|
|
|
- il[i].div.style.display = 'none'
|
|
|
+ if (oldTab == 'scadaMonitorAll') {
|
|
|
+ const scadalayer = this.data.mapView.map.findLayerById('scadaAll')
|
|
|
+ const scadahitlayer = this.data.mapView.map.findLayerById('scadaAllhit')
|
|
|
+ if (scadalayer !== null && scadalayer !== undefined) {
|
|
|
+ scadalayer.visible = false
|
|
|
+ }
|
|
|
+ if (scadahitlayer !== null && scadahitlayer !== undefined) {
|
|
|
+ scadahitlayer.visible = false
|
|
|
+ }
|
|
|
+ if(this.$refs.scadaMapComAll&&this.$refs.scadaMapComAll.divs){
|
|
|
+ for (var i = 0, il = this.$refs.scadaMapComAll.divs, ii = il.length; i < ii; i++) {
|
|
|
+ il[i].div.style.display = 'none'
|
|
|
+ }
|
|
|
}
|
|
|
if (this.watch) {
|
|
|
this.watch.remove()
|
|
@@ -217,8 +239,8 @@ export default {
|
|
|
var view = (this.mapView = this.data.mapView)
|
|
|
this.floatDiv = view.TF_floatPanel
|
|
|
|
|
|
- const scadalayer = view.map.findLayerById('scadatool')
|
|
|
- const scadahitlayer = view.map.findLayerById('scadatoolhit')
|
|
|
+ const scadalayer = view.map.findLayerById('scadaAll')
|
|
|
+ const scadahitlayer = view.map.findLayerById('scadaAllhit')
|
|
|
if (scadalayer !== null && scadalayer !== undefined) {
|
|
|
scadalayer.visible = false
|
|
|
}
|
|
@@ -233,8 +255,8 @@ export default {
|
|
|
if (this.queryTimeOut) window.clearTimeout(this.queryTimeOut)
|
|
|
// this.clearSiteDiv();
|
|
|
var view = this.mapView
|
|
|
- const scadalayer = view.map.findLayerById('scadatool')
|
|
|
- const scadahitlayer = view.map.findLayerById('scadatoolhit')
|
|
|
+ const scadalayer = view.map.findLayerById('scadaAll')
|
|
|
+ const scadahitlayer = view.map.findLayerById('scadaAllhit')
|
|
|
if (scadalayer !== null && scadalayer !== undefined) {
|
|
|
scadalayer.visible = true
|
|
|
}
|
|
@@ -285,7 +307,6 @@ export default {
|
|
|
const allocationsFilter = site.allocations.filter(item => {
|
|
|
return item.isAlarm == '1'
|
|
|
})
|
|
|
- debugger
|
|
|
if (allocationsFilter.length > 0) {
|
|
|
isError = true;
|
|
|
this.existWarnig=true;
|
|
@@ -403,7 +424,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getSiteHistroty(e) {
|
|
|
- this.$refs.scadaMapCom.getSiteHistroty(e)
|
|
|
+ this.$refs.scadaMapComAll.getSiteHistroty(e)
|
|
|
|
|
|
// var stid, zbx;
|
|
|
// stid = e.id;
|