fix: 网元IMS参数配置plmn禁止删除index0

This commit is contained in:
TsMask
2024-08-15 18:05:56 +08:00
parent f6b62c6c7e
commit 4268fa3198
2 changed files with 17 additions and 4 deletions

View File

@@ -53,6 +53,13 @@ export default function useConfigList({
/**单列表编辑 */ /**单列表编辑 */
function listEdit(row: Record<string, any>) { function listEdit(row: Record<string, any>) {
if (
listState.confirmLoading ||
['read-only', 'read', 'ro'].includes(row.access)
) {
return;
}
listState.editRecord = Object.assign({}, row); listState.editRecord = Object.assign({}, row);
} }

View File

@@ -597,9 +597,8 @@ onMounted(() => {
@click="listEdit(record)" @click="listEdit(record)"
style="margin-left: 18px" style="margin-left: 18px"
v-if=" v-if="
!['read-only', 'read', 'ro'].includes( !listState.confirmLoading &&
record.access !['read-only', 'read', 'ro'].includes(record.access)
) && !listState.confirmLoading
" "
/> />
</div> </div>
@@ -658,7 +657,14 @@ onMounted(() => {
</a-button> </a-button>
</a-tooltip> </a-tooltip>
<a-tooltip <a-tooltip
v-if="treeState.selectNode.paramPerms.includes('delete')" v-if="
treeState.selectNode.paramPerms.includes('delete') &&
!(
neTypeSelect[0] === 'IMS' &&
treeState.selectNode.paramName === 'plmn' &&
text['value'] === 0
)
"
> >
<template #title>{{ t('common.deleteText') }}</template> <template #title>{{ t('common.deleteText') }}</template>
<a-button type="link" @click.prevent="arrayDelete(text)"> <a-button type="link" @click.prevent="arrayDelete(text)">