Browse Source

医生端数据展示&showDoctor=1

zhouna 5 years ago
parent
commit
b881724137
4 changed files with 20 additions and 13 deletions
  1. 3 1
      src/components/PathInfo.vue
  2. 13 11
      src/components/Preview.vue
  3. 3 0
      src/store.js
  4. 1 1
      src/utils/tools.js

+ 3 - 1
src/components/PathInfo.vue

@@ -69,7 +69,7 @@
   import api from '@utils/api.js'
   import Submit from '../common/Submit';
   import Toast from '../common/Toast.vue';
-  import {setScroll,dateParser,setTitle,moduleConfig } from '@utils/tools.js'
+  import {setScroll,dateParser,setTitle,moduleConfig,getUrlArgObject } from '@utils/tools.js'
   import StartPage from "../common/HomePage";
   import BScroll from 'better-scroll';
   import {mapState} from 'vuex';
@@ -107,6 +107,8 @@
       }),
     },
     created(){
+      const showDoctor = getUrlArgObject("showDoctor");
+      this.$store.commit("setShowDoctor",showDoctor);
       this.getPathInfo();
       this.$store.commit('initAllData');//初始化store数据
     },

+ 13 - 11
src/components/Preview.vue

@@ -63,7 +63,7 @@
             </li>
           </ul>
         </div>
-        <!--<div class="doctorData" @click="handleClick(true)">医生端数据展示</div>-->
+        <div v-if="showDoctor" class="doctorData" @click="handleClick(true)">医生端数据展示</div>
       </div>
     </div>
     <!--<div class="foot">
@@ -85,7 +85,7 @@
         @showSubmit="showSubmit"
       ></Submit>
       <Loading v-if="this.$store.state.loadingShow"></Loading>
-      <!--<div class="personMsgDoc" v-show="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)">
@@ -102,24 +102,25 @@
               <li>
                 <h4><i></i> 现病史:</h4>
                 <p>
+                  <!-- 患者于时间单位前诱因出现症状,其余题目的内容; -->
+                  <span>{{mainText+","}}</span>
                   <template v-for="(value,index) in checkText">
-                    &lt;!&ndash; 患者于时间单位前诱因出现症状,其余题目的内容; &ndash;&gt;
-                    <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.text}}{{checkText.length==2?'':'、'}}</span>
-                    <span :key="index" v-if="index>1">{{value.text}}{{index == checkText.length-1?'':'、'}}</span>
+                    <!-- 患者于时间单位前诱因出现症状,其余题目的内容; -->
+                    <span :key="index" v-if="index>0&&value.flag!=1&&value.flag!=2&&index<checkText.length-1">{{value.text+","}}</span>
                   </template>
+                  <span>{{banText}}</span>
                 </p>
                 <p><span>{{getDetailText(diagnose.text,false).content}}</span></p>
               </li>
               <li v-if="tabType[moduleCP['other']]==1">
                 <h4><i></i> 其他史:</h4>
                 <p>
-                  <span>{{getDetailText(others.text,false).content}}</span>
+                  <span>{{getDetailText(others.text,false).view}}</span>
                 </p>
               </li>
               <li v-if="tabType[moduleCP['suplement']]==1">
                 <h4><i></i> 补充内容:</h4>
-                <p>{{addContent.txtDoc}}</p>
+                <p>{{getDetailText(addContent.text,false).view}}</p>
               </li>
               <li v-if="JSON.stringify(diagnose.imgSrc) !='{}'" class="imgLis">
                 <h4 class="imgTitle"><i></i> 最近一次治疗报告:</h4>
@@ -130,7 +131,7 @@
             </ul>
           </div>
         </div>
-      </div>-->
+      </div>
   </div>
 </template>
 <script>
@@ -142,14 +143,15 @@ import {moduleCP,trimDots,setScroll,dateParser} from '@utils/tools.js'
 import { mapState } from 'vuex';
 export default {
   data() {
-    const { pathInfo, originDatas } = this.$store.state;
-    let sysConfig = this.$store.state.sysConfig;
+    const { pathInfo, originDatas,showDoctor } = this.$store.state;
+    let sysConfig = this.$store.state.sysConfig;console.log("showDoctor",showDoctor)
     let symptomDate = this.$store.state.symptom;
     let diagnoseDate = this.$store.state.diagnose;
     let othersDate = this.$store.state.others;
     let addContentDate = this.$store.state.addContent;
     return {
       msg: '预览',
+      showDoctor:showDoctor,
       pathInfo: pathInfo,
       symptom: symptomDate,
       diagnose: diagnoseDate,

+ 3 - 0
src/store.js

@@ -64,6 +64,9 @@ const store = new Vuex.Store({
     addBuriedSomeList:[],//买点数据
   },
   mutations:{
+    setShowDoctor(state,flag){
+      state.showDoctor=flag;
+    },
     addBuriedSome(state,item){
       let list = state.addBuriedSomeList,num=0
       for(let i = 0;i < list.length;i++){

+ 1 - 1
src/utils/tools.js

@@ -10,7 +10,7 @@ const configer = {
 }
 
 const getUrlArgObject = (parm) => {
-    let query = window.location.search;
+    let query = window.location.hash;
     let args = qs.parse(query.substr(1));
     return args[parm];//返回对象
 }