ztxkui 3.2.5 → 3.2.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/dist/DemoCom/BasicDemo.js +9 -2
- package/dist/components/business/Container/container.js +19 -2
- package/dist/components/business/Signatures/components/CompareResult.d.ts +0 -3
- package/dist/components/business/Signatures/components/CompareResult.js +11 -10
- package/dist/components/business/Signatures/components/TemplateAttach.d.ts +0 -3
- package/dist/components/business/Signatures/components/TemplateAttach.js +4 -2
- package/dist/components/business/Signatures/index.js +2 -2
- package/dist/components/business/Signatures/props.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import InputNumber from 'components/InputNumber';
|
|
2
2
|
import Tag from 'components/Tag';
|
|
3
3
|
import Input from 'components/Input';
|
|
4
|
-
import { FormList, RangePicker, Button, Modal } from '../index';
|
|
4
|
+
import { FormList, RangePicker, Button, Modal, Container } from '../index';
|
|
5
5
|
import { InputNumber as AntInputNumber } from 'antd';
|
|
6
6
|
import GridList from 'components/business/NewList';
|
|
7
7
|
import { useState } from 'react';
|
|
@@ -52,7 +52,14 @@ function BasicDemo() {
|
|
|
52
52
|
dayjs('2022-05-11'),
|
|
53
53
|
dayjs('2022-05-31'),
|
|
54
54
|
]), rangeValue = _b[0], setRangeValue = _b[1];
|
|
55
|
-
|
|
55
|
+
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
|
56
|
+
return (React.createElement(Container, { loading: loading },
|
|
57
|
+
React.createElement(Button, { onClick: function () {
|
|
58
|
+
setLoading(true);
|
|
59
|
+
setTimeout(function () {
|
|
60
|
+
setLoading(false);
|
|
61
|
+
}, 5000);
|
|
62
|
+
} }, "\u52A0\u8F7D"),
|
|
56
63
|
React.createElement("div", null,
|
|
57
64
|
React.createElement(Button, { onClick: function () {
|
|
58
65
|
Modal.confirm({
|
|
@@ -20,15 +20,32 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
|
-
import React from 'react';
|
|
23
|
+
import React, { useEffect, useState } from 'react';
|
|
24
24
|
import { Spin } from 'antd';
|
|
25
25
|
import classNames from 'classnames';
|
|
26
26
|
var Container = function (_a) {
|
|
27
27
|
var loading = _a.loading, children = _a.children, className = _a.className, containerRef = _a.containerRef, spinProps = _a.spinProps, restProps = __rest(_a, ["loading", "children", "className", "containerRef", "spinProps"]);
|
|
28
28
|
var classes = classNames('zt-container', className);
|
|
29
|
+
var _b = useState(1), countdown = _b[0], setCountdown = _b[1];
|
|
30
|
+
useEffect(function () {
|
|
31
|
+
if (!loading) {
|
|
32
|
+
setCountdown(1);
|
|
33
|
+
}
|
|
34
|
+
}, [loading]);
|
|
35
|
+
useEffect(function () {
|
|
36
|
+
if (!loading) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
var timeout = setInterval(function () {
|
|
40
|
+
setCountdown(function (pre) { return pre + 1; });
|
|
41
|
+
}, 1000);
|
|
42
|
+
return function () {
|
|
43
|
+
timeout && clearInterval(timeout);
|
|
44
|
+
};
|
|
45
|
+
}, [loading]);
|
|
29
46
|
return (React.createElement("div", __assign({ className: classes }, restProps, { ref: containerRef }),
|
|
30
47
|
loading && (React.createElement("div", { className: "zt-container__loading" },
|
|
31
|
-
React.createElement(Spin, __assign({ size: "large", spinning: loading }, spinProps)))),
|
|
48
|
+
React.createElement(Spin, __assign({ size: "large", spinning: loading, tip: "" + countdown }, spinProps)))),
|
|
32
49
|
children));
|
|
33
50
|
};
|
|
34
51
|
export default Container;
|
|
@@ -6,27 +6,28 @@ import React, { useState } from 'react';
|
|
|
6
6
|
// redux
|
|
7
7
|
// ztxkui公共组件
|
|
8
8
|
import { Button, message } from '../../../../index';
|
|
9
|
-
import { previewFile } from '../utils';
|
|
10
9
|
var CompareResult = function (_a) {
|
|
11
|
-
var record = _a.record,
|
|
10
|
+
var record = _a.record, index = _a.index, request = _a.request;
|
|
12
11
|
// 设置查看比对结果按钮的loading状态
|
|
13
12
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
|
14
13
|
var onClickHandle = function () {
|
|
15
14
|
console.log('查看比对结果', index, record);
|
|
16
15
|
setLoading(true);
|
|
17
16
|
try {
|
|
18
|
-
var
|
|
19
|
-
if (
|
|
17
|
+
var task_id = record.taskId;
|
|
18
|
+
if (task_id) {
|
|
20
19
|
// 比对任务状态查询
|
|
21
20
|
request({
|
|
22
|
-
url: "/api/zmdms-resource/seal/query-compare-task/" +
|
|
21
|
+
url: "/api/zmdms-resource/seal/query-compare-task/" + task_id,
|
|
23
22
|
method: 'GET',
|
|
24
23
|
})
|
|
25
24
|
.then(function (res) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
var _a;
|
|
26
|
+
if (res.status === 200 &&
|
|
27
|
+
res.data.code === 200 &&
|
|
28
|
+
((_a = res.data.data[0]) === null || _a === void 0 ? void 0 : _a.url)) {
|
|
29
|
+
// 比对文件预览
|
|
30
|
+
window.open(res.data.data[0].url);
|
|
30
31
|
}
|
|
31
32
|
else {
|
|
32
33
|
message.error(res.data.msg || '出错了');
|
|
@@ -38,7 +39,7 @@ var CompareResult = function (_a) {
|
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
else {
|
|
41
|
-
message.info('
|
|
42
|
+
message.info('请先进行合同比对!');
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
catch (err) {
|
|
@@ -8,7 +8,7 @@ import React, { useState } from 'react';
|
|
|
8
8
|
// ztxkui公共组件
|
|
9
9
|
import { Button } from '../../../../index';
|
|
10
10
|
var TemplateAttach = function (_a) {
|
|
11
|
-
var record = _a.record,
|
|
11
|
+
var record = _a.record, openCustomerModalHandle = _a.openCustomerModalHandle, index = _a.index, request = _a.request, getTaskId = _a.getTaskId, isEdit = _a.isEdit;
|
|
12
12
|
// 设置合同比对按钮的loading状态
|
|
13
13
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
|
14
14
|
var onClickHandle = function () {
|
|
@@ -51,8 +51,10 @@ var TemplateAttach = function (_a) {
|
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
53
|
return (React.createElement("div", null,
|
|
54
|
+
React.createElement("div", null, record.templateAttachName || ''),
|
|
55
|
+
React.createElement("div", null, record.templateCrNo || ''),
|
|
54
56
|
React.createElement("div", null,
|
|
55
|
-
React.createElement(Button, { type: "link", onClick: function () {
|
|
57
|
+
React.createElement(Button, { type: "link", disabled: !isEdit, onClick: function () {
|
|
56
58
|
openCustomerModalHandle && openCustomerModalHandle(index);
|
|
57
59
|
} }, "\u9009\u62E9\u5BA2\u6237\u6837\u677F")),
|
|
58
60
|
React.createElement(Button, { type: "primary", size: "small", disabled: !isEdit, onClick: onClickHandle, loading: loading }, "\u5408\u540C\u6BD4\u5BF9")));
|
|
@@ -202,7 +202,7 @@ var Sinatures = function (_a) {
|
|
|
202
202
|
dataIndex: 'templateAttachId',
|
|
203
203
|
width: 220,
|
|
204
204
|
render: function (text, record, index) {
|
|
205
|
-
return record.attachTypeName === '合同本身' ? (React.createElement(TemplateAttach, { record: record, request: request,
|
|
205
|
+
return record.attachTypeName === '合同本身' ? (React.createElement(TemplateAttach, { record: record, request: request, index: index, openCustomerModalHandle: openCustomerModalHandle, getTaskId: getTaskId, isEdit: isEdit })) : ('');
|
|
206
206
|
},
|
|
207
207
|
},
|
|
208
208
|
{
|
|
@@ -211,7 +211,7 @@ var Sinatures = function (_a) {
|
|
|
211
211
|
dataIndex: 'compareAttachId',
|
|
212
212
|
width: 100,
|
|
213
213
|
render: function (text, record, index) {
|
|
214
|
-
return record.attachTypeName === '合同本身' ? (React.createElement(CompareResult, { record: record,
|
|
214
|
+
return record.attachTypeName === '合同本身' ? (React.createElement(CompareResult, { record: record, index: index, request: request })) : ('');
|
|
215
215
|
},
|
|
216
216
|
},
|
|
217
217
|
{
|