[update] 树形弹框

This commit is contained in:
lideqin
2024-08-09 19:30:56 +08:00
parent 34c2b419a2
commit d2ae28445b
@@ -146,7 +146,7 @@ export default {
this.replaceFields = { children: 'childPartNameList', title: 'name', key: 'code' }
this.lazyLoadHref = '/laws/standard/partName/getChild'
this.searchFieldName = 'nodeName'
this.lazyLoadPidFieldName = 'dictItemId'
this.lazyLoadPidFieldName = 'parentCode'
} else { // 标签库
this.replaceFields = { children: 'childrenList', title: 'itemText', key: 'itemValue' }
this.lazyLoadHref = '/laws/dictTree/getChild'
@@ -338,7 +338,7 @@ export default {
params[this.searchFieldName] = this.searchValue
}
// 父节点id
params.dictItemId = node.dataRef.id
params[this.lazyLoadPidFieldName] = node.dataRef.id
await getAction(this.lazyLoadHref, params).then(res => {
if (res.success) {
node.dataRef[this.replaceFields.children] = res.result.record || res.result
@@ -387,6 +387,10 @@ export default {
this.topLoading = true
const params = {}
params.dictId = this.dictId
// 查询条件的名称
if (this.searchValue) {
params[this.searchFieldName] = this.searchValue
}
getAction(this.optionsHref, params).then(res => {
if (res.success) {
this.treeData = res.result.records || res.result