ns-base-module 1.1.62 → 1.1.64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/README.md +20 -20
- package/dist/Button/AntdIconButton.js +2 -2
- package/dist/Button/ConfigButton.js +12 -12
- package/dist/ChooseModal/index.js +6 -6
- package/dist/Entry/components/ChooseModalTable.js +6 -6
- package/dist/Entry/components/ImageText.js +5 -5
- package/dist/Entry/components/InputNumber.js +10 -10
- package/dist/Entry/components/ListSelect.js +6 -6
- package/dist/Entry/components/ObjectSelect.js +5 -5
- package/dist/Entry/components/Select.js +5 -5
- package/dist/Entry/components/TagsDatePicker.js +6 -6
- package/dist/Entry/components/TreeSelect.js +5 -5
- package/dist/Entry/components/index.scss +97 -97
- package/dist/Entry/components/utils.js +5 -5
- package/dist/Entry/data.d.ts +133 -133
- package/dist/Entry/index.js +6 -6
- package/dist/FilterPopover/FilterClearIcon.js +6 -6
- package/dist/FilterPopover/index.js +6 -6
- package/dist/Icon/index.js +5 -5
- package/dist/IconTools/utils.js +5 -5
- package/dist/SubtotalsModal/index.js +7 -7
- package/dist/TableHeaderConfigPopover/Dustbin.js +13 -4
- package/dist/TableHeaderConfigPopover/index.js +60 -29
- package/dist/TableHeaderConfigPopover/updateColumns.js +5 -5
- package/dist/TableHeaderConfigPopover/utils.js +7 -6
- package/dist/WidgetConfig/index.js +8 -8
- package/dist/umd/ns-base-module.min.js +1 -1
- package/dist/utils/cache.js +10 -10
- package/dist/utils/language.js +2 -1
- package/dist/utils/services/global.js +49 -49
- package/dist/utils/utils.js +50 -50
- package/package.json +100 -100
- package/style/basics.scss +671 -671
- package/style/components/ClassFilter.scss +74 -74
- package/style/components/FilterPopover.scss +40 -40
- package/style/components/SubtotalsModal.scss +388 -388
- package/style/components/TableHeaderConfigPopover.scss +105 -105
- package/style/components/index.scss +4 -4
- package/style/default.scss +1219 -1219
- package/style/index.scss +1 -1
- package/style/mixins/index.scss +28 -28
- package/style/mixins/libs/tint.scss +23 -23
- package/style/variables.scss +684 -684
- package/types/Action.d.ts +43 -43
- package/types/types.d.ts +1 -1
- package/dist/Button/AntdIconButton.d.ts +0 -11
- package/dist/Button/AntdIconButton.d.ts.map +0 -1
- package/dist/Button/ConfigButton.d.ts +0 -18
- package/dist/Button/ConfigButton.d.ts.map +0 -1
- package/dist/Button/index.d.ts +0 -8
- package/dist/Button/index.d.ts.map +0 -1
- package/dist/ChooseModal/index.d.ts +0 -21
- package/dist/ChooseModal/index.d.ts.map +0 -1
- package/dist/ClassFilter/index.d.ts +0 -11
- package/dist/ClassFilter/index.d.ts.map +0 -1
- package/dist/ClassFilter/indexVertical.d.ts +0 -11
- package/dist/ClassFilter/indexVertical.d.ts.map +0 -1
- package/dist/ClassFilter/util.d.ts +0 -17
- package/dist/ClassFilter/util.d.ts.map +0 -1
- package/dist/CopyCol/index.d.ts +0 -4
- package/dist/CopyCol/index.d.ts.map +0 -1
- package/dist/Entry/EntryCriteria.d.ts +0 -17
- package/dist/Entry/EntryCriteria.d.ts.map +0 -1
- package/dist/Entry/EntryItem.d.ts +0 -34
- package/dist/Entry/EntryItem.d.ts.map +0 -1
- package/dist/Entry/components/Checkbox.d.ts +0 -12
- package/dist/Entry/components/Checkbox.d.ts.map +0 -1
- package/dist/Entry/components/ChooseModalTable.d.ts +0 -15
- package/dist/Entry/components/ChooseModalTable.d.ts.map +0 -1
- package/dist/Entry/components/Condition.d.ts +0 -9
- package/dist/Entry/components/Condition.d.ts.map +0 -1
- package/dist/Entry/components/DatePicker.d.ts +0 -12
- package/dist/Entry/components/DatePicker.d.ts.map +0 -1
- package/dist/Entry/components/Etable2Modal.d.ts +0 -4
- package/dist/Entry/components/Etable2Modal.d.ts.map +0 -1
- package/dist/Entry/components/Express.d.ts +0 -8
- package/dist/Entry/components/Express.d.ts.map +0 -1
- package/dist/Entry/components/GroupInput.d.ts +0 -13
- package/dist/Entry/components/GroupInput.d.ts.map +0 -1
- package/dist/Entry/components/ImageText.d.ts +0 -13
- package/dist/Entry/components/ImageText.d.ts.map +0 -1
- package/dist/Entry/components/Input.d.ts +0 -27
- package/dist/Entry/components/Input.d.ts.map +0 -1
- package/dist/Entry/components/InputNumber.d.ts +0 -18
- package/dist/Entry/components/InputNumber.d.ts.map +0 -1
- package/dist/Entry/components/InputNumberRange.d.ts +0 -10
- package/dist/Entry/components/InputNumberRange.d.ts.map +0 -1
- package/dist/Entry/components/ListSelect.d.ts +0 -15
- package/dist/Entry/components/ListSelect.d.ts.map +0 -1
- package/dist/Entry/components/ObjectSelect.d.ts +0 -14
- package/dist/Entry/components/ObjectSelect.d.ts.map +0 -1
- package/dist/Entry/components/Progress.d.ts +0 -11
- package/dist/Entry/components/Progress.d.ts.map +0 -1
- package/dist/Entry/components/Radio.d.ts +0 -15
- package/dist/Entry/components/Radio.d.ts.map +0 -1
- package/dist/Entry/components/Select.d.ts +0 -29
- package/dist/Entry/components/Select.d.ts.map +0 -1
- package/dist/Entry/components/Switch.d.ts +0 -6
- package/dist/Entry/components/Switch.d.ts.map +0 -1
- package/dist/Entry/components/TagsDatePicker.d.ts +0 -7
- package/dist/Entry/components/TagsDatePicker.d.ts.map +0 -1
- package/dist/Entry/components/TimePicker.d.ts +0 -6
- package/dist/Entry/components/TimePicker.d.ts.map +0 -1
- package/dist/Entry/components/TreeSelect.d.ts +0 -5
- package/dist/Entry/components/TreeSelect.d.ts.map +0 -1
- package/dist/Entry/components/utils.d.ts +0 -1
- package/dist/Entry/components/utils.d.ts.map +0 -1
- package/dist/Entry/index.d.ts +0 -54
- package/dist/Entry/index.d.ts.map +0 -1
- package/dist/FilterPopover/Filter.d.ts +0 -30
- package/dist/FilterPopover/Filter.d.ts.map +0 -1
- package/dist/FilterPopover/FilterClearIcon.d.ts +0 -8
- package/dist/FilterPopover/FilterClearIcon.d.ts.map +0 -1
- package/dist/FilterPopover/index.d.ts +0 -21
- package/dist/FilterPopover/index.d.ts.map +0 -1
- package/dist/FilterPopover/vTableFilter.d.ts +0 -25
- package/dist/FilterPopover/vTableFilter.d.ts.map +0 -1
- package/dist/Icon/IconCreate.d.ts +0 -11
- package/dist/Icon/IconCreate.d.ts.map +0 -1
- package/dist/Icon/index.d.ts +0 -6
- package/dist/Icon/index.d.ts.map +0 -1
- package/dist/IconTools/index.d.ts +0 -13
- package/dist/IconTools/index.d.ts.map +0 -1
- package/dist/IconTools/utils.d.ts +0 -15
- package/dist/IconTools/utils.d.ts.map +0 -1
- package/dist/SubtotalsModal/Increment.d.ts +0 -18
- package/dist/SubtotalsModal/Increment.d.ts.map +0 -1
- package/dist/SubtotalsModal/addSubtotals.d.ts +0 -22
- package/dist/SubtotalsModal/addSubtotals.d.ts.map +0 -1
- package/dist/SubtotalsModal/dndQuota.d.ts +0 -27
- package/dist/SubtotalsModal/dndQuota.d.ts.map +0 -1
- package/dist/SubtotalsModal/index.d.ts +0 -22
- package/dist/SubtotalsModal/index.d.ts.map +0 -1
- package/dist/SubtotalsModal/subtotalTemplate.d.ts +0 -22
- package/dist/SubtotalsModal/subtotalTemplate.d.ts.map +0 -1
- package/dist/SubtotalsModal/util.d.ts +0 -3
- package/dist/SubtotalsModal/util.d.ts.map +0 -1
- package/dist/SubtotalsModal/viewSubtotals.d.ts +0 -12
- package/dist/SubtotalsModal/viewSubtotals.d.ts.map +0 -1
- package/dist/TableHeaderConfigPopover/Dustbin.d.ts +0 -5
- package/dist/TableHeaderConfigPopover/Dustbin.d.ts.map +0 -1
- package/dist/TableHeaderConfigPopover/index.d.ts +0 -22
- package/dist/TableHeaderConfigPopover/index.d.ts.map +0 -1
- package/dist/TableHeaderConfigPopover/updateColumns.d.ts +0 -10
- package/dist/TableHeaderConfigPopover/updateColumns.d.ts.map +0 -1
- package/dist/TableHeaderConfigPopover/utils.d.ts +0 -16
- package/dist/TableHeaderConfigPopover/utils.d.ts.map +0 -1
- package/dist/WidgetConfig/index.d.ts +0 -40
- package/dist/WidgetConfig/index.d.ts.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/test/index.d.ts +0 -4
- package/dist/test/index.d.ts.map +0 -1
- package/dist/utils/cache.d.ts +0 -17
- package/dist/utils/cache.d.ts.map +0 -1
- package/dist/utils/enum.d.ts +0 -22
- package/dist/utils/enum.d.ts.map +0 -1
- package/dist/utils/errorMsg.d.ts +0 -3
- package/dist/utils/errorMsg.d.ts.map +0 -1
- package/dist/utils/language.d.ts +0 -283
- package/dist/utils/language.d.ts.map +0 -1
- package/dist/utils/request.d.ts +0 -1
- package/dist/utils/request.d.ts.map +0 -1
- package/dist/utils/services/global.d.ts +0 -130
- package/dist/utils/services/global.d.ts.map +0 -1
- package/dist/utils/utils.d.ts +0 -111
- package/dist/utils/utils.d.ts.map +0 -1
package/dist/Entry/data.d.ts
CHANGED
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
// export type EntryType =
|
|
2
|
-
// | 'Input'
|
|
3
|
-
// | 'InputNumber'
|
|
4
|
-
// | 'TableInput'
|
|
5
|
-
// | 'Select'
|
|
6
|
-
// | 'MultSelect'
|
|
7
|
-
// | 'DatePicker'
|
|
8
|
-
// | 'DateTimePicker'
|
|
9
|
-
// | 'RangePicker'
|
|
10
|
-
// | 'RangeTimePicker'
|
|
11
|
-
// | 'Switch'
|
|
12
|
-
// | 'Textarea'
|
|
13
|
-
// | 'TableTextarea'
|
|
14
|
-
// | 'Image'
|
|
15
|
-
// | 'Checkbox'
|
|
16
|
-
// | 'CheckboxGroup'
|
|
17
|
-
// | 'Radio'
|
|
18
|
-
// | 'ImageUpload'
|
|
19
|
-
// | 'FileUpload'
|
|
20
|
-
// | 'TreeSelect';
|
|
21
|
-
import { initLang } from '@/utils/language';
|
|
22
|
-
import { TagConditionEnum } from '@/utils/enum';
|
|
23
|
-
|
|
24
|
-
export enum EntryType {
|
|
25
|
-
Input = 'Input',
|
|
26
|
-
InputNumber = 'InputNumber',
|
|
27
|
-
InputNumberRange = 'InputNumberRange',
|
|
28
|
-
Password = 'Password',
|
|
29
|
-
Search = 'Search',
|
|
30
|
-
AllSearch = 'AllSearch',
|
|
31
|
-
TableInput = 'TableInput',
|
|
32
|
-
TableInputNumber = 'TableInputNumber',
|
|
33
|
-
Select = 'Select',
|
|
34
|
-
ObjectSelect = 'ObjectSelect',
|
|
35
|
-
MultSelect = 'MultSelect',
|
|
36
|
-
DatePicker = 'DatePicker',
|
|
37
|
-
DateTimePicker = 'DateTimePicker',
|
|
38
|
-
RangePicker = 'RangePicker',
|
|
39
|
-
RangeTimePicker = 'RangeTimePicker',
|
|
40
|
-
TimePicker = 'TimePicker',
|
|
41
|
-
SwitchRead = 'SwitchRead',
|
|
42
|
-
Switch = 'Switch',
|
|
43
|
-
Textarea = 'Textarea',
|
|
44
|
-
TableTextarea = 'TableTextarea',
|
|
45
|
-
Image = 'Image',
|
|
46
|
-
Checkbox = 'Checkbox',
|
|
47
|
-
CheckboxGroup = 'CheckboxGroup',
|
|
48
|
-
Radio = 'Radio',
|
|
49
|
-
RadioGroup = 'RadioGroup',
|
|
50
|
-
ImageUpload = 'ImageUpload',
|
|
51
|
-
FileUpload = 'FileUpload',
|
|
52
|
-
TreeSelect = 'TreeSelect',
|
|
53
|
-
Cron = 'Cron', // cron 表达式
|
|
54
|
-
Editor = 'Editor', // 富文本编辑器
|
|
55
|
-
EditorPreview = 'EditorPreview', // 富文本编辑器的预览
|
|
56
|
-
EditorModal = 'EditorModal', // 富文本编辑器弹框
|
|
57
|
-
JsonRead = 'JsonRead', // json预览
|
|
58
|
-
Link = 'Link', // 超链接
|
|
59
|
-
OpenBrowser = 'OpenBrowser', // 打开新浏览器
|
|
60
|
-
Tag = 'Tag', // 标签
|
|
61
|
-
Tags = 'Tags', // 标签组
|
|
62
|
-
FormTable = 'FormTable', // 可操作表格
|
|
63
|
-
Condition = 'Condition', // 条件组件
|
|
64
|
-
ColorPicker = 'ColorPicker', // 颜色选择器
|
|
65
|
-
TagSelect = 'TagSelect', // 可输入的下拉框
|
|
66
|
-
Styles = 'styles', // 配置样式
|
|
67
|
-
TimelineModal = 'TimelineModal', // 时间轴弹窗
|
|
68
|
-
ChooseModal = 'ChooseModal', // 选择弹窗
|
|
69
|
-
ObjectSelect = 'ObjectSelect', // 下拉选择带出整个对象
|
|
70
|
-
TableEditableModal = 'TableEditableModal', //可编辑的表格弹窗
|
|
71
|
-
AceEditor = 'AceEditor', // 代码编辑器
|
|
72
|
-
AceTable = 'AceTable', // 代码表格
|
|
73
|
-
Tree = 'Tree', // 树组件
|
|
74
|
-
Express = 'Express', // 表达式
|
|
75
|
-
Steps = 'Steps', // 步骤条
|
|
76
|
-
QRCode = 'QRCode',
|
|
77
|
-
Barcode = 'Barcode',
|
|
78
|
-
GroupInput = 'GroupInput',
|
|
79
|
-
EditorPreview = 'EditorPreview',
|
|
80
|
-
TagsDatePicker = 'TagsDatePicker',
|
|
81
|
-
ColorPicker = 'ColorPicker',
|
|
82
|
-
ChooseModalTable = 'ChooseModalTable', // 选择弹框,选择结果为表格
|
|
83
|
-
Progress = 'Progress', // 进度条
|
|
84
|
-
ImageText = 'ImageText', //图文组件
|
|
85
|
-
Etable2Modal = 'Etable2Modal', // 单据页的弹框选择,ModalWithConfig封装成的弹框选择
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export enum TableReadEntryType {
|
|
89
|
-
Image = 'Image',
|
|
90
|
-
SwtichRead = 'SwtichRead',
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export const tableReadEntryEnum = {
|
|
94
|
-
[TableReadEntryType.Image]: '图片',
|
|
95
|
-
[TableReadEntryType.SwtichRead]: '开关',
|
|
96
|
-
};
|
|
97
|
-
|
|
98
|
-
export enum TableActionEntryType {
|
|
99
|
-
Image = 'Image',
|
|
100
|
-
Swtich = 'Swtich',
|
|
101
|
-
SwtichRead = 'SwtichRead',
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export const tableActionEntryEnum = {
|
|
105
|
-
[TableActionEntryType.Image]: '图片',
|
|
106
|
-
[TableActionEntryType.Swtich]: '开关',
|
|
107
|
-
[TableActionEntryType.SwtichRead]: '只读开关',
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
export const tagStringEnum = {
|
|
111
|
-
[TagConditionEnum.Equals]: initLang({ id: 'condition.equals' }),
|
|
112
|
-
[TagConditionEnum.NotEqual]: initLang({ id: 'condition.NotEqual' }),
|
|
113
|
-
// [TagConditionEnum.In]: '在……范围内',
|
|
114
|
-
[TagConditionEnum.Contains]: initLang({ id: 'condition.contains' }),
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export const tagNumberEnum = {
|
|
118
|
-
[TagConditionEnum.Equals]: initLang({ id: 'condition.equals' }),
|
|
119
|
-
[TagConditionEnum.NotEqual]: initLang({ id: 'condition.NotEqual' }),
|
|
120
|
-
[TagConditionEnum.LessThan]: initLang({ id: 'condition.lessThan' }),
|
|
121
|
-
[TagConditionEnum.LessOrEqual]: initLang({ id: 'condition.lessOrEqual' }),
|
|
122
|
-
[TagConditionEnum.GreaterThan]: initLang({ id: 'condition.greaterThan' }),
|
|
123
|
-
[TagConditionEnum.GreaterOrEqual]: initLang({ id: 'condition.greaterOrEqual' }),
|
|
124
|
-
// [TagConditionEnum.In]: '在……范围内',
|
|
125
|
-
// [TagConditionEnum.Between]: '在……之间',
|
|
126
|
-
};
|
|
127
|
-
|
|
128
|
-
export interface ValueEnumType {
|
|
129
|
-
label: string;
|
|
130
|
-
value: any;
|
|
131
|
-
disabled?: boolean;
|
|
132
|
-
// style?: { bgColor?: string; color?: string; fontWeight?: boolean };
|
|
133
|
-
}
|
|
1
|
+
// export type EntryType =
|
|
2
|
+
// | 'Input'
|
|
3
|
+
// | 'InputNumber'
|
|
4
|
+
// | 'TableInput'
|
|
5
|
+
// | 'Select'
|
|
6
|
+
// | 'MultSelect'
|
|
7
|
+
// | 'DatePicker'
|
|
8
|
+
// | 'DateTimePicker'
|
|
9
|
+
// | 'RangePicker'
|
|
10
|
+
// | 'RangeTimePicker'
|
|
11
|
+
// | 'Switch'
|
|
12
|
+
// | 'Textarea'
|
|
13
|
+
// | 'TableTextarea'
|
|
14
|
+
// | 'Image'
|
|
15
|
+
// | 'Checkbox'
|
|
16
|
+
// | 'CheckboxGroup'
|
|
17
|
+
// | 'Radio'
|
|
18
|
+
// | 'ImageUpload'
|
|
19
|
+
// | 'FileUpload'
|
|
20
|
+
// | 'TreeSelect';
|
|
21
|
+
import { initLang } from '@/utils/language';
|
|
22
|
+
import { TagConditionEnum } from '@/utils/enum';
|
|
23
|
+
|
|
24
|
+
export enum EntryType {
|
|
25
|
+
Input = 'Input',
|
|
26
|
+
InputNumber = 'InputNumber',
|
|
27
|
+
InputNumberRange = 'InputNumberRange',
|
|
28
|
+
Password = 'Password',
|
|
29
|
+
Search = 'Search',
|
|
30
|
+
AllSearch = 'AllSearch',
|
|
31
|
+
TableInput = 'TableInput',
|
|
32
|
+
TableInputNumber = 'TableInputNumber',
|
|
33
|
+
Select = 'Select',
|
|
34
|
+
ObjectSelect = 'ObjectSelect',
|
|
35
|
+
MultSelect = 'MultSelect',
|
|
36
|
+
DatePicker = 'DatePicker',
|
|
37
|
+
DateTimePicker = 'DateTimePicker',
|
|
38
|
+
RangePicker = 'RangePicker',
|
|
39
|
+
RangeTimePicker = 'RangeTimePicker',
|
|
40
|
+
TimePicker = 'TimePicker',
|
|
41
|
+
SwitchRead = 'SwitchRead',
|
|
42
|
+
Switch = 'Switch',
|
|
43
|
+
Textarea = 'Textarea',
|
|
44
|
+
TableTextarea = 'TableTextarea',
|
|
45
|
+
Image = 'Image',
|
|
46
|
+
Checkbox = 'Checkbox',
|
|
47
|
+
CheckboxGroup = 'CheckboxGroup',
|
|
48
|
+
Radio = 'Radio',
|
|
49
|
+
RadioGroup = 'RadioGroup',
|
|
50
|
+
ImageUpload = 'ImageUpload',
|
|
51
|
+
FileUpload = 'FileUpload',
|
|
52
|
+
TreeSelect = 'TreeSelect',
|
|
53
|
+
Cron = 'Cron', // cron 表达式
|
|
54
|
+
Editor = 'Editor', // 富文本编辑器
|
|
55
|
+
EditorPreview = 'EditorPreview', // 富文本编辑器的预览
|
|
56
|
+
EditorModal = 'EditorModal', // 富文本编辑器弹框
|
|
57
|
+
JsonRead = 'JsonRead', // json预览
|
|
58
|
+
Link = 'Link', // 超链接
|
|
59
|
+
OpenBrowser = 'OpenBrowser', // 打开新浏览器
|
|
60
|
+
Tag = 'Tag', // 标签
|
|
61
|
+
Tags = 'Tags', // 标签组
|
|
62
|
+
FormTable = 'FormTable', // 可操作表格
|
|
63
|
+
Condition = 'Condition', // 条件组件
|
|
64
|
+
ColorPicker = 'ColorPicker', // 颜色选择器
|
|
65
|
+
TagSelect = 'TagSelect', // 可输入的下拉框
|
|
66
|
+
Styles = 'styles', // 配置样式
|
|
67
|
+
TimelineModal = 'TimelineModal', // 时间轴弹窗
|
|
68
|
+
ChooseModal = 'ChooseModal', // 选择弹窗
|
|
69
|
+
ObjectSelect = 'ObjectSelect', // 下拉选择带出整个对象
|
|
70
|
+
TableEditableModal = 'TableEditableModal', //可编辑的表格弹窗
|
|
71
|
+
AceEditor = 'AceEditor', // 代码编辑器
|
|
72
|
+
AceTable = 'AceTable', // 代码表格
|
|
73
|
+
Tree = 'Tree', // 树组件
|
|
74
|
+
Express = 'Express', // 表达式
|
|
75
|
+
Steps = 'Steps', // 步骤条
|
|
76
|
+
QRCode = 'QRCode',
|
|
77
|
+
Barcode = 'Barcode',
|
|
78
|
+
GroupInput = 'GroupInput',
|
|
79
|
+
EditorPreview = 'EditorPreview',
|
|
80
|
+
TagsDatePicker = 'TagsDatePicker',
|
|
81
|
+
ColorPicker = 'ColorPicker',
|
|
82
|
+
ChooseModalTable = 'ChooseModalTable', // 选择弹框,选择结果为表格
|
|
83
|
+
Progress = 'Progress', // 进度条
|
|
84
|
+
ImageText = 'ImageText', //图文组件
|
|
85
|
+
Etable2Modal = 'Etable2Modal', // 单据页的弹框选择,ModalWithConfig封装成的弹框选择
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export enum TableReadEntryType {
|
|
89
|
+
Image = 'Image',
|
|
90
|
+
SwtichRead = 'SwtichRead',
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export const tableReadEntryEnum = {
|
|
94
|
+
[TableReadEntryType.Image]: '图片',
|
|
95
|
+
[TableReadEntryType.SwtichRead]: '开关',
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export enum TableActionEntryType {
|
|
99
|
+
Image = 'Image',
|
|
100
|
+
Swtich = 'Swtich',
|
|
101
|
+
SwtichRead = 'SwtichRead',
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export const tableActionEntryEnum = {
|
|
105
|
+
[TableActionEntryType.Image]: '图片',
|
|
106
|
+
[TableActionEntryType.Swtich]: '开关',
|
|
107
|
+
[TableActionEntryType.SwtichRead]: '只读开关',
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
export const tagStringEnum = {
|
|
111
|
+
[TagConditionEnum.Equals]: initLang({ id: 'condition.equals' }),
|
|
112
|
+
[TagConditionEnum.NotEqual]: initLang({ id: 'condition.NotEqual' }),
|
|
113
|
+
// [TagConditionEnum.In]: '在……范围内',
|
|
114
|
+
[TagConditionEnum.Contains]: initLang({ id: 'condition.contains' }),
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export const tagNumberEnum = {
|
|
118
|
+
[TagConditionEnum.Equals]: initLang({ id: 'condition.equals' }),
|
|
119
|
+
[TagConditionEnum.NotEqual]: initLang({ id: 'condition.NotEqual' }),
|
|
120
|
+
[TagConditionEnum.LessThan]: initLang({ id: 'condition.lessThan' }),
|
|
121
|
+
[TagConditionEnum.LessOrEqual]: initLang({ id: 'condition.lessOrEqual' }),
|
|
122
|
+
[TagConditionEnum.GreaterThan]: initLang({ id: 'condition.greaterThan' }),
|
|
123
|
+
[TagConditionEnum.GreaterOrEqual]: initLang({ id: 'condition.greaterOrEqual' }),
|
|
124
|
+
// [TagConditionEnum.In]: '在……范围内',
|
|
125
|
+
// [TagConditionEnum.Between]: '在……之间',
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export interface ValueEnumType {
|
|
129
|
+
label: string;
|
|
130
|
+
value: any;
|
|
131
|
+
disabled?: boolean;
|
|
132
|
+
// style?: { bgColor?: string; color?: string; fontWeight?: boolean };
|
|
133
|
+
}
|
package/dist/Entry/index.js
CHANGED
|
@@ -3,12 +3,12 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
|
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
5
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
6
|
-
/*
|
|
7
|
-
* @Date: 2023-04-28 13:59:54
|
|
8
|
-
* @description:
|
|
9
|
-
* @author chenchangfu
|
|
10
|
-
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
11
|
-
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
6
|
+
/*
|
|
7
|
+
* @Date: 2023-04-28 13:59:54
|
|
8
|
+
* @description:
|
|
9
|
+
* @author chenchangfu
|
|
10
|
+
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
11
|
+
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import EntryItem from "./EntryItem";
|
|
@@ -4,12 +4,12 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
/*
|
|
8
|
-
* @Date: 2023-05-08 13:49:30
|
|
9
|
-
* @description:
|
|
10
|
-
* @author chenchangfu
|
|
11
|
-
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
12
|
-
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
7
|
+
/*
|
|
8
|
+
* @Date: 2023-05-08 13:49:30
|
|
9
|
+
* @description:
|
|
10
|
+
* @author chenchangfu
|
|
11
|
+
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
12
|
+
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
13
13
|
*/
|
|
14
14
|
import { Tooltip } from "antd";
|
|
15
15
|
import React from "react";
|
|
@@ -15,12 +15,12 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
15
15
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
16
16
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
17
17
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
18
|
-
/*
|
|
19
|
-
* @Date: 2023-05-08 13:49:30
|
|
20
|
-
* @description:
|
|
21
|
-
* @author chenchangfu
|
|
22
|
-
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
23
|
-
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
18
|
+
/*
|
|
19
|
+
* @Date: 2023-05-08 13:49:30
|
|
20
|
+
* @description:
|
|
21
|
+
* @author chenchangfu
|
|
22
|
+
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
23
|
+
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
24
24
|
*/
|
|
25
25
|
import { Popover } from "antd";
|
|
26
26
|
import React, { useMemo, useState } from "react";
|
package/dist/Icon/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @description:
|
|
3
|
-
* @author chenchangfu
|
|
4
|
-
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
5
|
-
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
1
|
+
/*
|
|
2
|
+
* @description:
|
|
3
|
+
* @author chenchangfu
|
|
4
|
+
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
5
|
+
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { createFromIconfontCN } from "@ant-design/icons";
|
package/dist/IconTools/utils.js
CHANGED
|
@@ -47,11 +47,11 @@ var flatColumns = function flatColumns(_columns) {
|
|
|
47
47
|
return initArr;
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
-
/**
|
|
51
|
-
* customColumns 模板数据
|
|
52
|
-
* columns 新接口数据
|
|
53
|
-
*
|
|
54
|
-
* 匹配旧数据 是否有字段增删,返回新表头
|
|
50
|
+
/**
|
|
51
|
+
* customColumns 模板数据
|
|
52
|
+
* columns 新接口数据
|
|
53
|
+
*
|
|
54
|
+
* 匹配旧数据 是否有字段增删,返回新表头
|
|
55
55
|
* */
|
|
56
56
|
export function adapterColumns(customColumns, columns) {
|
|
57
57
|
if (customColumns && customColumns.length && columns && columns.length) {
|
|
@@ -4,14 +4,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
/*
|
|
8
|
-
* @description:
|
|
9
|
-
* @author chenchangfu
|
|
10
|
-
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
11
|
-
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
7
|
+
/*
|
|
8
|
+
* @description:
|
|
9
|
+
* @author chenchangfu
|
|
10
|
+
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
11
|
+
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
12
12
|
*/
|
|
13
|
-
/**
|
|
14
|
-
* 小计弹窗
|
|
13
|
+
/**
|
|
14
|
+
* 小计弹窗
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { PlusOutlined } from "@ant-design/icons";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["onChange", "showArrows"];
|
|
2
|
+
var _excluded = ["onChange", "showArrows", "isRoot"];
|
|
3
3
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
4
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -14,7 +14,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
14
14
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
15
15
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
16
|
import { HolderOutlined, VerticalAlignBottomOutlined, VerticalAlignMiddleOutlined, VerticalAlignTopOutlined } from "@ant-design/icons";
|
|
17
|
-
import { Slider, Tooltip } from "antd";
|
|
17
|
+
import { Slider, Switch, Tooltip } from "antd";
|
|
18
18
|
import React from "react";
|
|
19
19
|
import { useDrag, useDrop } from "react-dnd";
|
|
20
20
|
import "../../style/components/TableHeaderConfigPopover.scss";
|
|
@@ -40,6 +40,7 @@ var Box = function Box(_ref) {
|
|
|
40
40
|
var Dustbin = function Dustbin(_ref2) {
|
|
41
41
|
var _onChange = _ref2.onChange,
|
|
42
42
|
showArrows = _ref2.showArrows,
|
|
43
|
+
isRoot = _ref2.isRoot,
|
|
43
44
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
44
45
|
var item = props.item;
|
|
45
46
|
var _useDrop = useDrop({
|
|
@@ -83,7 +84,7 @@ var Dustbin = function Dustbin(_ref2) {
|
|
|
83
84
|
flex: 1
|
|
84
85
|
},
|
|
85
86
|
onChange: function onChange(e) {
|
|
86
|
-
return _onChange(e, item);
|
|
87
|
+
return _onChange(e, item, "width");
|
|
87
88
|
},
|
|
88
89
|
value: typeof item.width === "number" ? item.width : 0
|
|
89
90
|
}), /*#__PURE__*/React.createElement("span", {
|
|
@@ -103,6 +104,14 @@ var Dustbin = function Dustbin(_ref2) {
|
|
|
103
104
|
onClick: function onClick(e) {
|
|
104
105
|
return props.onFixed(item.dataIndex, "right", e);
|
|
105
106
|
}
|
|
106
|
-
}))
|
|
107
|
+
})), !!isRoot && /*#__PURE__*/React.createElement(Switch, {
|
|
108
|
+
checkedChildren: "\u6298\u53E0",
|
|
109
|
+
unCheckedChildren: "\u5C55\u5F00",
|
|
110
|
+
size: "small",
|
|
111
|
+
checked: item.frontEndFold === true || item.frontEndFold === undefined && ["FIRST", "LAST", "NONEDATA"].includes(item.hierarchyState),
|
|
112
|
+
onChange: function onChange(e) {
|
|
113
|
+
return _onChange === null || _onChange === void 0 ? void 0 : _onChange(e, item, "frontEndFold");
|
|
114
|
+
}
|
|
115
|
+
}));
|
|
107
116
|
};
|
|
108
117
|
export default Dustbin;
|
|
@@ -21,12 +21,12 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
21
21
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
22
22
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
23
23
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
24
|
-
/*
|
|
25
|
-
* @Date: 2023-05-08 13:49:30
|
|
26
|
-
* @description:
|
|
27
|
-
* @author chenchangfu
|
|
28
|
-
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
29
|
-
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
24
|
+
/*
|
|
25
|
+
* @Date: 2023-05-08 13:49:30
|
|
26
|
+
* @description:
|
|
27
|
+
* @author chenchangfu
|
|
28
|
+
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
29
|
+
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
30
30
|
*/
|
|
31
31
|
// import { crossContext } from "@/my-context";
|
|
32
32
|
// import { initLang } from "@/utils/language";
|
|
@@ -67,14 +67,6 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
67
67
|
var _props$editItem, _props$editItem2;
|
|
68
68
|
setTemplateName((_props$editItem = props.editItem) === null || _props$editItem === void 0 ? void 0 : _props$editItem.label);
|
|
69
69
|
setPermsType(((_props$editItem2 = props.editItem) === null || _props$editItem2 === void 0 ? void 0 : _props$editItem2.perms_type) || "private");
|
|
70
|
-
// if (
|
|
71
|
-
// props.editItem?.owner === "Y" &&
|
|
72
|
-
// props.editItem?.perms_type === "public"
|
|
73
|
-
// ) {
|
|
74
|
-
// setCheckShare(true);
|
|
75
|
-
// } else {
|
|
76
|
-
// setCheckShare(false);
|
|
77
|
-
// }
|
|
78
70
|
}, [props.editItem]);
|
|
79
71
|
var saveTempale = /*#__PURE__*/function () {
|
|
80
72
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
|
|
@@ -311,12 +303,11 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
311
303
|
};
|
|
312
304
|
|
|
313
305
|
// 宽度调整
|
|
314
|
-
var
|
|
315
|
-
var _columnsTree = _toConsumableArray(columnsTree);
|
|
306
|
+
var changeTableHeader = function changeTableHeader(val, item, _key) {
|
|
316
307
|
function loopItmes(arr) {
|
|
317
308
|
for (var i = 0, l = arr.length; i < l; i++) {
|
|
318
309
|
if (arr[i].dataIndex === item.dataIndex) {
|
|
319
|
-
arr[i]
|
|
310
|
+
arr[i][_key] = val;
|
|
320
311
|
return;
|
|
321
312
|
}
|
|
322
313
|
if (arr[i].children) {
|
|
@@ -324,9 +315,12 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
324
315
|
}
|
|
325
316
|
}
|
|
326
317
|
}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
318
|
+
if (_key) {
|
|
319
|
+
var _columnsTree = _toConsumableArray(columnsTree);
|
|
320
|
+
loopItmes(_columnsTree);
|
|
321
|
+
setColumnsTree(_columnsTree);
|
|
322
|
+
updateColumns(_columnsTree);
|
|
323
|
+
}
|
|
330
324
|
};
|
|
331
325
|
|
|
332
326
|
// const [leftFixed, unFixed, rightFixed]: any = columnsTree.reduce(
|
|
@@ -490,7 +484,7 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
490
484
|
disabled: d.customizable === false,
|
|
491
485
|
title: d.customizable === false ? d.title : /*#__PURE__*/React.createElement(Dustbin, {
|
|
492
486
|
item: d,
|
|
493
|
-
onChange:
|
|
487
|
+
onChange: changeTableHeader,
|
|
494
488
|
onFixed: onFixed,
|
|
495
489
|
showArrows: showArrows,
|
|
496
490
|
onDrop: d.customizable === false ? null : onDrop // 子动态列 不能拖拽
|
|
@@ -589,7 +583,8 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
589
583
|
onDrop: onDrop,
|
|
590
584
|
onFixed: onFixed,
|
|
591
585
|
showArrows: ["center", "down"],
|
|
592
|
-
onChange:
|
|
586
|
+
onChange: changeTableHeader,
|
|
587
|
+
isRoot: c.children && c.children.length
|
|
593
588
|
}),
|
|
594
589
|
children: titleChildren(c.children, ["center", "down"])
|
|
595
590
|
};
|
|
@@ -621,7 +616,8 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
621
616
|
onDrop: onDrop,
|
|
622
617
|
onFixed: onFixed,
|
|
623
618
|
showArrows: ["up", "down"],
|
|
624
|
-
onChange:
|
|
619
|
+
onChange: changeTableHeader,
|
|
620
|
+
isRoot: c.children && c.children.length
|
|
625
621
|
}),
|
|
626
622
|
children: titleChildren(c.children, ["up", "down"])
|
|
627
623
|
};
|
|
@@ -651,7 +647,8 @@ var ColumnsToolbarRender = /*#__PURE__*/memo(function (props) {
|
|
|
651
647
|
onDrop: onDrop,
|
|
652
648
|
onFixed: onFixed,
|
|
653
649
|
showArrows: ["up", "center"],
|
|
654
|
-
onChange:
|
|
650
|
+
onChange: changeTableHeader,
|
|
651
|
+
isRoot: c.children && c.children.length
|
|
655
652
|
}),
|
|
656
653
|
children: titleChildren(c.children, ["up", "center"])
|
|
657
654
|
};
|
|
@@ -954,6 +951,7 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
954
951
|
menu_code: menuCode,
|
|
955
952
|
form_template_code: formTemplateCode,
|
|
956
953
|
is_default: isDefault,
|
|
954
|
+
is_default_public: isDefault,
|
|
957
955
|
code: item === null || item === void 0 ? void 0 : item.value,
|
|
958
956
|
name: item === null || item === void 0 ? void 0 : item.label,
|
|
959
957
|
configs: item === null || item === void 0 ? void 0 : item.define,
|
|
@@ -966,7 +964,7 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
966
964
|
id: "message.success.set"
|
|
967
965
|
}));
|
|
968
966
|
// 刷新列表
|
|
969
|
-
setCurItem({});
|
|
967
|
+
// setCurItem({});
|
|
970
968
|
getColumnsFilter();
|
|
971
969
|
}
|
|
972
970
|
});
|
|
@@ -974,6 +972,29 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
974
972
|
}
|
|
975
973
|
});
|
|
976
974
|
};
|
|
975
|
+
|
|
976
|
+
// 取消选择 恢复默认
|
|
977
|
+
var cancelSelect = function cancelSelect() {
|
|
978
|
+
setValue("");
|
|
979
|
+
setCurItem({});
|
|
980
|
+
restColumns("cancel");
|
|
981
|
+
};
|
|
982
|
+
var restColumns = function restColumns(code) {
|
|
983
|
+
if (curItem !== null && curItem !== void 0 && curItem.define && !code) {
|
|
984
|
+
props.updateColumns(JSON.parse(curItem.define));
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
var loopColumns = function loopColumns(arr, firstLoop) {
|
|
988
|
+
return arr.map(function (field) {
|
|
989
|
+
return _objectSpread(_objectSpread({}, field), {}, {
|
|
990
|
+
checked: typeof field.checked === "boolean" ? field.checked : field.defaultDisplay == false ? false : true,
|
|
991
|
+
children: field.children ? loopColumns(field.children) : null
|
|
992
|
+
});
|
|
993
|
+
});
|
|
994
|
+
};
|
|
995
|
+
var _columns = loopColumns(cloneDeep(props.columns), true);
|
|
996
|
+
props.updateColumns(_columns);
|
|
997
|
+
};
|
|
977
998
|
return /*#__PURE__*/React.createElement("div", {
|
|
978
999
|
className: "popover-body",
|
|
979
1000
|
style: {
|
|
@@ -1002,6 +1023,7 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
1002
1023
|
columns: columnsCofnig,
|
|
1003
1024
|
updateColumns: props.updateColumns,
|
|
1004
1025
|
handleBack: function handleBack() {
|
|
1026
|
+
restColumns();
|
|
1005
1027
|
setShowConfig(false);
|
|
1006
1028
|
},
|
|
1007
1029
|
handleSaveCallback: handleSaveCallback,
|
|
@@ -1084,7 +1106,7 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
1084
1106
|
className: "set-text-default"
|
|
1085
1107
|
}, initLang({
|
|
1086
1108
|
id: "prompt.text.default"
|
|
1087
|
-
})),
|
|
1109
|
+
})), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(Tooltip, {
|
|
1088
1110
|
placement: "top",
|
|
1089
1111
|
title: initLang({
|
|
1090
1112
|
id: "prompt.copyTemplate"
|
|
@@ -1127,17 +1149,18 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
1127
1149
|
return handleSet(item);
|
|
1128
1150
|
}
|
|
1129
1151
|
}))));
|
|
1130
|
-
}))),
|
|
1152
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
1131
1153
|
style: {
|
|
1132
1154
|
position: "absolute",
|
|
1133
1155
|
right: 12,
|
|
1134
1156
|
bottom: 16
|
|
1135
1157
|
}
|
|
1136
|
-
}, (curItem === null || curItem === void 0 ? void 0 : curItem.is_default) === "Y" ? /*#__PURE__*/React.createElement(Button, {
|
|
1158
|
+
}, (curItem === null || curItem === void 0 ? void 0 : curItem.perms_type) == "private" && /*#__PURE__*/React.createElement(React.Fragment, null, (curItem === null || curItem === void 0 ? void 0 : curItem.is_default) === "Y" ? /*#__PURE__*/React.createElement(Button, {
|
|
1137
1159
|
onClick: function onClick() {
|
|
1138
1160
|
return handleSaveDefault("N");
|
|
1139
1161
|
},
|
|
1140
|
-
size: "small"
|
|
1162
|
+
size: "small",
|
|
1163
|
+
type: "primary"
|
|
1141
1164
|
}, initLang({
|
|
1142
1165
|
id: "button.set.cancelDefault"
|
|
1143
1166
|
})) : /*#__PURE__*/React.createElement(Button, {
|
|
@@ -1148,6 +1171,14 @@ var ColumnsToolbar = function ColumnsToolbar(_ref4) {
|
|
|
1148
1171
|
type: "primary"
|
|
1149
1172
|
}, initLang({
|
|
1150
1173
|
id: "button.set.default"
|
|
1174
|
+
}))), /*#__PURE__*/React.createElement(Button, {
|
|
1175
|
+
style: {
|
|
1176
|
+
marginLeft: 8
|
|
1177
|
+
},
|
|
1178
|
+
onClick: cancelSelect,
|
|
1179
|
+
size: "small"
|
|
1180
|
+
}, initLang({
|
|
1181
|
+
id: "button.set.cancelSelect"
|
|
1151
1182
|
})))));
|
|
1152
1183
|
};
|
|
1153
1184
|
var Index = function Index(_ref9) {
|
|
@@ -2,11 +2,11 @@ var _excluded = ["menuCode", "formTemplateCode", "columns", "updateColumns"];
|
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
5
|
-
/*
|
|
6
|
-
* @description:
|
|
7
|
-
* @author chenchangfu
|
|
8
|
-
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
9
|
-
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
5
|
+
/*
|
|
6
|
+
* @description:
|
|
7
|
+
* @author chenchangfu
|
|
8
|
+
* Copyright (c) 2019, AUTHOR. All rights reserved.
|
|
9
|
+
* AUTHOR PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
|
|
10
10
|
*/
|
|
11
11
|
import React from "react";
|
|
12
12
|
import TableHeaderConfigPopover from "../TableHeaderConfigPopover";
|