|
@@ -2,7 +2,7 @@
|
|
|
<div class="detail-wrap">
|
|
|
<!-- <div v-for="(item,index) in datas"> -->
|
|
|
<div v-for="(item,index) in checkDatas.questionMapping">
|
|
|
- <p class="quest">{{index + 1 +'.' + item.name}}</p>
|
|
|
+ <p class="quest">{{index + 1 +'.' + (item.description || item.name)}}</p>
|
|
|
<Radio v-if="item.controlType==1"
|
|
|
:item="item"
|
|
|
:key="item.id"
|
|
@@ -73,44 +73,53 @@ import {patt} from '@utils/tools.js'
|
|
|
this.finished = true;
|
|
|
this.checkDatas = Object.assign({},this.checkDatas,{select:1});
|
|
|
const datas = this.checkDatas.questionMapping;
|
|
|
- let text = "";
|
|
|
+ let text = ""; //医生
|
|
|
+ let textP = "";//患者
|
|
|
for(let i in datas){
|
|
|
if(datas[i].value){
|
|
|
text += datas[i].value+',';
|
|
|
+ textP += datas[i].valueP+',';
|
|
|
}
|
|
|
}
|
|
|
- // let msg = this.checkDatas.name+ ',' + text.substring(0,text.length-1);
|
|
|
+
|
|
|
let msg = this.checkDatas.name+ ',' + text;
|
|
|
+ let msgP = (this.checkDatas.description || this.checkDatas.name)+ ',' + textP;
|
|
|
let newMsg = "";
|
|
|
+ let newMsgP = "";
|
|
|
if(msg[msg.length-1] == ','){
|
|
|
newMsg = msg.substring(0,msg.length-1);
|
|
|
+ newMsgP = msgP.substring(0,msgP.length-1);
|
|
|
}else{
|
|
|
- newMsg = msg
|
|
|
+ newMsg = msg;
|
|
|
+ newMsgP = msgP;
|
|
|
}
|
|
|
this.$store.commit('setDatas',{data:this.checkDatas,pId:this.checkDatas.id,type:this.type,ppId:this.ppId});
|
|
|
// flag是区分点开已选症状 未点完成
|
|
|
// this.$store.commit('setText',{text:newMsg.replace(patt,''),pId:this.checkDatas.id,type:this.type,flag:true});
|
|
|
// 输入框的值用占位符#{}标识,便于修改
|
|
|
- this.$store.commit('setText',{text:newMsg.replace(patt,'').replace(/\#\{/g,'').replace(/\}/g,''),pId:this.checkDatas.id,type:this.type,flag:true});
|
|
|
+ this.$store.commit('setText',{text:newMsg.replace(patt,'').replace(/\#\{/g,'').replace(/\}/g,''),textP:newMsgP.replace(patt,'').replace(/\#\{/g,'').replace(/\}/g,''),pId:this.checkDatas.id,type:this.type,flag:true});
|
|
|
},
|
|
|
clearData(){//清空
|
|
|
const datas = this.checkDatas.questionMapping;
|
|
|
for(let i in datas){
|
|
|
datas[i].value = "";
|
|
|
+ datas[i].valueP = "";
|
|
|
let detaiList = datas[i].questionDetailList;
|
|
|
if(detaiList.length>0){
|
|
|
for(let k in detaiList){
|
|
|
detaiList[k].select = 0;
|
|
|
if(detaiList[k].value){
|
|
|
detaiList[k].value = "";
|
|
|
+ detaiList[k].valueP = "";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
this.checkDatas = Object.assign({},this.checkDatas,{questionMapping:datas});
|
|
|
let msg = this.checkDatas.name;
|
|
|
+ let msgP = (this.checkDatas.description||this.checkDatas.name);
|
|
|
this.$store.commit('setDatas',{data:this.checkDatas,pId:this.checkDatas.id,type:this.type,ppId:this.ppId});
|
|
|
- this.$store.commit('setText',{text:msg,pId:this.checkDatas.id,type:this.type,flag:true});
|
|
|
+ this.$store.commit('setText',{text:msg,textP:msgP,pId:this.checkDatas.id,type:this.type,flag:true});
|
|
|
},
|
|
|
check(){// 校验是否有已填项
|
|
|
const datas = this.checkDatas.questionMapping;
|