调试mk
This commit is contained in:
@@ -1116,6 +1116,10 @@ export default {
|
||||
total: 0,
|
||||
},
|
||||
selectionList: [],
|
||||
// 表单页实例标记:创建时按路由落定,不随 keep-alive 切走后的 $route 变化翻转。
|
||||
// 否则 isProjectFormPage 变 false 后容器会从 div 切成 el-dialog(append-to-body),
|
||||
// 盖住后续打开的页面(如客商档案)。
|
||||
isFormPageInstance: false,
|
||||
projectBox: false,
|
||||
dialogType: 'add',
|
||||
dialogReadonly: false,
|
||||
@@ -1308,13 +1312,14 @@ export default {
|
||||
return ['add', 'majorSupplement'].includes(this.dialogType);
|
||||
},
|
||||
isProjectFormPage() {
|
||||
return this.$route.path === '/business/project-apply/form';
|
||||
return this.isFormPageInstance;
|
||||
},
|
||||
projectFormContainer() {
|
||||
return this.isProjectFormPage ? 'div' : 'el-dialog';
|
||||
// 表单页实例始终用页面容器,避免 keep-alive 失活时误切弹窗
|
||||
return this.isFormPageInstance ? 'div' : 'el-dialog';
|
||||
},
|
||||
projectFormContainerProps() {
|
||||
if (this.isProjectFormPage) return { class: 'project-apply-page-form' };
|
||||
if (this.isFormPageInstance) return { class: 'project-apply-page-form' };
|
||||
return {
|
||||
modelValue: this.projectBox,
|
||||
title: this.projectDialogTitle,
|
||||
@@ -1359,11 +1364,26 @@ export default {
|
||||
this.loadCargoTypeOptions();
|
||||
this.loadTransportTypeOptions();
|
||||
this.loadSettlementModeOptions();
|
||||
if (this.isProjectFormPage) {
|
||||
if (this.$route.path === '/business/project-apply/form') {
|
||||
this.isFormPageInstance = true;
|
||||
this.openProjectFormPage();
|
||||
}
|
||||
},
|
||||
// 标签切走(keep-alive 缓存)或销毁时,收起 append-to-body 的内层弹窗,
|
||||
// 避免 Teleport 出去的 DOM 继续盖住后续页面。
|
||||
deactivated() {
|
||||
this.closeInnerDialogs();
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.closeInnerDialogs();
|
||||
},
|
||||
methods: {
|
||||
closeInnerDialogs() {
|
||||
this.changeRecordDetailVisible = false;
|
||||
this.attachmentDocumentPreviewVisible = false;
|
||||
this.attachmentImagePreviewVisible = false;
|
||||
this.userBox = false;
|
||||
},
|
||||
buildTableOption() {
|
||||
return {
|
||||
...option,
|
||||
|
||||
Reference in New Issue
Block a user