@ztocwst/rc-pro-materials 0.2.53 → 0.2.55
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 +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +4 -4
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +7 -7
- package/dist/SCM_Comps.css +1 -1
- package/dist/SCM_Comps.js +8 -8
- package/dist/SCM_Comps.js.map +1 -1
- package/es/components/z-data-stat-description/z-data-stat-description.js +1 -1
- package/es/components/z-singleFactory/zSingerFactory.js +6 -2
- package/es/components/z-target-block/index.d.ts +3 -0
- package/es/components/z-target-block/index.js +2 -0
- package/es/components/z-target-block/z-target-block.d.ts +6 -0
- package/es/components/z-target-block/z-target-block.js +8 -0
- package/es/components/z-templates-data-common/components/chart-renderer/index.js +31 -28
- package/es/components/z-templates-data-common/data-common.helper.d.ts +11 -0
- package/es/components/z-templates-data-common/data-common.helper.js +75 -1
- package/es/components/z-warehouse/zWarehouse.js +6 -2
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -1
- package/es/style.js +0 -8
- package/lib/components/z-data-stat-description/z-data-stat-description.js +2 -2
- package/lib/components/z-singleFactory/zSingerFactory.js +7 -2
- package/lib/components/z-target-block/index.d.ts +3 -0
- package/lib/components/{z-data-stat → z-target-block}/index.js +2 -2
- package/lib/components/z-target-block/z-target-block.d.ts +6 -0
- package/lib/components/z-target-block/z-target-block.js +11 -0
- package/lib/components/z-templates-data-common/components/chart-renderer/index.js +30 -27
- package/lib/components/z-templates-data-common/data-common.helper.d.ts +11 -0
- package/lib/components/z-templates-data-common/data-common.helper.js +77 -1
- package/lib/components/z-warehouse/zWarehouse.js +7 -2
- package/lib/index.d.ts +2 -2
- package/lib/index.js +3 -3
- package/lib/style.js +0 -4
- package/package.json +4 -4
- package/es/components/z-data-stat/components/CardDetail/index.d.ts +0 -6
- package/es/components/z-data-stat/components/CardDetail/index.js +0 -328
- package/es/components/z-data-stat/components/CardDetail/index.less +0 -164
- package/es/components/z-data-stat/components/CardDetail/interface.d.ts +0 -30
- package/es/components/z-data-stat/components/CardDetail/interface.js +0 -1
- package/es/components/z-data-stat/components/StepBlock/index.d.ts +0 -5
- package/es/components/z-data-stat/components/StepBlock/index.js +0 -104
- package/es/components/z-data-stat/components/StepBlock/index.less +0 -40
- package/es/components/z-data-stat/components/StepBlock/interface.d.ts +0 -11
- package/es/components/z-data-stat/components/StepBlock/interface.js +0 -1
- package/es/components/z-data-stat/components/TargetBlock/index.d.ts +0 -5
- package/es/components/z-data-stat/components/TargetBlock/index.js +0 -106
- package/es/components/z-data-stat/components/TargetBlock/index.less +0 -65
- package/es/components/z-data-stat/components/TargetBlock/interface.d.ts +0 -31
- package/es/components/z-data-stat/components/TargetBlock/interface.js +0 -1
- package/es/components/z-data-stat/components/index.d.ts +0 -7
- package/es/components/z-data-stat/components/index.js +0 -4
- package/es/components/z-data-stat/data-stat.d.ts +0 -19
- package/es/components/z-data-stat/data-stat.js +0 -326
- package/es/components/z-data-stat/index.d.ts +0 -3
- package/es/components/z-data-stat/index.js +0 -2
- package/es/components/z-data-stat/util.d.ts +0 -25
- package/es/components/z-data-stat/util.js +0 -178
- package/lib/components/z-data-stat/components/CardDetail/index.d.ts +0 -6
- package/lib/components/z-data-stat/components/CardDetail/index.js +0 -335
- package/lib/components/z-data-stat/components/CardDetail/index.less +0 -164
- package/lib/components/z-data-stat/components/CardDetail/interface.d.ts +0 -30
- package/lib/components/z-data-stat/components/CardDetail/interface.js +0 -3
- package/lib/components/z-data-stat/components/StepBlock/index.d.ts +0 -5
- package/lib/components/z-data-stat/components/StepBlock/index.js +0 -109
- package/lib/components/z-data-stat/components/StepBlock/index.less +0 -40
- package/lib/components/z-data-stat/components/StepBlock/interface.d.ts +0 -11
- package/lib/components/z-data-stat/components/StepBlock/interface.js +0 -3
- package/lib/components/z-data-stat/components/TargetBlock/index.d.ts +0 -5
- package/lib/components/z-data-stat/components/TargetBlock/index.js +0 -111
- package/lib/components/z-data-stat/components/TargetBlock/index.less +0 -65
- package/lib/components/z-data-stat/components/TargetBlock/interface.d.ts +0 -31
- package/lib/components/z-data-stat/components/TargetBlock/interface.js +0 -3
- package/lib/components/z-data-stat/components/index.d.ts +0 -7
- package/lib/components/z-data-stat/components/index.js +0 -13
- package/lib/components/z-data-stat/data-stat.d.ts +0 -19
- package/lib/components/z-data-stat/data-stat.js +0 -331
- package/lib/components/z-data-stat/index.d.ts +0 -3
- package/lib/components/z-data-stat/util.d.ts +0 -25
- package/lib/components/z-data-stat/util.js +0 -187
package/lib/style.js
CHANGED
|
@@ -10,8 +10,4 @@ require('antd/lib/tabs/style');
|
|
|
10
10
|
require('antd/lib/drawer/style');
|
|
11
11
|
require('antd/lib/tooltip/style');
|
|
12
12
|
require('antd/lib/carousel/style');
|
|
13
|
-
require('antd/lib/spin/style');
|
|
14
|
-
require('antd/lib/list/style');
|
|
15
|
-
require('antd/lib/empty/style');
|
|
16
|
-
require('antd/lib/popover/style');
|
|
17
13
|
require('./index.scss');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ztocwst/rc-pro-materials",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.55",
|
|
4
4
|
"description": "@ztocwst/rc-pro-materials",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@alifd/next": "^1.25.27",
|
|
72
72
|
"@alilc/build-plugin-alt": "^1.3.3",
|
|
73
73
|
"@types/antd": "^1.0.0",
|
|
74
|
-
"@ztocwst/rc-pro": "^0.5.
|
|
74
|
+
"@ztocwst/rc-pro": "^0.5.19",
|
|
75
75
|
"antd": "4.22.3",
|
|
76
76
|
"moment": "latest",
|
|
77
77
|
"prop-types": "^15.5.8",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
},
|
|
87
87
|
"componentConfig": {
|
|
88
88
|
"isComponentLibrary": true,
|
|
89
|
-
"materialSchema": "https://npm.ztocwst.com/@ztocwst/rc-pro-materials@0.2.
|
|
89
|
+
"materialSchema": "https://npm.ztocwst.com/@ztocwst/rc-pro-materials@0.2.55/build/lowcode/assets-prod.json"
|
|
90
90
|
},
|
|
91
|
-
"homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.
|
|
91
|
+
"homepage": "https://unpkg.com/@ztocwst/rc-pro-materials@0.2.55/build/index.html",
|
|
92
92
|
"publishConfig": {
|
|
93
93
|
"registry": "https://registry.npmjs.org/",
|
|
94
94
|
"access": "public"
|
|
@@ -1,328 +0,0 @@
|
|
|
1
|
-
import _List from "antd/es/list";
|
|
2
|
-
import _Empty from "antd/es/empty";
|
|
3
|
-
import _Spin from "antd/es/spin";
|
|
4
|
-
import _Popover from "antd/es/popover";
|
|
5
|
-
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
6
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
7
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
8
|
-
import React, { useState, useImperativeHandle } from 'react';
|
|
9
|
-
import { CheckOutlined, SettingOutlined, DoubleRightOutlined } from '@ant-design/icons';
|
|
10
|
-
import VirtualList from 'rc-virtual-list';
|
|
11
|
-
import TargetBlock from "../TargetBlock";
|
|
12
|
-
import { useRef } from 'react';
|
|
13
|
-
import "./index.less";
|
|
14
|
-
var ContainerHeight = 200;
|
|
15
|
-
|
|
16
|
-
// const pager = {
|
|
17
|
-
// pageNum: 1,
|
|
18
|
-
// pageSize: 6,
|
|
19
|
-
// };
|
|
20
|
-
|
|
21
|
-
var loadMore = true;
|
|
22
|
-
var CardDetail = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
23
|
-
var _filter$columns, _filter$columns2, _filter$columns2$, _filter$columns2$$dim;
|
|
24
|
-
var columns = props.columns,
|
|
25
|
-
request = props.request,
|
|
26
|
-
list = props.list,
|
|
27
|
-
filter = props.filter,
|
|
28
|
-
handleClick = props.handleClick;
|
|
29
|
-
var _useState = useState(filter === null || filter === void 0 ? void 0 : (_filter$columns = filter.columns) === null || _filter$columns === void 0 ? void 0 : _filter$columns[0]),
|
|
30
|
-
selectedFilter = _useState[0],
|
|
31
|
-
setSelectedFilter = _useState[1];
|
|
32
|
-
var _useState2 = useState(false),
|
|
33
|
-
open = _useState2[0],
|
|
34
|
-
setOpen = _useState2[1];
|
|
35
|
-
var _useState3 = useState(false),
|
|
36
|
-
openTable = _useState3[0],
|
|
37
|
-
setOpenTable = _useState3[1];
|
|
38
|
-
var _useState4 = useState(false),
|
|
39
|
-
loading = _useState4[0],
|
|
40
|
-
setLoading = _useState4[1];
|
|
41
|
-
var _useState5 = useState([]),
|
|
42
|
-
listData = _useState5[0],
|
|
43
|
-
setListData = _useState5[1];
|
|
44
|
-
var _useState6 = useState({}),
|
|
45
|
-
data = _useState6[0],
|
|
46
|
-
setData = _useState6[1];
|
|
47
|
-
var _useState7 = useState(false),
|
|
48
|
-
headerLoading = _useState7[0],
|
|
49
|
-
setHeaderLoading = _useState7[1];
|
|
50
|
-
var _useState8 = useState(''),
|
|
51
|
-
activeKey = _useState8[0],
|
|
52
|
-
setActiveKey = _useState8[1];
|
|
53
|
-
var pager = useRef({
|
|
54
|
-
pageNum: 1,
|
|
55
|
-
pageSize: 6
|
|
56
|
-
});
|
|
57
|
-
function refresh(params) {
|
|
58
|
-
// setListData([]);
|
|
59
|
-
pager.current.pageNum = 1;
|
|
60
|
-
loadMore = true;
|
|
61
|
-
_getData(_extends({}, pager.current, params));
|
|
62
|
-
getHeaderData(params);
|
|
63
|
-
}
|
|
64
|
-
function getHeaderData(_x) {
|
|
65
|
-
return _getHeaderData.apply(this, arguments);
|
|
66
|
-
}
|
|
67
|
-
function _getHeaderData() {
|
|
68
|
-
_getHeaderData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(params) {
|
|
69
|
-
var _data;
|
|
70
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
71
|
-
while (1) switch (_context.prev = _context.next) {
|
|
72
|
-
case 0:
|
|
73
|
-
_context.prev = 0;
|
|
74
|
-
setHeaderLoading(true);
|
|
75
|
-
_context.next = 4;
|
|
76
|
-
return request(params);
|
|
77
|
-
case 4:
|
|
78
|
-
_data = _context.sent;
|
|
79
|
-
setData(_data);
|
|
80
|
-
case 6:
|
|
81
|
-
_context.prev = 6;
|
|
82
|
-
setHeaderLoading(false);
|
|
83
|
-
return _context.finish(6);
|
|
84
|
-
case 9:
|
|
85
|
-
case "end":
|
|
86
|
-
return _context.stop();
|
|
87
|
-
}
|
|
88
|
-
}, _callee, null, [[0,, 6, 9]]);
|
|
89
|
-
}));
|
|
90
|
-
return _getHeaderData.apply(this, arguments);
|
|
91
|
-
}
|
|
92
|
-
var handleSelectFilter = function handleSelectFilter(item) {
|
|
93
|
-
setSelectedFilter(item);
|
|
94
|
-
pager.current.pageNum = 1;
|
|
95
|
-
setActiveKey('');
|
|
96
|
-
_getData({
|
|
97
|
-
filter: item,
|
|
98
|
-
pager: pager.current
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
function _getData(_x2) {
|
|
102
|
-
return _getData2.apply(this, arguments);
|
|
103
|
-
}
|
|
104
|
-
function _getData2() {
|
|
105
|
-
_getData2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(options) {
|
|
106
|
-
var _data;
|
|
107
|
-
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
108
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
109
|
-
case 0:
|
|
110
|
-
_context2.prev = 0;
|
|
111
|
-
if (!(!loadMore && pager.current.pageNum > 1)) {
|
|
112
|
-
_context2.next = 3;
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
return _context2.abrupt("return");
|
|
116
|
-
case 3:
|
|
117
|
-
setLoading(true);
|
|
118
|
-
_context2.next = 6;
|
|
119
|
-
return list.request(_extends({
|
|
120
|
-
filter: selectedFilter
|
|
121
|
-
}, options));
|
|
122
|
-
case 6:
|
|
123
|
-
_data = _context2.sent;
|
|
124
|
-
if (pager.current.pageNum === 1) {
|
|
125
|
-
setListData(_data === null || _data === void 0 ? void 0 : _data.map(function (v, idx) {
|
|
126
|
-
return _extends({}, v, {
|
|
127
|
-
key: idx
|
|
128
|
-
});
|
|
129
|
-
}));
|
|
130
|
-
} else {
|
|
131
|
-
setListData(listData === null || listData === void 0 ? void 0 : listData.concat(_data).map(function (v, idx) {
|
|
132
|
-
return _extends({}, v, {
|
|
133
|
-
key: idx
|
|
134
|
-
});
|
|
135
|
-
}));
|
|
136
|
-
}
|
|
137
|
-
if ((_data === null || _data === void 0 ? void 0 : _data.length) < pager.current.pageSize) {
|
|
138
|
-
loadMore = false;
|
|
139
|
-
}
|
|
140
|
-
pager.current.pageNum = pager.current.pageNum + 1;
|
|
141
|
-
case 10:
|
|
142
|
-
_context2.prev = 10;
|
|
143
|
-
setLoading(false);
|
|
144
|
-
return _context2.finish(10);
|
|
145
|
-
case 13:
|
|
146
|
-
case "end":
|
|
147
|
-
return _context2.stop();
|
|
148
|
-
}
|
|
149
|
-
}, _callee2, null, [[0,, 10, 13]]);
|
|
150
|
-
}));
|
|
151
|
-
return _getData2.apply(this, arguments);
|
|
152
|
-
}
|
|
153
|
-
var onScroll = function onScroll(e) {
|
|
154
|
-
if (e.currentTarget.scrollHeight - e.currentTarget.scrollTop === ContainerHeight) {
|
|
155
|
-
_getData(pager.current);
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
var _handleClick = function _handleClick(item) {
|
|
159
|
-
setActiveKey(item.key);
|
|
160
|
-
handleClick === null || handleClick === void 0 ? void 0 : handleClick(item.key !== '' ? {
|
|
161
|
-
record: item,
|
|
162
|
-
filter: selectedFilter
|
|
163
|
-
} : null);
|
|
164
|
-
};
|
|
165
|
-
useImperativeHandle(ref, function () {
|
|
166
|
-
return {
|
|
167
|
-
refresh: refresh
|
|
168
|
-
};
|
|
169
|
-
});
|
|
170
|
-
var noStyleCol = (_filter$columns2 = filter.columns) === null || _filter$columns2 === void 0 ? void 0 : (_filter$columns2$ = _filter$columns2[0]) === null || _filter$columns2$ === void 0 ? void 0 : (_filter$columns2$$dim = _filter$columns2$.dim) === null || _filter$columns2$$dim === void 0 ? void 0 : _filter$columns2$$dim.find(function (e) {
|
|
171
|
-
return e === null || e === void 0 ? void 0 : e.alias;
|
|
172
|
-
});
|
|
173
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
174
|
-
className: "rc-card-detail",
|
|
175
|
-
style: openTable ? {
|
|
176
|
-
marginBottom: '16px'
|
|
177
|
-
} : {}
|
|
178
|
-
}, /*#__PURE__*/React.createElement(_Spin, {
|
|
179
|
-
spinning: headerLoading
|
|
180
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
181
|
-
className: "rc-card-detail_header-data"
|
|
182
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
183
|
-
className: "rc-card-detail_filter"
|
|
184
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
185
|
-
className: "rc-card-detail_filter-content " + (openTable ? 'rc-card-detail_filter-content-before' : '')
|
|
186
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
187
|
-
className: "rc-card-detail_filter-name"
|
|
188
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
189
|
-
style: {
|
|
190
|
-
marginRight: '8px'
|
|
191
|
-
}
|
|
192
|
-
}, selectedFilter === null || selectedFilter === void 0 ? void 0 : selectedFilter.label), /*#__PURE__*/React.createElement(_Popover, {
|
|
193
|
-
placement: "rightTop",
|
|
194
|
-
open: open,
|
|
195
|
-
trigger: "hover",
|
|
196
|
-
onOpenChange: function onOpenChange(_open) {
|
|
197
|
-
return setOpen(_open);
|
|
198
|
-
},
|
|
199
|
-
content: function content() {
|
|
200
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
201
|
-
className: "rc-card-detail_popover-content"
|
|
202
|
-
}, filter.columns.map(function (v) {
|
|
203
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
204
|
-
key: v.key,
|
|
205
|
-
className: "rc-card-detail_popover-content_item",
|
|
206
|
-
style: (selectedFilter === null || selectedFilter === void 0 ? void 0 : selectedFilter.key) === v.key ? {
|
|
207
|
-
color: '#008dff'
|
|
208
|
-
} : {},
|
|
209
|
-
onClick: function onClick() {
|
|
210
|
-
setOpen(false);
|
|
211
|
-
handleSelectFilter(v);
|
|
212
|
-
}
|
|
213
|
-
}, v.label, (selectedFilter === null || selectedFilter === void 0 ? void 0 : selectedFilter.key) === v.key && /*#__PURE__*/React.createElement(CheckOutlined, {
|
|
214
|
-
className: "active",
|
|
215
|
-
style: {
|
|
216
|
-
color: '#008dff'
|
|
217
|
-
}
|
|
218
|
-
}));
|
|
219
|
-
}));
|
|
220
|
-
}
|
|
221
|
-
}, /*#__PURE__*/React.createElement(SettingOutlined, {
|
|
222
|
-
className: "rc-card-detail_setting"
|
|
223
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
224
|
-
style: openTable ? {
|
|
225
|
-
cursor: 'pointer'
|
|
226
|
-
} : {
|
|
227
|
-
color: '#008dff',
|
|
228
|
-
cursor: 'pointer'
|
|
229
|
-
},
|
|
230
|
-
onClick: function onClick() {
|
|
231
|
-
setOpenTable(!openTable);
|
|
232
|
-
}
|
|
233
|
-
}, openTable ? /*#__PURE__*/React.createElement("span", null, "\u6536\u8D77") : /*#__PURE__*/React.createElement("span", null, "\u5C55\u5F00\u67E5\u770B"), /*#__PURE__*/React.createElement(DoubleRightOutlined, {
|
|
234
|
-
style: openTable ? {
|
|
235
|
-
transform: 'rotate(-90deg)'
|
|
236
|
-
} : {
|
|
237
|
-
transform: 'rotate(90deg)'
|
|
238
|
-
}
|
|
239
|
-
})))), /*#__PURE__*/React.createElement("div", {
|
|
240
|
-
className: "rc-card-detail_header-target",
|
|
241
|
-
style: {
|
|
242
|
-
cursor: 'pointer'
|
|
243
|
-
},
|
|
244
|
-
onClick: function onClick() {
|
|
245
|
-
return _handleClick === null || _handleClick === void 0 ? void 0 : _handleClick({
|
|
246
|
-
key: ''
|
|
247
|
-
});
|
|
248
|
-
}
|
|
249
|
-
}, columns.map(function (item, index) {
|
|
250
|
-
return /*#__PURE__*/React.createElement(TargetBlock, _extends({
|
|
251
|
-
key: (item === null || item === void 0 ? void 0 : item.dataIndex) || index
|
|
252
|
-
}, item, {
|
|
253
|
-
data: data,
|
|
254
|
-
className: "rc-card-detail_header-target-item",
|
|
255
|
-
style: _extends({
|
|
256
|
-
minHeight: '60px'
|
|
257
|
-
}, activeKey === '' ? _extends({}, item === null || item === void 0 ? void 0 : item.style, {
|
|
258
|
-
border: '1px solid #487FFB'
|
|
259
|
-
}) : item === null || item === void 0 ? void 0 : item.style)
|
|
260
|
-
}));
|
|
261
|
-
})))), openTable && /*#__PURE__*/React.createElement("div", {
|
|
262
|
-
className: "rc-card-detail_list"
|
|
263
|
-
}, (listData === null || listData === void 0 ? void 0 : listData.length) === 0 && !loading && /*#__PURE__*/React.createElement(_Empty, {
|
|
264
|
-
className: "rc-dard-detail_list-empty",
|
|
265
|
-
image: _Empty.PRESENTED_IMAGE_SIMPLE
|
|
266
|
-
}), /*#__PURE__*/React.createElement(_Spin, {
|
|
267
|
-
spinning: loading
|
|
268
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
269
|
-
style: {
|
|
270
|
-
height: '16px'
|
|
271
|
-
}
|
|
272
|
-
}), /*#__PURE__*/React.createElement(_List, {
|
|
273
|
-
split: false
|
|
274
|
-
}, /*#__PURE__*/React.createElement(VirtualList, {
|
|
275
|
-
data: listData,
|
|
276
|
-
height: ContainerHeight,
|
|
277
|
-
itemHeight: 47,
|
|
278
|
-
itemKey: "key",
|
|
279
|
-
onScroll: onScroll
|
|
280
|
-
}, function (item, idx) {
|
|
281
|
-
var _ref;
|
|
282
|
-
return /*#__PURE__*/React.createElement(_List.Item, {
|
|
283
|
-
key: item.key,
|
|
284
|
-
style: idx === listData.length - 1 ? {
|
|
285
|
-
padding: '0 16px 0 16px'
|
|
286
|
-
} : {
|
|
287
|
-
padding: '0 16px 16px 16px'
|
|
288
|
-
},
|
|
289
|
-
onClick: function onClick() {
|
|
290
|
-
return _handleClick === null || _handleClick === void 0 ? void 0 : _handleClick(item);
|
|
291
|
-
}
|
|
292
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
293
|
-
className: "rc-card-detail_list-item"
|
|
294
|
-
}, (_ref = [{
|
|
295
|
-
name: '',
|
|
296
|
-
dataIndex: noStyleCol === null || noStyleCol === void 0 ? void 0 : noStyleCol.alias,
|
|
297
|
-
noStyle: true,
|
|
298
|
-
target: false
|
|
299
|
-
}].concat(list.columns)) === null || _ref === void 0 ? void 0 : _ref.map(function (field) {
|
|
300
|
-
return field.noStyle ? /*#__PURE__*/React.createElement("div", {
|
|
301
|
-
className: "rc-card-detail_list-header",
|
|
302
|
-
key: field.dataIndex,
|
|
303
|
-
style: {
|
|
304
|
-
width: '108px'
|
|
305
|
-
}
|
|
306
|
-
}, item[field.dataIndex]) : /*#__PURE__*/React.createElement(TargetBlock, _extends({
|
|
307
|
-
key: field.dataIndex
|
|
308
|
-
}, field, {
|
|
309
|
-
data: item,
|
|
310
|
-
className: "rc-card-detail_header-target-item",
|
|
311
|
-
style: _extends({
|
|
312
|
-
minHeight: '60px'
|
|
313
|
-
}, activeKey === item.key ? _extends({}, field.style, {
|
|
314
|
-
border: '1px solid #487FFB'
|
|
315
|
-
}) : field.style)
|
|
316
|
-
}));
|
|
317
|
-
})));
|
|
318
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
319
|
-
style: {
|
|
320
|
-
height: '16px'
|
|
321
|
-
}
|
|
322
|
-
}))));
|
|
323
|
-
});
|
|
324
|
-
export function useCardDetailRef() {
|
|
325
|
-
var ref = useRef(null);
|
|
326
|
-
return ref;
|
|
327
|
-
}
|
|
328
|
-
export default CardDetail;
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
@gap: 16px;
|
|
2
|
-
|
|
3
|
-
.rc-card-detail {
|
|
4
|
-
width: 100%;
|
|
5
|
-
// height: 200px;
|
|
6
|
-
// background-color: #F8F8F9;
|
|
7
|
-
border-radius: 8px;
|
|
8
|
-
|
|
9
|
-
.rc-card-detail_header-data {
|
|
10
|
-
display: flex;
|
|
11
|
-
// gap: @gap;
|
|
12
|
-
justify-content: space-between;
|
|
13
|
-
}
|
|
14
|
-
// .rc-card-detail_header-target-item {
|
|
15
|
-
// border: 1px solid rgba(0, 0, 0, 0);
|
|
16
|
-
// }
|
|
17
|
-
.rc-card-detail_header-target {
|
|
18
|
-
z-index: 1;
|
|
19
|
-
display: flex;
|
|
20
|
-
flex: 1;
|
|
21
|
-
gap: @gap;
|
|
22
|
-
justify-content: space-between;
|
|
23
|
-
padding: 0 @gap @gap @gap;
|
|
24
|
-
background-color: #fff;
|
|
25
|
-
border-radius: 8px;
|
|
26
|
-
&:hover {
|
|
27
|
-
.rc-card-detail_header-target-item {
|
|
28
|
-
border: 1px solid #487ffb;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// .rc-card-detail_filter {
|
|
34
|
-
// width: 120px;
|
|
35
|
-
// padding: @gap 0;
|
|
36
|
-
// }
|
|
37
|
-
|
|
38
|
-
.rc-card-detail_filter-content {
|
|
39
|
-
position: relative;
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
align-items: center;
|
|
43
|
-
justify-content: center;
|
|
44
|
-
width: 100%;
|
|
45
|
-
height: 100%;
|
|
46
|
-
background-color: #f8f8f9;
|
|
47
|
-
border-radius: 8px;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.rc-card-detail_filter {
|
|
51
|
-
display: flex;
|
|
52
|
-
align-items: center;
|
|
53
|
-
justify-content: center;
|
|
54
|
-
width: 120px;
|
|
55
|
-
padding: 0 0 @gap 0;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.rc-card-detail_filter-content-before {
|
|
59
|
-
&::before {
|
|
60
|
-
position: absolute;
|
|
61
|
-
bottom: -20px;
|
|
62
|
-
left: 0;
|
|
63
|
-
width: 104%;
|
|
64
|
-
height: 30px;
|
|
65
|
-
background-color: #f8f8f9;
|
|
66
|
-
content: '';
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.rc-card-detail_target-before {
|
|
71
|
-
position: relative;
|
|
72
|
-
|
|
73
|
-
&::before {
|
|
74
|
-
position: absolute;
|
|
75
|
-
width: 100%;
|
|
76
|
-
content: '';
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.rc-card-detail_list {
|
|
81
|
-
position: relative;
|
|
82
|
-
// height: 200px;
|
|
83
|
-
width: 100%;
|
|
84
|
-
background-color: #f8f8f9;
|
|
85
|
-
border-top-right-radius: 8px;
|
|
86
|
-
border-bottom-right-radius: 8px;
|
|
87
|
-
border-bottom-left-radius: 8px;
|
|
88
|
-
|
|
89
|
-
&::before {
|
|
90
|
-
position: absolute;
|
|
91
|
-
width: 100%;
|
|
92
|
-
content: '';
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.rc-dard-detail_list-empty {
|
|
96
|
-
position: absolute;
|
|
97
|
-
top: 50%;
|
|
98
|
-
right: 0;
|
|
99
|
-
left: 0;
|
|
100
|
-
margin: 0;
|
|
101
|
-
transform: translateY(-50%);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.rc-card-detail_filter-name {
|
|
106
|
-
// margin-right: 12px;
|
|
107
|
-
// color: #008dff;
|
|
108
|
-
font-size: 16px;
|
|
109
|
-
|
|
110
|
-
.rc-card-detail_setting {
|
|
111
|
-
font-size: 14px;
|
|
112
|
-
cursor: pointer;
|
|
113
|
-
&:hover {
|
|
114
|
-
color: #008dff;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
.rc-card-detail_list-item {
|
|
120
|
-
display: flex;
|
|
121
|
-
gap: @gap;
|
|
122
|
-
width: 100%;
|
|
123
|
-
cursor: pointer;
|
|
124
|
-
&:hover {
|
|
125
|
-
.rc-card-detail_header-target-item {
|
|
126
|
-
border: 1px solid #487ffb;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.rc-card-detail_list-header {
|
|
132
|
-
display: flex;
|
|
133
|
-
align-items: center;
|
|
134
|
-
justify-content: center;
|
|
135
|
-
color: #262626;
|
|
136
|
-
font-weight: 500;
|
|
137
|
-
font-size: 14px;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.rc-card-detail_popover-content {
|
|
142
|
-
.rc-card-detail_popover-content_item {
|
|
143
|
-
position: relative;
|
|
144
|
-
display: flex;
|
|
145
|
-
align-items: center;
|
|
146
|
-
width: 155px;
|
|
147
|
-
padding: 10px 12px;
|
|
148
|
-
color: #262626;
|
|
149
|
-
font-size: 14px;
|
|
150
|
-
cursor: pointer;
|
|
151
|
-
|
|
152
|
-
&:hover {
|
|
153
|
-
background: #f5f5f5;
|
|
154
|
-
border-radius: 4px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.active {
|
|
158
|
-
position: absolute;
|
|
159
|
-
top: 50%;
|
|
160
|
-
right: 12px;
|
|
161
|
-
transform: translateY(-50%);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { TargetBlockProps } from '../TargetBlock/interface';
|
|
2
|
-
export interface CardDetailProps {
|
|
3
|
-
loading: boolean;
|
|
4
|
-
columns: TargetBlockProps[];
|
|
5
|
-
request: (data: any) => Promise<any>;
|
|
6
|
-
handleClick?: (data?: any) => void;
|
|
7
|
-
filter: {
|
|
8
|
-
columns: Array<{
|
|
9
|
-
label: string;
|
|
10
|
-
key: string;
|
|
11
|
-
dim: Array<{
|
|
12
|
-
name: string;
|
|
13
|
-
description: string;
|
|
14
|
-
alias: string;
|
|
15
|
-
}>;
|
|
16
|
-
}>;
|
|
17
|
-
};
|
|
18
|
-
list: {
|
|
19
|
-
columns: TargetBlockProps[];
|
|
20
|
-
formatter: (data: any) => any;
|
|
21
|
-
request: (data: any) => Promise<any>;
|
|
22
|
-
handleClick: (data: {
|
|
23
|
-
record: any;
|
|
24
|
-
filter: any;
|
|
25
|
-
}) => void;
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export interface CardDetailRef {
|
|
29
|
-
refresh: (params: any) => void;
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import TargetBlock from "../TargetBlock";
|
|
4
|
-
import "./index.less";
|
|
5
|
-
import Icon from '@ant-design/icons';
|
|
6
|
-
var SvgIcon = function SvgIcon(props) {
|
|
7
|
-
var color = props.color;
|
|
8
|
-
return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
|
|
9
|
-
component: function component() {
|
|
10
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
11
|
-
width: "29px",
|
|
12
|
-
height: "14px",
|
|
13
|
-
viewBox: "0 0 29 14"
|
|
14
|
-
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
15
|
-
x1: "50%",
|
|
16
|
-
y1: "9.31946221%",
|
|
17
|
-
x2: "50%",
|
|
18
|
-
y2: "100%",
|
|
19
|
-
id: "" + color
|
|
20
|
-
}, /*#__PURE__*/React.createElement("stop", {
|
|
21
|
-
stopColor: color,
|
|
22
|
-
stopOpacity: "0",
|
|
23
|
-
offset: "0%"
|
|
24
|
-
}), /*#__PURE__*/React.createElement("stop", {
|
|
25
|
-
stopColor: color,
|
|
26
|
-
stopOpacity: "0.851234703",
|
|
27
|
-
offset: "100%"
|
|
28
|
-
}))), /*#__PURE__*/React.createElement("g", {
|
|
29
|
-
stroke: "none",
|
|
30
|
-
strokeWidth: "1",
|
|
31
|
-
fill: "none",
|
|
32
|
-
fillRule: "evenodd"
|
|
33
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
34
|
-
transform: "translate(-1147.000000, -709.000000)",
|
|
35
|
-
fill: "url(#" + color + ")"
|
|
36
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
37
|
-
d: "M1148.1208,715 L1154.57983,715 L1154.57983,715 L1152.36141,707.93602 C1152.27868,707.672564 1152.42518,707.391919 1152.68863,707.309181 C1152.78332,707.279445 1152.88471,707.27856 1152.9799,707.306639 L1161.5,709.819817 L1161.5,709.819817 L1169.72517,707.31419 C1169.98932,707.23372 1170.2687,707.382628 1170.34917,707.646785 C1170.37803,707.74152 1170.3781,707.842691 1170.34939,707.937469 L1168.20961,715 L1168.20961,715 L1174.8792,715 C1175.15534,715 1175.3792,715.223858 1175.3792,715.5 C1175.3792,715.689491 1175.27208,715.8627 1175.10254,715.947344 L1161.72335,722.627174 C1161.58272,722.697381 1161.41728,722.697381 1161.27665,722.627174 L1147.89746,715.947344 C1147.6504,715.823994 1147.55011,715.523716 1147.67346,715.276655 C1147.7581,715.107119 1147.93131,715 1148.1208,715 Z",
|
|
38
|
-
id: "\u77E9\u5F62\u5907\u4EFD-11"
|
|
39
|
-
}))));
|
|
40
|
-
}
|
|
41
|
-
}));
|
|
42
|
-
};
|
|
43
|
-
var StepBlock = function StepBlock(props) {
|
|
44
|
-
var _data$dataIndex;
|
|
45
|
-
var title = props.title,
|
|
46
|
-
_props$style = props.style,
|
|
47
|
-
style = _props$style === void 0 ? {} : _props$style,
|
|
48
|
-
data = props.data,
|
|
49
|
-
dataIndex = props.dataIndex,
|
|
50
|
-
_props$valueStyle = props.valueStyle,
|
|
51
|
-
valueStyle = _props$valueStyle === void 0 ? {} : _props$valueStyle,
|
|
52
|
-
_props$columns = props.columns,
|
|
53
|
-
columns = _props$columns === void 0 ? [] : _props$columns,
|
|
54
|
-
_props$direction = props.direction,
|
|
55
|
-
direction = _props$direction === void 0 ? 'vertical' : _props$direction;
|
|
56
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
57
|
-
className: "rc-step-block",
|
|
58
|
-
style: style
|
|
59
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
60
|
-
className: "rc-step-block_title"
|
|
61
|
-
}, title), /*#__PURE__*/React.createElement("span", {
|
|
62
|
-
className: "rc-step-block_value",
|
|
63
|
-
style: valueStyle
|
|
64
|
-
}, (_data$dataIndex = data === null || data === void 0 ? void 0 : data[dataIndex]) !== null && _data$dataIndex !== void 0 ? _data$dataIndex : '')), /*#__PURE__*/React.createElement("div", {
|
|
65
|
-
className: "rc-step-block_content",
|
|
66
|
-
style: direction === 'horizontal' ? {
|
|
67
|
-
flexDirection: direction === 'horizontal' ? 'row' : 'column',
|
|
68
|
-
flex: 1,
|
|
69
|
-
display: 'flex'
|
|
70
|
-
} : {}
|
|
71
|
-
}, columns.map(function (column) {
|
|
72
|
-
var _column$;
|
|
73
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
74
|
-
key: "" + (column === null || column === void 0 ? void 0 : (_column$ = column[0]) === null || _column$ === void 0 ? void 0 : _column$.dataIndex),
|
|
75
|
-
className: "rc-step-block_content-item",
|
|
76
|
-
style: direction === 'horizontal' ? {
|
|
77
|
-
flexDirection: direction === 'horizontal' ? 'row' : 'column',
|
|
78
|
-
flex: 1,
|
|
79
|
-
display: 'flex',
|
|
80
|
-
gap: '24px'
|
|
81
|
-
} : {}
|
|
82
|
-
}, Array.isArray(column) && (column === null || column === void 0 ? void 0 : column.map(function (target, idx) {
|
|
83
|
-
var _target$valueStyle;
|
|
84
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
85
|
-
key: target === null || target === void 0 ? void 0 : target.dataIndex,
|
|
86
|
-
className: "rc-step-block_content-target",
|
|
87
|
-
style: idx === column.length - 1 ? {} : {
|
|
88
|
-
marginBottom: '24px'
|
|
89
|
-
}
|
|
90
|
-
}, /*#__PURE__*/React.createElement(TargetBlock, _extends({}, target, {
|
|
91
|
-
valueStyle: _extends({
|
|
92
|
-
color: valueStyle.color
|
|
93
|
-
}, (_target$valueStyle = target === null || target === void 0 ? void 0 : target.valueStyle) !== null && _target$valueStyle !== void 0 ? _target$valueStyle : {}),
|
|
94
|
-
data: data,
|
|
95
|
-
style: _extends({
|
|
96
|
-
border: 'none'
|
|
97
|
-
}, target === null || target === void 0 ? void 0 : target.style)
|
|
98
|
-
})), idx < column.length - 1 && (target === null || target === void 0 ? void 0 : target.svgProps) && /*#__PURE__*/React.createElement("div", {
|
|
99
|
-
className: "rc-step-block_item-svg"
|
|
100
|
-
}, /*#__PURE__*/React.createElement(SvgIcon, target === null || target === void 0 ? void 0 : target.svgProps)));
|
|
101
|
-
})));
|
|
102
|
-
})));
|
|
103
|
-
};
|
|
104
|
-
export default StepBlock;
|