|
@@ -18,12 +18,17 @@
|
|
|
</p>
|
|
|
</div>
|
|
|
<div class="label">
|
|
|
- <p class="quest" id="test">{{quesText}}<img
|
|
|
- @click="search(true)"
|
|
|
+ <p class="quest" id="test">{{quesText}}</p>
|
|
|
+ <div class="searchWrap" @click="search(true)">
|
|
|
+ <input type="text" placeholder="搜索">
|
|
|
+ <img
|
|
|
class="searchImg"
|
|
|
src="../images/search.png"
|
|
|
alt=""
|
|
|
- ></p>
|
|
|
+ >
|
|
|
+ </div>
|
|
|
+ <p class="tips">常见症状(长按可解释该症状)</p>
|
|
|
+
|
|
|
<div class="showHide" ref="showHide">
|
|
|
<span
|
|
|
class="symp"
|
|
@@ -33,7 +38,12 @@
|
|
|
@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>
|
|
|
+ <p class="tip" @click="slideToggle" v-show="chooseSymp.length==0&&slide">
|
|
|
+ {{slideTxt}}
|
|
|
+ <span class="blueSlide" :style="{'transform':'rotate('+degNum+'deg)'}">
|
|
|
+ <img src="../images/blueSlide.png" />
|
|
|
+ </span>
|
|
|
+ </p>
|
|
|
</div>
|
|
|
<div
|
|
|
class="result"
|
|
@@ -51,14 +61,14 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div v-if="modluesLen>1"
|
|
|
- @click="toNext"
|
|
|
+ @click="toNext('',1)"
|
|
|
class="footer"
|
|
|
>
|
|
|
<div class="nextBtn" :class="{'nofoot':chooseSymp.length==0}">下一步</div>
|
|
|
</div>
|
|
|
<div v-if="modluesLen==1"
|
|
|
class="footer"
|
|
|
- @click="toNext"
|
|
|
+ @click="toNext(4)"
|
|
|
>
|
|
|
<div class="nextBtn" :class="{'nofoot':chooseSymp.length==0}">预览并提交病历</div>
|
|
|
</div>
|
|
@@ -73,9 +83,6 @@
|
|
|
v-if="this.$store.state.searchShow"
|
|
|
@search="search"
|
|
|
@showDetil="showDetil"
|
|
|
- :age="age"
|
|
|
- :chooseSymp="chooseSymp"
|
|
|
- :sexType="sexType"
|
|
|
></Search>
|
|
|
<Tiptoast :show="showExp" :data="message" @close="closeTip"/>
|
|
|
</div>
|
|
@@ -85,34 +92,25 @@ import api from '@utils/api.js';
|
|
|
import Toast from '../common/Toast.vue';
|
|
|
import Tiptoast from '../common/Tiptoast.vue';
|
|
|
import Search from './Search.vue';
|
|
|
-import {moduleCP,setScroll,trimDots} from '@utils/tools'
|
|
|
+import {moduleCP,setScroll,trimDots,setTitle,getRouteName} from '@utils/tools'
|
|
|
import Submit from "../common/Submit";
|
|
|
import BScroll from 'better-scroll';
|
|
|
+import {mapState} from 'vuex';
|
|
|
import $ from 'jquery';
|
|
|
export default {
|
|
|
name: 'Symptom',
|
|
|
- props:['modluesLen','nameStr'],
|
|
|
data() {
|
|
|
- let { datas, pathInfo,searchShow } = 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,
|
|
|
- chooseSymp: choose, //已选症状
|
|
|
symp: [], //症状
|
|
|
labelDetail: {}, //明细
|
|
|
- checkText: text, //症状情况文字
|
|
|
questId: null, //id
|
|
|
- delText: "是否删除该信息?<br/>(已填内容将清除)",
|
|
|
+ delText: "是否删除该症状?",
|
|
|
delIndex: null,
|
|
|
showToast: false,
|
|
|
- searchShow: searchShow,//显示搜索界面
|
|
|
tmpItem:{},//检索的症状
|
|
|
isSearch:false,
|
|
|
scroll:null,
|
|
|
- quesText:"请问您这次哪里最不舒服?",
|
|
|
+ quesText:"您哪里不舒服?",
|
|
|
startTime:'',
|
|
|
timer:null,
|
|
|
showExp:false,
|
|
@@ -124,13 +122,34 @@ export default {
|
|
|
start:{},
|
|
|
end:{},
|
|
|
slide:false,
|
|
|
- slideTxt:'展开',
|
|
|
+ slideTxt:'点击展开',
|
|
|
failMsg: "无法选择症状,已超过最大个数",
|
|
|
+ modluesLen:null,
|
|
|
+ nameStr:'',
|
|
|
+ degNum:0,
|
|
|
+ startNum:0
|
|
|
}
|
|
|
},
|
|
|
+ computed:{
|
|
|
+ ...mapState({
|
|
|
+ activeModule: state => state.activeModule,
|
|
|
+ searchShow: state => state.searchShow,//搜索界面显示
|
|
|
+ chooseSymp: state => state.symptom.choose,//已选症状
|
|
|
+ checkText: state => state.symptom.text,//症状情况文字
|
|
|
+ config: state => state.sysConfig,
|
|
|
+ pathInfo: state => state.pathInfo
|
|
|
+ }),
|
|
|
+ },
|
|
|
+
|
|
|
+ beforeRouteEnter (to, from , next) {
|
|
|
+ next(vm => {
|
|
|
+ // 通过 `vm` 访问组件实例
|
|
|
+ setTitle(vm.activeModule.obj.symptoms_show.name)
|
|
|
+ })
|
|
|
+ },
|
|
|
created() {
|
|
|
if (this.chooseSymp.length > 0) {
|
|
|
- this.quesText = "请问您还有其他不适吗?";
|
|
|
+ this.quesText = "您是否还有其他不舒服?";
|
|
|
// 推送
|
|
|
const sympText = this.getSympText();
|
|
|
this.getPush(sympText);
|
|
@@ -139,7 +158,12 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted(){
|
|
|
+ this.$store.commit('setFinish',1)
|
|
|
this.$nextTick(()=>{
|
|
|
+ let activePart = this.activeModule;
|
|
|
+ this.modluesLen = activePart.len
|
|
|
+ this.nameStr = activePart.obj.symptoms_show.name
|
|
|
+
|
|
|
let scroll = setScroll(BScroll,true,'.symper')
|
|
|
this.scroll = scroll
|
|
|
scroll.on('scroll', this.onScroll)
|
|
@@ -153,33 +177,45 @@ export default {
|
|
|
if(this.chooseSymp.length>1||localStorage.getItem("staticSymp")){
|
|
|
this.getPush(sympText);
|
|
|
}
|
|
|
- this.quesText = "请问您还有其他不适吗?";
|
|
|
+ this.quesText = "您是否还有其他不舒服?";
|
|
|
}else{
|
|
|
this.getSympList();
|
|
|
- this.quesText = "请问您这次哪里最不舒服?";
|
|
|
+ this.quesText = "您哪里不舒服?";
|
|
|
}
|
|
|
},
|
|
|
deep:true
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ toNext(flg,order) {
|
|
|
+ // 把1切换成完成图标,且2高亮--判断有几个模块显示,1个--提交预览;1个以上--下一步
|
|
|
+ if (this.chooseSymp.length == 0) { return }
|
|
|
+ // 把症状情况的数据存起-已选
|
|
|
+ this.$store.commit('setChoose', { choose: this.chooseSymp, type: moduleCP['symp'] });
|
|
|
+ this.$router.push({
|
|
|
+ path:getRouteName(flg?flg:'',this.activeModule.obj,order)
|
|
|
+ })
|
|
|
+ },
|
|
|
showSubmit(flg){
|
|
|
this.submit = flg;
|
|
|
},
|
|
|
slideToggle(){
|
|
|
let flg = this.slideTxt;
|
|
|
- if(flg == '展开'){
|
|
|
+ if(flg == '点击展开'){
|
|
|
this.$refs.showHide.style.height = 'auto'
|
|
|
- this.slideTxt = '收起'
|
|
|
+ this.slideTxt = '点击收起'
|
|
|
+ this.degNum = 180
|
|
|
}else{
|
|
|
this.$refs.showHide.style.height = '3rem'
|
|
|
- this.slideTxt = '展开'
|
|
|
+ this.slideTxt = '点击展开'
|
|
|
+ this.degNum = 0
|
|
|
}
|
|
|
},
|
|
|
touchend(item,flg) {//症状点开详情
|
|
|
clearTimeout(this.timer);
|
|
|
this.end = this.$store.state.scroll
|
|
|
if(JSON.stringify(this.start) != JSON.stringify(this.end)){
|
|
|
+ this.startNum = 0
|
|
|
return
|
|
|
}
|
|
|
let endTime = +new Date();
|
|
@@ -187,13 +223,18 @@ export default {
|
|
|
if(this.chooseSymp.length == 0){
|
|
|
item.idx = 1
|
|
|
}
|
|
|
- this.common(item,flg);
|
|
|
- this.slideTxt = '展开'
|
|
|
+ if(this.startNum == 1){
|
|
|
+ this.common(item,flg);
|
|
|
+ }
|
|
|
+ this.startNum = 0
|
|
|
+ this.slideTxt = '点击展开'
|
|
|
+ this.degNum = 0
|
|
|
}
|
|
|
this.startTime = "";
|
|
|
},
|
|
|
touchstart(it){
|
|
|
- this.start = this.$store.state.scroll
|
|
|
+ this.startNum = ++this.startNum;
|
|
|
+ this.start = this.$store.state.scroll;
|
|
|
this.startTime = +new Date();
|
|
|
const that = this;
|
|
|
this.timer = setTimeout(function(){
|
|
@@ -206,26 +247,26 @@ export default {
|
|
|
that.message.title = "";
|
|
|
that.message.text = "暂无资料";
|
|
|
}
|
|
|
+ this.startNum = 0
|
|
|
},600)
|
|
|
},
|
|
|
closeTip(){
|
|
|
this.showExp = false,
|
|
|
+ this.startNum = 0
|
|
|
this.message.title = '';
|
|
|
this.message.text = '';
|
|
|
},
|
|
|
onScroll(data) {
|
|
|
this.$store.commit('setScroll', data);
|
|
|
- document.activeElement.scrollIntoViewIfNeeded(true);
|
|
|
},
|
|
|
search(flg) {
|
|
|
this.$store.commit('setSearchShow', flg);
|
|
|
},
|
|
|
-
|
|
|
getSympList() {
|
|
|
const param = {
|
|
|
- "age": this.age,
|
|
|
- "deptName": this.deptName,
|
|
|
- "sexType": this.sexType
|
|
|
+ "age": this.pathInfo.patientAge,
|
|
|
+ "deptName": this.pathInfo.selfDeptName,
|
|
|
+ "sexType": this.pathInfo.sexType
|
|
|
}
|
|
|
api.getSymptom(param).then((res) => {
|
|
|
const result = res.data;
|
|
@@ -239,17 +280,6 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- toNext() {
|
|
|
- // 把1切换成完成图标,且2高亮--判断有几个模块显示,1个--提交预览;1个以上--下一步
|
|
|
- if (this.chooseSymp.length == 0) { return }
|
|
|
- // 把症状情况的数据存起-已选
|
|
|
- this.$store.commit('setChoose', { choose: this.chooseSymp, type: moduleCP['symp'] });
|
|
|
- if(this.modluesLen==1){
|
|
|
- this.$emit('next','preview')
|
|
|
- }else{
|
|
|
- this.$emit('next');
|
|
|
- }
|
|
|
- },
|
|
|
common(item,flg,sign){
|
|
|
if(this.chooseSymp.length>12){
|
|
|
this.$store.commit('setSearchShow', false);
|
|
@@ -265,9 +295,9 @@ export default {
|
|
|
//将选中的name存到store中的text
|
|
|
if (id&&this.chooseSymp.length == 0) {//只有第一次
|
|
|
const param = {
|
|
|
- "age": this.age,
|
|
|
+ "age": this.pathInfo.patientAge,
|
|
|
"id": id,
|
|
|
- "sexType": this.sexType
|
|
|
+ "sexType": this.pathInfo.sexType
|
|
|
}
|
|
|
localStorage.setItem("staticSymp",null)
|
|
|
this.$store.commit('setText', { type: moduleCP['symp'], text: (this.chooseSymp.length == 0?'患者出现':'')+item.name,textP: (this.chooseSymp.length == 0?'患者出现':'')+(item.description||item.name), pId: this.questId,idx:this.chooseSymp.length == 0?1:'' });
|
|
@@ -285,7 +315,6 @@ export default {
|
|
|
let signNum = 1;//第一个打标的,保存为伴随
|
|
|
for(let i = 0;i < mapping.length;i++){
|
|
|
let tmpMap = mapping[i]
|
|
|
- tmpMap.slide = 1
|
|
|
if(tmpMap.flag == 3 && signNum == 1){
|
|
|
++signNum
|
|
|
for(let j = 0;j < tmpMap.questionDetailList.length;j++){
|
|
@@ -301,11 +330,11 @@ export default {
|
|
|
if(sign){
|
|
|
return
|
|
|
}
|
|
|
+ this.hasSymptom(item)
|
|
|
this.$store.commit('setSearchShow', false);
|
|
|
- this.chooseSymp.push(item);
|
|
|
} else {
|
|
|
+ this.hasSymptom(item)
|
|
|
this.$store.commit('setSearchShow', false);
|
|
|
- this.chooseSymp.push(item);
|
|
|
}
|
|
|
result.data.questionMapping = mapping
|
|
|
this.labelDetail = result.data;
|
|
@@ -324,12 +353,23 @@ export default {
|
|
|
}
|
|
|
this.$store.commit('setText', { type: moduleCP['symp'], text: (this.chooseSymp.length == 0?'患者出现':'')+item.name,textP: (this.chooseSymp.length == 0?'患者出现':'')+(item.description||item.name), pId: this.questId,idx:this.chooseSymp.length == 0?1:'' });
|
|
|
this.$store.commit('setSearchShow', false);
|
|
|
- this.chooseSymp.push(item);
|
|
|
+ this.hasSymptom(item)
|
|
|
const sympText = this.getSympText();
|
|
|
this.getPush(sympText);
|
|
|
// this.checkText = this.$store.state.symptom.text;
|
|
|
}
|
|
|
},
|
|
|
+ hasSymptom(item){
|
|
|
+ let tmpLis = this.chooseSymp,num=0;
|
|
|
+ for(let i = 0;i<tmpLis.length;i++){
|
|
|
+ if(item.name != tmpLis[i].name){
|
|
|
+ ++num
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(num == tmpLis.length){
|
|
|
+ this.chooseSymp.push(item);
|
|
|
+ }
|
|
|
+ },
|
|
|
showDetil(item,flg) {//搜索点开的详情
|
|
|
this.tmpItem=item
|
|
|
this.isSearch=flg||false
|
|
@@ -348,50 +388,56 @@ export default {
|
|
|
},
|
|
|
getPush(symptoms) {//推理
|
|
|
const param = {
|
|
|
- "age": this.age,
|
|
|
- "hosCode": this.hosCode,
|
|
|
- "sex": this.sexType,
|
|
|
+ "age": this.pathInfo.patientAge,
|
|
|
+ "hosCode": this.pathInfo.hospitalCode,
|
|
|
+ "sex": this.pathInfo.sexType,
|
|
|
"symptom": symptoms //症状+选择的明细,string
|
|
|
}
|
|
|
api.getPush(param).then((res) => {
|
|
|
const result = res.data;
|
|
|
if (result.code == 0) {
|
|
|
- let symp = result.data.symptom||[];
|
|
|
- let symped = JSON.parse(JSON.stringify(this.chooseSymp));//已选症状
|
|
|
- let sympStic = JSON.parse(localStorage.getItem('staticSymp'))||[];//首次有无症状
|
|
|
- let sympAll = sympStic.concat(symp);
|
|
|
- var obj = {};
|
|
|
- sympAll = sympAll.reduce(function(item, next) {
|
|
|
- obj[next.name] ? '' : obj[next.name] = true && item.push(next);
|
|
|
- return item;
|
|
|
- }, []);
|
|
|
- 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.$refs.showHide.style.height = 'auto'
|
|
|
+ this.getSymptomLisCom(result)
|
|
|
+ }else{
|
|
|
+ this.getSymptomLisCom()
|
|
|
}
|
|
|
- }).catch(()=>{
|
|
|
-
|
|
|
+ }).catch((err)=>{
|
|
|
+
|
|
|
})
|
|
|
},
|
|
|
+ getSymptomLisCom(result){
|
|
|
+ let symp = (result&&result.data.symptom)||[];
|
|
|
+ let symped = JSON.parse(JSON.stringify(this.chooseSymp));//已选症状
|
|
|
+ let sympStic = JSON.parse(localStorage.getItem('staticSymp'))||[];//首次有无症状
|
|
|
+ let sympAll = sympStic.concat(symp);
|
|
|
+ var obj = {};
|
|
|
+ sympAll = sympAll.reduce(function(item, next) {
|
|
|
+ obj[next.name] ? '' : obj[next.name] = true && item.push(next);
|
|
|
+ return item;
|
|
|
+ }, []);
|
|
|
+ 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.$refs.showHide.style.height = 'auto'
|
|
|
+ },
|
|
|
deletSymp(item, index) {
|
|
|
this.delIndex = index;
|
|
|
this.questId = item.questionId || item.id || item.conceptId;
|
|
|
-
|
|
|
if (this.chooseSymp.length == 1) {
|
|
|
if(item.idx != 1){
|
|
|
- this.delText = "是否删除该信息?<br/>删除后将重新填写预问诊流程 <br/>"
|
|
|
+ this.delText = "是否删除该症状?"
|
|
|
}else{
|
|
|
- this.delText = "是否删除该信息?<br/>删除后将重新填写预问诊流程 <br/>(已填内容将清除)"
|
|
|
+ this.delText = "要删除症状,重新填写?"
|
|
|
}
|
|
|
}else{
|
|
|
if(item.idx != 1){
|
|
|
- this.delText = "是否删除该信息?"
|
|
|
+ this.delText = "是否删除该症状?"
|
|
|
+ }else{
|
|
|
+ this.delText = "要删除症状,重新填写?"
|
|
|
}
|
|
|
}
|
|
|
this.showToast = true;
|
|
@@ -413,7 +459,7 @@ export default {
|
|
|
// 全部删除完 重新走问诊流程
|
|
|
// this.$router.push("/")
|
|
|
// this.$router.replace({path:'/'})
|
|
|
- // 停留在当前页 8-19
|
|
|
+ // 停留在当前页 8-19
|
|
|
this.quesText = "请问您这次哪里最不舒服?";
|
|
|
this.getSympList();
|
|
|
}
|
|
@@ -425,7 +471,7 @@ export default {
|
|
|
this.showToast = false;
|
|
|
this.delIndex = null;
|
|
|
this.questId = null;
|
|
|
- this.delText = "是否删除该信息?<br/>(已填内容将清除)";
|
|
|
+ this.delText = "是否删除该症状?";
|
|
|
},
|
|
|
showChecked(item,i) {
|
|
|
const origin = this.$store.state.symptom.origin;
|
|
@@ -450,10 +496,29 @@ export default {
|
|
|
overflow: hidden;
|
|
|
height: 3rem;
|
|
|
}
|
|
|
-.tip span {
|
|
|
- color: #colors[theme];
|
|
|
- float: right;
|
|
|
- font-size: .28rem;
|
|
|
+.tips {
|
|
|
+ color: #AAAAAA;
|
|
|
+ margin-bottom:.2rem;
|
|
|
+ font-size: .26rem;
|
|
|
+}
|
|
|
+.tip {
|
|
|
+ font-size: .28rem !important;
|
|
|
+ text-align:center;
|
|
|
+ color: #colors[theme] !important;
|
|
|
+ .blueSlide {
|
|
|
+ display: inline-block;
|
|
|
+ position: relative;
|
|
|
+ height: 14px;
|
|
|
+ width: 14px;
|
|
|
+ top: 1px;
|
|
|
+ img {
|
|
|
+ width: 15px;
|
|
|
+ height:15px;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 1px;
|
|
|
+ left: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
.symp-wrap {
|
|
|
font-size: 0.3rem;
|
|
@@ -461,13 +526,31 @@ export default {
|
|
|
color: #colors[quest];
|
|
|
margin-bottom: 0.36rem;
|
|
|
font-weight: 700;
|
|
|
- .searchImg {
|
|
|
- width: 0.44rem;
|
|
|
- height: 0.44rem;
|
|
|
- float: right;
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
+.searchWrap {
|
|
|
+ border: 1px solid #E6E6E6;
|
|
|
+ height: .64rem;
|
|
|
+ border-radius: .32rem;
|
|
|
+ margin-bottom: .4rem;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: relative;
|
|
|
+ input {
|
|
|
+ height: 100%;
|
|
|
+ border-radius: .32rem;
|
|
|
+ padding-left:.7rem;
|
|
|
+ color: #AAAAAA;
|
|
|
+ }
|
|
|
+ .searchImg {
|
|
|
+ width: 0.44rem;
|
|
|
+ height: 0.44rem;
|
|
|
+ float: right;
|
|
|
+ position: absolute;
|
|
|
+ left: .2rem;
|
|
|
+ top: .05rem;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
.choose{
|
|
|
padding-bottom: .2rem;
|
|
|
position: relative;
|