|
@@ -10,7 +10,7 @@
|
|
class="choo-symp"
|
|
class="choo-symp"
|
|
v-for="(v,i) in chooseSymp"
|
|
v-for="(v,i) in chooseSymp"
|
|
>
|
|
>
|
|
- <span @click="showChecked(v)">{{v.description || v.name}}</span>
|
|
|
|
|
|
+ <span @click="showChecked(v,i)">{{v.description || v.name}}</span>
|
|
<span @click="deletSymp(v,i)"><img
|
|
<span @click="deletSymp(v,i)"><img
|
|
src="../images/del.png"
|
|
src="../images/del.png"
|
|
alt=""
|
|
alt=""
|
|
@@ -24,21 +24,16 @@
|
|
src="../images/search.png"
|
|
src="../images/search.png"
|
|
alt=""
|
|
alt=""
|
|
></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.prevent="touchstart(it)"
|
|
|
|
- @touchend.prevent="touchend(it)"
|
|
|
|
- >{{it.description || it.name}}</span>
|
|
|
|
- <p class="tip" v-show="chooseSymp.length==0">长按症状按钮可显示症状解释说明</p>
|
|
|
|
|
|
+ <div class="showHide" ref="showHide">
|
|
|
|
+ <span
|
|
|
|
+ class="symp"
|
|
|
|
+ v-for="(it,ind) in symp"
|
|
|
|
+ :key="it.conceptId"
|
|
|
|
+ @touchstart.prevent="touchstart(it)"
|
|
|
|
+ @touchend.prevent="touchend(it)"
|
|
|
|
+ >{{it.description || it.name}}</span>
|
|
|
|
+ </div>
|
|
|
|
+ <p class="tip" v-show="chooseSymp.length==0">长按症状按钮可显示症状解释说明 <span @click="slideToggle" v-show="slide">{{slideTxt}}</span></p>
|
|
</div>
|
|
</div>
|
|
<div
|
|
<div
|
|
class="result"
|
|
class="result"
|
|
@@ -81,7 +76,6 @@
|
|
</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 Toast from '../common/Toast.vue';
|
|
import Toast from '../common/Toast.vue';
|
|
import Tiptoast from '../common/Tiptoast.vue';
|
|
import Tiptoast from '../common/Tiptoast.vue';
|
|
import Search from './Search.vue';
|
|
import Search from './Search.vue';
|
|
@@ -92,7 +86,7 @@ export default {
|
|
name: 'Symptom',
|
|
name: 'Symptom',
|
|
props:['modluesLen','nameStr'],
|
|
props:['modluesLen','nameStr'],
|
|
data() {
|
|
data() {
|
|
- let { datas, pathInfo,searchShow,scroll } = 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,
|
|
@@ -119,9 +113,10 @@ export default {
|
|
title:'',
|
|
title:'',
|
|
text:''
|
|
text:''
|
|
},
|
|
},
|
|
- position:scroll,
|
|
|
|
start:{},
|
|
start:{},
|
|
end:{},
|
|
end:{},
|
|
|
|
+ slide:false,
|
|
|
|
+ slideTxt:'展开全部'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -142,6 +137,16 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ slideToggle(){
|
|
|
|
+ let flg = this.slideTxt
|
|
|
|
+ if(flg == '展开全部'){
|
|
|
|
+ this.$refs.showHide.style.height = 'auto'
|
|
|
|
+ this.slideTxt = '收起'
|
|
|
|
+ }else{
|
|
|
|
+ this.$refs.showHide.style.height = '3.12rem'
|
|
|
|
+ this.slideTxt = '展开全部'
|
|
|
|
+ }
|
|
|
|
+ },
|
|
touchend(item,flg) {//症状点开详情
|
|
touchend(item,flg) {//症状点开详情
|
|
clearTimeout(this.timer);
|
|
clearTimeout(this.timer);
|
|
this.end = this.$store.state.scroll
|
|
this.end = this.$store.state.scroll
|
|
@@ -194,6 +199,11 @@ export default {
|
|
const result = res.data;
|
|
const result = res.data;
|
|
if (result.code == 0) {
|
|
if (result.code == 0) {
|
|
this.symp = result.data;
|
|
this.symp = result.data;
|
|
|
|
+ if(result.data.length>9){
|
|
|
|
+ this.slide = true
|
|
|
|
+ }else{
|
|
|
|
+ this.slide = false
|
|
|
|
+ }
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -213,7 +223,6 @@ export default {
|
|
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 });
|
|
-
|
|
|
|
if (id) {
|
|
if (id) {
|
|
const param = {
|
|
const param = {
|
|
"age": this.age,
|
|
"age": this.age,
|
|
@@ -225,12 +234,16 @@ export default {
|
|
if (result.code == 0) {
|
|
if (result.code == 0) {
|
|
const mapping = result.data.questionMapping;
|
|
const mapping = result.data.questionMapping;
|
|
this.labelDetail = result.data;
|
|
this.labelDetail = result.data;
|
|
|
|
+ if(this.chooseSymp.length == 0){
|
|
|
|
+ result.data.idx = 1
|
|
|
|
+ }
|
|
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.$store.commit('setDetail',{detail:result.data,ppId:null,moduleType:moduleCP['symp']})
|
|
|
|
|
|
+ this.$store.commit('setDetail',{detail:result.data,ppId:null,moduleType:moduleCP['symp'],sign:1,idx:this.chooseSymp.length})
|
|
if(flg){
|
|
if(flg){
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ this.$store.commit('setSearchShow', false);
|
|
this.chooseSymp.push(item);
|
|
this.chooseSymp.push(item);
|
|
} else {
|
|
} else {
|
|
this.chooseSymp.push(item);
|
|
this.chooseSymp.push(item);
|
|
@@ -246,7 +259,7 @@ export default {
|
|
showDetil(item,flg) {//搜索点开的详情
|
|
showDetil(item,flg) {//搜索点开的详情
|
|
this.tmpItem=item
|
|
this.tmpItem=item
|
|
this.isSearch=flg||false
|
|
this.isSearch=flg||false
|
|
- this.common(item,flg);
|
|
|
|
|
|
+ this.common(item,flg,this.chooseSymp);
|
|
},
|
|
},
|
|
getSympText() {//推送使用医生端信息
|
|
getSympText() {//推送使用医生端信息
|
|
const text = this.$store.state.symptom.text;
|
|
const text = this.$store.state.symptom.text;
|
|
@@ -269,6 +282,7 @@ export default {
|
|
const result = res.data;
|
|
const result = res.data;
|
|
if (result.code == 0) {
|
|
if (result.code == 0) {
|
|
this.symp = result.data.symptom;
|
|
this.symp = result.data.symptom;
|
|
|
|
+ this.$refs.showHide.style.height = 'auto'
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -309,17 +323,16 @@ export default {
|
|
this.questId = null;
|
|
this.questId = null;
|
|
this.delText = "是否删除该信息?<br/>(已填内容将清除)";
|
|
this.delText = "是否删除该信息?<br/>(已填内容将清除)";
|
|
},
|
|
},
|
|
- showChecked(item) {
|
|
|
|
|
|
+ showChecked(item,i) {
|
|
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&&data.questionMapping && data.questionMapping.length > 0) {
|
|
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'],sign:1,idx:i})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
components: {
|
|
components: {
|
|
- DetailBox,
|
|
|
|
Toast,
|
|
Toast,
|
|
Search,
|
|
Search,
|
|
Tiptoast
|
|
Tiptoast
|
|
@@ -343,7 +356,14 @@ export default {
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
@import "../less/base.less";
|
|
@import "../less/base.less";
|
|
-
|
|
|
|
|
|
+.showHide {
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ height: 3.12rem;
|
|
|
|
+}
|
|
|
|
+.tip span {
|
|
|
|
+ color: #colors[theme];
|
|
|
|
+ float: right;
|
|
|
|
+}
|
|
.symp-wrap {
|
|
.symp-wrap {
|
|
font-size: 0.3rem;
|
|
font-size: 0.3rem;
|
|
// .btscroll;
|
|
// .btscroll;
|