|
@@ -218,19 +218,23 @@ export default {
|
|
|
let moduleName = this.listMap[this.activeTab];
|
|
|
let tmpArr = JSON.parse(JSON.stringify(this[moduleName]));
|
|
|
tmpArr[num-1].content = contentResult.valp;
|
|
|
- /*if(this.symptomResult.id===999999&&contentResult.indexOf("没有")!==-1){ //datas中show要处理
|
|
|
- this[moduleName] = JSON.parse(JSON.stringify(this.$store.state.diagnose.datas));
|
|
|
- }else{*/
|
|
|
- this[moduleName] = tmpArr;
|
|
|
- this.$store.commit('setText', { type: this.moduleKeys[this.activeTab], text: contentResult.val,textP: contentResult.valp,idx:contentResult.idx,flag:contentResult.flag });
|
|
|
- /*}*/
|
|
|
+ //选没有可上传报告,则上传控件不显示
|
|
|
+ const noUpload = this.symptomResult.id===999999&&contentResult.valp.indexOf("没有")!==-1;
|
|
|
+ if(noUpload){
|
|
|
+ tmpArr.splice(num,1);
|
|
|
+ }
|
|
|
+
|
|
|
+ this[moduleName] = tmpArr;
|
|
|
+ //上传的图片及是否有可上传***答案不显示在预览所以不记录到state.diagnose.text中
|
|
|
+ if(this.symptomResult.id!==999999&&this.symptomResult.controlType!=4){
|
|
|
+ this.$store.commit('setText', { type: this.moduleKeys[this.activeTab], text: contentResult.val,textP: contentResult.valp,idx:contentResult.idx,flag:contentResult.flag });
|
|
|
+ }
|
|
|
console.log(this.$store.state); //最后一题答完
|
|
|
- if(+num===this[moduleName].length){
|
|
|
+ if(+num===this[moduleName].length||(noUpload&&+num===this[moduleName].length+1)){
|
|
|
if(this.activeTab>1){ //模块配置待修改
|
|
|
this.showPreview=true;
|
|
|
return;
|
|
|
}
|
|
|
- //this.$store.commit('setText', { type: this.moduleKeys[this.activeTab], text: contentResult.val,textP: contentResult.valp, pId: tmpNowItem.questionId,idx:'' });
|
|
|
const state = this.$store.state;
|
|
|
this.activeTab++; //进入下一个阶段问题
|
|
|
this.num = 0;
|