Просмотр исходного кода

智能辩证数据回显问题

cc12458 8 месяцев назад
Родитель
Сommit
90c30db951
2 измененных файлов с 20 добавлено и 10 удалено
  1. 14 0
      jsconfig.json
  2. 6 10
      src/views/diagnosis/DialecticalQ.vue

+ 14 - 0
jsconfig.json

@@ -0,0 +1,14 @@
+{
+  "compilerOptions": {
+    "target": "ES6",
+    "module": "commonjs",
+    "allowSyntheticDefaultImports": true,
+    "baseUrl": "./",
+    "paths": {
+      "@/*": ["src/*"]
+    }
+  },
+  "exclude": [
+    "node_modules"
+  ]
+}

+ 6 - 10
src/views/diagnosis/DialecticalQ.vue

@@ -266,16 +266,8 @@ export default {
   },
   created() {
     this.pageType = this.$route.query.type;
-    this.getDialecticalq();
-    if (this.$route.query.type == 2) {
-      setTimeout(() => {
-        this._znQusetionShow();
-      }, 500);
-    }
-
-    if (this.getPatiensInfo.pid) {
-      this.getPatiensBasisM();
-    }
+    this.loaded();
+    if (this.getPatiensInfo.pid) this.getPatiensBasisM();
   },
   mounted() {
     this.isShrink = window.sessionStorage.getItem('dia_isShrink') == 1
@@ -298,6 +290,10 @@ export default {
     }
   },
   methods: {
+    async loaded() {
+      await this.getDialecticalq();
+      if (+this.pageType === 2) await this._znQusetionShow();
+    },
     // 设置收缩模式
     setShrink() {
       this.isShrink = !this.isShrink