|
@@ -23,7 +23,7 @@
|
|
<template slot="title">
|
|
<template slot="title">
|
|
{{ item.positionNum }}
|
|
{{ item.positionNum }}
|
|
</template>
|
|
</template>
|
|
- <div class="info" @click="handleInfo(item)"> {{ item.positionNum }}</div>
|
|
|
|
|
|
+ <div class="info" @click="handleEdit(item)"> {{ item.positionNum }}</div>
|
|
</a-tooltip>
|
|
</a-tooltip>
|
|
</VueDragResize>
|
|
</VueDragResize>
|
|
</div>
|
|
</div>
|
|
@@ -31,13 +31,13 @@
|
|
title="点位配置"
|
|
title="点位配置"
|
|
placement="right"
|
|
placement="right"
|
|
:closable="false"
|
|
:closable="false"
|
|
- :width="350"
|
|
|
|
|
|
+ :width="400"
|
|
:visible="visibleRight"
|
|
:visible="visibleRight"
|
|
@close="onCloseRight"
|
|
@close="onCloseRight"
|
|
>
|
|
>
|
|
<div>
|
|
<div>
|
|
<a-tree-select
|
|
<a-tree-select
|
|
- style="width: 60%;margin-right:10px;"
|
|
|
|
|
|
+ style="width: 50%;margin-right:10px;"
|
|
:dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
:dropdownStyle="{ maxHeight: '400px', overflow: 'auto' }"
|
|
:treeData="treeData"
|
|
:treeData="treeData"
|
|
:treeNodeFilterProp="'title'"
|
|
:treeNodeFilterProp="'title'"
|
|
@@ -46,7 +46,8 @@
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
>
|
|
>
|
|
</a-tree-select>
|
|
</a-tree-select>
|
|
- <a-button type="primary" @click="getOpcInfo">搜索</a-button>
|
|
|
|
|
|
+ <a-button style="margin-right:10px;" type="primary" @click="getOpcInfo">搜索</a-button>
|
|
|
|
+ <a-button type="primary" @click="handleAdd">新增</a-button>
|
|
</div>
|
|
</div>
|
|
<br>
|
|
<br>
|
|
<a-table
|
|
<a-table
|
|
@@ -63,6 +64,8 @@
|
|
</a-table>
|
|
</a-table>
|
|
</a-drawer>
|
|
</a-drawer>
|
|
<BaseChartInfo ref="baseChartInfo" @ok="handleOk"/>
|
|
<BaseChartInfo ref="baseChartInfo" @ok="handleOk"/>
|
|
|
|
+ <BaseForm ref="baseForm" @ok="handleOk"/>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -71,11 +74,13 @@ import VueDragResize from 'vue-drag-resize'
|
|
import { getSbPositionTree, fetchSbPosition } from '@/api/sb/position'
|
|
import { getSbPositionTree, fetchSbPosition } from '@/api/sb/position'
|
|
import { queryRemoteOpc, updateRemoteOpc } from '@/api/remote/opc'
|
|
import { queryRemoteOpc, updateRemoteOpc } from '@/api/remote/opc'
|
|
import BaseChartInfo from './modules/BaseChartInfo.vue'
|
|
import BaseChartInfo from './modules/BaseChartInfo.vue'
|
|
|
|
+import BaseForm from '@/views/remote/opc/modules/BaseForm.vue'
|
|
export default {
|
|
export default {
|
|
name: 'Opc',
|
|
name: 'Opc',
|
|
components: {
|
|
components: {
|
|
VueDragResize,
|
|
VueDragResize,
|
|
- BaseChartInfo
|
|
|
|
|
|
+ BaseChartInfo,
|
|
|
|
+ BaseForm
|
|
|
|
|
|
},
|
|
},
|
|
data () {
|
|
data () {
|
|
@@ -137,15 +142,12 @@ export default {
|
|
this.imgUrl = res.data.opcImg
|
|
this.imgUrl = res.data.opcImg
|
|
console.log(this.imgUrl)
|
|
console.log(this.imgUrl)
|
|
})
|
|
})
|
|
- console.log('0:' + new Date())
|
|
|
|
queryRemoteOpc({ line: this.positionId })
|
|
queryRemoteOpc({ line: this.positionId })
|
|
.then((res) => {
|
|
.then((res) => {
|
|
- console.log('1:' + new Date())
|
|
|
|
this.dotList = res.data
|
|
this.dotList = res.data
|
|
this.dotList.forEach(item => {
|
|
this.dotList.forEach(item => {
|
|
item.isActive = false
|
|
item.isActive = false
|
|
})
|
|
})
|
|
- console.log('2:' + new Date())
|
|
|
|
})
|
|
})
|
|
},
|
|
},
|
|
setTree (record = {}) {
|
|
setTree (record = {}) {
|
|
@@ -154,9 +156,20 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
handleInfo (remoteOpc) {
|
|
handleInfo (remoteOpc) {
|
|
|
|
+ if (remoteOpc.isActive) return
|
|
const model = this.$refs.baseChartInfo
|
|
const model = this.$refs.baseChartInfo
|
|
model.base(remoteOpc)
|
|
model.base(remoteOpc)
|
|
},
|
|
},
|
|
|
|
+ handleAdd () {
|
|
|
|
+ const model = this.$refs.baseForm
|
|
|
|
+ model.base({
|
|
|
|
+ line: this.positionId
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ handleEdit (val) {
|
|
|
|
+ const model = this.$refs.baseForm
|
|
|
|
+ model.base(val)
|
|
|
|
+ },
|
|
handleOk () {
|
|
handleOk () {
|
|
|
|
|
|
}
|
|
}
|