style: 菜单页面排版
This commit is contained in:
@@ -97,49 +97,58 @@ let tableColumns: ColumnsType = [
|
|||||||
title: t('views.system.menu.menuName'),
|
title: t('views.system.menu.menuName'),
|
||||||
dataIndex: 'menuName',
|
dataIndex: 'menuName',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.system.menu.menuId'),
|
title: t('views.system.menu.menuId'),
|
||||||
dataIndex: 'menuId',
|
dataIndex: 'menuId',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.system.menu.menuSort'),
|
title: t('views.system.menu.menuSort'),
|
||||||
dataIndex: 'menuSort',
|
dataIndex: 'menuSort',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.system.menu.menuTitle'),
|
title: t('views.system.menu.menuTitle'),
|
||||||
dataIndex: 'icon',
|
dataIndex: 'icon',
|
||||||
key: 'icon',
|
key: 'icon',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.system.menu.perId'),
|
title: t('views.system.menu.perId'),
|
||||||
dataIndex: 'perms',
|
dataIndex: 'perms',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.system.menu.formLoc'),
|
title: t('views.system.menu.formLoc'),
|
||||||
dataIndex: 'component',
|
dataIndex: 'component',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.system.menu.status'),
|
title: t('views.system.menu.status'),
|
||||||
dataIndex: 'visible',
|
dataIndex: 'visible',
|
||||||
key: 'visible',
|
key: 'visible',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.system.menu.menuStatus'),
|
title: t('views.system.menu.menuStatus'),
|
||||||
dataIndex: 'status',
|
dataIndex: 'status',
|
||||||
key: 'status',
|
key: 'status',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('views.system.menu.createTime'),
|
title: t('views.system.menu.createTime'),
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: 150,
|
||||||
customRender(opt) {
|
customRender(opt) {
|
||||||
if (+opt.value <= 0) return '';
|
if (+opt.value <= 0) return '';
|
||||||
return parseDateToStr(+opt.value);
|
return parseDateToStr(+opt.value);
|
||||||
@@ -148,7 +157,7 @@ let tableColumns: ColumnsType = [
|
|||||||
{
|
{
|
||||||
title: t('common.operate'),
|
title: t('common.operate'),
|
||||||
key: 'menuId',
|
key: 'menuId',
|
||||||
align: 'center',
|
align: 'left',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -419,7 +428,7 @@ function fnModalCancel() {
|
|||||||
function fnRecordDelete(menuId: string | number) {
|
function fnRecordDelete(menuId: string | number) {
|
||||||
Modal.confirm({
|
Modal.confirm({
|
||||||
title: t('common.tipTitle'),
|
title: t('common.tipTitle'),
|
||||||
content: t('views.system.menu.menuInfo', { menuId }),
|
content: t('views.system.menu.delSure', { menuId }),
|
||||||
onOk() {
|
onOk() {
|
||||||
const key = 'delMenu';
|
const key = 'delMenu';
|
||||||
message.loading({ content: t('common.loading'), key });
|
message.loading({ content: t('common.loading'), key });
|
||||||
@@ -634,7 +643,7 @@ onMounted(() => {
|
|||||||
:size="tableState.size"
|
:size="tableState.size"
|
||||||
:row-class-name="fnTableStriped"
|
:row-class-name="fnTableStriped"
|
||||||
:pagination="false"
|
:pagination="false"
|
||||||
:scroll="{ x: true }"
|
:scroll="{ x: tableColumns.length * 150 }"
|
||||||
children-column-name="children"
|
children-column-name="children"
|
||||||
:expanded-row-keys="tableState.expandedRowKeys"
|
:expanded-row-keys="tableState.expandedRowKeys"
|
||||||
@expandedRowsChange="fnTableExpandedRowsChange"
|
@expandedRowsChange="fnTableExpandedRowsChange"
|
||||||
@@ -719,12 +728,12 @@ onMounted(() => {
|
|||||||
:title="modalState.title"
|
:title="modalState.title"
|
||||||
@cancel="fnModalCancel"
|
@cancel="fnModalCancel"
|
||||||
>
|
>
|
||||||
<a-form layout="horizontal">
|
<a-form layout="horizontal" :label-col="{ span: 6 }" :label-wrap="true">
|
||||||
<a-row :gutter="16">
|
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:label="t('views.system.menu.highMenu')"
|
:label="t('views.system.menu.highMenu')"
|
||||||
name="parentId"
|
name="parentId"
|
||||||
|
:label-col="{ span: 3 }"
|
||||||
|
:label-wrap="true"
|
||||||
>
|
>
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
:value="modalState.from.parentId"
|
:value="modalState.from.parentId"
|
||||||
@@ -740,13 +749,21 @@ onMounted(() => {
|
|||||||
<template #suffixIcon></template>
|
<template #suffixIcon></template>
|
||||||
</a-tree-select>
|
</a-tree-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
<a-form-item
|
||||||
<a-col :lg="6" :md="6" :xs="24">
|
:label="t('views.system.menu.menuName')"
|
||||||
|
name="menuName"
|
||||||
|
:label-col="{ span: 3 }"
|
||||||
|
:label-wrap="true"
|
||||||
|
>
|
||||||
|
{{ modalState.from.menuName }}
|
||||||
|
</a-form-item>
|
||||||
|
<a-row :gutter="16">
|
||||||
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item :label="t('views.system.menu.menuId')" name="menuId">
|
<a-form-item :label="t('views.system.menu.menuId')" name="menuId">
|
||||||
{{ modalState.from.menuId }}
|
{{ modalState.from.menuId }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="6" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:label="t('views.system.menu.menuSort')"
|
:label="t('views.system.menu.menuSort')"
|
||||||
name="menuSort"
|
name="menuSort"
|
||||||
@@ -757,14 +774,6 @@ onMounted(() => {
|
|||||||
</a-row>
|
</a-row>
|
||||||
<a-row :gutter="16">
|
<a-row :gutter="16">
|
||||||
<a-col :lg="12" :md="12" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item
|
|
||||||
:label="t('views.system.menu.menuName')"
|
|
||||||
name="menuName"
|
|
||||||
>
|
|
||||||
{{ modalState.from.menuName }}
|
|
||||||
</a-form-item>
|
|
||||||
</a-col>
|
|
||||||
<a-col :lg="6" :md="6" :xs="24">
|
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:label="t('views.system.menu.menuType')"
|
:label="t('views.system.menu.menuType')"
|
||||||
name="menuType"
|
name="menuType"
|
||||||
@@ -789,7 +798,7 @@ onMounted(() => {
|
|||||||
</a-tag>
|
</a-tag>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="6" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item :label="t('views.system.menu.menuTitle')" name="icon">
|
<a-form-item :label="t('views.system.menu.menuTitle')" name="icon">
|
||||||
<IconFont
|
<IconFont
|
||||||
:type="modalState.from.icon || '#'"
|
:type="modalState.from.icon || '#'"
|
||||||
@@ -829,7 +838,7 @@ onMounted(() => {
|
|||||||
:gutter="16"
|
:gutter="16"
|
||||||
v-if="modalState.from.menuType !== MENU_TYPE_BUTTON"
|
v-if="modalState.from.menuType !== MENU_TYPE_BUTTON"
|
||||||
>
|
>
|
||||||
<a-col :lg="6" :md="6" :xs="24">
|
<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="isFrame">
|
||||||
<a-tag color="default">
|
<a-tag color="default">
|
||||||
{{
|
{{
|
||||||
@@ -840,7 +849,7 @@ onMounted(() => {
|
|||||||
</a-tag>
|
</a-tag>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="6" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:label="t('views.system.menu.pageCache')"
|
:label="t('views.system.menu.pageCache')"
|
||||||
name="isCache"
|
name="isCache"
|
||||||
@@ -855,7 +864,7 @@ onMounted(() => {
|
|||||||
</a-tag>
|
</a-tag>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="6" :xs="24">
|
<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="visible">
|
||||||
<a-tag color="default">
|
<a-tag color="default">
|
||||||
{{
|
{{
|
||||||
@@ -866,7 +875,7 @@ onMounted(() => {
|
|||||||
</a-tag>
|
</a-tag>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :lg="6" :md="6" :xs="24">
|
<a-col :lg="12" :md="12" :xs="24">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:label="t('views.system.menu.menuStatus')"
|
:label="t('views.system.menu.menuStatus')"
|
||||||
name="status"
|
name="status"
|
||||||
@@ -882,12 +891,19 @@ onMounted(() => {
|
|||||||
<a-form-item
|
<a-form-item
|
||||||
:label="t('views.system.menu.perId')"
|
:label="t('views.system.menu.perId')"
|
||||||
name="perms"
|
name="perms"
|
||||||
|
:label-col="{ span: 3 }"
|
||||||
|
:label-wrap="true"
|
||||||
v-if="modalState.from.menuType !== MENU_TYPE_DIR"
|
v-if="modalState.from.menuType !== MENU_TYPE_DIR"
|
||||||
>
|
>
|
||||||
{{ modalState.from.perms }}
|
{{ modalState.from.perms }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item :label="t('views.system.menu.mark')" name="remark">
|
<a-form-item
|
||||||
|
:label="t('views.system.menu.mark')"
|
||||||
|
name="remark"
|
||||||
|
:label-col="{ span: 3 }"
|
||||||
|
:label-wrap="true"
|
||||||
|
>
|
||||||
{{ modalState.from.remark }}
|
{{ modalState.from.remark }}
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
@@ -909,11 +925,18 @@ onMounted(() => {
|
|||||||
@ok="fnModalOk"
|
@ok="fnModalOk"
|
||||||
@cancel="fnModalCancel"
|
@cancel="fnModalCancel"
|
||||||
>
|
>
|
||||||
<a-form name="modalStateFrom" layout="horizontal">
|
<a-form
|
||||||
|
name="modalStateFrom"
|
||||||
|
layout="horizontal"
|
||||||
|
:label-col="{ span: 6 }"
|
||||||
|
:label-wrap="true"
|
||||||
|
>
|
||||||
<a-form-item
|
<a-form-item
|
||||||
:label="t('views.system.menu.highMenu')"
|
:label="t('views.system.menu.highMenu')"
|
||||||
name="parentId"
|
name="parentId"
|
||||||
v-bind="modalStateFrom.validateInfos.parentId"
|
v-bind="modalStateFrom.validateInfos.parentId"
|
||||||
|
:label-col="{ span: 3 }"
|
||||||
|
:label-wrap="true"
|
||||||
>
|
>
|
||||||
<a-tree-select
|
<a-tree-select
|
||||||
v-model:value="modalState.from.parentId"
|
v-model:value="modalState.from.parentId"
|
||||||
@@ -962,7 +985,12 @@ onMounted(() => {
|
|||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|
||||||
<a-form-item :label="t('views.system.menu.menuType')" name="menuType">
|
<a-form-item
|
||||||
|
:label="t('views.system.menu.menuType')"
|
||||||
|
name="menuType"
|
||||||
|
:label-col="{ span: 3 }"
|
||||||
|
:label-wrap="true"
|
||||||
|
>
|
||||||
<a-radio-group v-model:value="modalState.from.menuType">
|
<a-radio-group v-model:value="modalState.from.menuType">
|
||||||
<a-radio
|
<a-radio
|
||||||
:key="MENU_TYPE_DIR"
|
:key="MENU_TYPE_DIR"
|
||||||
@@ -1105,6 +1133,8 @@ onMounted(() => {
|
|||||||
:label="t('views.system.menu.formLoc')"
|
:label="t('views.system.menu.formLoc')"
|
||||||
name="component"
|
name="component"
|
||||||
v-bind="modalStateFrom.validateInfos.component"
|
v-bind="modalStateFrom.validateInfos.component"
|
||||||
|
:label-col="{ span: 3 }"
|
||||||
|
:label-wrap="true"
|
||||||
v-if="modalState.from.menuType === MENU_TYPE_MENU"
|
v-if="modalState.from.menuType === MENU_TYPE_MENU"
|
||||||
>
|
>
|
||||||
<a-input v-model:value="modalState.from.component" allow-clear>
|
<a-input v-model:value="modalState.from.component" allow-clear>
|
||||||
@@ -1126,6 +1156,8 @@ onMounted(() => {
|
|||||||
name="perms"
|
name="perms"
|
||||||
v-if="modalState.from.menuType !== MENU_TYPE_DIR"
|
v-if="modalState.from.menuType !== MENU_TYPE_DIR"
|
||||||
v-bind="modalStateFrom.validateInfos.perms"
|
v-bind="modalStateFrom.validateInfos.perms"
|
||||||
|
:label-col="{ span: 3 }"
|
||||||
|
:label-wrap="true"
|
||||||
>
|
>
|
||||||
<a-input v-model:value="modalState.from.perms" allow-clear>
|
<a-input v-model:value="modalState.from.perms" allow-clear>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
@@ -1141,7 +1173,12 @@ onMounted(() => {
|
|||||||
</a-input>
|
</a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<a-form-item :label="t('views.system.menu.mark')" name="remark">
|
<a-form-item
|
||||||
|
:label="t('views.system.menu.mark')"
|
||||||
|
name="remark"
|
||||||
|
:label-col="{ span: 3 }"
|
||||||
|
:label-wrap="true"
|
||||||
|
>
|
||||||
<a-textarea
|
<a-textarea
|
||||||
v-model:value="modalState.from.remark"
|
v-model:value="modalState.from.remark"
|
||||||
:auto-size="{ minRows: 4, maxRows: 6 }"
|
:auto-size="{ minRows: 4, maxRows: 6 }"
|
||||||
|
|||||||
Reference in New Issue
Block a user