|
@@ -37,13 +37,13 @@
|
|
|
<span v-if="!canceledSym&&num<1" class="edit" @click="cancelSymptom">修改</span>
|
|
|
</div>
|
|
|
<div v-for="(item,idx) in symptomQasList" :key="'0'+item.id" v-if="activeTab">
|
|
|
- <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="num" :cancelNum="canceledQa" :isLast="idx===symptomQasList.length-1"/>
|
|
|
+ <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="num" :cancelNum="canceledQa" :extNum ="[]" :cancelTab="cancelTab" :isLast="idx===symptomQasList.length-1"/>
|
|
|
</div>
|
|
|
<div v-for="(item,idx) in diagnoseQasList" :key="'1'+item.id" v-if="activeTab==moduleKeys[1]||activeTab==moduleKeys[2]">
|
|
|
- <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="num" :extNum ="symptomQasList.length" :cancelNum="canceledQa" :isLast="idx===diagnoseQasList.length-1"/>
|
|
|
+ <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="num" :extNum ="[symptomQasList.length]" :cancelNum="canceledQa" :cancelTab="cancelTab" :isLast="idx===diagnoseQasList.length-1"/>
|
|
|
</div>
|
|
|
<div v-for="(item,idx) in othersQasList" :key="'2'+item.id" v-if="activeTab==moduleKeys[2]">
|
|
|
- <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="num" :extNum ="symptomQasList.length+diagnoseQasList.length" :cancelNum="canceledQa"/>
|
|
|
+ <Dialog :idx="idx" v-if="item.show" :item="item" @cancel="cancelSelected" :num="num" :extNum ="[symptomQasList.length,diagnoseQasList.length]" :cancelNum="canceledQa" :cancelTab="cancelTab"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -113,6 +113,7 @@ export default {
|
|
|
scroll:null,
|
|
|
canceledSym:false, //是否已修改过主症状
|
|
|
canceledQa:-1,
|
|
|
+ cancelTab:-1,
|
|
|
type :-1, //当前显示的控件类型
|
|
|
showPreview:false,//显示预览按钮
|
|
|
selectedSymptom:{},
|
|
@@ -223,14 +224,17 @@ export default {
|
|
|
tmpArr = this[moduleName];
|
|
|
tmpNowItem = tmpArr[this.num];
|
|
|
this.type = -1;
|
|
|
- tmpNowItem.show = false;
|
|
|
+ tmpNowItem?tmpNowItem.show = false:''; //最后一题时没有下一题
|
|
|
+ const keyIdx = this.moduleKeys.findIndex((i)=>i==this.activeTab);
|
|
|
if(this.activeTab!==this.moduleKeys[0]&&this.num===0){ //取消上一阶段的最后一题时
|
|
|
- moduleName = this.moduleMap[this.activeTab-1]+'QasList';
|
|
|
+ this.activeTab=this.moduleKeys[keyIdx-1];
|
|
|
+ this.cancelTab=keyIdx-1;
|
|
|
+ moduleName = this.moduleMap[this.activeTab]+'QasList';
|
|
|
const n = this[moduleName].length-1;
|
|
|
tmpPreItem = this[moduleName][n];
|
|
|
- this.activeTab=this.activeTab-1;
|
|
|
this.num=n;
|
|
|
}else{
|
|
|
+ this.cancelTab=keyIdx;
|
|
|
tmpPreItem = tmpArr[this.num-1];
|
|
|
this.num=this.num-1;
|
|
|
}
|