Explorar o código

bug2673,2672,2671

luolei %!s(int64=5) %!d(string=hai) anos
pai
achega
04dd6a7531
Modificáronse 3 ficheiros con 9 adicións e 9 borrados
  1. 0 1
      src/components/Detail.vue
  2. 5 4
      src/components/Preview.vue
  3. 4 4
      src/components/Symptom.vue

+ 0 - 1
src/components/Detail.vue

@@ -355,7 +355,6 @@ import $ from 'jquery';
         }else{
           this.$store.commit('setDatas',{data:Object.assign({},this.checkDatas,{select:1}),pId:this.checkDatas.id,type:this.data.moduleType,ppId:this.data.ppId});
         }
-        
         this.$store.commit('setText',{text:msg,textP:msgP,pId:this.checkDatas.id,type:this.data.moduleType,flag:true,order:this.data.order,arrFlag:true,index:this.data.index,idx:1});
       },
       check(){// 校验是否有已填项

+ 5 - 4
src/components/Preview.vue

@@ -85,7 +85,7 @@
         @showSubmit="showSubmit"
       ></Submit>
       <Loading v-if="loadingShow"></Loading>
-      <div class="personMsgDoc" v-if="showDoc">
+      <div class="personMsgDoc" v-show="showDoc">
         <div class="personMsgDocModal" @click="handleClick(false)"></div>
         <div class="personMsgDocDetail">
           <img class="close" src="../images/small-close.png" alt="" @click="handleClick(false)">
@@ -109,12 +109,12 @@
                     <span :key="index" v-if="index>1">{{value.textP}}{{index == checkText.length-1?'':'、'}}</span>
                   </template>
                 </p>
-                <p><span>{{getDetailText(diagnose.textP,false).view}}</span></p>
+                <p><span>{{getDetailText(diagnose.text,false).view}}</span></p>
               </li>
               <li v-if="showLis[moduleCP['other']]==1">
                 <h4><i></i> 其他史:</h4>
                 <p>
-                  <span>{{getDetailText(others.textP,false).content}}</span>
+                  <span>{{getDetailText(others.text,false).view}}</span>
                 </p>
               </li>
               <li v-if="showLis[moduleCP['suplement']]==1">
@@ -143,7 +143,6 @@ export default {
   props: ['preName','showLis','loadingShow'],
   data() {
     const { pathInfo, originDatas,loadingShow } = this.$store.state;
-
     let symptomDate = this.$store.state.symptom;
     let diagnoseDate = this.$store.state.diagnose;
     let othersDate = this.$store.state.others;
@@ -174,6 +173,7 @@ export default {
       let scroll = setScroll(BScroll,true,'.previewper')
       this.scroll = scroll
     })
+
   },
   methods: {
     getTime() {
@@ -255,6 +255,7 @@ export default {
       }
     },
     getDetailText(textArr,flg){
+      console.log(textArr,flg)
       let msg = "",obg={},msgP = "";
       if(flg == 1){
         for(let k in textArr){

+ 4 - 4
src/components/Symptom.vue

@@ -150,7 +150,7 @@ export default {
       handler(newVal,oldVal){
         const sympText = this.getSympText();
         if(sympText){
-          if(this.chooseSymp.length>1){
+          if(this.chooseSymp.length>1||localStorage.getItem("staticSymp")){
             this.getPush(sympText);
           }
           this.quesText = "请问您还有其他不适吗?";
@@ -269,6 +269,7 @@ export default {
           "id": id,
           "sexType": this.sexType
         }
+        localStorage.setItem("staticSymp",null)
         this.$store.commit('setText', { type: moduleCP['symp'], text: (this.chooseSymp.length == 0?'患者出现':'')+item.name,textP: (this.chooseSymp.length == 0?'患者出现':'')+(item.description||item.name), pId: this.questId,idx:this.chooseSymp.length == 0?1:'' });
         api.getById(param).then((res) => {
           const result = res.data;
@@ -284,7 +285,6 @@ export default {
               let signNum = 1;//第一个打标的,保存为伴随
               for(let i = 0;i < mapping.length;i++){
                 let tmpMap = mapping[i]
-                console.log(tmpMap.flag)
                 if(tmpMap.flag == 3 && signNum == 1){
                   ++signNum
                   for(let j = 0;j < tmpMap.questionDetailList.length;j++){
@@ -294,7 +294,7 @@ export default {
                 }
               }
               if(numPlus == mapping.length){
-                localStorage.setItem("staticSymp",JSON.stringify([]))
+                localStorage.setItem("staticSymp",null)
               }
               this.$store.commit('setDetail',{detail:result.data,ppId:null,moduleType:moduleCP['symp'],sign:1,idx:this.chooseSymp.length})
               if(sign){
@@ -355,7 +355,7 @@ export default {
         if (result.code == 0) {
           let symp = result.data.symptom||[];
           let symped = JSON.parse(JSON.stringify(this.chooseSymp));//已选症状
-          let sympStic = JSON.parse(localStorage.getItem('staticSymp'));//首次有无症状
+          let sympStic = JSON.parse(localStorage.getItem('staticSymp'))||[];//首次有无症状
           let sympAll = sympStic.concat(symp);
           var obj = {};
           sympAll = sympAll.reduce(function(item, next) {