|
@@ -44,7 +44,7 @@
|
|
|
:showSearch="true"
|
|
|
v-model="positionId"
|
|
|
placeholder="请选择"
|
|
|
- @change="getOpcInfo"
|
|
|
+ @change="handleChange"
|
|
|
>
|
|
|
</a-tree-select>
|
|
|
</div>
|
|
@@ -102,7 +102,10 @@ export default {
|
|
|
},
|
|
|
created () {
|
|
|
this.positionId = this.$route.query.line
|
|
|
- this.setTree()
|
|
|
+ this.getImg()
|
|
|
+ getSbPositionTree({ opcFlag: 1 }).then(res => {
|
|
|
+ this.treeData = res.data
|
|
|
+ })
|
|
|
this.timer = setInterval(() => {
|
|
|
console.log(this.positionId)
|
|
|
this.getOpcInfo()
|
|
@@ -147,13 +150,14 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- setTree (record = {}) {
|
|
|
+ getImg () {
|
|
|
fetchSbPosition({ id: this.positionId }).then(res => {
|
|
|
this.imgUrl = res.data.opcImg
|
|
|
})
|
|
|
- getSbPositionTree({ opcFlag: 1 }).then(res => {
|
|
|
- this.treeData = res.data
|
|
|
- })
|
|
|
+ },
|
|
|
+ handleChange () {
|
|
|
+ this.getOpcInfo()
|
|
|
+ this.getImg()
|
|
|
},
|
|
|
handleInfo (remoteOpc) {
|
|
|
const model = this.$refs.baseChartInfo
|