物理沙盘
This commit is contained in:
@ -191,15 +191,29 @@ export default {
|
||||
); */
|
||||
},
|
||||
graphLabelClick(data, event) {
|
||||
if (this.selectedGraphLabelType == data.type_id) {
|
||||
this.graphTableData = [];
|
||||
this.$nextTick(() => {
|
||||
this.$refs.myTree && this.$refs.myTree.setCurrentKey(null);
|
||||
});
|
||||
this.selectedGraphLabelType = null;
|
||||
} else {
|
||||
console.log(data)
|
||||
// if (this.selectedGraphLabelType == data.type_id) {
|
||||
// this.graphTableData = [];
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.myTree && this.$refs.myTree.setCurrentKey(null);
|
||||
// });
|
||||
// this.selectedGraphLabelType = null;
|
||||
// } else {
|
||||
// this.selectedGraphLabelType = data.type_id;
|
||||
// this.graphTableData = data.children || [];
|
||||
// }
|
||||
|
||||
|
||||
this.graphTableData = [...data.children];
|
||||
this.graphTableSelectData = data.children;
|
||||
if (data.sonNode.length) {
|
||||
let junbiaos = [];
|
||||
this.selectedGraphLabelType = data.type_id;
|
||||
this.graphTableData = data.children || [];
|
||||
this.JByuanshishuju.forEach((item) => {
|
||||
if (item.p_id == data.type_id && item.children)
|
||||
junbiaos = junbiaos.concat(item.children);
|
||||
});
|
||||
this.graphTableData.push(...junbiaos);
|
||||
}
|
||||
},
|
||||
tongbu() {
|
||||
@ -433,12 +447,15 @@ export default {
|
||||
this.graphLabelDataMaps.clear();
|
||||
this.graphLabelTypeList = [];
|
||||
this.graphTableData = [];
|
||||
this.graphTableSelectData = [];
|
||||
this.JByuanshishuju = [];
|
||||
getGraphLabelType2((res) => {
|
||||
console.log("", res);
|
||||
setTimeout(() => {
|
||||
this.junbiaoLoading = false;
|
||||
}, 1500);
|
||||
if (res.list.length) {
|
||||
this.JByuanshishuju = res.list;
|
||||
console.log("this.graphLabelDataMaps", this.graphLabelDataMaps);
|
||||
res.list.forEach((item) => {
|
||||
item.sonNode = [];
|
||||
@ -1222,7 +1239,7 @@ export default {
|
||||
"type_id",
|
||||
obj.p_id,
|
||||
"children",
|
||||
_that.graphTableData,
|
||||
[..._that.graphTableSelectData, obj],
|
||||
"assign"
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user