feat: 页面调整组件属性升级

This commit is contained in:
TsMask
2024-10-28 11:02:39 +08:00
parent 670225a655
commit da0d49d306
125 changed files with 1775 additions and 3464 deletions

View File

@@ -1,10 +1,10 @@
<script setup lang="ts">
import { reactive, onMounted, toRaw, defineAsyncComponent, ref } from 'vue';
import { PageContainer } from 'antdv-pro-layout';
import { message, Modal } from 'ant-design-vue/lib';
import { SizeType } from 'ant-design-vue/lib/config-provider';
import { MenuInfo } from 'ant-design-vue/lib/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/lib/table';
import { message, Modal } from 'ant-design-vue/es';
import { SizeType } from 'ant-design-vue/es/config-provider';
import { MenuInfo } from 'ant-design-vue/es/menu/src/interface';
import { ColumnsType } from 'ant-design-vue/es/table';
import useI18n from '@/hooks/useI18n';
import { RESULT_CODE_SUCCESS } from '@/constants/result-constants';
import useNeInfoStore from '@/store/modules/neinfo';
@@ -177,11 +177,11 @@ function fnTableSelectedRowKeys(keys: (string | number)[]) {
/**对话框对象信息状态类型 */
type ModalStateType = {
/**配置备份框是否显示 */
visibleByBackConf: boolean;
openByBackConf: boolean;
/**OAM文件配置框是否显示 */
visibleByOAM: boolean;
openByOAM: boolean;
/**新增框或修改框是否显示 */
visibleByEdit: boolean;
openByEdit: boolean;
/**新增框或修改框ID */
editId: string;
/**OAM框网元类型ID */
@@ -193,9 +193,9 @@ type ModalStateType = {
/**对话框对象信息状态 */
let modalState: ModalStateType = reactive({
visibleByBackConf: false,
visibleByOAM: false,
visibleByEdit: false,
openByBackConf: false,
openByOAM: false,
openByEdit: false,
editId: '',
neId: '',
neType: '',
@@ -212,7 +212,7 @@ function fnModalVisibleByEdit(row?: Record<string, any>) {
} else {
modalState.editId = row.id;
}
modalState.visibleByEdit = !modalState.visibleByEdit;
modalState.openByEdit = !modalState.openByEdit;
}
/**
@@ -256,9 +256,9 @@ function fnModalEditOk(from: Record<string, any>) {
*/
function fnModalEditCancel() {
modalState.editId = '';
modalState.visibleByEdit = false;
modalState.visibleByOAM = false;
modalState.visibleByBackConf = false;
modalState.openByEdit = false;
modalState.openByOAM = false;
modalState.openByBackConf = false;
}
/**
@@ -334,7 +334,7 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
case 'oam':
modalState.neId = row.neId;
modalState.neType = row.neType;
modalState.visibleByOAM = !modalState.visibleByOAM;
modalState.openByOAM = !modalState.openByOAM;
break;
case 'backConfExport':
backConf.value.exportConf(row.neType, row.neId);
@@ -342,7 +342,7 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
case 'backConfImport':
modalState.neId = row.neId;
modalState.neType = row.neType;
modalState.visibleByBackConf = !modalState.visibleByBackConf;
modalState.openByBackConf = !modalState.openByBackConf;
break;
default:
console.warn(type);
@@ -655,7 +655,7 @@ onMounted(() => {
</template>
</template>
<template #expandedRowRender="{ record }">
<a-row :gutter="16">
<a-row>
<a-col :offset="2" :lg="8" :md="8" :xs="8">
<a-divider orientation="left">
{{ t('views.ne.neInfo.info') }}
@@ -753,7 +753,7 @@ onMounted(() => {
<!-- 新增框或修改框 -->
<EditModal
v-model:visible="modalState.visibleByEdit"
v-model:open="modalState.openByEdit"
:edit-id="modalState.editId"
@ok="fnModalEditOk"
@cancel="fnModalEditCancel"
@@ -761,7 +761,7 @@ onMounted(() => {
<!-- OAM编辑框 -->
<OAMModal
v-model:visible="modalState.visibleByOAM"
v-model:open="modalState.openByOAM"
:ne-id="modalState.neId"
:ne-type="modalState.neType"
@cancel="fnModalEditCancel"
@@ -770,7 +770,7 @@ onMounted(() => {
<!-- 配置文件备份框 -->
<BackConfModal
ref="backConf"
v-model:visible="modalState.visibleByBackConf"
v-model:open="modalState.openByBackConf"
:ne-id="modalState.neId"
:ne-type="modalState.neType"
@cancel="fnModalEditCancel"