Pārlūkot izejas kodu

fix:1139 表单调用对话框后关闭表单,原列表模板按钮失效bug调整

liujiayin 2 gadi atpakaļ
vecāks
revīzija
14d7263c13

+ 5 - 2
src/business/platform/bpmn/form/dialog.vue

@@ -64,7 +64,10 @@ export default {
         },
         waiJian: { // 新增参数
             type: String
-        }
+        },
+        previousDataTemplate: {
+          type: Object
+        }
     },
     data () {
         return {
@@ -98,7 +101,7 @@ export default {
         },
         // 关闭当前窗口
         closeDialog () {
-            this.$emit('close', false)
+            this.$emit('close', false , this.previousDataTemplate)
         }
     }
 }

+ 5 - 2
src/business/platform/data/templaterender/form/dialog.vue

@@ -62,7 +62,10 @@ export default {
     },
     defaultData: { // 默认数据
       type: Object
-    }
+    },
+    previousDataTemplate: {
+      type: Object
+    }
   },
   data() {
     return {
@@ -88,7 +91,7 @@ export default {
     },
     // 关闭当前窗口
     closeDialog() {
-      this.$emit('close', false)
+      this.$emit('close', false , this.previousDataTemplate)
     }
   }
 }

+ 11 - 2
src/business/platform/data/templaterender/templates/list.vue

@@ -183,8 +183,9 @@
             :readonly="readonly"
             :template-key="dataTemplate.key"
             :add-data-cont="addDataCont"
+            :previous-data-template="dataTemplate"
             @callback="search"
-            @close="(visible) => (dialogFormVisible = visible)"
+            @close="closeDataTemplateFormrenderDialog"
         />
         <!-- 流程定义选择器 -->
         <bpm-def-dialog
@@ -242,6 +243,7 @@
             :instance-id="instanceId"
             :task-id="taskId"
             :add-data-cont="addDataCont"
+            :previous-data-template="dataTemplate"
             @callback="search"
             @close="loadFlowFData"
         />
@@ -874,9 +876,11 @@ export default {
             this.addDataCont = {}
         },
         /* 流程页面关闭,刷新当前页面*/
-        loadFlowFData () {
+        loadFlowFData (v,temp) {
             this.npmDialogFormVisible = false
             this.addDataCont = {}
+            this.dataTemplate = temp
+            this.initJTemplate()
         },
         /* 扫码操作*/
         scanHandler (val) {
@@ -1912,6 +1916,11 @@ export default {
             this.dataTemplate = previousDataTemplate
             this.templateDialogVisible = visible
             this.initJTemplate()
+        },
+        closeDataTemplateFormrenderDialog(visible,temp){
+            this.dialogFormVisible = visible
+            this.dataTemplate = temp
+            this.initJTemplate()
         }
     }
 }