Przeglądaj źródła

Merge remote-tracking branch 'origin/syf-scale1220' into syf-scale1220

zhouna 3 lat temu
rodzic
commit
65b77a8376
3 zmienionych plików z 14 dodań i 11 usunięć
  1. 12 9
      src/components/Preview.vue
  2. 1 1
      src/router/index.js
  3. 1 1
      src/store.js

+ 12 - 9
src/components/Preview.vue

@@ -67,11 +67,11 @@
               <p>
                 <span>{{ getDetailText(diagnose.text, false).view }}</span>
               </p>
-              <p>
+              <div v-if="scaleInfo">
                 <p>{{ scaleInfo[0].scaleName }}</p>
                 <p>得分:{{ scaleInfo[0].score }}</p>
                 <p>结果为{{ scaleInfo[0].result }}</p>
-              </p>
+              </div>
             </li>
             <li v-if="tabType[moduleCP['other']] == 1">
               <h4><i></i> 其他史:</h4>
@@ -289,13 +289,16 @@ export default {
       if (flg == 1) {
         // for(let k in textArr){
         let item = textArr[0];
-        if (item.special) {
-          msg += item.name + item.special;
-          msgP += item.name + item.specialP;
-        } else {
-          msg += item.name;
-          msgP += item.name;
+        if (item) {
+          if (item.special) {
+            msg += item.name + item.special;
+            msgP += item.name + item.specialP;
+          } else {
+            msg += item.name;
+            msgP += item.name;
+          }
         }
+
         // }
       } else {
         for (let k in textArr) {
@@ -322,7 +325,7 @@ export default {
     },
     formatSymText() {
       console.log(this.symptom);
-      if (this.symptom.choose.lengtn>0 && his.symptom.text.length>0) {
+      if (this.symptom.choose.lengtn > 0 && his.symptom.text.length > 0) {
         const symChoose = this.symptom.choose;
         const symText = this.symptom.text;
         const bans = symText[symText.length - 1];

+ 1 - 1
src/router/index.js

@@ -17,7 +17,7 @@ Vue.use(Router);
 const router = new Router({
   routes:[
     {
-      path:'/login',
+      path:'/',
       name:'Login',
       meta:{
         title:'智能预问诊'

+ 1 - 1
src/store.js

@@ -7,7 +7,7 @@ const store = new Vuex.Store({
   state:{
     searchShow:false,
     pathInfo:{}, //患者信息-后续提交要用
-    scaleInfo:{},//量表信息
+    scaleInfo:null,//量表信息
     sysConfig:[], //系统配置项
     allMoudles:[], //模板
     extPushSymptom:[],      //后台维护的伴随症状