|
@@ -20,7 +20,10 @@
|
|
|
</div>
|
|
|
<div class="footer" @click="toNext">下一步</div>
|
|
|
<div class="detail" v-if="show">
|
|
|
- <DetailBox @close="closeDetal" :data="labelDetail"/>
|
|
|
+ <DetailBox @close="closeDetal"
|
|
|
+ :data="labelDetail"
|
|
|
+ v-if="labelDetail.questionMapping&&labelDetail.questionMapping.length>0"
|
|
|
+ @pComplete="complete"/>
|
|
|
</div>
|
|
|
<Toast :message="delText"
|
|
|
:show="showToast"
|
|
@@ -35,7 +38,12 @@ import Toast from '../common/Toast.vue';
|
|
|
export default {
|
|
|
name:'Symptom',
|
|
|
data(){
|
|
|
- const pathInfo = this.$store.state.pathInfo;
|
|
|
+ /*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),
|
|
@@ -48,10 +56,13 @@ import Toast from '../common/Toast.vue';
|
|
|
symp:[], //症状
|
|
|
labelDetail:{}, //明细
|
|
|
checkText:{}, //选中拼好的明细
|
|
|
- current:null,
|
|
|
+ questId:null, //id
|
|
|
+ // symptomName:'', //点击的症状名称
|
|
|
delText:"是否删除该信息?",
|
|
|
delIndex:null,
|
|
|
- showToast:false
|
|
|
+ showToast:false,
|
|
|
+ finished:false, //是否填写了明细
|
|
|
+ upData:update
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
@@ -76,7 +87,9 @@ import Toast from '../common/Toast.vue';
|
|
|
},
|
|
|
showDetil(item){
|
|
|
this.chooseSymp.push(item);
|
|
|
- this.current = item.conceptId;
|
|
|
+ // this.questId = item.conceptId;
|
|
|
+ this.questId = item.questionId;
|
|
|
+ // this.symptomName = item.name;
|
|
|
const id = item.questionId;
|
|
|
const param = {
|
|
|
"age":this.age,
|
|
@@ -87,6 +100,8 @@ import Toast from '../common/Toast.vue';
|
|
|
const result = res.data;
|
|
|
if(result.code==0){
|
|
|
this.labelDetail = result.data;
|
|
|
+ this.$store.commit('setOrigin',result.data);
|
|
|
+ // this.$store.commit('getUpdate');
|
|
|
this.show = true;
|
|
|
}
|
|
|
})
|
|
@@ -108,15 +123,15 @@ import Toast from '../common/Toast.vue';
|
|
|
})
|
|
|
},
|
|
|
closeDetal(msg){
|
|
|
- const current = this.current;
|
|
|
+ const questId = this.questId;
|
|
|
this.getPush(msg);
|
|
|
- this.checkText = Object.assign({},this.checkText,{[current]:msg});
|
|
|
+ this.checkText = Object.assign({},this.checkText,{[questId]:msg});
|
|
|
this.show = false;
|
|
|
- this.current = null;console.log('子组件触发关闭',this.checkText);
|
|
|
+ this.questId = null;
|
|
|
},
|
|
|
deletSymp(item,index){
|
|
|
this.delIndex = index;
|
|
|
- this.current = item.conceptId;
|
|
|
+ this.questId = item.questionId;
|
|
|
if(this.chooseSymp.length==1){
|
|
|
this.delText = "是否删除该信息?删除后将重新填写预问诊流程"
|
|
|
}
|
|
@@ -124,7 +139,7 @@ import Toast from '../common/Toast.vue';
|
|
|
},
|
|
|
comfirnDel(){
|
|
|
this.chooseSymp.splice(this.delIndex,1);
|
|
|
- delete(this.checkText[this.current]);
|
|
|
+ delete(this.checkText[this.questId]);
|
|
|
// this.getPush(''); //删除后重新调推理-入参:拼好的内容
|
|
|
this.cancelDel();
|
|
|
console.log("确认删除:",this.chooseSymp,this.checkText)
|
|
@@ -132,12 +147,35 @@ import Toast from '../common/Toast.vue';
|
|
|
cancelDel(){
|
|
|
this.showToast = false;
|
|
|
this.delIndex = null;
|
|
|
- this.current = null;
|
|
|
+ this.questId = null;
|
|
|
+ },
|
|
|
+ complete(msg){//明细填写完成
|
|
|
+ // 获取选择后的明细数据-拼接症状情况-关闭明细弹窗
|
|
|
+ // let text = this.symptomName + text;
|
|
|
+ this.checkText = Object.assign({},this.checkText,{[this.questId]:msg});
|
|
|
+ this.show = false;
|
|
|
+ this.questId = null;
|
|
|
}
|
|
|
},
|
|
|
components:{
|
|
|
DetailBox,
|
|
|
Toast
|
|
|
+ },
|
|
|
+ computed:{
|
|
|
+ getQuestId(){
|
|
|
+ return this.upData;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch:{
|
|
|
+ getQuestId:{
|
|
|
+ handler(newVal,oldVal){
|
|
|
+ console.log("数据更新了11",newVal,oldVal);
|
|
|
+ let datas = this.$store.state.datas;
|
|
|
+ let originDatas = this.$store.state.originDatas;
|
|
|
+ this.labelDetail = datas[this.questId] || originDatas[this.questId];
|
|
|
+ },
|
|
|
+ deep:true
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|