feat: 网元配置OAM弹窗表单

This commit is contained in:
TsMask
2024-05-11 10:45:13 +08:00
parent 207acb3f3d
commit 8a5f80fe47
4 changed files with 348 additions and 30 deletions

View File

@@ -20,6 +20,9 @@ const { fnNeStart, fnNeRestart, fnNeStop, fnNeReload, fnNeLogFile } =
const EditModal = defineAsyncComponent(
() => import('./components/EditModal.vue')
);
const OAMModal = defineAsyncComponent(
() => import('./components/OAMModal.vue')
);
/**字典数据 */
let dict: {
@@ -168,18 +171,26 @@ function fnTableSelectedRowKeys(keys: (string | number)[]) {
/**对话框对象信息状态类型 */
type ModalStateType = {
/**OAM文件配置框是否显示 */
visibleByOAM: boolean;
/**新增框或修改框是否显示 */
visibleByEdit: boolean;
/**新增框或修改框ID */
editId: string;
/**OAM框网元类型ID */
neId: string;
neType: string;
/**确定按钮 loading */
confirmLoading: boolean;
};
/**对话框对象信息状态 */
let modalState: ModalStateType = reactive({
visibleByOAM: false,
visibleByEdit: false,
editId: '',
neId: '',
neType: '',
confirmLoading: false,
});
@@ -211,6 +222,7 @@ function fnModalEditOk() {
function fnModalEditCancel() {
modalState.editId = '';
modalState.visibleByEdit = false;
modalState.visibleByOAM = false;
}
/**
@@ -288,6 +300,11 @@ function fnRecordMore(type: string | number, row: Record<string, any>) {
case 'log':
fnNeLogFile(row);
break;
case 'oam':
modalState.neId = row.neId;
modalState.neType = row.neType;
modalState.visibleByOAM = !modalState.visibleByOAM;
break;
default:
console.warn(type);
break;
@@ -569,6 +586,10 @@ onMounted(() => {
<DeleteOutlined />
{{ t('common.deleteText') }}
</a-menu-item>
<a-menu-item key="oam">
<FileTextOutlined />
OAM
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
@@ -680,6 +701,14 @@ onMounted(() => {
@ok="fnModalEditOk"
@cancel="fnModalEditCancel"
></EditModal>
<!-- 新增框或修改框 -->
<OAMModal
v-model:visible="modalState.visibleByOAM"
:ne-id="modalState.neId"
:ne-type="modalState.neType"
@cancel="fnModalEditCancel"
></OAMModal>
</PageContainer>
</template>