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
| /**
| * @description 获取子菜单基本信息表单配置信息
| * @param {object} card // 标签配置信息
| * @param {string} supMenu // 上级菜单ID
| * @param {array} menus // 可选的上级菜单列表
| * @param {array} equalTab // 同级菜单IDs
| * @param {array} equalTabs // 可选的同级菜单列表
| * @param {string} type // 菜单类型,主表或树形结构
| */
| export function getTabForm (card, supMenu, menus, equalTab, equalTabs, type) {
| return [
| {
| type: 'text',
| key: 'label',
| label: '标签名称',
| initVal: card.label || '',
| required: true
| },
| {
| type: 'select',
| key: 'linkTab',
| label: '关联标签',
| initVal: card.linkTab || '',
| required: false,
| options: []
| },
| {
| type: 'icon',
| key: 'icon',
| label: '图标',
| initVal: card.icon || '',
| required: false
| },
| {
| type: 'select',
| key: 'supMenu',
| label: '上级标签',
| initVal: supMenu,
| required: false,
| options: menus
| },
| {
| type: 'mutilselect',
| key: 'equalTab',
| label: '同级标签',
| tooltip: '如果子标签中含有刷新同级标签的按钮,在此处添加需要刷新的标签。',
| initVal: equalTab,
| required: false,
| options: equalTabs
| },
| // {
| // type: 'text',
| // key: 'foreignKey',
| // label: '外键',
| // tooltip: '外键旨在标签页中执行默认函数(添加)时,替换BID字段',
| // initVal: card.foreignKey || '',
| // required: false
| // },
| {
| type: 'number',
| key: 'level',
| label: '显示级别',
| tooltip: '标签显示控制,选择指定级别时显示标签,级别为空时始终显示。',
| initVal: card.level,
| min: 0,
| max: 10,
| required: false,
| forbid: type !== 'TreePage',
| },
| {
| type: 'radio',
| key: 'searchPass',
| label: '主表搜索',
| initVal: card.searchPass || 'false',
| tooltip: '使用主表搜索条件时,主表的搜索条件会传入子表中。',
| required: false,
| forbid: type !== 'CommonTable',
| options: [{
| value: 'true',
| text: '使用'
| }, {
| value: 'false',
| text: '不使用'
| }]
| }
| ]
| }
|
|