mirror of
https://github.com/jeecgboot/jeecg-boot.git
synced 2025-10-13 14:29:18 +00:00
【v3.8.3】默认首页改造
This commit is contained in:
@@ -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();
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user