@zgfe/modules-settings 1.2.51-zhongyuan.0 → 1.2.51-zhongyuan.5
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 +387 -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 +111 -0
- package/es/modules/systemSetting/index.js +19 -8
- package/es/modules/systemSetting/index.less +117 -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 +9 -7
|
@@ -1,41 +1,41 @@
|
|
|
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
|
-
|
|
8
|
-
useEffect(() => {
|
|
9
|
-
const canvas = canvasRef.current;
|
|
10
|
-
const context = canvas.getContext('2d');
|
|
11
|
-
|
|
12
|
-
canvas.addEventListener('mousedown', (e) => {
|
|
13
|
-
isDrawing = true;
|
|
14
|
-
startX = e.offsetX;
|
|
15
|
-
startY = e.offsetY;
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
canvas.addEventListener('mousemove', (e) => {
|
|
19
|
-
if (isDrawing) {
|
|
20
|
-
stopX = e.offsetX;
|
|
21
|
-
stopY = e.offsetY;
|
|
22
|
-
// context.clearRect(0, 0, canvas.width, canvas.height);
|
|
23
|
-
context.clearRect(startX, startY, stopX - startX, stopY - startY);
|
|
24
|
-
context.strokeRect(startX, startY, stopX - startX, stopY - startY);
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
canvas.addEventListener('mouseup', () => {
|
|
29
|
-
context.save();
|
|
30
|
-
isDrawing = false;
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
canvas.addEventListener('mouseleave', () => {
|
|
34
|
-
isDrawing = false;
|
|
35
|
-
});
|
|
36
|
-
}, []);
|
|
37
|
-
|
|
38
|
-
return <canvas ref={canvasRef} width={400} height={400} style={{ border: '1px solid #000' }} />;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
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
|
+
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const canvas = canvasRef.current;
|
|
10
|
+
const context = canvas.getContext('2d');
|
|
11
|
+
|
|
12
|
+
canvas.addEventListener('mousedown', (e) => {
|
|
13
|
+
isDrawing = true;
|
|
14
|
+
startX = e.offsetX;
|
|
15
|
+
startY = e.offsetY;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
canvas.addEventListener('mousemove', (e) => {
|
|
19
|
+
if (isDrawing) {
|
|
20
|
+
stopX = e.offsetX;
|
|
21
|
+
stopY = e.offsetY;
|
|
22
|
+
// context.clearRect(0, 0, canvas.width, canvas.height);
|
|
23
|
+
context.clearRect(startX, startY, stopX - startX, stopY - startY);
|
|
24
|
+
context.strokeRect(startX, startY, stopX - startX, stopY - startY);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
canvas.addEventListener('mouseup', () => {
|
|
29
|
+
context.save();
|
|
30
|
+
isDrawing = false;
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
canvas.addEventListener('mouseleave', () => {
|
|
34
|
+
isDrawing = false;
|
|
35
|
+
});
|
|
36
|
+
}, []);
|
|
37
|
+
|
|
38
|
+
return <canvas ref={canvasRef} width={400} height={400} style={{ border: '1px solid #000' }} />;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default RectangleDrawer;
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { Spin } from 'antd';
|
|
2
|
-
import React, { 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, setSize] = useState({width: 500, height: 500})
|
|
20
|
-
|
|
21
|
-
const selectTool = (tool) => {
|
|
22
|
-
this.currentTool = tool
|
|
23
|
-
}
|
|
24
|
-
return (
|
|
25
|
-
<div style={size}>
|
|
26
|
-
<div className="img-container" style={size}>
|
|
27
|
-
<canvas id="c"></canvas>
|
|
28
|
-
</div>
|
|
29
|
-
<ul className="tool-bar">
|
|
30
|
-
<li>
|
|
31
|
-
操作
|
|
32
|
-
</li>
|
|
33
|
-
{
|
|
34
|
-
tools.map((item, i) => {
|
|
35
|
-
return <li
|
|
36
|
-
key={i}
|
|
37
|
-
onClick={() => selectTool(item.name)}
|
|
38
|
-
>
|
|
39
|
-
{item.text }
|
|
40
|
-
</li>
|
|
41
|
-
})
|
|
42
|
-
}
|
|
43
|
-
</ul>
|
|
44
|
-
</div>
|
|
45
|
-
);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export default PageLoading;
|
|
1
|
+
import { Spin } from 'antd';
|
|
2
|
+
import React, { 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, setSize] = useState({width: 500, height: 500})
|
|
20
|
+
|
|
21
|
+
const selectTool = (tool) => {
|
|
22
|
+
this.currentTool = tool
|
|
23
|
+
}
|
|
24
|
+
return (
|
|
25
|
+
<div style={size}>
|
|
26
|
+
<div className="img-container" style={size}>
|
|
27
|
+
<canvas id="c"></canvas>
|
|
28
|
+
</div>
|
|
29
|
+
<ul className="tool-bar">
|
|
30
|
+
<li>
|
|
31
|
+
操作
|
|
32
|
+
</li>
|
|
33
|
+
{
|
|
34
|
+
tools.map((item, i) => {
|
|
35
|
+
return <li
|
|
36
|
+
key={i}
|
|
37
|
+
onClick={() => selectTool(item.name)}
|
|
38
|
+
>
|
|
39
|
+
{item.text }
|
|
40
|
+
</li>
|
|
41
|
+
})
|
|
42
|
+
}
|
|
43
|
+
</ul>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export default PageLoading;
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import React, { useState } from 'react';
|
|
2
|
-
import { Rnd } from 'react-rnd';
|
|
3
|
-
import { Cropper } from 'react-cropper';
|
|
4
|
-
import 'cropperjs/dist/cropper.css';
|
|
5
|
-
|
|
6
|
-
const ImageCropper = () => {
|
|
7
|
-
const [cropArea, setCropArea] = useState({ x: 0, y: 0, width: 100, height: 100 });
|
|
8
|
-
const [image, setImage] = useState(null);
|
|
9
|
-
|
|
10
|
-
const onCrop = (e) => {
|
|
11
|
-
console.log(e.detail.x);
|
|
12
|
-
console.log(e.detail.y);
|
|
13
|
-
console.log(e.detail.width);
|
|
14
|
-
console.log(e.detail.height);
|
|
15
|
-
setCropArea({ x: e.detail.x, y: e.detail.y, width: e.detail.width, height: e.detail.height });
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div>
|
|
20
|
-
<input type="file" onChange={(e) => {
|
|
21
|
-
console.log('setImage(e.target.files[0])', e, e.target, e.target.files);
|
|
22
|
-
|
|
23
|
-
setImage(e.target.files[0])
|
|
24
|
-
}} />
|
|
25
|
-
{image && (
|
|
26
|
-
<Rnd
|
|
27
|
-
default={{ x: 0, y: 0, width: 500, height: 500 }}
|
|
28
|
-
onResize={(e, d) => setCropArea({ ...cropArea, width: d.width, height: d.height })}
|
|
29
|
-
onDragStop={(e, d) => setCropArea({ ...cropArea, x: d.x, y: d.y })}
|
|
30
|
-
>
|
|
31
|
-
<Cropper
|
|
32
|
-
src={URL.createObjectURL(image)}
|
|
33
|
-
style={{ width: '100%', height: '100%' }}
|
|
34
|
-
aspectRatio={1 / 1}
|
|
35
|
-
crop={cropArea}
|
|
36
|
-
guides
|
|
37
|
-
onCropMove={onCrop}
|
|
38
|
-
onCropEnd={onCrop}
|
|
39
|
-
/>
|
|
40
|
-
</Rnd>
|
|
41
|
-
)}
|
|
42
|
-
</div>
|
|
43
|
-
);
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
export default ImageCropper;
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Rnd } from 'react-rnd';
|
|
3
|
+
import { Cropper } from 'react-cropper';
|
|
4
|
+
import 'cropperjs/dist/cropper.css';
|
|
5
|
+
|
|
6
|
+
const ImageCropper = () => {
|
|
7
|
+
const [cropArea, setCropArea] = useState({ x: 0, y: 0, width: 100, height: 100 });
|
|
8
|
+
const [image, setImage] = useState(null);
|
|
9
|
+
|
|
10
|
+
const onCrop = (e) => {
|
|
11
|
+
console.log(e.detail.x);
|
|
12
|
+
console.log(e.detail.y);
|
|
13
|
+
console.log(e.detail.width);
|
|
14
|
+
console.log(e.detail.height);
|
|
15
|
+
setCropArea({ x: e.detail.x, y: e.detail.y, width: e.detail.width, height: e.detail.height });
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<div>
|
|
20
|
+
<input type="file" onChange={(e) => {
|
|
21
|
+
console.log('setImage(e.target.files[0])', e, e.target, e.target.files);
|
|
22
|
+
|
|
23
|
+
setImage(e.target.files[0])
|
|
24
|
+
}} />
|
|
25
|
+
{image && (
|
|
26
|
+
<Rnd
|
|
27
|
+
default={{ x: 0, y: 0, width: 500, height: 500 }}
|
|
28
|
+
onResize={(e, d) => setCropArea({ ...cropArea, width: d.width, height: d.height })}
|
|
29
|
+
onDragStop={(e, d) => setCropArea({ ...cropArea, x: d.x, y: d.y })}
|
|
30
|
+
>
|
|
31
|
+
<Cropper
|
|
32
|
+
src={URL.createObjectURL(image)}
|
|
33
|
+
style={{ width: '100%', height: '100%' }}
|
|
34
|
+
aspectRatio={1 / 1}
|
|
35
|
+
crop={cropArea}
|
|
36
|
+
guides
|
|
37
|
+
onCropMove={onCrop}
|
|
38
|
+
onCropEnd={onCrop}
|
|
39
|
+
/>
|
|
40
|
+
</Rnd>
|
|
41
|
+
)}
|
|
42
|
+
</div>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default ImageCropper;
|
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
import { Spin } from 'antd';
|
|
2
|
-
import React, { useEffect, useState } from 'react';
|
|
3
|
-
import './index.less';
|
|
4
|
-
// import CanvasSelect from 'canvas-select';
|
|
5
|
-
import CanvasSelect from './canvas-select.min';
|
|
6
|
-
export const classPrefix = 'setting-pic-circle-select';
|
|
7
|
-
const tools = [
|
|
8
|
-
{
|
|
9
|
-
name: 'arrow',
|
|
10
|
-
text: '添加箭头',
|
|
11
|
-
icon: 'icon-tianjiajiantou1'
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
name: 'text',
|
|
15
|
-
text: '添加文字',
|
|
16
|
-
icon: 'icon-tianjiawenzi1'
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
const PageLoading: React.FC = () => {
|
|
20
|
-
// const [size, setSize] = useState({width: 500, height: 500})
|
|
21
|
-
// const [currentTool, setSize] = useState({width: 500, height: 500})
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
setTimeout(init, 300)
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const init = () => {
|
|
27
|
-
// 创建实例(重要:一定要等到挂载节点就绪)
|
|
28
|
-
// 第一个参数为挂载节点 可以是css选择器或者HTMLCanvasElement
|
|
29
|
-
// 第二个参数为图片链接
|
|
30
|
-
// const instance = new CanvasSelect(".img-container", "./images/zg_regist_top.png");
|
|
31
|
-
// or
|
|
32
|
-
const instance = new CanvasSelect('.container');
|
|
33
|
-
instance.setImage('/one.jpg');
|
|
34
|
-
|
|
35
|
-
let option = [
|
|
36
|
-
{
|
|
37
|
-
label: "rectangle",
|
|
38
|
-
labelFillStyle: "#f00",
|
|
39
|
-
textFillStyle: "#fff",
|
|
40
|
-
coor: [
|
|
41
|
-
[184, 183],
|
|
42
|
-
[275, 238],
|
|
43
|
-
], // required
|
|
44
|
-
type: 1, // required
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
label: "polygon",
|
|
48
|
-
coor: [
|
|
49
|
-
[135, 291],
|
|
50
|
-
[129, 319],
|
|
51
|
-
[146, 346],
|
|
52
|
-
[174, 365],
|
|
53
|
-
[214, 362],
|
|
54
|
-
[196, 337],
|
|
55
|
-
[161, 288],
|
|
56
|
-
], // required
|
|
57
|
-
type: 2, // required
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
label: "dot",
|
|
61
|
-
coor: [345, 406], // required
|
|
62
|
-
type: 3, // required
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: "line",
|
|
66
|
-
coor: [
|
|
67
|
-
[470, 155],
|
|
68
|
-
[490, 230],
|
|
69
|
-
[493, 298],
|
|
70
|
-
], // required
|
|
71
|
-
type: 4, // required
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
label: "circle",
|
|
75
|
-
coor: [369, 197], // required
|
|
76
|
-
radius: 38, // required
|
|
77
|
-
type: 5, // required
|
|
78
|
-
},
|
|
79
|
-
];
|
|
80
|
-
// 加载数据
|
|
81
|
-
instance.setData(option);
|
|
82
|
-
// 0 不创建(默认),1创建矩形,2创建多边形,3点标注,4折线标注,5圆形标注
|
|
83
|
-
instance.createType = 1;
|
|
84
|
-
instance.on("select", (info) => {
|
|
85
|
-
console.log("select", info);
|
|
86
|
-
// 可对选中对参数info进行修改
|
|
87
|
-
// 修改标签:info.label="hello"
|
|
88
|
-
// 单个形状修改填充颜色:info.fillStyle="#0f0"
|
|
89
|
-
// 然后调用instance.update()更新视图
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// const selectTool = (tool) => {
|
|
94
|
-
// this.currentTool = tool
|
|
95
|
-
// }
|
|
96
|
-
return (
|
|
97
|
-
<div>
|
|
98
|
-
<div className="img-container">
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
);
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
export default PageLoading;
|
|
1
|
+
import { Spin } from 'antd';
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import './index.less';
|
|
4
|
+
// import CanvasSelect from 'canvas-select';
|
|
5
|
+
import CanvasSelect from './canvas-select.min';
|
|
6
|
+
export const classPrefix = 'setting-pic-circle-select';
|
|
7
|
+
const tools = [
|
|
8
|
+
{
|
|
9
|
+
name: 'arrow',
|
|
10
|
+
text: '添加箭头',
|
|
11
|
+
icon: 'icon-tianjiajiantou1'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
name: 'text',
|
|
15
|
+
text: '添加文字',
|
|
16
|
+
icon: 'icon-tianjiawenzi1'
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
const PageLoading: React.FC = () => {
|
|
20
|
+
// const [size, setSize] = useState({width: 500, height: 500})
|
|
21
|
+
// const [currentTool, setSize] = useState({width: 500, height: 500})
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
setTimeout(init, 300)
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
const init = () => {
|
|
27
|
+
// 创建实例(重要:一定要等到挂载节点就绪)
|
|
28
|
+
// 第一个参数为挂载节点 可以是css选择器或者HTMLCanvasElement
|
|
29
|
+
// 第二个参数为图片链接
|
|
30
|
+
// const instance = new CanvasSelect(".img-container", "./images/zg_regist_top.png");
|
|
31
|
+
// or
|
|
32
|
+
const instance = new CanvasSelect('.container');
|
|
33
|
+
instance.setImage('/one.jpg');
|
|
34
|
+
|
|
35
|
+
let option = [
|
|
36
|
+
{
|
|
37
|
+
label: "rectangle",
|
|
38
|
+
labelFillStyle: "#f00",
|
|
39
|
+
textFillStyle: "#fff",
|
|
40
|
+
coor: [
|
|
41
|
+
[184, 183],
|
|
42
|
+
[275, 238],
|
|
43
|
+
], // required
|
|
44
|
+
type: 1, // required
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
label: "polygon",
|
|
48
|
+
coor: [
|
|
49
|
+
[135, 291],
|
|
50
|
+
[129, 319],
|
|
51
|
+
[146, 346],
|
|
52
|
+
[174, 365],
|
|
53
|
+
[214, 362],
|
|
54
|
+
[196, 337],
|
|
55
|
+
[161, 288],
|
|
56
|
+
], // required
|
|
57
|
+
type: 2, // required
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
label: "dot",
|
|
61
|
+
coor: [345, 406], // required
|
|
62
|
+
type: 3, // required
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
label: "line",
|
|
66
|
+
coor: [
|
|
67
|
+
[470, 155],
|
|
68
|
+
[490, 230],
|
|
69
|
+
[493, 298],
|
|
70
|
+
], // required
|
|
71
|
+
type: 4, // required
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: "circle",
|
|
75
|
+
coor: [369, 197], // required
|
|
76
|
+
radius: 38, // required
|
|
77
|
+
type: 5, // required
|
|
78
|
+
},
|
|
79
|
+
];
|
|
80
|
+
// 加载数据
|
|
81
|
+
instance.setData(option);
|
|
82
|
+
// 0 不创建(默认),1创建矩形,2创建多边形,3点标注,4折线标注,5圆形标注
|
|
83
|
+
instance.createType = 1;
|
|
84
|
+
instance.on("select", (info) => {
|
|
85
|
+
console.log("select", info);
|
|
86
|
+
// 可对选中对参数info进行修改
|
|
87
|
+
// 修改标签:info.label="hello"
|
|
88
|
+
// 单个形状修改填充颜色:info.fillStyle="#0f0"
|
|
89
|
+
// 然后调用instance.update()更新视图
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// const selectTool = (tool) => {
|
|
94
|
+
// this.currentTool = tool
|
|
95
|
+
// }
|
|
96
|
+
return (
|
|
97
|
+
<div>
|
|
98
|
+
<div className="img-container">
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export default PageLoading;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
2
|
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."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
function _arrayWithHoles(
|
|
3
|
+
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; } }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import React, { useState } from 'react';
|
|
8
8
|
// import Card from '../index';
|
|
9
9
|
var CardDemo = function CardDemo() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function _slicedToArray(
|
|
1
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
2
2
|
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."); }
|
|
3
|
-
function _unsupportedIterableToArray(
|
|
4
|
-
function _arrayLikeToArray(
|
|
5
|
-
function _iterableToArrayLimit(
|
|
6
|
-
function _arrayWithHoles(
|
|
3
|
+
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; } }
|
|
4
|
+
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; }
|
|
5
|
+
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; } }
|
|
6
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { IconFont } from '@zgfe/business-lib';
|
|
8
8
|
import { Button } from 'antd';
|
|
9
9
|
import React, { useRef, useEffect, useState } from 'react';
|
|
@@ -53,7 +53,6 @@ var PicCircleSelect = function PicCircleSelect(props) {
|
|
|
53
53
|
context.putImageData(drawingSurfaceImageData, 0, 0);
|
|
54
54
|
// restoreData()
|
|
55
55
|
};
|
|
56
|
-
|
|
57
56
|
useEffect(function () {
|
|
58
57
|
var canvas = canvasRef.current;
|
|
59
58
|
var context = canvas.getContext('2d');
|
|
@@ -184,12 +183,12 @@ var PicCircleSelect = function PicCircleSelect(props) {
|
|
|
184
183
|
style: {
|
|
185
184
|
margin: margin
|
|
186
185
|
}
|
|
187
|
-
}), isRead && /*#__PURE__*/React.createElement("div", {
|
|
186
|
+
}), isRead && (/*#__PURE__*/React.createElement("div", {
|
|
188
187
|
className: "".concat(classPrefix, "-read-bg"),
|
|
189
188
|
style: {
|
|
190
189
|
height: height > 350 ? height : 350,
|
|
191
190
|
width: width > 672 ? width : 672
|
|
192
191
|
}
|
|
193
|
-
})));
|
|
192
|
+
}))));
|
|
194
193
|
};
|
|
195
194
|
export default PicCircleSelect;
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
.setting-pic-circle-select {
|
|
2
|
-
margin-top: -16px;
|
|
3
|
-
&-btn {
|
|
4
|
-
display: flex;
|
|
5
|
-
flex-direction: row;
|
|
6
|
-
gap: 16px;
|
|
7
|
-
align-items: center;
|
|
8
|
-
margin-bottom: 16px;
|
|
9
|
-
color: var(--io-N8-, #354354);
|
|
10
|
-
font-size: 14px;
|
|
11
|
-
.ant-btn {
|
|
12
|
-
padding: 0 15px;
|
|
13
|
-
}
|
|
14
|
-
.select {
|
|
15
|
-
color: #1454e5;
|
|
16
|
-
border: 1px solid #1454e5;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
&-content {
|
|
20
|
-
position: relative;
|
|
21
|
-
width: 672px;
|
|
22
|
-
height: 350px;
|
|
23
|
-
overflow-x: auto;
|
|
24
|
-
overflow-y: auto;
|
|
25
|
-
background: var(--io-n-02, #fafafb);
|
|
26
|
-
border: 1px solid var(--io-N1-, #e6e7ea);
|
|
27
|
-
border-radius: 4px;
|
|
28
|
-
}
|
|
29
|
-
&-read-bg {
|
|
30
|
-
position: absolute;
|
|
31
|
-
top: 0;
|
|
32
|
-
right: 0;
|
|
33
|
-
bottom: 0;
|
|
34
|
-
left: 0;
|
|
35
|
-
background: transparent;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
1
|
+
.setting-pic-circle-select {
|
|
2
|
+
margin-top: -16px;
|
|
3
|
+
&-btn {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
gap: 16px;
|
|
7
|
+
align-items: center;
|
|
8
|
+
margin-bottom: 16px;
|
|
9
|
+
color: var(--io-N8-, #354354);
|
|
10
|
+
font-size: 14px;
|
|
11
|
+
.ant-btn {
|
|
12
|
+
padding: 0 15px;
|
|
13
|
+
}
|
|
14
|
+
.select {
|
|
15
|
+
color: #1454e5;
|
|
16
|
+
border: 1px solid #1454e5;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
&-content {
|
|
20
|
+
position: relative;
|
|
21
|
+
width: 672px;
|
|
22
|
+
height: 350px;
|
|
23
|
+
overflow-x: auto;
|
|
24
|
+
overflow-y: auto;
|
|
25
|
+
background: var(--io-n-02, #fafafb);
|
|
26
|
+
border: 1px solid var(--io-N1-, #e6e7ea);
|
|
27
|
+
border-radius: 4px;
|
|
28
|
+
}
|
|
29
|
+
&-read-bg {
|
|
30
|
+
position: absolute;
|
|
31
|
+
top: 0;
|
|
32
|
+
right: 0;
|
|
33
|
+
bottom: 0;
|
|
34
|
+
left: 0;
|
|
35
|
+
background: transparent;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -14,7 +14,7 @@ export var MyComponent = function MyComponent(_ref) {
|
|
|
14
14
|
onClick: function onClick() {
|
|
15
15
|
return !data.isRead && data.fun('show', data);
|
|
16
16
|
}
|
|
17
|
-
}, !data.isRead && !data.onlyOne && /*#__PURE__*/React.createElement("div", {
|
|
17
|
+
}, !data.isRead && !data.onlyOne && (/*#__PURE__*/React.createElement("div", {
|
|
18
18
|
className: "close-btn-bg"
|
|
19
19
|
}, /*#__PURE__*/React.createElement("div", {
|
|
20
20
|
className: "close-btn",
|
|
@@ -24,14 +24,14 @@ export var MyComponent = function MyComponent(_ref) {
|
|
|
24
24
|
}
|
|
25
25
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
26
26
|
type: 'qingchu'
|
|
27
|
-
}))), data.approveTime && /*#__PURE__*/React.createElement("div", {
|
|
27
|
+
})))), data.approveTime && (/*#__PURE__*/React.createElement("div", {
|
|
28
28
|
className: "base-node-approve-time"
|
|
29
|
-
}, "\u5904\u7406\u65F6\u95F4\uFF1A", moment(data.approveTime).format('YYYY-MM-DD HH:mm:ss')), data.approveTime && /*#__PURE__*/React.createElement("a", {
|
|
29
|
+
}, "\u5904\u7406\u65F6\u95F4\uFF1A", moment(data.approveTime).format('YYYY-MM-DD HH:mm:ss'))), data.approveTime && (/*#__PURE__*/React.createElement("a", {
|
|
30
30
|
className: "base-node-approve-detail",
|
|
31
31
|
onClick: function onClick() {
|
|
32
32
|
data.fun('detail', data);
|
|
33
33
|
}
|
|
34
|
-
}, "\u5904\u7406\u8BE6\u60C5"), /*#__PURE__*/React.createElement("div", {
|
|
34
|
+
}, "\u5904\u7406\u8BE6\u60C5")), /*#__PURE__*/React.createElement("div", {
|
|
35
35
|
className: "base-node-top"
|
|
36
36
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
37
37
|
type: data.approveStatus === 1 ? 'check_filled' : data.approveStatus === 2 ? 'tishi1' : 'shenpi'
|