@ztocwst/rc-pro-materials 0.1.29 → 0.1.31

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.
Files changed (56) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +5 -5
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +8 -8
  11. package/dist/SCM_Comps.css +1 -1
  12. package/dist/SCM_Comps.js +8 -8
  13. package/dist/SCM_Comps.js.map +1 -1
  14. package/es/components/z-operation-records/index.d.ts +3 -0
  15. package/es/components/z-operation-records/index.js +2 -0
  16. package/es/components/z-operation-records/operationRecords.d.ts +4 -0
  17. package/es/components/z-operation-records/operationRecords.js +9 -0
  18. package/es/components/z-preview/preview.js +1 -1
  19. package/es/components/z-templates-data-common/components/custom-renderer/index.js +2 -0
  20. package/es/components/z-templates-data-common/components/link-renderer/index.d.ts +1 -1
  21. package/es/components/z-templates-data-common/components/link-renderer/index.js +12 -12
  22. package/es/components/z-templates-data-common/components/table-renderer/index.js +2 -0
  23. package/es/components/z-templates-data-common/data-common.d.ts +1 -0
  24. package/es/components/z-templates-data-common/data-common.helper.js +3 -3
  25. package/es/index.d.ts +1 -0
  26. package/es/index.js +2 -0
  27. package/es/utils/index.d.ts +2 -1
  28. package/es/utils/index.js +2 -1
  29. package/es/utils/props/form.js +12 -4
  30. package/es/utils/props/operationRecords.d.ts +2 -0
  31. package/es/utils/props/operationRecords.js +37 -0
  32. package/es/utils/props/preview.js +7 -4
  33. package/es/utils/props/tpl.d.ts +4 -4
  34. package/es/utils/props/tpl.js +15 -6
  35. package/lib/components/z-operation-records/index.d.ts +3 -0
  36. package/lib/components/z-operation-records/index.js +8 -0
  37. package/lib/components/z-operation-records/operationRecords.d.ts +4 -0
  38. package/lib/components/z-operation-records/operationRecords.js +16 -0
  39. package/lib/components/z-preview/preview.js +1 -1
  40. package/lib/components/z-templates-data-common/components/custom-renderer/index.js +2 -0
  41. package/lib/components/z-templates-data-common/components/link-renderer/index.d.ts +1 -1
  42. package/lib/components/z-templates-data-common/components/link-renderer/index.js +12 -12
  43. package/lib/components/z-templates-data-common/components/table-renderer/index.js +2 -0
  44. package/lib/components/z-templates-data-common/data-common.d.ts +1 -0
  45. package/lib/components/z-templates-data-common/data-common.helper.js +3 -3
  46. package/lib/index.d.ts +1 -0
  47. package/lib/index.js +3 -1
  48. package/lib/utils/index.d.ts +2 -1
  49. package/lib/utils/index.js +2 -0
  50. package/lib/utils/props/form.js +12 -4
  51. package/lib/utils/props/operationRecords.d.ts +2 -0
  52. package/lib/utils/props/operationRecords.js +40 -0
  53. package/lib/utils/props/preview.js +7 -4
  54. package/lib/utils/props/tpl.d.ts +4 -4
  55. package/lib/utils/props/tpl.js +15 -6
  56. package/package.json +4 -4
@@ -0,0 +1,3 @@
1
+ import ZOperationRecords from './operationRecords';
2
+ export type { ProLogProps } from '@ztocwst/rc-pro';
3
+ export default ZOperationRecords;
@@ -0,0 +1,2 @@
1
+ import ZOperationRecords from "./operationRecords";
2
+ export default ZOperationRecords;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { ProOperationRecordsProps } from '@ztocwst/rc-pro';
3
+ declare const ZOperationRecords: React.FC<ProOperationRecordsProps>;
4
+ export default ZOperationRecords;
@@ -0,0 +1,9 @@
1
+ import * as React from 'react';
2
+ import { ProLog } from '@ztocwst/rc-pro';
3
+ import { processOperationRecordsProps } from "../../utils";
4
+ var ZOperationRecords = function ZOperationRecords(props) {
5
+ var operationProps = processOperationRecordsProps(props);
6
+ console.log('ZOperationRecords', operationProps, 1);
7
+ return /*#__PURE__*/React.createElement(ProLog, operationProps);
8
+ };
9
+ export default ZOperationRecords;
@@ -5,7 +5,7 @@ import { ProPreview } from '@ztocwst/rc-pro';
5
5
  import { processPreviewProps } from "../../utils";
6
6
  var ZPreview = function ZPreview(props) {
7
7
  var previewProps = processPreviewProps(props);
8
- console.log(props, 22, previewProps);
8
+ console.log('previewProps', previewProps);
9
9
  return /*#__PURE__*/React.createElement(ProPreview, previewProps);
10
10
  };
11
11
  export default ZPreview;
