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 |   31 +++++++++++++++++++++++++------
 1 files changed, 25 insertions(+), 6 deletions(-)

diff --git a/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue b/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
index 0ae6114..3e6a6b5 100644
--- a/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
+++ b/Source/ProjectWeb/src/components/dynamic-components/dynamic-form.vue
@@ -6,8 +6,10 @@
                 :span="this.componentVO.formDefineVO.columnOneRow?(24/this.componentVO.formDefineVO.columnOneRow) : 12"
                 :formItems="this.componentVO.formDefineVO && this.componentVO.formDefineVO.items"
                 :disabled="!inDialog"
-                :isEdit="inDialog"
-                :formData="form">
+                :isEdit="canEdit"
+                :formData="form"
+                :initValue="paramVOS.initvalue"
+                @getFormData="getFormData">
     </basic-form>
   </div>
 </template>
@@ -33,6 +35,11 @@
     inDialog: {
       type: Boolean,
       default: false
+    },
+    canEdit:{
+      //鍐呭鏄惁鍙紪杈�
+      type:Boolean,
+      default:false
     },
     areasName: {
       type: String,
@@ -79,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
           });
         }
       }
@@ -139,9 +152,11 @@
       const sourceDataMapList = this.sourceDataMapParams;
 
       this.params = Object.assign({},formParams, sourceDataMapList);
-      console.log(this.params)
     },
     onLoad:function () {
+      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 => {
@@ -153,8 +168,12 @@
         });
       }
     },
-    handleRefresh(){
-
+    handleRefresh() {
+      this.form={}
+      this.onLoad();
+    },
+    getFormData(form) {
+      this.form = form;
     }
   }
 }

--
Gitblit v1.9.3