修复军标管理bug
This commit is contained in:
@ -204,9 +204,16 @@ export default {
|
||||
// }
|
||||
|
||||
|
||||
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;
|
||||
if (data.sonNode.length) {
|
||||
let junbiaos = [];
|
||||
this.selectedGraphLabelType = data.type_id;
|
||||
this.JByuanshishuju.forEach((item) => {
|
||||
@ -215,6 +222,7 @@ export default {
|
||||
});
|
||||
this.graphTableData.push(...junbiaos);
|
||||
}
|
||||
|
||||
},
|
||||
tongbu() {
|
||||
tongbus((res) => {
|
||||
@ -583,7 +591,7 @@ export default {
|
||||
.catch(() => { });
|
||||
}
|
||||
},
|
||||
delGraphLabel(jun_biao_id) {
|
||||
delGraphLabel(jun_biao_id, p_id) {
|
||||
console.log(this.graphLabelTypeList);
|
||||
let msg = "确定删除?";
|
||||
this.$confirm(msg, "警告", {
|
||||
@ -595,10 +603,23 @@ 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(() => { });
|
||||
@ -1239,8 +1260,8 @@ export default {
|
||||
"type_id",
|
||||
obj.p_id,
|
||||
"children",
|
||||
[..._that.graphTableSelectData, obj],
|
||||
"assign"
|
||||
obj,
|
||||
"append"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@ -683,7 +683,7 @@
|
||||
$t("headerTitles.graphLabel.edit")
|
||||
}}
|
||||
</el-button>
|
||||
<el-button @click="delGraphLabel(scope.row.jun_biao_id)" type="danger" size="mini">
|
||||
<el-button @click="delGraphLabel(scope.row.jun_biao_id, scope.row.p_id)" type="danger" size="mini">
|
||||
{{ $t("headerTitles.graphLabel.delete") }}
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user