@ztocwst/rc-pro-materials 0.1.26 → 0.1.28
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/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.js +5 -5
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +8 -8
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +9 -9
- package/dist/SCM_Comps.css +1 -1
- package/dist/SCM_Comps.js +9 -9
- package/dist/SCM_Comps.js.map +1 -1
- package/es/components/z-templates-data-common/components/chart-renderer/index.d.ts +14 -0
- package/es/components/z-templates-data-common/components/chart-renderer/index.js +108 -0
- package/es/components/z-templates-data-common/components/custom-renderer/index.d.ts +13 -0
- package/es/components/z-templates-data-common/components/custom-renderer/index.js +161 -0
- package/es/components/z-templates-data-common/components/dim-target/dim-target.helper.d.ts +39 -0
- package/es/components/z-templates-data-common/components/dim-target/dim-target.helper.js +1 -0
- package/es/components/z-templates-data-common/components/dim-target/index.d.ts +16 -0
- package/es/components/z-templates-data-common/components/dim-target/index.js +430 -0
- package/es/components/z-templates-data-common/components/dim-target/index.less +49 -0
- package/es/components/z-templates-data-common/components/dim-target/useUpdateEffect.d.ts +8 -0
- package/es/components/z-templates-data-common/components/dim-target/useUpdateEffect.js +26 -0
- package/es/components/z-templates-data-common/components/link-renderer/index.d.ts +16 -0
- package/es/components/z-templates-data-common/components/link-renderer/index.js +316 -0
- package/es/components/z-templates-data-common/components/link-renderer/index.less +31 -0
- package/es/components/z-templates-data-common/components/table-renderer/index.d.ts +6 -0
- package/es/components/z-templates-data-common/components/table-renderer/index.js +479 -0
- package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +64 -0
- package/es/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +219 -0
- package/es/components/z-templates-data-common/data-common.d.ts +102 -0
- package/es/components/z-templates-data-common/data-common.helper.d.ts +61 -0
- package/es/components/z-templates-data-common/data-common.helper.js +332 -0
- package/es/components/z-templates-data-common/data-common.js +141 -0
- package/es/components/z-templates-data-common/index.d.ts +3 -0
- package/es/components/z-templates-data-common/index.js +2 -0
- package/es/index.d.ts +2 -0
- package/es/index.js +1 -0
- package/es/style.js +8 -0
- package/es/utils/rcProRequest.d.ts +2 -0
- package/es/utils/rcProRequest.js +30 -0
- package/lib/components/z-templates-data-common/components/chart-renderer/index.d.ts +14 -0
- package/lib/components/z-templates-data-common/components/chart-renderer/index.js +116 -0
- package/lib/components/z-templates-data-common/components/custom-renderer/index.d.ts +13 -0
- package/lib/components/z-templates-data-common/components/custom-renderer/index.js +167 -0
- package/lib/components/z-templates-data-common/components/dim-target/dim-target.helper.d.ts +39 -0
- package/lib/components/z-templates-data-common/components/dim-target/dim-target.helper.js +3 -0
- package/lib/components/z-templates-data-common/components/dim-target/index.d.ts +16 -0
- package/lib/components/z-templates-data-common/components/dim-target/index.js +438 -0
- package/lib/components/z-templates-data-common/components/dim-target/index.less +49 -0
- package/lib/components/z-templates-data-common/components/dim-target/useUpdateEffect.d.ts +8 -0
- package/lib/components/z-templates-data-common/components/dim-target/useUpdateEffect.js +30 -0
- package/lib/components/z-templates-data-common/components/link-renderer/index.d.ts +16 -0
- package/lib/components/z-templates-data-common/components/link-renderer/index.js +322 -0
- package/lib/components/z-templates-data-common/components/link-renderer/index.less +31 -0
- package/lib/components/z-templates-data-common/components/table-renderer/index.d.ts +6 -0
- package/lib/components/z-templates-data-common/components/table-renderer/index.js +485 -0
- package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.d.ts +64 -0
- package/lib/components/z-templates-data-common/components/table-renderer/table-renderer.helper.js +228 -0
- package/lib/components/z-templates-data-common/data-common.d.ts +102 -0
- package/lib/components/z-templates-data-common/data-common.helper.d.ts +61 -0
- package/lib/components/z-templates-data-common/data-common.helper.js +350 -0
- package/lib/components/z-templates-data-common/data-common.js +147 -0
- package/lib/components/z-templates-data-common/index.d.ts +3 -0
- package/lib/components/z-templates-data-common/index.js +8 -0
- package/lib/index.d.ts +2 -0
- package/lib/index.js +4 -2
- package/lib/style.js +4 -0
- package/lib/utils/rcProRequest.d.ts +2 -0
- package/lib/utils/rcProRequest.js +36 -0
- package/package.json +3 -3
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports["default"] = void 0;
|
|
6
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
7
|
+
var _radio = _interopRequireDefault(require("antd/lib/radio"));
|
|
8
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _rcPro = require("@ztocwst/rc-pro");
|
|
12
|
+
var _icons = require("@ant-design/icons");
|
|
13
|
+
var _dataCommon = require("../../data-common.helper");
|
|
14
|
+
var _tableRenderer = require("../table-renderer/table-renderer.helper");
|
|
15
|
+
require("./index.less");
|
|
16
|
+
var linkStateDefault = {
|
|
17
|
+
dataSetName: '',
|
|
18
|
+
autoLoad: false,
|
|
19
|
+
refreshRate: 0
|
|
20
|
+
};
|
|
21
|
+
var LinkRenderer = function LinkRenderer(props) {
|
|
22
|
+
var _tableOptions$paginat, _linkPage$filter;
|
|
23
|
+
var dimJson = props.dimJson,
|
|
24
|
+
linkPage = props.linkPage,
|
|
25
|
+
chartRef = props.chartRef,
|
|
26
|
+
onConfirm = props.onConfirm,
|
|
27
|
+
formatter = props.formatter,
|
|
28
|
+
onBack = props.onBack;
|
|
29
|
+
var rcProContext = (0, _react.useContext)(_rcPro.RcConfigContext);
|
|
30
|
+
var _ref = rcProContext || {},
|
|
31
|
+
_ref$tableOptions = _ref.tableOptions,
|
|
32
|
+
tableOptions = _ref$tableOptions === void 0 ? {} : _ref$tableOptions;
|
|
33
|
+
var defaultPageSize = (tableOptions === null || tableOptions === void 0 ? void 0 : (_tableOptions$paginat = tableOptions.pagination) === null || _tableOptions$paginat === void 0 ? void 0 : _tableOptions$paginat.defaultPageSize) || 20;
|
|
34
|
+
var _useState = (0, _react.useState)(linkStateDefault),
|
|
35
|
+
linkState = _useState[0],
|
|
36
|
+
setLinkState = _useState[1];
|
|
37
|
+
var tableRef = (0, _react.useRef)(null);
|
|
38
|
+
var queryCacheRef = (0, _react.useRef)(null);
|
|
39
|
+
var timer = null;
|
|
40
|
+
var handleClearInterval = function handleClearInterval() {
|
|
41
|
+
if (timer) {
|
|
42
|
+
clearInterval(timer);
|
|
43
|
+
timer = null;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
(0, _react.useEffect)(function () {
|
|
47
|
+
var dataSetName = linkState.dataSetName,
|
|
48
|
+
autoLoad = linkState.autoLoad,
|
|
49
|
+
refreshRate = linkState.refreshRate;
|
|
50
|
+
if (dataSetName) {
|
|
51
|
+
if (autoLoad) {
|
|
52
|
+
if (refreshRate) {
|
|
53
|
+
handleClearInterval();
|
|
54
|
+
timer = window.setInterval(function () {
|
|
55
|
+
return onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
|
|
56
|
+
}, refreshRate * _dataCommon.timeUnit);
|
|
57
|
+
} else {
|
|
58
|
+
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm();
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
} else {
|
|
62
|
+
handleClearInterval();
|
|
63
|
+
}
|
|
64
|
+
return function () {
|
|
65
|
+
handleClearInterval();
|
|
66
|
+
};
|
|
67
|
+
}, [linkState.dataSetName, linkState.autoLoad]);
|
|
68
|
+
|
|
69
|
+
// 获取表头
|
|
70
|
+
var handleGetColumns = function handleGetColumns(stateParams) {
|
|
71
|
+
var index = stateParams.index;
|
|
72
|
+
// 通过数据源接口名找到数据源配置
|
|
73
|
+
var find = linkPage[index];
|
|
74
|
+
var _ref2 = (0, _tableRenderer.handleDimTargetFormat)(find) || {},
|
|
75
|
+
targets = _ref2.targets;
|
|
76
|
+
var option = {
|
|
77
|
+
dimension: [],
|
|
78
|
+
dimensionSource: [],
|
|
79
|
+
index: (targets === null || targets === void 0 ? void 0 : targets.index) || [],
|
|
80
|
+
indexSource: (targets === null || targets === void 0 ? void 0 : targets.indexSource) || []
|
|
81
|
+
};
|
|
82
|
+
return (0, _tableRenderer.handleColumns)(option);
|
|
83
|
+
};
|
|
84
|
+
var handleUpdateColumns = function handleUpdateColumns(stateParams) {
|
|
85
|
+
var _tableRef$current;
|
|
86
|
+
var columns = handleGetColumns((0, _extends2["default"])({}, stateParams));
|
|
87
|
+
// 更新表头
|
|
88
|
+
(_tableRef$current = tableRef.current) === null || _tableRef$current === void 0 ? void 0 : _tableRef$current.updateColumns(columns);
|
|
89
|
+
};
|
|
90
|
+
var getDataSource = /*#__PURE__*/function () {
|
|
91
|
+
var _ref3 = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(params) {
|
|
92
|
+
var _dimJson$data;
|
|
93
|
+
var dataSetName, index, dimension, record, columns, queryBind, queryCache, query, queryKeys, recordKeys, dim, queryParams, data, queryData;
|
|
94
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
95
|
+
while (1) switch (_context.prev = _context.next) {
|
|
96
|
+
case 0:
|
|
97
|
+
if (params === void 0) {
|
|
98
|
+
params = {};
|
|
99
|
+
}
|
|
100
|
+
dataSetName = linkState.dataSetName, index = linkState.index, dimension = linkState.dimension, record = linkState.record;
|
|
101
|
+
columns = handleGetColumns((0, _extends2["default"])({}, linkState));
|
|
102
|
+
/** 查看queryBind是否有 当前查询条件和当前数据源参数(paraJson)建立绑定关系;有的话替换成绑定关系中的"键",没有则是默认查询配置的"键",上一级数据源的维度 "值" 或 当前查询条件的"值"入参 */
|
|
103
|
+
queryBind = linkPage[index].queryBind;
|
|
104
|
+
queryCache = queryCacheRef.current;
|
|
105
|
+
query = {};
|
|
106
|
+
queryKeys = Object.keys(queryCache);
|
|
107
|
+
if (queryKeys !== null && queryKeys !== void 0 && queryKeys.length) {
|
|
108
|
+
queryKeys.forEach(function (k) {
|
|
109
|
+
var _queryBind$find;
|
|
110
|
+
// "键"(有建立绑定关系 取当前数据源参数(paraJson)的"键",没有则是默认查询配置的"键")
|
|
111
|
+
var key = (queryBind === null || queryBind === void 0 ? void 0 : (_queryBind$find = queryBind.find(function (item) {
|
|
112
|
+
return (item === null || item === void 0 ? void 0 : item.currentQueryKey) === k;
|
|
113
|
+
})) === null || _queryBind$find === void 0 ? void 0 : _queryBind$find.sourceQueryKey) || k;
|
|
114
|
+
// "值"(当前查询条件的"值")
|
|
115
|
+
query[key] = queryCache[k];
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
recordKeys = Object.keys(record || {});
|
|
119
|
+
if (recordKeys.length) {
|
|
120
|
+
recordKeys.forEach(function (k) {
|
|
121
|
+
var _queryBind$find2;
|
|
122
|
+
// 查看是否有绑定关联关系
|
|
123
|
+
var key = queryBind === null || queryBind === void 0 ? void 0 : (_queryBind$find2 = queryBind.find(function (item) {
|
|
124
|
+
return (item === null || item === void 0 ? void 0 : item.parentDimKey) === k;
|
|
125
|
+
})) === null || _queryBind$find2 === void 0 ? void 0 : _queryBind$find2.sourceQueryKey;
|
|
126
|
+
if (key) {
|
|
127
|
+
// "值"(有建立绑定关系 取上一级数据源的维度的"值")
|
|
128
|
+
query[key] = record[k];
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
if (dimJson !== null && dimJson !== void 0 && (_dimJson$data = dimJson.data) !== null && _dimJson$data !== void 0 && _dimJson$data.length) {
|
|
133
|
+
dim = dimension === null || dimension === void 0 ? void 0 : dimension.map(function (description) {
|
|
134
|
+
var _dimJson$data2, _dimJson$data2$find;
|
|
135
|
+
return {
|
|
136
|
+
description: description,
|
|
137
|
+
name: (_dimJson$data2 = dimJson.data) === null || _dimJson$data2 === void 0 ? void 0 : (_dimJson$data2$find = _dimJson$data2.find(function (item) {
|
|
138
|
+
return item.description === description;
|
|
139
|
+
})) === null || _dimJson$data2$find === void 0 ? void 0 : _dimJson$data2$find.name
|
|
140
|
+
};
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
queryParams = (0, _dataCommon.handleQueryParams)(query);
|
|
144
|
+
data = (0, _extends2["default"])({
|
|
145
|
+
pageNum: 1,
|
|
146
|
+
pageSize: defaultPageSize
|
|
147
|
+
}, params, {
|
|
148
|
+
queryParams: queryParams,
|
|
149
|
+
dim: dim,
|
|
150
|
+
target: columns.map(function (item) {
|
|
151
|
+
return {
|
|
152
|
+
description: item.dataIndex
|
|
153
|
+
};
|
|
154
|
+
}),
|
|
155
|
+
dataSetName: dataSetName
|
|
156
|
+
});
|
|
157
|
+
queryData = formatter ? formatter === null || formatter === void 0 ? void 0 : formatter(data) : data;
|
|
158
|
+
return _context.abrupt("return", (0, _dataCommon.getReportData)(rcProContext, queryData).then(function (_ref4) {
|
|
159
|
+
var success = _ref4.success,
|
|
160
|
+
_ref4$result = _ref4.result,
|
|
161
|
+
result = _ref4$result === void 0 ? {} : _ref4$result;
|
|
162
|
+
return {
|
|
163
|
+
success: success,
|
|
164
|
+
result: result
|
|
165
|
+
};
|
|
166
|
+
}));
|
|
167
|
+
case 15:
|
|
168
|
+
case "end":
|
|
169
|
+
return _context.stop();
|
|
170
|
+
}
|
|
171
|
+
}, _callee);
|
|
172
|
+
}));
|
|
173
|
+
return function getDataSource(_x) {
|
|
174
|
+
return _ref3.apply(this, arguments);
|
|
175
|
+
};
|
|
176
|
+
}();
|
|
177
|
+
|
|
178
|
+
/** 初始linkState */
|
|
179
|
+
var initial = function initial(state) {
|
|
180
|
+
var _ref5 = state || {},
|
|
181
|
+
dataSetName = _ref5.dataSetName;
|
|
182
|
+
/** 二级页未配置 或 自定义dataSetName配错 直接返回 */
|
|
183
|
+
var Length = linkPage === null || linkPage === void 0 ? void 0 : linkPage.length;
|
|
184
|
+
var isHave = linkPage === null || linkPage === void 0 ? void 0 : linkPage.some(function (item) {
|
|
185
|
+
return item.dataSetName === dataSetName;
|
|
186
|
+
});
|
|
187
|
+
if (!Length || !isHave) return;
|
|
188
|
+
|
|
189
|
+
/** 可以传入二级页下标 */
|
|
190
|
+
var index = state.index || 0;
|
|
191
|
+
/** 检查传入二级下标 是否为数字 */
|
|
192
|
+
var isNumber = typeof index === 'number';
|
|
193
|
+
|
|
194
|
+
/** 收集二级页title 计算宽度 */
|
|
195
|
+
var linkTitle = [];
|
|
196
|
+
for (var i = 0; i < Length; i++) {
|
|
197
|
+
var item = linkPage[i];
|
|
198
|
+
// 找到相同的
|
|
199
|
+
if (item.dataSetName === dataSetName) {
|
|
200
|
+
linkTitle.push(item.title);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
var width = (0, _dataCommon.getMaxWidth)(linkTitle);
|
|
204
|
+
|
|
205
|
+
/** 二级页出现重复相同的时候 索引未配置正确 取dataSetName 出现最近一次下标 防止报错 */
|
|
206
|
+
if (!isNumber || isNumber && (index < 0 || index >= Length)) {
|
|
207
|
+
for (var _i = 0; _i < Length; _i++) {
|
|
208
|
+
var _item = linkPage[_i];
|
|
209
|
+
if (_item.dataSetName === dataSetName) {
|
|
210
|
+
index = _i;
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
var _linkPage$index = linkPage[index],
|
|
216
|
+
title = _linkPage$index.title,
|
|
217
|
+
autoLoad = _linkPage$index.autoLoad,
|
|
218
|
+
refreshRate = _linkPage$index.refreshRate;
|
|
219
|
+
var stateData = (0, _extends2["default"])({}, state, {
|
|
220
|
+
width: width,
|
|
221
|
+
index: index,
|
|
222
|
+
title: title,
|
|
223
|
+
autoLoad: autoLoad,
|
|
224
|
+
refreshRate: refreshRate
|
|
225
|
+
});
|
|
226
|
+
/** 当前进入与上次进入link页不同时需要清空数据 */
|
|
227
|
+
var isSource = "" + stateData.dataSetName + _dataCommon.separator + index === "" + linkState.dataSetName + _dataCommon.separator + (linkState === null || linkState === void 0 ? void 0 : linkState.index);
|
|
228
|
+
var isSame = JSON.stringify(stateData === null || stateData === void 0 ? void 0 : stateData.record) === JSON.stringify(linkState === null || linkState === void 0 ? void 0 : linkState.record);
|
|
229
|
+
if (!isSource || !isSame) {
|
|
230
|
+
var _tableRef$current2, _tableRef$current2$up;
|
|
231
|
+
(_tableRef$current2 = tableRef.current) === null || _tableRef$current2 === void 0 ? void 0 : (_tableRef$current2$up = _tableRef$current2.updateDataSource) === null || _tableRef$current2$up === void 0 ? void 0 : _tableRef$current2$up.call(_tableRef$current2, []);
|
|
232
|
+
}
|
|
233
|
+
handleUpdateColumns(stateData);
|
|
234
|
+
setLinkState(stateData);
|
|
235
|
+
};
|
|
236
|
+
var queryChart = function queryChart(value) {
|
|
237
|
+
var _tableRef$current3;
|
|
238
|
+
queryCacheRef.current = value;
|
|
239
|
+
(_tableRef$current3 = tableRef.current) === null || _tableRef$current3 === void 0 ? void 0 : _tableRef$current3.refreshTable({
|
|
240
|
+
current: 1
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
(0, _react.useImperativeHandle)(chartRef, function () {
|
|
244
|
+
return {
|
|
245
|
+
initial: initial,
|
|
246
|
+
queryChart: queryChart
|
|
247
|
+
};
|
|
248
|
+
});
|
|
249
|
+
|
|
250
|
+
/** 切换link */
|
|
251
|
+
var handleLinkChange = function handleLinkChange(event) {
|
|
252
|
+
var value = event.target.value;
|
|
253
|
+
// dataSetName 可能会重复配置 所以使用 dataSetName + 分隔符 + index
|
|
254
|
+
var _ref6 = (value === null || value === void 0 ? void 0 : value.split(_dataCommon.separator)) || [],
|
|
255
|
+
dataSetName = _ref6[0],
|
|
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;
|
|
261
|
+
var stateData = (0, _extends2["default"])({}, linkState, {
|
|
262
|
+
dataSetName: dataSetName,
|
|
263
|
+
index: index,
|
|
264
|
+
title: title,
|
|
265
|
+
autoLoad: autoLoad,
|
|
266
|
+
refreshRate: refreshRate
|
|
267
|
+
});
|
|
268
|
+
handleUpdateColumns(stateData);
|
|
269
|
+
setLinkState(stateData);
|
|
270
|
+
};
|
|
271
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
272
|
+
className: "link-head"
|
|
273
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
274
|
+
className: "link-title"
|
|
275
|
+
}, /*#__PURE__*/React.createElement(_icons.ArrowLeftOutlined, {
|
|
276
|
+
className: "arrow-left",
|
|
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) {
|
|
279
|
+
return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName;
|
|
280
|
+
})) === null || _linkPage$filter === void 0 ? void 0 : _linkPage$filter.length) <= 1 ? null : /*#__PURE__*/React.createElement(_radio["default"].Group, {
|
|
281
|
+
value: "" + (linkState === null || linkState === void 0 ? void 0 : linkState.title) + _dataCommon.separator + linkState.index,
|
|
282
|
+
onChange: handleLinkChange
|
|
283
|
+
}, linkPage === null || linkPage === void 0 ? void 0 : linkPage.map(function (field, index) {
|
|
284
|
+
return (field === null || field === void 0 ? void 0 : field.dataSetName) === linkState.dataSetName ? /*#__PURE__*/React.createElement(_radio["default"].Button, {
|
|
285
|
+
value: "" + (field === null || field === void 0 ? void 0 : field.dataSetName) + _dataCommon.separator + index.toString(),
|
|
286
|
+
key: "" + (field === null || field === void 0 ? void 0 : field.dataSetName) + _dataCommon.separator + index.toString()
|
|
287
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
288
|
+
style: {
|
|
289
|
+
textAlign: 'center',
|
|
290
|
+
width: linkState.width
|
|
291
|
+
}
|
|
292
|
+
}, field === null || field === void 0 ? void 0 : field.title)) : null;
|
|
293
|
+
}))), /*#__PURE__*/React.createElement(_rcPro.ProTable, {
|
|
294
|
+
ref: tableRef,
|
|
295
|
+
config: (0, _extends2["default"])({}, _dataCommon.tableConfigDefault, {
|
|
296
|
+
pagination: {
|
|
297
|
+
showSizeChanger: true,
|
|
298
|
+
defaultPageSize: defaultPageSize
|
|
299
|
+
},
|
|
300
|
+
request: function request(data) {
|
|
301
|
+
var _data$pagination, _data$pagination2, _data$sorter;
|
|
302
|
+
var pagination = {
|
|
303
|
+
pageNum: (_data$pagination = data.pagination) === null || _data$pagination === void 0 ? void 0 : _data$pagination.current,
|
|
304
|
+
pageSize: (_data$pagination2 = data.pagination) === null || _data$pagination2 === void 0 ? void 0 : _data$pagination2.pageSize
|
|
305
|
+
};
|
|
306
|
+
var orderBy = [];
|
|
307
|
+
if ((_data$sorter = data.sorter) !== null && _data$sorter !== void 0 && _data$sorter.order) {
|
|
308
|
+
var _data$sorter2, _data$sorter3, _data$sorter3$order;
|
|
309
|
+
orderBy.push({
|
|
310
|
+
name: (_data$sorter2 = data.sorter) === null || _data$sorter2 === void 0 ? void 0 : _data$sorter2.field,
|
|
311
|
+
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)
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
return getDataSource((0, _extends2["default"])({}, pagination, {
|
|
315
|
+
orderBy: orderBy
|
|
316
|
+
}));
|
|
317
|
+
}
|
|
318
|
+
})
|
|
319
|
+
}));
|
|
320
|
+
};
|
|
321
|
+
var _default = LinkRenderer;
|
|
322
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
.link-head {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
margin: 12px 0;
|
|
5
|
+
.ant-radio-group {
|
|
6
|
+
flex: 1;
|
|
7
|
+
overflow-x: auto;
|
|
8
|
+
display: flex;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.link-title {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
margin-right: 12px;
|
|
15
|
+
font-weight: 600;
|
|
16
|
+
font-size: 20px;
|
|
17
|
+
color: #333;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.arrow-left {
|
|
22
|
+
margin-right: 5px;
|
|
23
|
+
font-size: 20px;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// .link-label {
|
|
28
|
+
// display: flex;
|
|
29
|
+
// align-items: center;
|
|
30
|
+
// }
|
|
31
|
+
}
|