From ddd17a7643ca777f70389ae9eacb75b8dba6beab Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期一, 19 六月 2023 18:07:03 +0800 Subject: [PATCH] 联调物品主数据剩余功能,处理相似项查询 --- Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue | 36 ++++++++++++------------------------ 1 files changed, 12 insertions(+), 24 deletions(-) diff --git a/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue b/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue index d5f82cb..dcbb537 100644 --- a/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue +++ b/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue @@ -1,5 +1,5 @@ <template> - <avue-input-tree ref="referTree" :props="props" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :checked="checked" :leaf-only="referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="title" :dic="treeData"></avue-input-tree> + <avue-input-tree ref="referTree" :props="props" :disabled="disabled" :lazy="lazy" :tree-load="treeLoad" :node-click="nodeClick" :checked="checked" :leaf-only="referConfig.onlyLeaf" :multiple="isMuti" v-model="value" :placeholder="title" :dic="treeData"></avue-input-tree> </template> <script> @@ -8,7 +8,7 @@ export default { name: "vciWebReferTree", - props:["referConfig","value","text","title"], + props:["referConfig","value","text","title","disabled"], data() { return { options: this.referConfig.options, @@ -119,6 +119,7 @@ queryParams['replaceMap["' + key + '"]'] = this.options.replaceParams[key];//鏂扮殑鏂瑰紡 } } + queryParams['parentValue']='\\IN(SELECT oid from PL_CODE_CLASSIFY where id =\'hesuanfenlei\')' this.params=queryParams; }, @@ -150,23 +151,13 @@ }, nodeClick(data, node, nodeComp){ if(!this.isMuti) { - //涓嶈鐢╳atch鐩戝惉value鍊硷紝浼氭壘涓嶅埌text - this.value = data[this.config.valueField]; - this.text = data[this.config.textField]; - this.currentNode = data; - this.$emit("setValue", { - field: this.referConfig.field, - showField: this.referConfig.showField, - value: this.value, - text: this.text, - rawData: [this.currentNode] - }); + this.setValue({checkedNodes:[data]}) } }, - checked:(checkedNode, checkedData)=> { - debugger; - /* - * this鐢ㄦ椂濮嬬粓瑕佹姤閿欙紝鍙兘鍏堟敞閲� + checked(checkedNode, checkedData) { + this.setValue(checkedData) + }, + setValue:function (checkedData){ var value = []; var text = []; const textSep =this.config.textSep; @@ -185,21 +176,18 @@ text.push(tempRaw.join(textSep)); } this.value = value.join(','); - this.text = text.join(',')*/ - - this.value=checkedData.checkedKeys; + this.text = text.join(',') this.$emit("setValue", { field: this.referConfig.field, showField: this.referConfig.showField, value: this.value, - text: this.text, - isTreeMuti:true, + text: this.text || '', + isTreeMuti:this.isMuti, rawData: checkedData.checkedNodes }); } }, - watch:{ - } + watch:{} } </script> -- Gitblit v1.9.3