@vtx/components 3.1.97 → 3.1.99
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/lib/_util/filterSpecialCharacters.js +44 -55
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +4 -1
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getToken.js +15 -7
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/getUrlParam.js +8 -1
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/isFunction.js +1 -0
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js +1 -0
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/useColSize.js +12 -2
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js +3 -0
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +39 -23
- package/lib/_util/useSet.js.map +1 -1
- package/lib/config.js +2 -1
- package/lib/config.js.map +1 -1
- package/lib/index.js +29 -0
- package/lib/index.js.map +1 -1
- package/lib/style/index.less +2 -2
- package/lib/style/themes/compact.less +1 -1
- package/lib/style/themes/dark.less +9 -9
- package/lib/style/themes/default.less +7 -7
- package/lib/style/themes/index.less +1 -1
- package/lib/style/themes/variable.less +5 -5
- package/lib/vtx-color-picker/index.js +28 -11
- package/lib/vtx-color-picker/index.js.map +1 -1
- package/lib/vtx-color-picker/style/css.js +2 -0
- package/lib/vtx-color-picker/style/css.js.map +1 -1
- package/lib/vtx-color-picker/style/index.js +2 -0
- package/lib/vtx-color-picker/style/index.js.map +1 -1
- package/lib/vtx-combogrid/Combogrid.js +86 -46
- package/lib/vtx-combogrid/Combogrid.js.map +1 -1
- package/lib/vtx-combogrid/index.js +58 -32
- package/lib/vtx-combogrid/index.js.map +1 -1
- package/lib/vtx-combogrid/style/css.js +7 -0
- package/lib/vtx-combogrid/style/css.js.map +1 -1
- package/lib/vtx-combogrid/style/index.js +7 -0
- package/lib/vtx-combogrid/style/index.js.map +1 -1
- package/lib/vtx-datagrid/Alert.js +14 -5
- package/lib/vtx-datagrid/Alert.js.map +1 -1
- package/lib/vtx-datagrid/ColumnSetting.js +76 -37
- package/lib/vtx-datagrid/ColumnSetting.js.map +1 -1
- package/lib/vtx-datagrid/ResizeableTitle.js +15 -3
- package/lib/vtx-datagrid/ResizeableTitle.js.map +1 -1
- package/lib/vtx-datagrid/index.js +186 -115
- package/lib/vtx-datagrid/index.js.map +1 -1
- package/lib/vtx-datagrid/renderColumnButtons.js +38 -7
- package/lib/vtx-datagrid/renderColumnButtons.js.map +1 -1
- package/lib/vtx-datagrid/style/css.js +10 -0
- package/lib/vtx-datagrid/style/css.js.map +1 -1
- package/lib/vtx-datagrid/style/index.js +10 -0
- package/lib/vtx-datagrid/style/index.js.map +1 -1
- package/lib/vtx-date-picker/QdatePicker.js +51 -21
- package/lib/vtx-date-picker/QdatePicker.js.map +1 -1
- package/lib/vtx-date-picker/generatePicker.js +65 -24
- package/lib/vtx-date-picker/generatePicker.js.map +1 -1
- package/lib/vtx-date-picker/index.js +7 -1
- package/lib/vtx-date-picker/index.js.map +1 -1
- package/lib/vtx-date-picker/style/css.js +1 -0
- package/lib/vtx-date-picker/style/css.js.map +1 -1
- package/lib/vtx-date-picker/style/index.js +1 -0
- package/lib/vtx-date-picker/style/index.js.map +1 -1
- package/lib/vtx-date-picker/style/index.less +39 -39
- package/lib/vtx-editor/index.js +28 -9
- package/lib/vtx-editor/index.js.map +1 -1
- package/lib/vtx-editor/style/css.js +1 -0
- package/lib/vtx-editor/style/css.js.map +1 -1
- package/lib/vtx-editor/style/index.js +1 -0
- package/lib/vtx-editor/style/index.js.map +1 -1
- package/lib/vtx-editor/style/index.less +8 -8
- package/lib/vtx-ellipsis-text/index.js +27 -14
- package/lib/vtx-ellipsis-text/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/css.js +1 -0
- package/lib/vtx-ellipsis-text/style/css.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.js +1 -0
- package/lib/vtx-ellipsis-text/style/index.js.map +1 -1
- package/lib/vtx-ellipsis-text/style/index.less +13 -13
- package/lib/vtx-export/index.js +69 -36
- package/lib/vtx-export/index.js.map +1 -1
- package/lib/vtx-export/style/css.js +5 -0
- package/lib/vtx-export/style/css.js.map +1 -1
- package/lib/vtx-export/style/index.js +5 -0
- package/lib/vtx-export/style/index.js.map +1 -1
- package/lib/vtx-export-async/History.js +100 -59
- package/lib/vtx-export-async/History.js.map +1 -1
- package/lib/vtx-export-async/index.js +105 -64
- package/lib/vtx-export-async/index.js.map +1 -1
- package/lib/vtx-export-async/style/css.js.map +1 -1
- package/lib/vtx-export-async/style/index.js.map +1 -1
- package/lib/vtx-export-async/util.js +13 -2
- package/lib/vtx-export-async/util.js.map +1 -1
- package/lib/vtx-form-layout/Card.js +33 -11
- package/lib/vtx-form-layout/Card.js.map +1 -1
- package/lib/vtx-form-layout/Divider.js +11 -5
- package/lib/vtx-form-layout/Divider.js.map +1 -1
- package/lib/vtx-form-layout/FormItem.js +34 -12
- package/lib/vtx-form-layout/FormItem.js.map +1 -1
- package/lib/vtx-form-layout/Pane.js +9 -3
- package/lib/vtx-form-layout/Pane.js.map +1 -1
- package/lib/vtx-form-layout/Row.js +8 -1
- package/lib/vtx-form-layout/Row.js.map +1 -1
- package/lib/vtx-form-layout/context.js +4 -1
- package/lib/vtx-form-layout/context.js.map +1 -1
- package/lib/vtx-form-layout/demo/Modal.less +43 -43
- package/lib/vtx-form-layout/index.js +24 -9
- package/lib/vtx-form-layout/index.js.map +1 -1
- package/lib/vtx-form-layout/style/css.js +7 -0
- package/lib/vtx-form-layout/style/css.js.map +1 -1
- package/lib/vtx-form-layout/style/index.js +7 -0
- package/lib/vtx-form-layout/style/index.js.map +1 -1
- package/lib/vtx-form-layout/style/index.less +216 -216
- package/lib/vtx-image/Image.js +113 -73
- package/lib/vtx-image/Image.js.map +1 -1
- package/lib/vtx-image/Preview.js +59 -30
- package/lib/vtx-image/Preview.js.map +1 -1
- package/lib/vtx-image/PreviewGroup.js +47 -17
- package/lib/vtx-image/PreviewGroup.js.map +1 -1
- package/lib/vtx-image/index.js +11 -4
- package/lib/vtx-image/index.js.map +1 -1
- package/lib/vtx-image/style/css.js +1 -0
- package/lib/vtx-image/style/css.js.map +1 -1
- package/lib/vtx-image/style/index.js +1 -0
- package/lib/vtx-image/style/index.js.map +1 -1
- package/lib/vtx-import/index.js +78 -45
- package/lib/vtx-import/index.js.map +1 -1
- package/lib/vtx-import/result.js +28 -10
- package/lib/vtx-import/result.js.map +1 -1
- package/lib/vtx-import/style/css.js +3 -0
- package/lib/vtx-import/style/css.js.map +1 -1
- package/lib/vtx-import/style/index.js +3 -0
- package/lib/vtx-import/style/index.js.map +1 -1
- package/lib/vtx-import/style/index.less +8 -8
- package/lib/vtx-import2/CheckResult.js +8 -1
- package/lib/vtx-import2/CheckResult.js.map +1 -1
- package/lib/vtx-import2/Content.js +33 -11
- package/lib/vtx-import2/Content.js.map +1 -1
- package/lib/vtx-import2/DownloadSvg.js +6 -1
- package/lib/vtx-import2/DownloadSvg.js.map +1 -1
- package/lib/vtx-import2/ImportResult.js +14 -7
- package/lib/vtx-import2/ImportResult.js.map +1 -1
- package/lib/vtx-import2/UploadSvg.js +6 -1
- package/lib/vtx-import2/UploadSvg.js.map +1 -1
- package/lib/vtx-import2/index.js +107 -51
- package/lib/vtx-import2/index.js.map +1 -1
- package/lib/vtx-import2/style/css.js +3 -0
- package/lib/vtx-import2/style/css.js.map +1 -1
- package/lib/vtx-import2/style/index.js +3 -0
- package/lib/vtx-import2/style/index.js.map +1 -1
- package/lib/vtx-import2/style/index.less +102 -102
- package/lib/vtx-input/TextArea.js +27 -10
- package/lib/vtx-input/TextArea.js.map +1 -1
- package/lib/vtx-input/index.js +45 -20
- package/lib/vtx-input/index.js.map +1 -1
- package/lib/vtx-input/style/css.js +1 -0
- package/lib/vtx-input/style/css.js.map +1 -1
- package/lib/vtx-input/style/index.js +1 -0
- package/lib/vtx-input/style/index.js.map +1 -1
- package/lib/vtx-input/style/index.less +24 -24
- package/lib/vtx-input/useLength.js +20 -7
- package/lib/vtx-input/useLength.js.map +1 -1
- package/lib/vtx-modal/Title.js +8 -2
- package/lib/vtx-modal/Title.js.map +1 -1
- package/lib/vtx-modal/index.js +82 -49
- package/lib/vtx-modal/index.js.map +1 -1
- package/lib/vtx-modal/style/css.js +1 -0
- package/lib/vtx-modal/style/css.js.map +1 -1
- package/lib/vtx-modal/style/index.js +1 -0
- package/lib/vtx-modal/style/index.js.map +1 -1
- package/lib/vtx-page-layout/Basic.js +8 -3
- package/lib/vtx-page-layout/Basic.js.map +1 -1
- package/lib/vtx-page-layout/Content.js +26 -15
- package/lib/vtx-page-layout/Content.js.map +1 -1
- package/lib/vtx-page-layout/Pane.js +12 -3
- package/lib/vtx-page-layout/Pane.js.map +1 -1
- package/lib/vtx-page-layout/TableLayout.js +60 -30
- package/lib/vtx-page-layout/TableLayout.js.map +1 -1
- package/lib/vtx-page-layout/TableWrap.js +22 -11
- package/lib/vtx-page-layout/TableWrap.js.map +1 -1
- package/lib/vtx-page-layout/container.js +51 -23
- package/lib/vtx-page-layout/container.js.map +1 -1
- package/lib/vtx-page-layout/index.js +10 -1
- package/lib/vtx-page-layout/index.js.map +1 -1
- package/lib/vtx-page-layout/style/css.js.map +1 -1
- package/lib/vtx-page-layout/style/index.js.map +1 -1
- package/lib/vtx-page-layout/style/index.less +138 -138
- package/lib/vtx-rps-frame/index.js +57 -37
- package/lib/vtx-rps-frame/index.js.map +1 -1
- package/lib/vtx-rps-frame/style/css.js.map +1 -1
- package/lib/vtx-rps-frame/style/index.js.map +1 -1
- package/lib/vtx-scrollable-row/index.js +64 -30
- package/lib/vtx-scrollable-row/index.js.map +1 -1
- package/lib/vtx-scrollable-row/style/css.js.map +1 -1
- package/lib/vtx-scrollable-row/style/index.js.map +1 -1
- package/lib/vtx-scrollable-row/style/index.less +113 -113
- package/lib/vtx-search/VtxCol.js +26 -7
- package/lib/vtx-search/VtxCol.js.map +1 -1
- package/lib/vtx-search/VtxRow.js +14 -7
- package/lib/vtx-search/VtxRow.js.map +1 -1
- package/lib/vtx-search/index.js +106 -61
- package/lib/vtx-search/index.js.map +1 -1
- package/lib/vtx-search/style/css.js +4 -0
- package/lib/vtx-search/style/css.js.map +1 -1
- package/lib/vtx-search/style/index.js +4 -0
- package/lib/vtx-search/style/index.js.map +1 -1
- package/lib/vtx-search-map-input/index.js +93 -58
- package/lib/vtx-search-map-input/index.js.map +1 -1
- package/lib/vtx-search-map-input/style/css.js +2 -0
- package/lib/vtx-search-map-input/style/css.js.map +1 -1
- package/lib/vtx-search-map-input/style/index.js +2 -0
- package/lib/vtx-search-map-input/style/index.js.map +1 -1
- package/lib/vtx-select/index.js +91 -39
- package/lib/vtx-select/index.js.map +1 -1
- package/lib/vtx-select/style/css.js +8 -0
- package/lib/vtx-select/style/css.js.map +1 -1
- package/lib/vtx-select/style/index.js +8 -0
- package/lib/vtx-select/style/index.js.map +1 -1
- package/lib/vtx-select/style/index.less +68 -68
- package/lib/vtx-signature/index.js +33 -18
- package/lib/vtx-signature/index.js.map +1 -1
- package/lib/vtx-signature/style/css.js +2 -0
- package/lib/vtx-signature/style/css.js.map +1 -1
- package/lib/vtx-signature/style/index.js +2 -0
- package/lib/vtx-signature/style/index.js.map +1 -1
- package/lib/vtx-signature/style/index.less +33 -33
- package/lib/vtx-split-pane/Pane.js +22 -11
- package/lib/vtx-split-pane/Pane.js.map +1 -1
- package/lib/vtx-split-pane/Resizer.js +39 -19
- package/lib/vtx-split-pane/Resizer.js.map +1 -1
- package/lib/vtx-split-pane/SplitPane.js +107 -51
- package/lib/vtx-split-pane/SplitPane.js.map +1 -1
- package/lib/vtx-split-pane/index.js +6 -1
- package/lib/vtx-split-pane/index.js.map +1 -1
- package/lib/vtx-split-pane/style/css.js +3 -0
- package/lib/vtx-split-pane/style/css.js.map +1 -1
- package/lib/vtx-split-pane/style/index.js +3 -0
- package/lib/vtx-split-pane/style/index.js.map +1 -1
- package/lib/vtx-split-pane/style/index.less +76 -76
- package/lib/vtx-statistics-column/Back.js +9 -2
- package/lib/vtx-statistics-column/Back.js.map +1 -1
- package/lib/vtx-statistics-column/Item.js +30 -14
- package/lib/vtx-statistics-column/Item.js.map +1 -1
- package/lib/vtx-statistics-column/Total.js +30 -14
- package/lib/vtx-statistics-column/Total.js.map +1 -1
- package/lib/vtx-statistics-column/context.js +4 -1
- package/lib/vtx-statistics-column/context.js.map +1 -1
- package/lib/vtx-statistics-column/index.js +18 -1
- package/lib/vtx-statistics-column/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/css.js +1 -0
- package/lib/vtx-statistics-column/style/css.js.map +1 -1
- package/lib/vtx-statistics-column/style/index.js +1 -0
- package/lib/vtx-statistics-column/style/index.js.map +1 -1
- package/lib/vtx-statistics-column/style/index.less +59 -59
- package/lib/vtx-time-picker/index.js +18 -4
- package/lib/vtx-time-picker/index.js.map +1 -1
- package/lib/vtx-time-picker/style/css.js.map +1 -1
- package/lib/vtx-time-picker/style/index.js.map +1 -1
- package/lib/vtx-tree/index.js +114 -49
- package/lib/vtx-tree/index.js.map +1 -1
- package/lib/vtx-tree/style/css.js +2 -0
- package/lib/vtx-tree/style/css.js.map +1 -1
- package/lib/vtx-tree/style/index.js +2 -0
- package/lib/vtx-tree/style/index.js.map +1 -1
- package/lib/vtx-tree/utils.js +27 -6
- package/lib/vtx-tree/utils.js.map +1 -1
- package/lib/vtx-tree-select/index.js +71 -27
- package/lib/vtx-tree-select/index.js.map +1 -1
- package/lib/vtx-tree-select/style/css.js +3 -0
- package/lib/vtx-tree-select/style/css.js.map +1 -1
- package/lib/vtx-tree-select/style/index.js +3 -0
- package/lib/vtx-tree-select/style/index.js.map +1 -1
- package/lib/vtx-upload/FilePreview.js +33 -15
- package/lib/vtx-upload/FilePreview.js.map +1 -1
- package/lib/vtx-upload/index.js +156 -79
- package/lib/vtx-upload/index.js.map +1 -1
- package/lib/vtx-upload/style/css.js +6 -0
- package/lib/vtx-upload/style/css.js.map +1 -1
- package/lib/vtx-upload/style/index.js +6 -0
- package/lib/vtx-upload/style/index.js.map +1 -1
- package/lib/vtx-upload/style/index.less +61 -61
- package/lib/vtx-wang-editor/index.js +116 -74
- package/lib/vtx-wang-editor/index.js.map +1 -1
- package/lib/vtx-wang-editor/style/css.js +1 -0
- package/lib/vtx-wang-editor/style/css.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.js +1 -0
- package/lib/vtx-wang-editor/style/index.js.map +1 -1
- package/lib/vtx-wang-editor/style/index.less +12 -12
- package/lib/vtx-wang-editor/wangEditorUtil.js +136 -75
- package/lib/vtx-wang-editor/wangEditorUtil.js.map +1 -1
- package/lib/vtx-ztree/index.js +119 -69
- package/lib/vtx-ztree/index.js.map +1 -1
- package/lib/vtx-ztree/style/css.js +1 -0
- package/lib/vtx-ztree/style/css.js.map +1 -1
- package/lib/vtx-ztree/style/index.js +1 -0
- package/lib/vtx-ztree/style/index.js.map +1 -1
- package/lib/vtx-ztree/style/index.less +45 -45
- package/lib/vtx-ztree-select/index.js +143 -74
- package/lib/vtx-ztree-select/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/css.js +3 -0
- package/lib/vtx-ztree-select/style/css.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.js +3 -0
- package/lib/vtx-ztree-select/style/index.js.map +1 -1
- package/lib/vtx-ztree-select/style/index.less +109 -109
- package/package.json +121 -121
|
@@ -4,20 +4,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
|
+
|
|
7
8
|
var _container = _interopRequireDefault(require("./container"));
|
|
9
|
+
|
|
8
10
|
var _Basic = _interopRequireDefault(require("./Basic"));
|
|
11
|
+
|
|
9
12
|
var _Content = _interopRequireDefault(require("./Content"));
|
|
13
|
+
|
|
10
14
|
var _TableWrap = _interopRequireDefault(require("./TableWrap"));
|
|
15
|
+
|
|
11
16
|
var _TableLayout = _interopRequireDefault(require("./TableLayout"));
|
|
17
|
+
|
|
12
18
|
var _Pane = _interopRequireDefault(require("./Pane"));
|
|
19
|
+
|
|
13
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
14
22
|
var Page = (0, _container["default"])({
|
|
15
23
|
componentClass: 'vtx-page'
|
|
16
24
|
})(_Basic["default"]);
|
|
17
25
|
var ButtonWrap = (0, _container["default"])({
|
|
18
26
|
componentClass: 'vtx-button-wrap'
|
|
19
27
|
})(_Basic["default"]);
|
|
20
|
-
var _default =
|
|
28
|
+
var _default = {
|
|
21
29
|
TableLayout: _TableLayout["default"],
|
|
22
30
|
Page: Page,
|
|
23
31
|
ButtonWrap: ButtonWrap,
|
|
@@ -25,4 +33,5 @@ var _default = exports["default"] = {
|
|
|
25
33
|
Content: (0, _container["default"])()(_Content["default"]),
|
|
26
34
|
TableWrap: (0, _container["default"])()(_TableWrap["default"])
|
|
27
35
|
};
|
|
36
|
+
exports["default"] = _default;
|
|
28
37
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["
|
|
1
|
+
{"version":3,"file":"index.js","names":["Page","container","componentClass","Basic","ButtonWrap","TableLayout","Pane","Content","TableWrap"],"sources":["vtx-page-layout/index.jsx"],"sourcesContent":["import container from './container';\nimport Basic from './Basic';\nimport Content from './Content';\nimport TableWrap from './TableWrap';\nimport TableLayout from './TableLayout';\nimport Pane from './Pane';\n\nconst Page = container({ componentClass: 'vtx-page' })(Basic);\nconst ButtonWrap = container({ componentClass: 'vtx-button-wrap' })(Basic);\n\nexport default {\n TableLayout,\n Page,\n ButtonWrap,\n Pane,\n Content: container()(Content),\n TableWrap: container()(TableWrap),\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,IAAMA,IAAI,GAAG,IAAAC,qBAAA,EAAU;EAAEC,cAAc,EAAE;AAAlB,CAAV,EAA0CC,iBAA1C,CAAb;AACA,IAAMC,UAAU,GAAG,IAAAH,qBAAA,EAAU;EAAEC,cAAc,EAAE;AAAlB,CAAV,EAAiDC,iBAAjD,CAAnB;eAEe;EACXE,WAAW,EAAXA,uBADW;EAEXL,IAAI,EAAJA,IAFW;EAGXI,UAAU,EAAVA,UAHW;EAIXE,IAAI,EAAJA,gBAJW;EAKXC,OAAO,EAAE,IAAAN,qBAAA,IAAYM,mBAAZ,CALE;EAMXC,SAAS,EAAE,IAAAP,qBAAA,IAAYO,qBAAZ;AANA,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-page-layout/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["vtx-page-layout/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAA"}
|
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
-
|
|
3
|
-
@prefix-cls: vtx-page;
|
|
4
|
-
@spacing-base: 10px;
|
|
5
|
-
@padding-default-base: @spacing-base;
|
|
6
|
-
|
|
7
|
-
.size(@width; @height) {
|
|
8
|
-
width: @width;
|
|
9
|
-
height: @height;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.relative(@height: 100%, @width: 100%) {
|
|
13
|
-
position: relative;
|
|
14
|
-
.size(@width, @height);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.absolute(@top: 0, @right: 0, @left: 0, @bottom: 0) {
|
|
18
|
-
position: absolute;
|
|
19
|
-
top: @top;
|
|
20
|
-
right: @right;
|
|
21
|
-
bottom: @bottom;
|
|
22
|
-
left: @left;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.overflow-y {
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
overflow-y: auto;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.vtx-page {
|
|
31
|
-
position: relative;
|
|
32
|
-
width: 100%;
|
|
33
|
-
height: 100%;
|
|
34
|
-
overflow-x: hidden;
|
|
35
|
-
font-size: 14px;
|
|
36
|
-
.ant-table-footer {
|
|
37
|
-
padding: 0 !important;
|
|
38
|
-
}
|
|
39
|
-
.vtx-ui-date-normal {
|
|
40
|
-
width: 100%;
|
|
41
|
-
}
|
|
42
|
-
.vtx-ui-grid-normal {
|
|
43
|
-
z-index: 999;
|
|
44
|
-
}
|
|
45
|
-
.ant-tabs {
|
|
46
|
-
height: 100%;
|
|
47
|
-
}
|
|
48
|
-
.ant-tabs-content {
|
|
49
|
-
height: e('calc(100% - 56px)');
|
|
50
|
-
}
|
|
51
|
-
.ant-tabs-tabpane {
|
|
52
|
-
height: 100%;
|
|
53
|
-
}
|
|
54
|
-
.td {
|
|
55
|
-
position: relative;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.vtx-button-wrap {
|
|
60
|
-
button + button {
|
|
61
|
-
margin-left: 8px;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.vtx-content {
|
|
66
|
-
&-absolute {
|
|
67
|
-
.absolute();
|
|
68
|
-
}
|
|
69
|
-
&-relative {
|
|
70
|
-
.relative();
|
|
71
|
-
}
|
|
72
|
-
&-scroll-y {
|
|
73
|
-
.overflow-y();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.vtx-table-wrapper {
|
|
78
|
-
&-absolute {
|
|
79
|
-
.absolute();
|
|
80
|
-
padding: 0 @padding-default-base / 2;
|
|
81
|
-
}
|
|
82
|
-
&-relative {
|
|
83
|
-
.relative();
|
|
84
|
-
max-height: 500px;
|
|
85
|
-
padding: 0 @padding-default-base / 2;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
@table-page-padding-left: 20px;
|
|
90
|
-
@table-page-padding-right: 20px;
|
|
91
|
-
@table-page-padding-bottom: 16px;
|
|
92
|
-
@table-page-padding-top: 16px;
|
|
93
|
-
|
|
94
|
-
.vtx-page--table {
|
|
95
|
-
position: relative;
|
|
96
|
-
width: 100%;
|
|
97
|
-
height: 100%;
|
|
98
|
-
padding: @table-page-padding-top @table-page-padding-right @table-page-padding-bottom
|
|
99
|
-
@table-page-padding-left;
|
|
100
|
-
overflow-x: hidden;
|
|
101
|
-
font-size: 14px;
|
|
102
|
-
background-color: @layout-body-background;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.vtx-table {
|
|
106
|
-
&-search {
|
|
107
|
-
margin-bottom: 16px;
|
|
108
|
-
background: @component-background;
|
|
109
|
-
border-radius: @border-radius-base;
|
|
110
|
-
}
|
|
111
|
-
&-content {
|
|
112
|
-
.absolute();
|
|
113
|
-
right: @table-page-padding-right;
|
|
114
|
-
bottom: @table-page-padding-bottom;
|
|
115
|
-
left: @table-page-padding-left;
|
|
116
|
-
transition-duration: 0.3s;
|
|
117
|
-
transition-property: top;
|
|
118
|
-
}
|
|
119
|
-
&-wrap {
|
|
120
|
-
.absolute();
|
|
121
|
-
padding: 0 24px;
|
|
122
|
-
background-color: @component-background;
|
|
123
|
-
}
|
|
124
|
-
&-card {
|
|
125
|
-
background: @component-background;
|
|
126
|
-
border-radius: @border-radius-base;
|
|
127
|
-
}
|
|
128
|
-
&-left,
|
|
129
|
-
&-right {
|
|
130
|
-
height: 100%;
|
|
131
|
-
overflow: hidden;
|
|
132
|
-
}
|
|
133
|
-
&-left {
|
|
134
|
-
.vtx-ztree-search {
|
|
135
|
-
right: 0;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
1
|
+
@import (reference) '~antd/lib/style/themes/index.less';
|
|
2
|
+
|
|
3
|
+
@prefix-cls: vtx-page;
|
|
4
|
+
@spacing-base: 10px;
|
|
5
|
+
@padding-default-base: @spacing-base;
|
|
6
|
+
|
|
7
|
+
.size(@width; @height) {
|
|
8
|
+
width: @width;
|
|
9
|
+
height: @height;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.relative(@height: 100%, @width: 100%) {
|
|
13
|
+
position: relative;
|
|
14
|
+
.size(@width, @height);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.absolute(@top: 0, @right: 0, @left: 0, @bottom: 0) {
|
|
18
|
+
position: absolute;
|
|
19
|
+
top: @top;
|
|
20
|
+
right: @right;
|
|
21
|
+
bottom: @bottom;
|
|
22
|
+
left: @left;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.overflow-y {
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
overflow-y: auto;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.vtx-page {
|
|
31
|
+
position: relative;
|
|
32
|
+
width: 100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
overflow-x: hidden;
|
|
35
|
+
font-size: 14px;
|
|
36
|
+
.ant-table-footer {
|
|
37
|
+
padding: 0 !important;
|
|
38
|
+
}
|
|
39
|
+
.vtx-ui-date-normal {
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
.vtx-ui-grid-normal {
|
|
43
|
+
z-index: 999;
|
|
44
|
+
}
|
|
45
|
+
.ant-tabs {
|
|
46
|
+
height: 100%;
|
|
47
|
+
}
|
|
48
|
+
.ant-tabs-content {
|
|
49
|
+
height: e('calc(100% - 56px)');
|
|
50
|
+
}
|
|
51
|
+
.ant-tabs-tabpane {
|
|
52
|
+
height: 100%;
|
|
53
|
+
}
|
|
54
|
+
.td {
|
|
55
|
+
position: relative;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.vtx-button-wrap {
|
|
60
|
+
button + button {
|
|
61
|
+
margin-left: 8px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.vtx-content {
|
|
66
|
+
&-absolute {
|
|
67
|
+
.absolute();
|
|
68
|
+
}
|
|
69
|
+
&-relative {
|
|
70
|
+
.relative();
|
|
71
|
+
}
|
|
72
|
+
&-scroll-y {
|
|
73
|
+
.overflow-y();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.vtx-table-wrapper {
|
|
78
|
+
&-absolute {
|
|
79
|
+
.absolute();
|
|
80
|
+
padding: 0 @padding-default-base / 2;
|
|
81
|
+
}
|
|
82
|
+
&-relative {
|
|
83
|
+
.relative();
|
|
84
|
+
max-height: 500px;
|
|
85
|
+
padding: 0 @padding-default-base / 2;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@table-page-padding-left: 20px;
|
|
90
|
+
@table-page-padding-right: 20px;
|
|
91
|
+
@table-page-padding-bottom: 16px;
|
|
92
|
+
@table-page-padding-top: 16px;
|
|
93
|
+
|
|
94
|
+
.vtx-page--table {
|
|
95
|
+
position: relative;
|
|
96
|
+
width: 100%;
|
|
97
|
+
height: 100%;
|
|
98
|
+
padding: @table-page-padding-top @table-page-padding-right @table-page-padding-bottom
|
|
99
|
+
@table-page-padding-left;
|
|
100
|
+
overflow-x: hidden;
|
|
101
|
+
font-size: 14px;
|
|
102
|
+
background-color: @layout-body-background;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.vtx-table {
|
|
106
|
+
&-search {
|
|
107
|
+
margin-bottom: 16px;
|
|
108
|
+
background: @component-background;
|
|
109
|
+
border-radius: @border-radius-base;
|
|
110
|
+
}
|
|
111
|
+
&-content {
|
|
112
|
+
.absolute();
|
|
113
|
+
right: @table-page-padding-right;
|
|
114
|
+
bottom: @table-page-padding-bottom;
|
|
115
|
+
left: @table-page-padding-left;
|
|
116
|
+
transition-duration: 0.3s;
|
|
117
|
+
transition-property: top;
|
|
118
|
+
}
|
|
119
|
+
&-wrap {
|
|
120
|
+
.absolute();
|
|
121
|
+
padding: 0 24px;
|
|
122
|
+
background-color: @component-background;
|
|
123
|
+
}
|
|
124
|
+
&-card {
|
|
125
|
+
background: @component-background;
|
|
126
|
+
border-radius: @border-radius-base;
|
|
127
|
+
}
|
|
128
|
+
&-left,
|
|
129
|
+
&-right {
|
|
130
|
+
height: 100%;
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
}
|
|
133
|
+
&-left {
|
|
134
|
+
.vtx-ztree-search {
|
|
135
|
+
right: 0;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
@@ -1,93 +1,103 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
9
|
+
|
|
7
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
8
12
|
var _axios = _interopRequireDefault(require("axios"));
|
|
13
|
+
|
|
9
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
+
|
|
10
16
|
var _getUrlParam = _interopRequireDefault(require("@vtx/utils/lib/getUrlParam"));
|
|
17
|
+
|
|
11
18
|
var _getToken = _interopRequireDefault(require("../_util/getToken"));
|
|
19
|
+
|
|
12
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
function
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* @LastEditTime: 2022-01-12 18:49:30
|
|
25
|
-
* @Description: 报表容器
|
|
26
|
-
* @FilePath: \react-components\components\vtx-rps-frame\index.jsx
|
|
27
|
-
*/
|
|
21
|
+
|
|
22
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
23
|
+
|
|
24
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
|
+
|
|
26
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
27
|
+
|
|
28
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
29
|
+
|
|
30
|
+
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; }
|
|
31
|
+
|
|
28
32
|
var initReportParamUrl = '/cloud/management/rest/np/param/getByParamTypeCode';
|
|
29
33
|
var initReportInfoUrl = '/cloud/rps/api/np/v101/report/getReportInfoByCode.smvc';
|
|
30
34
|
var initReportServerUrl = '/ReportServer';
|
|
35
|
+
|
|
31
36
|
function VtxRpsFrame(props) {
|
|
32
|
-
var iframeName = (0, _react.useRef)(Math.random() + new Date().getTime());
|
|
37
|
+
var iframeName = (0, _react.useRef)(Math.random() + new Date().getTime()); // flag改变,重新渲染报表
|
|
33
38
|
|
|
34
|
-
// flag改变,重新渲染报表
|
|
35
39
|
(0, _react.useEffect)(function () {
|
|
36
40
|
getReportInfoByCode();
|
|
37
41
|
}, [props.flag]);
|
|
42
|
+
|
|
38
43
|
var getReportInfoByCode = function getReportInfoByCode() {
|
|
39
44
|
var report_param = props.report_param,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
var paramCode = paramTypeCode || 'param_report_constant';
|
|
52
|
-
|
|
45
|
+
data_param = props.data_param,
|
|
46
|
+
paramTypeCode = props.paramTypeCode,
|
|
47
|
+
tenantId = props.tenantId,
|
|
48
|
+
_props$isParamEncode = props.isParamEncode,
|
|
49
|
+
isParamEncode = _props$isParamEncode === void 0 ? false : _props$isParamEncode,
|
|
50
|
+
_props$reportParamUrl = props.reportParamUrl,
|
|
51
|
+
reportParamUrl = _props$reportParamUrl === void 0 ? initReportParamUrl : _props$reportParamUrl,
|
|
52
|
+
_props$reportInfoUrl = props.reportInfoUrl,
|
|
53
|
+
reportInfoUrl = _props$reportInfoUrl === void 0 ? initReportInfoUrl : _props$reportInfoUrl,
|
|
54
|
+
_props$reportServerUr = props.reportServerUrl,
|
|
55
|
+
reportServerUrl = _props$reportServerUr === void 0 ? initReportServerUrl : _props$reportServerUr;
|
|
56
|
+
var paramCode = paramTypeCode || 'param_report_constant'; // report_code 可配置,如果地址栏有report_code,则优先,否则根据props的report_code
|
|
57
|
+
|
|
53
58
|
var report_code = (0, _getUrlParam["default"])().report_code ? (0, _getUrlParam["default"])().report_code : props.report_code;
|
|
54
|
-
var access_token = (0, _getToken["default"])();
|
|
59
|
+
var access_token = (0, _getToken["default"])(); // 获取公共参数
|
|
55
60
|
|
|
56
|
-
// 获取公共参数
|
|
57
61
|
function commonParam() {
|
|
58
62
|
var header = {
|
|
59
63
|
'content-type': 'application/x-www-form-urlencoded'
|
|
60
64
|
};
|
|
65
|
+
|
|
61
66
|
if (access_token) {
|
|
62
67
|
header['Authorization'] = "Bearer ".concat(access_token);
|
|
63
68
|
}
|
|
69
|
+
|
|
64
70
|
return (0, _axios["default"])({
|
|
65
71
|
method: 'get',
|
|
66
72
|
url: "".concat(reportParamUrl, "?parameters={\"paramTypeCode\": \"").concat(paramCode, "\",\"tenantId\":\"").concat(tenantId, "\"}"),
|
|
67
73
|
headers: header
|
|
68
74
|
});
|
|
69
|
-
}
|
|
75
|
+
} // 获取报表code
|
|
76
|
+
|
|
70
77
|
|
|
71
|
-
// 获取报表code
|
|
72
78
|
var param = {
|
|
73
79
|
report_code: report_code,
|
|
74
80
|
timestamp: new Date().valueOf(),
|
|
75
81
|
reqMethod: 0
|
|
76
82
|
};
|
|
77
83
|
var formData = isParamEncode ? encodeURI(JSON.stringify(param)) : JSON.stringify(param);
|
|
84
|
+
|
|
78
85
|
function getReportInfoByCode() {
|
|
79
86
|
var header = {
|
|
80
87
|
'content-type': 'application/x-www-form-urlencoded'
|
|
81
88
|
};
|
|
89
|
+
|
|
82
90
|
if (access_token) {
|
|
83
91
|
header['Authorization'] = "Bearer ".concat(access_token);
|
|
84
92
|
}
|
|
93
|
+
|
|
85
94
|
return (0, _axios["default"])({
|
|
86
95
|
method: 'get',
|
|
87
96
|
url: "".concat(reportInfoUrl, "?parameters=").concat(formData),
|
|
88
97
|
headers: header
|
|
89
98
|
});
|
|
90
99
|
}
|
|
100
|
+
|
|
91
101
|
_axios["default"].all([commonParam(), getReportInfoByCode()]).then(_axios["default"].spread(function (commonParamResult, reportInfoByCodeResult) {
|
|
92
102
|
if (!commonParamResult.data.result && !reportInfoByCodeResult.data.result) {
|
|
93
103
|
// 报表公共参数
|
|
@@ -97,20 +107,22 @@ function VtxRpsFrame(props) {
|
|
|
97
107
|
obj[d.parmCode] = d.parmName;
|
|
98
108
|
});
|
|
99
109
|
var reportInfoByCodeData = reportInfoByCodeResult.data.data;
|
|
110
|
+
|
|
100
111
|
var _param = _objectSpread(_objectSpread(_objectSpread({
|
|
101
112
|
data_url: reportInfoByCodeData.data_url,
|
|
102
113
|
data_param: JSON.stringify(data_param)
|
|
103
114
|
}, report_param), obj), {}, {
|
|
104
115
|
reqMethod: 0
|
|
105
116
|
});
|
|
117
|
+
|
|
106
118
|
createForm("".concat(window.rpsPrefix || '').concat(reportServerUrl, "?report_code=").concat(report_code, "&reportlet=").concat(reportInfoByCodeData.reportlet, "&fr_locale=zh_CN×tamp=").concat(new Date().valueOf(), "&token=").concat(access_token, "&access_token=").concat(access_token), _param, "".concat(iframeName.current));
|
|
107
119
|
}
|
|
108
|
-
}))
|
|
109
|
-
// eslint-disable-next-line no-console
|
|
120
|
+
})) // eslint-disable-next-line no-console
|
|
110
121
|
["catch"](function (err) {
|
|
111
122
|
return console.log(err);
|
|
112
123
|
});
|
|
113
124
|
};
|
|
125
|
+
|
|
114
126
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
115
127
|
className: "vtx-rps-frame"
|
|
116
128
|
}, /*#__PURE__*/_react["default"].createElement("iframe", {
|
|
@@ -120,6 +132,7 @@ function VtxRpsFrame(props) {
|
|
|
120
132
|
name: "".concat(iframeName.current)
|
|
121
133
|
}));
|
|
122
134
|
}
|
|
135
|
+
|
|
123
136
|
VtxRpsFrame.propTypes = {
|
|
124
137
|
flag: _propTypes["default"].number,
|
|
125
138
|
report_code: _propTypes["default"].string,
|
|
@@ -132,7 +145,9 @@ VtxRpsFrame.propTypes = {
|
|
|
132
145
|
reportServerUrl: _propTypes["default"].string,
|
|
133
146
|
isParamEncode: _propTypes["default"].bool
|
|
134
147
|
};
|
|
135
|
-
var _default =
|
|
148
|
+
var _default = VtxRpsFrame;
|
|
149
|
+
exports["default"] = _default;
|
|
150
|
+
|
|
136
151
|
var createForm = function createForm(reqURL, param, iframeName) {
|
|
137
152
|
// 定义一个form表单
|
|
138
153
|
var formDom = document.createElement('form');
|
|
@@ -141,6 +156,7 @@ var createForm = function createForm(reqURL, param, iframeName) {
|
|
|
141
156
|
formDom.action = reqURL;
|
|
142
157
|
formDom.style = 'display:none';
|
|
143
158
|
var inputArray = [];
|
|
159
|
+
|
|
144
160
|
for (var k in param) {
|
|
145
161
|
if (Object.prototype.hasOwnProperty.call(param, k)) {
|
|
146
162
|
var input1 = document.createElement('input');
|
|
@@ -150,11 +166,15 @@ var createForm = function createForm(reqURL, param, iframeName) {
|
|
|
150
166
|
inputArray.push(input1);
|
|
151
167
|
}
|
|
152
168
|
}
|
|
169
|
+
|
|
153
170
|
document.body.appendChild(formDom); // 将表单放置在web中
|
|
171
|
+
|
|
154
172
|
for (var i = 0, len = inputArray.length; i < len; i++) {
|
|
155
173
|
formDom.append(inputArray[i]);
|
|
156
174
|
}
|
|
175
|
+
|
|
157
176
|
formDom.submit(); // 表单提交
|
|
177
|
+
|
|
158
178
|
formDom.remove();
|
|
159
179
|
};
|
|
160
180
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_axios","_interopRequireDefault","_propTypes","_getUrlParam","_getToken","obj","__esModule","_getRequireWildcardCache","e","WeakMap","r","t","_typeof","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","o","Symbol","iterator","constructor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","key","value","_toPropertyKey","configurable","writable","_toPrimitive","String","toPrimitive","TypeError","Number","initReportParamUrl","initReportInfoUrl","initReportServerUrl","VtxRpsFrame","props","iframeName","useRef","Math","random","Date","getTime","useEffect","getReportInfoByCode","flag","report_param","data_param","paramTypeCode","tenantId","_props$isParamEncode","isParamEncode","_props$reportParamUrl","reportParamUrl","_props$reportInfoUrl","reportInfoUrl","_props$reportServerUr","reportServerUrl","paramCode","report_code","getUrlParam","access_token","getToken","commonParam","header","concat","axios","method","url","headers","param","timestamp","valueOf","reqMethod","formData","encodeURI","JSON","stringify","all","then","spread","commonParamResult","reportInfoByCodeResult","data","result","commonParamData","d","parmCode","parmName","reportInfoByCodeData","data_url","createForm","window","rpsPrefix","reportlet","current","err","console","log","createElement","className","width","height","name","propTypes","PropTypes","number","string","object","oneOfType","array","bool","_default","exports","reqURL","formDom","document","target","action","style","inputArray","k","input1","type","body","appendChild","len","append","submit","remove"],"sources":["vtx-rps-frame/index.jsx"],"sourcesContent":["/* eslint-disable camelcase */\r\n/*\r\n * @Author: chenxinyu\r\n * @Date: 2021-03-24 21:47:52\r\n * @LastEditors: your name\r\n * @LastEditTime: 2022-01-12 18:49:30\r\n * @Description: 报表容器\r\n * @FilePath: \\react-components\\components\\vtx-rps-frame\\index.jsx\r\n */\r\nimport React, { useEffect, useRef } from 'react';\r\nimport axios from 'axios';\r\nimport PropTypes from 'prop-types';\r\nimport getUrlParam from '@vtx/utils/lib/getUrlParam';\r\nimport getToken from '../_util/getToken';\r\n\r\nconst initReportParamUrl = '/cloud/management/rest/np/param/getByParamTypeCode';\r\nconst initReportInfoUrl = '/cloud/rps/api/np/v101/report/getReportInfoByCode.smvc';\r\nconst initReportServerUrl = '/ReportServer';\r\nfunction VtxRpsFrame(props) {\r\n const iframeName = useRef(Math.random() + new Date().getTime());\r\n\r\n // flag改变,重新渲染报表\r\n useEffect(() => {\r\n getReportInfoByCode();\r\n }, [props.flag]);\r\n\r\n const getReportInfoByCode = () => {\r\n const {\r\n // report_code,\r\n report_param,\r\n data_param,\r\n paramTypeCode,\r\n tenantId,\r\n isParamEncode = false,\r\n reportParamUrl = initReportParamUrl,\r\n reportInfoUrl = initReportInfoUrl,\r\n reportServerUrl = initReportServerUrl,\r\n } = props;\r\n\r\n const paramCode = paramTypeCode || 'param_report_constant';\r\n // report_code 可配置,如果地址栏有report_code,则优先,否则根据props的report_code\r\n const report_code = getUrlParam().report_code\r\n ? getUrlParam().report_code\r\n : props.report_code;\r\n\r\n const access_token = getToken();\r\n\r\n // 获取公共参数\r\n function commonParam() {\r\n let header = {\r\n 'content-type': 'application/x-www-form-urlencoded',\r\n };\r\n if (access_token) {\r\n header['Authorization'] = `Bearer ${access_token}`;\r\n }\r\n return axios({\r\n method: 'get',\r\n url: `${reportParamUrl}?parameters={\"paramTypeCode\": \"${paramCode}\",\"tenantId\":\"${tenantId}\"}`,\r\n headers: header,\r\n });\r\n }\r\n\r\n // 获取报表code\r\n const param = {\r\n report_code,\r\n timestamp: new Date().valueOf(),\r\n reqMethod: 0,\r\n };\r\n const formData = isParamEncode ? encodeURI(JSON.stringify(param)) : JSON.stringify(param);\r\n function getReportInfoByCode() {\r\n let header = {\r\n 'content-type': 'application/x-www-form-urlencoded',\r\n };\r\n if (access_token) {\r\n header['Authorization'] = `Bearer ${access_token}`;\r\n }\r\n return axios({\r\n method: 'get',\r\n url: `${reportInfoUrl}?parameters=${formData}`,\r\n headers: header,\r\n });\r\n }\r\n\r\n axios\r\n .all([commonParam(), getReportInfoByCode()])\r\n .then(\r\n axios.spread(function(commonParamResult, reportInfoByCodeResult) {\r\n if (!commonParamResult.data.result && !reportInfoByCodeResult.data.result) {\r\n // 报表公共参数\r\n const commonParamData = commonParamResult.data.data;\r\n const obj = {};\r\n commonParamData.forEach(d => {\r\n obj[d.parmCode] = d.parmName;\r\n });\r\n const reportInfoByCodeData = reportInfoByCodeResult.data.data;\r\n const param = {\r\n data_url: reportInfoByCodeData.data_url,\r\n data_param: JSON.stringify(data_param),\r\n ...report_param,\r\n ...obj,\r\n reqMethod: 0,\r\n };\r\n createForm(\r\n `${window.rpsPrefix ||\r\n ''}${reportServerUrl}?report_code=${report_code}&reportlet=${\r\n reportInfoByCodeData.reportlet\r\n }&fr_locale=zh_CN×tamp=${new Date().valueOf()}&token=${access_token}&access_token=${access_token}`,\r\n param,\r\n `${iframeName.current}`,\r\n );\r\n }\r\n }),\r\n )\r\n // eslint-disable-next-line no-console\r\n .catch(err => console.log(err));\r\n };\r\n\r\n return (\r\n <div className=\"vtx-rps-frame\">\r\n <iframe\r\n className=\"vtx-rps-frame-wrapper\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n name={`${iframeName.current}`}\r\n ></iframe>\r\n </div>\r\n );\r\n}\r\n\r\nVtxRpsFrame.propTypes = {\r\n flag: PropTypes.number,\r\n report_code: PropTypes.string,\r\n report_param: PropTypes.object,\r\n data_param: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\r\n paramTypeCode: PropTypes.string,\r\n tenantId: PropTypes.string,\r\n reportParamUrl: PropTypes.string,\r\n reportInfoUrl: PropTypes.string,\r\n reportServerUrl: PropTypes.string,\r\n isParamEncode: PropTypes.bool,\r\n};\r\nexport default VtxRpsFrame;\r\n\r\nconst createForm = function(reqURL, param, iframeName) {\r\n // 定义一个form表单\r\n const formDom = document.createElement('form');\r\n formDom.method = 'post';\r\n formDom.target = iframeName;\r\n formDom.action = reqURL;\r\n formDom.style = 'display:none';\r\n const inputArray = [];\r\n for (const k in param) {\r\n if (Object.prototype.hasOwnProperty.call(param, k)) {\r\n const input1 = document.createElement('input');\r\n input1.type = 'hidden';\r\n input1.name = k;\r\n input1.value = param[k];\r\n inputArray.push(input1);\r\n }\r\n }\r\n document.body.appendChild(formDom); // 将表单放置在web中\r\n for (let i = 0, len = inputArray.length; i < len; i++) {\r\n formDom.append(inputArray[i]);\r\n }\r\n formDom.submit(); // 表单提交\r\n formDom.remove();\r\n};\r\n"],"mappings":";;;;;;AASA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,YAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,SAAA,GAAAH,sBAAA,CAAAF,OAAA;AAAyC,SAAAE,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAF,UAAA,SAAAE,CAAA,eAAAA,CAAA,gBAAAI,OAAA,CAAAJ,CAAA,0BAAAA,CAAA,sBAAAA,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAE,GAAA,CAAAL,CAAA,UAAAG,CAAA,CAAAG,GAAA,CAAAN,CAAA,OAAAO,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAb,CAAA,oBAAAa,CAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAa,CAAA,SAAAI,CAAA,GAAAR,CAAA,GAAAC,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,IAAI,CAACqE,KAAK,EAAEmD,CAAC,CAAC,EAAE;MAChD,IAAMC,MAAM,GAAGN,QAAQ,CAACjB,aAAa,CAAC,OAAO,CAAC;MAC9CuB,MAAM,CAACC,IAAI,GAAG,QAAQ;MACtBD,MAAM,CAACnB,IAAI,GAAGkB,CAAC;MACfC,MAAM,CAACnG,KAAK,GAAG+C,KAAK,CAACmD,CAAC,CAAC;MACvBD,UAAU,CAAC3G,IAAI,CAAC6G,MAAM,CAAC;IAC3B;EACJ;EACAN,QAAQ,CAACQ,IAAI,CAACC,WAAW,CAACV,OAAO,CAAC,CAAC,CAAC;EACpC,KAAK,IAAIjH,CAAC,GAAG,CAAC,EAAE4H,GAAG,GAAGN,UAAU,CAACvG,MAAM,EAAEf,CAAC,GAAG4H,GAAG,EAAE5H,CAAC,EAAE,EAAE;IACnDiH,OAAO,CAACY,MAAM,CAACP,UAAU,CAACtH,CAAC,CAAC,CAAC;EACjC;EACAiH,OAAO,CAACa,MAAM,CAAC,CAAC,CAAC,CAAC;EAClBb,OAAO,CAACc,MAAM,CAAC,CAAC;AACpB,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"index.js","names":["initReportParamUrl","initReportInfoUrl","initReportServerUrl","VtxRpsFrame","props","iframeName","useRef","Math","random","Date","getTime","useEffect","getReportInfoByCode","flag","report_param","data_param","paramTypeCode","tenantId","isParamEncode","reportParamUrl","reportInfoUrl","reportServerUrl","paramCode","report_code","getUrlParam","access_token","getToken","commonParam","header","axios","method","url","headers","param","timestamp","valueOf","reqMethod","formData","encodeURI","JSON","stringify","all","then","spread","commonParamResult","reportInfoByCodeResult","data","result","commonParamData","obj","forEach","d","parmCode","parmName","reportInfoByCodeData","data_url","createForm","window","rpsPrefix","reportlet","current","err","console","log","propTypes","PropTypes","number","string","object","oneOfType","array","bool","reqURL","formDom","document","createElement","target","action","style","inputArray","k","Object","prototype","hasOwnProperty","call","input1","type","name","value","push","body","appendChild","i","len","length","append","submit","remove"],"sources":["vtx-rps-frame/index.jsx"],"sourcesContent":["/* eslint-disable camelcase */\r\n/*\r\n * @Author: chenxinyu\r\n * @Date: 2021-03-24 21:47:52\r\n * @LastEditors: your name\r\n * @LastEditTime: 2022-01-12 18:49:30\r\n * @Description: 报表容器\r\n * @FilePath: \\react-components\\components\\vtx-rps-frame\\index.jsx\r\n */\r\nimport React, { useEffect, useRef } from 'react';\r\nimport axios from 'axios';\r\nimport PropTypes from 'prop-types';\r\nimport getUrlParam from '@vtx/utils/lib/getUrlParam';\r\nimport getToken from '../_util/getToken';\r\n\r\nconst initReportParamUrl = '/cloud/management/rest/np/param/getByParamTypeCode';\r\nconst initReportInfoUrl = '/cloud/rps/api/np/v101/report/getReportInfoByCode.smvc';\r\nconst initReportServerUrl = '/ReportServer';\r\nfunction VtxRpsFrame(props) {\r\n const iframeName = useRef(Math.random() + new Date().getTime());\r\n\r\n // flag改变,重新渲染报表\r\n useEffect(() => {\r\n getReportInfoByCode();\r\n }, [props.flag]);\r\n\r\n const getReportInfoByCode = () => {\r\n const {\r\n // report_code,\r\n report_param,\r\n data_param,\r\n paramTypeCode,\r\n tenantId,\r\n isParamEncode = false,\r\n reportParamUrl = initReportParamUrl,\r\n reportInfoUrl = initReportInfoUrl,\r\n reportServerUrl = initReportServerUrl,\r\n } = props;\r\n\r\n const paramCode = paramTypeCode || 'param_report_constant';\r\n // report_code 可配置,如果地址栏有report_code,则优先,否则根据props的report_code\r\n const report_code = getUrlParam().report_code\r\n ? getUrlParam().report_code\r\n : props.report_code;\r\n\r\n const access_token = getToken();\r\n\r\n // 获取公共参数\r\n function commonParam() {\r\n let header = {\r\n 'content-type': 'application/x-www-form-urlencoded',\r\n };\r\n if (access_token) {\r\n header['Authorization'] = `Bearer ${access_token}`;\r\n }\r\n return axios({\r\n method: 'get',\r\n url: `${reportParamUrl}?parameters={\"paramTypeCode\": \"${paramCode}\",\"tenantId\":\"${tenantId}\"}`,\r\n headers: header,\r\n });\r\n }\r\n\r\n // 获取报表code\r\n const param = {\r\n report_code,\r\n timestamp: new Date().valueOf(),\r\n reqMethod: 0,\r\n };\r\n const formData = isParamEncode ? encodeURI(JSON.stringify(param)) : JSON.stringify(param);\r\n function getReportInfoByCode() {\r\n let header = {\r\n 'content-type': 'application/x-www-form-urlencoded',\r\n };\r\n if (access_token) {\r\n header['Authorization'] = `Bearer ${access_token}`;\r\n }\r\n return axios({\r\n method: 'get',\r\n url: `${reportInfoUrl}?parameters=${formData}`,\r\n headers: header,\r\n });\r\n }\r\n\r\n axios\r\n .all([commonParam(), getReportInfoByCode()])\r\n .then(\r\n axios.spread(function(commonParamResult, reportInfoByCodeResult) {\r\n if (!commonParamResult.data.result && !reportInfoByCodeResult.data.result) {\r\n // 报表公共参数\r\n const commonParamData = commonParamResult.data.data;\r\n const obj = {};\r\n commonParamData.forEach(d => {\r\n obj[d.parmCode] = d.parmName;\r\n });\r\n const reportInfoByCodeData = reportInfoByCodeResult.data.data;\r\n const param = {\r\n data_url: reportInfoByCodeData.data_url,\r\n data_param: JSON.stringify(data_param),\r\n ...report_param,\r\n ...obj,\r\n reqMethod: 0,\r\n };\r\n createForm(\r\n `${window.rpsPrefix ||\r\n ''}${reportServerUrl}?report_code=${report_code}&reportlet=${\r\n reportInfoByCodeData.reportlet\r\n }&fr_locale=zh_CN×tamp=${new Date().valueOf()}&token=${access_token}&access_token=${access_token}`,\r\n param,\r\n `${iframeName.current}`,\r\n );\r\n }\r\n }),\r\n )\r\n // eslint-disable-next-line no-console\r\n .catch(err => console.log(err));\r\n };\r\n\r\n return (\r\n <div className=\"vtx-rps-frame\">\r\n <iframe\r\n className=\"vtx-rps-frame-wrapper\"\r\n width=\"100%\"\r\n height=\"100%\"\r\n name={`${iframeName.current}`}\r\n ></iframe>\r\n </div>\r\n );\r\n}\r\n\r\nVtxRpsFrame.propTypes = {\r\n flag: PropTypes.number,\r\n report_code: PropTypes.string,\r\n report_param: PropTypes.object,\r\n data_param: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\r\n paramTypeCode: PropTypes.string,\r\n tenantId: PropTypes.string,\r\n reportParamUrl: PropTypes.string,\r\n reportInfoUrl: PropTypes.string,\r\n reportServerUrl: PropTypes.string,\r\n isParamEncode: PropTypes.bool,\r\n};\r\nexport default VtxRpsFrame;\r\n\r\nconst createForm = function(reqURL, param, iframeName) {\r\n // 定义一个form表单\r\n const formDom = document.createElement('form');\r\n formDom.method = 'post';\r\n formDom.target = iframeName;\r\n formDom.action = reqURL;\r\n formDom.style = 'display:none';\r\n const inputArray = [];\r\n for (const k in param) {\r\n if (Object.prototype.hasOwnProperty.call(param, k)) {\r\n const input1 = document.createElement('input');\r\n input1.type = 'hidden';\r\n input1.name = k;\r\n input1.value = param[k];\r\n inputArray.push(input1);\r\n }\r\n }\r\n document.body.appendChild(formDom); // 将表单放置在web中\r\n for (let i = 0, len = inputArray.length; i < len; i++) {\r\n formDom.append(inputArray[i]);\r\n }\r\n formDom.submit(); // 表单提交\r\n formDom.remove();\r\n};\r\n"],"mappings":";;;;;;;;;AASA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEA,IAAMA,kBAAkB,GAAG,oDAA3B;AACA,IAAMC,iBAAiB,GAAG,wDAA1B;AACA,IAAMC,mBAAmB,GAAG,eAA5B;;AACA,SAASC,WAAT,CAAqBC,KAArB,EAA4B;EACxB,IAAMC,UAAU,GAAG,IAAAC,aAAA,EAAOC,IAAI,CAACC,MAAL,KAAgB,IAAIC,IAAJ,GAAWC,OAAX,EAAvB,CAAnB,CADwB,CAGxB;;EACA,IAAAC,gBAAA,EAAU,YAAM;IACZC,mBAAmB;EACtB,CAFD,EAEG,CAACR,KAAK,CAACS,IAAP,CAFH;;EAIA,IAAMD,mBAAmB,GAAG,+BAAM;IAC9B,IAEIE,YAFJ,GAUIV,KAVJ,CAEIU,YAFJ;IAAA,IAGIC,UAHJ,GAUIX,KAVJ,CAGIW,UAHJ;IAAA,IAIIC,aAJJ,GAUIZ,KAVJ,CAIIY,aAJJ;IAAA,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AR,GAAgB,cAAhB;EACA,IAAMC,UAAU,GAAG,EAAnB;;EACA,KAAK,IAAMC,CAAX,IAAgB/C,KAAhB,EAAuB;IACnB,IAAIgD,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCnD,KAArC,EAA4C+C,CAA5C,CAAJ,EAAoD;MAChD,IAAMK,MAAM,GAAGX,QAAQ,CAACC,aAAT,CAAuB,OAAvB,CAAf;MACAU,MAAM,CAACC,IAAP,GAAc,QAAd;MACAD,MAAM,CAACE,IAAP,GAAcP,CAAd;MACAK,MAAM,CAACG,KAAP,GAAevD,KAAK,CAAC+C,CAAD,CAApB;MACAD,UAAU,CAACU,IAAX,CAAgBJ,MAAhB;IACH;EACJ;;EACDX,QAAQ,CAACgB,IAAT,CAAcC,WAAd,CAA0BlB,OAA1B,EAjBmD,CAiBf;;EACpC,KAAK,IAAImB,CAAC,GAAG,CAAR,EAAWC,GAAG,GAAGd,UAAU,CAACe,MAAjC,EAAyCF,CAAC,GAAGC,GAA7C,EAAkDD,CAAC,EAAnD,EAAuD;IACnDnB,OAAO,CAACsB,MAAR,CAAehB,UAAU,CAACa,CAAD,CAAzB;EACH;;EACDnB,OAAO,CAACuB,MAAR,GArBmD,CAqBjC;;EAClBvB,OAAO,CAACwB,MAAR;AACH,CAvBD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["vtx-rps-frame/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["vtx-rps-frame/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAA"}
|