lex 2 years ago
parent
commit
3b6b24744d

+ 1 - 1
src/components/VueFormMaking/components/GenerateFormItem.vue

@@ -648,7 +648,7 @@ export default {
     this.handleDisplayVerifiy();
   },
   mounted() {
-    console.log(this.widget, "12121", this.dataModel);
+    // console.log(this.widget, "12121", this.dataModel);
     if (
       this.preview &&
       this.widget.type == "select" &&

+ 4 - 4
src/settings.js

@@ -1,6 +1,6 @@
 module.exports = {
-  title: 'OA 管理平台',
-  logo: 'https://www.fdevops.com/wp-content/uploads/2020/08/1597815294-ferry_logo_white.png',
+  title: "OA 管理平台",
+  logo: "https://news-info.ks3-cn-beijing.ksyuncs.com/03/1679367326340.png",
   isLdap: false,
 
   /**
@@ -33,5 +33,5 @@ module.exports = {
    * The default is only used in the production env
    * If you want to also use it in dev, you can pass ['production', 'development']
    */
-  errorLog: 'production'
-}
+  errorLog: "production",
+};

+ 25 - 4
src/views/process/list/create.vue

@@ -158,6 +158,7 @@ export default {
           });
         },
       },
+      documentState: 0, // 草稿状态
     };
   },
   async mounted() {
@@ -179,7 +180,6 @@ export default {
     },
     async getAllOrgan() {
       // 获取分部
-      console.log(this.tenantId, "tenantId");
       if (this.userType.indexOf("SYSTEM") != -1) {
         await queryAllOrgan({ tenantId: this.tenantId }).then((res) => {
           if (res.code == 200) {
@@ -229,10 +229,10 @@ export default {
         userId: this.userId,
       }).then((response) => {
         let tempData = response.data.tpls;
-        console.log(response);
+        // console.log(response);
         // 获取对应模板中,下拉框的key, value
         let selectList = this.getSelectValueObject(tempData);
-        console.log(selectList);
+        // console.log(selectList);
 
         // 获取对应模板中,需要隐藏的字段
         let hiddenFormList = this.getSelectValueObject(
@@ -498,7 +498,7 @@ export default {
               this.ruleForm.tpls.form_data = values;
               const formData = values[0];
               const tplInfo = this.processStructureValue.tpls[0]; // 默认只用第一个模板
-              console.log(this.ruleForm.tpls.form_data);
+              // console.log(this.ruleForm.tpls.form_data);
               // 校验数据
               const res = await checkCourseReturnFee({
                 tplInfoId: tplInfo.id,
@@ -509,6 +509,7 @@ export default {
                   .then((response) => {
                     if (response.code === 200) {
                       this.$message.success("工单申请成功");
+                      this.documentState = 1;
                       this.$router.push({ path: "/process/my-create" });
                     }
                   })
@@ -526,6 +527,26 @@ export default {
         }
       });
     },
+    compareData() {},
+  },
+  beforeRouteLeave(to, from, next) {
+    if (this.documentState == 0) {
+      setTimeout(() => {
+        // 做是否离开判断?
+        // 还是做是否保存判断?
+        this.$confirm("您的申请尚未提交,是否确认返回?", "提示", {
+          confirmButtonText: "确认",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            next();
+          })
+          .catch(() => {});
+      }, 200);
+    } else {
+      next();
+    }
   },
 };
 </script>