wangting
2023-06-13 c1c8ac27338c1e883a3a9260185df58e76a3d7a9
修改参照组件
已修改4个文件
41 ■■■■ 文件已修改
Source/UBCS-WEB/src/components/refer/vciWebRefer.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Source/UBCS-WEB/src/components/refer/vciWebRefer.vue
@@ -38,9 +38,6 @@
      deep: true,
      immediate: true,
      handler(newV) {
        if(newV.isTreeMuti){
          //树参照多选,text没有值,在这里处理text的值
        }
        this.$emit("setReferValue", newV);
      },
    }
Source/UBCS-WEB/src/components/refer/vciWebReferDefalut.vue
@@ -60,12 +60,6 @@
      },
      data:this.referConfig.options.data || [],
      selectionList: [],
      objTree: {//用于表格树,目前还没加上使用
        keyId: 'oid',//树形id字段名称
        keyPid: 'parentSaleProduct',//树形父id字段名称
        title: 'id',//以树形式显示的字段
        defaultShow: false//默认折叠
      },
      option: {
        addBtn: false,
        height: this.referConfig.options.height ? this.referConfig.options.height : 475,
Source/UBCS-WEB/src/components/refer/vciWebReferTable.vue
@@ -241,6 +241,7 @@
                ...item,
                label: item.title,
                prop: item.field,
                formatter:item.template,
                search: true
              }
            }
Source/UBCS-WEB/src/components/refer/vciWebReferTree.vue
@@ -150,23 +150,13 @@
    },
    nodeClick(data, node, nodeComp){
      if(!this.isMuti) {
        //不要用watch监听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>