fix: 页面字段/接口调整
This commit is contained in:
@@ -61,14 +61,14 @@ let queryParams = reactive({
|
||||
/**菜单名称 */
|
||||
menuName: undefined,
|
||||
/**状态 */
|
||||
status: undefined,
|
||||
statusFlag: undefined,
|
||||
});
|
||||
|
||||
/**查询参数重置 */
|
||||
function fnQueryReset() {
|
||||
queryParams = Object.assign(queryParams, {
|
||||
menuName: '',
|
||||
status: undefined,
|
||||
statusFlag: undefined,
|
||||
});
|
||||
fnGetList();
|
||||
}
|
||||
@@ -126,7 +126,7 @@ let tableColumns: ColumnsType = [
|
||||
title: t('views.system.menu.menuTitle'),
|
||||
dataIndex: 'icon',
|
||||
key: 'icon',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
@@ -143,22 +143,22 @@ let tableColumns: ColumnsType = [
|
||||
},
|
||||
{
|
||||
title: t('views.system.menu.status'),
|
||||
dataIndex: 'visible',
|
||||
key: 'visible',
|
||||
dataIndex: 'visibleFlag',
|
||||
key: 'visibleFlag',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: t('views.system.menu.menuStatus'),
|
||||
dataIndex: 'status',
|
||||
key: 'status',
|
||||
dataIndex: 'statusFlag',
|
||||
key: 'statusFlag',
|
||||
align: 'center',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: t('views.system.menu.createTime'),
|
||||
dataIndex: 'createTime',
|
||||
align: 'center',
|
||||
align: 'left',
|
||||
width: 150,
|
||||
customRender(opt) {
|
||||
if (+opt.value <= 0) return '';
|
||||
@@ -239,13 +239,13 @@ let modalState: ModalStateType = reactive({
|
||||
menuSort: 0,
|
||||
menuType: MENU_TYPE_BUTTON,
|
||||
component: '',
|
||||
path: '',
|
||||
menuPath: '',
|
||||
icon: '#',
|
||||
perms: '',
|
||||
isFrame: '1',
|
||||
isCache: '0',
|
||||
visible: '0',
|
||||
status: '0',
|
||||
frameFlag: '1',
|
||||
cacheFlag: '0',
|
||||
visibleFlag: '0',
|
||||
statusFlag: '0',
|
||||
createTime: 0,
|
||||
remark: '',
|
||||
parentType: '', // 标记禁止菜单类型添加目录和菜单
|
||||
@@ -280,7 +280,7 @@ const modalStateFrom = Form.useForm(
|
||||
message: t('views.system.menu.formLoc') + t('common.unableNull'),
|
||||
},
|
||||
],
|
||||
path: [
|
||||
menuPath: [
|
||||
{
|
||||
required: true,
|
||||
min: 1,
|
||||
@@ -370,11 +370,11 @@ function fnModalVisibleByEdit(
|
||||
function fnModalOk() {
|
||||
let validateNames = ['parentId', 'menuName'];
|
||||
if (modalState.from.menuType === MENU_TYPE_DIR) {
|
||||
validateNames.push('path');
|
||||
validateNames.push('menuPath');
|
||||
}
|
||||
if (modalState.from.menuType === MENU_TYPE_MENU) {
|
||||
validateNames.push('component');
|
||||
validateNames.push('path');
|
||||
validateNames.push('menuPath');
|
||||
validateNames.push('perms');
|
||||
}
|
||||
if (modalState.from.menuType === MENU_TYPE_BUTTON) {
|
||||
@@ -463,9 +463,7 @@ function fnGetList() {
|
||||
if (tableState.loading) return;
|
||||
tableState.loading = true;
|
||||
listMenu(toRaw(queryParams)).then(res => {
|
||||
if (res.code === RESULT_CODE_SUCCESS && Array.isArray(res.data)) {
|
||||
// 过滤旧前端菜单
|
||||
res.data = res.data.filter(i => i.perms !== 'page');
|
||||
if (res.code === RESULT_CODE_SUCCESS) {
|
||||
menuListData = JSON.parse(JSON.stringify(res.data));
|
||||
// 初始上级菜单和展开编号key
|
||||
if (treeDataAll.length <= 0) {
|
||||
@@ -533,10 +531,10 @@ onMounted(() => {
|
||||
<a-col :lg="6" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.menu.menuStatus')"
|
||||
name="status"
|
||||
name="statusFlag"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="queryParams.status"
|
||||
v-model:value="queryParams.statusFlag"
|
||||
allow-clear
|
||||
:options="dict.sysNormalDisable"
|
||||
>
|
||||
@@ -648,17 +646,20 @@ onMounted(() => {
|
||||
<template v-if="column.key === 'icon'">
|
||||
<IconFont :type="record.icon" style="font-size: 18px"></IconFont>
|
||||
</template>
|
||||
<template v-if="column.key === 'visible'">
|
||||
<a-tag :color="+record.visible ? 'processing' : 'warning'">
|
||||
<template v-if="column.key === 'visibleFlag'">
|
||||
<a-tag :color="+record.visibleFlag ? 'processing' : 'warning'">
|
||||
{{
|
||||
[t('views.system.menu.hidden'), t('views.system.menu.show')][
|
||||
+record.visible
|
||||
+record.visibleFlag
|
||||
]
|
||||
}}
|
||||
</a-tag>
|
||||
</template>
|
||||
<template v-if="column.key === 'status'">
|
||||
<DictTag :options="dict.sysNormalDisable" :value="record.status" />
|
||||
<template v-if="column.key === 'statusFlag'">
|
||||
<DictTag
|
||||
:options="dict.sysNormalDisable"
|
||||
:value="record.statusFlag"
|
||||
/>
|
||||
</template>
|
||||
<template v-if="column.key === 'menuId'">
|
||||
<a-space :size="8" align="center">
|
||||
@@ -812,8 +813,8 @@ onMounted(() => {
|
||||
:xs="24"
|
||||
v-if="modalState.from.menuType !== MENU_TYPE_BUTTON"
|
||||
>
|
||||
<a-form-item :label="t('views.system.menu.routerAdrr')" name="path">
|
||||
{{ modalState.from.path }}
|
||||
<a-form-item :label="t('views.system.menu.routerAdrr')" name="menuPath">
|
||||
{{ modalState.from.menuPath }}
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
@@ -833,11 +834,11 @@ onMounted(() => {
|
||||
|
||||
<a-row v-if="modalState.from.menuType !== MENU_TYPE_BUTTON">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.system.menu.local')" name="isFrame">
|
||||
<a-form-item :label="t('views.system.menu.local')" name="frameFlag">
|
||||
<a-tag color="default">
|
||||
{{
|
||||
[t('views.system.menu.no'), t('views.system.menu.yes')][
|
||||
+modalState.from.isFrame
|
||||
+modalState.from.frameFlag
|
||||
]
|
||||
}}
|
||||
</a-tag>
|
||||
@@ -846,24 +847,27 @@ onMounted(() => {
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.menu.pageCache')"
|
||||
name="isCache"
|
||||
name="cacheFlag"
|
||||
>
|
||||
<a-tag color="default">
|
||||
{{
|
||||
[
|
||||
t('views.system.menu.noCache'),
|
||||
t('views.system.menu.cache'),
|
||||
][+modalState.from.isCache]
|
||||
][+modalState.from.cacheFlag]
|
||||
}}
|
||||
</a-tag>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.system.menu.status')" name="visible">
|
||||
<a-form-item
|
||||
:label="t('views.system.menu.status')"
|
||||
name="visibleFlag"
|
||||
>
|
||||
<a-tag color="default">
|
||||
{{
|
||||
[t('views.system.menu.hidden'), t('views.system.menu.show')][
|
||||
+modalState.from.visible
|
||||
+modalState.from.visibleFlag
|
||||
]
|
||||
}}
|
||||
</a-tag>
|
||||
@@ -872,11 +876,11 @@ onMounted(() => {
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.menu.menuStatus')"
|
||||
name="status"
|
||||
name="statusFlag"
|
||||
>
|
||||
<DictTag
|
||||
:options="dict.sysNormalDisable"
|
||||
:value="modalState.from.status"
|
||||
:value="modalState.from.statusFlag"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -1033,10 +1037,10 @@ onMounted(() => {
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.menu.routerAdrr')"
|
||||
name="path"
|
||||
v-bind="modalStateFrom.validateInfos.path"
|
||||
name="menuPath"
|
||||
v-bind="modalStateFrom.validateInfos.menuPath"
|
||||
>
|
||||
<a-input v-model:value="modalState.from.path" allow-clear>
|
||||
<a-input v-model:value="modalState.from.menuPath" allow-clear>
|
||||
<template #prefix>
|
||||
<a-tooltip placement="topLeft">
|
||||
<template #title>
|
||||
@@ -1057,9 +1061,9 @@ onMounted(() => {
|
||||
|
||||
<a-row v-if="modalState.from.menuType !== MENU_TYPE_BUTTON">
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.system.menu.local')" name="isFrame">
|
||||
<a-form-item :label="t('views.system.menu.local')" name="frameFlag">
|
||||
<a-select
|
||||
v-model:value="modalState.from.isFrame"
|
||||
v-model:value="modalState.from.frameFlag"
|
||||
default-value="0"
|
||||
>
|
||||
<a-select-option key="0" value="0">{{
|
||||
@@ -1074,10 +1078,10 @@ onMounted(() => {
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.menu.pageCache')"
|
||||
name="isCache"
|
||||
name="cacheFlag"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="modalState.from.isCache"
|
||||
v-model:value="modalState.from.cacheFlag"
|
||||
default-value="0"
|
||||
>
|
||||
<a-select-option key="0" value="0">{{
|
||||
@@ -1090,9 +1094,12 @@ onMounted(() => {
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item :label="t('views.system.menu.status')" name="visible">
|
||||
<a-form-item
|
||||
:label="t('views.system.menu.status')"
|
||||
name="visibleFlag"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="modalState.from.visible"
|
||||
v-model:value="modalState.from.visibleFlag"
|
||||
default-value="0"
|
||||
>
|
||||
<a-select-option key="0" value="0">{{
|
||||
@@ -1107,10 +1114,10 @@ onMounted(() => {
|
||||
<a-col :lg="12" :md="12" :xs="24">
|
||||
<a-form-item
|
||||
:label="t('views.system.menu.menuStatus')"
|
||||
name="status"
|
||||
name="statusFlag"
|
||||
>
|
||||
<a-select
|
||||
v-model:value="modalState.from.status"
|
||||
v-model:value="modalState.from.statusFlag"
|
||||
default-value="0"
|
||||
:options="dict.sysNormalDisable"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user