From c1c8ac27338c1e883a3a9260185df58e76a3d7a9 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期二, 13 六月 2023 11:18:28 +0800 Subject: [PATCH] 修改参照组件 --- Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue | 1 + Source/UBCS-WEB/src/components/refer/vciWebRefer.vue | 3 --- Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue | 6 ------ Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue | 31 +++++++++---------------------- 4 files changed, 10 insertions(+), 31 deletions(-) diff --git a/Source/UBCS-WEB/src/components/refer/vciWebRefer.vue b/Source/UBCS-WEB/src/components/refer/vciWebRefer.vue index a19ce27..5596490 100644 --- a/Source/UBCS-WEB/src/components/refer/vciWebRefer.vue +++ b/Source/UBCS-WEB/src/components/refer/vciWebRefer.vue @@ -38,9 +38,6 @@ deep: true, immediate: true, handler(newV) { - if(newV.isTreeMuti){ - //鏍戝弬鐓у閫夛紝text娌℃湁鍊硷紝鍦ㄨ繖閲屽鐞唗ext鐨勫�� - } this.$emit("setReferValue", newV); }, } diff --git a/Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue b/Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue index 594e1ac..8b3ec00 100644 --- a/Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue +++ b/Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue @@ -60,12 +60,6 @@ }, data:this.referConfig.options.data || [], selectionList: [], - objTree: {//鐢ㄤ簬琛ㄦ牸鏍戯紝鐩墠杩樻病鍔犱笂浣跨敤 - keyId: 'oid',//鏍戝舰id瀛楁鍚嶇О - keyPid: 'parentSaleProduct',//鏍戝舰鐖秈d瀛楁鍚嶇О - title: 'id',//浠ユ爲褰㈠紡鏄剧ず鐨勫瓧娈� - defaultShow: false//榛樿鎶樺彔 - }, option: { addBtn: false, height: this.referConfig.options.height ? this.referConfig.options.height : 475, diff --git a/Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue b/Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue index 28ff4e5..20bcad7 100644 --- a/Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue +++ b/Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue @@ -241,6 +241,7 @@ ...item, label: item.title, prop: item.field, + formatter:item.template, search: true } } diff --git a/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue b/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue index d5f82cb..118ea81 100644 --- a/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue +++ b/Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue @@ -150,23 +150,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 +175,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