1178232204@qq.com 3 роки тому
батько
коміт
7f8ee4c0fc
2 змінених файлів з 18 додано та 10 видалено
  1. 17 9
      src/components/PathInfo.vue
  2. 1 1
      src/components/Preview.vue

+ 17 - 9
src/components/PathInfo.vue

@@ -108,9 +108,10 @@ export default {
       time: "",
       params: {},
       showToast: false,
-      message: "您已完成一次预问诊,是否重新录入?",
+      message: "",
       showStart: false,
       allMoudles: {},
+      scaleCount: 0,
     };
   },
   computed: {
@@ -178,6 +179,7 @@ export default {
       api.getPathInfo(params).then((res) => {
         const result = res.data;
         if (result.code == 0) {
+          console.log(result);
           this.pathInfo = result.data;
           this.$store.commit("savePathInfo", result.data);
           this.getAll(); //获取模板
@@ -233,7 +235,7 @@ export default {
         }
       });
     },
-    recordCheck() {
+    recordCheck(i) {
       const param = {
         doctorId: this.pathInfo.doctorId,
         hospitalDeptId: this.pathInfo.hospitalDeptId,
@@ -245,11 +247,18 @@ export default {
         const result = res.data;
         if (result.code == 0) {
           let data = result.data;
-          if (data.detailCount >0 || data.physicalCount >0 || data.scaleCount >0) {
+          if ((data.detailCount > 0 && data.physicalCount > 0 && i== 1) || (data.scaleCount > 0 && i== 2)) {
             //有预问诊信息
             this.showToast = true;
           } else {
-            this.goNext();
+            if (i == 1) {
+              this.goNext();
+            } else {
+              this.$router.push({
+                path: "/chooseScale",
+                query: JSON.parse(localStorage.getItem("loginParam")),
+              });
+            }
           }
         }
       });
@@ -262,10 +271,8 @@ export default {
       }
     },
     goScale() {
-      this.$router.push({
-        path: "/chooseScale",
-        query: JSON.parse(localStorage.getItem("loginParam")),
-      });
+      this.message = "您已完成一次评估,是否重新录入?";
+      this.recordCheck(2);
     },
     getAll() {
       const param = {
@@ -297,7 +304,8 @@ export default {
         this.defaultWaring("网络异常请稍后重试");
         return;
       }
-      this.recordCheck(); //校验是否填过
+      this.message = "您已完成一次预问诊,是否重新录入?";
+      this.recordCheck(1); //校验是否填过
     },
     defaultWaring(msg) {
       this.submit = true;

+ 1 - 1
src/components/Preview.vue

@@ -411,7 +411,7 @@ export default {
         sonHospitalCode: pathInfo.sonHospitalCode,
         sonHospitalId: pathInfo.sonHospitalId,
         sonHospitalName: pathInfo.sonHospitalName,
-        scaleList: scaleInfo,
+        scaleList: scaleInfo || [],
         // "type": 0//病历分类(1:门诊,2:住院)
       };
       // console.log(params)