@zgfe/modules-settings 2.0.0-zhongyuan.9 → 2.1.0-zhongyuan-set.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -33
- package/es/components/card/index.less +87 -87
- package/es/components/importMetaDialog/index.d.ts +13 -0
- package/es/components/importMetaDialog/index.js +217 -0
- package/es/components/importMetaDialog/styles/index.less +115 -0
- package/es/components/pageLoading/index.less +7 -7
- package/es/components/picCircleSelect/bak/index copy 2.tsx.bak +92 -92
- package/es/components/picCircleSelect/bak/index copy 3.tsx.bak +58 -58
- package/es/components/picCircleSelect/bak/index copy 4.tsx.bak +66 -66
- package/es/components/picCircleSelect/bak/index copy 5.tsx.bak +116 -116
- package/es/components/picCircleSelect/bak/index copy 6.tsx.bak +116 -116
- package/es/components/picCircleSelect/bak/index copy.tsx.bak +41 -41
- package/es/components/picCircleSelect/bak/index.tsx.bak +48 -48
- package/es/components/picCircleSelect/bak/index1.tsx.bak +46 -46
- package/es/components/picCircleSelect/bak/index2.tsx.bak +104 -104
- package/es/components/picCircleSelect/index.less +37 -37
- package/es/components/processCanvas/styles/customNode.less +149 -149
- package/es/components/processCanvas/styles/index.less +34 -34
- package/es/components/settingTabs/index.less +51 -51
- package/es/constants/api.d.ts +30 -0
- package/es/constants/api.js +43 -1
- package/es/constants/icons/demo.css +539 -539
- package/es/constants/icons/demo_index.html +9871 -9871
- package/es/constants/icons/iconfont.css +1699 -1699
- package/es/constants/icons/iconfont.json +2956 -2956
- package/es/global.d.ts +4 -4
- package/es/modules/appSettings/dataAccessFilter/index.js +2 -1
- package/es/modules/appSettings/dataAccessFilter/index.less +5 -5
- package/es/modules/appSettings/virtualSource/styles/index.less +28 -28
- package/es/modules/appSettings/virtualSource/styles/table.less +51 -51
- package/es/modules/companySetting/appList/index.less +126 -126
- package/es/modules/companySetting/application/applicationForm.d.ts +1 -0
- package/es/modules/companySetting/application/applicationForm.js +34 -4
- package/es/modules/companySetting/application/index.d.ts +13 -0
- package/es/modules/companySetting/application/index.js +276 -104
- package/es/modules/companySetting/application/index.less +144 -126
- package/es/modules/companySetting/business/index.less +92 -92
- package/es/modules/companySetting/cost/index.less +38 -38
- package/es/modules/companySetting/department/index.less +157 -157
- package/es/modules/companySetting/edit/styles/authConfig.less +3 -3
- package/es/modules/companySetting/edit/styles/authGroup.less +10 -10
- package/es/modules/companySetting/edit/styles/authModule.less +82 -82
- package/es/modules/companySetting/edit/styles/user.less +54 -54
- package/es/modules/companySetting/edit/styles/userGroup.less +44 -44
- package/es/modules/companySetting/index.js +37 -33
- package/es/modules/companySetting/index.less +90 -90
- package/es/modules/companySetting/info/index.less +42 -42
- package/es/modules/companySetting/mainPart/images/img2.svg +12 -12
- package/es/modules/companySetting/mainPart/index.less +239 -239
- package/es/modules/companySetting/operationLog/index.js +22 -5
- package/es/modules/companySetting/operationLog/index.less +33 -33
- package/es/modules/companySetting/role/index.less +296 -296
- package/es/modules/companySetting/role/setDataRangeDialog/index.less +37 -37
- package/es/modules/companySetting/style/common.less +79 -79
- package/es/modules/companySetting/style/reset.less +117 -117
- package/es/modules/companySetting/user/index.js +29 -24
- package/es/modules/companySetting/user/index.less +363 -363
- package/es/modules/companySetting/user/invite.js +30 -102
- package/es/modules/companySetting/virtualApp/styles/config.less +37 -37
- package/es/modules/companySetting/virtualApp/styles/index.less +21 -21
- package/es/modules/companySetting/virtualApp/styles/list.less +28 -28
- package/es/modules/companySetting/virtualApp/styles/sourceItem.less +33 -33
- package/es/modules/companySetting/virtualApp/styles/table.less +44 -44
- package/es/modules/companySetting/wechatBinding/index.less +58 -58
- package/es/modules/createDemand/constants.d.ts +15 -2
- package/es/modules/createDemand/constants.js +57 -4
- package/es/modules/createDemand/demo/selectPoint.js +1 -2
- package/es/modules/createDemand/index.d.ts +0 -1
- package/es/modules/createDemand/index.js +793 -179
- package/es/modules/createDemand/styles/index.less +403 -277
- package/es/modules/createDemand_bf/demo/index.js +0 -1
- package/es/modules/createDemand_bf/index.js +0 -1
- package/es/modules/createDemand_bf/styles/index.less +222 -222
- package/es/modules/createProcess/components/index.less +52 -52
- package/es/modules/createProcess/index.less +114 -114
- package/es/modules/createProcess/title/index.less +53 -53
- package/es/modules/dealDemand/demo/index.js +0 -1
- package/es/modules/dealDemand/demo/selectPoint.js +1 -1
- package/es/modules/dealDemand/index.js +0 -2
- package/es/modules/dealDemand/styles/index.less +265 -265
- package/es/modules/demandManage/index.js +174 -178
- package/es/modules/demandManage/styles/index.less +8 -68
- package/es/modules/getPassword/index.less +122 -122
- package/es/modules/messageList/index.d.ts +1 -1
- package/es/modules/messageList/index.js +6 -6
- package/es/modules/messageList/index.less +81 -81
- package/es/modules/personalSetting/demo/index.d.ts +3 -0
- package/es/modules/personalSetting/demo/index.js +12 -0
- package/es/modules/personalSetting/index.js +11 -1
- package/es/modules/personalSetting/info/index.js +23 -5
- package/es/modules/personalSetting/securityLog/index.less +11 -11
- package/es/modules/personalSetting/styles/unbinding.less +73 -73
- package/es/modules/pointMap/ImportModal/styles/index.less +91 -91
- package/es/modules/pointMap/createMetaDrawer.d.ts +5 -0
- package/es/modules/pointMap/createMetaDrawer.js +825 -0
- package/es/modules/pointMap/editTxt/index.less +55 -55
- package/es/modules/pointMap/pageInfo.js +401 -179
- package/es/modules/pointMap/record.d.ts +7 -0
- package/es/modules/pointMap/record.js +521 -0
- package/es/modules/pointMap/styles/index.less +165 -38
- package/es/modules/pointMap/styles/pageInfo.less +439 -244
- package/es/modules/pointMap/styles/tree.css +164 -145
- package/es/modules/pointMap/styles/tree.less +174 -149
- package/es/modules/pointMap/tree.js +232 -88
- package/es/modules/pointMap/types.d.ts +88 -0
- package/es/modules/pointMap/types.js +1 -0
- package/es/modules/systemSetting/Dictionary.d.ts +5 -2
- package/es/modules/systemSetting/Dictionary.js +54 -370
- package/es/modules/systemSetting/approvalmanage/approvalStrategy/index.less +14 -14
- package/es/modules/systemSetting/approvalmanage/index.less +5 -5
- package/es/modules/systemSetting/approvalmanage/processManage/index.less +39 -39
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/create.d.ts +9 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/create.js +245 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/css/index.less +48 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/index.d.ts +4 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/index.js +207 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/type/index.d.ts +10 -0
- package/es/modules/systemSetting/dictionaryItem/dictionaryManagement/type/index.js +1 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/create.d.ts +10 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/create.js +124 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/css/index.less +32 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/index.d.ts +7 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/index.js +264 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/type/index.d.ts +9 -0
- package/es/modules/systemSetting/dictionaryItem/eventTagManagement/type/index.js +1 -0
- package/es/modules/systemSetting/document-setting/index.js +7 -6
- package/es/modules/systemSetting/index.css +161 -161
- package/es/modules/systemSetting/index.js +16 -16
- package/es/modules/systemSetting/index.less +169 -169
- package/es/modules/systemSetting/notice/configItem/index.less +21 -21
- package/es/modules/systemSetting/notice/edit/index.less +26 -26
- package/es/types/personal.d.ts +1 -0
- package/package.json +74 -74
package/README.md
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
# @zgfe/modules-settings
|
|
2
|
-
|
|
3
|
-
## Getting Started
|
|
4
|
-
|
|
5
|
-
Install dependencies,
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
$ npm i
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
Start the dev server,
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
$ npm start
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Build documentation,
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
$ npm run docs:build
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Run test,
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
$ npm test
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Build library via `father`,
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
$ npm run build
|
|
33
|
-
```
|
|
1
|
+
# @zgfe/modules-settings
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
Install dependencies,
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
$ npm i
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Start the dev server,
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
$ npm start
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Build documentation,
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
$ npm run docs:build
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Run test,
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
$ npm test
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Build library via `father`,
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
$ npm run build
|
|
33
|
+
```
|
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
@import '../../constants/icons/iconfont.css';
|
|
2
|
-
|
|
3
|
-
.settings-card {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
gap: 16px;
|
|
7
|
-
align-items: flex-start;
|
|
8
|
-
// min-width: 368px;
|
|
9
|
-
// max-width: 368px;
|
|
10
|
-
height: 114px;
|
|
11
|
-
padding: 16px;
|
|
12
|
-
background-color: #fafafb;
|
|
13
|
-
border: 1px solid #f2f3f4;
|
|
14
|
-
border-radius: 8px;
|
|
15
|
-
|
|
16
|
-
&-header {
|
|
17
|
-
display: flex;
|
|
18
|
-
justify-content: space-between;
|
|
19
|
-
width: 100%;
|
|
20
|
-
line-height: 22px;
|
|
21
|
-
|
|
22
|
-
&-title {
|
|
23
|
-
display: flex;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
color: var(--io-N-, #021429);
|
|
26
|
-
font-weight: 500;
|
|
27
|
-
font-size: 14px;
|
|
28
|
-
font-size: 14px;
|
|
29
|
-
font-family: 'PingFang SC';
|
|
30
|
-
font-style: normal;
|
|
31
|
-
|
|
32
|
-
div {
|
|
33
|
-
width: 100%;
|
|
34
|
-
overflow: hidden;
|
|
35
|
-
white-space: nowrap;
|
|
36
|
-
text-align: left;
|
|
37
|
-
text-overflow: ellipsis;
|
|
38
|
-
cursor: pointer;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
.ant-tag {
|
|
42
|
-
flex: 0;
|
|
43
|
-
height: 24px;
|
|
44
|
-
margin: 0 8px;
|
|
45
|
-
padding: 1px 8px;
|
|
46
|
-
color: var(--io-i-, #165dff);
|
|
47
|
-
font-weight: 400;
|
|
48
|
-
font-family: 'PingFang SC';
|
|
49
|
-
background: var(--io-i1-, #e8efff);
|
|
50
|
-
border-radius: 2px;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&-btnNodes {
|
|
55
|
-
display: flex;
|
|
56
|
-
gap: 16px;
|
|
57
|
-
color: var(--io-N4-, #9aa1a9);
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
&-content {
|
|
63
|
-
width: 100%;
|
|
64
|
-
color: var(--io-N6-, #67727f);
|
|
65
|
-
&-item {
|
|
66
|
-
&-platform {
|
|
67
|
-
display: block;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
&-empty {
|
|
73
|
-
display: flex;
|
|
74
|
-
align-items: center;
|
|
75
|
-
justify-content: center;
|
|
76
|
-
padding: 31px 0;
|
|
77
|
-
color: var(--io-i-, #165dff);
|
|
78
|
-
line-height: 1;
|
|
79
|
-
background: none;
|
|
80
|
-
cursor: pointer;
|
|
81
|
-
|
|
82
|
-
.bsicon {
|
|
83
|
-
color: var(--io-i-, #165dff);
|
|
84
|
-
font-size: 24px !important;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
1
|
+
@import '../../constants/icons/iconfont.css';
|
|
2
|
+
|
|
3
|
+
.settings-card {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 16px;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
// min-width: 368px;
|
|
9
|
+
// max-width: 368px;
|
|
10
|
+
height: 114px;
|
|
11
|
+
padding: 16px;
|
|
12
|
+
background-color: #fafafb;
|
|
13
|
+
border: 1px solid #f2f3f4;
|
|
14
|
+
border-radius: 8px;
|
|
15
|
+
|
|
16
|
+
&-header {
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: space-between;
|
|
19
|
+
width: 100%;
|
|
20
|
+
line-height: 22px;
|
|
21
|
+
|
|
22
|
+
&-title {
|
|
23
|
+
display: flex;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
color: var(--io-N-, #021429);
|
|
26
|
+
font-weight: 500;
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
font-size: 14px;
|
|
29
|
+
font-family: 'PingFang SC';
|
|
30
|
+
font-style: normal;
|
|
31
|
+
|
|
32
|
+
div {
|
|
33
|
+
width: 100%;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
white-space: nowrap;
|
|
36
|
+
text-align: left;
|
|
37
|
+
text-overflow: ellipsis;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ant-tag {
|
|
42
|
+
flex: 0;
|
|
43
|
+
height: 24px;
|
|
44
|
+
margin: 0 8px;
|
|
45
|
+
padding: 1px 8px;
|
|
46
|
+
color: var(--io-i-, #165dff);
|
|
47
|
+
font-weight: 400;
|
|
48
|
+
font-family: 'PingFang SC';
|
|
49
|
+
background: var(--io-i1-, #e8efff);
|
|
50
|
+
border-radius: 2px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&-btnNodes {
|
|
55
|
+
display: flex;
|
|
56
|
+
gap: 16px;
|
|
57
|
+
color: var(--io-N4-, #9aa1a9);
|
|
58
|
+
cursor: pointer;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&-content {
|
|
63
|
+
width: 100%;
|
|
64
|
+
color: var(--io-N6-, #67727f);
|
|
65
|
+
&-item {
|
|
66
|
+
&-platform {
|
|
67
|
+
display: block;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&-empty {
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: center;
|
|
76
|
+
padding: 31px 0;
|
|
77
|
+
color: var(--io-i-, #165dff);
|
|
78
|
+
line-height: 1;
|
|
79
|
+
background: none;
|
|
80
|
+
cursor: pointer;
|
|
81
|
+
|
|
82
|
+
.bsicon {
|
|
83
|
+
color: var(--io-i-, #165dff);
|
|
84
|
+
font-size: 24px !important;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './styles/index.less';
|
|
3
|
+
declare const ImportModal: React.FC<{
|
|
4
|
+
onCancel?: () => void;
|
|
5
|
+
onSuccess?: (result: any) => void;
|
|
6
|
+
isExportList?: Boolean;
|
|
7
|
+
downloadTempleUrl: string;
|
|
8
|
+
uploadFile: string;
|
|
9
|
+
fileName?: string;
|
|
10
|
+
params?: any;
|
|
11
|
+
showHistory?: boolean;
|
|
12
|
+
}>;
|
|
13
|
+
export default ImportModal;
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
5
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
8
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
+
import { BizDialog, BizGlobalDataContext, IconFont } from '@zgfe/business-lib';
|
|
14
|
+
import React, { useContext, useState } from 'react';
|
|
15
|
+
import { Upload, Spin, message, Button, Modal } from 'antd';
|
|
16
|
+
import { LoadingOutlined } from '@ant-design/icons';
|
|
17
|
+
import './styles/index.less';
|
|
18
|
+
import request from '../../utils/ajax';
|
|
19
|
+
var Dragger = Upload.Dragger;
|
|
20
|
+
var classPrefix = 'import-meta-modal';
|
|
21
|
+
var ImportModal = function ImportModal(props) {
|
|
22
|
+
//导入详情
|
|
23
|
+
var _useState = useState(false),
|
|
24
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
25
|
+
openImportModalResult = _useState2[0],
|
|
26
|
+
setOpenImportModalResult = _useState2[1];
|
|
27
|
+
var _useState3 = useState(),
|
|
28
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
29
|
+
errorLoc = _useState4[0],
|
|
30
|
+
setErrorLoc = _useState4[1];
|
|
31
|
+
var handleImportResultOk = function handleImportResultOk() {
|
|
32
|
+
props.onSuccess && props.onSuccess({});
|
|
33
|
+
setErrorLoc(undefined);
|
|
34
|
+
};
|
|
35
|
+
var _useState5 = useState(),
|
|
36
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
37
|
+
fileData = _useState6[0],
|
|
38
|
+
setFileData = _useState6[1];
|
|
39
|
+
var _useState7 = useState(false),
|
|
40
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
41
|
+
uploading = _useState8[0],
|
|
42
|
+
setUploading = _useState8[1];
|
|
43
|
+
var _useState9 = useState(false),
|
|
44
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
45
|
+
loading = _useState10[0],
|
|
46
|
+
setLoading = _useState10[1];
|
|
47
|
+
var _useContext = useContext(BizGlobalDataContext),
|
|
48
|
+
currentApp = _useContext.currentApp,
|
|
49
|
+
isDemo = _useContext.isDemo;
|
|
50
|
+
var UploadProps = {
|
|
51
|
+
name: 'file',
|
|
52
|
+
maxCount: 1,
|
|
53
|
+
accept: '.xls,.xlsx',
|
|
54
|
+
showUploadList: false,
|
|
55
|
+
onChange: function onChange(info) {
|
|
56
|
+
var _info$file = info.file,
|
|
57
|
+
status = _info$file.status,
|
|
58
|
+
size = _info$file.size;
|
|
59
|
+
var isLt10M = size / 1024 / 1024 < 10;
|
|
60
|
+
setUploading(status === 'uploading');
|
|
61
|
+
if (status !== 'uploading') {
|
|
62
|
+
if (info.fileList.length > 0 && isLt10M) {
|
|
63
|
+
setFileData(info.fileList[0].originFileObj);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (status === 'removed') {} else if (status === 'error') {}
|
|
67
|
+
},
|
|
68
|
+
beforeUpload: function beforeUpload(file) {
|
|
69
|
+
var isLt10M = file.size / 1024 / 1024 < 10;
|
|
70
|
+
if (!isLt10M) {
|
|
71
|
+
message.error('支持 xls、xlsx 格式,最大10M');
|
|
72
|
+
}
|
|
73
|
+
return false;
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
// 下载模板
|
|
77
|
+
var onDownloadTemplate = function onDownloadTemplate() {
|
|
78
|
+
// window.open(`/元数据-批量上传事件模板.xlsx`);
|
|
79
|
+
request(props.downloadTempleUrl, {
|
|
80
|
+
method: 'post',
|
|
81
|
+
data: {},
|
|
82
|
+
responseType: 'blob',
|
|
83
|
+
fileName: props.fileName || '导入模板'
|
|
84
|
+
}).then(function (res) {});
|
|
85
|
+
};
|
|
86
|
+
// 上传文件
|
|
87
|
+
var onOk = function onOk() {
|
|
88
|
+
if (!fileData) {
|
|
89
|
+
message.warning('请选择文件');
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
var formData = new FormData();
|
|
93
|
+
formData.append('appId', currentApp.appId);
|
|
94
|
+
formData.append('file', fileData);
|
|
95
|
+
if (props.params) {
|
|
96
|
+
for (var key in props.params) {
|
|
97
|
+
formData.append(key, props.params[key]);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
setLoading(true);
|
|
101
|
+
request(props.uploadFile, {
|
|
102
|
+
method: 'post',
|
|
103
|
+
data: formData
|
|
104
|
+
}).then(function (res) {
|
|
105
|
+
if (!res) return;
|
|
106
|
+
//进入历史记录
|
|
107
|
+
if (props.showHistory && res.data) {
|
|
108
|
+
setOpenImportModalResult(true);
|
|
109
|
+
setErrorLoc({
|
|
110
|
+
successLocCount: res.data['导入成功条数'],
|
|
111
|
+
failedLocCount: res.data['导入失败条数'],
|
|
112
|
+
failedLocNames: res.data['导入失败标签名']
|
|
113
|
+
});
|
|
114
|
+
} else {
|
|
115
|
+
message.success('导入成功');
|
|
116
|
+
props.onSuccess && props.onSuccess(res.data);
|
|
117
|
+
}
|
|
118
|
+
}).catch(function (e) {
|
|
119
|
+
console.log(e);
|
|
120
|
+
}).finally(function () {
|
|
121
|
+
setLoading(false);
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BizDialog, {
|
|
125
|
+
title: "\u5BFC\u5165\u5C5E\u6027\u503C",
|
|
126
|
+
open: true,
|
|
127
|
+
className: classPrefix,
|
|
128
|
+
onCancel: props.onCancel,
|
|
129
|
+
onOk: onOk,
|
|
130
|
+
confirmLoading: loading,
|
|
131
|
+
okButtonProps: {
|
|
132
|
+
disabled: isDemo
|
|
133
|
+
},
|
|
134
|
+
closable: true,
|
|
135
|
+
closeIcon: /*#__PURE__*/React.createElement(IconFont, {
|
|
136
|
+
type: "qingchu"
|
|
137
|
+
}),
|
|
138
|
+
footer: /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
className: "".concat(classPrefix, "-footer")
|
|
140
|
+
}, /*#__PURE__*/React.createElement("a", {
|
|
141
|
+
className: "".concat(classPrefix, "-export-btn"),
|
|
142
|
+
onClick: onDownloadTemplate
|
|
143
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
144
|
+
type: "xiazai1",
|
|
145
|
+
className: "".concat(classPrefix, "-icon-export")
|
|
146
|
+
}), "\u4E0B\u8F7D\u5BFC\u5165\u6A21\u7248"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
147
|
+
onClick: props.onCancel
|
|
148
|
+
}, "\u53D6\u6D88"), /*#__PURE__*/React.createElement(Button, {
|
|
149
|
+
type: "primary",
|
|
150
|
+
onClick: onOk
|
|
151
|
+
}, "\u786E\u5B9A")))
|
|
152
|
+
}, /*#__PURE__*/React.createElement(Spin, {
|
|
153
|
+
className: "".concat(classPrefix, "-spin"),
|
|
154
|
+
spinning: uploading,
|
|
155
|
+
tip: "\u4E0A\u4F20\u4E2D",
|
|
156
|
+
indicator: /*#__PURE__*/React.createElement(LoadingOutlined, {
|
|
157
|
+
className: "".concat(classPrefix, "-spin-icon"),
|
|
158
|
+
spin: true,
|
|
159
|
+
onPointerEnterCapture: undefined,
|
|
160
|
+
onPointerLeaveCapture: undefined
|
|
161
|
+
})
|
|
162
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
163
|
+
style: {
|
|
164
|
+
marginBottom: 16
|
|
165
|
+
}
|
|
166
|
+
}, "\u5141\u8BB8\u4ECE\u6587\u4EF6\u6279\u91CF\u521B\u5EFA\u5C5E\u6027\u503C\u3002"), fileData ? (/*#__PURE__*/React.createElement("div", {
|
|
167
|
+
className: "".concat(classPrefix, "-show-container")
|
|
168
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
169
|
+
className: "".concat(classPrefix, "-show-container-content")
|
|
170
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
171
|
+
type: "file-excel",
|
|
172
|
+
className: "".concat(classPrefix, "-show-container-content-icon")
|
|
173
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
174
|
+
className: "".concat(classPrefix, "-show-container-content-file")
|
|
175
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
176
|
+
className: "".concat(classPrefix, "-show-container-content-file-title")
|
|
177
|
+
}, fileData.name), /*#__PURE__*/React.createElement("div", {
|
|
178
|
+
className: "".concat(classPrefix, "-show-container-content-file-size")
|
|
179
|
+
}, fileData.size ? (fileData.size / 1024).toFixed(1) : '', " kb"))), /*#__PURE__*/React.createElement(Upload, _objectSpread({}, UploadProps), /*#__PURE__*/React.createElement("a", {
|
|
180
|
+
className: "".concat(classPrefix, "-upload-txt")
|
|
181
|
+
}, "\u91CD\u65B0\u4E0A\u4F20")))) : (/*#__PURE__*/React.createElement(Dragger, _objectSpread({
|
|
182
|
+
className: "".concat(classPrefix, "-export-container")
|
|
183
|
+
}, UploadProps), /*#__PURE__*/React.createElement(IconFont, {
|
|
184
|
+
type: "file-add",
|
|
185
|
+
className: "".concat(classPrefix, "-icon-file")
|
|
186
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
187
|
+
className: "".concat(classPrefix, "-export-container-h1")
|
|
188
|
+
}, "\u5C06\u6570\u636E\u6587\u4EF6\u62D6\u5230\u6B64\u5904 \u6216", /*#__PURE__*/React.createElement("a", null, "\u70B9\u51FB\u4E0A\u4F20")), /*#__PURE__*/React.createElement("div", {
|
|
189
|
+
className: "".concat(classPrefix, "-export-container-h2")
|
|
190
|
+
}, "\u652F\u6301 xls\u3001xlsx \u683C\u5F0F\uFF0C\u6700\u592710M"))))), /*#__PURE__*/React.createElement(Modal, {
|
|
191
|
+
title: "\u5BFC\u5165\u6807\u7B7E",
|
|
192
|
+
open: openImportModalResult,
|
|
193
|
+
className: "exportList-importModal",
|
|
194
|
+
width: 600,
|
|
195
|
+
onOk: handleImportResultOk,
|
|
196
|
+
onCancel: handleImportResultOk,
|
|
197
|
+
footer: [/*#__PURE__*/React.createElement(Button, {
|
|
198
|
+
type: "primary",
|
|
199
|
+
onClick: handleImportResultOk
|
|
200
|
+
}, "\u786E\u5B9A")]
|
|
201
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
202
|
+
className: "exportList-importModal-content"
|
|
203
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
204
|
+
className: "exportList-importModal-tip"
|
|
205
|
+
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
206
|
+
type: "tishi1",
|
|
207
|
+
size: 16,
|
|
208
|
+
className: "icon"
|
|
209
|
+
}), "\u5BFC\u5165\u6210\u529F", errorLoc && errorLoc.successLocCount, "\u6761\uFF0C\u5BFC\u5165\u5931\u8D25", errorLoc && errorLoc.failedLocCount, "\u6761"), /*#__PURE__*/React.createElement("p", null, "\u5BFC\u5165\u5931\u8D25\u6807\u7B7E\u540D\uFF1A"), /*#__PURE__*/React.createElement("div", {
|
|
210
|
+
className: "exportList-importModal-list"
|
|
211
|
+
}, errorLoc === null || errorLoc === void 0 ? void 0 : errorLoc.failedLocNames.map(function (o, index) {
|
|
212
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
213
|
+
key: index
|
|
214
|
+
}, o);
|
|
215
|
+
})))));
|
|
216
|
+
};
|
|
217
|
+
export default ImportModal;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
+
|
|
3
|
+
.import-meta-modal {
|
|
4
|
+
&-icon-file {
|
|
5
|
+
color: @primary-color;
|
|
6
|
+
font-size: 48px !important;
|
|
7
|
+
}
|
|
8
|
+
&-icon-export {
|
|
9
|
+
margin-right: @margin-xss;
|
|
10
|
+
}
|
|
11
|
+
&-export-btn {
|
|
12
|
+
display: block;
|
|
13
|
+
width: fit-content;
|
|
14
|
+
// margin-top: @margin-md;
|
|
15
|
+
}
|
|
16
|
+
.ant-upload.ant-upload-drag {
|
|
17
|
+
background: #fafafb;
|
|
18
|
+
/* io/中性/N2-置灰信息 */
|
|
19
|
+
border: 1px dashed #ccd0d4;
|
|
20
|
+
}
|
|
21
|
+
.ant-upload.ant-upload-drag .ant-upload {
|
|
22
|
+
padding: 40px 0;
|
|
23
|
+
}
|
|
24
|
+
&-export-container {
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
&-h1 {
|
|
27
|
+
margin-top: -8px;
|
|
28
|
+
margin-bottom: 4px;
|
|
29
|
+
}
|
|
30
|
+
&-h2 {
|
|
31
|
+
color: @text-color-secondary;
|
|
32
|
+
font-size: 12px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&-show-container {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: space-between;
|
|
40
|
+
padding: 24px;
|
|
41
|
+
background: #fafafb;
|
|
42
|
+
/* io/中性/N1-按钮边框 线色 */
|
|
43
|
+
border: 1px solid #e6e7ea;
|
|
44
|
+
border-radius: 4px;
|
|
45
|
+
&-content {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
&-icon {
|
|
49
|
+
margin-right: 12px;
|
|
50
|
+
color: @primary-color;
|
|
51
|
+
font-size: 40px !important;
|
|
52
|
+
}
|
|
53
|
+
&-file {
|
|
54
|
+
&-title {
|
|
55
|
+
font-size: 16px;
|
|
56
|
+
}
|
|
57
|
+
&-size {
|
|
58
|
+
color: @text-color-secondary;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-spin {
|
|
66
|
+
background: #fafafb;
|
|
67
|
+
border: 1px solid #e6e7ea;
|
|
68
|
+
border-radius: 4px;
|
|
69
|
+
&-icon.anticon {
|
|
70
|
+
color: @primary-color;
|
|
71
|
+
font-size: 24px;
|
|
72
|
+
}
|
|
73
|
+
.ant-spin-text {
|
|
74
|
+
margin-top: @margin-xs;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&-upload-txt {
|
|
79
|
+
font-size: 16px;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.ant-modal-body {
|
|
83
|
+
padding-top: 8px !important;
|
|
84
|
+
}
|
|
85
|
+
&-footer {
|
|
86
|
+
display: flex;
|
|
87
|
+
flex-direction: row;
|
|
88
|
+
align-items: center;
|
|
89
|
+
justify-content: space-between;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
.exportList {
|
|
93
|
+
&-importModal {
|
|
94
|
+
&-content {
|
|
95
|
+
}
|
|
96
|
+
&-tip {
|
|
97
|
+
margin: 0px 0px 10px;
|
|
98
|
+
padding: 5px 0px 5px 15px;
|
|
99
|
+
background-color: #e7f3fe;
|
|
100
|
+
border: 1px solid #b8e4ff;
|
|
101
|
+
border-radius: 4px;
|
|
102
|
+
.icon {
|
|
103
|
+
margin: 0px 10px;
|
|
104
|
+
color: #165dff;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
&-list {
|
|
108
|
+
height: 160px;
|
|
109
|
+
padding: 10px;
|
|
110
|
+
overflow-y: scroll;
|
|
111
|
+
border: 1px solid #e5e5e5;
|
|
112
|
+
border-radius: 4px;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
.settings-page-loading {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
width: 100%;
|
|
6
|
-
height: 100%;
|
|
7
|
-
}
|
|
1
|
+
.settings-page-loading {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
width: 100%;
|
|
6
|
+
height: 100%;
|
|
7
|
+
}
|