mirror of https://github.com/jeecgboot/jeecg-boot
【v3.8.3】默认首页改造
parent
81fb2ac3b2
commit
8c64db46e5
|
@ -27,12 +27,17 @@
|
||||||
setModalProps({ confirmLoading: false });
|
setModalProps({ confirmLoading: false });
|
||||||
isUpdate.value = !!data?.isUpdate;
|
isUpdate.value = !!data?.isUpdate;
|
||||||
if (unref(isUpdate)) {
|
if (unref(isUpdate)) {
|
||||||
|
const record = {...data.values}
|
||||||
//表单赋值
|
//表单赋值
|
||||||
if (data.values.relationType == 'USER') {
|
if (record.relationType == 'USER') {
|
||||||
data.values.userCode = data.values.roleCode;
|
record.userCode = record.roleCode;
|
||||||
|
}
|
||||||
|
//表单赋值
|
||||||
|
if (record.relationType == 'DEFAULT') {
|
||||||
|
record.roleCode = '';
|
||||||
}
|
}
|
||||||
await setFieldsValue({
|
await setFieldsValue({
|
||||||
...data.values,
|
...record,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -46,6 +51,9 @@
|
||||||
if(values.relationType == 'USER'){
|
if(values.relationType == 'USER'){
|
||||||
values.roleCode = values.userCode;
|
values.roleCode = values.userCode;
|
||||||
}
|
}
|
||||||
|
if(values.relationType == 'DEFAULT'){
|
||||||
|
values.roleCode = 'DEF_INDEX_ALL';
|
||||||
|
}
|
||||||
await saveOrUpdate(values, isUpdate.value);
|
await saveOrUpdate(values, isUpdate.value);
|
||||||
//关闭弹窗
|
//关闭弹窗
|
||||||
closeModal();
|
closeModal();
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
<a-tag color="#87d068" v-if="text == 1">启用</a-tag>
|
<a-tag color="#87d068" v-if="text == 1">启用</a-tag>
|
||||||
</template>
|
</template>
|
||||||
<template #relationType="{ text, record }">
|
<template #relationType="{ text, record }">
|
||||||
<span>{{ record.roleCode == 'DEF_INDEX_ALL' ? '--' : text }}</span>
|
<span>{{ record.roleCode == 'DEF_INDEX_ALL' ? '全局默认' : text }}</span>
|
||||||
</template>
|
</template>
|
||||||
<template #roleCode="{ text, record }">
|
<template #roleCode="{ text, record }">
|
||||||
<span>{{ record.roleCode == 'DEF_INDEX_ALL' ? '菜单默认首页' : text }}</span>
|
<span>{{ record.roleCode == 'DEF_INDEX_ALL' ? '菜单默认首页' : text }}</span>
|
||||||
|
|
Loading…
Reference in New Issue