zhengyiming
2025-02-10 958b79ed89b9e742540f714a80261d222c0fc09b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
export enum SubModuleType {
  MenuButton = 1,
  /**
   * 页面按钮
   */
  PageButton,
  /**
   * 数据按钮
   */
  DataButton,
  /**
   * 数据列
   */
  Column,
}
 
export const SubModuleTitle = {
  [SubModuleType.PageButton]: '页面按钮',
  [SubModuleType.DataButton]: '数据按钮',
  [SubModuleType.Column]: '数据列',
};
 
export const SubModuleKey = {
  [SubModuleType.PageButton]: 'pageButton',
  [SubModuleType.DataButton]: 'dataButton',
  [SubModuleType.Column]: 'column',
};
 
export type FastBtn = {
  enCode?: string;
  name?: string;
  width?: number;
};
 
/**
 * 可快速添加的页面按钮
 */
export const FastPageButtonList: Array<FastBtn> = [
  {
    enCode: 'addBtn',
    name: '新增',
  },
  {
    enCode: 'controlColumnBtn',
    name: '显示列',
  },
  {
    enCode: 'exportBtn',
    name: '导出',
  },
  {
    enCode: 'importBtn',
    name: '导入',
  },
];
 
/**
 * 可快速添加的数据按钮
 */
export const FastDataButtonList: Array<FastBtn> = [
  {
    enCode: 'editBtn',
    name: '编辑',
  },
  {
    enCode: 'delBtn',
    name: '删除',
  },
];
 
/**
 * 可快速添加的数据列
 */
export const FastColumnList: Array<FastBtn> = [
  {
    enCode: 'name',
    name: '名称',
    width: 200,
  },
  {
    enCode: 'note',
    name: '备注',
    width: 200,
  },
];
 
export const FastButtonMap: { [key: number]: Array<FastBtn> } = {
  [SubModuleType.PageButton]: FastPageButtonList,
  [SubModuleType.DataButton]: FastDataButtonList,
  [SubModuleType.Column]: FastColumnList,
};
 
export const ModuleColumns: API.CustomModuleColumnDto[] = [
  {
    id: '1',
    enCode: 'name',
    name: '名称',
    width: 180,
  },
  {
    id: '2',
    enCode: 'enCode',
    name: '编号',
  },
  {
    id: '3',
    enCode: 'sortCode',
    name: '排序',
    width: 80,
  },
  {
    id: '4',
    enCode: 'path',
    name: '路由地址',
  },
  {
    id: '5',
    enCode: 'isCache',
    name: '缓存',
    width: 80,
  },
  {
    id: '6',
    enCode: 'isMenu',
    name: '菜单',
    width: 80,
  },
  {
    id: '7',
    enCode: 'enabledMark',
    name: '有效',
    width: 80,
  },
];