|
@@ -18,17 +18,24 @@
|
|
</p>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<div class="label">
|
|
<div class="label">
|
|
- <p class="quest">{{quesText}}<img
|
|
|
|
|
|
+ <p class="quest" id="test">{{quesText}}<img
|
|
@click="search(true)"
|
|
@click="search(true)"
|
|
class="searchImg"
|
|
class="searchImg"
|
|
src="../images/search.png"
|
|
src="../images/search.png"
|
|
alt=""
|
|
alt=""
|
|
></p>
|
|
></p>
|
|
- <span
|
|
|
|
|
|
+ <!-- <span
|
|
class="symp"
|
|
class="symp"
|
|
v-for="(it,ind) in symp"
|
|
v-for="(it,ind) in symp"
|
|
:key="it.conceptId"
|
|
:key="it.conceptId"
|
|
@click="showDetil(it)"
|
|
@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>
|
|
>{{it.description || it.name}}</span>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
@@ -61,12 +68,14 @@
|
|
: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,setScroll,trimDots} from '@utils/tools'
|
|
import {moduleCP,setScroll,trimDots} from '@utils/tools'
|
|
import BScroll from 'better-scroll';
|
|
import BScroll from 'better-scroll';
|
|
@@ -95,6 +104,13 @@ export default {
|
|
isSearch:false,
|
|
isSearch:false,
|
|
scroll:null,
|
|
scroll:null,
|
|
quesText:"请问您有哪些不适?",
|
|
quesText:"请问您有哪些不适?",
|
|
|
|
+ startTime:'',
|
|
|
|
+ timer:null,
|
|
|
|
+ showExp:false,
|
|
|
|
+ message:{
|
|
|
|
+ title:'',
|
|
|
|
+ text:''
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -115,6 +131,27 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ 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() {
|
|
onScroll() {
|
|
document.activeElement.scrollIntoViewIfNeeded(true);
|
|
document.activeElement.scrollIntoViewIfNeeded(true);
|
|
},
|
|
},
|
|
@@ -149,14 +186,12 @@ export default {
|
|
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.description||item.name, pId: this.questId });
|
|
this.$store.commit('setText', { type: moduleCP['symp'], text: item.name,textP: item.description||item.name, pId: this.questId });
|
|
- this.quesText = "请问您还有其他不适吗?";
|
|
|
|
|
|
+
|
|
if (id) {
|
|
if (id) {
|
|
const param = {
|
|
const param = {
|
|
"age": this.age,
|
|
"age": this.age,
|
|
@@ -185,7 +220,19 @@ export default {
|
|
this.chooseSymp.push(item);
|
|
this.chooseSymp.push(item);
|
|
this.checkText = this.$store.state.symptom.text;
|
|
this.checkText = this.$store.state.symptom.text;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ },
|
|
|
|
+ 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() {//推送使用医生端信息
|
|
getSympText() {//推送使用医生端信息
|
|
const text = this.$store.state.symptom.text;
|
|
const text = this.$store.state.symptom.text;
|
|
@@ -231,8 +278,10 @@ export default {
|
|
} 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();
|
|
},
|
|
},
|
|
@@ -254,7 +303,8 @@ export default {
|
|
components: {
|
|
components: {
|
|
DetailBox,
|
|
DetailBox,
|
|
Toast,
|
|
Toast,
|
|
- Search
|
|
|
|
|
|
+ Search,
|
|
|
|
+ Tiptoast
|
|
},
|
|
},
|
|
watch:{
|
|
watch:{
|
|
checkText:{//更新推送
|
|
checkText:{//更新推送
|
|
@@ -262,8 +312,10 @@ export default {
|
|
const sympText = this.getSympText();
|
|
const sympText = this.getSympText();
|
|
if(sympText){
|
|
if(sympText){
|
|
this.getPush(sympText);
|
|
this.getPush(sympText);
|
|
|
|
+ this.quesText = "请问您还有其他不适吗?";
|
|
}else{
|
|
}else{
|
|
this.getSympList();
|
|
this.getSympList();
|
|
|
|
+ this.quesText = "请问您有哪些不适?";
|
|
}
|
|
}
|
|
},
|
|
},
|
|
deep:true
|
|
deep:true
|