wangting
2024-05-06 506b5b59e3899d8dd40a61cc8b9a575bbde3caaa
Source/ProjectWeb/src/components/PLT-basic-component/basicForm.vue
@@ -70,7 +70,11 @@
      //表单是否可编辑
      type:Boolean,
      default:true
    }
    },
    initValue:{
      type: Object,
      default: () => {},
    },
  },
  data() {
    return {
@@ -103,10 +107,13 @@
  watch: {
    formItems: {
      handler(val) {
        if(val[0] &&val[0].column && val[0].column.isArray()){
        if (val[0] && val[0].column && val[0].column.isArray()) {
          this.getInitGroup(val);
        }else{
        } else {
          this.getInit(val);
        }
        if (this.initValue) {
          Object.assign(this.form, this.initValue);
        }
      },
      immediate: true,
@@ -154,7 +161,6 @@
        code = this.initItem(code);
        column.push(code);
        this.allColumn.push(code);
        console.log('allColumn',this.allColumn)
      }
      this.option.column = column;
    },
@@ -220,9 +226,9 @@
        if(col.data && col.data.length>0){
          col.dicData = col.data.map((d) => {
            return {
              label: d.value,
              key: d.key,
              value: d.key,
              label: d.key,
              key: d.value,
              value: d.value,
              attributes:d.attributes
            };
          });