|
@@ -18,7 +18,7 @@
|
|
|
<h4>症状情况</h4>
|
|
|
<p v-for="(value,key,index) in checkText">{{value}}</p>
|
|
|
</div>
|
|
|
- <div class="footer" @click="toNext">下一步</div>
|
|
|
+ <div :class="['footer',{'nofoot':chooseSymp.length==0}]" @click="toNext">下一步</div>
|
|
|
<div class="detail" v-if="show">
|
|
|
<DetailBox @close="closeDetal"
|
|
|
:data="labelDetail"
|
|
@@ -38,12 +38,8 @@ import Toast from '../common/Toast.vue';
|
|
|
export default {
|
|
|
name:'Symptom',
|
|
|
data(){
|
|
|
- /*const pathInfo = this.$store.state.pathInfo;
|
|
|
- let datas = this.$store.state.datas;
|
|
|
- let originDatas = this.$store.state.originDatas;*/
|
|
|
let {datas,update} = this.$store.state;
|
|
|
const {pathInfo,originDatas} = this.$store.state;
|
|
|
- console.log("symp组件:",update,pathInfo)
|
|
|
return {
|
|
|
age:pathInfo.patientAge,
|
|
|
sexType:pathInfo.patientSex=='男'?1:(pathInfo.patientSex=='女'?2:3),
|
|
@@ -58,7 +54,7 @@ import Toast from '../common/Toast.vue';
|
|
|
checkText:{}, //选中拼好的明细
|
|
|
questId:null, //id
|
|
|
// symptomName:'', //点击的症状名称
|
|
|
- delText:"是否删除该信息?",
|
|
|
+ delText:"是否删除该信息? (已填内容将清除)",
|
|
|
delIndex:null,
|
|
|
showToast:false,
|
|
|
finished:false, //是否填写了明细
|
|
@@ -84,29 +80,40 @@ import Toast from '../common/Toast.vue';
|
|
|
},
|
|
|
toNext(){
|
|
|
// 把1切换成完成图标,且2高亮
|
|
|
+ if(this.chooseSymp.length==0){return}
|
|
|
+ this.$emit('next');
|
|
|
},
|
|
|
showDetil(item){
|
|
|
this.chooseSymp.push(item);
|
|
|
// this.questId = item.conceptId;
|
|
|
this.questId = item.questionId;
|
|
|
- // this.symptomName = item.name;
|
|
|
- const id = item.questionId;
|
|
|
const param = {
|
|
|
"age":this.age,
|
|
|
- "id":id,
|
|
|
+ "id":item.questionId,
|
|
|
"sexType":this.sexType
|
|
|
}
|
|
|
api.getById(param).then((res)=>{
|
|
|
const result = res.data;
|
|
|
if(result.code==0){
|
|
|
+ const mapping = result.data.questionMapping;
|
|
|
this.labelDetail = result.data;
|
|
|
this.$store.commit('setOrigin',result.data);
|
|
|
// this.$store.commit('getUpdate');
|
|
|
- this.show = true;
|
|
|
+ if(mapping&&mapping.length>0){
|
|
|
+ this.show = true;
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
- // 推理
|
|
|
-
|
|
|
+ // 推理
|
|
|
+ const sympText = this.getSympText();
|
|
|
+ this.getPush(sympText);
|
|
|
+ },
|
|
|
+ getSympText(){
|
|
|
+ let sympText = "";
|
|
|
+ for(let k in this.chooseSymp){
|
|
|
+ sympText += this.chooseSymp[k].name;
|
|
|
+ }
|
|
|
+ return sympText;
|
|
|
},
|
|
|
getPush(symptoms){//推理
|
|
|
const param = {
|
|
@@ -125,7 +132,7 @@ import Toast from '../common/Toast.vue';
|
|
|
closeDetal(msg){
|
|
|
const questId = this.questId;
|
|
|
this.getPush(msg);
|
|
|
- this.checkText = Object.assign({},this.checkText,{[questId]:msg});
|
|
|
+ // this.checkText = Object.assign({},this.checkText,{[questId]:msg});
|
|
|
this.show = false;
|
|
|
this.questId = null;
|
|
|
},
|
|
@@ -133,21 +140,27 @@ import Toast from '../common/Toast.vue';
|
|
|
this.delIndex = index;
|
|
|
this.questId = item.questionId;
|
|
|
if(this.chooseSymp.length==1){
|
|
|
- this.delText = "是否删除该信息?删除后将重新填写预问诊流程"
|
|
|
+ this.delText = "是否删除该信息?删除后将重新填写预问诊流程 (已填内容将清除)"
|
|
|
}
|
|
|
this.showToast = true;
|
|
|
},
|
|
|
comfirnDel(){
|
|
|
this.chooseSymp.splice(this.delIndex,1);
|
|
|
delete(this.checkText[this.questId]);
|
|
|
- // this.getPush(''); //删除后重新调推理-入参:拼好的内容
|
|
|
+ // 删除完-常见;其他-推送
|
|
|
+ if(this.chooseSymp.length>0){
|
|
|
+ const sympText = this.getSympText();
|
|
|
+ this.getPush(sympText);//删除后重新调推理-入参:拼好的内容
|
|
|
+ }else{
|
|
|
+ this.getSympList();
|
|
|
+ }
|
|
|
this.cancelDel();
|
|
|
- console.log("确认删除:",this.chooseSymp,this.checkText)
|
|
|
},
|
|
|
cancelDel(){
|
|
|
this.showToast = false;
|
|
|
this.delIndex = null;
|
|
|
this.questId = null;
|
|
|
+ this.delText = "是否删除该信息? (已填内容将清除)";
|
|
|
},
|
|
|
complete(msg){//明细填写完成
|
|
|
// 获取选择后的明细数据-拼接症状情况-关闭明细弹窗
|
|
@@ -249,6 +262,10 @@ import Toast from '../common/Toast.vue';
|
|
|
.footer{
|
|
|
.footer;
|
|
|
}
|
|
|
+ .nofoot{
|
|
|
+ opacity: 0.3;
|
|
|
+ background: linear-gradient(-270deg,#4F4FFF, #4F8BFF);
|
|
|
+ }
|
|
|
.detail{
|
|
|
.mask;
|
|
|
z-index: 66;
|