Skip to content

Commit

Permalink
fix(equipmentCloud): 组态
Browse files Browse the repository at this point in the history
修复组态界面物模型回显问题
  • Loading branch information
h7ml committed Jul 1, 2022
1 parent e693b48 commit f33f500
Show file tree
Hide file tree
Showing 4 changed files with 143 additions and 119 deletions.
43 changes: 35 additions & 8 deletions src/views/CloudFunction/topo/components/Thing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

<script>
import wmxdetail from '@/views/DeviceCloud/manage/component/wmxdetail'
import { postThing, putProduct, putThing } from '@/api/Product'
import { postThing, putThing } from '@/api/Product'
import { edit_konva_thing, get_konva_thing } from '@/api/Topo'
import { mapGetters, mapMutations } from 'vuex'
import { putView, getView } from '@/api/View'
Expand Down Expand Up @@ -354,6 +354,8 @@
ico: konvathing.ico,
isread: konvathing.accessMode,
isshow: konvathing.isshow,
isstorage: konvathing.isstorage,
isaccumulate: konvathing.isaccumulate,
identifier: konvathing.identifier,
editdatatype: true,
}
Expand Down Expand Up @@ -398,6 +400,8 @@
ico: konvathing.ico,
isread: konvathing.accessMode,
isshow: konvathing.isshow,
isstorage: konvathing.isstorage,
isaccumulate: konvathing.isaccumulate,
identifier: konvathing.identifier,
collection:
konvathing.dataForm == undefined
Expand Down Expand Up @@ -448,6 +452,8 @@
ico: konvathing.ico,
isread: konvathing.accessMode,
isshow: konvathing.isshow,
isstorage: konvathing.isstorage,
isaccumulate: konvathing.isaccumulate,
identifier: konvathing.identifier,
collection:
konvathing.dataForm == undefined
Expand Down Expand Up @@ -505,6 +511,8 @@
ico: konvathing.ico,
isread: konvathing.accessMode,
isshow: konvathing.isshow,
isstorage: konvathing.isstorage,
isaccumulate: konvathing.isaccumulate,
identifier: konvathing.identifier,
collection:
konvathing.dataForm == undefined
Expand Down Expand Up @@ -554,6 +562,8 @@
ico: konvathing.ico,
isread: konvathing.accessMode,
isshow: konvathing.isshow,
isstorage: konvathing.isstorage,
isaccumulate: konvathing.isaccumulate,
collection:
konvathing.dataForm == undefined
? ''
Expand Down Expand Up @@ -612,6 +622,8 @@
ico: konvathing.ico,
isread: konvathing.accessMode,
isshow: konvathing.isshow,
isstorage: konvathing.isstorage,
isaccumulate: konvathing.isaccumulate,
identifier: konvathing.identifier,
strategy:
konvathing.dataForm == undefined
Expand Down Expand Up @@ -664,6 +676,8 @@
ico: konvathing.ico,
isread: konvathing.accessMode,
isshow: konvathing.isshow,
isaccumulate: konvathing.isaccumulate,
isstorage: konvathing.isstorage,
identifier: konvathing.identifier,
editdatatype: true,
}
Expand Down Expand Up @@ -713,6 +727,8 @@
ico: konvathing.ico,
isread: konvathing.accessMode,
isshow: konvathing.isshow,
isaccumulate: konvathing.isaccumulate,
isstorage: konvathing.isstorage,
identifier: konvathing.identifier,
editdatatype: true,
}
Expand All @@ -721,7 +737,8 @@
obj.protocol = konvathing.dataForm.protocol
this.setSizeForm(obj)
this.$nextTick(async () => {
this.$refs['sizeForm'].queryResource()
await this.$refs['sizeForm'].queryResource()
await this.$refs['sizeForm'].queryProtocol()
// 保证子组件已经挂载完成)
// if (this.$refs['sizeForm'])
this.$refs['sizeForm'].resource.value =
Expand All @@ -736,24 +753,32 @@
this.$nextTick(() => {
this.$refs['sizeForm'].resource.data.forEach(
(resource, index) => {
console.info(resource, '物模型回显事件')
// resource[index].arr = []
// resource[index].obj = {}
if (
this.$refs['sizeForm'].resource.value === resource.cType
) {
console.info(resource, 'success cType')
console.info(resource, '物模型回显事件')
resource.arr.forEach((i) => {
if (i.allowCreate) {
this.$refs['sizeForm'].dynamicTable(
i,
'回显',
konvathing.dataSource[i.showname]
)
}
})
console.info(konvathing.dataSource, 'rowData.dataSource')
this.$refs['sizeForm'].resource.addchannel =
konvathing.dataSource
for (var o in konvathing.dataSource) {
for (var j in resource.obj) {
if (o === j)
resource.obj[o] = konvathing.dataSource[j]
if (o === j) resource.obj[o] = rowData.dataSource[j]
}
}
console.info(resource.obj, 'set resource.obj')
this.$refs['sizeForm'].resource.addchannel = resource.obj
}
this.$refs['sizeForm'].resource.changeData =
konvathing.dataSource
this.$refs['sizeForm'].resource.changeData =
konvathing.dataSource
if (resource.cType == konvathing.dataForm.protocol) {
Expand Down Expand Up @@ -800,6 +825,8 @@
falsevalue: 0,
isread: 'r',
isshow: false,
isstorage: true,
isaccumulate: false,
unit: '',
string: '',
date: 'String类型的UTC时间戳 (毫秒)',
Expand Down
5 changes: 4 additions & 1 deletion src/views/DeviceCloud/manage/component/wmxdetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,10 @@
console.log(index, row)
},
dynamicTable(data, type, _table) {
console.log(type)
console.log(
type,
'dynamicTabledynamicTabledynamicTabledynamicTabledynamicTabledynamicTabledynamicTabledynamicTabledynamicTabledynamicTable'
)
this.tableName = data.showname
var dybaneucForms = []
this.colCum = { label: [], prop: [] }
Expand Down
4 changes: 1 addition & 3 deletions src/views/DeviceCloud/manage/home_index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -591,9 +591,7 @@
{{ $translateTitle('product.details') }}
</el-button>
<a-dropdown style="margin-left: 10px">
<a class="el-icon-more" @click.prevent>
<DownOutlined />
</a>
<a class="el-icon-more" @click.prevent></a>
<template #overlay>
<a-menu>
<a-menu-item>
Expand Down
Loading

0 comments on commit f33f500

Please sign in to comment.