diff --git a/src/renderer/components/myHeaderAll/systemPopup/js/utilTools.js b/src/renderer/components/myHeaderAll/systemPopup/js/utilTools.js index 7703fbb..d0eb3f3 100644 --- a/src/renderer/components/myHeaderAll/systemPopup/js/utilTools.js +++ b/src/renderer/components/myHeaderAll/systemPopup/js/utilTools.js @@ -204,9 +204,16 @@ export default { // } - this.graphTableData = [...data.children]; - this.graphTableSelectData = data.children; - if (data.sonNode.length) { + if (this.selectedGraphLabelType == data.type_id) { + this.graphTableData = []; + this.$nextTick(() => { + this.$refs.myTree && this.$refs.myTree.setCurrentKey(null); + }); + this.selectedGraphLabelType = null + } + else { + this.graphTableData = [...data.children]; + this.graphTableSelectData = data.children; let junbiaos = []; this.selectedGraphLabelType = data.type_id; this.JByuanshishuju.forEach((item) => { @@ -215,6 +222,7 @@ export default { }); this.graphTableData.push(...junbiaos); } + }, tongbu() { tongbus((res) => { @@ -439,7 +447,7 @@ export default { } })*/ }) - .catch(() => {}); + .catch(() => { }); }, //获取军标类型列表 @@ -513,7 +521,7 @@ export default { } }); }, - io(dataArr, value) {}, + io(dataArr, value) { }, editGraphLabelTypes() { console.log(123); @@ -580,10 +588,10 @@ export default { } })*/ }) - .catch(() => {}); + .catch(() => { }); } }, - delGraphLabel(jun_biao_id) { + delGraphLabel(jun_biao_id, p_id) { console.log(this.graphLabelTypeList); let msg = "确定删除?"; this.$confirm(msg, "警告", { @@ -595,13 +603,26 @@ export default { delGraphLabels({ jun_biao_id }, (res) => { //刷新当前页 // this.pageModelList(); - this.getGraphLabelTypeList(); + // this.getGraphLabelTypeList(); this.graphTableData = this.graphTableData.filter( - (item) => item.jun_biao_id !== jun_biao_id + (item) => { + return item.jun_biao_id !== jun_biao_id + } ); + if(p_id) { + setProperty( + this.graphLabelTypeList, + "sonNode", + "type_id", + p_id, + "children", + this.graphTableData, + "assign" + ); + } }); }) - .catch(() => {}); + .catch(() => { }); }, editGraphLabel(row) { // editGraphLabel() @@ -678,7 +699,7 @@ export default { this.getRoleList(); }); }) - .catch(() => {}); + .catch(() => { }); }, handleRoleSizeChange(val) { this.roleListPageSize = val; @@ -752,7 +773,7 @@ export default { this.getUserList(depart_id); }); }) - .catch(() => {}); + .catch(() => { }); }, //获取部门列表 @@ -962,7 +983,7 @@ export default { this.getModelTypeList(); }); }) - .catch(() => {}); + .catch(() => { }); }, preview(row) { this.$changeComponentShow("#scene", true); @@ -1239,8 +1260,8 @@ export default { "type_id", obj.p_id, "children", - [..._that.graphTableSelectData, obj], - "assign" + obj, + "append" ); }); }); @@ -1289,7 +1310,7 @@ export default { });*/ }); }, - coordinateChange() {}, + coordinateChange() { }, sysChange() { this.$store.dispatch("changeSystem", this.systemSetting); @@ -1369,9 +1390,9 @@ export default { console.log("服务接入提交确认"); }, // 海康平台确认 - onSubmitInfo() {}, + onSubmitInfo() { }, //主题信息提交 - onThemeSubmit() {}, + onThemeSubmit() { }, copy(e) { console.log("111111111111"); console.log(copyContent(e.target.textContent)); @@ -1395,7 +1416,7 @@ export default { if (!paths.length) { return; } - importPOI({ path: paths[0] }, (res) => {}); + importPOI({ path: paths[0] }, (res) => { }); }); }, importLuWang() { @@ -1413,7 +1434,7 @@ export default { if (!paths.length) { return; } - importLuWang({ filePath: paths[0] }, (res) => {}); + importLuWang({ filePath: paths[0] }, (res) => { }); }); }, // 工程导入(接口) diff --git a/src/renderer/components/myHeaderAll/systemPopup/systemPopup.vue b/src/renderer/components/myHeaderAll/systemPopup/systemPopup.vue index 5358b53..d432815 100644 --- a/src/renderer/components/myHeaderAll/systemPopup/systemPopup.vue +++ b/src/renderer/components/myHeaderAll/systemPopup/systemPopup.vue @@ -683,7 +683,7 @@ $t("headerTitles.graphLabel.edit") }} - + {{ $t("headerTitles.graphLabel.delete") }}