@zgfe/modules-settings 1.2.51-zhongyuan.1 → 1.2.51-zhongyuan.8
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/demo/index.js +6 -6
- package/es/components/card/index.js +6 -6
- package/es/components/card/index.less +87 -87
- 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/demo/index.js +5 -5
- package/es/components/picCircleSelect/index.js +7 -8
- package/es/components/picCircleSelect/index.less +37 -37
- package/es/components/processCanvas/customNode/node_point.js +4 -4
- package/es/components/processCanvas/demo/index.js +5 -6
- package/es/components/processCanvas/index.js +11 -11
- package/es/components/processCanvas/styles/customNode.less +149 -149
- package/es/components/processCanvas/styles/index.less +34 -34
- package/es/components/processCanvas/toolbar.js +5 -5
- package/es/components/selectAppWrapper/index.js +14 -15
- package/es/components/settingTabs/index.js +5 -5
- package/es/components/settingTabs/index.less +51 -51
- package/es/constants/api.d.ts +13 -0
- package/es/constants/api.js +18 -2
- 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/appInfo/index.js +7 -7
- package/es/modules/appSettings/dataAccessFilter/index.js +5 -5
- package/es/modules/appSettings/dataAccessFilter/index.less +5 -5
- package/es/modules/appSettings/virtualSource/index.js +7 -7
- 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.js +12 -12
- package/es/modules/companySetting/appList/index.less +126 -126
- package/es/modules/companySetting/application/applicationForm.js +9 -9
- package/es/modules/companySetting/application/applicationSetting.js +5 -5
- package/es/modules/companySetting/application/index.js +28 -28
- package/es/modules/companySetting/application/index.less +126 -126
- package/es/modules/companySetting/business/businessForm.js +7 -7
- package/es/modules/companySetting/business/index.js +27 -27
- package/es/modules/companySetting/business/index.less +92 -92
- package/es/modules/companySetting/cost/index.js +20 -20
- package/es/modules/companySetting/cost/index.less +38 -38
- package/es/modules/companySetting/department/index.js +16 -16
- package/es/modules/companySetting/department/index.less +157 -157
- package/es/modules/companySetting/edit/authConfig.js +5 -5
- package/es/modules/companySetting/edit/authConfigCEP.js +11 -11
- package/es/modules/companySetting/edit/authGroup.js +13 -13
- package/es/modules/companySetting/edit/authModule.js +18 -18
- package/es/modules/companySetting/edit/multiAuthModule.js +13 -13
- 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/edit/user.js +14 -14
- package/es/modules/companySetting/edit/userGroup.js +16 -16
- package/es/modules/companySetting/index.js +29 -29
- package/es/modules/companySetting/index.less +90 -90
- package/es/modules/companySetting/info/index.js +7 -7
- 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.js +28 -28
- package/es/modules/companySetting/mainPart/index.less +239 -239
- package/es/modules/companySetting/mainPart/mainPartForm.js +13 -13
- package/es/modules/companySetting/mainPart/mainPartSetting.js +5 -5
- package/es/modules/companySetting/mainPart/useColumns.js +16 -16
- package/es/modules/companySetting/operationLog/index.js +13 -13
- package/es/modules/companySetting/operationLog/index.less +33 -33
- package/es/modules/companySetting/role/index.js +23 -23
- package/es/modules/companySetting/role/index.less +296 -296
- package/es/modules/companySetting/role/setDataRangeDialog/index.js +2 -2
- 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 +193 -24
- package/es/modules/companySetting/user/index.less +11 -0
- package/es/modules/companySetting/user/invite.js +14 -14
- package/es/modules/companySetting/virtualApp/config.js +8 -8
- package/es/modules/companySetting/virtualApp/index.js +12 -12
- package/es/modules/companySetting/virtualApp/panels/list.js +8 -9
- package/es/modules/companySetting/virtualApp/panels/sourceItem.js +7 -7
- 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.js +7 -7
- package/es/modules/companySetting/wechatBinding/index.less +58 -58
- package/es/modules/createDemand/collectionAttributeList.js +9 -9
- package/es/modules/createDemand/constants.js +17 -17
- package/es/modules/createDemand/demo/index.js +7 -7
- package/es/modules/createDemand/demo/selectPoint.js +13 -13
- package/es/modules/createDemand/index.js +39 -41
- package/es/modules/createDemand/styles/index.less +277 -277
- package/es/modules/createDemand_bf/collectionAttributeList.js +9 -9
- package/es/modules/createDemand_bf/constants.js +4 -4
- package/es/modules/createDemand_bf/index.js +35 -35
- package/es/modules/createDemand_bf/styles/index.less +222 -222
- package/es/modules/createProcess/components/index.less +52 -52
- package/es/modules/createProcess/components/processNode.js +11 -11
- package/es/modules/createProcess/index.js +17 -17
- package/es/modules/createProcess/index.less +114 -114
- package/es/modules/createProcess/title/index.js +11 -11
- package/es/modules/createProcess/title/index.less +53 -53
- package/es/modules/dealDemand/collectionAttributeList.js +9 -9
- package/es/modules/dealDemand/constants.js +7 -7
- package/es/modules/dealDemand/demo/index.js +7 -7
- package/es/modules/dealDemand/demo/selectPoint.js +13 -13
- package/es/modules/dealDemand/index.js +22 -24
- package/es/modules/dealDemand/styles/index.less +265 -265
- package/es/modules/demandManage/index.js +14 -15
- package/es/modules/demandManage/styles/index.less +210 -210
- package/es/modules/getPassword/index.js +10 -10
- package/es/modules/getPassword/index.less +122 -122
- package/es/modules/messageList/index.js +7 -8
- package/es/modules/messageList/index.less +81 -81
- package/es/modules/personalSetting/index.js +5 -5
- package/es/modules/personalSetting/info/index.js +5 -5
- package/es/modules/personalSetting/reset/index.js +5 -5
- package/es/modules/personalSetting/securityLog/index.js +14 -14
- package/es/modules/personalSetting/securityLog/index.less +11 -11
- package/es/modules/personalSetting/styles/unbinding.less +73 -73
- package/es/modules/personalSetting/unbinding/index.js +5 -5
- package/es/modules/pointMap/ImportModal/demo/index.js +5 -5
- package/es/modules/pointMap/ImportModal/index.js +14 -14
- package/es/modules/pointMap/ImportModal/styles/index.less +91 -91
- package/es/modules/pointMap/demo/index.js +7 -7
- package/es/modules/pointMap/editTxt/index.js +11 -11
- package/es/modules/pointMap/editTxt/index.less +55 -55
- package/es/modules/pointMap/index.js +11 -11
- package/es/modules/pointMap/pageInfo.js +44 -46
- package/es/modules/pointMap/styles/index.less +38 -38
- package/es/modules/pointMap/styles/pageInfo.less +244 -244
- package/es/modules/pointMap/styles/tree.css +142 -0
- package/es/modules/pointMap/styles/tree.less +29 -0
- package/es/modules/pointMap/tree.js +75 -27
- package/es/modules/systemSetting/Dictionary.d.ts +3 -0
- package/es/modules/systemSetting/Dictionary.js +385 -0
- package/es/modules/systemSetting/DictionaryType.d.ts +14 -0
- package/es/modules/systemSetting/DictionaryType.js +203 -0
- package/es/modules/systemSetting/approvalmanage/approvalStrategy/index.js +14 -14
- package/es/modules/systemSetting/approvalmanage/approvalStrategy/index.less +14 -14
- package/es/modules/systemSetting/approvalmanage/index.js +5 -5
- package/es/modules/systemSetting/approvalmanage/index.less +5 -5
- package/es/modules/systemSetting/approvalmanage/processManage/index.js +13 -13
- package/es/modules/systemSetting/approvalmanage/processManage/index.less +39 -39
- package/es/modules/systemSetting/authUrl.js +15 -15
- package/es/modules/systemSetting/document-setting/index.d.ts +3 -0
- package/es/modules/systemSetting/document-setting/index.js +467 -0
- package/es/modules/systemSetting/img/empty-data.png +0 -0
- package/es/modules/systemSetting/index.css +89 -0
- package/es/modules/systemSetting/index.js +19 -8
- package/es/modules/systemSetting/index.less +133 -0
- package/es/modules/systemSetting/notice/configItem/index.less +21 -21
- package/es/modules/systemSetting/notice/edit/index.js +5 -5
- package/es/modules/systemSetting/notice/edit/index.less +26 -26
- package/es/modules/systemSetting/notice/index.js +11 -11
- package/es/requests/department.js +6 -6
- package/es/requests/role.js +6 -6
- package/es/types/companySetting.d.ts +1 -0
- package/es/utils/base64.js +0 -1
- package/es/utils/constants.js +0 -4
- package/es/utils/functionalPermissions.js +6 -8
- package/es/utils/util.js +16 -16
- package/package.json +5 -2
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,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
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
7
|
import React, { useMemo } from 'react';
|
|
8
8
|
import Card from '../index';
|
|
9
9
|
import { Switch, Tooltip } from 'antd';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
4
|
-
function _defineProperty(
|
|
5
|
-
function _toPropertyKey(
|
|
6
|
-
function _toPrimitive(
|
|
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
7
|
import React from 'react';
|
|
8
8
|
import './index.less';
|
|
9
9
|
import { Tag, Tooltip } from 'antd';
|
|
@@ -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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -1,92 +1,92 @@
|
|
|
1
|
-
import { Spin } from 'antd';
|
|
2
|
-
import React, { useEffect, useState } from 'react';
|
|
3
|
-
import './index.less';
|
|
4
|
-
export const classPrefix = 'setting-pic-circle-select';
|
|
5
|
-
const tools = [
|
|
6
|
-
{
|
|
7
|
-
name: 'arrow',
|
|
8
|
-
text: '添加箭头',
|
|
9
|
-
icon: 'icon-tianjiajiantou1',
|
|
10
|
-
},
|
|
11
|
-
{
|
|
12
|
-
name: 'text',
|
|
13
|
-
text: '添加文字',
|
|
14
|
-
icon: 'icon-tianjiawenzi1',
|
|
15
|
-
},
|
|
16
|
-
];
|
|
17
|
-
const PageLoading: React.FC = () => {
|
|
18
|
-
const [size, setSize] = useState({ width: 500, height: 500 });
|
|
19
|
-
const [currentTool, setCurrentTool] = useState<string>();
|
|
20
|
-
|
|
21
|
-
useEffect(() => {
|
|
22
|
-
init();
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
const init = () => {
|
|
26
|
-
loadImage('./images/zg_regist_top.png').then(() => {
|
|
27
|
-
this.initCanvas();
|
|
28
|
-
this.initCanvasEvent();
|
|
29
|
-
this.initEditors();
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const loadImage = (img: string) => {
|
|
34
|
-
return new Promise((resolve) => {
|
|
35
|
-
// if (utils.isImageBase64(img)) {
|
|
36
|
-
const imgEle = document.createElement('img');
|
|
37
|
-
imgEle.src = img;
|
|
38
|
-
imgEle.onload = () => {
|
|
39
|
-
// this.imgWidth = imgEle.width
|
|
40
|
-
// this.imgHeight = imgEle.height
|
|
41
|
-
// let scale = 1
|
|
42
|
-
// if (!this.primitiveSize && this.imgWidth > this.width) {
|
|
43
|
-
// scale = (this.width - 52) / this.imgWidth
|
|
44
|
-
// this.imgWidth = scale * this.imgWidth
|
|
45
|
-
// this.imgHeight = scale * this.imgHeight
|
|
46
|
-
// }
|
|
47
|
-
// this.imgObj = new fabric.Image(imgEle, {
|
|
48
|
-
// left: 0,
|
|
49
|
-
// top: 0,
|
|
50
|
-
// selectable: false,
|
|
51
|
-
// scaleX: scale,
|
|
52
|
-
// scaleY: scale
|
|
53
|
-
// })
|
|
54
|
-
resolve();
|
|
55
|
-
};
|
|
56
|
-
// } else if (utils.isURL(img)) {
|
|
57
|
-
// const that = this
|
|
58
|
-
// fabric.Image.fromURL(img, function(imgObj) {
|
|
59
|
-
// that.imgWidth = imgObj.width
|
|
60
|
-
// that.imgHeight = imgObj.height
|
|
61
|
-
// imgObj.set('selectable', false)
|
|
62
|
-
// that.imgObj = imgObj
|
|
63
|
-
// that.loading = false
|
|
64
|
-
// resolve()
|
|
65
|
-
// })
|
|
66
|
-
// }
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
const selectTool = (tool: string) => {
|
|
71
|
-
setCurrentTool(tool);
|
|
72
|
-
};
|
|
73
|
-
return (
|
|
74
|
-
<div style={size}>
|
|
75
|
-
<div className="img-container" style={size}>
|
|
76
|
-
<canvas id="c"></canvas>
|
|
77
|
-
</div>
|
|
78
|
-
<ul className="tool-bar">
|
|
79
|
-
<li>操作</li>
|
|
80
|
-
{tools.map((item, i) => {
|
|
81
|
-
return (
|
|
82
|
-
<li key={i} onClick={() => selectTool(item.name)}>
|
|
83
|
-
{item.text}
|
|
84
|
-
</li>
|
|
85
|
-
);
|
|
86
|
-
})}
|
|
87
|
-
</ul>
|
|
88
|
-
</div>
|
|
89
|
-
);
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
export default PageLoading;
|
|
1
|
+
import { Spin } from 'antd';
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export const classPrefix = 'setting-pic-circle-select';
|
|
5
|
+
const tools = [
|
|
6
|
+
{
|
|
7
|
+
name: 'arrow',
|
|
8
|
+
text: '添加箭头',
|
|
9
|
+
icon: 'icon-tianjiajiantou1',
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
name: 'text',
|
|
13
|
+
text: '添加文字',
|
|
14
|
+
icon: 'icon-tianjiawenzi1',
|
|
15
|
+
},
|
|
16
|
+
];
|
|
17
|
+
const PageLoading: React.FC = () => {
|
|
18
|
+
const [size, setSize] = useState({ width: 500, height: 500 });
|
|
19
|
+
const [currentTool, setCurrentTool] = useState<string>();
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
init();
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
const init = () => {
|
|
26
|
+
loadImage('./images/zg_regist_top.png').then(() => {
|
|
27
|
+
this.initCanvas();
|
|
28
|
+
this.initCanvasEvent();
|
|
29
|
+
this.initEditors();
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const loadImage = (img: string) => {
|
|
34
|
+
return new Promise((resolve) => {
|
|
35
|
+
// if (utils.isImageBase64(img)) {
|
|
36
|
+
const imgEle = document.createElement('img');
|
|
37
|
+
imgEle.src = img;
|
|
38
|
+
imgEle.onload = () => {
|
|
39
|
+
// this.imgWidth = imgEle.width
|
|
40
|
+
// this.imgHeight = imgEle.height
|
|
41
|
+
// let scale = 1
|
|
42
|
+
// if (!this.primitiveSize && this.imgWidth > this.width) {
|
|
43
|
+
// scale = (this.width - 52) / this.imgWidth
|
|
44
|
+
// this.imgWidth = scale * this.imgWidth
|
|
45
|
+
// this.imgHeight = scale * this.imgHeight
|
|
46
|
+
// }
|
|
47
|
+
// this.imgObj = new fabric.Image(imgEle, {
|
|
48
|
+
// left: 0,
|
|
49
|
+
// top: 0,
|
|
50
|
+
// selectable: false,
|
|
51
|
+
// scaleX: scale,
|
|
52
|
+
// scaleY: scale
|
|
53
|
+
// })
|
|
54
|
+
resolve();
|
|
55
|
+
};
|
|
56
|
+
// } else if (utils.isURL(img)) {
|
|
57
|
+
// const that = this
|
|
58
|
+
// fabric.Image.fromURL(img, function(imgObj) {
|
|
59
|
+
// that.imgWidth = imgObj.width
|
|
60
|
+
// that.imgHeight = imgObj.height
|
|
61
|
+
// imgObj.set('selectable', false)
|
|
62
|
+
// that.imgObj = imgObj
|
|
63
|
+
// that.loading = false
|
|
64
|
+
// resolve()
|
|
65
|
+
// })
|
|
66
|
+
// }
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const selectTool = (tool: string) => {
|
|
71
|
+
setCurrentTool(tool);
|
|
72
|
+
};
|
|
73
|
+
return (
|
|
74
|
+
<div style={size}>
|
|
75
|
+
<div className="img-container" style={size}>
|
|
76
|
+
<canvas id="c"></canvas>
|
|
77
|
+
</div>
|
|
78
|
+
<ul className="tool-bar">
|
|
79
|
+
<li>操作</li>
|
|
80
|
+
{tools.map((item, i) => {
|
|
81
|
+
return (
|
|
82
|
+
<li key={i} onClick={() => selectTool(item.name)}>
|
|
83
|
+
{item.text}
|
|
84
|
+
</li>
|
|
85
|
+
);
|
|
86
|
+
})}
|
|
87
|
+
</ul>
|
|
88
|
+
</div>
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export default PageLoading;
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import React, { useRef, useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
const RectangleDrawer = () => {
|
|
4
|
-
const canvasRef = useRef(null);
|
|
5
|
-
let isDrawing = false;
|
|
6
|
-
let startX, startY, stopX, stopY;
|
|
7
|
-
let drawingSurfaceImageData = null;
|
|
8
|
-
|
|
9
|
-
const saveData = () => {
|
|
10
|
-
const canvas = canvasRef.current;
|
|
11
|
-
const context = canvas.getContext('2d');
|
|
12
|
-
drawingSurfaceImageData = context.getImageData(0, 0, 400, 400);
|
|
13
|
-
context.putImageData(drawingSurfaceImageData, 0, 0);
|
|
14
|
-
// restoreData()
|
|
15
|
-
};
|
|
16
|
-
const restoreData = () => {
|
|
17
|
-
const canvas = canvasRef.current;
|
|
18
|
-
const context = canvas.getContext('2d');
|
|
19
|
-
console.log('drawingSurfaceImageData', drawingSurfaceImageData);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
const canvas = canvasRef.current;
|
|
24
|
-
const context = canvas.getContext('2d');
|
|
25
|
-
|
|
26
|
-
canvas.addEventListener('mousedown', (e) => {
|
|
27
|
-
isDrawing = true;
|
|
28
|
-
startX = e.offsetX;
|
|
29
|
-
startY = e.offsetY;
|
|
30
|
-
// drawingSurfaceImageData && restoreData()
|
|
31
|
-
saveData();
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
canvas.addEventListener('mousemove', (e) => {
|
|
35
|
-
if (isDrawing) {
|
|
36
|
-
restoreData();
|
|
37
|
-
stopX = e.offsetX;
|
|
38
|
-
stopY = e.offsetY;
|
|
39
|
-
context.clearRect(0, 0, canvas.width, canvas.height);
|
|
40
|
-
context.putImageData(drawingSurfaceImageData, 0, 0);
|
|
41
|
-
context.strokeRect(startX, startY, stopX - startX, stopY - startY);
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
canvas.addEventListener('mouseup', () => {
|
|
46
|
-
isDrawing = false;
|
|
47
|
-
saveData();
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
canvas.addEventListener('mouseleave', () => {
|
|
51
|
-
isDrawing = false;
|
|
52
|
-
});
|
|
53
|
-
}, []);
|
|
54
|
-
|
|
55
|
-
return <canvas ref={canvasRef} width={400} height={400} style={{ border: '1px solid #000' }} />;
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export default RectangleDrawer;
|
|
1
|
+
import React, { useRef, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
const RectangleDrawer = () => {
|
|
4
|
+
const canvasRef = useRef(null);
|
|
5
|
+
let isDrawing = false;
|
|
6
|
+
let startX, startY, stopX, stopY;
|
|
7
|
+
let drawingSurfaceImageData = null;
|
|
8
|
+
|
|
9
|
+
const saveData = () => {
|
|
10
|
+
const canvas = canvasRef.current;
|
|
11
|
+
const context = canvas.getContext('2d');
|
|
12
|
+
drawingSurfaceImageData = context.getImageData(0, 0, 400, 400);
|
|
13
|
+
context.putImageData(drawingSurfaceImageData, 0, 0);
|
|
14
|
+
// restoreData()
|
|
15
|
+
};
|
|
16
|
+
const restoreData = () => {
|
|
17
|
+
const canvas = canvasRef.current;
|
|
18
|
+
const context = canvas.getContext('2d');
|
|
19
|
+
console.log('drawingSurfaceImageData', drawingSurfaceImageData);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
const canvas = canvasRef.current;
|
|
24
|
+
const context = canvas.getContext('2d');
|
|
25
|
+
|
|
26
|
+
canvas.addEventListener('mousedown', (e) => {
|
|
27
|
+
isDrawing = true;
|
|
28
|
+
startX = e.offsetX;
|
|
29
|
+
startY = e.offsetY;
|
|
30
|
+
// drawingSurfaceImageData && restoreData()
|
|
31
|
+
saveData();
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
canvas.addEventListener('mousemove', (e) => {
|
|
35
|
+
if (isDrawing) {
|
|
36
|
+
restoreData();
|
|
37
|
+
stopX = e.offsetX;
|
|
38
|
+
stopY = e.offsetY;
|
|
39
|
+
context.clearRect(0, 0, canvas.width, canvas.height);
|
|
40
|
+
context.putImageData(drawingSurfaceImageData, 0, 0);
|
|
41
|
+
context.strokeRect(startX, startY, stopX - startX, stopY - startY);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
canvas.addEventListener('mouseup', () => {
|
|
46
|
+
isDrawing = false;
|
|
47
|
+
saveData();
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
canvas.addEventListener('mouseleave', () => {
|
|
51
|
+
isDrawing = false;
|
|
52
|
+
});
|
|
53
|
+
}, []);
|
|
54
|
+
|
|
55
|
+
return <canvas ref={canvasRef} width={400} height={400} style={{ border: '1px solid #000' }} />;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
export default RectangleDrawer;
|