|
@@ -1,41 +1,51 @@
|
|
<template>
|
|
<template>
|
|
- <div class="symp-wrap">
|
|
|
|
- <div
|
|
|
|
- class="choose"
|
|
|
|
- v-if="chooseSymp.length>0"
|
|
|
|
- >
|
|
|
|
- <p class="quest">已选症状</p>
|
|
|
|
- <p
|
|
|
|
- class="choo-symp"
|
|
|
|
- v-for="(v,i) in chooseSymp"
|
|
|
|
|
|
+ <div class="symp-wrap symper">
|
|
|
|
+ <div class="content">
|
|
|
|
+ <div
|
|
|
|
+ class="choose"
|
|
|
|
+ v-if="chooseSymp.length>0"
|
|
>
|
|
>
|
|
- <span @click="showChecked(v)">{{v.name}}</span>
|
|
|
|
- <span @click="deletSymp(v,i)"><img
|
|
|
|
- src="../images/del.png"
|
|
|
|
|
|
+ <p class="quest">已选症状</p>
|
|
|
|
+ <p
|
|
|
|
+ class="choo-symp"
|
|
|
|
+ v-for="(v,i) in chooseSymp"
|
|
|
|
+ >
|
|
|
|
+ <span @click="showChecked(v)">{{v.description || v.name}}</span>
|
|
|
|
+ <span @click="deletSymp(v,i)"><img
|
|
|
|
+ src="../images/del.png"
|
|
|
|
+ alt=""
|
|
|
|
+ ></span>
|
|
|
|
+ </p>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="label">
|
|
|
|
+ <p class="quest" id="test">{{quesText}}<img
|
|
|
|
+ @click="search(true)"
|
|
|
|
+ class="searchImg"
|
|
|
|
+ src="../images/search.png"
|
|
alt=""
|
|
alt=""
|
|
- ></span>
|
|
|
|
- </p>
|
|
|
|
- </div>
|
|
|
|
- <div class="label">
|
|
|
|
- <p class="quest">{{quesText}}<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"
|
|
|
|
- >
|
|
|
|
- <p class="title">{{nameStr}}</p>
|
|
|
|
- <p v-for="(value,index) in checkText">{{value.textP}}</p>
|
|
|
|
|
|
+ ></p>
|
|
|
|
+ <!-- <span
|
|
|
|
+ class="symp"
|
|
|
|
+ v-for="(it,ind) in symp"
|
|
|
|
+ :key="it.conceptId"
|
|
|
|
+ @click="showDetil(it)"
|
|
|
|
+ >{{it.description || it.name}}</span> -->
|
|
|
|
+ <!-- 暂时隐藏长按显示功能 -->
|
|
|
|
+ <span
|
|
|
|
+ class="symp"
|
|
|
|
+ v-for="(it,ind) in symp"
|
|
|
|
+ :key="it.conceptId"
|
|
|
|
+ @touchstart.stop.prevent="touchstart(it)"
|
|
|
|
+ @touchend.stop.prevent="touchend(it)"
|
|
|
|
+ >{{it.description || it.name}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div
|
|
|
|
+ class="result"
|
|
|
|
+ v-if="checkText.length>0"
|
|
|
|
+ >
|
|
|
|
+ <p class="title">{{nameStr}}</p>
|
|
|
|
+ <p v-for="(value,index) in checkText">{{value.textP}}</p>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div v-if="modluesLen>1"
|
|
<div v-if="modluesLen>1"
|
|
:class="['footer',{'nofoot':chooseSymp.length==0}]"
|
|
:class="['footer',{'nofoot':chooseSymp.length==0}]"
|
|
@@ -45,19 +55,6 @@
|
|
:class="['footer',{'nofoot':chooseSymp.length==0}]"
|
|
:class="['footer',{'nofoot':chooseSymp.length==0}]"
|
|
@click="toNext"
|
|
@click="toNext"
|
|
>预览并提交病历</div>
|
|
>预览并提交病历</div>
|
|
- <div
|
|
|
|
- class="detail"
|
|
|
|
- v-if="show"
|
|
|
|
- >
|
|
|
|
- <DetailBox
|
|
|
|
- @close="closeDetal"
|
|
|
|
- :data="labelDetail"
|
|
|
|
- :moduleType="1"
|
|
|
|
- v-if="labelDetail.questionMapping&&labelDetail.questionMapping.length>0"
|
|
|
|
- @pComplete="complete"
|
|
|
|
- @reload="reload"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
<Toast
|
|
<Toast
|
|
:message="delText"
|
|
:message="delText"
|
|
:show="showToast"
|
|
:show="showToast"
|
|
@@ -65,33 +62,35 @@
|
|
@cancel="cancelDel"
|
|
@cancel="cancelDel"
|
|
/>
|
|
/>
|
|
<Search
|
|
<Search
|
|
- v-if="searchShow"
|
|
|
|
|
|
+ v-if="this.$store.state.searchShow"
|
|
@search="search"
|
|
@search="search"
|
|
@showDetil="showDetil"
|
|
@showDetil="showDetil"
|
|
:age="age"
|
|
:age="age"
|
|
:chooseSymp="chooseSymp"
|
|
:chooseSymp="chooseSymp"
|
|
:sexType="sexType"
|
|
:sexType="sexType"
|
|
></Search>
|
|
></Search>
|
|
|
|
+ <Tiptoast :show="showExp" :data="message" @close="closeTip"/>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
import api from '@utils/api.js';
|
|
import api from '@utils/api.js';
|
|
import DetailBox from './DetailBox.vue';
|
|
import DetailBox from './DetailBox.vue';
|
|
import Toast from '../common/Toast.vue';
|
|
import Toast from '../common/Toast.vue';
|
|
|
|
+import Tiptoast from '../common/Tiptoast.vue';
|
|
import Search from './Search.vue';
|
|
import Search from './Search.vue';
|
|
-import {moduleCP} from '@utils/tools'
|
|
|
|
|
|
+import {moduleCP,setScroll,trimDots} from '@utils/tools'
|
|
|
|
+import BScroll from 'better-scroll';
|
|
export default {
|
|
export default {
|
|
name: 'Symptom',
|
|
name: 'Symptom',
|
|
props:['modluesLen','nameStr'],
|
|
props:['modluesLen','nameStr'],
|
|
data() {
|
|
data() {
|
|
- let { datas, pathInfo } = this.$store.state;
|
|
|
|
|
|
+ let { datas, pathInfo,searchShow } = this.$store.state;
|
|
const { choose, text } = this.$store.state.symptom;
|
|
const { choose, text } = this.$store.state.symptom;
|
|
return {
|
|
return {
|
|
age: pathInfo.patientAge,
|
|
age: pathInfo.patientAge,
|
|
sexType: pathInfo.patientSex == '男' ? 1 : (pathInfo.patientSex == '女' ? 2 : 3),
|
|
sexType: pathInfo.patientSex == '男' ? 1 : (pathInfo.patientSex == '女' ? 2 : 3),
|
|
deptName: pathInfo.selfDeptName,
|
|
deptName: pathInfo.selfDeptName,
|
|
hosCode: pathInfo.hospitalCode,
|
|
hosCode: pathInfo.hospitalCode,
|
|
- show: false, //显示明细
|
|
|
|
chooseSymp: choose, //已选症状
|
|
chooseSymp: choose, //已选症状
|
|
symp: [], //症状
|
|
symp: [], //症状
|
|
labelDetail: {}, //明细
|
|
labelDetail: {}, //明细
|
|
@@ -100,10 +99,18 @@ export default {
|
|
delText: "是否删除该信息?<br/>(已填内容将清除)",
|
|
delText: "是否删除该信息?<br/>(已填内容将清除)",
|
|
delIndex: null,
|
|
delIndex: null,
|
|
showToast: false,
|
|
showToast: false,
|
|
- searchShow: false,//显示搜索界面
|
|
|
|
|
|
+ searchShow: searchShow,//显示搜索界面
|
|
tmpItem:{},//检索的症状
|
|
tmpItem:{},//检索的症状
|
|
isSearch:false,
|
|
isSearch:false,
|
|
- quesText:"请问您有哪些不适?",
|
|
|
|
|
|
+ scroll:null,
|
|
|
|
+ quesText:"请问您这次哪里最不舒服?",
|
|
|
|
+ startTime:'',
|
|
|
|
+ timer:null,
|
|
|
|
+ showExp:false,
|
|
|
|
+ message:{
|
|
|
|
+ title:'',
|
|
|
|
+ text:''
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -116,12 +123,40 @@ export default {
|
|
this.getSympList(); //常见
|
|
this.getSympList(); //常见
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ mounted(){
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ let scroll = setScroll(BScroll,true,'.symper')
|
|
|
|
+ this.scroll = scroll
|
|
|
|
+ scroll.on('scroll', this.onScroll)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
- searchVal(val) {
|
|
|
|
- console.log(val)
|
|
|
|
|
|
+ touchstart(it){
|
|
|
|
+ this.startTime = +new Date();
|
|
|
|
+ const that = this;
|
|
|
|
+ this.timer = setTimeout(function(){
|
|
|
|
+ // 长按事件
|
|
|
|
+ that.showExp = true;
|
|
|
|
+ if(it.explains){
|
|
|
|
+ that.message.title = it.description || it.name;
|
|
|
|
+ that.message.text = it.explains;
|
|
|
|
+ }else{
|
|
|
|
+ that.message.title = "";
|
|
|
|
+ that.message.text = "暂无资料";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },600)
|
|
|
|
+ },
|
|
|
|
+ closeTip(){
|
|
|
|
+ this.showExp = false,
|
|
|
|
+ this.message.title = '';
|
|
|
|
+ this.message.text = '';
|
|
|
|
+ },
|
|
|
|
+ onScroll() {
|
|
|
|
+ document.activeElement.scrollIntoViewIfNeeded(true);
|
|
},
|
|
},
|
|
search(flg) {
|
|
search(flg) {
|
|
- this.searchShow = flg
|
|
|
|
|
|
+ this.$store.commit('setSearchShow', flg);
|
|
},
|
|
},
|
|
|
|
|
|
getSympList() {
|
|
getSympList() {
|
|
@@ -147,16 +182,13 @@ export default {
|
|
}else{
|
|
}else{
|
|
this.$emit('next');
|
|
this.$emit('next');
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
- showDetil(item,flg) {
|
|
|
|
- this.tmpItem=item
|
|
|
|
- this.isSearch=flg||false
|
|
|
|
|
|
+ common(item,flg){
|
|
this.questId = item.questionId || item.id || item.conceptId;
|
|
this.questId = item.questionId || item.id || item.conceptId;
|
|
const id = item.questionId || item.id; //常见症状questionId,推送id,两者均有可能没有
|
|
const id = item.questionId || item.id; //常见症状questionId,推送id,两者均有可能没有
|
|
//将选中的name存到store中的text
|
|
//将选中的name存到store中的text
|
|
- this.$store.commit('setText', { type: moduleCP['symp'], text: item.name,textP: item.name, pId: this.questId });
|
|
|
|
- this.quesText = "请问您还有其他不适吗?";
|
|
|
|
|
|
+ this.$store.commit('setText', { type: moduleCP['symp'], text: item.name,textP: item.description||item.name, pId: this.questId });
|
|
|
|
+
|
|
if (id) {
|
|
if (id) {
|
|
const param = {
|
|
const param = {
|
|
"age": this.age,
|
|
"age": this.age,
|
|
@@ -170,35 +202,44 @@ export default {
|
|
this.labelDetail = result.data;
|
|
this.labelDetail = result.data;
|
|
this.$store.commit('setOrigin', { type: moduleCP['symp'], data: result.data });
|
|
this.$store.commit('setOrigin', { type: moduleCP['symp'], data: result.data });
|
|
if (mapping && mapping.length > 0) {
|
|
if (mapping && mapping.length > 0) {
|
|
- this.show = true;
|
|
|
|
|
|
+ this.$store.commit('setDetail',{detail:result.data,ppId:null,moduleType:moduleCP['symp']})
|
|
if(flg){
|
|
if(flg){
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.chooseSymp.push(item);
|
|
this.chooseSymp.push(item);
|
|
- } else { //没有详情,推送
|
|
|
|
- const sympText = this.getSympText();
|
|
|
|
- this.getPush(sympText);
|
|
|
|
|
|
+ } else {
|
|
this.chooseSymp.push(item);
|
|
this.chooseSymp.push(item);
|
|
- this.searchShow = false
|
|
|
|
- // this.complete()
|
|
|
|
|
|
+ this.$store.commit('setSearchShow', false);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
})
|
|
})
|
|
- } else {//没有questionId或id 则直接调推送
|
|
|
|
|
|
+ } else {//没有questionId或id
|
|
this.chooseSymp.push(item);
|
|
this.chooseSymp.push(item);
|
|
- const sympText = this.getSympText();
|
|
|
|
- this.getPush(sympText);
|
|
|
|
this.checkText = this.$store.state.symptom.text;
|
|
this.checkText = this.$store.state.symptom.text;
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
- getSympText() {
|
|
|
|
|
|
+ showDetil(item,flg) {//搜索点开的详情
|
|
|
|
+ this.tmpItem=item
|
|
|
|
+ this.isSearch=flg||false
|
|
|
|
+ this.common(item,flg);
|
|
|
|
+ },
|
|
|
|
+ touchend(item,flg) {//症状点开详情
|
|
|
|
+ clearTimeout(this.timer);
|
|
|
|
+ let endTime = +new Date();
|
|
|
|
+ if(endTime - this.startTime < 500){//点击事件
|
|
|
|
+ this.common(item,flg);
|
|
|
|
+ }
|
|
|
|
+ this.startTime = "";
|
|
|
|
+ },
|
|
|
|
+ getSympText() {//推送使用医生端信息
|
|
const text = this.$store.state.symptom.text;
|
|
const text = this.$store.state.symptom.text;
|
|
let msg = "";
|
|
let msg = "";
|
|
for (let i in text) {
|
|
for (let i in text) {
|
|
- msg += text[i].text;
|
|
|
|
|
|
+ if(text[i] && text[i].text){
|
|
|
|
+ msg += text[i].text;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- return msg;
|
|
|
|
|
|
+ return trimDots(msg);
|
|
},
|
|
},
|
|
getPush(symptoms) {//推理
|
|
getPush(symptoms) {//推理
|
|
const param = {
|
|
const param = {
|
|
@@ -214,13 +255,6 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- closeDetal() {
|
|
|
|
- // 推理
|
|
|
|
- const sympText = this.getSympText();
|
|
|
|
- this.getPush(sympText);
|
|
|
|
- this.show = false;
|
|
|
|
- this.questId = null;
|
|
|
|
- },
|
|
|
|
deletSymp(item, index) {
|
|
deletSymp(item, index) {
|
|
this.delIndex = index;
|
|
this.delIndex = index;
|
|
this.questId = item.questionId || item.id || item.conceptId;
|
|
this.questId = item.questionId || item.id || item.conceptId;
|
|
@@ -237,13 +271,14 @@ export default {
|
|
this.$store.commit('setDatas', { type: moduleCP['symp'], pId: this.questId ,data:''})
|
|
this.$store.commit('setDatas', { type: moduleCP['symp'], pId: this.questId ,data:''})
|
|
// 删除完-常见;其他-推送
|
|
// 删除完-常见;其他-推送
|
|
if (this.chooseSymp.length > 0) {
|
|
if (this.chooseSymp.length > 0) {
|
|
- const sympText = this.getSympText();
|
|
|
|
- this.getPush(sympText);//删除后重新调推理-入参:拼好的内容
|
|
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
// 全部删除完 重新走问诊流程
|
|
// 全部删除完 重新走问诊流程
|
|
// this.$router.push("/")
|
|
// this.$router.push("/")
|
|
- this.$router.replace({path:'/'})
|
|
|
|
- // this.getSympList();
|
|
|
|
|
|
+ // this.$router.replace({path:'/'})
|
|
|
|
+ // 停留在当前页 8-19
|
|
|
|
+ this.quesText = "请问您这次哪里最不舒服?";
|
|
|
|
+ this.getSympList();
|
|
}
|
|
}
|
|
this.cancelDel();
|
|
this.cancelDel();
|
|
},
|
|
},
|
|
@@ -253,46 +288,48 @@ export default {
|
|
this.questId = null;
|
|
this.questId = null;
|
|
this.delText = "是否删除该信息?<br/>(已填内容将清除)";
|
|
this.delText = "是否删除该信息?<br/>(已填内容将清除)";
|
|
},
|
|
},
|
|
- complete() {//明细填写完成
|
|
|
|
- this.searchShow = false;
|
|
|
|
- this.checkText = this.$store.state.symptom.text;
|
|
|
|
- this.show = false;
|
|
|
|
- this.questId = null;
|
|
|
|
- // 推理
|
|
|
|
- const sympText = this.getSympText();
|
|
|
|
- this.getPush(sympText);
|
|
|
|
- },
|
|
|
|
showChecked(item) {
|
|
showChecked(item) {
|
|
const origin = this.$store.state.symptom.origin;
|
|
const origin = this.$store.state.symptom.origin;
|
|
const read = this.$store.state.symptom.datas;
|
|
const read = this.$store.state.symptom.datas;
|
|
const data = read[(item.questionId||item.id)] || origin[(item.questionId||item.id)];
|
|
const data = read[(item.questionId||item.id)] || origin[(item.questionId||item.id)];
|
|
- if (data.questionMapping && data.questionMapping.length > 0) {
|
|
|
|
- this.labelDetail = data;
|
|
|
|
- this.show = true;
|
|
|
|
|
|
+ if (data&&data.questionMapping && data.questionMapping.length > 0) {
|
|
|
|
+ this.$store.commit('setDetail',{detail:data,ppId:null,moduleType:moduleCP['symp']})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- reload(id) {//清空重新赋值
|
|
|
|
- const read = this.$store.state.symptom.datas;
|
|
|
|
- const data = read[id];
|
|
|
|
- this.labelDetail = data;
|
|
|
|
- }
|
|
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
DetailBox,
|
|
DetailBox,
|
|
Toast,
|
|
Toast,
|
|
- Search
|
|
|
|
|
|
+ Search,
|
|
|
|
+ Tiptoast
|
|
},
|
|
},
|
|
|
|
+ watch:{
|
|
|
|
+ checkText:{//更新推送
|
|
|
|
+ handler(newVal,oldVal){
|
|
|
|
+ const sympText = this.getSympText();
|
|
|
|
+ if(sympText){
|
|
|
|
+ this.getPush(sympText);
|
|
|
|
+ this.quesText = "请问您还有其他不适吗?";
|
|
|
|
+ }else{
|
|
|
|
+ this.getSympList();
|
|
|
|
+ this.quesText = "请问您这次哪里最不舒服?";
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ deep:true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
@import "../less/base.less";
|
|
@import "../less/base.less";
|
|
|
|
+
|
|
.symp-wrap {
|
|
.symp-wrap {
|
|
font-size: 0.3rem;
|
|
font-size: 0.3rem;
|
|
|
|
+ .btscroll;
|
|
.quest {
|
|
.quest {
|
|
color: #000;
|
|
color: #000;
|
|
margin-bottom: 0.36rem;
|
|
margin-bottom: 0.36rem;
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
- padding-right: .3rem;
|
|
|
|
.searchImg {
|
|
.searchImg {
|
|
width: 0.44rem;
|
|
width: 0.44rem;
|
|
height: 0.44rem;
|
|
height: 0.44rem;
|
|
@@ -305,21 +342,17 @@ export default {
|
|
.choo-symp{
|
|
.choo-symp{
|
|
display: inline-block;
|
|
display: inline-block;
|
|
min-width:1.9rem;
|
|
min-width:1.9rem;
|
|
- // min-width:1.42rem;
|
|
|
|
height: .74rem;
|
|
height: .74rem;
|
|
- // background: linear-gradient(-270deg, #4F4FFF, #4F8BFF);
|
|
|
|
background: linear-gradient(-270deg, #3638EE, #4E72FF);
|
|
background: linear-gradient(-270deg, #3638EE, #4E72FF);
|
|
box-shadow: 0 .08rem .16rem 0 rgba(79,129,255,0.40);
|
|
box-shadow: 0 .08rem .16rem 0 rgba(79,129,255,0.40);
|
|
border-radius: .08rem;
|
|
border-radius: .08rem;
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
- // margin: 0 .3rem .3rem 0;
|
|
|
|
margin: 0 .25rem .3rem 0;
|
|
margin: 0 .25rem .3rem 0;
|
|
span{
|
|
span{
|
|
display: inline-block;
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
vertical-align: top;
|
|
}
|
|
}
|
|
span:first-child{
|
|
span:first-child{
|
|
- // min-width:1.34rem;
|
|
|
|
min-width:1.42rem;
|
|
min-width:1.42rem;
|
|
height: .74rem;
|
|
height: .74rem;
|
|
line-height: .74rem;
|
|
line-height: .74rem;
|
|
@@ -327,7 +360,6 @@ export default {
|
|
color: #fff;
|
|
color: #fff;
|
|
}
|
|
}
|
|
img{
|
|
img{
|
|
- // width:.56rem;
|
|
|
|
width:.48rem;
|
|
width:.48rem;
|
|
height: .74rem;
|
|
height: .74rem;
|
|
}
|
|
}
|
|
@@ -366,12 +398,6 @@ export default {
|
|
.footer;
|
|
.footer;
|
|
}
|
|
}
|
|
.nofoot{
|
|
.nofoot{
|
|
- // opacity: 0.3;
|
|
|
|
- // background: linear-gradient(-270deg,#4F4FFF, #4F8BFF);
|
|
|
|
background:#CACCFF;
|
|
background:#CACCFF;
|
|
}
|
|
}
|
|
-.detail{
|
|
|
|
- .mask;
|
|
|
|
- z-index: 66;
|
|
|
|
-}
|
|
|
|
</style>
|
|
</style>
|