Sfoglia il codice sorgente

搜索,完成提示弹窗

Luolei 5 anni fa
parent
commit
a76ca621c0

+ 2 - 2
config/index.js

@@ -20,8 +20,8 @@ module.exports = {
     },
 
     // Various Dev Server settings
-    host: 'localhost', // can be overwritten by process.env.HOST
-    // host: '192.168.3.126', // can be overwritten by process.env.HOST
+    // host: 'localhost', // can be overwritten by process.env.HOST
+    host: '192.168.3.126', // can be overwritten by process.env.HOST
     port: 8082, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
     autoOpenBrowser: true,
     errorOverlay: true,

+ 2 - 1
src/common/MultiLineInput.vue

@@ -67,10 +67,11 @@ export default {
   }
   .suffix {
     position: absolute;
-    right: .12rem /* 12/100 */;
+    right: .12rem;
     top: 0;
     width: 1rem;
     text-align: right;
+    text-align: left;
   }
   .sticP {
     width: 100%;

+ 124 - 0
src/common/Submit.vue

@@ -0,0 +1,124 @@
+<template>
+  <div>
+    <div class="modalWrap"></div>
+    <div
+      v-if="showType=='success'"
+      class="submitSuccess"
+    >
+      <img
+        src="../images/complete.png"
+        alt=""
+      >
+      <p class="success">{{msg}}</p>
+      <p class="tip">{{tip}}</p>
+      <span @click="goStart">完 成</span>
+    </div>
+    <div
+      v-if="showType=='fail'"
+      class="submitFail"
+    >
+      <p>{{fail}}</p>
+    </div>
+  </div>
+</template>
+<script>
+export default {
+  props: ['showType'],
+  data() {
+    return {
+      msg: '提交成功',
+      tip: '您的病历信息已提交至医生问诊系统,点击完成按钮结束本次预问诊服务。',
+      fail: '提交失败请稍后再试'
+    }
+  },
+  // mounted(){
+  //   if(this.showType=='fail'){
+  //     setTimeout(() => {
+  //       this.$emit('showSubmit',false)
+  //     }, 2000);
+  //   }
+  // },
+  methods: {
+    goStart() {
+      this.$router.push("/")
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+@import "../less/base.less";
+.modalWrap {
+  .mask;
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+}
+.submitSuccess {
+  width: 6rem;
+  height: 7rem;
+  background: #fff;
+  z-index: 999;
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  padding: 0.8rem 0.5rem 0.5rem 0.5rem;
+  box-sizing: border-box;
+  border-radius: 0.2rem;
+  text-align: center;
+  img {
+    width: 1.28rem;
+    height: 1.28rem;
+  }
+  .success {
+    font-size: 0.36rem;
+    color: #333333;
+    font-weight: bold;
+    margin-top: 0.5rem;
+    margin-bottom: 0.24rem;
+  }
+  .tip {
+    font-size: 0.24rem;
+    color: #666666;
+    line-height: 0.44rem;
+    margin-bottom: 1.2rem;
+  }
+  span {
+    width: 4.9rem;
+    height: 0.88rem;
+    line-height: 0.88rem;
+    font-size: 0.32rem;
+    color: #ffffff;
+    font-weight: bold;
+    display: inline-block;
+    background: -webkit-gradient(
+      linear,
+      right top,
+      left top,
+      from(#4f8bff),
+      to(#4f4fff)
+    );
+    background: -webkit-linear-gradient(right, #4f8bff, #4f4fff);
+    box-shadow: 0 0.12rem 0.24rem 0 rgba(79, 129, 255, 0.4);
+    border-radius: 0.44rem;
+  }
+}
+.submitFail {
+  width: 6rem;
+  height: 0.88rem;
+  line-height: 0.88rem;
+  z-index: 999;
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  box-sizing: border-box;
+  border-radius: 0.2rem;
+  text-align: center;
+  background-color: #fff;
+}
+</style>
+
+

+ 91 - 9
src/components/Preview.vue

@@ -25,13 +25,19 @@
       >{{'返回'+ preName}}</span>
       <span
         class="next"
-        @click="saveAllDate"
+        @click="saveAllImage"
       >提 交</span>
     </div>
+    <Submit
+      v-if="submit"
+      :showType="showType"
+      @showSubmit="showSubmit"
+    ></Submit>
   </div>
 </template>
 <script>
 import api from '@utils/api.js';
+import Submit from '../common/Submit';
 export default {
   props: ['preName'],
   data() {
@@ -40,26 +46,102 @@ export default {
     return {
       msg: '预览',
       pathInfo: pathInfo,
-      diagnose: diagnoseDate
+      diagnose: diagnoseDate,
+      submit: false,
+      showType: 'fail',
     }
   },
 
   methods: {
+    showSubmit(flg) {
+      this.submit = flg
+    },
     back() {
       this.$emit('back', 'preview')
     },
-    saveAllDate() {
+    saveAllImage() {
       let formData = new FormData();
-      let imgList = this.diagnose.imgFile
-      for(let i = 0;i < imgList.length;i++){
-        let pageFile = imgList[i].file
-        formData.append('upfiles', imgList[i].file);
-        formData.append('type', i+1);
+      let imgList = this.diagnose.imgFile;
+      if (imgList.length > 0) {
+        for (let i = 0; i < imgList.length; i++) {
+          let pageFile = imgList[i].file
+          formData.append('upfiles', imgList[i].file);
+          formData.append('type', i + 1);
+        }
+        api.uploadImageThums(formData).then((res) => {//获取图片
+          console.log(res)
+          if (res.data.length > 0) {
+            this.showType = 'success'
+            this.submit = true
+          } else {
+            this.showType = 'fail'
+            this.submit = true
+            let timer = setTimeout(() => {
+              this.submit = false
+              clearTimeout(timer)
+            }, 2000);
+          }
+        })
+        return;
+      } else {
+
       }
-      api.uploadImageThums(formData).then((res) => {
+    },
+    saveAllDate() {
+      let params = {
+        "dataJson": "1",
+        "detailList": [
+          {
+            "content": "string",
+            "contentValue": "string",
+            "type": 0
+          }
+        ],
+        "doctorCode": "string",//医生编码
+        "doctorId": 0,//医生id
+        "doctorName": "string",//医生name
+        "hospitalCode": "string",//医院编码
+        "hospitalDeptCode": "string",//医院科室编码
+        "hospitalDeptId": 0,//科室id
+        "hospitalDeptName": "string",//科室name
+        "hospitalId": 0,//医院id
+        "hospitalName": "string",//医院名称
+        "inquiryCode": "string",//就诊序列号
+        "patientBirthday": "2019-07-11T07:27:28.981Z",//患者出生日期,格式为:2018-11-28 17:25:30
+        "patientCode": "string",//患者编号
+        "patientId": 0,//患者id
+        "patientIdNo": "string",//患者证件号码(病历号)
+        "patientName": "string",//患者姓名
+        "patientPhone": "string",//患者联系电话(非)
+        "patientSex": 0,//患者性别:1男2女(非)
+        "regVisitedState": 0,//就诊状态(0待接诊,1接诊中,2完成接诊)(非)
+        "reportList": [
+          {
+            "narrowImage": "string",//缩略图
+            "orderNum": 0,//图片排序号
+            "originalImage": "string"//原图
+          }
+        ],
+        "type": 0//病历分类(1:门诊,2:住院)
+      }
+      api.saveInquiry(params).then((res) => {//获取图片
         console.log(res)
+        if (res.data.length > 0) {
+          this.showType = 'success'
+          this.submit = true
+        } else {
+          this.showType = 'fail'
+          this.submit = true
+          let timer = setTimeout(() => {
+            this.submit = false
+            clearTimeout(timer)
+          }, 2000);
+        }
       })
     }
+  },
+  components: {
+    Submit
   }
 }
 </script>

+ 178 - 0
src/components/Search.vue

@@ -0,0 +1,178 @@
+<template>
+  <div class="searchWrap">
+    <div class="searchTop">
+      <div class="iptWrap">
+        <img
+          class="searchImg"
+          src="../images/searchB.png"
+          alt=""
+        >
+        <input
+          type="text"
+          autofocus
+          placeholder="请搜索"
+          v-model="searchVal"
+        >
+      </div>
+      <span @click="search">取消</span>
+    </div>
+    <div class="searchList">
+      <p
+        class="waring"
+        v-if="!searchVal&&searchLis.length==0"
+      >请输入搜索内容</p>
+      <p
+        class="waring"
+        v-if="searchVal&&searchLis.length==0"
+      >暂无搜索结果</p>
+      <ul>
+        <li
+          v-for="(item,idx) in searchLis"
+          :key="item.conceptId+idx"
+          @click="showDetil(item)"
+          :style="{'borderBottom':(idx==searchLis.length-1)?'0':'1px solid #a8a8a8'}"
+        ><img
+            class="searchImgLis"
+            src="../images/search.png"
+            alt=""
+          >{{item.name}}</li>
+      </ul>
+    </div>
+  </div>
+</template>
+<script>
+import api from '@utils/api.js';
+export default {
+  props: ['age', 'sexType', 'chooseSymp'],
+  data() {
+    return {
+      searchVal: '',
+      searchLis: []
+    }
+  },
+  watch:{
+    searchVal(curVal, oldVal) {
+      if (curVal.trim() == "") {
+        this.searchVal = "";
+        return;
+      }
+      if (curVal != "" && curVal != oldVal) {
+        this.searchList()
+      }
+    }
+  },
+  methods: {
+    showDetil(item) {
+      this.$emit('showDetil', item)
+      this.$emit('search', false)
+    },
+    search() {
+      this.$emit('search', false)
+    },
+    searchList() {
+      let tmpArr = [], chooseSymp = this.chooseSymp;
+      for (let i = 0; i < chooseSymp.length; i++) {
+        tmpArr.push(chooseSymp[i].conceptId)
+      }
+      const param = {
+        "age": this.age,
+        "inputIds": tmpArr,
+        "inputStr": this.searchVal,
+        "sexType": this.sexType
+      }
+      api.getTagInfos(param).then((res) => {
+        const result = res.data;
+        console.log(result)
+        if (result.code == 0) {
+          this.searchLis = result.data
+        }
+      })
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+.searchWrap {
+  position: fixed;
+  height: 100%;
+  width: 100%;
+  top: 0;
+  left: 0;
+  background-color: #ededed;
+}
+.searchTop {
+  padding: 0.15rem 0.4rem;
+  padding-right: 1.2rem;
+  background-color: #ededed;
+  box-sizing: border-box;
+  position: absolute;
+  width: 100%;
+  top: 0;
+  z-index: 999;
+  span {
+    position: absolute;
+    right: 0.32rem;
+    top: 0.32rem;
+    font-size: 0.3rem;
+    color: #666666;
+  }
+}
+.iptWrap {
+  height: 0.74rem;
+  border-radius: 0.37rem;
+  background-color: #fff;
+  overflow: hidden;
+  padding: 0.16rem 0.3rem 0.16rem 0.75rem;
+  box-sizing: border-box;
+  width: 100%;
+  position: relative;
+  .searchImg {
+    width: 0.44rem;
+    height: 0.44rem;
+    position: absolute;
+    left: 0.2rem;
+    top: 0.14rem;
+  }
+  input {
+    width: 100%;
+    height: 0.42rem;
+    font-size: 0.3rem;
+    line-height: 0.42rem;
+  }
+}
+.searchList {
+  overflow: scroll;
+  position: absolute;
+  -webkit-overflow-scrolling: touch;
+  top: 0;
+  left: 0;
+  padding-top: 1.04rem;
+  height: 100%;
+  width: 100%;
+  background-color: #ededed;
+  .waring {
+    padding-left: 0.5rem;
+    margin-top: 0.2rem;
+  }
+  ul {
+    padding: 0 0.4rem;
+    box-sizing: border-box;
+    background-color: #fff;
+  }
+  li {
+    height: 1rem;
+    line-height: 1rem;
+    padding: 0 0.4rem;
+    border-bottom: 1px solid #a8a8a8;
+    box-sizing: border-box;
+    .searchImgLis {
+      width: 0.44rem;
+      height: 0.44rem;
+      float: left;
+      margin-top: 0.26rem;
+      margin-right: 0.15rem;
+    }
+  }
+}
+</style>
+

+ 278 - 227
src/components/Symptom.vue

@@ -1,273 +1,324 @@
 <template>
   <div class="symp-wrap">
-    <div class="choose" v-if="chooseSymp.length>0">
+    <div
+      class="choose"
+      v-if="chooseSymp.length>0"
+    >
       <p class="quest">已选症状</p>
-      <p class="choo-symp" v-for="(v,i) in chooseSymp">
+      <p
+        class="choo-symp"
+        v-for="(v,i) in chooseSymp"
+      >
         <span @click="showChecked(v)">{{v.name}}</span>
-        <span @click="deletSymp(v,i)"><img src="../images/delete.png" alt=""></span>
+        <span @click="deletSymp(v,i)"><img
+            src="../images/delete.png"
+            alt=""
+          ></span>
       </p>
     </div>
     <div class="label">
-      <p class="quest">请问您有哪些不适?</p>
-      <span class="symp" 
-      v-for="(it,ind) in symp" 
-      :key="it.conceptId"
-      @click="showDetil(it)">{{it.name}}</span>
+      <p class="quest">请问您有哪些不适?<img
+          @click="search(true)"
+          class="searchImg"
+          src="../images/search.png"
+          alt=""
+        ></p>
+      <span
+        class="symp"
+        v-for="(it,ind) in symp"
+        :key="it.conceptId"
+        @click="showDetil(it)"
+      >{{it.name}}</span>
     </div>
-    <div class="result" v-if="checkText.length>0">
+    <div
+      class="result"
+      v-if="checkText.length>0"
+    >
       <p class="title">症状情况</p>
       <p v-for="(value,index) in checkText">{{value.text}}</p>
     </div>
-    <div :class="['footer',{'nofoot':chooseSymp.length==0}]" @click="toNext">下一步</div>
-    <div class="detail" v-if="show">
-      <DetailBox @close="closeDetal" 
-              :data="labelDetail" 
-              :moduleType="1"
-              v-if="labelDetail.questionMapping&&labelDetail.questionMapping.length>0"
-              @pComplete="complete"/>
+    <div
+      :class="['footer',{'nofoot':chooseSymp.length==0}]"
+      @click="toNext"
+    >下一步</div>
+    <div
+      class="detail"
+      v-if="show"
+    >
+      <DetailBox
+        @close="closeDetal"
+        :data="labelDetail"
+        :moduleType="1"
+        v-if="labelDetail.questionMapping&&labelDetail.questionMapping.length>0"
+        @pComplete="complete"
+      />
     </div>
-    <Toast :message="delText" 
-          :show="showToast"
-          @comfirn="comfirnDel" 
-          @cancel="cancelDel"/>
+    <Toast
+      :message="delText"
+      :show="showToast"
+      @comfirn="comfirnDel"
+      @cancel="cancelDel"
+    />
+    <Search
+      v-if="searchShow"
+      @search="search"
+      @showDetil="showDetil"
+      :age="age"
+      :chooseSymp="chooseSymp"
+      :sexType="sexType"
+    ></Search>
   </div>
 </template>
 <script type="text/javascript">
 import api from '@utils/api.js';
 import DetailBox from './DetailBox.vue';
 import Toast from '../common/Toast.vue';
-  export default {
-    name:'Symptom',
-    data(){
-      let {datas,pathInfo} = this.$store.state;
-      const {choose,text} = this.$store.state.symptom;
-      return {
-        age:pathInfo.patientAge,
-        sexType:pathInfo.patientSex=='男'?1:(pathInfo.patientSex=='女'?2:3),
-        deptName:pathInfo.selfDeptName,
-        hosCode:pathInfo.hospitalCode,
-        choose:false,
-        check:false,
-        show:false, //显示明细
-        chooseSymp:choose, //已选症状
-        symp:[], //症状
-        labelDetail:{}, //明细
-        checkText:text, //症状情况文字
-        questId:null, //id
-        delText:"是否删除该信息?<br/> (已填内容将清除)",
-        delIndex:null,
-        showToast:false,
-        finished:false,   //是否填写了明细
-      }
+import Search from './Search.vue';
+export default {
+  name: 'Symptom',
+  data() {
+    let { datas, pathInfo } = this.$store.state;
+    const { choose, text } = this.$store.state.symptom;
+    return {
+      age: pathInfo.patientAge,
+      sexType: pathInfo.patientSex == '男' ? 1 : (pathInfo.patientSex == '女' ? 2 : 3),
+      deptName: pathInfo.selfDeptName,
+      hosCode: pathInfo.hospitalCode,
+      choose: false,
+      check: false,
+      show: false, //显示明细
+      chooseSymp: choose, //已选症状
+      symp: [], //症状
+      labelDetail: {}, //明细
+      checkText: text, //症状情况文字
+      questId: null, //id
+      delText: "是否删除该信息?<br/> (已填内容将清除)",
+      delIndex: null,
+      showToast: false,
+      finished: false,   //是否填写了明细
+      searchShow: false,//显示搜索界面
+    }
+  },
+  created() {
+    if (this.chooseSymp.length > 0) {
+      // 推送
+      const sympText = this.getSympText();
+      this.getPush(sympText);
+    } else {
+      this.getSympList(); //常见
+    }
+  },
+  methods: {
+    searchVal(val) {
+      console.log(val)
     },
-    created(){
-      if(this.chooseSymp.length>0){
-        // 推送
-        const sympText = this.getSympText();
-        this.getPush(sympText);
-      }else{
-        this.getSympList(); //常见
-      } 
+    search(flg) {
+      this.searchShow = flg
     },
-    methods:{
-      getSympList(){ 
-        const param = {
-          "age":this.age,
-          "deptName":this.deptName,
-          "sexType":this.sexType
+    getSympList() {
+      const param = {
+        "age": this.age,
+        "deptName": this.deptName,
+        "sexType": this.sexType
+      }
+      api.getSymptom(param).then((res) => {
+        const result = res.data;
+        if (result.code == 0) {
+          this.symp = result.data;
         }
-        api.getSymptom(param).then((res)=>{
-          const result = res.data;
-          if(result.code==0){
-            this.symp = result.data;
-          }
-        })
-      },
-      toNext(){
-        // 把1切换成完成图标,且2高亮--判断有几个模块显示,1个--提交预览;1个以上--下一步
-        if(this.chooseSymp.length==0){return}
-        this.$emit('next');
-        // 把症状情况的数据存起-已选
-        this.$store.commit('setChoose',{choose:this.chooseSymp,type:"1"});
+      })
+    },
+    toNext() {
+      // 把1切换成完成图标,且2高亮--判断有几个模块显示,1个--提交预览;1个以上--下一步
+      // if(this.chooseSymp.length==0){return}
+      this.$emit('next');
+      // 把症状情况的数据存起-已选
+      this.$store.commit('setChoose', { choose: this.chooseSymp, type: "1" });
 
-      },
-      showDetil(item){console.log("getById:",item)
-        this.chooseSymp.push(item);
-        this.questId = item.questionId || item.id || item.conceptId;
-        const id = item.questionId || item.id; //常见症状questionId,推送id,两者均有可能没有
-        //将选中的name存到store中的text
-        this.$store.commit('setText',{type:"1",text:item.name,pId:this.questId});
-        if(id){
-          const param = {
-            "age":this.age,
-            "id":id,
-            "sexType":this.sexType
-          }
-          api.getById(param).then((res)=>{
-            const result = res.data;
-            if(result.code==0){
-              const mapping = result.data.questionMapping;
-              this.labelDetail = result.data;
-              this.$store.commit('setOrigin',{type:"1",data:result.data});
-              if(mapping&&mapping.length>0){
-                this.show = true;
-              }
-            }
-          })
-        }else{//没有questionId或id 就没有详情,则直接调推送
-          const sympText = this.getSympText();
-          this.getPush(sympText);
-          this.checkText = this.$store.state.symptom.text;
-        }
-        
-      },
-      getSympText(){
-        const text = this.$store.state.symptom.text;
-        let msg = "";
-        for(let i in text){
-          msg += text[i].text;
-        }
-        return msg;
-      },
-      getPush(symptoms){//推理
+    },
+    showDetil(item) {      console.log("getById:", item)
+      this.chooseSymp.push(item);
+      this.questId = item.questionId || item.id || item.conceptId;
+      const id = item.questionId || item.id; //常见症状questionId,推送id,两者均有可能没有
+      //将选中的name存到store中的text
+      this.$store.commit('setText', { type: "1", text: item.name, pId: this.questId });
+      if (id) {
         const param = {
-          "age":this.age,
-          "hosCode":this.hosCode,
-          "sex":this.sexType,
-          "symptom":symptoms //症状+选择的明细,string
+          "age": this.age,
+          "id": id,
+          "sexType": this.sexType
         }
-        api.getPush(param).then((res)=>{
+        api.getById(param).then((res) => {
           const result = res.data;
-          if(result.code==0){
-            this.symp = result.data.symptom;
+          if (result.code == 0) {
+            const mapping = result.data.questionMapping;
+            this.labelDetail = result.data;
+            this.$store.commit('setOrigin', { type: "1", data: result.data });
+            if (mapping && mapping.length > 0) {
+              this.show = true;
+            }
           }
         })
-      },
-      closeDetal(){
-        // 推理 
+      } else {//没有questionId或id 就没有详情,则直接调推送
         const sympText = this.getSympText();
         this.getPush(sympText);
-        this.show = false;
-        this.questId = null;
-      },
-      deletSymp(item,index){
-        this.delIndex = index;
-        this.questId = item.questionId || item.conceptId;
-        if(this.chooseSymp.length==1){
-          this.delText = "是否删除该信息?删除后将重新填写预问诊流程 (已填内容将清除)"
-        }
-        this.showToast = true;
-      },
-      comfirnDel(){
-        this.chooseSymp.splice(this.delIndex,1);
-        // delete(this.checkText[this.questId]);
-        this.checkText.splice(this.delIndex,1);
-        this.$store.commit('delText',{type:"1",pId:this.questId})
-        // 删除完-常见;其他-推送
-        if(this.chooseSymp.length>0){
-          const sympText = this.getSympText();
-          this.getPush(sympText);//删除后重新调推理-入参:拼好的内容
-        }else{
-          this.getSympList();
-        } 
-        this.cancelDel();
-      },
-      cancelDel(){
-        this.showToast = false;
-        this.delIndex = null;
-        this.questId = null;
-        this.delText = "是否删除该信息?<br/> (已填内容将清除)";
-      },
-      complete(){//明细填写完成
         this.checkText = this.$store.state.symptom.text;
-        this.show = false;
-        this.questId = null;
-        // 推理 
-        const sympText = this.getSympText();
-        this.getPush(sympText);
-      },
-      showChecked(item){  
-        const origin = this.$store.state.symptom.origin;
-        const read = this.$store.state.symptom.datas;
-        const data = read[item.questionId] || origin[item.questionId];
-        if(data.questionMapping&&data.questionMapping.length>0){
-          this.labelDetail = data;
-          this.show = true;
+      }
+
+    },
+    getSympText() {
+      const text = this.$store.state.symptom.text;
+      let msg = "";
+      for (let i in text) {
+        msg += text[i].text;
+      }
+      return msg;
+    },
+    getPush(symptoms) {//推理
+      const param = {
+        "age": this.age,
+        "hosCode": this.hosCode,
+        "sex": this.sexType,
+        "symptom": symptoms //症状+选择的明细,string
+      }
+      api.getPush(param).then((res) => {
+        const result = res.data;
+        if (result.code == 0) {
+          this.symp = result.data.symptom;
         }
+      })
+    },
+    closeDetal() {
+      // 推理 
+      const sympText = this.getSympText();
+      this.getPush(sympText);
+      this.show = false;
+      this.questId = null;
+    },
+    deletSymp(item, index) {
+      this.delIndex = index;
+      this.questId = item.questionId || item.conceptId;
+      if (this.chooseSymp.length == 1) {
+        this.delText = "是否删除该信息?删除后将重新填写预问诊流程 (已填内容将清除)"
       }
+      this.showToast = true;
     },
-    components:{
-      DetailBox,
-      Toast
+    comfirnDel() {
+      this.chooseSymp.splice(this.delIndex, 1);
+      // delete(this.checkText[this.questId]);
+      this.checkText.splice(this.delIndex, 1);
+      this.$store.commit('delText', { type: "1", pId: this.questId })
+      // 删除完-常见;其他-推送
+      if (this.chooseSymp.length > 0) {
+        const sympText = this.getSympText();
+        this.getPush(sympText);//删除后重新调推理-入参:拼好的内容
+      } else {
+        this.getSympList();
+      }
+      this.cancelDel();
     },
-  }
+    cancelDel() {
+      this.showToast = false;
+      this.delIndex = null;
+      this.questId = null;
+      this.delText = "是否删除该信息?<br/> (已填内容将清除)";
+    },
+    complete() {//明细填写完成
+      this.checkText = this.$store.state.symptom.text;
+      this.show = false;
+      this.questId = null;
+      // 推理 
+      const sympText = this.getSympText();
+      this.getPush(sympText);
+    },
+    showChecked(item) {
+      const origin = this.$store.state.symptom.origin;
+      const read = this.$store.state.symptom.datas;
+      const data = read[item.questionId] || origin[item.questionId];
+      if (data.questionMapping && data.questionMapping.length > 0) {
+        this.labelDetail = data;
+        this.show = true;
+      }
+    }
+  },
+  components: {
+    DetailBox,
+    Toast,
+    Search
+  },
+}
 </script>
 <style lang="less" scoped>
-@import '../less/base.less';
-  .symp-wrap{
-    font-size: .3rem;
-    .quest{
-      color: #000;
-      margin-bottom: .36rem;
-      font-weight: 700;
+@import "../less/base.less";
+.symp-wrap {
+  font-size: 0.3rem;
+  .quest {
+    color: #000;
+    margin-bottom: 0.36rem;
+    font-weight: 700;
+    .searchImg {
+      width: 0.44rem;
+      height: 0.44rem;
+      float: right;
     }
   }
-  .choose{
-    padding-bottom: .2rem;
-    .choo-symp{
+}
+.choose {
+  padding-bottom: 0.2rem;
+  .choo-symp {
+    display: inline-block;
+    width: 1.9rem;
+    height: 0.74rem;
+    background: linear-gradient(-270deg, #4f4fff, #4f8bff);
+    box-shadow: 0 0.08rem 0.16rem 0 rgba(79, 129, 255, 0.4);
+    border-radius: 0.08rem;
+    white-space: nowrap;
+    margin: 0 0.3rem 0.3rem 0;
+    span {
       display: inline-block;
-      width:1.9rem;
-      height: .74rem;
-      background: linear-gradient(-270deg, #4F4FFF, #4F8BFF);
-      box-shadow: 0 .08rem .16rem 0 rgba(79,129,255,0.40);
-      border-radius: .08rem;
-      white-space: nowrap;
-      margin: 0 .3rem .3rem 0;
-      span{
-        display: inline-block;
-        vertical-align: top;
-      }
-      span:first-child{
-        width:1.34rem;
-        height: .74rem;
-        line-height: .74rem;
-        text-align: center;
-        color: #fff;
-      }
-      img{
-        width:.56rem;
-        height: .74rem;
-      }
-      .over{
-        .over;
-      }
+      vertical-align: top;
     }
-  }
-  .label{
-    .label;
-  }
-  .result{
-    .title{
-      color: #4F50FF;
-      padding-left: .1rem;
-      border-left: .08rem solid #4F50FF;
-      margin-bottom: .19rem;
-      font-weight: 700;
+    span:first-child {
+      width: 1.34rem;
+      height: 0.74rem;
+      line-height: 0.74rem;
+      text-align: center;
+      color: #fff;
     }
-    p{
-      color: #666;
-      line-height: .44rem;
+    img {
+      width: 0.56rem;
+      height: 0.74rem;
+    }
+    .over {
+      .over;
     }
   }
-  .footer{
-    .footer;
-  }
-  .nofoot{
-    opacity: 0.3;
-    background: linear-gradient(-270deg,#4F4FFF, #4F8BFF);
+}
+.label {
+  .label;
+}
+.result {
+  .title {
+    color: #4f50ff;
+    padding-left: 0.1rem;
+    border-left: 0.08rem solid #4f50ff;
+    margin-bottom: 0.19rem;
+    font-weight: 700;
   }
-  .detail{
-    .mask;
-    z-index: 66;
+  p {
+    color: #666;
+    line-height: 0.44rem;
   }
+}
+.footer {
+  .footer;
+}
+.nofoot {
+  opacity: 0.3;
+  background: linear-gradient(-270deg, #4f4fff, #4f8bff);
+}
+.detail {
+  .mask;
+  z-index: 66;
+}
 </style>

+ 0 - 1
src/components/TabPage.vue

@@ -87,7 +87,6 @@ export default {
   },
   methods: {
     toNext(preview) {
-      console.log(preview)
       if(preview === 'preview'){
         this.moduleShow=false
         return

BIN
src/images/complete.png


BIN
src/images/search.png


BIN
src/images/searchB.png


+ 7 - 0
src/utils/api.js

@@ -11,6 +11,7 @@ const urls = {
   saveInquiry:'/api/prec/inquiryInfo/saveInquiry',//保存问诊记录
   uploadImage:'/api/prec/file/uploadImage',//单个文件上传同时生成缩略图
   uploadImageThums:'/api/prec/file/uploadImageThums',//多个文件上传同时生成缩略图
+  getTagInfos:'/api/prec/retrieval/getTagInfos',//检索
   // uploadImageThums:'http://192.168.3.1:8849/file/uploadImageThums',//多个文件上传同时生成缩略图
 }
 
@@ -42,4 +43,10 @@ export default {
   uploadImage(param){
     return axios.post(urls.uploadImage,param)
   },
+  getTagInfos(param){
+    return axios.post(urls.getTagInfos,param)
+  },
+  saveInquiry(param){
+    return axios.post(urls.saveInquiry,param)
+  },
 }