Explorar el Código

1、修改页面保存关闭提示的问题

周兴 hace 2 años
padre
commit
94faebcbf6
Se han modificado 2 ficheros con 10 adiciones y 10 borrados
  1. 9 9
      src/mixins/form.js
  2. 1 1
      src/view/process/process-flow/process-setting.vue

+ 9 - 9
src/mixins/form.js

@@ -42,7 +42,7 @@ export const formMixin = {
       editKeys: [], // 批量编辑信息
       editIndex: 1, // 批量编辑的序号,默认是第一个
       resizeTableFlag: false,//是否重新计算table的高度
-      morePanelFlag:false,// 多个panel需要平分
+      morePanelFlag: false,// 多个panel需要平分
     }
   },
   watch: {
@@ -236,9 +236,9 @@ export const formMixin = {
      * @author : 周兴
      * @date   : 2022/6/21 19:18
      */
-    close(nextRoute) {
+    close( questionFlag = true,nextRoute = null) {
       // 判断页面是否需要关闭提示
-      if (this.$route.meta && this.$route.meta.closeQuestion) {
+      if (questionFlag && this.$route.meta && this.$route.meta.closeQuestion) {
         this.$IBMessage({
             content: this.$t('Q_002', {'param': this.$v('close')}),
             title: this.$t('systemQuestion')
@@ -248,10 +248,10 @@ export const formMixin = {
               // 执行关闭
               this._close(nextRoute);
             },
-            cancel:()=>{
+            cancel: () => {
             }
           })
-      }else{
+      } else {
         // 执行关闭
         this._close(nextRoute);
       }
@@ -261,7 +261,7 @@ export const formMixin = {
      * @author : 周兴
      * @date   : 2023/7/14 17:33
      */
-    _close(nextRoute){
+    _close(nextRoute) {
       this.editKeys = [];
       this.formData = {};
       this.closeTag(this.$route);
@@ -411,15 +411,15 @@ export const formMixin = {
           let panels = 0;
           if (this.$refs.collapse && this.$refs.collapse.$children) {
             let childrens = this.$refs.collapse.$children;
-            if(!this.averageHeightFlag){
+            if (!this.averageHeightFlag) {
               // 不需要最後一個
               for (let i = 0; i < childrens.length - 1; i++) {
                 panels += childrens[i].$el.clientHeight;
               }
-            }else{
+            } else {
               // 是否要平均分
               for (let i = 0; i < childrens.length; i++) {
-                if(!childrens[i].averageHeightFlag){
+                if (!childrens[i].averageHeightFlag) {
                   panels += childrens[i].$el.clientHeight;
                 }
               }

+ 1 - 1
src/view/process/process-flow/process-setting.vue

@@ -370,7 +370,7 @@ export default {
           //触发首页查询
           queryUtil.$emit('process-setting-ok', { row: this.formData })
           // 编辑关闭窗体
-          this.close()
+          this.close(false);
         } else {
           // 如果不成功就提示错误信息
           this.$Message.warning(res.message)