Merge branch 'hi-ucs-dev' of http://15.2.21.221:3000/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
wuhongjian 2022-06-20 18:04:25 +08:00
commit 0f06cce9a6
1 changed files with 13 additions and 12 deletions

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-05-06 11:17:55 * @Date: 2022-05-06 11:17:55
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-08 17:19:11 * @LastEditTime: 2022-06-20 17:40:52
* @Description: 编目弹窗 * @Description: 编目弹窗
--> -->
<template> <template>
@ -441,17 +441,7 @@ export default {
const newData = [...this.data] const newData = [...this.data]
this.editData = {} this.editData = {}
newData.forEach(val => { newData.forEach(val => {
if (val.key === key) { this.handleChangeFor(val, key)
this.editData = val
} else {
if (val.children) {
val.children.forEach(item => {
if (item.key === key) {
this.editData = item
}
})
}
}
}) })
if (this.editData) { if (this.editData) {
this.editData[column] = value this.editData[column] = value
@ -459,6 +449,17 @@ export default {
} }
console.log(this.data) console.log(this.data)
}, },
handleChangeFor (val, key) {
if (val.key === key) {
this.editData = val
} else {
if (val.children) {
val.children.forEach(item => {
this.handleChangeFor(item, key)
})
}
}
},
edit (key) { edit (key) {
if (this.flag) { if (this.flag) {
const newData = [...this.data] const newData = [...this.data]