From da6cc144cc4d60805e4693e4adc5ebdf78b5b37d Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期一, 18 九月 2023 16:44:50 +0800 Subject: [PATCH] 集成系统-查询字段修改 --- Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue | 32 +++++++++++++++++++++++++++++--- 1 files changed, 29 insertions(+), 3 deletions(-) diff --git a/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue b/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue index 3000eba..8247fdc 100644 --- a/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue +++ b/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue @@ -88,6 +88,12 @@ queryParams[key] = this.options.rootParams[key]; } } + if(this.options.sortField){ + queryParams['sort'] = this.options.sortField;//瀛楁 + } + if(this.options.sortType){ + queryParams['order'] = this.options.sortType;//鏂规硶 + } if (this.options.conditionParams) { //璇存槑鏄墿灞曞睘鎬� for (var key in this.options.conditionParams) { @@ -123,10 +129,23 @@ this.params=queryParams; }, - getTree(){ - getTree(this.params,this.treeUrl).then(res => { - this.treeData=res.data + getTree() { + getTree(this.params, this.treeUrl).then(res => { + res.data.map(item => { + if (!item.attribute) { + item.attribute = { + data: {} + } + } else { + item.attribute.data = item.attribute.data || {} + } + return { + ...item, + leaf: !item.hasChildren + } }) + this.treeData = res.data + }) }, treeLoad: function (treeNode, resolve) { const parentOid = (treeNode.level === 0) ? 0 : treeNode.data.oid; @@ -142,6 +161,13 @@ } getLazyTree(this.params,this.treeUrl).then(res => { resolve(res.data.data.map(item => { + if(!item.attribute){ + item.attribute={ + data:{} + } + }else{ + item.attribute.data=item.attribute.data || {} + } return { ...item, leaf: !item.hasChildren -- Gitblit v1.9.3