|
|
@ -35,7 +35,7 @@
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #operator class="table-operator">
|
|
|
|
<template #operator class="table-operator">
|
|
|
|
<a-space>
|
|
|
|
<a-space>
|
|
|
|
<a-button type="primary" @click="form.onOpen(undefined, moduleType)">
|
|
|
|
<a-button type="primary" @click="formRef.onOpen(undefined, moduleType)">
|
|
|
|
<template #icon><plus-outlined /></template>
|
|
|
|
<template #icon><plus-outlined /></template>
|
|
|
|
新增菜单
|
|
|
|
新增菜单
|
|
|
|
</a-button>
|
|
|
|
</a-button>
|
|
|
@ -68,9 +68,22 @@
|
|
|
|
{{ $TOOL.dictTypeData('MENU_TYPE', record.menuType) }}
|
|
|
|
{{ $TOOL.dictTypeData('MENU_TYPE', record.menuType) }}
|
|
|
|
</a-tag>
|
|
|
|
</a-tag>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template v-if="column.dataIndex === 'visible'">
|
|
|
|
|
|
|
|
<a-tag v-if="record.visible === 'FALSE'">
|
|
|
|
|
|
|
|
{{ $TOOL.dictTypeData('MENU_VISIBLE', record.visible) }}
|
|
|
|
|
|
|
|
</a-tag>
|
|
|
|
|
|
|
|
<a-tag v-else color="green">
|
|
|
|
|
|
|
|
<span v-if="record.visible === 'TRUE'">
|
|
|
|
|
|
|
|
{{ $TOOL.dictTypeData('MENU_VISIBLE', record.visible) }}
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<span v-else>
|
|
|
|
|
|
|
|
显示
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</a-tag>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
<template v-if="column.dataIndex === 'action'">
|
|
|
|
<template v-if="column.dataIndex === 'action'">
|
|
|
|
<a-space>
|
|
|
|
<a-space>
|
|
|
|
<a @click="form.onOpen(record, moduleType)">编辑</a>
|
|
|
|
<a @click="formRef.onOpen(record, moduleType)">编辑</a>
|
|
|
|
<a-divider type="vertical" />
|
|
|
|
<a-divider type="vertical" />
|
|
|
|
<a-popconfirm title="确定要删除此菜单吗?" @confirm="deleteMenu(record)">
|
|
|
|
<a-popconfirm title="确定要删除此菜单吗?" @confirm="deleteMenu(record)">
|
|
|
|
<a-button type="link" danger size="small">删除</a-button>
|
|
|
|
<a-button type="link" danger size="small">删除</a-button>
|
|
|
@ -88,7 +101,7 @@
|
|
|
|
<a @click="changeModuleFormRef.onOpen(record)">更改模块</a>
|
|
|
|
<a @click="changeModuleFormRef.onOpen(record)">更改模块</a>
|
|
|
|
</a-menu-item>
|
|
|
|
</a-menu-item>
|
|
|
|
<a-menu-item v-if="record.menuType === 'MENU'">
|
|
|
|
<a-menu-item v-if="record.menuType === 'MENU'">
|
|
|
|
<a @click="button.onOpen(record)">按钮权限</a>
|
|
|
|
<a @click="buttonRef.onOpen(record)">按钮权限</a>
|
|
|
|
</a-menu-item>
|
|
|
|
</a-menu-item>
|
|
|
|
</a-menu>
|
|
|
|
</a-menu>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -99,7 +112,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</s-table>
|
|
|
|
</s-table>
|
|
|
|
</a-card>
|
|
|
|
</a-card>
|
|
|
|
<Form ref="form" @successful="table.refresh(true)" />
|
|
|
|
<Form ref="formRef" @successful="table.refresh(true)" />
|
|
|
|
<changeModuleForm ref="changeModuleFormRef" @successful="table.refresh(true)" />
|
|
|
|
<changeModuleForm ref="changeModuleFormRef" @successful="table.refresh(true)" />
|
|
|
|
<Button ref="button" />
|
|
|
|
<Button ref="button" />
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
@ -107,16 +120,15 @@
|
|
|
|
<script setup name="sysMenu">
|
|
|
|
<script setup name="sysMenu">
|
|
|
|
import menuApi from '@/api/sys/resource/menuApi'
|
|
|
|
import menuApi from '@/api/sys/resource/menuApi'
|
|
|
|
import Form from './form.vue'
|
|
|
|
import Form from './form.vue'
|
|
|
|
import changeModuleForm from './changeModuleForm.vue'
|
|
|
|
import ChangeModuleForm from './changeModuleForm.vue'
|
|
|
|
import Button from '../button/index.vue'
|
|
|
|
import Button from '../button/index.vue'
|
|
|
|
let searchFormState = reactive({})
|
|
|
|
let searchFormState = reactive({})
|
|
|
|
const table = ref(null)
|
|
|
|
const table = ref(null)
|
|
|
|
let form = ref()
|
|
|
|
const formRef = ref()
|
|
|
|
let changeModuleFormRef = ref()
|
|
|
|
const changeModuleFormRef = ref()
|
|
|
|
let button = ref()
|
|
|
|
const buttonRef = ref()
|
|
|
|
let field = ref()
|
|
|
|
|
|
|
|
const moduleType = ref()
|
|
|
|
const moduleType = ref()
|
|
|
|
let moduleTypeList = ref([])
|
|
|
|
const moduleTypeList = ref([])
|
|
|
|
const toolConfig = { refresh: true, height: true, columnSetting: false, striped: false }
|
|
|
|
const toolConfig = { refresh: true, height: true, columnSetting: false, striped: false }
|
|
|
|
const columns = [
|
|
|
|
const columns = [
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -130,7 +142,8 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '类型',
|
|
|
|
title: '类型',
|
|
|
|
dataIndex: 'menuType'
|
|
|
|
dataIndex: 'menuType',
|
|
|
|
|
|
|
|
width: 100
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '路由地址',
|
|
|
|
title: '路由地址',
|
|
|
@ -145,14 +158,13 @@
|
|
|
|
width: 150
|
|
|
|
width: 150
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '排序',
|
|
|
|
title: '是否可见',
|
|
|
|
dataIndex: 'sortCode',
|
|
|
|
dataIndex: 'visible',
|
|
|
|
sorter: true
|
|
|
|
width: 100
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
title: '创建时间',
|
|
|
|
title: '排序',
|
|
|
|
dataIndex: 'createTime',
|
|
|
|
dataIndex: 'sortCode',
|
|
|
|
ellipsis: true,
|
|
|
|
|
|
|
|
sorter: true
|
|
|
|
sorter: true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|