【v3.8.3】默认首页改造

pull/8786/merge
JEECG 2025-09-14 10:37:29 +08:00
parent 81fb2ac3b2
commit 8c64db46e5
2 changed files with 12 additions and 4 deletions

View File

@ -27,12 +27,17 @@
setModalProps({ confirmLoading: false });
isUpdate.value = !!data?.isUpdate;
if (unref(isUpdate)) {
const record = {...data.values}
//
if (data.values.relationType == 'USER') {
data.values.userCode = data.values.roleCode;
if (record.relationType == 'USER') {
record.userCode = record.roleCode;
}
//
if (record.relationType == 'DEFAULT') {
record.roleCode = '';
}
await setFieldsValue({
...data.values,
...record,
});
}
});
@ -46,6 +51,9 @@
if(values.relationType == 'USER'){
values.roleCode = values.userCode;
}
if(values.relationType == 'DEFAULT'){
values.roleCode = 'DEF_INDEX_ALL';
}
await saveOrUpdate(values, isUpdate.value);
//
closeModal();

View File

@ -22,7 +22,7 @@
<a-tag color="#87d068" v-if="text == 1"></a-tag>
</template>
<template #relationType="{ text, record }">
<span>{{ record.roleCode == 'DEF_INDEX_ALL' ? '--' : text }}</span>
<span>{{ record.roleCode == 'DEF_INDEX_ALL' ? '全局默认' : text }}</span>
</template>
<template #roleCode="{ text, record }">
<span>{{ record.roleCode == 'DEF_INDEX_ALL' ? '菜单默认首页' : text }}</span>