From 506b5b59e3899d8dd40a61cc8b9a575bbde3caaa Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期一, 06 五月 2024 18:24:33 +0800
Subject: [PATCH] 添加action

---
 Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
index 15fd7f1..3e6a6b5 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
@@ -7,7 +7,9 @@
                 :formItems="this.componentVO.formDefineVO && this.componentVO.formDefineVO.items"
                 :disabled="!inDialog"
                 :isEdit="canEdit"
-                :formData="form">
+                :formData="form"
+                :initValue="paramVOS.initvalue"
+                @getFormData="getFormData">
     </basic-form>
   </div>
 </template>
@@ -84,8 +86,14 @@
           this.$emit("setDataStore", {
             area: this.areasName,
             type:this.componentVO.uiComponentType,
-            btmType:this.componentVO.treeDefineVO.btmType,
+            btmType:this.currentDefineVO.btmType,
             dataStore:[newval]
+          });
+          this.$emit("setData", {
+            area: this.areasName,
+            type:this.componentVO.uiComponentType,
+            btmType:this.currentDefineVO.btmType,
+            data:newval
           });
         }
       }
@@ -144,10 +152,11 @@
       const sourceDataMapList = this.sourceDataMapParams;
 
       this.params = Object.assign({},formParams, sourceDataMapList);
-      console.log(this.params)
     },
     onLoad:function () {
-      debugger;
+      if (this.paramVOS.initvalue) {
+        this.form=this.paramVOS.initvalue;
+      }
       if (Object.keys(this.sourceData).length>0 && this.isShow) {
         this.loading = true;
         dataForm(this.params).then(res => {
@@ -162,6 +171,9 @@
     handleRefresh() {
       this.form={}
       this.onLoad();
+    },
+    getFormData(form) {
+      this.form = form;
     }
   }
 }

--
Gitblit v1.9.3