fan-standard-comp 3.1.2 → 3.1.4
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/package.json +1 -1
- package/dist/f26952c118ab6cdcd23dc0028ee98c11.svg +0 -173
- package/dist/fan-standard-comp.umd.js +0 -597
- package/dist/fonts/iconfont.eot +0 -0
- package/dist/fonts/iconfont.ttf +0 -0
- package/dist/fonts/iconfont.woff +0 -0
- package/es/ButtonGroup/ButtonList.d.ts +0 -2
- package/es/ButtonGroup/ButtonList.js +0 -37
- package/es/ButtonGroup/ButtonMenu.d.ts +0 -2
- package/es/ButtonGroup/ButtonMenu.js +0 -38
- package/es/ButtonGroup/PopConfirmTitle.d.ts +0 -9
- package/es/ButtonGroup/PopConfirmTitle.js +0 -37
- package/es/ButtonGroup/index.d.ts +0 -30
- package/es/ButtonGroup/index.js +0 -374
- package/es/ButtonGroup/style/index.less +0 -36
- package/es/DragContent/DragBar.js +0 -21
- package/es/DragContent/index.d.ts +0 -14
- package/es/DragContent/index.js +0 -173
- package/es/DragContent/index.less +0 -44
- package/es/FormComp/ChunkUploader/api.js +0 -76
- package/es/FormComp/ChunkUploader/index.js +0 -391
- package/es/FormComp/ChunkUploader/lib.js +0 -96
- package/es/FormComp/ChunkUploader/style/style.less +0 -3
- package/es/FormComp/ChunkUploader/upload-queue.class.js +0 -167
- package/es/FormComp/ChunkUploader/worker.js +0 -23
- package/es/FormComp/EditButton/index.d.ts +0 -26
- package/es/FormComp/EditButton/index.js +0 -140
- package/es/FormComp/FieldComponent/ReUpload.d.ts +0 -3
- package/es/FormComp/FieldComponent/ReUpload.js +0 -131
- package/es/FormComp/FieldComponent/RefactorTreeSelect.js +0 -245
- package/es/FormComp/FieldComponent/TitleNode.d.ts +0 -6
- package/es/FormComp/FieldComponent/TitleNode.js +0 -9
- package/es/FormComp/FieldComponent/index.d.ts +0 -38
- package/es/FormComp/FieldComponent/index.js +0 -413
- package/es/FormComp/FieldComponent/setReadonlyValues.js +0 -236
- package/es/FormComp/FieldComponent/style/index.less +0 -116
- package/es/FormComp/RenderItemGroup/index.d.ts +0 -37
- package/es/FormComp/RenderItemGroup/index.js +0 -234
- package/es/FormComp/Uploader/index.d.ts +0 -19
- package/es/FormComp/Uploader/index.js +0 -275
- package/es/FormComp/Uploader/style/index.less +0 -14
- package/es/FormComp/Uploader/util.d.ts +0 -8
- package/es/FormComp/Uploader/util.js +0 -38
- package/es/FormComp/VarTemplate/index.js +0 -293
- package/es/FormComp/index.d.ts +0 -1
- package/es/FormComp/index.js +0 -1
- package/es/NavLeafScroll/index.js +0 -379
- package/es/NavLeafScroll/style/index.less +0 -119
- package/es/RefactorTree/data.d.ts +0 -7
- package/es/RefactorTree/index.d.ts +0 -40
- package/es/RefactorTree/index.js +0 -167
- package/es/RefactorTree/indexTreeNode.d.ts +0 -39
- package/es/RefactorTree/indexTreeNode.js +0 -237
- package/es/RefactorTree/style/index.d.ts +0 -1
- package/es/RefactorTree/style/index.js +0 -1
- package/es/RefactorTree/style/index.less +0 -22
- package/es/RefactorTree/util.d.ts +0 -42
- package/es/RefactorTree/util.js +0 -187
- package/es/SpecIcon/fonts/demo.css +0 -539
- package/es/SpecIcon/fonts/demo_index.html +0 -1315
- package/es/SpecIcon/fonts/iconfont.css +0 -211
- package/es/SpecIcon/fonts/iconfont.eot +0 -0
- package/es/SpecIcon/fonts/iconfont.js +0 -41
- package/es/SpecIcon/fonts/iconfont.json +0 -352
- package/es/SpecIcon/fonts/iconfont.svg +0 -173
- package/es/SpecIcon/fonts/iconfont.ttf +0 -0
- package/es/SpecIcon/fonts/iconfont.woff +0 -0
- package/es/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/es/SpecIcon/index.d.ts +0 -17
- package/es/SpecIcon/index.js +0 -77
- package/es/SpecIcon/style/iconfont.less +0 -213
- package/es/SpecIcon/style/index.less +0 -98
- package/es/SplitterLayout/Pane.d.ts +0 -13
- package/es/SplitterLayout/Pane.js +0 -36
- package/es/SplitterLayout/index.js +0 -375
- package/es/SplitterLayout/index.less +0 -58
- package/es/StandardContent/SplitterLayout/Pane.js +0 -50
- package/es/StandardContent/SplitterLayout/index.js +0 -374
- package/es/StandardContent/SplitterLayout/index.less +0 -58
- package/es/StandardContent/SubfieldContent.d.ts +0 -17
- package/es/StandardContent/SubfieldContent.js +0 -41
- package/es/StandardContent/WrapperContent.d.ts +0 -13
- package/es/StandardContent/WrapperContent.js +0 -29
- package/es/StandardContent/data.d.ts +0 -101
- package/es/StandardContent/style/index.less +0 -80
- package/es/StandardDragModal/index.d.ts +0 -11
- package/es/StandardDragModal/index.js +0 -30
- package/es/StandardFilter/index.d.ts +0 -35
- package/es/StandardFilter/index.js +0 -253
- package/es/StandardFilter/style/index.less +0 -62
- package/es/StandardForm/ActionList.js +0 -44
- package/es/StandardForm/StepForm.d.ts +0 -19
- package/es/StandardForm/StepForm.js +0 -267
- package/es/StandardForm/TabForm.d.ts +0 -19
- package/es/StandardForm/TabForm.js +0 -122
- package/es/StandardForm/index.d.ts +0 -32
- package/es/StandardForm/index.js +0 -170
- package/es/StandardForm/style/index.less +0 -58
- package/es/StandardModal/UpdateFormRef.js +0 -18
- package/es/StandardModal/index.d.ts +0 -44
- package/es/StandardModal/index.js +0 -495
- package/es/StandardModal/style/index.less +0 -50
- package/es/StandardPanel/index.d.ts +0 -28
- package/es/StandardPanel/index.js +0 -134
- package/es/StandardPanel/style/index.less +0 -135
- package/es/StandardTable/index.d.ts +0 -22
- package/es/StandardTable/index.js +0 -126
- package/es/StandardTable/style/index.d.ts +0 -1
- package/es/StandardTable/style/index.js +0 -1
- package/es/StandardTable/style/index.less +0 -206
- package/es/components/IconNode/index.d.ts +0 -16
- package/es/components/IconNode/index.js +0 -28
- package/es/components/index.d.ts +0 -2
- package/es/components/index.js +0 -2
- package/es/data/func.code.js +0 -112
- package/es/data/general.config.js +0 -172
- package/es/data/index.js +0 -3
- package/es/index.d.ts +0 -24
- package/es/index.js +0 -31
- package/es/styles/index.less +0 -0
- package/es/theme/spec-variable.less +0 -48
- package/es/utils/ValueFormat.js +0 -50
- package/es/utils/filterPermission.js +0 -111
- package/es/utils/getParentNodes.js +0 -215
- package/es/utils/index.js +0 -3
- package/lib/ButtonGroup/ButtonList.d.ts +0 -2
- package/lib/ButtonGroup/ButtonList.js +0 -55
- package/lib/ButtonGroup/ButtonMenu.d.ts +0 -2
- package/lib/ButtonGroup/ButtonMenu.js +0 -51
- package/lib/ButtonGroup/PopConfirmTitle.d.ts +0 -9
- package/lib/ButtonGroup/PopConfirmTitle.js +0 -48
- package/lib/ButtonGroup/index.d.ts +0 -30
- package/lib/ButtonGroup/index.js +0 -405
- package/lib/ButtonGroup/style/index.less +0 -36
- package/lib/DragContent/DragBar.js +0 -33
- package/lib/DragContent/index.d.ts +0 -14
- package/lib/DragContent/index.js +0 -191
- package/lib/DragContent/index.less +0 -44
- package/lib/FormComp/ChunkUploader/api.js +0 -89
- package/lib/FormComp/ChunkUploader/index.js +0 -410
- package/lib/FormComp/ChunkUploader/lib.js +0 -113
- package/lib/FormComp/ChunkUploader/style/style.less +0 -3
- package/lib/FormComp/ChunkUploader/upload-queue.class.js +0 -174
- package/lib/FormComp/ChunkUploader/worker.js +0 -28
- package/lib/FormComp/EditButton/index.d.ts +0 -26
- package/lib/FormComp/EditButton/index.js +0 -159
- package/lib/FormComp/FieldComponent/ReUpload.d.ts +0 -3
- package/lib/FormComp/FieldComponent/ReUpload.js +0 -151
- package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +0 -268
- package/lib/FormComp/FieldComponent/TitleNode.d.ts +0 -6
- package/lib/FormComp/FieldComponent/TitleNode.js +0 -19
- package/lib/FormComp/FieldComponent/index.d.ts +0 -38
- package/lib/FormComp/FieldComponent/index.js +0 -457
- package/lib/FormComp/FieldComponent/setReadonlyValues.js +0 -263
- package/lib/FormComp/FieldComponent/style/index.less +0 -116
- package/lib/FormComp/RenderItemGroup/index.d.ts +0 -37
- package/lib/FormComp/RenderItemGroup/index.js +0 -255
- package/lib/FormComp/Uploader/index.d.ts +0 -19
- package/lib/FormComp/Uploader/index.js +0 -301
- package/lib/FormComp/Uploader/style/index.less +0 -14
- package/lib/FormComp/Uploader/util.d.ts +0 -8
- package/lib/FormComp/Uploader/util.js +0 -47
- package/lib/FormComp/VarTemplate/index.js +0 -308
- package/lib/FormComp/index.d.ts +0 -1
- package/lib/FormComp/index.js +0 -15
- package/lib/NavLeafScroll/index.js +0 -397
- package/lib/NavLeafScroll/style/index.less +0 -119
- package/lib/RefactorTree/data.d.ts +0 -7
- package/lib/RefactorTree/index.d.ts +0 -40
- package/lib/RefactorTree/index.js +0 -190
- package/lib/RefactorTree/indexTreeNode.d.ts +0 -39
- package/lib/RefactorTree/indexTreeNode.js +0 -260
- package/lib/RefactorTree/style/index.d.ts +0 -1
- package/lib/RefactorTree/style/index.js +0 -3
- package/lib/RefactorTree/style/index.less +0 -22
- package/lib/RefactorTree/util.d.ts +0 -42
- package/lib/RefactorTree/util.js +0 -195
- package/lib/SpecIcon/fonts/demo.css +0 -539
- package/lib/SpecIcon/fonts/demo_index.html +0 -1315
- package/lib/SpecIcon/fonts/iconfont.css +0 -211
- package/lib/SpecIcon/fonts/iconfont.eot +0 -0
- package/lib/SpecIcon/fonts/iconfont.js +0 -43
- package/lib/SpecIcon/fonts/iconfont.json +0 -352
- package/lib/SpecIcon/fonts/iconfont.svg +0 -173
- package/lib/SpecIcon/fonts/iconfont.ttf +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff +0 -0
- package/lib/SpecIcon/fonts/iconfont.woff2 +0 -0
- package/lib/SpecIcon/index.d.ts +0 -17
- package/lib/SpecIcon/index.js +0 -90
- package/lib/SpecIcon/style/iconfont.less +0 -213
- package/lib/SpecIcon/style/index.less +0 -98
- package/lib/SplitterLayout/Pane.d.ts +0 -13
- package/lib/SplitterLayout/Pane.js +0 -48
- package/lib/SplitterLayout/index.js +0 -386
- package/lib/SplitterLayout/index.less +0 -58
- package/lib/StandardContent/SplitterLayout/Pane.js +0 -62
- package/lib/StandardContent/SplitterLayout/index.js +0 -387
- package/lib/StandardContent/SplitterLayout/index.less +0 -58
- package/lib/StandardContent/SubfieldContent.d.ts +0 -17
- package/lib/StandardContent/SubfieldContent.js +0 -56
- package/lib/StandardContent/WrapperContent.d.ts +0 -13
- package/lib/StandardContent/WrapperContent.js +0 -43
- package/lib/StandardContent/data.d.ts +0 -101
- package/lib/StandardContent/style/index.less +0 -80
- package/lib/StandardDragModal/index.d.ts +0 -11
- package/lib/StandardDragModal/index.js +0 -43
- package/lib/StandardFilter/index.d.ts +0 -35
- package/lib/StandardFilter/index.js +0 -272
- package/lib/StandardFilter/style/index.less +0 -62
- package/lib/StandardForm/ActionList.js +0 -57
- package/lib/StandardForm/StepForm.d.ts +0 -19
- package/lib/StandardForm/StepForm.js +0 -295
- package/lib/StandardForm/TabForm.d.ts +0 -19
- package/lib/StandardForm/TabForm.js +0 -148
- package/lib/StandardForm/index.d.ts +0 -32
- package/lib/StandardForm/index.js +0 -197
- package/lib/StandardForm/style/index.less +0 -58
- package/lib/StandardModal/UpdateFormRef.js +0 -32
- package/lib/StandardModal/index.d.ts +0 -44
- package/lib/StandardModal/index.js +0 -525
- package/lib/StandardModal/style/index.less +0 -50
- package/lib/StandardPanel/index.d.ts +0 -28
- package/lib/StandardPanel/index.js +0 -155
- package/lib/StandardPanel/style/index.less +0 -135
- package/lib/StandardTable/index.d.ts +0 -22
- package/lib/StandardTable/index.js +0 -143
- package/lib/StandardTable/style/index.d.ts +0 -1
- package/lib/StandardTable/style/index.js +0 -3
- package/lib/StandardTable/style/index.less +0 -206
- package/lib/components/IconNode/index.d.ts +0 -16
- package/lib/components/IconNode/index.js +0 -39
- package/lib/components/index.d.ts +0 -2
- package/lib/components/index.js +0 -15
- package/lib/data/func.code.js +0 -119
- package/lib/data/general.config.js +0 -179
- package/lib/data/index.js +0 -23
- package/lib/index.d.ts +0 -24
- package/lib/index.js +0 -236
- package/lib/styles/index.less +0 -0
- package/lib/theme/spec-variable.less +0 -48
- package/lib/utils/ValueFormat.js +0 -58
- package/lib/utils/filterPermission.js +0 -127
- package/lib/utils/getParentNodes.js +0 -226
- package/lib/utils/index.js +0 -35
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
@root-entry-name: default;
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index';
|
|
3
|
-
|
|
4
|
-
.scroll-bar(){
|
|
5
|
-
&::-webkit-scrollbar-track-piece {
|
|
6
|
-
background: fade(@primary-color, 10%);
|
|
7
|
-
}
|
|
8
|
-
&::-webkit-scrollbar {
|
|
9
|
-
width: 6px;
|
|
10
|
-
height: 6px;
|
|
11
|
-
}
|
|
12
|
-
&::-webkit-scrollbar-thumb {
|
|
13
|
-
background: fade(@primary-color, 50%);
|
|
14
|
-
border-radius: 20px;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
.spec-wrapper-content {
|
|
18
|
-
position: relative;
|
|
19
|
-
padding: @padding-lg;
|
|
20
|
-
background: @background-color-base;
|
|
21
|
-
height: 100%;
|
|
22
|
-
overflow: auto;
|
|
23
|
-
& .light-block {
|
|
24
|
-
padding: @padding-lg;
|
|
25
|
-
background: @layout-body-background;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
.spec-grid-content {
|
|
29
|
-
position: relative;
|
|
30
|
-
display: flex;
|
|
31
|
-
height: calc(100vh - @layout-header-height);
|
|
32
|
-
background:transparent; // @background-color-base;
|
|
33
|
-
.spec-grid-left {
|
|
34
|
-
height: calc(100vh - @layout-header-height);
|
|
35
|
-
padding: @padding-md @padding-sm;
|
|
36
|
-
background: @layout-body-background;
|
|
37
|
-
overflow-y: auto;
|
|
38
|
-
.scroll-bar();
|
|
39
|
-
.ant-tree-list,
|
|
40
|
-
.ant-tree {
|
|
41
|
-
max-height: 100%;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
.spec-grid-right {
|
|
45
|
-
flex: 1;
|
|
46
|
-
height: calc(100vh - @layout-header-height);
|
|
47
|
-
padding: @padding-lg;
|
|
48
|
-
overflow-y: auto;
|
|
49
|
-
//margin-left: 200px
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// 加载loading中状态样式
|
|
54
|
-
.spec-wrapper-content-loading,
|
|
55
|
-
.spec-grid-content-loading{
|
|
56
|
-
& > *:not(.ant-spin) {
|
|
57
|
-
opacity: .6;
|
|
58
|
-
}
|
|
59
|
-
& > .ant-spin.ant-spin-spinning{
|
|
60
|
-
position: absolute;
|
|
61
|
-
top: 0;
|
|
62
|
-
left: 0;
|
|
63
|
-
z-index: 4;
|
|
64
|
-
width: 100%;
|
|
65
|
-
height: 100%;
|
|
66
|
-
.ant-spin-dot {
|
|
67
|
-
position: absolute;
|
|
68
|
-
top: 25%;
|
|
69
|
-
left: 50%;
|
|
70
|
-
margin: -10px;
|
|
71
|
-
}
|
|
72
|
-
.ant-spin-text {
|
|
73
|
-
position: absolute;
|
|
74
|
-
top: 25%;
|
|
75
|
-
width: 100%;
|
|
76
|
-
padding-top: 5px;
|
|
77
|
-
margin-top: 10px;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import 'ant-design-draggable-modal/dist/index.css';
|
|
3
|
-
interface StandardDragModalProps {
|
|
4
|
-
visible: boolean;
|
|
5
|
-
title?: string | React.ReactNode;
|
|
6
|
-
initialWidth?: number;
|
|
7
|
-
initialHeight?: number;
|
|
8
|
-
[k: string]: any;
|
|
9
|
-
}
|
|
10
|
-
declare const StandardDragModal: (props: StandardDragModalProps) => JSX.Element;
|
|
11
|
-
export default StandardDragModal;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { __rest } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { DraggableModal, DraggableModalProvider } from 'ant-design-draggable-modal';
|
|
4
|
-
import 'ant-design-draggable-modal/dist/index.css';
|
|
5
|
-
|
|
6
|
-
var StandardDragModal = function StandardDragModal(props) {
|
|
7
|
-
var visible = props.visible,
|
|
8
|
-
onCancel = props.onCancel,
|
|
9
|
-
onSubmit = props.onSubmit,
|
|
10
|
-
children = props.children,
|
|
11
|
-
others = __rest(props, ["visible", "onCancel", "onSubmit", "children"]);
|
|
12
|
-
|
|
13
|
-
var handleOk = function handleOk() {
|
|
14
|
-
onSubmit && onSubmit();
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
var handleCancel = function handleCancel() {
|
|
18
|
-
onCancel && onCancel();
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
return /*#__PURE__*/React.createElement(DraggableModalProvider, null, /*#__PURE__*/React.createElement(DraggableModal, Object.assign({
|
|
22
|
-
visible: visible,
|
|
23
|
-
onOk: handleOk,
|
|
24
|
-
onCancel: handleCancel
|
|
25
|
-
}, others, {
|
|
26
|
-
zIndex: 1001
|
|
27
|
-
}), children));
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export default StandardDragModal;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { FieldComponentProps } from '../FormComp/FieldComponent';
|
|
3
|
-
import { ButtonGroupOptionsProps } from '../ButtonGroup/index';
|
|
4
|
-
import './style/index.less';
|
|
5
|
-
export interface StandardFilterProps {
|
|
6
|
-
buttonGroup?: ButtonGroupOptionsProps[];
|
|
7
|
-
formItemGroup?: FieldComponentProps[];
|
|
8
|
-
confirmText?: string;
|
|
9
|
-
onFilterSearch?: (value?: object) => void;
|
|
10
|
-
onFilterReset?: (value?: object) => void;
|
|
11
|
-
cancelText?: string;
|
|
12
|
-
initialValues?: any;
|
|
13
|
-
getFormFields?: (fields: any, form: any) => void;
|
|
14
|
-
className?: string;
|
|
15
|
-
style?: React.CSSProperties;
|
|
16
|
-
min?: number;
|
|
17
|
-
codes?: any[];
|
|
18
|
-
permissionCodes?: string[];
|
|
19
|
-
}
|
|
20
|
-
declare class StandardFilter extends React.Component<StandardFilterProps, any> {
|
|
21
|
-
static getDerivedStateFromProps(nextProps: StandardFilterProps): {
|
|
22
|
-
reFormItemGroup: FieldComponentProps[];
|
|
23
|
-
};
|
|
24
|
-
private filterFormRef;
|
|
25
|
-
constructor(props: StandardFilterProps);
|
|
26
|
-
componentDidMount(): void;
|
|
27
|
-
componentDidUpdate(prevProps: StandardFilterProps): void;
|
|
28
|
-
updateFormFields: (newVal?: any, force?: boolean) => void;
|
|
29
|
-
handleSearch: (values: object) => void;
|
|
30
|
-
handleReset: () => void;
|
|
31
|
-
itemIsHide: (isHide: any) => any;
|
|
32
|
-
renderFormItemGroup: () => any;
|
|
33
|
-
render(): JSX.Element;
|
|
34
|
-
}
|
|
35
|
-
export default StandardFilter;
|
|
@@ -1,253 +0,0 @@
|
|
|
1
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2
|
-
|
|
3
|
-
import "antd/es/button/style";
|
|
4
|
-
import _Button from "antd/es/button";
|
|
5
|
-
import "antd/es/form/style";
|
|
6
|
-
import _Form from "antd/es/form";
|
|
7
|
-
|
|
8
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
-
|
|
10
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
11
|
-
|
|
12
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
|
|
14
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
-
|
|
16
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
17
|
-
|
|
18
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
19
|
-
|
|
20
|
-
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; }
|
|
21
|
-
|
|
22
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
23
|
-
|
|
24
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
25
|
-
|
|
26
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
27
|
-
|
|
28
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
29
|
-
|
|
30
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
31
|
-
|
|
32
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
33
|
-
|
|
34
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
35
|
-
|
|
36
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
37
|
-
|
|
38
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
39
|
-
|
|
40
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
41
|
-
|
|
42
|
-
import React from 'react';
|
|
43
|
-
import FieldComponent from '../FormComp/FieldComponent';
|
|
44
|
-
import UtilValueFormat from '../utils/ValueFormat.js';
|
|
45
|
-
import ButtonGroup from '../ButtonGroup/index';
|
|
46
|
-
import { general } from '../data/index';
|
|
47
|
-
import './style/index.less';
|
|
48
|
-
var FormItem = _Form.Item;
|
|
49
|
-
|
|
50
|
-
var StandardFilter = /*#__PURE__*/function (_React$Component) {
|
|
51
|
-
_inherits(StandardFilter, _React$Component);
|
|
52
|
-
|
|
53
|
-
var _super = _createSuper(StandardFilter);
|
|
54
|
-
|
|
55
|
-
function StandardFilter(props) {
|
|
56
|
-
var _this;
|
|
57
|
-
|
|
58
|
-
_classCallCheck(this, StandardFilter);
|
|
59
|
-
|
|
60
|
-
_this = _super.call(this, props);
|
|
61
|
-
_this.filterFormRef = /*#__PURE__*/React.createRef(); // 更新表单控件值,用于外部获取当前表单实例(force是否强制清空表单)
|
|
62
|
-
|
|
63
|
-
_this.updateFormFields = function (newVal, force) {
|
|
64
|
-
var getFormFields = _this.props.getFormFields;
|
|
65
|
-
var resetValues = {};
|
|
66
|
-
|
|
67
|
-
if (force) {
|
|
68
|
-
// this.filterFormRef.current.resetFields()
|
|
69
|
-
// 先清空 再赋值
|
|
70
|
-
resetValues = _this.filterFormRef.current.getFieldsValue();
|
|
71
|
-
Object.keys(resetValues).forEach(function (item) {
|
|
72
|
-
resetValues[item] = undefined;
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
_this.filterFormRef.current.setFieldsValue(Object.assign(Object.assign({}, resetValues), newVal)); // 直接清空表单的赋值
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
if (getFormFields) getFormFields(_this.filterFormRef.current.getFieldsValue(), _this.filterFormRef);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
_this.handleSearch = function (values) {
|
|
83
|
-
var _this$props = _this.props,
|
|
84
|
-
formItemGroup = _this$props.formItemGroup,
|
|
85
|
-
onFilterSearch = _this$props.onFilterSearch; // if (Object.prototype.hasOwnProperty.call(values, false)) {
|
|
86
|
-
// delete values.false // TODO 自定义结构会莫名的出来一个false字段
|
|
87
|
-
// }
|
|
88
|
-
|
|
89
|
-
var resultValues = UtilValueFormat(values, formItemGroup);
|
|
90
|
-
|
|
91
|
-
if (onFilterSearch) {
|
|
92
|
-
onFilterSearch(Object.assign({}, resultValues));
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
_this.handleReset = function () {
|
|
97
|
-
var onFilterReset = _this.props.onFilterReset; // 使用此方法,表单校验无法清空掉
|
|
98
|
-
// const resetValues = this.filterFormRef.current.getFieldsValue()
|
|
99
|
-
// Object.keys(resetValues).forEach((item) => {
|
|
100
|
-
// resetValues[item] = undefined
|
|
101
|
-
// })
|
|
102
|
-
// this.filterFormRef.current.setFieldsValue({ ...resetValues }) // 直接清空表单的赋值
|
|
103
|
-
|
|
104
|
-
_this.filterFormRef.current.resetFields();
|
|
105
|
-
|
|
106
|
-
_this.setState({
|
|
107
|
-
reFormItemGroup: _this.props.formItemGroup // 重新渲染列表
|
|
108
|
-
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
if (onFilterReset) {
|
|
112
|
-
onFilterReset(_this.filterFormRef.current.getFieldsValue());
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
_this.itemIsHide = function (isHide) {
|
|
117
|
-
var current = _this.filterFormRef.current;
|
|
118
|
-
if (!isHide) return false;
|
|
119
|
-
|
|
120
|
-
if (typeof isHide === 'function') {
|
|
121
|
-
return isHide(current ? current.getFieldsValue() : {}, current);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
return isHide;
|
|
125
|
-
}; // 表单列表组 formItemGroup 类型为数组或者React.Node
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
_this.renderFormItemGroup = function () {
|
|
129
|
-
var reFormItemGroup = _this.state.reFormItemGroup;
|
|
130
|
-
|
|
131
|
-
if (Array.isArray(reFormItemGroup)) {
|
|
132
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, reFormItemGroup.map(function (item, index) {
|
|
133
|
-
var componentStyle = item.componentStyle,
|
|
134
|
-
isHide = item.isHide;
|
|
135
|
-
if (_this.itemIsHide(isHide)) return null;
|
|
136
|
-
return /*#__PURE__*/React.createElement(FormItem, Object.assign({
|
|
137
|
-
key: item.filedName,
|
|
138
|
-
label: item.label,
|
|
139
|
-
name: item.type !== 'custom' && item.filedName,
|
|
140
|
-
rules: item.rules || (item.fieldOptions ? item.fieldOptions.rules : [])
|
|
141
|
-
}, item.protoFormItem), item.type === 'custom' && item.customRender ? item.customRender(_this.filterFormRef, Object.assign({}, item)) : /*#__PURE__*/React.createElement(FieldComponent, Object.assign({}, item, {
|
|
142
|
-
onChange: function onChange(val) {
|
|
143
|
-
var updateValue = val;
|
|
144
|
-
|
|
145
|
-
if (item.type === 'input' || item.type === 'textarea' || item.type === 'radio') {
|
|
146
|
-
updateValue = val.target.value;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
if (Array.isArray(val)) {
|
|
150
|
-
updateValue = _toConsumableArray(val);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
_this.updateFormFields(_defineProperty({}, item.filedName, updateValue));
|
|
154
|
-
|
|
155
|
-
for (var _len = arguments.length, otherParams = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
156
|
-
otherParams[_key - 1] = arguments[_key];
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
if (item.onChange) item.onChange.apply(item, [val, _this.filterFormRef].concat(otherParams));
|
|
160
|
-
},
|
|
161
|
-
style: Object.assign({
|
|
162
|
-
width: item.type === 'checkbox' || item.type === 'radio' ? 'auto' : general.formItemStyle.xsm.width
|
|
163
|
-
}, componentStyle)
|
|
164
|
-
})));
|
|
165
|
-
}));
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return reFormItemGroup;
|
|
169
|
-
};
|
|
170
|
-
|
|
171
|
-
_this.state = {
|
|
172
|
-
// recombinationGroup: [],
|
|
173
|
-
reFormItemGroup: undefined
|
|
174
|
-
};
|
|
175
|
-
return _this;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
_createClass(StandardFilter, [{
|
|
179
|
-
key: "componentDidMount",
|
|
180
|
-
value: function componentDidMount() {
|
|
181
|
-
var initialValues = this.props.initialValues;
|
|
182
|
-
this.updateFormFields(initialValues, true);
|
|
183
|
-
}
|
|
184
|
-
}, {
|
|
185
|
-
key: "componentDidUpdate",
|
|
186
|
-
value: function componentDidUpdate(prevProps) {
|
|
187
|
-
var initialValues = this.props.initialValues;
|
|
188
|
-
|
|
189
|
-
if (prevProps.initialValues !== initialValues) {
|
|
190
|
-
this.updateFormFields(initialValues, true);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}, {
|
|
194
|
-
key: "render",
|
|
195
|
-
value: function render() {
|
|
196
|
-
var _this$props2 = this.props,
|
|
197
|
-
className = _this$props2.className,
|
|
198
|
-
style = _this$props2.style,
|
|
199
|
-
onFilterReset = _this$props2.onFilterReset,
|
|
200
|
-
_this$props2$buttonGr = _this$props2.buttonGroup,
|
|
201
|
-
buttonGroup = _this$props2$buttonGr === void 0 ? [] : _this$props2$buttonGr,
|
|
202
|
-
min = _this$props2.min,
|
|
203
|
-
codes = _this$props2.codes,
|
|
204
|
-
permissionCodes = _this$props2.permissionCodes,
|
|
205
|
-
confirmText = _this$props2.confirmText,
|
|
206
|
-
cancelText = _this$props2.cancelText; // const { recombinationGroup } = this.state;
|
|
207
|
-
|
|
208
|
-
return /*#__PURE__*/React.createElement(_Form, {
|
|
209
|
-
name: "standard-filter-form",
|
|
210
|
-
ref: this.filterFormRef,
|
|
211
|
-
layout: "inline",
|
|
212
|
-
onFinish: this.handleSearch,
|
|
213
|
-
className: className,
|
|
214
|
-
style: style
|
|
215
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
216
|
-
className: "filter-grid"
|
|
217
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
218
|
-
className: "filter-form"
|
|
219
|
-
}, this.state.reFormItemGroup ? /*#__PURE__*/React.createElement(React.Fragment, null, this.renderFormItemGroup(), /*#__PURE__*/React.createElement(FormItem, null, /*#__PURE__*/React.createElement(_Button, {
|
|
220
|
-
type: "primary",
|
|
221
|
-
htmlType: "submit"
|
|
222
|
-
}, " ", confirmText || '查询'), onFilterReset && /*#__PURE__*/React.createElement(_Button, {
|
|
223
|
-
type: "primary",
|
|
224
|
-
style: {
|
|
225
|
-
marginLeft: 8
|
|
226
|
-
},
|
|
227
|
-
onClick: this.handleReset,
|
|
228
|
-
ghost: true
|
|
229
|
-
}, cancelText || '重置'))) : null), buttonGroup && buttonGroup.length > 0 ? /*#__PURE__*/React.createElement("div", {
|
|
230
|
-
className: "filter-btns"
|
|
231
|
-
}, /*#__PURE__*/React.createElement(ButtonGroup, {
|
|
232
|
-
options: buttonGroup,
|
|
233
|
-
min: min,
|
|
234
|
-
codes: codes,
|
|
235
|
-
permissionCodes: permissionCodes
|
|
236
|
-
})) : null));
|
|
237
|
-
}
|
|
238
|
-
}], [{
|
|
239
|
-
key: "getDerivedStateFromProps",
|
|
240
|
-
value: function getDerivedStateFromProps(nextProps) {
|
|
241
|
-
var formItemGroup = nextProps.formItemGroup; // const restOptionList = removeNoPermission(buttonGroup, permissionCodes, codes) || []
|
|
242
|
-
|
|
243
|
-
return {
|
|
244
|
-
// recombinationGroup: restOptionList,
|
|
245
|
-
reFormItemGroup: formItemGroup
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
}]);
|
|
249
|
-
|
|
250
|
-
return StandardFilter;
|
|
251
|
-
}(React.Component);
|
|
252
|
-
|
|
253
|
-
export default StandardFilter;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
@root-entry-name: default;
|
|
2
|
-
@import (reference) '~antd/es/style/themes/index';
|
|
3
|
-
|
|
4
|
-
.filter-grid {
|
|
5
|
-
display: flex;
|
|
6
|
-
width: 100%;
|
|
7
|
-
.filter-form {
|
|
8
|
-
flex: 1;
|
|
9
|
-
font-size: 0;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-wrap: wrap;
|
|
12
|
-
.ant-form-item {
|
|
13
|
-
margin-right: @padding-md; // 16px
|
|
14
|
-
margin-bottom: @padding-md;
|
|
15
|
-
.ant-form-item{
|
|
16
|
-
margin-bottom: 0;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
.ant-form-item-control{
|
|
20
|
-
//width: 140px;
|
|
21
|
-
}
|
|
22
|
-
.ant-form-item-control,
|
|
23
|
-
.ant-form-item-label {
|
|
24
|
-
line-height: 32px;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
.filter-btns {
|
|
28
|
-
//max-width: 340px;
|
|
29
|
-
text-align: right;
|
|
30
|
-
.spec-button-group {
|
|
31
|
-
padding-left: 80px;
|
|
32
|
-
}
|
|
33
|
-
.ant-btn {
|
|
34
|
-
margin-bottom: @padding-md;
|
|
35
|
-
margin-left: @padding-sm;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
.ant-select-single:not(.ant-select-customize-input) .ant-select-selector{
|
|
39
|
-
line-height: @height-base - 2;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
.toolbarBtn {
|
|
45
|
-
min-height: @btn-height-base;
|
|
46
|
-
margin-bottom: @padding-md;
|
|
47
|
-
.ant-btn {
|
|
48
|
-
margin-right: @padding-md;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
.toolbar {
|
|
52
|
-
margin-bottom: @padding-md;
|
|
53
|
-
.toolbar-tForm {
|
|
54
|
-
//min-height: @btn-height-base;
|
|
55
|
-
//display: flex;
|
|
56
|
-
//justify-content: flex-end;
|
|
57
|
-
//align-items: center;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
.searchForm{
|
|
61
|
-
margin-bottom: @padding-md;
|
|
62
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import "antd/es/button/style";
|
|
2
|
-
import _Button from "antd/es/button";
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import IconNode from "../components/IconNode";
|
|
5
|
-
|
|
6
|
-
var ActionList = function ActionList(props) {
|
|
7
|
-
var list = props.list,
|
|
8
|
-
form = props.form,
|
|
9
|
-
_props$align = props.align,
|
|
10
|
-
align = _props$align === void 0 ? 'default' : _props$align,
|
|
11
|
-
other = props.other,
|
|
12
|
-
onStep = props.onStep;
|
|
13
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
14
|
-
className: "standardForm-actions",
|
|
15
|
-
style: {
|
|
16
|
-
textAlign: !align || align === 'default' ? 'inherit' : align
|
|
17
|
-
}
|
|
18
|
-
}, list.map(function (item, index) {
|
|
19
|
-
return /*#__PURE__*/React.createElement(_Button, {
|
|
20
|
-
key: index,
|
|
21
|
-
type: item.type ? item.type : 'primary',
|
|
22
|
-
icon: /*#__PURE__*/React.createElement(IconNode, {
|
|
23
|
-
icon: item.icon
|
|
24
|
-
}),
|
|
25
|
-
ghost: item.ghost,
|
|
26
|
-
disabled: item.disabled,
|
|
27
|
-
loading: item.loading,
|
|
28
|
-
onClick: function onClick(e) {
|
|
29
|
-
if (item.action) {
|
|
30
|
-
// 如果有配置默认执行方法,则优先以组件内部的步骤事件做处理
|
|
31
|
-
onStep && onStep(item.action, function () {
|
|
32
|
-
item.fn && item.fn(item, form, other, e);
|
|
33
|
-
});
|
|
34
|
-
} else if (item.fn) {
|
|
35
|
-
item.fn(item, form, other, e);
|
|
36
|
-
} else if (item.onClick) {
|
|
37
|
-
item.onClick(item, form, other, e);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}, item.name);
|
|
41
|
-
}));
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export default ActionList;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StandardFormProps, ItemGroupProps } from './index';
|
|
3
|
-
import './style/index.less';
|
|
4
|
-
export interface StepItemGroupProps extends ItemGroupProps {
|
|
5
|
-
icon?: any;
|
|
6
|
-
hideStep?: boolean;
|
|
7
|
-
title?: any;
|
|
8
|
-
status?: any;
|
|
9
|
-
subTitle?: any;
|
|
10
|
-
disabled?: any;
|
|
11
|
-
}
|
|
12
|
-
export interface StepFormProp extends StandardFormProps {
|
|
13
|
-
stepsConfig?: any;
|
|
14
|
-
actionHide?: boolean;
|
|
15
|
-
stepClick?: (type?: string, formChild?: any, values?: any) => void;
|
|
16
|
-
formItemGroup?: StepItemGroupProps[];
|
|
17
|
-
}
|
|
18
|
-
declare const StepForm: React.ForwardRefExoticComponent<Pick<StepFormProp, string | number> & React.RefAttributes<unknown>>;
|
|
19
|
-
export default StepForm;
|