|
@@ -85,13 +85,13 @@ export default {
|
|
|
Size: { Height: '32', Width: '32' },
|
|
|
InfoTypeId: [], //铺位可视化typeid
|
|
|
InfoLocal: [], //工程信息化位置与设备分类
|
|
|
- InfoSystem: [] //工程信息化专业/系统
|
|
|
+ InfoSystem: [], //工程信息化专业/系统
|
|
|
},
|
|
|
title: '',
|
|
|
GraphCategoryId: 'DTXT',
|
|
|
modalShow4: false,
|
|
|
treeData: [],
|
|
|
- tableData: []
|
|
|
+ tableData: [],
|
|
|
}
|
|
|
},
|
|
|
components: { addForm, addList },
|
|
@@ -101,17 +101,17 @@ export default {
|
|
|
this.GraphCategoryId = GraphCategoryId
|
|
|
//console.log(title)
|
|
|
let getParams = {
|
|
|
- categoryId: String(this.GraphCategoryId)
|
|
|
+ categoryId: String(this.GraphCategoryId),
|
|
|
}
|
|
|
if (GraphCategoryId) {
|
|
|
- groupByCategory({ getParams }).then(res => {
|
|
|
+ groupByCategory({ getParams }).then((res) => {
|
|
|
this.treeData = []
|
|
|
- this.treeData = res.Data.map(i => this.getTree(i))
|
|
|
+ this.treeData = res.Data.map((i) => this.getTree(i))
|
|
|
})
|
|
|
//获取图例列表
|
|
|
let postParams = this.GraphCategoryId
|
|
|
let data = {}
|
|
|
- queryRelation({ data, postParams }).then(res => {
|
|
|
+ queryRelation({ data, postParams }).then((res) => {
|
|
|
this.tableData = res.data.Content
|
|
|
})
|
|
|
//treeSelect
|
|
@@ -127,7 +127,7 @@ export default {
|
|
|
|
|
|
InfoTypeId: [], //铺位可视化typeid
|
|
|
InfoLocal: [], //工程信息化位置与设备分类
|
|
|
- InfoSystem: [] //工程信息化专业/系统
|
|
|
+ InfoSystem: [], //工程信息化专业/系统
|
|
|
}
|
|
|
} else if (title == '添加图例库') {
|
|
|
this.dialogVisible = true
|
|
@@ -144,7 +144,7 @@ export default {
|
|
|
|
|
|
InfoTypeId: [], //铺位可视化typeid
|
|
|
InfoLocal: [], //工程信息化位置与设备分类
|
|
|
- InfoSystem: [] //工程信息化专业/系统
|
|
|
+ InfoSystem: [], //工程信息化专业/系统
|
|
|
}
|
|
|
} else if (title == '修改图例库') {
|
|
|
this.dialogVisible = true
|
|
@@ -152,7 +152,7 @@ export default {
|
|
|
this.InfosList = []
|
|
|
this.InfoTypeIdList = []
|
|
|
// this.InfosList = [...row.InfoLocal.map(({ id }) => id), ...row.InfoSystem]
|
|
|
- this.InfosList = row.InfoLocal ? [...row.InfoLocal.map(({ id }) => id)] : []
|
|
|
+ this.InfosList = row.InfoLocal ? [...row.InfoLocal.map(({ id, type }) => id + type)] : []
|
|
|
this.InfoTypeIdList = row.InfoTypeId
|
|
|
|
|
|
// 图例库规则中的transform
|
|
@@ -164,7 +164,7 @@ export default {
|
|
|
return {
|
|
|
id: data.Id,
|
|
|
name: data.Name,
|
|
|
- children: data.Children && data.Children.length > 0 ? data.Children.map(i => this.getTree(i)) : []
|
|
|
+ children: data.Children && data.Children.length > 0 ? data.Children.map((i) => this.getTree(i)) : [],
|
|
|
}
|
|
|
},
|
|
|
cancal() {
|
|
@@ -178,7 +178,7 @@ export default {
|
|
|
Size: { Height: '32', Width: '32' },
|
|
|
InfoTypeId: [], //铺位可视化typeid
|
|
|
InfoLocal: [], //工程信息化位置与设备分类
|
|
|
- InfoSystem: [] //工程信息化专业/系统
|
|
|
+ InfoSystem: [], //工程信息化专业/系统
|
|
|
}
|
|
|
this.InfoTypeIdList = []
|
|
|
this.InfosList = []
|
|
@@ -223,26 +223,26 @@ export default {
|
|
|
let tableList = [],
|
|
|
list = [],
|
|
|
totalLst = []
|
|
|
- dataObj.forEach(i => {
|
|
|
+ dataObj.forEach((i) => {
|
|
|
list.push({
|
|
|
Id: i.id,
|
|
|
- name: i.name
|
|
|
+ name: i.name,
|
|
|
})
|
|
|
})
|
|
|
tableList = [...list, ...this.tableData]
|
|
|
tableList.forEach((i, index) => {
|
|
|
totalLst.push({
|
|
|
GraphElementId: i.Id,
|
|
|
- OrderId: index
|
|
|
+ OrderId: index,
|
|
|
})
|
|
|
})
|
|
|
|
|
|
let postParams = {
|
|
|
GraphCategoryId: this.GraphCategoryId[0],
|
|
|
- GraphRelations: totalLst
|
|
|
+ GraphRelations: totalLst,
|
|
|
}
|
|
|
console.log(totalLst, 'list')
|
|
|
- updateRelation({ postParams }).then(res => {
|
|
|
+ updateRelation({ postParams }).then((res) => {
|
|
|
if (res.Result == 'success') {
|
|
|
this.$message.success('添加成功!')
|
|
|
this.$emit('mesg')
|
|
@@ -251,8 +251,8 @@ export default {
|
|
|
},
|
|
|
treeCancel() {
|
|
|
this.modalShow4 = false
|
|
|
- }
|
|
|
- }
|
|
|
+ },
|
|
|
+ },
|
|
|
}
|
|
|
</script>
|
|
|
|