Jelajahi Sumber

症状去重

luolei 5 tahun lalu
induk
melakukan
9c6fd907ea

+ 9 - 3
src/components/Department.vue

@@ -44,17 +44,22 @@
                 },
                 submit: false,
                 show: false,
+                son:false,//有无子医院
+                hospitalNum:'',
+                hospitalName:''
             }
         },
         created(){
             let query = this.$route.query;
-            let type = query.patientInfoType,name = query.patientName,value = query.patientInfo,code=query.hospitalCode;
+            let type = query.patientInfoType,name = query.patientName,value = query.patientInfo,code=query.hospitalCode,sonHospitalCode=query.sonHospitalCode,sonHospitalName=query.sonHospitalName;
             if(value&&name&&type&&code){
                 const param = {
                     patientInfo: value,
                     patientInfoType: type,
                     hospitalCode: code,
-                    patientName:name
+                    patientName:name,
+                    sonHospitalCode: sonHospitalCode||'',
+                    sonHospitalName: sonHospitalName||''
                 };
                 api.signIn(param).then(res => {
                     let result = res.data;
@@ -71,7 +76,8 @@
                                 doctorCode: msg.doctorCode,
                                 patientCode: msg.patientCode,
                                 recordId: msg.recordId,
-                                time:(new Date((msg.recordTime).replace(/\-/g, "/"))).getTime()
+                                sonHospitalCode:msg.sonHospitalCode||'',
+                                time:msg.recordTime&&(new Date((msg.recordTime).replace(/\-/g, "/"))).getTime()
                             };
                             localStorage.setItem('loginParam',JSON.stringify(params))//保存登陆信息,扫码进入删除该参数
                             this.$router.push({

+ 28 - 12
src/components/Login.vue

@@ -98,7 +98,8 @@ export default {
       hospitalName:'',
       hospitalNum:'',
       hospitalList:[],
-      hospitalShow:false
+      hospitalShow:false,
+      son:false//有无子医院
     };
   },
   created(){
@@ -110,11 +111,16 @@ export default {
       this.name = type == 101?'身份证号':type == 102?'病历号':type == 104?'市民卡号':''
       this.value = value
       this.patName = name
-      this.hospitalNum=sonHospitalCode
-      this.hospitalName=sonHospitalName
+      if(sonHospitalCode&&sonHospitalName){
+        this.hospitalNum=sonHospitalCode
+        this.hospitalName=sonHospitalName
+        this.son = true
+      }else{
+        this.son = false
+      }
     }
     this.getSysConfig(code)
-    this.getHospitalList(code)
+    
   },
   watch:{
     value:{
@@ -139,7 +145,7 @@ export default {
     }
   },
   beforeRouteLeave(to, from, next){
-    if(JSON.stringify(to.params) == '{}'){
+    if(JSON.stringify(to.params) == '{}'&&JSON.stringify(to.query) == '{}'){
       return
     }
     next();
@@ -154,8 +160,10 @@ export default {
           let tmpLis = result.data.juniorHospital;
           tmpLis.unshift(tmpMain)
           this.hospitalList = tmpLis
-          this.hospitalName = tmpLis[0].hospitalName  //默认第一个
-          this.hospitalNum = tmpLis[0].hospitalCode   
+          if(!this.son){
+            this.hospitalName = tmpLis[0].hospitalName  //默认第一个
+            this.hospitalNum = tmpLis[0].hospitalCode   
+          }
         }else{
           // this.defaultWaring(res.data.msg);
         }
@@ -171,6 +179,12 @@ export default {
           for(let i = 0;i < datas.length;i++){
             if(datas[i].code == 'junior_show'){
               this.hospitalShow = +datas[i].value==1?true:false
+              if(datas[i].value==1){
+                this.hospitalShow = true
+                this.getHospitalList(code)
+              }else{
+                this.hospitalShow = false
+              }
             }
           }
         }else{
@@ -292,10 +306,11 @@ export default {
                 let params = {
                   hospitalCode: msg.hospitalCode,
                   hospitalDeptCode: msg.hospitalDeptCode,
-                  doctorCode: msg.doctorCode,
-                  patientCode: msg.patientCode,
-                  recordId: msg.recordId,
-                  time:(new Date((msg.recordTime).replace(/\-/g, "/"))).getTime()
+                  doctorCode: msg.doctorCode||'',
+                  patientCode: msg.patientCode||'',
+                  recordId: msg.recordId||'',
+                  sonHospitalCode:msg.sonHospitalCode||'',
+                  time:msg.recordTime&&(new Date((msg.recordTime).replace(/\-/g, "/"))).getTime()||''
                 };
                 localStorage.setItem('loginParam',JSON.stringify(params))//保存登陆信息,扫码进入删除该参数
                 this.$router.push({
@@ -316,7 +331,8 @@ export default {
               // }else{
               //   this.defaultWaring(res.data.msg);
               // }
-              this.defaultWaring(res.data.msg);
+              this.allow = true
+              this.defaultWaring(res.data.msg||"网络异常请稍后重试");
               clearTimeout(timer)
             }
           }).catch(() => {

+ 8 - 8
src/components/PathInfo.vue

@@ -2,7 +2,7 @@
   <div class="path-wrap">
     <div class="content">
       <div class="topContent">
-        <p class="hospitalName">{{pathInfo.hospitalName}}</p>
+        <p class="hospitalName">{{pathInfo.sonHospitalName||pathInfo.hospitalName}}</p>
         <h2>智能预问诊</h2>
         <p class="explain">请认真填写以下内容,以便就诊时医生可以更好的了解病情,感谢您的配合!</p>
       </div>
@@ -19,15 +19,15 @@
           <span>{{pathInfo.hospitalDeptName}}</span>  
         </p>
         <p class="perLine">
-          <span class="msgTitle">预约医生:</span>
+          <span class="msgTitle">{{pathInfo.doctorName?'预约医生:':''}}</span>
           <span>{{pathInfo.doctorName}}</span>
         </p>
         <p class="perLine">
-          <span class="msgTitle">门诊号:</span>
+          <span class="msgTitle">{{pathInfo.recordId?'门诊号:':''}}</span>
           <span>{{pathInfo.recordId}}</span>
         </p>
         <p class="perLine">
-          <span class="msgTitle">预约时间:</span>
+          <span class="msgTitle">{{time?'预约时间:':''}}</span>
           <span>{{time}}</span>
         </p>
       </div>
@@ -61,7 +61,7 @@
     data(){
       return {
         pathInfo:{},
-        child:[],
+        // child:[],
         type:null, //1-未做过;3-只做过问诊;4-只做过体质辨识;6-都做过
         text:{
           "3":'您已完成过一次预问诊,是否再次录入',
@@ -70,7 +70,7 @@
           "6":'您已完成过一次预问诊,是否再次录入',
         },
         isReady:false,
-        hideChild:true,  //隐藏儿童
+        // hideChild:true,  //隐藏儿童
         submit:false,
         scroll:null,
         tipMsg:'',
@@ -109,7 +109,7 @@
           'doctorCode':!hasQuery&&query.doctorCode||'',
           'patientCode':!hasQuery&&query.patientCode||'',
           'recordId':!hasQuery&&query.recordId||'',
-          'recordTime':!hasQuery&&query.recordTime||''
+          "sonHospitalCode": !hasQuery&&query.sonHospitalCode||''
         }
         if(!hasQuery&&query.scan){//扫码进入的
           localStorage.removeItem('loginParam')
@@ -139,7 +139,7 @@
           const result = res.data;
           if(result.code==0){
             const datas = result.data;
-            this.child = datas.filter((item)=>{return item.code == "constitution_show"})
+            // this.child = datas.filter((item)=>{return item.code == "constitution_show"})
             this.$store.commit('saveSysConfig',datas)
           }
         })

+ 7 - 3
src/components/Preview.vue

@@ -9,13 +9,13 @@
             <tr>
               <td><span>挂号科室:</span>{{pathInfo.selfDeptName}}</td>
             </tr>
-            <tr>
+            <tr v-if="pathInfo.recordId">
               <td><span>门诊号:</span>{{pathInfo.recordId}}</td>
             </tr>
-            <tr>
+            <tr v-if="pathInfo.doctorName">
               <td><span>预约医生:</span>{{pathInfo.doctorName}}</td>
             </tr>
-            <tr>
+            <tr v-if="time">
               <td><span>就诊时间:</span>{{time}}</td>
             </tr>
           </table>
@@ -313,6 +313,7 @@ export default {
           detailList[3].contentValue=addContent.txtDoc
         }
       }
+      console.log(pathInfo)
       let params = {
         "dataJson": "1",
         "detailList": detailList,
@@ -335,6 +336,9 @@ export default {
         "patientSex": pathInfo.patientSex=='男'?1:2,//患者性别:1男2女(非)
         // "regVisitedState": pathInfo,//就诊状态(0待接诊,1接诊中,2完成接诊)(非)
         "reportList": this.imgList,
+        "sonHospitalCode": pathInfo.sonHospitalCode,
+        "sonHospitalId": pathInfo.sonHospitalId,
+        "sonHospitalName": pathInfo.sonHospitalName,
         // "type": 0//病历分类(1:门诊,2:住院)
       }
       // console.log(params)

+ 5 - 8
src/components/Symptom.vue

@@ -30,7 +30,7 @@
             v-for="(it,ind) in symp"
             :key="it.conceptId"
             @touchstart.prevent="touchstart(it,ind)"
-            @touchend.prevent="touchend(it,ind)"
+            @touchend.prevent="touchend(it,ind+1)"
           >{{it.description || it.name}}</span>
         </div>
         <p class="tip" v-show="chooseSymp.length==0">长按症状按钮可显示症状解释说明 <span @click="slideToggle" v-show="slide">{{slideTxt}}</span></p>
@@ -339,17 +339,14 @@ export default {
             obj[next.name] ? '' : obj[next.name] = true && item.push(next);
             return item;
           }, []);
-          // console.log(sympAll,symped)
-          for(let i = 0;i < sympAll.length;i++){//去掉已选的已选症状
-            for(let j = 0;j < symped.length;j++){//去掉
-              if(symped[j].name == sympAll[i].name){
-                sympAll.splice(i,1)
+          for(let i = 0;i < symped.length;i++){//去掉已选的已选症状
+            for(let j = 0;j < sympAll.length;j++){//去掉
+              if(sympAll[j].name == symped[i].name){
+                sympAll.splice(j,1)
               }
             }
           }
-
           this.symp = sympAll.slice(0,12);
-          // this.symp = symp;
           this.$refs.showHide.style.height = 'auto'
         }
       }).catch(()=>{