diff --git a/src/components/selection/TreeDataSelectModal.vue b/src/components/selection/TreeDataSelectModal.vue index 090fd1b..22e6c42 100644 --- a/src/components/selection/TreeDataSelectModal.vue +++ b/src/components/selection/TreeDataSelectModal.vue @@ -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