feat: 网元信息配置文件导入导出
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, onMounted, toRaw, defineAsyncComponent } from 'vue';
|
||||
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';
|
||||
@@ -23,6 +23,11 @@ const EditModal = defineAsyncComponent(
|
||||
const OAMModal = defineAsyncComponent(
|
||||
() => import('./components/OAMModal.vue')
|
||||
);
|
||||
// 配置备份文件导入
|
||||
const BackConfModal = defineAsyncComponent(
|
||||
() => import('./components/BackConfModal.vue')
|
||||
);
|
||||
const backConf = ref(); // 引用句柄,取导出函数
|
||||
|
||||
/**字典数据 */
|
||||
let dict: {
|
||||
@@ -171,6 +176,8 @@ function fnTableSelectedRowKeys(keys: (string | number)[]) {
|
||||
|
||||
/**对话框对象信息状态类型 */
|
||||
type ModalStateType = {
|
||||
/**配置备份框是否显示 */
|
||||
visibleByBackConf: boolean;
|
||||
/**OAM文件配置框是否显示 */
|
||||
visibleByOAM: boolean;
|
||||
/**新增框或修改框是否显示 */
|
||||
@@ -186,6 +193,7 @@ type ModalStateType = {
|
||||
|
||||
/**对话框对象信息状态 */
|
||||
let modalState: ModalStateType = reactive({
|
||||
visibleByBackConf: false,
|
||||
visibleByOAM: false,
|
||||
visibleByEdit: false,
|
||||
editId: '',
|
||||
@@ -223,6 +231,7 @@ function fnModalEditCancel() {
|
||||
modalState.editId = '';
|
||||
modalState.visibleByEdit = false;
|
||||
modalState.visibleByOAM = false;
|
||||
modalState.visibleByBackConf = false;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -290,6 +299,14 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
|
||||
modalState.neType = row.neType;
|
||||
modalState.visibleByOAM = !modalState.visibleByOAM;
|
||||
break;
|
||||
case 'backConfExport':
|
||||
backConf.value.exportConf(row.neType, row.neId);
|
||||
break;
|
||||
case 'backConfImport':
|
||||
modalState.neId = row.neId;
|
||||
modalState.neType = row.neType;
|
||||
modalState.visibleByBackConf = !modalState.visibleByBackConf;
|
||||
break;
|
||||
default:
|
||||
console.warn(type);
|
||||
break;
|
||||
@@ -572,6 +589,15 @@ onMounted(() => {
|
||||
<FileTextOutlined />
|
||||
{{ t('views.ne.common.oam') }}
|
||||
</a-menu-item>
|
||||
<!-- 配置备份 -->
|
||||
<a-menu-item key="backConfExport">
|
||||
<ExportOutlined />
|
||||
{{ t('views.ne.neInfo.backConf.export') }}
|
||||
</a-menu-item>
|
||||
<a-menu-item key="backConfImport">
|
||||
<ImportOutlined />
|
||||
{{ t('views.ne.neInfo.backConf.import') }}
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
@@ -684,13 +710,22 @@ onMounted(() => {
|
||||
@cancel="fnModalEditCancel"
|
||||
></EditModal>
|
||||
|
||||
<!-- 新增框或修改框 -->
|
||||
<!-- OAM编辑框 -->
|
||||
<OAMModal
|
||||
v-model:visible="modalState.visibleByOAM"
|
||||
:ne-id="modalState.neId"
|
||||
:ne-type="modalState.neType"
|
||||
@cancel="fnModalEditCancel"
|
||||
></OAMModal>
|
||||
|
||||
<!-- 配置文件备份框 -->
|
||||
<BackConfModal
|
||||
ref="backConf"
|
||||
v-model:visible="modalState.visibleByBackConf"
|
||||
:ne-id="modalState.neId"
|
||||
:ne-type="modalState.neType"
|
||||
@cancel="fnModalEditCancel"
|
||||
></BackConfModal>
|
||||
</PageContainer>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user