|
@@ -34,10 +34,12 @@
|
|
|
<span
|
|
|
class="symp"
|
|
|
v-for="(it,ind) in symp"
|
|
|
+ v-if="ind<9||showAll"
|
|
|
:key="it.conceptId"
|
|
|
@touchstart.stop.prevent="touchstart(it)"
|
|
|
@touchend.stop.prevent="touchend(it)"
|
|
|
>{{it.description || it.name}}</span>
|
|
|
+ <p class="show-all" v-if="chooseSymp.length===0" @click="showAllLabel">{{showAll?"收起":"展开全部"}}</p>
|
|
|
<p class="tip" v-show="chooseSymp.length==0">长按症状按钮可显示症状解释说明</p>
|
|
|
</div>
|
|
|
<div
|
|
@@ -65,6 +67,7 @@
|
|
|
<Search
|
|
|
v-if="this.$store.state.searchShow"
|
|
|
@search="search"
|
|
|
+ @setText="common"
|
|
|
@showDetil="showDetil"
|
|
|
:age="age"
|
|
|
:chooseSymp="chooseSymp"
|
|
@@ -109,6 +112,7 @@ export default {
|
|
|
startTime:'',
|
|
|
timer:null,
|
|
|
showExp:false,
|
|
|
+ showAll:false, //默认显示9个症状,showAll=true展开全部
|
|
|
message:{
|
|
|
title:'',
|
|
|
text:''
|
|
@@ -136,6 +140,7 @@ export default {
|
|
|
touchstart(it){
|
|
|
this.startTime = +new Date();
|
|
|
const that = this;
|
|
|
+ this.start = this.$store.state.scroll;
|
|
|
this.timer = setTimeout(function(){
|
|
|
// 长按事件
|
|
|
that.showExp = true;
|
|
@@ -146,7 +151,7 @@ export default {
|
|
|
that.message.title = "";
|
|
|
that.message.text = "暂无资料";
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},600)
|
|
|
},
|
|
|
closeTip(){
|
|
@@ -191,8 +196,8 @@ export default {
|
|
|
const id = item.questionId || item.id; //常见症状questionId,推送id,两者均有可能没有
|
|
|
//将选中的name存到store中的text
|
|
|
this.$store.commit('setText', { type: moduleCP['symp'], text: item.name,textP: item.description||item.name, pId: this.questId });
|
|
|
-
|
|
|
- if (id) {
|
|
|
+ //不是第一个症状,都不弹出详情
|
|
|
+ if (this.chooseSymp.length === 0&&id) {
|
|
|
const param = {
|
|
|
"age": this.age,
|
|
|
"id": id,
|
|
@@ -203,20 +208,20 @@ export default {
|
|
|
if (result.code == 0) {
|
|
|
const mapping = result.data.questionMapping;
|
|
|
this.labelDetail = result.data;
|
|
|
- this.$store.commit('setOrigin', { type: moduleCP['symp'], data: result.data });
|
|
|
+ //this.$store.commit('setOrigin', { type: moduleCP['symp'], data: result.data }); //2544暂时不存,被删除后加上详情不会再显示
|
|
|
if (mapping && mapping.length > 0) {
|
|
|
this.$store.commit('setDetail',{detail:result.data,ppId:null,moduleType:moduleCP['symp']})
|
|
|
if(flg){
|
|
|
return
|
|
|
}
|
|
|
this.chooseSymp.push(item);
|
|
|
- } else {
|
|
|
+ } else {
|
|
|
this.chooseSymp.push(item);
|
|
|
this.$store.commit('setSearchShow', false);
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- } else {//没有questionId或id
|
|
|
+ } else {//没有questionId或id
|
|
|
this.chooseSymp.push(item);
|
|
|
this.checkText = this.$store.state.symptom.text;
|
|
|
}
|
|
@@ -228,12 +233,19 @@ export default {
|
|
|
},
|
|
|
touchend(item,flg) {//症状点开详情
|
|
|
clearTimeout(this.timer);
|
|
|
+ this.end = this.$store.state.scroll;
|
|
|
+ if(JSON.stringify(this.start)!== JSON.stringify(this.end)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
let endTime = +new Date();
|
|
|
if(endTime - this.startTime < 500){//点击事件
|
|
|
this.common(item,flg);
|
|
|
}
|
|
|
this.startTime = "";
|
|
|
},
|
|
|
+ showAllLabel(){
|
|
|
+ this.showAll = !this.showAll;
|
|
|
+ },
|
|
|
getSympText() {//推送使用医生端信息
|
|
|
const text = this.$store.state.symptom.text;
|
|
|
let msg = "";
|
|
@@ -272,7 +284,8 @@ export default {
|
|
|
$(".btscroll").css({'position':'absolute'})
|
|
|
this.chooseSymp.splice(this.delIndex, 1);
|
|
|
this.checkText.splice(this.delIndex, 1);
|
|
|
- this.$store.commit('delText', { type: moduleCP['symp'], pId: this.questId })
|
|
|
+ this.$store.commit('delText', { type: moduleCP['symp'], pId: this.questId });
|
|
|
+ console.log(this.$store.state)
|
|
|
// 删除setDatas数据,防止回读
|
|
|
this.$store.commit('setDatas', { type: moduleCP['symp'], pId: this.questId ,data:''})
|
|
|
// 删除完-常见;其他-推送
|
|
@@ -300,7 +313,7 @@ export default {
|
|
|
const read = this.$store.state.symptom.datas;
|
|
|
const data = read[(item.questionId||item.id)] || origin[(item.questionId||item.id)];
|
|
|
if (data&&data.questionMapping && data.questionMapping.length > 0) {
|
|
|
- this.$store.commit('setDetail',{detail:data,ppId:null,moduleType:moduleCP['symp']})
|
|
|
+ this.$store.commit('setDetail',{detail:data,ppId:null,moduleType:moduleCP['symp']})
|
|
|
}
|
|
|
},
|
|
|
},
|
|
@@ -320,7 +333,7 @@ export default {
|
|
|
}else{
|
|
|
this.getSympList();
|
|
|
this.quesText = "请问您这次哪里最不舒服?";
|
|
|
- }
|
|
|
+ }
|
|
|
},
|
|
|
deep:true
|
|
|
}
|
|
@@ -397,6 +410,18 @@ export default {
|
|
|
}
|
|
|
.label{
|
|
|
.label;
|
|
|
+ .show-all{
|
|
|
+ text-align: right;
|
|
|
+ color: #4f7aff;
|
|
|
+ font-size: 0.25rem;
|
|
|
+ height:35px;
|
|
|
+ line-height: 35px;
|
|
|
+ float: right;
|
|
|
+ /* width: 80px;
|
|
|
+ border:1px #4f7aff solid;
|
|
|
+ border-radius: 5px;
|
|
|
+ margin: auto;*/
|
|
|
+ }
|
|
|
}
|
|
|
.result{
|
|
|
.result;
|