From c8f8a9c645f7857859a9d56fac96192d994be70b Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期一, 24 六月 2024 18:48:29 +0800 Subject: [PATCH] 按钮权限更新 --- src/views/tigerprojects/system/menu/menu.data.ts | 44 +++++++++++++++++++++++++++++++++++++++----- 1 files changed, 39 insertions(+), 5 deletions(-) diff --git a/src/views/tigerprojects/system/menu/menu.data.ts b/src/views/tigerprojects/system/menu/menu.data.ts index cae797c..8458342 100644 --- a/src/views/tigerprojects/system/menu/menu.data.ts +++ b/src/views/tigerprojects/system/menu/menu.data.ts @@ -1,9 +1,12 @@ import { BasicColumn } from '/@/components/Table'; import { FormSchema } from '/@/components/Table'; -import { h } from 'vue'; +import { h, unref } from 'vue'; import { Tag } from 'ant-design-vue'; -import { Icon } from '/@/components/Icon'; +import Icon from '@/components/Icon/Icon.vue'; +import { GetEnum } from '/@/api/tigerapi/system'; +import { useLocale } from '/@/locales/useLocale'; +const { getLocale } = useLocale(); export const columns: BasicColumn[] = [ { title: '鑿滃崟鍚嶇О', @@ -33,7 +36,7 @@ dataIndex: 'orderNo', width: 100, customRender: ({ record }) => { - return h("h1", null, record.orderNo); //娓叉煋鍗曞厓鏍兼暟鎹紝h鏄繑鍥炰竴涓�滆櫄鎷熻妭鐐� (virtual node)鈥� + return h('h1', null, record.orderNo); //娓叉煋鍗曞厓鏍兼暟鎹紝h鏄繑鍥炰竴涓�滆櫄鎷熻妭鐐� (virtual node)鈥� }, }, { @@ -51,6 +54,16 @@ { title: '鍒涘缓鏃堕棿', dataIndex: 'createTime', + }, + { + title: '鎸夐挳绫诲瀷', + dataIndex: 'btnType', + ifShow: false, + }, + { + title: '鎵ц鏂规硶', + dataIndex: 'doMethod', + ifShow: false, }, ]; @@ -126,7 +139,7 @@ label: '鍥炬爣', component: 'IconPicker', required: ({ values }) => isDir(values.func_type), - ifShow: ({ values }) => !isButton(values.func_type), + ifShow: ({ values }) => true, //!isButton(values.func_type), }, { @@ -143,10 +156,31 @@ ifShow: ({ values }) => isMenu(values.func_type), }, { + field: 'btnType', + label: '鎸夐挳绫诲瀷', + component: 'ApiSelect', + defaultValue: '', + componentProps: { + api: GetEnum, + params: { name: 'SYS_MENU+BUTTON_TYPEs' }, + resultField: 'Data', + labelField: unref(getLocale) == 'zh_CN' ? 'Desc' : 'Name', + valueField: 'Value', + placeholder: '璇烽�夋嫨鎸夐挳绫诲瀷' + }, + ifShow: ({ values }) => isButton(values.func_type), + }, + { + field: 'doMethod', + label: '鎵ц鏂规硶鍚�', + component: 'Input', + ifShow: ({ values }) => isButton(values.func_type), + }, + { field: 'func_code', label: '鏉冮檺鏍囪瘑', component: 'Input', - dynamicDisabled:true, + dynamicDisabled: true, ifShow: ({ values }) => !isDir(values.func_type), }, { -- Gitblit v1.9.3