luolei 5 lat temu
rodzic
commit
dfd9b2f684

+ 9 - 6
src/components/Detail.vue

@@ -11,7 +11,7 @@
     </div>
     <div class="viewPrew">
       <div class="content">
-        <div class="preQuestion" v-for="(item,index) in checkDatas.questionMapping">
+        <div class="preQuestion" v-for="(item,index) in showCheckDatas">
           <div class="quest" @click="slideToggle($event,index)">
             <img class="sign" v-if="item.required==1" src="../images/important.svg" alt="">
             <p class="title clearfix">{{index + 1 +'.'+(item.description || item.name)}}{{item.controlType==1?'(单选)':item.controlType==2?'(多选)':''}}</p>
@@ -26,7 +26,7 @@
                 :detail="1"
                 @updata="updataData"/>
           <radioSelect                
-                v-if="item.controlType==8&&item.flag!=3" 
+                v-if="item.controlType==8" 
                 :item="item"
                 :slide="!!item.slide"
                 :detail="1"
@@ -93,13 +93,16 @@ import $ from 'jquery';
     let { pathInfo } = this.$store.state;
       return{
         checkDatas:{},
+        showCheckDatas:[],
         imgUrl:imageUrlPrefix,
         age: pathInfo.patientAge,
       }
     },
