Bläddra i källkod

Merge branch 'syf-scale1220' into test

1178232204@qq.com 3 år sedan
förälder
incheckning
b5ec299e6a
3 ändrade filer med 27 tillägg och 12 borttagningar
  1. 14 2
      src/App.vue
  2. 12 9
      src/components/Preview.vue
  3. 1 1
      src/store.js

+ 14 - 2
src/App.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <p class="pc-enter" v-if="!isMobile">请在手机端访问</p>
+    <p class="pc-enter" v-if="!isMobile&&!isScaleShow">请在手机端访问</p>
     <div v-else id="app">
         <router-view/>
         <portal-target name="notification-outlet"></portal-target>
@@ -17,10 +17,22 @@
     data:()=>{
       return{
         isMobile:/(iPhone|iPad|iPod|iOS|Android|SymbianOS|Windows Phone)/i.test(navigator.appVersion),
+        isScaleShow:false,
+      }
+    },
+    watch:{
+      $route(to,from){
+        console.log(to,from)
+        if(to.path!=="/ScaleShow"){
+          this.isScaleShow = false;
+        }
       }
     },
     mounted(){
-      if(!this.isMobile){
+      const isShow = this.$route.path==="/ScaleShow";
+      this.isScaleShow = isShow;
+      //console.log(isScaleShow,this.$route)
+      if(!this.isMobile&&!isShow){
         return;
       }
       (/iphone|ipod|ipad/i.test(navigator.appVersion)) && document.addEventListener('blur', (e) => {

+ 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/store.js

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