fix: 网元授权文件变更提供重启功能,排除OMC类型

This commit is contained in:
TsMask
2024-05-17 11:04:59 +08:00
parent c12ffa583c
commit 7060a3d887
2 changed files with 19 additions and 6 deletions

View File

@@ -371,7 +371,8 @@ onMounted(() => {});
</a-upload> </a-upload>
</a-form-item> </a-form-item>
<a-form-item label="NE Reload" name="reload"> <!-- 网元授权不允许操作重启上传后根据情况去网元信息操作重启 -->
<a-form-item label="NE Reload" name="reload" v-if="false">
<a-switch v-model:checked="modalState.from.reload"> </a-switch> <a-switch v-model:checked="modalState.from.reload"> </a-switch>
</a-form-item> </a-form-item>

View File

@@ -188,7 +188,7 @@ function fnGetList(pageNum?: number) {
listNeLicense(toRaw(queryParams)).then(res => { listNeLicense(toRaw(queryParams)).then(res => {
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) { if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.rows)) {
tablePagination.total = res.total; tablePagination.total = res.total;
tableState.data = res.rows; tableState.data = res.rows.filter(s => s.neType !== 'OMC');
if ( if (
tablePagination.total <= tablePagination.total <=
(queryParams.pageNum - 1) * tablePagination.pageSize && (queryParams.pageNum - 1) * tablePagination.pageSize &&
@@ -261,10 +261,21 @@ function fnRecordRefresh(row: Record<string, any>) {
stateNeLicense(row.neType, row.neId) stateNeLicense(row.neType, row.neId)
.then(res => { .then(res => {
if (res.code === RESULT_CODE_SUCCESS) { if (res.code === RESULT_CODE_SUCCESS) {
// 获取列表数据 row.status = '1';
fnGetList(); row.serialNum = res.data.sn;
row.expiryDate = res.data.expire;
message.success(
`${row.neType} ${row.neId} ${dictStatus.value[1].label}`,
3
);
} else { } else {
message.error(res.msg, 3); row.status = '0';
row.serialNum = '-';
row.expiryDate = '-';
message.success(
`${row.neType} ${row.neId} ${dictStatus.value[0].label}`,
3
);
} }
}) })
.finally(() => { .finally(() => {
@@ -299,6 +310,7 @@ function fnRecordState() {
row.serialNum = res.data.sn; row.serialNum = res.data.sn;
row.expiryDate = res.data.expire; row.expiryDate = res.data.expire;
} }
tableState.selectedRowKeys = [];
} }
message.success(t('common.operateOk'), 3); message.success(t('common.operateOk'), 3);
hide(); hide();