Ben Lin
2024-06-24 c8f8a9c645f7857859a9d56fac96192d994be70b
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),
  },
  {