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
| /**
| * @description Wrap表单配置信息
| */
| export default function (tab, setting) {
| let appType = sessionStorage.getItem('appType')
| let roleList = sessionStorage.getItem('sysRoles')
|
| if (roleList) {
| try {
| roleList = JSON.parse(roleList)
| } catch (e) {
| roleList = []
| }
| } else {
| roleList = []
| }
|
| const tabForm = [
| {
| type: 'text',
| field: 'label',
| label: '名称',
| initval: tab.label || '',
| required: true,
| focus: true,
| span: 22
| },
| {
| type: 'mkicon',
| field: 'icon',
| label: '图标',
| initval: tab.icon || '',
| required: false,
| allowClear: true,
| span: 22
| },
| {
| type: 'radio',
| field: 'hasSearch',
| label: '搜索',
| initval: tab.hasSearch || 'false',
| required: false,
| options: [
| {value: 'false', label: '无'},
| {value: 'icon', label: '有'},
| ],
| forbid: appType !== 'mob' || setting.position !== 'top' || setting.display !== 'inline-block',
| span: 22
| },
| {
| type: 'multiselect',
| field: 'blacklist',
| label: '黑名单',
| initval: tab.blacklist || [],
| required: false,
| options: roleList,
| forbid: !!appType,
| span: 22
| },
| ]
|
| return tabForm
| }
|
|