|
@@ -4,27 +4,29 @@
|
|
|
<div class="icon" style="right:20px">
|
|
|
<a-button type="primary" icon="appstore" size="large" @click="visibleRight=true" />
|
|
|
</div>
|
|
|
- <VueDragResize
|
|
|
- v-for="item in dotList"
|
|
|
- :key="item.id"
|
|
|
- v-show="item.positionFlag"
|
|
|
- :isActive="item.isActive"
|
|
|
- :w="item.width"
|
|
|
- :h="item.height"
|
|
|
- :minh="20"
|
|
|
- :x="item.xposition"
|
|
|
- :y="item.yposition"
|
|
|
- :isDraggable="item.isActive"
|
|
|
- :isResizable="item.isActive"
|
|
|
- :stickSize="5"
|
|
|
- @dragstop="resize">
|
|
|
- <a-tooltip>
|
|
|
- <template slot="title">
|
|
|
- {{ item.positionNum }}
|
|
|
- </template>
|
|
|
- <div class="info"> {{ item.positionNum }}</div>
|
|
|
- </a-tooltip>
|
|
|
- </VueDragResize>
|
|
|
+ <div v-if="dotList.length>0">
|
|
|
+ <VueDragResize
|
|
|
+ v-for="item in dotList"
|
|
|
+ :key="item.id"
|
|
|
+ v-show="item.positionFlag"
|
|
|
+ :isActive="item.isActive"
|
|
|
+ :w="item.width"
|
|
|
+ :h="item.height"
|
|
|
+ :minh="20"
|
|
|
+ :x="item.xposition"
|
|
|
+ :y="item.yposition"
|
|
|
+ :isDraggable="item.isActive"
|
|
|
+ :isResizable="item.isActive"
|
|
|
+ :stickSize="5"
|
|
|
+ @dragstop="resize">
|
|
|
+ <a-tooltip>
|
|
|
+ <template slot="title">
|
|
|
+ {{ item.positionNum }}
|
|
|
+ </template>
|
|
|
+ <div class="info" @click="handleInfo(item)"> {{ item.positionNum }}</div>
|
|
|
+ </a-tooltip>
|
|
|
+ </VueDragResize>
|
|
|
+ </div>
|
|
|
<a-drawer
|
|
|
title="点位配置"
|
|
|
placement="right"
|
|
@@ -60,6 +62,7 @@
|
|
|
</span>
|
|
|
</a-table>
|
|
|
</a-drawer>
|
|
|
+ <BaseChartInfo ref="baseChartInfo" @ok="handleOk"/>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -67,11 +70,13 @@
|
|
|
import VueDragResize from 'vue-drag-resize'
|
|
|
import { getSbPositionTree, fetchSbPosition } from '@/api/sb/position'
|
|
|
import { queryRemoteOpc, updateRemoteOpc } from '@/api/remote/opc'
|
|
|
-
|
|
|
+import BaseChartInfo from './modules/BaseChartInfo.vue'
|
|
|
export default {
|
|
|
name: 'Opc',
|
|
|
components: {
|
|
|
- VueDragResize
|
|
|
+ VueDragResize,
|
|
|
+ BaseChartInfo
|
|
|
+
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
@@ -96,6 +101,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created () {
|
|
|
+ this.positionId = this.$route.query.line
|
|
|
this.setTree()
|
|
|
this.getOpcInfo()
|
|
|
},
|
|
@@ -133,6 +139,7 @@ export default {
|
|
|
})
|
|
|
queryRemoteOpc({ line: this.positionId })
|
|
|
.then((res) => {
|
|
|
+ console.log(res.data)
|
|
|
this.dotList = res.data
|
|
|
this.dotList.forEach(item => {
|
|
|
item.isActive = false
|
|
@@ -143,8 +150,14 @@ export default {
|
|
|
getSbPositionTree({ opcFlag: 1 }).then(res => {
|
|
|
this.treeData = res.data
|
|
|
})
|
|
|
- }
|
|
|
+ },
|
|
|
+ handleInfo (remoteOpc) {
|
|
|
+ const model = this.$refs.baseChartInfo
|
|
|
+ model.base(remoteOpc)
|
|
|
+ },
|
|
|
+ handleOk () {
|
|
|
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|