回显修改

This commit is contained in:
yuekuo
2023-04-19 16:32:47 +08:00
parent 0aef75c962
commit 974de57eed
2 changed files with 9 additions and 3 deletions
+5
View File
@@ -457,6 +457,11 @@ export default {
this.$refs.tree.filter(val); this.$refs.tree.filter(val);
} }
}, },
mounted () {
this.$bus.$on('updateList',()=>{
this.getTreeLabel()
})
},
methods: { methods: {
init() { init() {
this.getTreeLabel() this.getTreeLabel()
@@ -78,10 +78,11 @@ export default {
if (node && data) { if (node && data) {
this.showAddOrUpdateLabel = true this.showAddOrUpdateLabel = true
this.form.nodeLabel = node.parent.data.label this.form.nodeLabel = node.parent.data.label
this.form.name = data.label this.form.label = data.label
this.form.orderNum = data.orderNum
this.form.remark = data.remark
this.form={...this.form} this.form={...this.form}
this.$refs.form.clearValidate('name') this.$refs.form.clearValidate('name')
console.log('hhh',node,data);
this.$forceUpdate() this.$forceUpdate()
} else { } else {
this.form = {} this.form = {}
@@ -99,7 +100,7 @@ export default {
this.$api.report.labelAdd(this.form).then(res => { this.$api.report.labelAdd(this.form).then(res => {
}) })
this.dialogVisible = false this.dialogVisible = false
this.$bus.$emit('updataList')
} }
}) })
} }