|
@@ -246,7 +246,6 @@ export default class spaceIndex extends Vue {
|
|
|
});
|
|
|
});
|
|
|
this.options = data;
|
|
|
- let arr = data.filter((item) => item.children);
|
|
|
});
|
|
|
|
|
|
const pa = {
|
|
@@ -387,14 +386,28 @@ export default class spaceIndex extends Vue {
|
|
|
if (item.outline) {
|
|
|
delete item.outline;
|
|
|
}
|
|
|
- // this.all.forEach(i=> {
|
|
|
- // const category = ['ENUM', 'MENUM', 'BOOLEAN']
|
|
|
- // if (i.category == 'STATIC' && category.includes(i.dataType) && i.dataSource) {
|
|
|
- // if(i.path == item.path) {
|
|
|
- // console.log(item)
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
+ this.all.forEach(i => {
|
|
|
+ const category = ['ENUM', 'MENUM', 'BOOLEAN']
|
|
|
+ if (i.category == 'STATIC' && category.includes(i.dataType) && i.dataSource) {
|
|
|
+ let inx = i.path.substr(i.path.indexOf('.') + 1)
|
|
|
+ for (let l in item) {
|
|
|
+ if (l == inx) {
|
|
|
+ if (i.dataSource) {
|
|
|
+ item[l] = i.dataSource.filter(i => item[l].includes(i.code)).map(item => item.name).join(',')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (i.category == 'STATIC' && i.dataType == 'ATTACHMENT') {
|
|
|
+ let inx = i.path.substr(i.path.indexOf('.') + 1)
|
|
|
+ for (let l in item) {
|
|
|
+ if (l == inx) {
|
|
|
+ item['sign/' + inx] = item[l]
|
|
|
+ item[l] = item[l].length
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
// item = {
|
|
|
// ...item,
|
|
@@ -426,7 +439,7 @@ export default class spaceIndex extends Vue {
|
|
|
}
|
|
|
}
|
|
|
// 图建筑楼层修改
|
|
|
- changeGraphCascader(value) {
|
|
|
+ changeGraphCascader() {
|
|
|
this.toGraph();
|
|
|
}
|
|
|
// 动态信息点
|
|
@@ -510,6 +523,10 @@ export default class spaceIndex extends Vue {
|
|
|
|
|
|
// 添加/编辑 事件处理
|
|
|
handleDataForm() {
|
|
|
+ this.$refs.baseDataForm.submitForm(this.handleDataFormSave)
|
|
|
+ }
|
|
|
+
|
|
|
+ handleDataFormSave() {
|
|
|
let from = tools.formatData(this.$refs.baseDataForm.form)
|
|
|
let param = {
|
|
|
content: [from]
|
|
@@ -539,13 +556,42 @@ export default class spaceIndex extends Vue {
|
|
|
|
|
|
// 编辑当前行
|
|
|
handleCurrentEdit(val) {
|
|
|
- // this.next = false
|
|
|
+ // this.tableData.map(item => {
|
|
|
+ this.all.forEach(i => {
|
|
|
+ const category = ['ENUM', 'MENUM', 'BOOLEAN']
|
|
|
+ if (i.category == 'STATIC' && category.includes(i.dataType) && i.dataSource) {
|
|
|
+ let inx = i.path.substr(i.path.indexOf('.') + 1)
|
|
|
+ // for (let l in item) {
|
|
|
+ // if (l == inx) {
|
|
|
+ // if (i.dataSource) {
|
|
|
+ // item[l] = i.dataSource.filter(i => item[l].includes(i.name)).map(item => item.code).join(',')
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ for (let l in val) {
|
|
|
+ if (l == inx) {
|
|
|
+ if (i.dataSource) {
|
|
|
+ val[l] = i.dataSource.filter(i => val[l].includes(i.name)).map(item => item.code).join(',')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (i.category == 'STATIC' && i.dataType == 'ATTACHMENT') {
|
|
|
+ let inx = i.path.substr(i.path.indexOf('.') + 1)
|
|
|
+ // for (let l in item) {
|
|
|
+ // if (l == inx) {
|
|
|
+ // item[l] = item['sign/' + inx]
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // })
|
|
|
this.currRowContent = val
|
|
|
+ console.log(val)
|
|
|
let pic = this.headersStage.dictStages.data.filter(i => i.dataType == 'ATTACHMENT')
|
|
|
let base = this.headersStage.dictStages.data.filter(i => i.dataType != 'ATTACHMENT')
|
|
|
this.headersStage.dictStages.data = pic.length > 0 ? [...base, ...pic] : [...base]
|
|
|
this.spaceHeaders = this.headersStage
|
|
|
- // this.handleNext()
|
|
|
this.dialogVisible = true
|
|
|
}
|
|
|
|