xiejun
2023-09-25 8470a4ae665d8b7f7621479c09664c7a3ff0f210
Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -26,13 +26,14 @@
      </template>
      <template :slot="item.prop + ''" v-for="item in slotColumnList">
        <vciWebRefer
          :key="item.prop" :data-key="item.prop"
          :key="item.dataKey" :data-key="item.dataKey"
          v-if="item.type == 'refer'"
          :referConfig="item.referConfig || {}"
          :value="form[item.referConfig.field] || item.value"
          :text="form[item.referConfig.showField]"
          :disabled="item.disabled"
          :display="item.display"
          :reloadData="item.referConfig.reloadData || false"
          @setReferValue="setReferValue"
        ></vciWebRefer>
      </template>
@@ -218,6 +219,7 @@
          formItem.fieldMap[formItem.field+'id']='id'
        }
        let columnItem = {
          dataKey:formItem.dataKey || formItem.field,
          label: formItem.text,
          labelslot: true,
          prop: this.$utilFunc.isValuableObj(formItem.referConfig)
@@ -301,6 +303,7 @@
    changeChildItem(items,TreeValue) {
      let column = this.option.column;
      let group = this.option.group;
      let that=this;
      items.forEach((item) => {
        let formItem = this.resetFormConfig(item);
        if (formItem.field == "lcstatus") {
@@ -384,22 +387,22 @@
        };
        if (group.length === 0) {
          this.slotColumnList.forEach((index, colItem) => {
          that.slotColumnList.forEach((colItem,index) => {
            if (colItem.field == columnItem.field) {
              this.slotColumnList[index] = columnItem;
              that.slotColumnList[index] = columnItem;
              column[index] = columnItem;
              return;
            }
          })
        } else {
          this.slotColumnList.forEach((index, colItem) => {
          that.slotColumnList.forEach((colItem,index) => {
            if (colItem.field == columnItem.field) {
              this.slotColumnList[index] = columnItem;
              that.slotColumnList[index] = columnItem;
              return;
            }
          })
          group.forEach((index, groupItem) => {
            groupItem.column.forEach((colIndex, colItem) => {
          group.forEach((groupItem,index) => {
            groupItem.column.forEach((colItem,colIndex) => {
              if (colItem.field == columnItem.field) {
                group[index].column[colIndex] = columnItem;
                return;
@@ -408,8 +411,8 @@
          });
        }
      });
      this.$set(this.option, "column", column);
      this.$set(this.option, "group", group);
      that.$set(that.option, "column", column);
      that.$set(that.option, "group", group);
    },
    // 使用传入的表单数据配置
    resetFormConfig(formItem) {