@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
|
@@ -1,481 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import _Table from "antd/es/table";
|
|
3
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
4
|
-
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."); }
|
|
5
|
-
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); }
|
|
6
|
-
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; }
|
|
7
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
-
import { useRef, useState, useEffect, useImperativeHandle, useContext } from 'react';
|
|
9
|
-
import { ProTable, RcConfigContext } from '@ztocwst/rc-pro';
|
|
10
|
-
import { tableConfigDefault, separator, timeUnit, handleQueryParams, getReportData } from "../../data-common.helper";
|
|
11
|
-
import { handleColumns, handleValueFormat, getDimTargetData } from "./table-renderer.helper";
|
|
12
|
-
import DimTarget from "../dim-target";
|
|
13
|
-
import LinkRenderer from "../link-renderer";
|
|
14
|
-
var TableRenderer = function TableRenderer(props) {
|
|
15
|
-
var _tableOptions$paginat;
|
|
16
|
-
var activeKey = props.activeKey,
|
|
17
|
-
autoLoad = props.autoLoad,
|
|
18
|
-
refreshRate = props.refreshRate,
|
|
19
|
-
dataSetName = props.dataSetName,
|
|
20
|
-
remember = props.remember,
|
|
21
|
-
exporter = props.exporter,
|
|
22
|
-
exportConfig = props.exportConfig,
|
|
23
|
-
dimJson = props.dimJson,
|
|
24
|
-
indexJson = props.indexJson,
|
|
25
|
-
expressions = props.expressions,
|
|
26
|
-
linkPageTitle = props.linkPageTitle,
|
|
27
|
-
linkPage = props.linkPage,
|
|
28
|
-
queryBind = props.queryBind,
|
|
29
|
-
chartRef = props.chartRef,
|
|
30
|
-
onConfirm = props.onConfirm,
|
|
31
|
-
formatter = props.formatter;
|
|
32
|
-
var dimTargetRef = useRef(null);
|
|
33
|
-
var queryCacheRef = useRef(null);
|
|
34
|
-
var tableRef = useRef(null);
|
|
35
|
-
var _useState = useState(false),
|
|
36
|
-
loading = _useState[0],
|
|
37
|
-
setLoading = _useState[1];
|
|
38
|
-
var _useState2 = useState(tableConfigDefault),
|
|
39
|
-
config = _useState2[0],
|
|
40
|
-
setConfig = _useState2[1];
|
|
41
|
-
/** 维度指标初始数据 */
|
|
42
|
-
var _useState3 = useState(),
|
|
43
|
-
dimTargetValue = _useState3[0],
|
|
44
|
-
setDimTargetValue = _useState3[1];
|
|
45
|
-
/** 合计 数据 */
|
|
46
|
-
var amounted = useRef({});
|
|
47
|
-
var rcProContext = useContext(RcConfigContext);
|
|
48
|
-
var _ref = rcProContext || {},
|
|
49
|
-
BASE_URL = _ref.BASE_URL,
|
|
50
|
-
_ref$tableOptions = _ref.tableOptions,
|
|
51
|
-
tableOptions = _ref$tableOptions === void 0 ? {} : _ref$tableOptions;
|
|
52
|
-
var defaultPageSize = (tableOptions === null || tableOptions === void 0 ? void 0 : (_tableOptions$paginat = tableOptions.pagination) === null || _tableOptions$paginat === void 0 ? void 0 : _tableOptions$paginat.defaultPageSize) || 20;
|
|
53
|
-
var _useState4 = useState(false),
|
|
54
|
-
isLink = _useState4[0],
|
|
55
|
-
setIsLink = _useState4[1];
|
|
56
|
-
var linkChartRef = useRef();
|
|
57
|
-
var timer = null;
|
|
58
|
-
var getDimTargetValues = function getDimTargetValues() {
|
|
59
|
-
var _dimTargetRef$current;
|
|
60
|
-
return (dimTargetRef === null || dimTargetRef === void 0 ? void 0 : (_dimTargetRef$current = dimTargetRef.current) === null || _dimTargetRef$current === void 0 ? void 0 : _dimTargetRef$current.getDimTargetValues()) || {};
|
|
61
|
-
};
|
|
62
|
-
var buttons = [{
|
|
63
|
-
name: '确认',
|
|
64
|
-
action: 'btn',
|
|
65
|
-
props: {
|
|
66
|
-
loading: loading,
|
|
67
|
-
type: 'primary'
|
|
68
|
-
},
|
|
69
|
-
onClick: function onClick() {
|
|
70
|
-
var option = getDimTargetValues();
|
|
71
|
-
handleUpdateColumns(option);
|
|
72
|
-
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
|
|
73
|
-
}
|
|
74
|
-
}, exporter ? {
|
|
75
|
-
action: 'btn',
|
|
76
|
-
name: exportConfig === null || exportConfig === void 0 ? void 0 : exportConfig.name,
|
|
77
|
-
fileConfig: {
|
|
78
|
-
type: 'export',
|
|
79
|
-
params: {
|
|
80
|
-
menuId: exportConfig === null || exportConfig === void 0 ? void 0 : exportConfig.menuId,
|
|
81
|
-
operateType: 'EXPORT'
|
|
82
|
-
},
|
|
83
|
-
request: {
|
|
84
|
-
submit: {
|
|
85
|
-
url: BASE_URL + "/data/forward/v1/bigdata/report/" + dataSetName + "/export",
|
|
86
|
-
method: 'POST',
|
|
87
|
-
formatter: function () {
|
|
88
|
-
var _formatter = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(values) {
|
|
89
|
-
var bigDataBody, _ref2, _ref2$temp, temp;
|
|
90
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
91
|
-
while (1) switch (_context.prev = _context.next) {
|
|
92
|
-
case 0:
|
|
93
|
-
bigDataBody = getBigDataBody();
|
|
94
|
-
_ref2 = values || {}, _ref2$temp = _ref2.temp, temp = _ref2$temp === void 0 ? {} : _ref2$temp;
|
|
95
|
-
return _context.abrupt("return", {
|
|
96
|
-
buttonCode: exportConfig === null || exportConfig === void 0 ? void 0 : exportConfig.code,
|
|
97
|
-
templateId: temp === null || temp === void 0 ? void 0 : temp.value,
|
|
98
|
-
bigDataBody: bigDataBody
|
|
99
|
-
});
|
|
100
|
-
case 3:
|
|
101
|
-
case "end":
|
|
102
|
-
return _context.stop();
|
|
103
|
-
}
|
|
104
|
-
}, _callee);
|
|
105
|
-
}));
|
|
106
|
-
function formatter(_x) {
|
|
107
|
-
return _formatter.apply(this, arguments);
|
|
108
|
-
}
|
|
109
|
-
return formatter;
|
|
110
|
-
}()
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
} : null];
|
|
115
|
-
var summary = function summary() {
|
|
116
|
-
var _getDimTargetValues = getDimTargetValues(),
|
|
117
|
-
_getDimTargetValues$d = _getDimTargetValues.dimension,
|
|
118
|
-
dimension = _getDimTargetValues$d === void 0 ? [] : _getDimTargetValues$d,
|
|
119
|
-
_getDimTargetValues$i = _getDimTargetValues.index,
|
|
120
|
-
index = _getDimTargetValues$i === void 0 ? [] : _getDimTargetValues$i,
|
|
121
|
-
_getDimTargetValues$i2 = _getDimTargetValues.indexSource,
|
|
122
|
-
indexSource = _getDimTargetValues$i2 === void 0 ? [] : _getDimTargetValues$i2;
|
|
123
|
-
var indexAmounted = indexSource === null || indexSource === void 0 ? void 0 : indexSource.filter(function (cur) {
|
|
124
|
-
return cur.amounted;
|
|
125
|
-
});
|
|
126
|
-
if (!indexAmounted.length) return;
|
|
127
|
-
var summaryColumns = ['总计'].concat(dimension, index);
|
|
128
|
-
return /*#__PURE__*/React.createElement(_Table.Summary, {
|
|
129
|
-
fixed: true
|
|
130
|
-
}, /*#__PURE__*/React.createElement(_Table.Summary.Row, null, summaryColumns.map(function (name, idx) {
|
|
131
|
-
var find = indexSource === null || indexSource === void 0 ? void 0 : indexSource.find(function (item) {
|
|
132
|
-
return item.alias === name || item.name === name;
|
|
133
|
-
});
|
|
134
|
-
var dataIndex = find === null || find === void 0 ? void 0 : find.name;
|
|
135
|
-
return /*#__PURE__*/React.createElement(_Table.Summary.Cell, {
|
|
136
|
-
key: idx === null || idx === void 0 ? void 0 : idx.toString(),
|
|
137
|
-
index: idx
|
|
138
|
-
}, !idx ? name : dataIndex ? handleValueFormat(amounted.current[dataIndex], amounted.current, find) : '');
|
|
139
|
-
})));
|
|
140
|
-
};
|
|
141
|
-
var onLink = function onLink(values) {
|
|
142
|
-
var _linkChartRef$current, _linkChartRef$current2;
|
|
143
|
-
var _getDimTargetValues2 = getDimTargetValues(),
|
|
144
|
-
_getDimTargetValues2$ = _getDimTargetValues2.dimension,
|
|
145
|
-
dimension = _getDimTargetValues2$ === void 0 ? [] : _getDimTargetValues2$;
|
|
146
|
-
setIsLink(true);
|
|
147
|
-
(_linkChartRef$current = linkChartRef.current) === null || _linkChartRef$current === void 0 ? void 0 : (_linkChartRef$current2 = _linkChartRef$current.initial) === null || _linkChartRef$current2 === void 0 ? void 0 : _linkChartRef$current2.call(_linkChartRef$current, _extends({}, values, {
|
|
148
|
-
dimension: dimension
|
|
149
|
-
}));
|
|
150
|
-
};
|
|
151
|
-
var handleUpdateColumns = /*#__PURE__*/function () {
|
|
152
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(option) {
|
|
153
|
-
var _tableRef$current;
|
|
154
|
-
var columns;
|
|
155
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
156
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
157
|
-
case 0:
|
|
158
|
-
columns = handleColumns(option, expressions, onLink);
|
|
159
|
-
(_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.updateColumns(columns);
|
|
160
|
-
case 2:
|
|
161
|
-
case "end":
|
|
162
|
-
return _context2.stop();
|
|
163
|
-
}
|
|
164
|
-
}, _callee2);
|
|
165
|
-
}));
|
|
166
|
-
return function handleUpdateColumns(_x2) {
|
|
167
|
-
return _ref3.apply(this, arguments);
|
|
168
|
-
};
|
|
169
|
-
}();
|
|
170
|
-
var getBigDataBody = function getBigDataBody(params) {
|
|
171
|
-
if (params === void 0) {
|
|
172
|
-
params = {};
|
|
173
|
-
}
|
|
174
|
-
var _getDimTargetValues3 = getDimTargetValues(),
|
|
175
|
-
_getDimTargetValues3$ = _getDimTargetValues3.dimension,
|
|
176
|
-
dimension = _getDimTargetValues3$ === void 0 ? [] : _getDimTargetValues3$,
|
|
177
|
-
_getDimTargetValues3$2 = _getDimTargetValues3.dimensionSource,
|
|
178
|
-
dimensionSource = _getDimTargetValues3$2 === void 0 ? [] : _getDimTargetValues3$2,
|
|
179
|
-
_getDimTargetValues3$3 = _getDimTargetValues3.index,
|
|
180
|
-
index = _getDimTargetValues3$3 === void 0 ? [] : _getDimTargetValues3$3,
|
|
181
|
-
_getDimTargetValues3$4 = _getDimTargetValues3.indexSource,
|
|
182
|
-
indexSource = _getDimTargetValues3$4 === void 0 ? [] : _getDimTargetValues3$4;
|
|
183
|
-
|
|
184
|
-
/** 通过 queryBind查看是否有绑定关系 有的话替换成绑定关系中的key 没有则是默认配置的key */
|
|
185
|
-
var queryCache = queryCacheRef.current;
|
|
186
|
-
var query = {};
|
|
187
|
-
var queryKeys = Object.keys(queryCache);
|
|
188
|
-
if (queryKeys !== null && queryKeys !== void 0 && queryKeys.length) {
|
|
189
|
-
queryKeys.forEach(function (k) {
|
|
190
|
-
var _queryBind$find;
|
|
191
|
-
// "键"(有建立绑定关系 取当前数据源参数(paraJson)的"键",没有则是默认查询配置的"键")
|
|
192
|
-
var key = (queryBind === null || queryBind === void 0 ? void 0 : (_queryBind$find = queryBind.find(function (item) {
|
|
193
|
-
return (item === null || item === void 0 ? void 0 : item.currentQueryKey) === k;
|
|
194
|
-
})) === null || _queryBind$find === void 0 ? void 0 : _queryBind$find.sourceQueryKey) || k;
|
|
195
|
-
query[key] = queryCache[k];
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/** 维度收集 */
|
|
200
|
-
var dim = [];
|
|
201
|
-
for (var _iterator = _createForOfIteratorHelperLoose(dimensionSource), _step; !(_step = _iterator()).done;) {
|
|
202
|
-
var cur = _step.value;
|
|
203
|
-
if (dimension.includes(cur.alias || cur.description)) {
|
|
204
|
-
dim.push({
|
|
205
|
-
name: cur.name,
|
|
206
|
-
description: cur.description
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/** 指标收集 */
|
|
212
|
-
var target = [];
|
|
213
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose(indexSource), _step2; !(_step2 = _iterator2()).done;) {
|
|
214
|
-
var _cur = _step2.value;
|
|
215
|
-
if (index.includes(_cur.alias || _cur.name)) {
|
|
216
|
-
target.push({
|
|
217
|
-
description: _cur.name
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
var queryParams = handleQueryParams(query);
|
|
222
|
-
var data = _extends({
|
|
223
|
-
queryParams: queryParams,
|
|
224
|
-
dim: dim,
|
|
225
|
-
target: target
|
|
226
|
-
}, params, {
|
|
227
|
-
pageNum: 1,
|
|
228
|
-
pageSize: defaultPageSize,
|
|
229
|
-
dataSetName: dataSetName
|
|
230
|
-
});
|
|
231
|
-
return formatter ? formatter === null || formatter === void 0 ? void 0 : formatter(data) : data;
|
|
232
|
-
};
|
|
233
|
-
|
|
234
|
-
// 获取数据源
|
|
235
|
-
var getDataSource = /*#__PURE__*/function () {
|
|
236
|
-
var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(params) {
|
|
237
|
-
var data, _yield$getReportData, success, _yield$getReportData$, result;
|
|
238
|
-
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
239
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
240
|
-
case 0:
|
|
241
|
-
if (params === void 0) {
|
|
242
|
-
params = {};
|
|
243
|
-
}
|
|
244
|
-
if (!loading) {
|
|
245
|
-
_context3.next = 3;
|
|
246
|
-
break;
|
|
247
|
-
}
|
|
248
|
-
return _context3.abrupt("return");
|
|
249
|
-
case 3:
|
|
250
|
-
_context3.prev = 3;
|
|
251
|
-
data = getBigDataBody(params);
|
|
252
|
-
setLoading(true);
|
|
253
|
-
_context3.next = 8;
|
|
254
|
-
return getReportData(rcProContext, data);
|
|
255
|
-
case 8:
|
|
256
|
-
_yield$getReportData = _context3.sent;
|
|
257
|
-
success = _yield$getReportData.success;
|
|
258
|
-
_yield$getReportData$ = _yield$getReportData.result;
|
|
259
|
-
result = _yield$getReportData$ === void 0 ? {} : _yield$getReportData$;
|
|
260
|
-
setLoading(false);
|
|
261
|
-
return _context3.abrupt("return", {
|
|
262
|
-
success: success,
|
|
263
|
-
result: result
|
|
264
|
-
});
|
|
265
|
-
case 16:
|
|
266
|
-
_context3.prev = 16;
|
|
267
|
-
_context3.t0 = _context3["catch"](3);
|
|
268
|
-
setLoading(false);
|
|
269
|
-
console.error(_context3.t0);
|
|
270
|
-
case 20:
|
|
271
|
-
case "end":
|
|
272
|
-
return _context3.stop();
|
|
273
|
-
}
|
|
274
|
-
}, _callee3, null, [[3, 16]]);
|
|
275
|
-
}));
|
|
276
|
-
return function getDataSource(_x3) {
|
|
277
|
-
return _ref4.apply(this, arguments);
|
|
278
|
-
};
|
|
279
|
-
}();
|
|
280
|
-
var initial = /*#__PURE__*/function () {
|
|
281
|
-
var _ref5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(params) {
|
|
282
|
-
var result, dims, targets, option;
|
|
283
|
-
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
284
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
285
|
-
case 0:
|
|
286
|
-
_context4.next = 2;
|
|
287
|
-
return getDimTargetData(rcProContext, _extends({
|
|
288
|
-
dataSetName: dataSetName
|
|
289
|
-
}, params), {
|
|
290
|
-
dimJson: dimJson,
|
|
291
|
-
indexJson: indexJson
|
|
292
|
-
});
|
|
293
|
-
case 2:
|
|
294
|
-
result = _context4.sent;
|
|
295
|
-
if (result) {
|
|
296
|
-
dims = result.dims, targets = result.targets;
|
|
297
|
-
option = {
|
|
298
|
-
dimension: dims === null || dims === void 0 ? void 0 : dims.dimension,
|
|
299
|
-
dimensionSource: dims === null || dims === void 0 ? void 0 : dims.dimensionSource,
|
|
300
|
-
index: targets === null || targets === void 0 ? void 0 : targets.index,
|
|
301
|
-
indexSource: targets === null || targets === void 0 ? void 0 : targets.indexSource
|
|
302
|
-
};
|
|
303
|
-
handleUpdateColumns(option);
|
|
304
|
-
setDimTargetValue(result);
|
|
305
|
-
setConfig(_extends({}, tableConfigDefault, {
|
|
306
|
-
pagination: {
|
|
307
|
-
showSizeChanger: true,
|
|
308
|
-
defaultPageSize: defaultPageSize
|
|
309
|
-
},
|
|
310
|
-
summary: summary,
|
|
311
|
-
request: function request(data) {
|
|
312
|
-
var _data$pagination, _data$pagination2, _data$sorter;
|
|
313
|
-
var pagination = {
|
|
314
|
-
pageNum: (_data$pagination = data.pagination) === null || _data$pagination === void 0 ? void 0 : _data$pagination.current,
|
|
315
|
-
pageSize: (_data$pagination2 = data.pagination) === null || _data$pagination2 === void 0 ? void 0 : _data$pagination2.pageSize
|
|
316
|
-
};
|
|
317
|
-
var orderBy = [];
|
|
318
|
-
if ((_data$sorter = data.sorter) !== null && _data$sorter !== void 0 && _data$sorter.order) {
|
|
319
|
-
var _data$sorter2, _data$sorter3, _data$sorter3$order;
|
|
320
|
-
orderBy.push({
|
|
321
|
-
name: (_data$sorter2 = data.sorter) === null || _data$sorter2 === void 0 ? void 0 : _data$sorter2.field,
|
|
322
|
-
sort: (_data$sorter3 = data.sorter) === null || _data$sorter3 === void 0 ? void 0 : (_data$sorter3$order = _data$sorter3.order) === null || _data$sorter3$order === void 0 ? void 0 : _data$sorter3$order.slice(0, -3)
|
|
323
|
-
});
|
|
324
|
-
}
|
|
325
|
-
return getDataSource(_extends({}, pagination, {
|
|
326
|
-
orderBy: orderBy
|
|
327
|
-
}));
|
|
328
|
-
}
|
|
329
|
-
}));
|
|
330
|
-
}
|
|
331
|
-
case 4:
|
|
332
|
-
case "end":
|
|
333
|
-
return _context4.stop();
|
|
334
|
-
}
|
|
335
|
-
}, _callee4);
|
|
336
|
-
}));
|
|
337
|
-
return function initial(_x4) {
|
|
338
|
-
return _ref5.apply(this, arguments);
|
|
339
|
-
};
|
|
340
|
-
}();
|
|
341
|
-
useEffect(function () {
|
|
342
|
-
if (dataSetName) {
|
|
343
|
-
initial();
|
|
344
|
-
}
|
|
345
|
-
}, [dataSetName, dimJson, indexJson]);
|
|
346
|
-
var handleClearInterval = function handleClearInterval() {
|
|
347
|
-
if (timer) {
|
|
348
|
-
clearInterval(timer);
|
|
349
|
-
timer = null;
|
|
350
|
-
}
|
|
351
|
-
};
|
|
352
|
-
useEffect(function () {
|
|
353
|
-
var _ref6 = (activeKey === null || activeKey === void 0 ? void 0 : activeKey.split(separator)) || [],
|
|
354
|
-
currentKey = _ref6[0];
|
|
355
|
-
if (currentKey === dataSetName) {
|
|
356
|
-
if (autoLoad) {
|
|
357
|
-
if (refreshRate) {
|
|
358
|
-
handleClearInterval();
|
|
359
|
-
timer = window.setInterval(function () {
|
|
360
|
-
return onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
|
|
361
|
-
}, refreshRate * timeUnit);
|
|
362
|
-
} else {
|
|
363
|
-
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
} else {
|
|
367
|
-
handleClearInterval();
|
|
368
|
-
}
|
|
369
|
-
return function () {
|
|
370
|
-
handleClearInterval();
|
|
371
|
-
};
|
|
372
|
-
}, [activeKey, autoLoad]);
|
|
373
|
-
var queryChart = /*#__PURE__*/function () {
|
|
374
|
-
var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(value) {
|
|
375
|
-
var _linkChartRef$current3;
|
|
376
|
-
return _regeneratorRuntime.wrap(function _callee6$(_context6) {
|
|
377
|
-
while (1) switch (_context6.prev = _context6.next) {
|
|
378
|
-
case 0:
|
|
379
|
-
if (isLink) {
|
|
380
|
-
(_linkChartRef$current3 = linkChartRef.current) === null || _linkChartRef$current3 === void 0 ? void 0 : _linkChartRef$current3.queryChart(value);
|
|
381
|
-
} else {
|
|
382
|
-
queryCacheRef.current = value[dataSetName] || value;
|
|
383
|
-
setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
|
384
|
-
var _tableRef$current2;
|
|
385
|
-
var _getDimTargetValues4, _getDimTargetValues4$, indexSource, indexAmounted, target, _iterator3, _step3, cur, _ref9, success, _ref9$result, result, _result$data, _result$data$, data;
|
|
386
|
-
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
387
|
-
while (1) switch (_context5.prev = _context5.next) {
|
|
388
|
-
case 0:
|
|
389
|
-
(_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : _tableRef$current2.refreshTable({
|
|
390
|
-
current: 1
|
|
391
|
-
});
|
|
392
|
-
_getDimTargetValues4 = getDimTargetValues(), _getDimTargetValues4$ = _getDimTargetValues4.indexSource, indexSource = _getDimTargetValues4$ === void 0 ? [] : _getDimTargetValues4$;
|
|
393
|
-
indexAmounted = indexSource === null || indexSource === void 0 ? void 0 : indexSource.filter(function (cur) {
|
|
394
|
-
return cur.amounted;
|
|
395
|
-
});
|
|
396
|
-
if (!(indexAmounted !== null && indexAmounted !== void 0 && indexAmounted.length)) {
|
|
397
|
-
_context5.next = 16;
|
|
398
|
-
break;
|
|
399
|
-
}
|
|
400
|
-
target = [];
|
|
401
|
-
for (_iterator3 = _createForOfIteratorHelperLoose(indexAmounted); !(_step3 = _iterator3()).done;) {
|
|
402
|
-
cur = _step3.value;
|
|
403
|
-
target.push({
|
|
404
|
-
description: cur.name
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
_context5.next = 8;
|
|
408
|
-
return getDataSource({
|
|
409
|
-
dim: [],
|
|
410
|
-
target: target
|
|
411
|
-
});
|
|
412
|
-
case 8:
|
|
413
|
-
_context5.t0 = _context5.sent;
|
|
414
|
-
if (_context5.t0) {
|
|
415
|
-
_context5.next = 11;
|
|
416
|
-
break;
|
|
417
|
-
}
|
|
418
|
-
_context5.t0 = {};
|
|
419
|
-
case 11:
|
|
420
|
-
_ref9 = _context5.t0;
|
|
421
|
-
success = _ref9.success;
|
|
422
|
-
_ref9$result = _ref9.result;
|
|
423
|
-
result = _ref9$result === void 0 ? {} : _ref9$result;
|
|
424
|
-
if (success) {
|
|
425
|
-
_result$data = result === null || result === void 0 ? void 0 : result.data, _result$data$ = _result$data[0], data = _result$data$ === void 0 ? {} : _result$data$;
|
|
426
|
-
amounted.current = data;
|
|
427
|
-
}
|
|
428
|
-
case 16:
|
|
429
|
-
case "end":
|
|
430
|
-
return _context5.stop();
|
|
431
|
-
}
|
|
432
|
-
}, _callee5);
|
|
433
|
-
})), 200);
|
|
434
|
-
}
|
|
435
|
-
case 1:
|
|
436
|
-
case "end":
|
|
437
|
-
return _context6.stop();
|
|
438
|
-
}
|
|
439
|
-
}, _callee6);
|
|
440
|
-
}));
|
|
441
|
-
return function queryChart(_x5) {
|
|
442
|
-
return _ref7.apply(this, arguments);
|
|
443
|
-
};
|
|
444
|
-
}();
|
|
445
|
-
useImperativeHandle(chartRef, function () {
|
|
446
|
-
return {
|
|
447
|
-
onLink: onLink,
|
|
448
|
-
queryChart: queryChart
|
|
449
|
-
};
|
|
450
|
-
});
|
|
451
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
452
|
-
style: {
|
|
453
|
-
display: !isLink ? 'block' : 'none'
|
|
454
|
-
}
|
|
455
|
-
}, /*#__PURE__*/React.createElement(DimTarget, {
|
|
456
|
-
dimTargetRef: dimTargetRef,
|
|
457
|
-
value: dimTargetValue,
|
|
458
|
-
remember: remember,
|
|
459
|
-
dataSetName: dataSetName,
|
|
460
|
-
buttons: buttons.filter(function (item) {
|
|
461
|
-
return item;
|
|
462
|
-
})
|
|
463
|
-
}), /*#__PURE__*/React.createElement(ProTable, {
|
|
464
|
-
ref: tableRef,
|
|
465
|
-
config: config
|
|
466
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
467
|
-
style: {
|
|
468
|
-
display: isLink ? 'block' : 'none'
|
|
469
|
-
}
|
|
470
|
-
}, /*#__PURE__*/React.createElement(LinkRenderer, {
|
|
471
|
-
chartRef: linkChartRef,
|
|
472
|
-
dimJson: dimJson,
|
|
473
|
-
linkPage: linkPage,
|
|
474
|
-
linkPageTitle: linkPageTitle,
|
|
475
|
-
onConfirm: onConfirm,
|
|
476
|
-
onBack: function onBack() {
|
|
477
|
-
setIsLink(false);
|
|
478
|
-
}
|
|
479
|
-
})));
|
|
480
|
-
};
|
|
481
|
-
export default TableRenderer;
|
package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { TypeChartSettingProps } from '../../data-common';
|
|
2
|
-
import type { linkParamsType } from '../link-renderer';
|
|
3
|
-
import type { DimTargetChangeOptionType } from '../dim-target/dim-target.helper';
|
|
4
|
-
import type { valueType } from '../../data-common.helper';
|
|
5
|
-
export declare const stringTrim: (str: string) => string;
|
|
6
|
-
/**
|
|
7
|
-
* 维度指标数据源处理
|
|
8
|
-
*/
|
|
9
|
-
export declare const handleDimTargetFormat: (dimTargetSource: Pick<TypeChartSettingProps, 'dimJson' | 'indexJson'>, result?: Record<string, any>) => {
|
|
10
|
-
rememberCheck: boolean;
|
|
11
|
-
dims: {
|
|
12
|
-
all: boolean;
|
|
13
|
-
title: string;
|
|
14
|
-
indeterminate: boolean;
|
|
15
|
-
dimension: any[];
|
|
16
|
-
dimensionSource: Omit<import("../../data-common").TypeTargetProps, "amounted" | "enName" | "isFilter">[];
|
|
17
|
-
};
|
|
18
|
-
targets: {
|
|
19
|
-
all: boolean;
|
|
20
|
-
title: string;
|
|
21
|
-
indeterminate: boolean;
|
|
22
|
-
index: any[];
|
|
23
|
-
indexSource: import("../../data-common").TypeTargetProps[];
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* 获取维度指标数据源
|
|
28
|
-
*/
|
|
29
|
-
export declare const getDimTargetData: (rcProContext: any, params: Record<string, any>, dimTargetSource: Pick<TypeChartSettingProps, 'dimJson' | 'indexJson'>) => Promise<{
|
|
30
|
-
rememberCheck: boolean;
|
|
31
|
-
dims: {
|
|
32
|
-
all: boolean;
|
|
33
|
-
title: string;
|
|
34
|
-
indeterminate: boolean;
|
|
35
|
-
dimension: any[];
|
|
36
|
-
dimensionSource: Omit<import("../../data-common").TypeTargetProps, "amounted" | "enName" | "isFilter">[];
|
|
37
|
-
};
|
|
38
|
-
targets: {
|
|
39
|
-
all: boolean;
|
|
40
|
-
title: string;
|
|
41
|
-
indeterminate: boolean;
|
|
42
|
-
index: any[];
|
|
43
|
-
indexSource: import("../../data-common").TypeTargetProps[];
|
|
44
|
-
};
|
|
45
|
-
}>;
|
|
46
|
-
/**
|
|
47
|
-
* 数据渲染格式处理
|
|
48
|
-
*/
|
|
49
|
-
export declare const handleValueFormat: (value: valueType, record: Record<string, any>, find?: Record<string, any>, condition?: any[], onLink?: () => void) => any;
|
|
50
|
-
/**
|
|
51
|
-
* 条件格式
|
|
52
|
-
*/
|
|
53
|
-
export type ExpressionsType = any[] | [];
|
|
54
|
-
/**
|
|
55
|
-
* 根据维度指标获取表格列
|
|
56
|
-
*/
|
|
57
|
-
export declare const handleColumns: (option: DimTargetChangeOptionType, expressions?: ExpressionsType, onLink?: (v: linkParamsType) => void) => {
|
|
58
|
-
title: import("antd/es/checkbox/Group").CheckboxValueType;
|
|
59
|
-
dataIndex: string;
|
|
60
|
-
ellipsis: boolean;
|
|
61
|
-
sorter: any;
|
|
62
|
-
width: any;
|
|
63
|
-
render: (value: valueType, record: Record<string, any>) => any;
|
|
64
|
-
}[];
|