Преглед на файлове

Merge remote-tracking branch 'origin/test' into tempMaster

zhouna преди 6 години
родител
ревизия
31c071f06b

+ 1 - 1
build/webpack.dev.conf.js

@@ -34,7 +34,7 @@ const devWebpackConfig = merge(baseWebpackConfig, {
     compress: true,
     // host: HOST || config.dev.host,
     // host: '192.168.3.6',
-    host: '192.168.1.103',
+    host: '192.168.1.106',
     port: PORT || config.dev.port,
     open: config.dev.autoOpenBrowser,
     overlay: config.dev.errorOverlay

+ 1 - 1
src/common/CheckBox.vue

@@ -78,7 +78,7 @@ import OptionInp from '../common/OptionInp.vue';
           }
         }
         let temp = concatVal(data);
-        const newData = Object.assign({},this.datas,{questionDetailList:data},{value:temp.value?temp.value.substring(0,temp.value.length-1):''},{valueP:temp.valueP?temp.valueP.substring(0,temp.valueP.length-1):''});
+        const newData = Object.assign({},this.datas,{questionDetailList:data},{value:temp.value?temp.value:''},{valueP:temp.valueP?temp.valueP:''});
         this.$emit("updata",newData);
       },
       inpVal(val,index){//输入框失焦处理

+ 2 - 0
src/common/OptionInp.vue

@@ -73,6 +73,8 @@ import { getExpStr,scrollToV,isIos} from '@utils/tools';
     .inp{
       display: inline-block;
       vertical-align: top;
+      position: relative;
+      top:3px;
       input{
         color: #4F50FF;
         font-size: .3rem;

+ 2 - 1
src/common/Submit.vue

@@ -42,7 +42,8 @@ export default {
   methods: {
     goStart() {
       // this.$store.commit('initAllData') //已在患者页进行初始化
-      this.$router.push("/")
+      // this.$router.push("/")
+      this.$router.replace({path:'/'}) //阻止ios底部的前进后退按钮
     }
   }
 }

+ 8 - 4
src/components/Detail.vue

@@ -70,8 +70,8 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
         for(let i in origMapping){
           if(data.controlType==3){//多列类型多一层
             if(mapping[i].id == item.id){
-              mapping[i].value = '';
-              mapping[i].valueP = '';
+              let tempVal = '';
+              let tempValP = '';
               let detList = mapping[i].questionDetailList;
               for(let k in detList){//替换
                 if(detList[k].id==data.id){
@@ -80,8 +80,11 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
               } 
               for(let n in detList){//给父级赋值
                 if(detList[n].value){
-                  mapping[i].value += detList[n].name.replace(patt,detList[n].value)+',';
-                  mapping[i].valueP += (detList[n].description||detList[n].name).replace(patt,detList[n].value)+',';
+                  tempVal += detList[n].name.replace(patt,detList[n].value)+',';
+                  tempValP += (detList[n].description||detList[n].name).replace(patt,detList[n].value)+',';
+                  // 去掉最后一个逗号
+                  mapping[i].value = tempVal.substring(0,tempVal.length-1);
+                  mapping[i].valueP = tempValP.substring(0,tempValP.length-1);
                 }
               }
             }
@@ -90,6 +93,7 @@ import {patt,trimDots,imageUrlPrefix} from '@utils/tools.js'
               mapping.splice(i,1,data)
             }
           }
+          
         }
         // 实时更新清空样式
         if(data.value){

+ 2 - 0
src/components/DetailBox.vue

@@ -48,6 +48,7 @@
       const box = this.$refs.detailBox;
       const height = document.documentElement.clientHeight;
       box.style.height = height - 45 + 'px'; 
+      $('body').css({'height':height+'px','overflow-y':'hidden'})
       // 校验是否有已填项,有--弹窗;无--return
       let hasCheck = this.$refs.detail.check();
       if(hasCheck){
@@ -58,6 +59,7 @@
     beforeDestroy(){//给Window解绑事件
       $(window).off("resize");
       $(window).off("click");
+      $('body').css({'height':'100%','overflow-y':'auto'})
     },
     methods:{
       close(){

+ 2 - 1
src/components/PathInfo.vue

@@ -175,7 +175,8 @@
       },
       getStart(){
         if(this.isReady){
-          this.$router.push({path:'/tab'})
+          // this.$router.push({path:'/tab'})
+          this.$router.replace({path:'/tab'})
         }else{
           this.defaultWaring('请先维护症状模块')
         }

+ 111 - 2
src/components/Preview.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="preview">
+  <div class="preview" ref="preview">
     <div class="personMsg">
       <p class="baseMsg">{{pathInfo.patientName}}&nbsp;&nbsp;&nbsp;&nbsp;{{pathInfo.patientSex}}&nbsp;&nbsp;&nbsp;&nbsp;{{pathInfo.patientAge}}岁</p>
       <table>
@@ -70,6 +70,50 @@
       @showSubmit="showSubmit"
     ></Submit>
     <Loading v-if="loadingShow"></Loading>
+    <div class="doctorData" @click="handleClick(true)">医生端数据展示</div>
+    <div class="personMsgDoc" v-if="showDoc">
+      <div class="personMsgDocModal" @click.prevent="handleClick(false)"></div>
+      <div class="personMsgDocDetail">
+        <img class="close" src="../images/small-close.png" alt="" @click="handleClick(false)">
+        <div class="personMsg personMsg2">
+          <ul class="previewParts">
+            <!-- <li v-if="symptom.choose.length>0"> -->
+            <li>
+              <h4><i :style="{'background': '#FF9A9A'}"></i> 主诉:</h4>
+              <p>
+                <span v-for="(item,idx) in symptom.choose" :key="item.name+idx">{{item.name+(idx == symptom.choose.length-1?'':'、')}}</span>
+              </p>
+            </li>
+            <!-- <li v-if="diagnose.text.length>0||symptom.choose.length>0"> -->
+            <li>
+              <h4><i :style="{'background': '#3D69D9'}"></i> 现病史:</h4>
+              <p>
+                <span v-for="(item,idx) in symptom.text" :key="item.text+idx">{{item.text+(idx == symptom.choose.length-1?'。':';')}}</span>
+              </p>
+              <p>
+                <span v-for="(item,idx) in diagnose.text" :key="item.text+idx">{{item.text+(idx == diagnose.text.length-1?'。':';')}}</span>
+              </p>
+            </li>
+            <li v-if="showLis[moduleCP['other']]==1">
+              <h4><i></i> 其他史:</h4>
+              <p>
+                <span v-for="(item,idx) in others.text" :key="item.text+idx">{{item.text+(idx == others.text.length-1?'。':';')}}</span>
+              </p>
+            </li>
+            <li v-if="showLis[moduleCP['suplement']]==1">
+              <h4><i></i> 补充内容:</h4>
+              <p>{{addContent.txtDoc}}</p>
+            </li>
+            <li v-if="JSON.stringify(diagnose.imgSrc) !='{}'" class="imgLis">
+              <h4 class="imgTitle"><i></i> 最近一次治疗报告:</h4>
+              <div v-for="(value,key,idx) in diagnose.imgSrc" class="imgView">
+                <img :src="value" alt="">
+              </div>
+            </li>
+          </ul>
+        </div>
+      </div>
+    </div>
   </div>
 </template>
 <script>
@@ -97,10 +141,19 @@ export default {
       imgList:[],
       // show:loadingShow,//提交等待的动画loading
       tmpNum:0,
-      moduleCP:moduleCP
+      moduleCP:moduleCP,
+      showDoc:false
     }
   },
   methods: {
+    handleClick(flg){
+      if(flg){
+        this.$refs.preview.style.overflow = 'hidden'
+      }else{
+        this.$refs.preview.style.overflow = 'auto'
+      }
+      this.showDoc = flg
+    },
     showSubmit(flg) {
       this.submit = flg
     },
@@ -257,6 +310,11 @@ export default {
 .foot {
   .dbfooter;
 }
+.doctorData {
+  float: right;
+  color: #0043E8;
+  margin-bottom: 30px;
+}
 .preview {
   color: red;
   background-color: #f2f2f5;
@@ -268,6 +326,7 @@ export default {
   box-sizing: border-box;
   padding: 0.3rem 0.4rem 1rem .4rem;
   overflow: auto;
+  -webkit-overflow-scrolling:touch;
 }
 .imgView {
   width: 1.86rem;
@@ -282,7 +341,9 @@ export default {
     position: absolute;
     left: 50%;
     top: 50%;
+    width: 100%;
     transform: translate(-50%, -50%);
+
   }
 }
 .imgTitle {
@@ -323,6 +384,7 @@ export default {
       font-size: .28rem;
       color: #424242;
       margin: .2rem 0;
+      word-break: break-all;
     }
   }
   .baseMsg {
@@ -355,4 +417,51 @@ export default {
 .personMsg2 {
   padding-right: 0;
 }
+.personMsgDoc {
+  position: fixed;
+  height: 100%;
+  width: 100%;
+  top: 0;
+  left: 0;
+  overflow: auto;
+  z-index: 999;
+  .personMsgDocModal {
+    .mask;
+    position: fixed;
+    width: 100%;
+    height: 100%;
+    top: 0;
+    left: 0;
+    z-index: 999;
+  }
+  .personMsgDocDetail {
+    position: fixed;
+    z-index: 1000;
+    top: 50%;
+    left: 50%;
+    transform: translate(-50%, -50%);
+    // padding: 0 .4rem;
+    background-color: #fff;
+    box-sizing: border-box;
+    width: 90%;
+    border-radius: .1rem;
+    overflow: hidden;
+    .personMsg {
+      max-height: 9rem;
+      overflow: auto;
+      width: 100%;
+      border-radius: 0;
+      -webkit-overflow-scrolling:touch;
+    }
+  }
+}
+.close {
+  width: .34rem;
+  height: .34rem;
+  position: absolute;
+  right: 0;
+  top: 0;
+  padding: 8px;
+  z-index: 1001;
+}
 </style>

+ 9 - 3
src/components/Search.vue

@@ -19,11 +19,11 @@
     <div class="searchList">
       <p
         class="waring"
-        v-if="!searchVal&&searchLis.length==0"
+        v-if="!searchVal&&!hasMore&&searchLis.length==0"
       >请输入搜索内容</p>
       <p
         class="waring"
-        v-if="searchVal&&searchLis.length==0"
+        v-if="hasMore&&searchVal"
       >暂无搜索结果</p>
       <ul>
         <li
@@ -48,7 +48,8 @@ export default {
     return {
       searchVal: '',
       searchLis: [],
-      tmpItem:{}
+      tmpItem:{},
+      hasMore:false
     }
   },
   watch:{
@@ -94,6 +95,11 @@ export default {
         const result = res.data;
         if (result.code == 0) {
           this.searchLis = result.data
+          if(result.data.length>0){
+            this.hasMore = false
+          }else{
+            this.hasMore = true
+          }
         }
       })
     }

+ 2 - 1
src/components/Symptom.vue

@@ -238,7 +238,8 @@ export default {
         this.getPush(sympText);//删除后重新调推理-入参:拼好的内容
       } else {
         // 全部删除完 重新走问诊流程
-        this.$router.push("/")
+        // this.$router.push("/")
+        this.$router.replace({path:'/'})
         // this.getSympList();
       }
       this.cancelDel();

+ 2 - 1
src/components/TabPage.vue

@@ -97,7 +97,8 @@ export default {
   },
   created() {
     if (this.config.length == 0) {
-      this.$router.go(-1)
+      // this.$router.go(-1)
+      this.$router.replace({path:'/'})
     }
   },
   methods: {

+ 8 - 3
src/less/index.less

@@ -14,6 +14,10 @@ input, textarea{
   border: 0 none;
   -webkit-tap-highlight-color:transparent;  //ios去掉选择阴影
 }
+input::-webkit-input-placeholder{
+  // color:#f9f9f7;
+  font-size: .30rem;
+}
 button {
     border: 0 none;
 }
@@ -58,8 +62,9 @@ a {
 
 html,body{
   width: 100%;
-  height: auto !important;
-  overflow-x: auto;
+  // height: auto !important;
+  height: auto;
+  overflow-y: auto;
 }
 html{
   margin: 0;
@@ -92,4 +97,4 @@ html{
     .main .mainBtm .Recommend .btn {
       padding: 0 10px !important;
     }
-} */ 
+} */ 

+ 2 - 0
src/store.js

@@ -31,6 +31,7 @@ const store = new Vuex.Store({
     addContent:{
       origin:[],
       txt:'',
+      txtDoc:''
     },
     loadingShow:false
   },
@@ -59,6 +60,7 @@ const store = new Vuex.Store({
       state.addContent={
         origin:[],
         txt:'',
+        txtDoc:''
       }
     },
     setDataAll(state,param){

+ 2 - 1
src/utils/tools.js

@@ -249,7 +249,8 @@ function concatVal(data){
       }
     }
   }
-  return {value,valueP};
+  // 去掉最后一个逗号
+  return {value:value?value.substring(0,value.length-1):'',valueP:valueP?valueP.substring(0,valueP.length-1):''};
 }
 
 module.exports =  {