-    props:['datas','data','checkF','tips','sex'],
+    props:['datas','data','checkF','tips','sex','flags'],
     created(){
       this.checkDatas = JSON.parse(JSON.stringify(this.datas));
+      let tmpD = this.checkDatas.questionMapping||[]
+      this.showCheckDatas = tmpD.filter(item=>item.flag!=3)
     },
     mounted(){
       this.$nextTick(()=>{
@@ -276,8 +279,8 @@ import $ from 'jquery';
           }
         }
         
-        let msg =  (this.age>18?'患者':'患儿')+bj1+bj2+'出现'+this.checkDatas.name+ ','+bj3;
-        let msgP =  (this.age>18?'患者':'患儿')+bjP1+bjP2+'出现'+(this.checkDatas.description || this.checkDatas.name)+ ','+bjP3;
+        let msg =  (this.flags == 51?'':(this.age>=18?'患者':'患儿'))+bj1+bj2+(this.flags == 51?'':'出现')+this.checkDatas.name+ ','+bj3;
+        let msgP =  (this.flags == 51?'':(this.age>=18?'患者':'患儿'))+bjP1+bjP2+(this.flags == 51?'':'出现')+(this.checkDatas.description || this.checkDatas.name)+ ','+bjP3;
         let newMsg = "";
         let newMsgP = "";
         if(msg[msg.length-1] == ','){
@@ -287,7 +290,7 @@ import $ from 'jquery';
           newMsg = msg;
           newMsgP = msgP;
         }
-        this.$store.commit('setDatas',{data:this.checkDatas,pId:id,type:this.data.moduleType,ppId:this.data.ppId});
+        this.$store.commit('setDatas',{data:this.checkDatas,pId:id,type:this.data.moduleType,ppId:this.data.ppId,idx:1});
         // flag是区分点开已选症状 未点完成
         this.$store.commit('setText',{text:trimDots(newMsg),textP:trimDots(newMsgP),pId:id,type:this.data.moduleType,flag:true,order:this.data.order,arrFlag:true,index:this.data.index,idx:1});
         // 关闭详情

+ 2 - 0
src/components/DetailBox.vue

@@ -6,6 +6,7 @@
         <div class="main">
           <Detail :datas="privateData" 
                   ref="detail"
+                  :flags="flags"
                   :data="data"
                   :tips="tips"
                   :checkF="checkF"
@@ -35,6 +36,7 @@
   import $ from 'jquery';
   export default {
     name:'DetailBox', //点开详情的盒子
+    props:['flags'],
     data(){
       const {detailInfo,detailShow} = this.$store.state;
       return{

+ 7 - 0
src/components/Login.vue

@@ -145,6 +145,7 @@ export default {
     }
   },
   beforeRouteLeave(to, from, next){
+    // console.log(to)
     if(JSON.stringify(to.params) == '{}'&&JSON.stringify(to.query) == '{}'){
       return
     }
@@ -212,8 +213,14 @@ export default {
     handleShow(flg) {
       const { show,showH } = this;
       if(flg == 1){
+        if(!showH){
+          this.show=false
+        }
         this.showH = !showH;
       }else{
+        if(!show){
+          this.showH=false
+        }
         this.show = !show;
       }
     },

+ 10 - 8
src/components/Preview.vue

@@ -27,8 +27,8 @@
             <li>
               <h4><i></i>主诉:</h4>
               <p>
-                <span v-for="(item,idx) in symptom.choose" :key="item.name+idx">
-                  {{item.specialP?(item.description||item.name)+item.specialP+(idx == symptom.choose.length-1?'':','):(item.description||item.name)+(idx == symptom.choose.length-1?'':',')}}
+                <span v-for="(item,idx) in symptom.choose" :key="item.name+idx" v-if="item.idx == 1">
+                  {{item.specialP?(item.description||item.name)+item.specialP:(item.description||item.name)}}
                 </span>
               </p>
             </li>
@@ -38,10 +38,11 @@
                 <template v-for="(value,index) in checkText">
                   <!-- 患者于时间单位前诱因出现症状,其余题目的内容; -->
                   <span :key="index" v-if="index==0">{{(value.idx==1?'':'伴')+value.textP}}{{checkText.length==1?'':','}}</span>
-                  <span :key="index" v-if="index==1">{{(checkText[0].idx == 1?'伴':'')+value.textP}}{{checkText.length==2?'':'、'}}</span>
-                  <span :key="index" v-if="index>1">{{value.textP}}{{index == checkText.length-1?'':'、'}}</span>
+                  <span :key="index" v-if="index==1">{{(checkText[0].idx == 1?'伴':'')+value.text}}{{checkText.length==2?'':'、'}}</span>
+                  <span :key="index" v-if="index>1">{{value.text}}{{index == checkText.length-1?'':'、'}}</span>
                 </template>
               </p>
+              <p><span>{{getDetailText(diagnose.text,false).view}}</span></p>
             </li>
             <li v-if="showLis[moduleCP['other']]==1">
               <h4><i></i> 其他史:</h4>
@@ -93,8 +94,8 @@
               <li>
                 <h4><i></i> 主诉:</h4>
                 <p>
-                  <span v-for="(item,idx) in symptom.choose" :key="item.name+idx">
-                    {{item.special?item.name+item.special+(idx == symptom.choose.length-1?'':','):item.name+(idx == symptom.choose.length-1?'':',')}}
+                  <span v-for="(item,idx) in symptom.choose" :key="item.name+idx" v-if="item.idx == 1">
+                    {{item.special?item.name+item.special:item.name}}
                   </span>
                 </p>                
               </li>
@@ -103,16 +104,17 @@
                 <p>
                   <template v-for="(value,index) in checkText">
                     <!-- 患者于时间单位前诱因出现症状,其余题目的内容; -->
-                    <span :key="index" v-if="index==0">{{(value.idx==1?'':'伴')+value.textP}}{{checkText.length==1?'':','}}</span>
+                    <span :key="index" v-if="index==0">{{(value.idx==1?'':'伴')+value.text}}{{checkText.length==1?'':','}}</span>
                     <span :key="index" v-if="index==1">{{(checkText[0].idx == 1?'伴':'')+value.textP}}{{checkText.length==2?'':'、'}}</span>
                     <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>
               </li>
               <li v-if="showLis[moduleCP['other']]==1">
                 <h4><i></i> 其他史:</h4>
                 <p>
-                  <span>{{getDetailText(others.text,false).content}}</span>
+                  <span>{{getDetailText(others.textP,false).content}}</span>
                 </p>
               </li>
               <li v-if="showLis[moduleCP['suplement']]==1">

+ 3 - 8
src/components/Symptom.vue

@@ -160,7 +160,7 @@ export default {
   },
   methods: {
     slideToggle(){
-      let flg = this.slideTxt
+      let flg = this.slideTxt;
       if(flg == '展开'){
         this.$refs.showHide.style.height = 'auto'
         this.slideTxt = '收起'
@@ -257,6 +257,7 @@ export default {
           "id": id,
           "sexType": this.sexType
         }
+        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;
           if (result.code == 0) {
@@ -264,9 +265,6 @@ export default {
             this.labelDetail = result.data;
             if(this.chooseSymp.length == 0){
               result.data.idx = 1
-              this.$store.commit('setText', { type: moduleCP['symp'], text: '患者出现'+item.name,textP: '患者出现'+(item.description||item.name), pId: this.questId,idx:flg });
-            }else{
-              this.$store.commit('setText', { type: moduleCP['symp'], text: item.name,textP: item.description||item.name, pId: this.questId,idx:flg });
             }
             this.$store.commit('setOrigin', { type: moduleCP['symp'], data: result.data });
             if (mapping && mapping.length > 0) {
@@ -307,10 +305,8 @@ export default {
       } else {//没有questionId或id 
         if(this.chooseSymp.length == 0){
           item.idx = 1
-          this.$store.commit('setText', { type: moduleCP['symp'], text: '患者出现'+item.name,textP: '患者出现'+(item.description||item.name), pId: this.questId,idx:flg });
-        }else{
-          this.$store.commit('setText', { type: moduleCP['symp'], text: item.name,textP: item.description||item.name, pId: this.questId,idx:flg });
         }
+        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:'' });
         this.$store.commit('setSearchShow', false);
         this.chooseSymp.push(item);
         const sympText = this.getSympText();
@@ -360,7 +356,6 @@ export default {
               }
             }
           }
-          console.log(sympStic)
           this.symp = sympAll.slice(0,12);
           this.$refs.showHide.style.height = 'auto'
         }

+ 1 - 1
src/components/TabPage.vue

@@ -59,7 +59,7 @@
     </div>
     <!-- 详情页 -->
     <div class="detail" v-if="this.$store.state.detailShow">
-      <DetailBox />
+      <DetailBox :flags="flag"/>
     </div>
   </div>
 </template>