@cqsjjb/jjb-react-admin-component 3.0.22 → 3.0.23

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.
@@ -5,7 +5,21 @@ import { FilePdfOutlined, LinkOutlined } from '@ant-design/icons';
5
5
  import { Modal, Descriptions, Empty, Image, Tooltip, Tag, Spin } from 'antd';
6
6
  const formilyItemMargin = new Map([['small', 8], ['middle', 12], ['default', 16]]);
7
7
  export default function FormilyDescriptions(props) {
8
- const dataSource = tools.getDynamicFormilyFields(props.schema, props.values);
8
+ const [regions, setRegions] = React.useState([]);
9
+ React.useEffect(() => {
10
+ fetch(`${window.location.origin}/system/operation/regions`, {
11
+ headers: {
12
+ token: sessionStorage.token
13
+ }
14
+ }).then(res => res.json()).then(res => {
15
+ if (res.success) {
16
+ setRegions(res.data);
17
+ }
18
+ });
19
+ }, []);
20
+ const dataSource = tools.getDynamicFormilyFields(props.schema, props.values, {
21
+ regions
22
+ });
9
23
  return dataSource.length === 0 ? /*#__PURE__*/React.createElement(Empty, {
10
24
  image: Empty.PRESENTED_IMAGE_SIMPLE
11
25
  }) : /*#__PURE__*/React.createElement(React.Fragment, null, dataSource.map((item, index) => {
@@ -11,7 +11,18 @@ const formilyItemMargin = new Map([
11
11
  ]);
12
12
 
13
13
  export default function FormilyDescriptions(props) {
14
- const dataSource = tools.getDynamicFormilyFields(props.schema, props.values);
14
+ const [ regions, setRegions ] = React.useState([]);
15
+
16
+ React.useEffect(() => {
17
+ fetch(`${window.location.origin}/system/operation/regions`, { headers: { token: sessionStorage.token } }).then(res => res.json()).then(res => {
18
+ if (res.success) {
19
+ setRegions(res.data);
20
+ }
21
+ });
22
+ }, []);
23
+
24
+ const dataSource = tools.getDynamicFormilyFields(props.schema, props.values, { regions });
25
+
15
26
  return dataSource.length === 0
16
27
  ? <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
17
28
  : (
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cqsjjb/jjb-react-admin-component",
3
- "version": "3.0.22",
3
+ "version": "3.0.23",
4
4
  "description": "jjb-react-admin-组件库@new",
5
5
  "main": "index.js",
6
6
  "author": "jjb-front-team",