wangting
2024-05-14 948a8b5fba4baf0a19493ae6d7b8a1dee0d4101a
Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
@@ -10,6 +10,7 @@
                :isEdit="canEdit"
                :formData="form"
                :initValue="paramVOS.initvalue"
                :uploadattachment="paramVOS.uploadattachment || false"
                @getFormData="getFormData">
    </basic-form>
  </div>
@@ -160,18 +161,6 @@
        dataForm(this.params, this.paramVOS.getdataurl, this.paramVOS.getdatamethod).then(res => {
          this.form = res.data.obj.data;
          this.loading = false;
          this.$emit("setDataStore", {
            area: this.areasName,
            type: this.componentVO.uiComponentType,
            btmType: this.currentDefineVO.btmType,
            dataStore: [this.form]
          });
          this.$emit("setData", {
            area: this.areasName,
            type: this.componentVO.uiComponentType,
            currentDefineVO: this.currentDefineVO,
            data: this.form
          });
        }).catch(error => {
          this.loading = false;
        });
@@ -183,6 +172,18 @@
    },
    getFormData(form) {
      this.form = form;
      this.$emit("setDataStore", {
        area: this.areasName,
        type: this.componentVO.uiComponentType,
        btmType: this.currentDefineVO.btmType,
        dataStore: [this.form]
      });
      this.$emit("setData", {
        area: this.areasName,
        type: this.componentVO.uiComponentType,
        currentDefineVO: this.currentDefineVO,
        data: this.form
      });
    }
  }
}