@@ -18,6 +18,7 @@ var CustomRenderer = function CustomRenderer(props) {
18
18
  dimJson = _ref.dimJson,
19
19
  indexJson = _ref.indexJson,
20
20
  linkPage = _ref.linkPage,
21
+ linkPageTitle = _ref.linkPageTitle,
21
22
  onConfirm = _ref.onConfirm,
22
23
  formatter = _ref.formatter;
23
24
  var rcProContext = useContext(RcConfigContext);
@@ -152,6 +153,7 @@ var CustomRenderer = function CustomRenderer(props) {
152
153
  chartRef: linkChartRef,
153
154
  dimJson: dimJson,
154
155
  linkPage: linkPage,
156
+ linkPageTitle: linkPageTitle,
155
157
  onConfirm: onConfirm,
156
158
  onBack: function onBack() {
157
159
  setIsLink(false);
@@ -10,7 +10,7 @@ export interface linkParamsType extends Pick<TypeChartSettingProps, 'dataSetName
10
10
  }
11
11
  export interface linkStateType extends linkParamsType, Pick<TypeChartSettingProps, 'title' | 'autoLoad' | 'refreshRate'> {
12
12
  }
13
- declare const LinkRenderer: (props: Pick<TypeChartSettingProps, "onConfirm" | "formatter" | "chartRef" | "dimJson" | "linkPage"> & {
13
+ declare const LinkRenderer: (props: Pick<TypeChartSettingProps, "onConfirm" | "chartRef" | "dimJson" | "linkPage" | "linkPageTitle"> & {
14
14
  onBack?: () => void;
15
15
  }) => import("react").JSX.Element;
16
16
  export default LinkRenderer;
@@ -17,9 +17,9 @@ var LinkRenderer = function LinkRenderer(props) {
17
17
  var _tableOptions$paginat, _linkPage$filter;
18
18
  var dimJson = props.dimJson,
19
19
  linkPage = props.linkPage,
20
+ linkPageTitle = props.linkPageTitle,
20
21
  chartRef = props.chartRef,
21
22
  onConfirm = props.onConfirm,
22
- formatter = props.formatter,
23
23
  onBack = props.onBack;
24
24
  var rcProContext = useContext(RcConfigContext);
25
25
  var _ref = rcProContext || {},
@@ -85,7 +85,7 @@ var LinkRenderer = function LinkRenderer(props) {
85
85
  var getDataSource = /*#__PURE__*/function () {
86
86
  var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
87
87
  var _dimJson$data;
88
- var dataSetName, index, dimension, record, columns, queryBind, queryCache, query, queryKeys, recordKeys, dim, queryParams, data, queryData;
88
+ var dataSetName, index, dimension, record, columns, _linkPage$index, queryBind, formatter, queryCache, query, queryKeys, recordKeys, dim, queryParams, data, queryData;
89
89
  return _regeneratorRuntime.wrap(function _callee$(_context) {
90
90
  while (1) switch (_context.prev = _context.next) {
91
91
  case 0:
@@ -95,7 +95,7 @@ var LinkRenderer = function LinkRenderer(props) {
95
95
  dataSetName = linkState.dataSetName, index = linkState.index, dimension = linkState.dimension, record = linkState.record;
96
96
  columns = handleGetColumns(_extends({}, linkState));
97
97
  /** 查看queryBind是否有 当前查询条件和当前数据源参数(paraJson)建立绑定关系;有的话替换成绑定关系中的"键",没有则是默认查询配置的"键",上一级数据源的维度 "值" 或 当前查询条件的"值"入参 */
98
- queryBind = linkPage[index].queryBind;
98
+ _linkPage$index = linkPage[index], queryBind = _linkPage$index.queryBind, formatter = _linkPage$index.formatter;
99
99
  queryCache = queryCacheRef.current;
100
100
  query = {};
101
101
  queryKeys = Object.keys(queryCache);
@@ -207,10 +207,10 @@ var LinkRenderer = function LinkRenderer(props) {
207
207
  }
208
208
  }
209
209
  }
210
- var _linkPage$index = linkPage[index],
211
- title = _linkPage$index.title,
212
- autoLoad = _linkPage$index.autoLoad,
213
- refreshRate = _linkPage$index.refreshRate;
210
+ var _linkPage$index2 = linkPage[index],
211
+ title = _linkPage$index2.title,
212
+ autoLoad = _linkPage$index2.autoLoad,
213
+ refreshRate = _linkPage$index2.refreshRate;
214
214
  var stateData = _extends({}, state, {
215
215
  width: width,
216
216
  index: index,
@@ -249,10 +249,10 @@ var LinkRenderer = function LinkRenderer(props) {
249
249
  var _ref6 = (value === null || value === void 0 ? void 0 : value.split(separator)) || [],
250
250
  dataSetName = _ref6[0],
251
251
  index = _ref6[1];
252
- var _linkPage$index2 = linkPage[index],
253
- title = _linkPage$index2.title,
254
- autoLoad = _linkPage$index2.autoLoad,
255
- refreshRate = _linkPage$index2.refreshRate;
252
+ var _linkPage$index3 = linkPage[index],
253
+ title = _linkPage$index3.title,
254
+ autoLoad = _linkPage$index3.autoLoad,
255
+ refreshRate = _linkPage$index3.refreshRate;
256
256
  var stateData = _extends({}, linkState, {
257
257
  dataSetName: dataSetName,
258
258
  index: index,
@@ -270,7 +270,7 @@ var LinkRenderer = function LinkRenderer(props) {
270
270
  }, /*#__PURE__*/React.createElement(ArrowLeftOutlined, {
271
271
  className: "arrow-left",
272
272
  onClick: onBack
273
- }), /*#__PURE__*/React.createElement("span", null, linkState === null || linkState === void 0 ? void 0 : linkState.title)), (linkPage === null || linkPage === void 0 ? void 0 : (_linkPage$filter = linkPage.filter(function (field) {
273
+ }), /*#__PURE__*/React.createElement("span", null, linkPageTitle)), (linkPage === null || linkPage === void 0 ? void 0 : (_linkPage$filter = linkPage.filter(function (field) {
274
274
  return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName;
275
275
  })) === null || _linkPage$filter === void 0 ? void 0 : _linkPage$filter.length) <= 1 ? null : /*#__PURE__*/React.createElement(_Radio.Group, {
276
276
  value: "" + (linkState === null || linkState === void 0 ? void 0 : linkState.title) + separator + linkState.index,
@@ -23,6 +23,7 @@ var TableRenderer = function TableRenderer(props) {
23
23
  dimJson = props.dimJson,
24
24
  indexJson = props.indexJson,
25
25
  expressions = props.expressions,
26
+ linkPageTitle = props.linkPageTitle,
26
27
  linkPage = props.linkPage,
27
28
  queryBind = props.queryBind,
28
29
  chartRef = props.chartRef,
@@ -470,6 +471,7 @@ var TableRenderer = function TableRenderer(props) {
470
471
  chartRef: linkChartRef,
471
472
  dimJson: dimJson,
472
473
  linkPage: linkPage,
474
+ linkPageTitle: linkPageTitle,
473
475
  onConfirm: onConfirm,
474
476
  onBack: function onBack() {
475
477
  setIsLink(false);
@@ -67,6 +67,7 @@ export interface TypeChartSettingProps {
67
67
  };
68
68
  /** 条件格式设置 */
69
69
  expressions?: any[] | [];
70
+ linkPageTitle?: string;
70
71
  /** 下钻二级页设置 */
71
72
  linkPage?: TypeChartSettingProps[];
72
73
  /** 数据源参数"键"" 和 查询参数"值" 和 上一级维度(dim)"值" 关系绑定 */
@@ -157,16 +157,16 @@ export var handleCondition = function handleCondition(value, handledValue, condi
157
157
  };
158
158
 
159
159
  // mock
160
- var token = 'scm:tenant:token:2:104:33A6E5D6F29E319C975B503D2B2E0E7B';
160
+ var token = 'scm:tenant:token:2:104:177217352666D386AA01E5AF6293727D';
161
161
 
162
162
  /** 获取维度指标 */
163
163
  export var getDimTarget = /*#__PURE__*/function () {
164
164
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(rcProContext, params) {
165
- var _ref2, materialsRequest, env, token, res, _res;
165
+ var _ref2, materialsRequest, env, res, _res;
166
166
  return _regeneratorRuntime.wrap(function _callee$(_context) {
167
167
  while (1) switch (_context.prev = _context.next) {
168
168
  case 0:
169
- _ref2 = rcProContext || {}, materialsRequest = _ref2.materialsRequest, env = _ref2.env, token = _ref2.token; // 供应链里由子应用透传
169
+ _ref2 = rcProContext || {}, materialsRequest = _ref2.materialsRequest, env = _ref2.env; // 供应链里由子应用透传
170
170
  if (!materialsRequest) {
171
171
  _context.next = 6;
172
172
  break;
package/es/index.d.ts CHANGED
@@ -29,6 +29,7 @@ export { default as ZAuth } from './components/z-auth';
29
29
  export type { TypeAuthProps } from './components/z-auth';
30
30
  export { default as ZProProvider } from './components/z-pro-provider';
31
31
  export type { TypeZProProviderProps } from './components/z-pro-provider';
32
+ export { default as ZOperationRecords } from './components/z-operation-records';
32
33
  export { default as ZPointerBlock } from './components/z-pointer-block';
33
34
  export type { TypeZPointerBlockProps } from './components/z-pointer-block';
34
35
  export { default as ZAggBlock } from './components/z-agg-block';
package/es/index.js CHANGED
@@ -16,6 +16,8 @@ export { default as ZSingleFactory } from "./components/z-singleFactory";
16
16
  export { default as ZRcEditTable } from "./components/z-editTable";
17
17
  export { default as ZAuth } from "./components/z-auth";
18
18
  export { default as ZProProvider } from "./components/z-pro-provider";
19
+ export { default as ZOperationRecords } from "./components/z-operation-records";
20
+
19
21
  // 普通指标块
20
22
  export { default as ZPointerBlock } from "./components/z-pointer-block";
21
23
  // 聚合指标
@@ -8,5 +8,6 @@ import { processWarehouseAndFactoryProps } from './props/warehouseAndFactory';
8
8
  import { processEditTableProps } from './props/editTable';
9
9
  import { processPreviewProps } from './props/preview';
10
10
  import { processModalSelectProps, processModalSelectTablePropsColumns } from './props/modalSelect';
11
+ import { processOperationRecordsProps } from './props/operationRecords';
11
12
  declare const processJsonOrFunctionProps: (props: any) => any;
12
- export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns };
13
+ export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns, processOperationRecordsProps };
package/es/utils/index.js CHANGED
@@ -8,7 +8,8 @@ import { processWarehouseAndFactoryProps } from "./props/warehouseAndFactory";
8
8
  import { processEditTableProps } from "./props/editTable";
9
9
  import { processPreviewProps } from "./props/preview";
10
10
  import { processModalSelectProps, processModalSelectTablePropsColumns } from "./props/modalSelect";
11
+ import { processOperationRecordsProps } from "./props/operationRecords";
11
12
  var processJsonOrFunctionProps = function processJsonOrFunctionProps(props) {
12
13
  return typeof props === 'function' ? props === null || props === void 0 ? void 0 : props() : props;
13
14
  };
14
- export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns };
15
+ export { processTplProps, processJsonOrFunctionProps, processFormProps, processListTplProps, processButtonProps, processMicroSwitchProps, processMicroModalProps, processPreviewProps, processWarehouseAndFactoryProps, processEditTableProps, processModalSelectProps, processModalSelectTablePropsColumns, processOperationRecordsProps };
@@ -1,11 +1,11 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["fieldProps", "formItemProps", "dependencyColumns", "required", "initialValue", "propName"],
3
+ var _excluded = ["fieldProps", "formItemProps", "dependencyColumns", "required", "initialValue"],
4
4
  _excluded2 = ["restFieldProps", "renderItemSlot"],
5
5
  _excluded3 = ["restFormProps"],
6
6
  _excluded4 = ["fieldProps"],
7
7
  _excluded5 = ["requestOptions"],
8
- _excluded6 = ["columns"];
8
+ _excluded6 = ["columns", "switchGroup"];
9
9
  /**
10
10
  * 处理表单默认值
11
11
  */
@@ -17,6 +17,12 @@ import { processJsonOrFunctionProps } from "../../../lib";
17
17
  var requestOptionsCheck = function requestOptionsCheck(func, data) {
18
18
  return typeof func === 'function' ? func(data) : true;
19
19
  };
20
+ var hasName = function hasName(name) {
21
+ if (Array.isArray(name)) {
22
+ return (name === null || name === void 0 ? void 0 : name.length) > 0;
23
+ }
24
+ return !!name;
25
+ };
20
26
  var processInitialValue = function processInitialValue(e) {
21
27
  var _restFieldArgs$style;
22
28
  var fieldProps = e.fieldProps,
@@ -24,7 +30,6 @@ var processInitialValue = function processInitialValue(e) {
24
30
  dependencyColumns = e.dependencyColumns,
25
31
  required = e.required,
26
32
  initialValue = e.initialValue,
27
- propName = e.propName,
28
33
  rest = _objectWithoutPropertiesLoose(e, _excluded);
29
34
  var _ref = fieldProps !== null && fieldProps !== void 0 ? fieldProps : {},
30
35
  _ref$restFieldProps = _ref.restFieldProps,
@@ -135,8 +140,11 @@ export var processFormProps = function processFormProps(props) {
135
140
  if (e.valueType === 'group') {
136
141
  var _ref4, _ref4$filter;
137
142
  var groupColumns = e.columns,
143
+ switchGroup = e.switchGroup,
138
144
  groupRest = _objectWithoutPropertiesLoose(e, _excluded6);
139
- return _extends({}, groupRest, {
145
+ return _extends({}, groupRest, hasName(switchGroup === null || switchGroup === void 0 ? void 0 : switchGroup.name) ? {
146
+ switchGroup: switchGroup
147
+ } : {}, {
140
148
  columns: (_ref4 = groupColumns || []) === null || _ref4 === void 0 ? void 0 : (_ref4$filter = _ref4.filter(function (child) {
141
149
  return !!child;
142
150
  })) === null || _ref4$filter === void 0 ? void 0 : _ref4$filter.map(function (child) {
@@ -0,0 +1,2 @@
1
+ import { ProOperationRecordsProps } from '@ztocwst/rc-pro';
2
+ export declare const processOperationRecordsProps: (props: ProOperationRecordsProps) => any;
@@ -0,0 +1,37 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
+ var _excluded = ["timelineProps", "request", "columns", "transform", "timeItemProps", "valueEnum"];
4
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
+
6
+ import { processJsonOrFunctionProps } from "../../../lib";
7
+
8
+ // preview 处理
9
+ var processOperationProps = function processOperationProps(props) {
10
+ var processObjectValue = function processObjectValue(obj) {
11
+ var timelineProps = obj.timelineProps,
12
+ request = obj.request,
13
+ columns = obj.columns,
14
+ transform = obj.transform,
15
+ timeItemProps = obj.timeItemProps,
16
+ valueEnum = obj.valueEnum,
17
+ rest = _objectWithoutPropertiesLoose(obj, _excluded);
18
+ return _extends({}, columns !== null && columns !== void 0 && columns.length ? {
19
+ columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
20
+ return processObjectValue(v);
21
+ })
22
+ } : [], transform ? {
23
+ transform: transform
24
+ } : {}, timelineProps ? processJsonOrFunctionProps(timelineProps) : {}, timeItemProps ? processJsonOrFunctionProps(timeItemProps) : {}, valueEnum ? {
25
+ valueEnum: valueEnum
26
+ } : {}, rest);
27
+ };
28
+ if (Array.isArray(props)) {
29
+ return props === null || props === void 0 ? void 0 : props.map(function (e) {
30
+ return processObjectValue(e);
31
+ });
32
+ }
33
+ return processObjectValue(props);
34
+ };
35
+ export var processOperationRecordsProps = function processOperationRecordsProps(props) {
36
+ return processOperationProps(props);
37
+ };
@@ -1,18 +1,22 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
- var _excluded = ["render", "request", "columns", "transform", "valueEnum"];
3
+ var _excluded = ["render", "request", "columns", "transform", "valueEnum", "proLogs"];
4
4
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
5
5
 
6
6
  // preview 处理
7
7
  var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
8
8
  var processObjectValue = function processObjectValue(obj) {
9
+ var _proLogs$columns;
9
10
  var render = obj.render,
10
11
  request = obj.request,
11
12
  columns = obj.columns,
12
13
  transform = obj.transform,
13
14
  valueEnum = obj.valueEnum,
15
+ proLogs = obj.proLogs,
14
16
  rest = _objectWithoutPropertiesLoose(obj, _excluded);
15
- return _extends({}, render ? {
17
+ return _extends({}, proLogs !== null && proLogs !== void 0 && (_proLogs$columns = proLogs.columns) !== null && _proLogs$columns !== void 0 && _proLogs$columns.length ? {
18
+ proLogs: proLogs
19
+ } : {}, render ? {
16
20
  render: render
17
21
  } : {}, columns !== null && columns !== void 0 && columns.length ? {
18
22
  columns: columns === null || columns === void 0 ? void 0 : columns.map(function (v) {
@@ -32,6 +36,5 @@ var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
32
36
  return processObjectValue(props);
33
37
  };
34
38
  export var processPreviewProps = function processPreviewProps(props) {
35
- //
36
- return _extends({}, processTplBillPreviewProps(props));
39
+ return processTplBillPreviewProps(props);
37
40
  };
@@ -22,7 +22,7 @@ export declare const processTplBillProps: (props: RcPageItem['bill'], extra?: {
22
22
  key?: string;
23
23
  width?: string | number;
24
24
  name?: any;
25
- layoutType?: "page" | "modal" | "drawer";
25
+ layoutType?: "page" | "drawer" | "modal";
26
26
  onCustomBack?: () => void;
27
27
  onBackSuccess?: (data?: any) => void;
28
28
  isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
@@ -47,7 +47,7 @@ export declare const processTplBillProps: (props: RcPageItem['bill'], extra?: {
47
47
  key?: string;
48
48
  width?: string | number;
49
49
  name?: any;
50
- layoutType?: "page" | "modal" | "drawer";
50
+ layoutType?: "page" | "drawer" | "modal";
51
51
  onCustomBack?: () => void;
52
52
  onBackSuccess?: (data?: any) => void;
53
53
  isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
@@ -87,7 +87,7 @@ export declare const processTplProps: (props: RcPageProps, extra?: {
87
87
  key?: string;
88
88
  width?: string | number;
89
89
  name?: any;
90
- layoutType?: "page" | "modal" | "drawer";
90
+ layoutType?: "page" | "drawer" | "modal";
91
91
  onCustomBack?: () => void;
92
92
  onBackSuccess?: (data?: any) => void;
93
93
  isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
@@ -112,7 +112,7 @@ export declare const processTplProps: (props: RcPageProps, extra?: {
112
112
  key?: string;
113
113
  width?: string | number;
114
114
  name?: any;
115
- layoutType?: "page" | "modal" | "drawer";
115
+ layoutType?: "page" | "drawer" | "modal";
116
116
  onCustomBack?: () => void;
117
117
  onBackSuccess?: (data?: any) => void;
118
118
  isValidatorCancelTouched?: boolean | import("antd").ModalFuncProps;
@@ -1,9 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
3
3
  var _excluded = ["on", "antdPageHeaderProps", "antdRadioGroupProps"],
4
- _excluded2 = ["layoutProps", "antdPageHeaderProps", "requestConfig"],
5
- _excluded3 = ["props", "requestConfig"],
6
- _excluded4 = ["page"];
4
+ _excluded2 = ["layoutProps", "antdPageHeaderProps", "requestConfig", "props"],
5
+ _excluded3 = ["proLogs"],
6
+ _excluded4 = ["props", "requestConfig"],
7
+ _excluded5 = ["page"];
7
8
  import { processListTplProps } from "./listTpl";
8
9
  import { processFormProps } from "./form";
9
10
  import { processJsonOrFunctionProps } from "../../../lib";
@@ -32,18 +33,26 @@ var processTplBillPreviewTabsProps = function processTplBillPreviewTabsProps(pro
32
33
  // preview 处理
33
34
  var processTplBillPreviewProps = function processTplBillPreviewProps(props) {
34
35
  var processObjectValue = function processObjectValue(obj) {
36
+ var _proLogs$columns;
35
37
  // preview props 需要处理
36
38
  var layoutProps = obj.layoutProps,
37
39
  antdPageHeaderProps = obj.antdPageHeaderProps,
38
40
  requestConfig = obj.requestConfig,
41
+ objProps = obj.props,
39
42
  rest = _objectWithoutPropertiesLoose(obj, _excluded2);
43
+ var proLogs = objProps.proLogs,
44
+ objRest = _objectWithoutPropertiesLoose(objProps, _excluded3);
40
45
  return _extends({}, layoutProps ? {
41
46
  layoutProps: processJsonOrFunctionProps(layoutProps)
42
47
  } : {}, antdPageHeaderProps ? {
43
48
  antdPageHeaderProps: processJsonOrFunctionProps(antdPageHeaderProps)
44
49
  } : {}, requestConfig ? {
45
50
  requestConfig: processRequestConfig(requestConfig)
46
- } : {}, rest);
51
+ } : {}, {
52
+ props: _extends({}, objRest, proLogs !== null && proLogs !== void 0 && (_proLogs$columns = proLogs.columns) !== null && _proLogs$columns !== void 0 && _proLogs$columns.length ? {
53
+ proLogs: proLogs
54
+ } : {})
55
+ }, rest);
47
56
  };
48
57
  if (Array.isArray(props)) {
49
58
  return props === null || props === void 0 ? void 0 : props.map(function (e) {
@@ -62,7 +71,7 @@ export var processTplBillProps = function processTplBillProps(props, extra) {
62
71
  var _form$props = form.props,
63
72
  formProps = _form$props === void 0 ? {} : _form$props,
64
73
  requestConfig = form.requestConfig,
65
- formRest = _objectWithoutPropertiesLoose(form, _excluded3);
74
+ formRest = _objectWithoutPropertiesLoose(form, _excluded4);
66
75
  return _extends({}, form ? {
67
76
  form: _extends({}, formRest, {
68
77
  requestConfig: _extends({}, requestConfig !== null && requestConfig !== void 0 && requestConfig.add ? {
@@ -90,7 +99,7 @@ export var processTplProps = function processTplProps(props, extra) {
90
99
  var _page$list;
91
100
  var _ref2 = props !== null && props !== void 0 ? props : {},
92
101
  page = _ref2.page,
93
- rest = _objectWithoutPropertiesLoose(_ref2, _excluded4);
102
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded5);
94
103
  var listFormRef = extra.listFormRef,
95
104
  billFormRef = extra.billFormRef,
96
105
  listRef = extra.listRef,
@@ -0,0 +1,3 @@
1
+ import ZOperationRecords from './operationRecords';
2
+ export type { ProLogProps } from '@ztocwst/rc-pro';
3
+ export default ZOperationRecords;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ exports.__esModule = true;
5
+ exports["default"] = void 0;
6
+ var _operationRecords = _interopRequireDefault(require("./operationRecords"));
7
+ var _default = _operationRecords["default"];
8
+ exports["default"] = _default;
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import type { ProOperationRecordsProps } from '@ztocwst/rc-pro';
3
+ declare const ZOperationRecords: React.FC<ProOperationRecordsProps>;
4
+ export default ZOperationRecords;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports["default"] = void 0;
5
+ var React = _interopRequireWildcard(require("react"));
6
+ var _rcPro = require("@ztocwst/rc-pro");
7
+ var _utils = require("../../utils");
8
+ 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); }
9
+ 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; }
10
+ var ZOperationRecords = function ZOperationRecords(props) {
11
+ var operationProps = (0, _utils.processOperationRecordsProps)(props);
12
+ console.log('ZOperationRecords', operationProps, 1);
13
+ return /*#__PURE__*/React.createElement(_rcPro.ProLog, operationProps);
14
+ };
15
+ var _default = ZOperationRecords;
16
+ exports["default"] = _default;
@@ -11,7 +11,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
11
11
 
12
12
  var ZPreview = function ZPreview(props) {
13
13
  var previewProps = (0, _utils.processPreviewProps)(props);
14
- console.log(props, 22, previewProps);
14
+ console.log('previewProps', previewProps);
15
15
  return /*#__PURE__*/React.createElement(_rcPro.ProPreview, previewProps);
16
16
  };
17
17
  var _default = ZPreview;
@@ -23,6 +23,7 @@ var CustomRenderer = function CustomRenderer(props) {
23
23
  dimJson = _ref.dimJson,
24
24
  indexJson = _ref.indexJson,
25
25
  linkPage = _ref.linkPage,
26
+ linkPageTitle = _ref.linkPageTitle,
26
27
  onConfirm = _ref.onConfirm,
27
28
  formatter = _ref.formatter;
28
29
  var rcProContext = (0, _react.useContext)(_rcPro.RcConfigContext);
@@ -157,6 +158,7 @@ var CustomRenderer = function CustomRenderer(props) {
157
158
  chartRef: linkChartRef,
158
159
  dimJson: dimJson,
159
160
  linkPage: linkPage,
161
+ linkPageTitle: linkPageTitle,
160
162
  onConfirm: onConfirm,
161
163
  onBack: function onBack() {
162
164
  setIsLink(false);
@@ -10,7 +10,7 @@ export interface linkParamsType extends Pick<TypeChartSettingProps, 'dataSetName
10
10
  }
11
11
  export interface linkStateType extends linkParamsType, Pick<TypeChartSettingProps, 'title' | 'autoLoad' | 'refreshRate'> {
12
12
  }
13
- declare const LinkRenderer: (props: Pick<TypeChartSettingProps, "onConfirm" | "formatter" | "chartRef" | "dimJson" | "linkPage"> & {
13
+ declare const LinkRenderer: (props: Pick<TypeChartSettingProps, "onConfirm" | "chartRef" | "dimJson" | "linkPage" | "linkPageTitle"> & {
14
14
  onBack?: () => void;
15
15
  }) => import("react").JSX.Element;
16
16
  export default LinkRenderer;
@@ -22,9 +22,9 @@ var LinkRenderer = function LinkRenderer(props) {
22
22
  var _tableOptions$paginat, _linkPage$filter;
23
23
  var dimJson = props.dimJson,
24
24
  linkPage = props.linkPage,
25
+ linkPageTitle = props.linkPageTitle,
25
26
  chartRef = props.chartRef,
26
27
  onConfirm = props.onConfirm,
27
- formatter = props.formatter,
28
28
  onBack = props.onBack;
29
29
  var rcProContext = (0, _react.useContext)(_rcPro.RcConfigContext);
30
30
  var _ref = rcProContext || {},
@@ -90,7 +90,7 @@ var LinkRenderer = function LinkRenderer(props) {
90
90
  var getDataSource = /*#__PURE__*/function () {
91
91
  var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(params) {
92
92
  var _dimJson$data;
93
- var dataSetName, index, dimension, record, columns, queryBind, queryCache, query, queryKeys, recordKeys, dim, queryParams, data, queryData;
93
+ var dataSetName, index, dimension, record, columns, _linkPage$index, queryBind, formatter, queryCache, query, queryKeys, recordKeys, dim, queryParams, data, queryData;
94
94
  return _regenerator["default"].wrap(function _callee$(_context) {
95
95
  while (1) switch (_context.prev = _context.next) {
96
96
  case 0:
@@ -100,7 +100,7 @@ var LinkRenderer = function LinkRenderer(props) {
100
100
  dataSetName = linkState.dataSetName, index = linkState.index, dimension = linkState.dimension, record = linkState.record;
101
101
  columns = handleGetColumns((0, _extends2["default"])({}, linkState));
102
102
  /** 查看queryBind是否有 当前查询条件和当前数据源参数(paraJson)建立绑定关系;有的话替换成绑定关系中的"键",没有则是默认查询配置的"键",上一级数据源的维度 "值" 或 当前查询条件的"值"入参 */
103
- queryBind = linkPage[index].queryBind;
103
+ _linkPage$index = linkPage[index], queryBind = _linkPage$index.queryBind, formatter = _linkPage$index.formatter;
104
104
  queryCache = queryCacheRef.current;
105
105
  query = {};
106
106
  queryKeys = Object.keys(queryCache);
@@ -212,10 +212,10 @@ var LinkRenderer = function LinkRenderer(props) {
212
212
  }
213
213
  }
214
214
  }
215
- var _linkPage$index = linkPage[index],
216
- title = _linkPage$index.title,
217
- autoLoad = _linkPage$index.autoLoad,
218
- refreshRate = _linkPage$index.refreshRate;
215
+ var _linkPage$index2 = linkPage[index],
216
+ title = _linkPage$index2.title,
217
+ autoLoad = _linkPage$index2.autoLoad,
218
+ refreshRate = _linkPage$index2.refreshRate;
219
219
  var stateData = (0, _extends2["default"])({}, state, {
220
220
  width: width,
221
221
  index: index,
@@ -254,10 +254,10 @@ var LinkRenderer = function LinkRenderer(props) {
254
254
  var _ref6 = (value === null || value === void 0 ? void 0 : value.split(_dataCommon.separator)) || [],
255
255
  dataSetName = _ref6[0],
256
256
  index = _ref6[1];
257
- var _linkPage$index2 = linkPage[index],
258
- title = _linkPage$index2.title,
259
- autoLoad = _linkPage$index2.autoLoad,
260
- refreshRate = _linkPage$index2.refreshRate;
257
+ var _linkPage$index3 = linkPage[index],
258
+ title = _linkPage$index3.title,
259
+ autoLoad = _linkPage$index3.autoLoad,
260
+ refreshRate = _linkPage$index3.refreshRate;
261
261
  var stateData = (0, _extends2["default"])({}, linkState, {
262
262
  dataSetName: dataSetName,
263
263
  index: index,
@@ -275,7 +275,7 @@ var LinkRenderer = function LinkRenderer(props) {
275
275
  }, /*#__PURE__*/React.createElement(_icons.ArrowLeftOutlined, {
276
276
  className: "arrow-left",
277
277
  onClick: onBack
278
- }), /*#__PURE__*/React.createElement("span", null, linkState === null || linkState === void 0 ? void 0 : linkState.title)), (linkPage === null || linkPage === void 0 ? void 0 : (_linkPage$filter = linkPage.filter(function (field) {
278
+ }), /*#__PURE__*/React.createElement("span", null, linkPageTitle)), (linkPage === null || linkPage === void 0 ? void 0 : (_linkPage$filter = linkPage.filter(function (field) {
279
279
  return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName;
280
280
  })) === null || _linkPage$filter === void 0 ? void 0 : _linkPage$filter.length) <= 1 ? null : /*#__PURE__*/React.createElement(_radio["default"].Group, {
281
281
  value: "" + (linkState === null || linkState === void 0 ? void 0 : linkState.title) + _dataCommon.separator + linkState.index,
@@ -28,6 +28,7 @@ var TableRenderer = function TableRenderer(props) {
28
28
  dimJson = props.dimJson,
29
29
  indexJson = props.indexJson,
30
30
  expressions = props.expressions,
31
+ linkPageTitle = props.linkPageTitle,
31
32
  linkPage = props.linkPage,
32
33
  queryBind = props.queryBind,
33
34
  chartRef = props.chartRef,
@@ -475,6 +476,7 @@ var TableRenderer = function TableRenderer(props) {
475
476
  chartRef: linkChartRef,
476
477
  dimJson: dimJson,
477
478
  linkPage: linkPage,
479
+ linkPageTitle: linkPageTitle,
478
480
  onConfirm: onConfirm,
479
481
  onBack: function onBack() {
480
482
  setIsLink(false);
@@ -67,6 +67,7 @@ export interface TypeChartSettingProps {
67
67
  };
68
68
  /** 条件格式设置 */
69
69
  expressions?: any[] | [];
70
+ linkPageTitle?: string;
70
71
  /** 下钻二级页设置 */
71
72
  linkPage?: TypeChartSettingProps[];
72
73
  /** 数据源参数"键"" 和 查询参数"值" 和 上一级维度(dim)"值" 关系绑定 */
@@ -172,16 +172,16 @@ var handleCondition = function handleCondition(value, handledValue, conditions)
172
172
 
173
173
  // mock
174
174
  exports.handleCondition = handleCondition;
175
- var token = 'scm:tenant:token:2:104:33A6E5D6F29E319C975B503D2B2E0E7B';
175
+ var token = 'scm:tenant:token:2:104:177217352666D386AA01E5AF6293727D';
176
176
 
177
177
  /** 获取维度指标 */
178
178
  var getDimTarget = /*#__PURE__*/function () {
179
179
  var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(rcProContext, params) {
180
- var _ref2, materialsRequest, env, token, res, _res;
180
+ var _ref2, materialsRequest, env, res, _res;
181
181
  return _regenerator["default"].wrap(function _callee$(_context) {
182
182
  while (1) switch (_context.prev = _context.next) {
183
183
  case 0:
184
- _ref2 = rcProContext || {}, materialsRequest = _ref2.materialsRequest, env = _ref2.env, token = _ref2.token; // 供应链里由子应用透传
184
+ _ref2 = rcProContext || {}, materialsRequest = _ref2.materialsRequest, env = _ref2.env; // 供应链里由子应用透传
185
185
  if (!materialsRequest) {
186
186
  _context.next = 6;
187
187
  break;