标签维护 编辑回显

This commit is contained in:
yuekuo
2023-04-20 15:49:33 +08:00
parent 4f02e9d1c8
commit 02da02008b
2 changed files with 8 additions and 5 deletions
+3 -3
View File
@@ -42,11 +42,11 @@ export default {
}) })
}, },
// 标签列表 // 标签列表
labelNodeList (data) { labelNodeList (id) {
return request({ return request({
url: `api/tree-label/labelList/${data.id}`, url: `api/tree-label/labelList/${id}`,
method: 'GET', method: 'GET',
params: data params: id
}) })
}, },
labelUpdate(data){ labelUpdate(data){
@@ -74,10 +74,11 @@ export default {
this.$api.report.labelList().then(res => { this.$api.report.labelList().then(res => {
console.log('666',res); console.log('666',res);
this.cascaderOptions=res.data this.cascaderOptions=res.data
})
if (node && data) { if (node && data) {
this.$api.report.labelNodeList(data).then(res=>{ let id =data.id
this.$api.report.labelNodeList(id).then(res=>{
this.form.nodeLabel=res.data this.form.nodeLabel=res.data
this.$forceUpdate()
}) })
this.form.label = data.label this.form.label = data.label
this.form.orderNum = data.orderNum this.form.orderNum = data.orderNum
@@ -90,6 +91,8 @@ export default {
this.form = {} this.form = {}
this.$forceUpdate() this.$forceUpdate()
} }
})
}, },
cancel() { cancel() {
this.dialogVisible = false this.dialogVisible = false