@ztocwst/rc-pro-materials 0.2.2 → 0.2.3-4.1
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/README.md +17 -17
- package/build/index.js +8 -8
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +8 -8
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/designer.html +2 -2
- package/build/lowcode/index.html +2 -2
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.css +1 -1
- package/build/lowcode/preview.js +4 -5
- package/build/lowcode/render/default/view.css +1 -2
- package/build/lowcode/render/default/view.js +9 -58
- package/build/lowcode/view.css +1 -2
- package/build/lowcode/view.js +10 -59
- package/dist/SCM_Comps.css +2 -2
- package/dist/SCM_Comps.js +22 -53
- package/dist/SCM_Comps.js.map +1 -1
- package/es/components/z-Ellipsis/ellipsis.d.ts +4 -4
- package/es/components/z-Ellipsis/index.d.ts +3 -3
- package/es/components/z-agg-block/index.d.ts +3 -3
- package/es/components/z-agg-block/index.less +134 -134
- package/es/components/z-agg-block/z-agg-block.d.ts +27 -27
- package/es/components/z-agg-block/z-agg-block.js +1 -1
- package/es/components/z-auth/auth.d.ts +9 -9
- package/es/components/z-auth/index.d.ts +3 -3
- package/es/components/z-box/box.d.ts +20 -20
- package/es/components/z-box/index.d.ts +3 -3
- package/es/components/z-box/index.less +4 -4
- package/es/components/z-button/index.d.ts +3 -3
- package/es/components/z-button/z-button.d.ts +4 -4
- package/es/components/z-config-provider/configProvider.d.ts +4 -4
- package/es/components/z-config-provider/configProvider.js +45 -4
- package/es/components/z-config-provider/index.d.ts +3 -3
- package/es/components/z-data-table/data-table.d.ts +9 -0
- package/es/components/z-data-table/data-table.js +24 -0
- package/es/components/z-data-table/index.d.ts +3 -0
- package/es/components/z-data-table/index.js +2 -0
- package/es/components/z-div/div.d.ts +6 -6
- package/es/components/z-div/index.d.ts +2 -2
- package/es/components/z-editTable/editTable.d.ts +11 -11
- package/es/components/z-editTable/editTable.js +3 -4
- package/es/components/z-editTable/index.d.ts +2 -2
- package/es/components/z-form/index.d.ts +3 -3
- package/es/components/z-form/z-form.d.ts +10 -10
- package/es/components/z-form/z-form.js +1 -1
- package/es/components/z-list/index.d.ts +3 -3
- package/es/components/z-list/list.d.ts +17 -17
- package/es/components/z-list/list.js +3 -3
- package/es/components/z-operation-records/index.d.ts +3 -3
- package/es/components/z-operation-records/operationRecords.d.ts +4 -4
- package/es/components/z-pointer-block/index.d.ts +3 -3
- package/es/components/z-pointer-block/index.less +15 -15
- package/es/components/z-pointer-block/z-pointer-block.d.ts +16 -16
- package/es/components/z-preview/index.d.ts +3 -3
- package/es/components/z-preview/preview.d.ts +4 -4
- package/es/components/z-pro-provider/index.d.ts +3 -3
- package/es/components/z-pro-provider/z-pro-provider.d.ts +6 -6
- package/es/components/z-ranking-list/index.d.ts +2 -2
- package/es/components/z-ranking-list/index.less +49 -49
- package/es/components/z-ranking-list/z-ranking-list.d.ts +14 -14
- package/es/components/z-ranking-list/z-ranking-list.js +2 -3
- package/es/components/z-simple-bar/index.d.ts +3 -3
- package/es/components/z-simple-bar/index.less +9 -9
- package/es/components/z-simple-bar/z-simple-bar.d.ts +27 -27
- package/es/components/z-singleFactory/index.d.ts +2 -2
- package/es/components/z-singleFactory/zSingerFactory.d.ts +2 -3
- package/es/components/z-slick/index.d.ts +3 -0
- package/es/components/z-slick/index.js +2 -0
- package/es/components/z-slick/slick.d.ts +47 -0
- package/es/components/z-slick/slick.js +35 -0
- package/es/components/z-statistic/index.d.ts +3 -3
- package/es/components/z-statistic/index.less +22 -22
- package/es/components/z-statistic/z-statistic.d.ts +13 -13
- package/es/components/z-table/index.d.ts +3 -3
- package/es/components/z-table/table.d.ts +8 -8
- package/es/components/z-table/table.js +1 -1
- package/es/components/z-templates-data-common/components/chart-renderer/index.d.ts +12 -14
- package/es/components/z-templates-data-common/components/chart-renderer/index.js +33 -13
- package/es/components/z-templates-data-common/data-common.d.ts +20 -105
- package/es/components/z-templates-data-common/data-common.helper.d.ts +2 -61
- package/es/components/z-templates-data-common/data-common.helper.js +2 -336
- package/es/components/z-templates-data-common/data-common.js +81 -62
- package/es/components/z-templates-data-common/index.d.ts +3 -3
- package/es/components/z-tpl/index.d.ts +3 -3
- package/es/components/z-tpl/tpl.d.ts +23 -23
- package/es/components/z-tpl/tpl.js +3 -3
- package/es/components/z-warehouse/index.d.ts +2 -2
- package/es/components/z-warehouse/zWarehouse.d.ts +2 -3
- package/es/components/z-watermark/index.d.ts +3 -0
- package/es/components/z-watermark/index.js +2 -0
- package/es/components/z-watermark/zWatermark.d.ts +3 -0
- package/es/components/z-watermark/zWatermark.js +4 -0
- package/es/index.d.ts +44 -38
- package/es/index.js +4 -0
- package/es/index.scss +1 -1
- package/es/style.js +2 -6
- package/es/utils/hoc.d.ts +6 -6
- package/es/utils/hoc.js +3 -3
- package/es/utils/index.d.ts +13 -13
- package/es/utils/index.js +5 -1
- package/es/utils/props/button.d.ts +13 -13
- package/es/utils/props/common.d.ts +7 -1
- package/es/utils/props/common.js +17 -0
- package/es/utils/props/editTable.d.ts +3 -3
- package/es/utils/props/editTable.js +21 -14
- package/es/utils/props/form.d.ts +36 -0
- package/es/utils/props/form.js +33 -14
- package/es/utils/props/listTpl.d.ts +29 -29
- package/es/utils/props/microModal.d.ts +7 -7
- package/es/utils/props/microModal.js +0 -1
- package/es/utils/props/microSwitch.d.ts +1 -1
- package/es/utils/props/microSwitch.js +4 -3
- package/es/utils/props/modalSelect.d.ts +6 -6
- package/es/utils/props/operationRecords.d.ts +2 -2
- package/es/utils/props/operationRecords.js +4 -4
- package/es/utils/props/preview.d.ts +2 -2
- package/es/utils/props/preview.js +4 -4
- package/es/utils/props/tpl.d.ts +173 -162
- package/es/utils/props/warehouseAndFactory.d.ts +1 -1
- package/es/utils/rcProRequest.d.ts +3 -3
- package/es/utils/rcProRequest.js +3 -3
- package/es/variables.scss +3 -3
- package/lib/components/z-Ellipsis/ellipsis.d.ts +4 -4
- package/lib/components/z-Ellipsis/ellipsis.js +3 -4
- package/lib/components/z-Ellipsis/index.d.ts +3 -3
- package/lib/components/z-Ellipsis/index.js +1 -2
- package/lib/components/z-agg-block/index.d.ts +3 -3
- package/lib/components/z-agg-block/index.js +1 -2
- package/lib/components/z-agg-block/index.less +134 -134
- package/lib/components/z-agg-block/z-agg-block.d.ts +27 -27
- package/lib/components/z-agg-block/z-agg-block.js +2 -3
- package/lib/components/z-auth/auth.d.ts +9 -9
- package/lib/components/z-auth/auth.js +1 -2
- package/lib/components/z-auth/index.d.ts +3 -3
- package/lib/components/z-auth/index.js +1 -2
- package/lib/components/z-box/box.d.ts +20 -20
- package/lib/components/z-box/box.js +1 -2
- package/lib/components/z-box/index.d.ts +3 -3
- package/lib/components/z-box/index.js +1 -2
- package/lib/components/z-box/index.less +4 -4
- package/lib/components/z-button/index.d.ts +3 -3
- package/lib/components/z-button/index.js +1 -2
- package/lib/components/z-button/z-button.d.ts +4 -4
- package/lib/components/z-button/z-button.js +4 -4
- package/lib/components/z-config-provider/configProvider.d.ts +4 -4
- package/lib/components/z-config-provider/configProvider.js +47 -7
- package/lib/components/z-config-provider/index.d.ts +3 -3
- package/lib/components/z-config-provider/index.js +1 -2
- package/lib/components/z-data-table/data-table.d.ts +9 -0
- package/lib/components/z-data-table/data-table.js +27 -0
- package/lib/components/z-data-table/index.d.ts +3 -0
- package/lib/components/z-data-table/index.js +7 -0
- package/lib/components/z-div/div.d.ts +6 -6
- package/lib/components/z-div/div.js +1 -2
- package/lib/components/z-div/index.d.ts +2 -2
- package/lib/components/z-div/index.js +1 -2
- package/lib/components/z-editTable/editTable.d.ts +11 -11
- package/lib/components/z-editTable/editTable.js +7 -9
- package/lib/components/z-editTable/index.d.ts +2 -2
- package/lib/components/z-editTable/index.js +1 -2
- package/lib/components/z-form/index.d.ts +3 -3
- package/lib/components/z-form/index.js +1 -2
- package/lib/components/z-form/z-form.d.ts +10 -10
- package/lib/components/z-form/z-form.js +5 -6
- package/lib/components/z-list/index.d.ts +3 -3
- package/lib/components/z-list/index.js +1 -2
- package/lib/components/z-list/list.d.ts +17 -17
- package/lib/components/z-list/list.js +7 -8
- package/lib/components/z-operation-records/index.d.ts +3 -3
- package/lib/components/z-operation-records/index.js +1 -2
- package/lib/components/z-operation-records/operationRecords.d.ts +4 -4
- package/lib/components/z-operation-records/operationRecords.js +3 -4
- package/lib/components/z-pointer-block/index.d.ts +3 -3
- package/lib/components/z-pointer-block/index.js +1 -2
- package/lib/components/z-pointer-block/index.less +15 -15
- package/lib/components/z-pointer-block/z-pointer-block.d.ts +16 -16
- package/lib/components/z-pointer-block/z-pointer-block.js +1 -2
- package/lib/components/z-preview/index.d.ts +3 -3
- package/lib/components/z-preview/index.js +1 -2
- package/lib/components/z-preview/preview.d.ts +4 -4
- package/lib/components/z-preview/preview.js +3 -4
- package/lib/components/z-pro-provider/index.d.ts +3 -3
- package/lib/components/z-pro-provider/index.js +1 -2
- package/lib/components/z-pro-provider/z-pro-provider.d.ts +6 -6
- package/lib/components/z-pro-provider/z-pro-provider.js +3 -4
- package/lib/components/z-ranking-list/index.d.ts +2 -2
- package/lib/components/z-ranking-list/index.js +1 -2
- package/lib/components/z-ranking-list/index.less +49 -49
- package/lib/components/z-ranking-list/z-ranking-list.d.ts +14 -14
- package/lib/components/z-ranking-list/z-ranking-list.js +5 -7
- package/lib/components/z-simple-bar/index.d.ts +3 -3
- package/lib/components/z-simple-bar/index.js +1 -2
- package/lib/components/z-simple-bar/index.less +9 -9
- package/lib/components/z-simple-bar/z-simple-bar.d.ts +27 -27
- package/lib/components/z-simple-bar/z-simple-bar.js +1 -2
- package/lib/components/z-singleFactory/index.d.ts +2 -2
- package/lib/components/z-singleFactory/index.js +1 -2
- package/lib/components/z-singleFactory/zSingerFactory.d.ts +2 -3
- package/lib/components/z-singleFactory/zSingerFactory.js +3 -4
- package/lib/components/z-slick/index.d.ts +3 -0
- package/lib/components/z-slick/index.js +7 -0
- package/lib/components/z-slick/slick.d.ts +47 -0
- package/lib/components/z-slick/slick.js +39 -0
- package/lib/components/z-statistic/index.d.ts +3 -3
- package/lib/components/z-statistic/index.js +1 -2
- package/lib/components/z-statistic/index.less +22 -22
- package/lib/components/z-statistic/z-statistic.d.ts +13 -13
- package/lib/components/z-statistic/z-statistic.js +1 -2
- package/lib/components/z-table/index.d.ts +3 -3
- package/lib/components/z-table/index.js +1 -2
- package/lib/components/z-table/table.d.ts +8 -8
- package/lib/components/z-table/table.js +5 -6
- package/lib/components/z-templates-data-common/components/chart-renderer/index.d.ts +12 -14
- package/lib/components/z-templates-data-common/components/chart-renderer/index.js +36 -17
- package/lib/components/z-templates-data-common/data-common.d.ts +20 -105
- package/lib/components/z-templates-data-common/data-common.helper.d.ts +2 -61
- package/lib/components/z-templates-data-common/data-common.helper.js +3 -351
- package/lib/components/z-templates-data-common/data-common.js +85 -66
- package/lib/components/z-templates-data-common/index.d.ts +3 -3
- package/lib/components/z-templates-data-common/index.js +1 -2
- package/lib/components/z-tpl/index.d.ts +3 -3
- package/lib/components/z-tpl/index.js +1 -2
- package/lib/components/z-tpl/tpl.d.ts +23 -23
- package/lib/components/z-tpl/tpl.js +7 -8
- package/lib/components/z-warehouse/index.d.ts +2 -2
- package/lib/components/z-warehouse/index.js +1 -2
- package/lib/components/z-warehouse/zWarehouse.d.ts +2 -3
- package/lib/components/z-warehouse/zWarehouse.js +3 -4
- package/lib/components/z-watermark/index.d.ts +3 -0
- package/lib/components/z-watermark/index.js +7 -0
- package/lib/components/z-watermark/zWatermark.d.ts +3 -0
- package/lib/components/z-watermark/zWatermark.js +8 -0
- package/lib/index.d.ts +44 -38
- package/lib/index.js +8 -2
- package/lib/index.scss +1 -1
- package/lib/style.js +1 -3
- package/lib/utils/hoc.d.ts +6 -6
- package/lib/utils/hoc.js +3 -3
- package/lib/utils/index.d.ts +13 -13
- package/lib/utils/index.js +7 -4
- package/lib/utils/props/button.d.ts +13 -13
- package/lib/utils/props/button.js +2 -3
- package/lib/utils/props/common.d.ts +7 -1
- package/lib/utils/props/common.js +19 -3
- package/lib/utils/props/editTable.d.ts +3 -3
- package/lib/utils/props/editTable.js +23 -17
- package/lib/utils/props/form.d.ts +36 -0
- package/lib/utils/props/form.js +35 -17
- package/lib/utils/props/listTpl.d.ts +29 -29
- package/lib/utils/props/listTpl.js +2 -3
- package/lib/utils/props/microModal.d.ts +7 -7
- package/lib/utils/props/microModal.js +1 -3
- package/lib/utils/props/microSwitch.d.ts +1 -1
- package/lib/utils/props/microSwitch.js +5 -4
- package/lib/utils/props/modalSelect.d.ts +6 -6
- package/lib/utils/props/modalSelect.js +2 -4
- package/lib/utils/props/operationRecords.d.ts +2 -2
- package/lib/utils/props/operationRecords.js +6 -7
- package/lib/utils/props/preview.d.ts +2 -2
- package/lib/utils/props/preview.js +6 -7
- package/lib/utils/props/tpl.d.ts +173 -162
- package/lib/utils/props/tpl.js +3 -5
- package/lib/utils/props/warehouseAndFactory.d.ts +1 -1
- package/lib/utils/props/warehouseAndFactory.js +2 -3
- package/lib/utils/rcProRequest.d.ts +3 -3
- package/lib/utils/rcProRequest.js +3 -4
- package/lib/variables.scss +3 -3
- package/package.json +5 -5
- package/es/components/z-templates-data-common/components/custom-renderer/index.d.ts +0 -13
- package/es/components/z-templates-data-common/components/custom-renderer/index.js +0 -172
- package/es/components/z-templates-data-common/components/dim-target/dim-target.helper.d.ts +0 -39
- package/es/components/z-templates-data-common/components/dim-target/dim-target.helper.js +0 -1
- package/es/components/z-templates-data-common/components/dim-target/index.d.ts +0 -16
- package/es/components/z-templates-data-common/components/dim-target/index.js +0 -430
- package/es/components/z-templates-data-common/components/dim-target/index.less +0 -49
- package/es/components/z-templates-data-common/components/dim-target/useUpdateEffect.d.ts +0 -8
- package/es/components/z-templates-data-common/components/dim-target/useUpdateEffect.js +0 -26
- package/es/components/z-templates-data-common/components/link-renderer/index.d.ts +0 -16
- package/es/components/z-templates-data-common/components/link-renderer/index.js +0 -320
- package/es/components/z-templates-data-common/components/link-renderer/index.less +0 -33
- package/es/components/z-templates-data-common/components/table-renderer/index.d.ts +0 -6
- package/es/components/z-templates-data-common/components/table-renderer/index.js +0 -481
- package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +0 -64
- package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +0 -220
- package/lib/components/z-templates-data-common/components/custom-renderer/index.d.ts +0 -13
- package/lib/components/z-templates-data-common/components/custom-renderer/index.js +0 -178
- package/lib/components/z-templates-data-common/components/dim-target/dim-target.helper.d.ts +0 -39
- package/lib/components/z-templates-data-common/components/dim-target/dim-target.helper.js +0 -3
- package/lib/components/z-templates-data-common/components/dim-target/index.d.ts +0 -16
- package/lib/components/z-templates-data-common/components/dim-target/index.js +0 -438
- package/lib/components/z-templates-data-common/components/dim-target/index.less +0 -49
- package/lib/components/z-templates-data-common/components/dim-target/useUpdateEffect.d.ts +0 -8
- package/lib/components/z-templates-data-common/components/dim-target/useUpdateEffect.js +0 -30
- package/lib/components/z-templates-data-common/components/link-renderer/index.d.ts +0 -16
- package/lib/components/z-templates-data-common/components/link-renderer/index.js +0 -326
- package/lib/components/z-templates-data-common/components/link-renderer/index.less +0 -33
- package/lib/components/z-templates-data-common/components/table-renderer/index.d.ts +0 -6
- package/lib/components/z-templates-data-common/components/table-renderer/index.js +0 -487
- package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +0 -64
- package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +0 -229
|
@@ -6,17 +6,22 @@ exports["default"] = void 0;
|
|
|
6
6
|
var _tabs = _interopRequireDefault(require("antd/lib/tabs"));
|
|
7
7
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _rcPro = require("@ztocwst/rc-pro");
|
|
10
|
+
var _DataTable = require("@ztocwst/rc-pro/es/components/DataTable/DataTable.helper");
|
|
9
11
|
var _dataCommon = require("../../data-common.helper");
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
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); }
|
|
13
|
-
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; }
|
|
12
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
14
14
|
var ChartRenderer = function ChartRenderer(_ref) {
|
|
15
15
|
var chartRenderRef = _ref.chartRenderRef,
|
|
16
|
+
tabsSetting = _ref.tabsSetting,
|
|
16
17
|
chartSetting = _ref.chartSetting,
|
|
17
18
|
onConfirm = _ref.onConfirm;
|
|
18
|
-
var isObject =
|
|
19
|
+
var isObject = (0, _DataTable.getType)(chartSetting) === 'object';
|
|
19
20
|
var isArray = Array.isArray(chartSetting);
|
|
21
|
+
var _ref2 = tabsSetting || {},
|
|
22
|
+
extraProps = _ref2.extraProps,
|
|
23
|
+
onTabClick = _ref2.onTabClick;
|
|
24
|
+
var tabsProps = (0, _extends2["default"])({}, (0, _DataTable.getType)(extraProps) === 'function' ? extraProps === null || extraProps === void 0 ? void 0 : extraProps() : extraProps);
|
|
20
25
|
var _chartRef = (0, _react.useRef)({});
|
|
21
26
|
var _useState = (0, _react.useState)(),
|
|
22
27
|
activeKey = _useState[0],
|
|
@@ -37,6 +42,9 @@ var ChartRenderer = function ChartRenderer(_ref) {
|
|
|
37
42
|
(_chartRef$current$act3 = _chartRef.current[activeKey]) === null || _chartRef$current$act3 === void 0 ? void 0 : (_chartRef$current$act4 = _chartRef$current$act3.queryChart) === null || _chartRef$current$act4 === void 0 ? void 0 : _chartRef$current$act4.call(_chartRef$current$act3, values);
|
|
38
43
|
}
|
|
39
44
|
};
|
|
45
|
+
var getCurrentKey = function getCurrentKey() {
|
|
46
|
+
return activeKey;
|
|
47
|
+
};
|
|
40
48
|
(0, _react.useEffect)(function () {
|
|
41
49
|
if (isObject && ! /*#__PURE__*/_react["default"].isValidElement(chartSetting)) {
|
|
42
50
|
setActiveKey(chartSetting === null || chartSetting === void 0 ? void 0 : chartSetting.dataSetName);
|
|
@@ -57,12 +65,13 @@ var ChartRenderer = function ChartRenderer(_ref) {
|
|
|
57
65
|
(0, _react.useImperativeHandle)(chartRenderRef, function () {
|
|
58
66
|
return {
|
|
59
67
|
onLink: onLink,
|
|
60
|
-
queryChart: queryChart
|
|
68
|
+
queryChart: queryChart,
|
|
69
|
+
getCurrentKey: getCurrentKey
|
|
61
70
|
};
|
|
62
71
|
});
|
|
63
72
|
|
|
64
73
|
// react子节点
|
|
65
|
-
if (
|
|
74
|
+
if (/*#__PURE__*/_react["default"].isValidElement(chartSetting)) {
|
|
66
75
|
return chartSetting;
|
|
67
76
|
}
|
|
68
77
|
|
|
@@ -75,8 +84,16 @@ var ChartRenderer = function ChartRenderer(_ref) {
|
|
|
75
84
|
|
|
76
85
|
// 普通列表json对象
|
|
77
86
|
if (isObject) {
|
|
78
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
79
|
-
|
|
87
|
+
return chartSetting !== null && chartSetting !== void 0 && chartSetting.custom ? /*#__PURE__*/_react["default"].createElement(_rcPro.CustomRender, (0, _extends2["default"])({}, chartSetting, {
|
|
88
|
+
currentKey: activeKey,
|
|
89
|
+
separator: _dataCommon.separator,
|
|
90
|
+
chartRef: function chartRef(ref) {
|
|
91
|
+
_chartRef.current[chartSetting === null || chartSetting === void 0 ? void 0 : chartSetting.dataSetName] = ref;
|
|
92
|
+
},
|
|
93
|
+
onConfirm: onConfirm
|
|
94
|
+
})) : /*#__PURE__*/_react["default"].createElement(_rcPro.TableRender, (0, _extends2["default"])({}, chartSetting, {
|
|
95
|
+
currentKey: activeKey,
|
|
96
|
+
separator: _dataCommon.separator,
|
|
80
97
|
chartRef: function chartRef(ref) {
|
|
81
98
|
_chartRef.current[chartSetting === null || chartSetting === void 0 ? void 0 : chartSetting.dataSetName] = ref;
|
|
82
99
|
},
|
|
@@ -88,21 +105,24 @@ var ChartRenderer = function ChartRenderer(_ref) {
|
|
|
88
105
|
if (isArray && !chartSetting.every(function (e) {
|
|
89
106
|
return /*#__PURE__*/_react["default"].isValidElement(e);
|
|
90
107
|
})) {
|
|
91
|
-
return /*#__PURE__*/_react["default"].createElement(_tabs["default"], {
|
|
108
|
+
return /*#__PURE__*/_react["default"].createElement(_tabs["default"], (0, _extends2["default"])({}, tabsProps, {
|
|
92
109
|
activeKey: activeKey,
|
|
110
|
+
onTabClick: onTabClick,
|
|
93
111
|
onChange: handleTabsChange
|
|
94
|
-
}, chartSetting.map(function (e, i) {
|
|
112
|
+
}), chartSetting === null || chartSetting === void 0 ? void 0 : chartSetting.map(function (e, i) {
|
|
95
113
|
return /*#__PURE__*/_react["default"].createElement(_tabs["default"].TabPane, {
|
|
96
114
|
tab: "" + ((e === null || e === void 0 ? void 0 : e.title) || ''),
|
|
97
115
|
key: "" + (e === null || e === void 0 ? void 0 : e.dataSetName) + _dataCommon.separator + i.toString()
|
|
98
|
-
}, e !== null && e !== void 0 && e.custom ? /*#__PURE__*/_react["default"].createElement(
|
|
99
|
-
|
|
116
|
+
}, e !== null && e !== void 0 && e.custom ? /*#__PURE__*/_react["default"].createElement(_rcPro.CustomRender, (0, _extends2["default"])({}, e, {
|
|
117
|
+
currentKey: activeKey,
|
|
118
|
+
separator: _dataCommon.separator,
|
|
100
119
|
chartRef: function chartRef(ref) {
|
|
101
120
|
_chartRef.current["" + (e === null || e === void 0 ? void 0 : e.dataSetName) + _dataCommon.separator + i] = ref;
|
|
102
121
|
},
|
|
103
122
|
onConfirm: onConfirm
|
|
104
|
-
})) : /*#__PURE__*/_react["default"].createElement(
|
|
105
|
-
|
|
123
|
+
})) : /*#__PURE__*/_react["default"].createElement(_rcPro.TableRender, (0, _extends2["default"])({}, e, {
|
|
124
|
+
currentKey: activeKey,
|
|
125
|
+
separator: _dataCommon.separator,
|
|
106
126
|
chartRef: function chartRef(ref) {
|
|
107
127
|
_chartRef.current["" + (e === null || e === void 0 ? void 0 : e.dataSetName) + _dataCommon.separator + i] = ref;
|
|
108
128
|
},
|
|
@@ -112,5 +132,4 @@ var ChartRenderer = function ChartRenderer(_ref) {
|
|
|
112
132
|
}
|
|
113
133
|
return null;
|
|
114
134
|
};
|
|
115
|
-
var _default = ChartRenderer;
|
|
116
|
-
exports["default"] = _default;
|
|
135
|
+
var _default = exports["default"] = ChartRenderer;
|
|
@@ -1,105 +1,20 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ProFormRenderProps } from '@ztocwst/rc-pro';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
/** 是否允许排序 */
|
|
22
|
-
sorted: boolean;
|
|
23
|
-
/** 宽度 */
|
|
24
|
-
width: number;
|
|
25
|
-
/** 是否合计 */
|
|
26
|
-
amounted: boolean;
|
|
27
|
-
/** 指标描述 */
|
|
28
|
-
description?: string;
|
|
29
|
-
/** 下转二级页 */
|
|
30
|
-
link?: string;
|
|
31
|
-
/** 查询绑定关系 */
|
|
32
|
-
queryBind?: string;
|
|
33
|
-
/** 依赖 */
|
|
34
|
-
dependencies?: string[];
|
|
35
|
-
}
|
|
36
|
-
/** 表格相关配置 */
|
|
37
|
-
export interface TypeChartSettingProps {
|
|
38
|
-
/** 二级页标题 */
|
|
39
|
-
chartTitle?: string;
|
|
40
|
-
/** 标题 */
|
|
41
|
-
title?: string;
|
|
42
|
-
/** 维度配置 */
|
|
43
|
-
dimJson?: {
|
|
44
|
-
/** 维度标题 */
|
|
45
|
-
title: string;
|
|
46
|
-
/** 维度项配置 */
|
|
47
|
-
data: Array<Omit<TypeTargetProps, 'amounted' | 'enName' | 'isFilter'>>;
|
|
48
|
-
};
|
|
49
|
-
/** 指标配置 */
|
|
50
|
-
indexJson: {
|
|
51
|
-
title: string;
|
|
52
|
-
/** 指标项配置 */
|
|
53
|
-
data: TypeTargetProps[];
|
|
54
|
-
};
|
|
55
|
-
dataSetName: string;
|
|
56
|
-
/** 自动请求 */
|
|
57
|
-
autoLoad: boolean;
|
|
58
|
-
/** 刷新时间 */
|
|
59
|
-
refreshRate?: number;
|
|
60
|
-
/** 记住勾选 */
|
|
61
|
-
remember?: boolean;
|
|
62
|
-
/** 导出 */
|
|
63
|
-
exporter?: boolean;
|
|
64
|
-
/** 导出配置 */
|
|
65
|
-
exportConfig?: {
|
|
66
|
-
name: string;
|
|
67
|
-
code: string;
|
|
68
|
-
menuId: string;
|
|
69
|
-
};
|
|
70
|
-
/** 条件格式设置 */
|
|
71
|
-
expressions?: any[] | [];
|
|
72
|
-
linkPageTitle?: string;
|
|
73
|
-
/** 下钻二级页设置 */
|
|
74
|
-
linkPage?: TypeChartSettingProps[];
|
|
75
|
-
/** 数据源参数"键"" 和 查询参数"值" 和 上一级维度(dim)"值" 关系绑定 */
|
|
76
|
-
queryBind?: Array<{
|
|
77
|
-
sourceQueryKey: string;
|
|
78
|
-
currentQueryKey: string;
|
|
79
|
-
parentDimKey: string;
|
|
80
|
-
}>;
|
|
81
|
-
/** chartRef */
|
|
82
|
-
chartRef?: React.Ref<{
|
|
83
|
-
queryChart: (v: Record<string, any>, d: string | undefined) => void;
|
|
84
|
-
}>;
|
|
85
|
-
/** 确认 */
|
|
86
|
-
onConfirm?: () => void;
|
|
87
|
-
/** 查询参数转换 */
|
|
88
|
-
formatter?: (v: Record<string, any>) => Record<string, any>;
|
|
89
|
-
}
|
|
90
|
-
export interface TypeZTemplatesDataCommonProps {
|
|
91
|
-
/** 查询表单配置 */
|
|
92
|
-
querySetting: ProFormRenderProps;
|
|
93
|
-
/** 内容区配置 */
|
|
94
|
-
chartSetting: TypeChartSettingProps | Array<TypeChartSettingProps & {
|
|
95
|
-
custom: boolean;
|
|
96
|
-
child: (p: any) => React.ReactNode;
|
|
97
|
-
title: string;
|
|
98
|
-
}> | React.ReactNode;
|
|
99
|
-
_unsafe_MixedSetter_chartSetting_select?: any;
|
|
100
|
-
}
|
|
101
|
-
export default class ZTemplatesDataCommonContainer extends React.Component<TypeZTemplatesDataCommonProps, any> {
|
|
102
|
-
chartRef: any;
|
|
103
|
-
constructor(props: any);
|
|
104
|
-
render(): JSX.Element;
|
|
105
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ProFormRenderProps, DataTableProps } from '@ztocwst/rc-pro';
|
|
3
|
+
export interface tabsSettingProps {
|
|
4
|
+
onTabClick?: () => void;
|
|
5
|
+
extraProps?: () => Record<string, any> | Record<string, any>;
|
|
6
|
+
}
|
|
7
|
+
export interface TypeZTemplatesDataCommonProps {
|
|
8
|
+
/** 查询表单配置 */
|
|
9
|
+
querySetting: ProFormRenderProps;
|
|
10
|
+
/** 页签配置 */
|
|
11
|
+
tabsSetting?: tabsSettingProps;
|
|
12
|
+
/** 内容区配置 */
|
|
13
|
+
chartSetting: DataTableProps | DataTableProps[] | React.ReactNode;
|
|
14
|
+
_unsafe_MixedSetter_chartSetting_select?: any;
|
|
15
|
+
}
|
|
16
|
+
export default class ZTemplatesDataCommonContainer extends React.Component<TypeZTemplatesDataCommonProps, any> {
|
|
17
|
+
chartRef: any;
|
|
18
|
+
constructor(props: any);
|
|
19
|
+
render(): JSX.Element;
|
|
20
|
+
}
|
|
@@ -1,61 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
export declare const tableConfigDefault: {
|
|
4
|
-
manual: boolean;
|
|
5
|
-
toolBars: boolean;
|
|
6
|
-
hideDefRowSelection: boolean;
|
|
7
|
-
columns: any[];
|
|
8
|
-
};
|
|
9
|
-
/** 字符串拼接分割符 */
|
|
10
|
-
export declare const separator = "***";
|
|
11
|
-
/** 时间单位 */
|
|
12
|
-
export declare const timeUnit: number;
|
|
13
|
-
/** 介于 前闭后开 */
|
|
14
|
-
export declare const BETWEEN = "<=,<";
|
|
15
|
-
/** 数据类型 */
|
|
16
|
-
export type valueType = number | string | null | undefined;
|
|
17
|
-
/**
|
|
18
|
-
* 计算宽
|
|
19
|
-
* @param length
|
|
20
|
-
* @param width
|
|
21
|
-
*/
|
|
22
|
-
export declare const computeWidth: (length: number, width?: number) => number;
|
|
23
|
-
/**
|
|
24
|
-
* 获取最大宽
|
|
25
|
-
* @param strArr
|
|
26
|
-
*/
|
|
27
|
-
export declare const getMaxWidth: (strArr: any[]) => number;
|
|
28
|
-
/**
|
|
29
|
-
* 处理 QueryParams 去除空字符串
|
|
30
|
-
*/
|
|
31
|
-
export declare const handleQueryParams: (query: Record<string, any>) => {
|
|
32
|
-
[x: string]: any;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* 处理数据千分位
|
|
36
|
-
*/
|
|
37
|
-
export declare const handleThousand: (value: valueType) => valueType;
|
|
38
|
-
/**
|
|
39
|
-
* 保留几位小数点
|
|
40
|
-
*/
|
|
41
|
-
export declare const handleDecimal: (value: valueType, decimal?: number) => string;
|
|
42
|
-
/**
|
|
43
|
-
* 百分比转化
|
|
44
|
-
*/
|
|
45
|
-
export declare const handlePercent: (value: valueType, decimal?: number, unit?: number) => string;
|
|
46
|
-
/**
|
|
47
|
-
* link外链处理
|
|
48
|
-
*/
|
|
49
|
-
export declare const handleLink: (value: valueType, onLink?: () => void) => import("react").JSX.Element;
|
|
50
|
-
/**
|
|
51
|
-
* 条件格式设置
|
|
52
|
-
* @param value 处理前的值
|
|
53
|
-
* @param handledValue 被处理后的值 可能会是link标签
|
|
54
|
-
*/
|
|
55
|
-
export declare const handleCondition: (value: valueType, handledValue: any, conditions: any[]) => any;
|
|
56
|
-
/** 获取维度指标 */
|
|
57
|
-
export declare const getDimTarget: (rcProContext: any, params: any) => Promise<any>;
|
|
58
|
-
/** 获取报表数据 */
|
|
59
|
-
export declare const getReportData: (rcProContext: any, params: any) => Promise<any>;
|
|
60
|
-
/** 记住勾选 */
|
|
61
|
-
export declare const saveDimTarget: (rcProContext: any, params: any) => Promise<any>;
|
|
1
|
+
/** 字符串分割符 */
|
|
2
|
+
export declare const separator = "***";
|
|
@@ -1,354 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
exports.__esModule = true;
|
|
5
|
-
exports.
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
-
var _rcProRequest = _interopRequireDefault(require("../../utils/rcProRequest"));
|
|
10
|
-
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
-
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); }
|
|
12
|
-
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; }
|
|
13
|
-
/** table config */
|
|
14
|
-
var tableConfigDefault = {
|
|
15
|
-
manual: true,
|
|
16
|
-
toolBars: false,
|
|
17
|
-
hideDefRowSelection: true,
|
|
18
|
-
columns: []
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/** 字符串拼接分割符 */
|
|
22
|
-
exports.tableConfigDefault = tableConfigDefault;
|
|
23
|
-
var separator = '***';
|
|
24
|
-
|
|
25
|
-
/** 时间单位 */
|
|
26
|
-
exports.separator = separator;
|
|
27
|
-
var timeUnit = 60 * 1000;
|
|
28
|
-
|
|
29
|
-
/** 介于 前闭后开 */
|
|
30
|
-
exports.timeUnit = timeUnit;
|
|
31
|
-
var BETWEEN = '<=,<';
|
|
32
|
-
/** 数据类型 */
|
|
33
|
-
exports.BETWEEN = BETWEEN;
|
|
34
|
-
/**
|
|
35
|
-
* 计算宽
|
|
36
|
-
* @param length
|
|
37
|
-
* @param width
|
|
38
|
-
*/
|
|
39
|
-
var computeWidth = function computeWidth(length, width) {
|
|
40
|
-
if (width === void 0) {
|
|
41
|
-
width = 40;
|
|
42
|
-
}
|
|
43
|
-
return length * width;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/**
|
|
47
|
-
* 获取最大宽
|
|
48
|
-
* @param strArr
|
|
49
|
-
*/
|
|
50
|
-
exports.computeWidth = computeWidth;
|
|
51
|
-
var getMaxWidth = function getMaxWidth(strArr) {
|
|
52
|
-
if (!(strArr !== null && strArr !== void 0 && strArr.length)) return 0;
|
|
53
|
-
var arr = strArr.map(function (s) {
|
|
54
|
-
var _s$toString;
|
|
55
|
-
return s === null || s === void 0 ? void 0 : (_s$toString = s.toString()) === null || _s$toString === void 0 ? void 0 : _s$toString.length;
|
|
56
|
-
});
|
|
57
|
-
var length = Math.max.apply(null, arr);
|
|
58
|
-
return computeWidth(length, 14);
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* 处理 QueryParams 去除空字符串
|
|
63
|
-
*/
|
|
64
|
-
exports.getMaxWidth = getMaxWidth;
|
|
65
|
-
var handleQueryParams = function handleQueryParams(query) {
|
|
66
|
-
var queryParams = (0, _extends2["default"])({}, query);
|
|
67
|
-
Object.keys(query).forEach(function (k) {
|
|
68
|
-
if (query[k] === '') {
|
|
69
|
-
queryParams[k] = undefined;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
return queryParams;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* 处理数据千分位
|
|
77
|
-
*/
|
|
78
|
-
exports.handleQueryParams = handleQueryParams;
|
|
79
|
-
var handleThousand = function handleThousand(value) {
|
|
80
|
-
if (!Number.isNaN(value) && value) {
|
|
81
|
-
if (String(value).indexOf('.') !== -1) {
|
|
82
|
-
var _String$split = String(value).split('.'),
|
|
83
|
-
start = _String$split[0],
|
|
84
|
-
end = _String$split[1];
|
|
85
|
-
var begin = start.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,');
|
|
86
|
-
return [begin, end].join('.');
|
|
87
|
-
} else {
|
|
88
|
-
return value.toString().replace(/(\d)(?=(?:\d{3})+$)/g, '$1,');
|
|
89
|
-
}
|
|
90
|
-
} else {
|
|
91
|
-
return value;
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* 保留几位小数点
|
|
97
|
-
*/
|
|
98
|
-
exports.handleThousand = handleThousand;
|
|
99
|
-
var handleDecimal = function handleDecimal(value, decimal) {
|
|
100
|
-
if (decimal === void 0) {
|
|
101
|
-
decimal = 2;
|
|
102
|
-
}
|
|
103
|
-
if (value === null || value === undefined) return;
|
|
104
|
-
return Number(value).toFixed(decimal);
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* 百分比转化
|
|
109
|
-
*/
|
|
110
|
-
exports.handleDecimal = handleDecimal;
|
|
111
|
-
var handlePercent = function handlePercent(value, decimal, unit) {
|
|
112
|
-
if (decimal === void 0) {
|
|
113
|
-
decimal = 2;
|
|
114
|
-
}
|
|
115
|
-
if (unit === void 0) {
|
|
116
|
-
unit = 100;
|
|
117
|
-
}
|
|
118
|
-
if (value === null || value === undefined) return;
|
|
119
|
-
return (Number(value) * unit).toFixed(decimal) + "%";
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* link外链处理
|
|
124
|
-
*/
|
|
125
|
-
exports.handlePercent = handlePercent;
|
|
126
|
-
var handleLink = function handleLink(value, onLink) {
|
|
127
|
-
if (value === null || value === undefined) return;
|
|
128
|
-
return /*#__PURE__*/React.createElement("a", {
|
|
129
|
-
href: "javascript:void(0);",
|
|
130
|
-
onClick: onLink
|
|
131
|
-
}, value);
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* 条件格式设置
|
|
136
|
-
* @param value 处理前的值
|
|
137
|
-
* @param handledValue 被处理后的值 可能会是link标签
|
|
138
|
-
*/
|
|
139
|
-
exports.handleLink = handleLink;
|
|
140
|
-
var handleCondition = function handleCondition(value, handledValue, conditions) {
|
|
141
|
-
if (value === null || value === undefined) return;
|
|
142
|
-
var val = handledValue;
|
|
143
|
-
for (var _iterator = _createForOfIteratorHelperLoose(conditions), _step; !(_step = _iterator()).done;) {
|
|
144
|
-
var cur = _step.value;
|
|
145
|
-
var condition = cur === null || cur === void 0 ? void 0 : cur.condition;
|
|
146
|
-
if ((condition === null || condition === void 0 ? void 0 : condition.type) === BETWEEN) {
|
|
147
|
-
var _condition$type;
|
|
148
|
-
var _condition$type$split = condition === null || condition === void 0 ? void 0 : (_condition$type = condition.type) === null || _condition$type === void 0 ? void 0 : _condition$type.split(','),
|
|
149
|
-
start = _condition$type$split[0],
|
|
150
|
-
end = _condition$type$split[1];
|
|
151
|
-
if (eval("" + (condition === null || condition === void 0 ? void 0 : condition.start) + start + value) && eval("" + value + end + (condition === null || condition === void 0 ? void 0 : condition.end))) {
|
|
152
|
-
var style = {
|
|
153
|
-
color: cur === null || cur === void 0 ? void 0 : cur.fontColor,
|
|
154
|
-
background: cur === null || cur === void 0 ? void 0 : cur.backgroundColor
|
|
155
|
-
};
|
|
156
|
-
val = /*#__PURE__*/React.createElement("div", {
|
|
157
|
-
style: style
|
|
158
|
-
}, handledValue);
|
|
159
|
-
}
|
|
160
|
-
} else if (eval("" + value + (condition === null || condition === void 0 ? void 0 : condition.type) + (condition === null || condition === void 0 ? void 0 : condition.value))) {
|
|
161
|
-
var _style = {
|
|
162
|
-
color: cur === null || cur === void 0 ? void 0 : cur.fontColor,
|
|
163
|
-
background: cur === null || cur === void 0 ? void 0 : cur.backgroundColor
|
|
164
|
-
};
|
|
165
|
-
val = /*#__PURE__*/React.createElement("div", {
|
|
166
|
-
style: _style
|
|
167
|
-
}, handledValue);
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return val;
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
// mock
|
|
174
|
-
exports.handleCondition = handleCondition;
|
|
175
|
-
var token = 'scm:tenant:token:2:104:177217352666D386AA01E5AF6293727D';
|
|
176
|
-
|
|
177
|
-
/** 获取维度指标 */
|
|
178
|
-
var getDimTarget = /*#__PURE__*/function () {
|
|
179
|
-
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(rcProContext, params) {
|
|
180
|
-
var _data_env_mapping$env;
|
|
181
|
-
var _ref2, materialsRequest, env, data_env_mapping, __env, res, _res;
|
|
182
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
183
|
-
while (1) switch (_context.prev = _context.next) {
|
|
184
|
-
case 0:
|
|
185
|
-
_ref2 = rcProContext || {}, materialsRequest = _ref2.materialsRequest, env = _ref2.env, data_env_mapping = _ref2.data_env_mapping;
|
|
186
|
-
__env = (_data_env_mapping$env = data_env_mapping === null || data_env_mapping === void 0 ? void 0 : data_env_mapping[env]) !== null && _data_env_mapping$env !== void 0 ? _data_env_mapping$env : data_env_mapping === null || data_env_mapping === void 0 ? void 0 : data_env_mapping['__other']; // 供应链里由子应用透传
|
|
187
|
-
if (!materialsRequest) {
|
|
188
|
-
_context.next = 7;
|
|
189
|
-
break;
|
|
190
|
-
}
|
|
191
|
-
_context.next = 5;
|
|
192
|
-
return (0, _rcProRequest["default"])(rcProContext, "/data/forward/v1/bigdata/report/view/query/" + params.dataSetName, {
|
|
193
|
-
method: 'POST',
|
|
194
|
-
data: {
|
|
195
|
-
bigDataBody: (0, _extends2["default"])({}, __env ? {
|
|
196
|
-
env: __env
|
|
197
|
-
} : {}, params)
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
case 5:
|
|
201
|
-
res = _context.sent;
|
|
202
|
-
return _context.abrupt("return", res);
|
|
203
|
-
case 7:
|
|
204
|
-
_context.prev = 7;
|
|
205
|
-
_context.next = 10;
|
|
206
|
-
return fetch("http://scm.gateway.dev.ztyc.com/data/forward/v1/bigdata/report/view/query/" + params.dataSetName, {
|
|
207
|
-
method: 'POST',
|
|
208
|
-
body: JSON.stringify({
|
|
209
|
-
bigDataBody: (0, _extends2["default"])({
|
|
210
|
-
env: 'dev'
|
|
211
|
-
}, params)
|
|
212
|
-
}),
|
|
213
|
-
headers: {
|
|
214
|
-
'Content-Type': 'application/json',
|
|
215
|
-
token: token
|
|
216
|
-
}
|
|
217
|
-
});
|
|
218
|
-
case 10:
|
|
219
|
-
_res = _context.sent;
|
|
220
|
-
_context.next = 13;
|
|
221
|
-
return _res.json();
|
|
222
|
-
case 13:
|
|
223
|
-
return _context.abrupt("return", _context.sent);
|
|
224
|
-
case 16:
|
|
225
|
-
_context.prev = 16;
|
|
226
|
-
_context.t0 = _context["catch"](7);
|
|
227
|
-
return _context.abrupt("return", {});
|
|
228
|
-
case 19:
|
|
229
|
-
case "end":
|
|
230
|
-
return _context.stop();
|
|
231
|
-
}
|
|
232
|
-
}, _callee, null, [[7, 16]]);
|
|
233
|
-
}));
|
|
234
|
-
return function getDimTarget(_x, _x2) {
|
|
235
|
-
return _ref.apply(this, arguments);
|
|
236
|
-
};
|
|
237
|
-
}();
|
|
238
|
-
|
|
239
|
-
/** 获取报表数据 */
|
|
240
|
-
exports.getDimTarget = getDimTarget;
|
|
241
|
-
var getReportData = /*#__PURE__*/function () {
|
|
242
|
-
var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2(rcProContext, params) {
|
|
243
|
-
var _data_env_mapping$env2;
|
|
244
|
-
var _ref4, materialsRequest, env, data_env_mapping, __env, res, _res2;
|
|
245
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
246
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
247
|
-
case 0:
|
|
248
|
-
_ref4 = rcProContext || {}, materialsRequest = _ref4.materialsRequest, env = _ref4.env, data_env_mapping = _ref4.data_env_mapping;
|
|
249
|
-
__env = (_data_env_mapping$env2 = data_env_mapping === null || data_env_mapping === void 0 ? void 0 : data_env_mapping[env]) !== null && _data_env_mapping$env2 !== void 0 ? _data_env_mapping$env2 : data_env_mapping === null || data_env_mapping === void 0 ? void 0 : data_env_mapping['__other']; // 供应链里由子应用透传
|
|
250
|
-
if (!materialsRequest) {
|
|
251
|
-
_context2.next = 7;
|
|
252
|
-
break;
|
|
253
|
-
}
|
|
254
|
-
_context2.next = 5;
|
|
255
|
-
return (0, _rcProRequest["default"])(rcProContext, "/data/forward/v1/bigdata/report/" + params.dataSetName, {
|
|
256
|
-
method: 'POST',
|
|
257
|
-
data: {
|
|
258
|
-
bigDataBody: (0, _extends2["default"])({}, __env ? {
|
|
259
|
-
env: __env
|
|
260
|
-
} : {}, params)
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
case 5:
|
|
264
|
-
res = _context2.sent;
|
|
265
|
-
return _context2.abrupt("return", res);
|
|
266
|
-
case 7:
|
|
267
|
-
_context2.prev = 7;
|
|
268
|
-
_context2.next = 10;
|
|
269
|
-
return fetch("http://scm.gateway.dev.ztyc.com/data/forward/v1/bigdata/report/" + params.dataSetName, {
|
|
270
|
-
method: 'POST',
|
|
271
|
-
body: JSON.stringify({
|
|
272
|
-
bigDataBody: (0, _extends2["default"])({
|
|
273
|
-
env: 'dev'
|
|
274
|
-
}, params)
|
|
275
|
-
}),
|
|
276
|
-
headers: {
|
|
277
|
-
'Content-Type': 'application/json',
|
|
278
|
-
token: token
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
case 10:
|
|
282
|
-
_res2 = _context2.sent;
|
|
283
|
-
_context2.next = 13;
|
|
284
|
-
return _res2.json();
|
|
285
|
-
case 13:
|
|
286
|
-
return _context2.abrupt("return", _context2.sent);
|
|
287
|
-
case 16:
|
|
288
|
-
_context2.prev = 16;
|
|
289
|
-
_context2.t0 = _context2["catch"](7);
|
|
290
|
-
return _context2.abrupt("return", {});
|
|
291
|
-
case 19:
|
|
292
|
-
case "end":
|
|
293
|
-
return _context2.stop();
|
|
294
|
-
}
|
|
295
|
-
}, _callee2, null, [[7, 16]]);
|
|
296
|
-
}));
|
|
297
|
-
return function getReportData(_x3, _x4) {
|
|
298
|
-
return _ref3.apply(this, arguments);
|
|
299
|
-
};
|
|
300
|
-
}();
|
|
301
|
-
|
|
302
|
-
/** 记住勾选 */
|
|
303
|
-
exports.getReportData = getReportData;
|
|
304
|
-
var saveDimTarget = /*#__PURE__*/function () {
|
|
305
|
-
var _ref5 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(rcProContext, params) {
|
|
306
|
-
var _ref6, materialsRequest, res, _res3;
|
|
307
|
-
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
308
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
309
|
-
case 0:
|
|
310
|
-
_ref6 = rcProContext || {}, materialsRequest = _ref6.materialsRequest; // 供应链里由子应用透传
|
|
311
|
-
if (!materialsRequest) {
|
|
312
|
-
_context3.next = 6;
|
|
313
|
-
break;
|
|
314
|
-
}
|
|
315
|
-
_context3.next = 4;
|
|
316
|
-
return (0, _rcProRequest["default"])(rcProContext, "/data/forward/v1/bigdata/report/view/save", {
|
|
317
|
-
method: 'POST',
|
|
318
|
-
data: params
|
|
319
|
-
});
|
|
320
|
-
case 4:
|
|
321
|
-
res = _context3.sent;
|
|
322
|
-
return _context3.abrupt("return", res);
|
|
323
|
-
case 6:
|
|
324
|
-
_context3.prev = 6;
|
|
325
|
-
_context3.next = 9;
|
|
326
|
-
return fetch("http://scm.gateway.dev.ztyc.com/data/forward/v1/bigdata/report/view/save", {
|
|
327
|
-
method: 'POST',
|
|
328
|
-
body: JSON.stringify((0, _extends2["default"])({}, params)),
|
|
329
|
-
headers: {
|
|
330
|
-
'Content-Type': 'application/json',
|
|
331
|
-
token: token
|
|
332
|
-
}
|
|
333
|
-
});
|
|
334
|
-
case 9:
|
|
335
|
-
_res3 = _context3.sent;
|
|
336
|
-
_context3.next = 12;
|
|
337
|
-
return _res3.json();
|
|
338
|
-
case 12:
|
|
339
|
-
return _context3.abrupt("return", _context3.sent);
|
|
340
|
-
case 15:
|
|
341
|
-
_context3.prev = 15;
|
|
342
|
-
_context3.t0 = _context3["catch"](6);
|
|
343
|
-
return _context3.abrupt("return", {});
|
|
344
|
-
case 18:
|
|
345
|
-
case "end":
|
|
346
|
-
return _context3.stop();
|
|
347
|
-
}
|
|
348
|
-
}, _callee3, null, [[6, 15]]);
|
|
349
|
-
}));
|
|
350
|
-
return function saveDimTarget(_x5, _x6) {
|
|
351
|
-
return _ref5.apply(this, arguments);
|
|
352
|
-
};
|
|
353
|
-
}();
|
|
354
|
-
exports.saveDimTarget = saveDimTarget;
|
|
4
|
+
exports.separator = void 0;
|
|
5
|
+
/** 字符串分割符 */
|
|
6
|
+
var separator = exports.separator = "***";
|