ztxkui 10.0.96 → 10.0.98
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/components/TranslationButton/DownFile.js +5 -3
- package/dist/components/TranslationButton/PreviewFile.js +4 -2
- package/dist/components/TranslationButton/TranslationButton.js +9 -7
- package/dist/components/TranslationButton/hooks.js +7 -3
- package/dist/components/UploadCustom/hooks/useDg.js +4 -2
- package/dist/components/business/Common/UserForgetPassword/index.d.ts +2 -0
- package/dist/components/business/Common/UserForgetPassword/index.js +15 -5
- package/dist/components/business/Common/UserPassword/index.d.ts +4 -0
- package/dist/components/business/Common/UserPassword/index.js +27 -5
- package/dist/components/business/Signatures/components/CodeModal.js +5 -3
- package/dist/components/electron-signatures/electronComponents/useCheckedSealInfoList.js +3 -1
- package/dist/components/electron-signatures/electronComponents/useFetchElectronData.js +7 -5
- package/dist/components/electron-signatures/electronComponents/useGetDeptInfo.js +4 -1
- package/dist/components/electron-signatures/fileComponents/useFetchFileTypeData.js +4 -2
- package/dist/components/electron-signatures/hooks/useGetQjVerifyCode.js +4 -2
- package/dist/components/electron-signatures/hooks/useParseElectronSetting.js +13 -11
- package/dist/components/electron-signatures/qunjComponents/useFetchQunjData.js +4 -2
- package/package.json +1 -1
|
@@ -2,11 +2,13 @@ import i18next from 'ztxkutils/dist/i18next';
|
|
|
2
2
|
import React, { useState, useCallback, useEffect } from 'react';
|
|
3
3
|
import { DownloadOutlined } from '@ant-design/icons';
|
|
4
4
|
import { Button, Dropdown, Menu, message } from '../../index';
|
|
5
|
+
import useServiceName from '../../hooks/useServiceName';
|
|
5
6
|
var DownFile = function (_a) {
|
|
6
7
|
var request = _a.request, tid = _a.tid, fileName = _a.fileName;
|
|
8
|
+
var _b = (useServiceName() || {}).scmServiceName, scmServiceName = _b === void 0 ? '/zmdms-scm-system' : _b;
|
|
7
9
|
// 下载类型选择
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
+
var _c = useState([]), downloadTypeDict = _c[0], setDownloadTypeDict = _c[1];
|
|
11
|
+
var _d = useState(false), loading = _d[0], setLoading = _d[1];
|
|
10
12
|
// 获取下载类型字典
|
|
11
13
|
var getDownloadTypeDict = useCallback(function () {
|
|
12
14
|
return request === null || request === void 0 ? void 0 : request({
|
|
@@ -28,7 +30,7 @@ var DownFile = function (_a) {
|
|
|
28
30
|
var download = function (dType) {
|
|
29
31
|
setLoading(true);
|
|
30
32
|
request({
|
|
31
|
-
url: "/api/
|
|
33
|
+
url: "/api" + scmServiceName + "/fanyi/download-trans-file",
|
|
32
34
|
method: 'GET',
|
|
33
35
|
responseType: 'blob',
|
|
34
36
|
params: {
|
|
@@ -3,10 +3,12 @@ import React from 'react';
|
|
|
3
3
|
import { createOriginalUrl } from 'ztxkutils/dist/fileOperation';
|
|
4
4
|
import { dangerouslySetXss } from 'ztxkutils/dist/tools';
|
|
5
5
|
import { ZtxkContext } from '../../index';
|
|
6
|
+
import useServiceName from '../../hooks/useServiceName';
|
|
6
7
|
import DownFile from './DownFile';
|
|
7
8
|
var PreviewFile = function (_a) {
|
|
8
9
|
var request = _a.request;
|
|
9
10
|
var fileBaseUrl = React.useContext(ZtxkContext).fileBaseUrl;
|
|
11
|
+
var _b = (useServiceName() || {}).scmServiceName, scmServiceName = _b === void 0 ? '/zmdms-scm-system' : _b;
|
|
10
12
|
var params = new URLSearchParams(window.location.search);
|
|
11
13
|
var oldId = params.get('oldId');
|
|
12
14
|
var tid = params.get('tid');
|
|
@@ -18,7 +20,7 @@ var PreviewFile = function (_a) {
|
|
|
18
20
|
fileName = dangerouslySetXss(fileName);
|
|
19
21
|
console.error(i18next.t('解码文件名失败:'), error);
|
|
20
22
|
}
|
|
21
|
-
var
|
|
23
|
+
var _c = React.useState(''), translatedUrl = _c[0], setTranslatedUrl = _c[1];
|
|
22
24
|
var oldUrl = React.useMemo(function () {
|
|
23
25
|
if (oldId) {
|
|
24
26
|
return createOriginalUrl(fileBaseUrl, oldId, {
|
|
@@ -30,7 +32,7 @@ var PreviewFile = function (_a) {
|
|
|
30
32
|
React.useEffect(function () {
|
|
31
33
|
if (tid) {
|
|
32
34
|
request({
|
|
33
|
-
url: "/api/
|
|
35
|
+
url: "/api" + scmServiceName + "/fanyi/download-trans-file-id",
|
|
34
36
|
method: 'get',
|
|
35
37
|
params: {
|
|
36
38
|
tid: tid,
|
|
@@ -49,6 +49,7 @@ import i18next from 'ztxkutils/dist/i18next';
|
|
|
49
49
|
import React, { useState, useMemo } from 'react';
|
|
50
50
|
import { unstable_batchedUpdates } from 'react-dom';
|
|
51
51
|
import { Button, message, Dropdown, Menu, Progress } from '../../index';
|
|
52
|
+
import useServiceName from '../../hooks/useServiceName';
|
|
52
53
|
import { usePercent } from './hooks';
|
|
53
54
|
import { useQuery } from 'react-query';
|
|
54
55
|
var translationTypeList = [
|
|
@@ -57,13 +58,14 @@ var translationTypeList = [
|
|
|
57
58
|
];
|
|
58
59
|
var TranslationButton = function (props) {
|
|
59
60
|
var attachId = props.attachId, tid = props.tid, request = props.request, translationParams = props.translationParams, tidChange = props.tidChange;
|
|
60
|
-
var _a =
|
|
61
|
-
var
|
|
61
|
+
var _a = useServiceName() || {}, _b = _a.scmServiceName, scmServiceName = _b === void 0 ? '/zmdms-scm-system' : _b, _c = _a.mdmServiceName, mdmServiceName = _c === void 0 ? '/zmdms-mdm-data' : _c;
|
|
62
|
+
var _d = useState(), translationTid = _d[0], setTranslationTid = _d[1];
|
|
63
|
+
var _e = useState(false), loading = _e[0], setLoading = _e[1];
|
|
62
64
|
var res = useQuery({
|
|
63
65
|
queryKey: ['translationTypeList'],
|
|
64
66
|
queryFn: function () {
|
|
65
67
|
return request({
|
|
66
|
-
url: "/api/
|
|
68
|
+
url: "/api" + mdmServiceName + "/dict-biz/dictionary",
|
|
67
69
|
method: 'GET',
|
|
68
70
|
params: { code: 'zsk_term_library_id' },
|
|
69
71
|
});
|
|
@@ -84,10 +86,10 @@ var TranslationButton = function (props) {
|
|
|
84
86
|
var translationStatus = useMemo(function () {
|
|
85
87
|
return currentTid ? 'pending' : 'start';
|
|
86
88
|
}, [currentTid]);
|
|
87
|
-
var
|
|
89
|
+
var _f = usePercent({
|
|
88
90
|
currentTid: currentTid,
|
|
89
91
|
request: request,
|
|
90
|
-
}), percent =
|
|
92
|
+
}), percent = _f.percent, isTranslating = _f.isTranslating, startTranslate = _f.startTranslate;
|
|
91
93
|
/**
|
|
92
94
|
* @param translationType 翻译转换规则
|
|
93
95
|
*/
|
|
@@ -113,7 +115,7 @@ var TranslationButton = function (props) {
|
|
|
113
115
|
setLoading(true);
|
|
114
116
|
// 翻译文件
|
|
115
117
|
request({
|
|
116
|
-
url: "/api/
|
|
118
|
+
url: "/api" + scmServiceName + "/fanyi/upload-orgin-files",
|
|
117
119
|
method: 'POST',
|
|
118
120
|
data: __assign(__assign({ attachId: attachId, bilingualControl: 0, termLibraryId: (translationParams === null || translationParams === void 0 ? void 0 : translationParams.termLibraryKey)
|
|
119
121
|
? libraryMap[translationParams === null || translationParams === void 0 ? void 0 : translationParams.termLibraryKey]
|
|
@@ -181,7 +183,7 @@ var TranslationButton = function (props) {
|
|
|
181
183
|
}
|
|
182
184
|
function getTranslateProgress() {
|
|
183
185
|
return request === null || request === void 0 ? void 0 : request({
|
|
184
|
-
url: "/api/
|
|
186
|
+
url: "/api" + scmServiceName + "/fanyi/query-trans-progress/" + currentTid,
|
|
185
187
|
method: 'GET',
|
|
186
188
|
}).then(function (res) {
|
|
187
189
|
var _a, _b, _c, _d, _e;
|
|
@@ -48,9 +48,10 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
import i18next from 'ztxkutils/dist/i18next';
|
|
49
49
|
import { useState, useEffect, useRef } from 'react';
|
|
50
50
|
import { message } from 'ztxkui';
|
|
51
|
-
|
|
51
|
+
import useServiceName from '../../hooks/useServiceName';
|
|
52
|
+
function getTranslateProgress(request, currentTid, scmServiceName) {
|
|
52
53
|
return request === null || request === void 0 ? void 0 : request({
|
|
53
|
-
url: "/api/
|
|
54
|
+
url: "/api" + scmServiceName + "/fanyi/query-trans-progress/" + currentTid,
|
|
54
55
|
method: 'GET',
|
|
55
56
|
}).then(function (res) {
|
|
56
57
|
var _a, _b, _c, _d, _e;
|
|
@@ -80,6 +81,9 @@ export function usePercent(_a) {
|
|
|
80
81
|
requestRef.current = request;
|
|
81
82
|
var currentTidRef = useRef(currentTid);
|
|
82
83
|
currentTidRef.current = currentTid;
|
|
84
|
+
var _d = (useServiceName() || {}).scmServiceName, scmServiceName = _d === void 0 ? '/zmdms-scm-system' : _d;
|
|
85
|
+
var scmServiceNameRef = useRef(scmServiceName);
|
|
86
|
+
scmServiceNameRef.current = scmServiceName;
|
|
83
87
|
useEffect(function () {
|
|
84
88
|
return function () {
|
|
85
89
|
return clearTimeout(timerRef.current);
|
|
@@ -100,7 +104,7 @@ export function usePercent(_a) {
|
|
|
100
104
|
var _a, flag, percent;
|
|
101
105
|
return __generator(this, function (_b) {
|
|
102
106
|
switch (_b.label) {
|
|
103
|
-
case 0: return [4 /*yield*/, getTranslateProgress(requestRef.current, currentTidRef.current)];
|
|
107
|
+
case 0: return [4 /*yield*/, getTranslateProgress(requestRef.current, currentTidRef.current, scmServiceNameRef.current)];
|
|
104
108
|
case 1:
|
|
105
109
|
_a = _b.sent(), flag = _a.flag, percent = _a.percent;
|
|
106
110
|
setPending(!flag);
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import i18next from 'ztxkutils/dist/i18next';
|
|
2
2
|
import { message } from '../../../index';
|
|
3
3
|
import { useCallback } from 'react';
|
|
4
|
+
import useServiceName from '../../../hooks/useServiceName';
|
|
4
5
|
export default function useDg(request) {
|
|
6
|
+
var _a = (useServiceName() || {}).scmServiceName, scmServiceName = _a === void 0 ? '/zmdms-scm-system' : _a;
|
|
5
7
|
// 开始比对
|
|
6
8
|
var compareHandle = useCallback(function (templateId, fileId) {
|
|
7
9
|
return request === null || request === void 0 ? void 0 : request({
|
|
8
|
-
url: "/api/
|
|
10
|
+
url: "/api" + scmServiceName + "/seal/create-compare-task/" + templateId + "/" + fileId,
|
|
9
11
|
method: 'GET',
|
|
10
12
|
}).then(function (res) {
|
|
11
13
|
if (res.status === 200 && res.data.code === 200) {
|
|
@@ -25,7 +27,7 @@ export default function useDg(request) {
|
|
|
25
27
|
// 查看比对结果
|
|
26
28
|
var lookCompareHandle = useCallback(function (taskId) {
|
|
27
29
|
return request === null || request === void 0 ? void 0 : request({
|
|
28
|
-
url: "/api/
|
|
30
|
+
url: "/api" + scmServiceName + "/seal/query-compare-task/" + taskId,
|
|
29
31
|
method: 'GET',
|
|
30
32
|
}).then(function (res) {
|
|
31
33
|
var _a;
|
|
@@ -6,6 +6,8 @@ interface IProps {
|
|
|
6
6
|
request: any;
|
|
7
7
|
encryptionHandle: any;
|
|
8
8
|
setUserPasswordOption?: any;
|
|
9
|
+
/** 是否启用强密码校验规则:长度至少8位,且必须同时包含大写字母、小写字母、数字和特殊字符;默认 false 保持原有校验逻辑 */
|
|
10
|
+
strictPassword?: boolean;
|
|
9
11
|
}
|
|
10
12
|
declare const ForgetPassword: React.FC<IProps>;
|
|
11
13
|
export default ForgetPassword;
|
|
@@ -50,15 +50,16 @@ import { Modal, Form, SearchContainer, Input, Container, Button, message, } from
|
|
|
50
50
|
import { validate, commonMessage,
|
|
51
51
|
// validatePassword,
|
|
52
52
|
} from 'ztxkutils/dist/validate';
|
|
53
|
+
import { STRONG_PASSWORD_MESSAGE, validateStrongPassword, } from '../UserPassword';
|
|
53
54
|
var SearchLeft = SearchContainer.SearchLeft, Item = SearchContainer.SearchItem;
|
|
54
55
|
var countDownMaxTime = 60; // 倒计时最大时间
|
|
55
56
|
var ForgetPassword = function (_a) {
|
|
56
|
-
var visible = _a.visible, onCancel = _a.onCancel, setUserPassword = _a.setUserPassword, request = _a.request, setUserPasswordOption = _a.setUserPasswordOption, encryptionHandle = _a.encryptionHandle;
|
|
57
|
+
var visible = _a.visible, onCancel = _a.onCancel, setUserPassword = _a.setUserPassword, request = _a.request, setUserPasswordOption = _a.setUserPasswordOption, encryptionHandle = _a.encryptionHandle, _b = _a.strictPassword, strictPassword = _b === void 0 ? false : _b;
|
|
57
58
|
var form = Form.useForm()[0];
|
|
58
|
-
var
|
|
59
|
+
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
|
59
60
|
// 发送短信验证码相关操作
|
|
60
|
-
var
|
|
61
|
-
var
|
|
61
|
+
var _d = useState(false), codeLoading = _d[0], setCodeLoading = _d[1];
|
|
62
|
+
var _e = useState(countDownMaxTime), countDown = _e[0], setCountDown = _e[1];
|
|
62
63
|
var setIntervalCount = useRef();
|
|
63
64
|
useLayoutEffect(function () {
|
|
64
65
|
form.setFieldsValue({
|
|
@@ -262,6 +263,13 @@ var ForgetPassword = function (_a) {
|
|
|
262
263
|
var getFieldValue = _a.getFieldValue;
|
|
263
264
|
return ({
|
|
264
265
|
validator: function (rule, value) {
|
|
266
|
+
// 启用强密码规则:长度至少8位,且同时包含大写字母、小写字母、数字和特殊字符
|
|
267
|
+
if (strictPassword) {
|
|
268
|
+
if (!validateStrongPassword(value)) {
|
|
269
|
+
return Promise.reject(STRONG_PASSWORD_MESSAGE);
|
|
270
|
+
}
|
|
271
|
+
return Promise.resolve();
|
|
272
|
+
}
|
|
265
273
|
if ((value === null || value === void 0 ? void 0 : value.length) >= 8) {
|
|
266
274
|
return Promise.resolve();
|
|
267
275
|
}
|
|
@@ -283,7 +291,9 @@ var ForgetPassword = function (_a) {
|
|
|
283
291
|
] },
|
|
284
292
|
React.createElement(Input.Password, { autoComplete: "off", placeholder: "\u8BF7\u8F93\u5165\u65B0\u5BC6\u7801" })),
|
|
285
293
|
React.createElement("div", null,
|
|
286
|
-
React.createElement("p", { style: { height: 32, lineHeight: '32px', color: 'red' } },
|
|
294
|
+
React.createElement("p", { style: { height: 32, lineHeight: '32px', color: 'red' } }, strictPassword
|
|
295
|
+
? STRONG_PASSWORD_MESSAGE
|
|
296
|
+
: '密码长度最小为8位!'))),
|
|
287
297
|
React.createElement(Item, { name: "newPassword1", label: "\u786E\u8BA4\u65B0\u5BC6\u7801", rules: [
|
|
288
298
|
{ required: true, message: '请确认密码' },
|
|
289
299
|
function (_a) {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
export declare const validateStrongPassword: (str: any) => boolean;
|
|
3
|
+
export declare const STRONG_PASSWORD_MESSAGE = "\u5BC6\u7801\u590D\u6742\u5EA6\u4E0D\u7B26\u5408\u8981\u6C42:\u957F\u5EA6\u81F3\u5C118\u4F4D\uFF0C\u4E14\u5FC5\u987B\u540C\u65F6\u5305\u542B\u5927\u5199\u5B57\u6BCD\u3001\u5C0F\u5199\u5B57\u6BCD\u3001\u6570\u5B57\u548C\u7279\u6B8A\u5B57\u7B26";
|
|
2
4
|
interface IProps {
|
|
3
5
|
visible: boolean;
|
|
4
6
|
onCancel?: any;
|
|
@@ -6,6 +8,8 @@ interface IProps {
|
|
|
6
8
|
request?: any;
|
|
7
9
|
encryptionHandle?: any;
|
|
8
10
|
setUserPasswordOption?: any;
|
|
11
|
+
/** 是否启用强密码校验规则:长度至少8位,且必须同时包含大写字母、小写字母、数字和特殊字符;默认 false 保持原有校验逻辑 */
|
|
12
|
+
strictPassword?: boolean;
|
|
9
13
|
}
|
|
10
14
|
declare const Making: React.FC<IProps>;
|
|
11
15
|
export default Making;
|
|
@@ -66,11 +66,24 @@ var validatePassword = function (str) {
|
|
|
66
66
|
return conditionsMet >= 3;
|
|
67
67
|
};
|
|
68
68
|
var SearchLeft = SearchContainer.SearchLeft, Item = SearchContainer.SearchItem;
|
|
69
|
+
// 新密码复杂度校验:长度至少8位,且必须同时包含大写字母、小写字母、数字和特殊字符
|
|
70
|
+
export var validateStrongPassword = function (str) {
|
|
71
|
+
if (typeof str !== 'string' || str.length < 8) {
|
|
72
|
+
return false;
|
|
73
|
+
}
|
|
74
|
+
var hasNumber = /\d/.test(str);
|
|
75
|
+
var hasUpperCase = /[A-Z]/.test(str);
|
|
76
|
+
var hasLowerCase = /[a-z]/.test(str);
|
|
77
|
+
var hasSpecialChar = /[^a-zA-Z0-9]/.test(str);
|
|
78
|
+
return hasNumber && hasUpperCase && hasLowerCase && hasSpecialChar;
|
|
79
|
+
};
|
|
80
|
+
// 新校验规则的提示文案
|
|
81
|
+
export var STRONG_PASSWORD_MESSAGE = '密码复杂度不符合要求:长度至少8位,且必须同时包含大写字母、小写字母、数字和特殊字符';
|
|
69
82
|
var Making = function (_a) {
|
|
70
|
-
var visible = _a.visible, onCancel = _a.onCancel, setUserPassword = _a.setUserPassword, request = _a.request, setUserPasswordOption = _a.setUserPasswordOption, encryptionHandle = _a.encryptionHandle;
|
|
83
|
+
var visible = _a.visible, onCancel = _a.onCancel, setUserPassword = _a.setUserPassword, request = _a.request, setUserPasswordOption = _a.setUserPasswordOption, encryptionHandle = _a.encryptionHandle, _b = _a.strictPassword, strictPassword = _b === void 0 ? false : _b;
|
|
71
84
|
var hightKeywords = React.useContext(ZtxkContext).hightKeywords;
|
|
72
85
|
var form = Form.useForm()[0];
|
|
73
|
-
var
|
|
86
|
+
var _c = useState(false), loading = _c[0], setLoading = _c[1];
|
|
74
87
|
/**提交验证 */
|
|
75
88
|
var vallidateFn = useCallback(function (callback) { return __awaiter(void 0, void 0, void 0, function () {
|
|
76
89
|
var err_1, errorFields;
|
|
@@ -156,6 +169,13 @@ var Making = function (_a) {
|
|
|
156
169
|
var getFieldValue = _a.getFieldValue;
|
|
157
170
|
return ({
|
|
158
171
|
validator: function (rule, value) {
|
|
172
|
+
// 启用强密码规则:长度至少8位,且同时包含大写字母、小写字母、数字和特殊字符
|
|
173
|
+
if (strictPassword) {
|
|
174
|
+
if (!validateStrongPassword(value)) {
|
|
175
|
+
return Promise.reject(STRONG_PASSWORD_MESSAGE);
|
|
176
|
+
}
|
|
177
|
+
return Promise.resolve();
|
|
178
|
+
}
|
|
159
179
|
if (hightKeywords) {
|
|
160
180
|
if ((value === null || value === void 0 ? void 0 : value.length) <= 8) {
|
|
161
181
|
return Promise.reject('密码长度必须大于8位!');
|
|
@@ -190,9 +210,11 @@ var Making = function (_a) {
|
|
|
190
210
|
] },
|
|
191
211
|
React.createElement(Input.Password, { autoComplete: "new-password" })),
|
|
192
212
|
React.createElement("div", null,
|
|
193
|
-
React.createElement("p", { style: { height: 32, lineHeight: '32px', color: 'red' } },
|
|
194
|
-
?
|
|
195
|
-
:
|
|
213
|
+
React.createElement("p", { style: { height: 32, lineHeight: '32px', color: 'red' } }, strictPassword
|
|
214
|
+
? STRONG_PASSWORD_MESSAGE
|
|
215
|
+
: hightKeywords
|
|
216
|
+
? '密码长度大于8位,至少满足数字,大写字母,小写字母,特殊字符中的三种!'
|
|
217
|
+
: '密码长度最小为8位!'))),
|
|
196
218
|
React.createElement(Item, { name: "newPassword1", label: "\u786E\u8BA4\u65B0\u5BC6\u7801", rules: [
|
|
197
219
|
{ required: true, message: '请确认密码' },
|
|
198
220
|
function (_a) {
|
|
@@ -48,11 +48,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
import i18next from 'ztxkutils/dist/i18next';
|
|
49
49
|
import React, { useState, useMemo, memo, forwardRef, useImperativeHandle, } from 'react';
|
|
50
50
|
import { Modal, ProForm, Input, message } from '../../../../index';
|
|
51
|
+
import useServiceName from '../../../../hooks/useServiceName';
|
|
51
52
|
import { useForm } from '../../../ProForm';
|
|
52
53
|
var CodeModal = function (props, ref) {
|
|
53
54
|
var details = props.details, request = props.request;
|
|
54
|
-
var _a =
|
|
55
|
-
var _b = useState(),
|
|
55
|
+
var _a = (useServiceName() || {}).scmServiceName, scmServiceName = _a === void 0 ? '/zmdms-scm-system' : _a;
|
|
56
|
+
var _b = useState(false), visible = _b[0], setVisible = _b[1];
|
|
57
|
+
var _c = useState(), code = _c[0], setCode = _c[1];
|
|
56
58
|
var form = useForm()[0];
|
|
57
59
|
var items = useMemo(function () {
|
|
58
60
|
return [
|
|
@@ -110,7 +112,7 @@ var CodeModal = function (props, ref) {
|
|
|
110
112
|
// 20240407 添加工号参数(额外参数)
|
|
111
113
|
fingerNo: params.applicantEmpNumber, details: result });
|
|
112
114
|
request({
|
|
113
|
-
url:
|
|
115
|
+
url: "/api" + scmServiceName + "/seal/get-verify-code",
|
|
114
116
|
method: 'POST',
|
|
115
117
|
data: data,
|
|
116
118
|
})
|
|
@@ -4,11 +4,13 @@ import i18next from 'ztxkutils/dist/i18next';
|
|
|
4
4
|
*/
|
|
5
5
|
import useMemoizedFn from '../../utils/useMemoizedFn';
|
|
6
6
|
import { message } from '../../../index';
|
|
7
|
+
import useServiceName from '../../../hooks/useServiceName';
|
|
7
8
|
export default function useCheckedSealInfoList(request) {
|
|
9
|
+
var _a = (useServiceName() || {}).scmServiceName, scmServiceName = _a === void 0 ? '/zmdms-scm-system' : _a;
|
|
8
10
|
var getNoSealInfoList = useMemoizedFn(function (data) {
|
|
9
11
|
return new Promise(function (resolve, reject) {
|
|
10
12
|
request({
|
|
11
|
-
url:
|
|
13
|
+
url: "/api" + scmServiceName + "/seal/query-unconfirmed-position-seal-list",
|
|
12
14
|
data: data,
|
|
13
15
|
method: 'POST',
|
|
14
16
|
})
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import i18next from 'ztxkutils/dist/i18next';
|
|
2
2
|
import { useCallback, useEffect, useState, useMemo, useRef } from 'react';
|
|
3
3
|
import { message } from '../../../index';
|
|
4
|
+
import useServiceName from '../../../hooks/useServiceName';
|
|
4
5
|
/**
|
|
5
6
|
* 获取电子印章远程数据
|
|
6
7
|
*/
|
|
7
8
|
export default function useFetchElectronData(options) {
|
|
8
9
|
var request = options.request, needQys = options.needQys, deptId = options.deptId, secondDepId = options.secondDepId, flowId = options.flowId, records = options.records;
|
|
10
|
+
var _a = (useServiceName() || {}).scmServiceName, scmServiceName = _a === void 0 ? '/zmdms-scm-system' : _a;
|
|
9
11
|
// records里面是否有勾选了电子印章的数据
|
|
10
12
|
var hasElectronMemo = useMemo(function () {
|
|
11
13
|
var _a;
|
|
@@ -13,9 +15,9 @@ export default function useFetchElectronData(options) {
|
|
|
13
15
|
}, [records]);
|
|
14
16
|
var isFirstRenderRef = useRef(false);
|
|
15
17
|
// 印章列表数据
|
|
16
|
-
var
|
|
18
|
+
var _b = useState(), electronList = _b[0], setElectronList = _b[1];
|
|
17
19
|
// 一级责任人数据
|
|
18
|
-
var
|
|
20
|
+
var _c = useState(), firstLevelPersonName = _c[0], setFirstLevelPersonName = _c[1];
|
|
19
21
|
// 获取电子印章信息 接口层必须传入部门id 和 流程id 才能获取到印章信息
|
|
20
22
|
var getElectronList = useCallback(function (params) {
|
|
21
23
|
var newParam = {
|
|
@@ -31,7 +33,7 @@ export default function useFetchElectronData(options) {
|
|
|
31
33
|
newParam.secondDepId = params.secondDepId;
|
|
32
34
|
}
|
|
33
35
|
return request === null || request === void 0 ? void 0 : request({
|
|
34
|
-
url:
|
|
36
|
+
url: "/api" + scmServiceName + "/flowdeptseal/select-seal-info-list",
|
|
35
37
|
params: newParam,
|
|
36
38
|
method: 'GET',
|
|
37
39
|
}).then(function (res) {
|
|
@@ -52,7 +54,7 @@ export default function useFetchElectronData(options) {
|
|
|
52
54
|
// 获取一级责任人名字 通过部门
|
|
53
55
|
var getFirstLevelPerson = useCallback(function (deptId) {
|
|
54
56
|
return request({
|
|
55
|
-
url: "/api/
|
|
57
|
+
url: "/api" + scmServiceName + "/seal/get-yjzrr-name/" + deptId,
|
|
56
58
|
method: 'GET',
|
|
57
59
|
})
|
|
58
60
|
.then(function (res) {
|
|
@@ -79,7 +81,7 @@ export default function useFetchElectronData(options) {
|
|
|
79
81
|
// 获取一级责任人名字 通过二级单元
|
|
80
82
|
var getFirstLevelPersonBysecondDepId = useCallback(function (secondDepId) {
|
|
81
83
|
return request({
|
|
82
|
-
url: "/api/
|
|
84
|
+
url: "/api" + scmServiceName + "/seal/get-yjzrr-name-by-sec-unit/" + secondDepId,
|
|
83
85
|
method: 'GET',
|
|
84
86
|
})
|
|
85
87
|
.then(function (res) {
|
|
@@ -3,11 +3,14 @@ import i18next from 'ztxkutils/dist/i18next';
|
|
|
3
3
|
* 验证契约锁是否全部盖章
|
|
4
4
|
*/
|
|
5
5
|
import useMemoizedFn from '../../utils/useMemoizedFn';
|
|
6
|
+
import { useContext } from 'react';
|
|
7
|
+
import ZtxkContext from '../../utils/ZtxkContext';
|
|
6
8
|
export default function useCheckedSealInfoList(request) {
|
|
9
|
+
var saasConfig = useContext(ZtxkContext).saasConfig;
|
|
7
10
|
var getDeptInfo = useMemoizedFn(function (params) {
|
|
8
11
|
return new Promise(function (resolve, reject) {
|
|
9
12
|
request({
|
|
10
|
-
url: '/api/zmdms-system/dept/detail',
|
|
13
|
+
url: (saasConfig === null || saasConfig === void 0 ? void 0 : saasConfig.deptDetailApi) || '/api/zmdms-system/dept/detail',
|
|
11
14
|
params: params,
|
|
12
15
|
method: 'GET',
|
|
13
16
|
})
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
+
import useServiceName from '../../../hooks/useServiceName';
|
|
2
3
|
var defaultFileType = [];
|
|
3
4
|
// 获取附件类型
|
|
4
5
|
export default function useFetchFileTypeData(options) {
|
|
5
6
|
var request = options.request, fileTypeKey = options.fileTypeKey, fileTypeFilterList = options.fileTypeFilterList, fileTypeList = options.fileTypeList, useOutsideFileTypeList = options.useOutsideFileTypeList, isAllowedPatchFileType = options.isAllowedPatchFileType;
|
|
6
|
-
var _a =
|
|
7
|
+
var _a = (useServiceName() || {}).mdmServiceName, mdmServiceName = _a === void 0 ? '/zmdms-mdm-data' : _a;
|
|
8
|
+
var _b = useState(), fileTypeFetchList = _b[0], setFileType = _b[1];
|
|
7
9
|
useEffect(function () {
|
|
8
10
|
if (!isAllowedPatchFileType) {
|
|
9
11
|
return;
|
|
@@ -24,7 +26,7 @@ export default function useFetchFileTypeData(options) {
|
|
|
24
26
|
status: 50,
|
|
25
27
|
};
|
|
26
28
|
request === null || request === void 0 ? void 0 : request({
|
|
27
|
-
url:
|
|
29
|
+
url: "/api" + mdmServiceName + "/dict-biz/dictionary",
|
|
28
30
|
params: params,
|
|
29
31
|
method: 'GET',
|
|
30
32
|
}).then(function (res) {
|
|
@@ -2,12 +2,14 @@ import i18next from 'ztxkutils/dist/i18next';
|
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import { getToken, jwtDecode } from 'ztxkutils/dist/authority';
|
|
4
4
|
import { message } from '../../../index';
|
|
5
|
+
import useServiceName from '../../../hooks/useServiceName';
|
|
5
6
|
/**
|
|
6
7
|
* 根据规则获取群杰验证码
|
|
7
8
|
*/
|
|
8
9
|
export default function useGetQjVerifyCode(options) {
|
|
9
10
|
var allOptions = options.allOptions, request = options.request, isNewQys = options.isNewQys;
|
|
10
|
-
var _a =
|
|
11
|
+
var _a = (useServiceName() || {}).scmServiceName, scmServiceName = _a === void 0 ? '/zmdms-scm-system' : _a;
|
|
12
|
+
var _b = useState([]), qjVerifyCodeData = _b[0], setQjVerifyCodeData = _b[1];
|
|
11
13
|
// 根据allOptions解析出需要的参数
|
|
12
14
|
var params = useMemo(function () {
|
|
13
15
|
if (!isNewQys) {
|
|
@@ -48,7 +50,7 @@ export default function useGetQjVerifyCode(options) {
|
|
|
48
50
|
}, [params, isNewQys]);
|
|
49
51
|
var getQjVerifyCodeHandle = useCallback(function (queryParams) {
|
|
50
52
|
return request({
|
|
51
|
-
url: "/api/
|
|
53
|
+
url: "/api" + scmServiceName + "/qjverificationcode/get-verify-code-by-processids?processIds=" + queryParams,
|
|
52
54
|
method: 'get',
|
|
53
55
|
})
|
|
54
56
|
.then(function (res) {
|
|
@@ -15,27 +15,29 @@ import { unstable_batchedUpdates } from 'react-dom';
|
|
|
15
15
|
import { message } from '../../../index';
|
|
16
16
|
import useMemoizedFn from '../../utils/useMemoizedFn';
|
|
17
17
|
import { isFlowCompleted } from '../utils';
|
|
18
|
+
import useServiceName from '../../../hooks/useServiceName';
|
|
18
19
|
/**
|
|
19
20
|
* 电子印章设置相关操作
|
|
20
21
|
*/
|
|
21
22
|
export default function useParseElectronSetting(options) {
|
|
23
|
+
var _a = (useServiceName() || {}).scmServiceName, scmServiceName = _a === void 0 ? '/zmdms-scm-system' : _a;
|
|
22
24
|
var isUnControlled = options.isUnControlled, onValueChange = options.onValueChange, dataType = options.dataType, request = options.request, setLoading = options.setLoading, records = options.records, deptId = options.deptId, secondDepId = options.secondDepId, contractId = options.contractId, docAttachMap = options.docAttachMap, documentIdList = options.documentIdList, electronicSealIdList = options.electronicSealIdList, isCheckedEconomic = options.isCheckedEconomic, setCurrentIsCheckedEconomic = options.setCurrentIsCheckedEconomic, canEdit = options.canEdit, flowStatus = options.flowStatus, onElectronicSealIdChange = options.onElectronicSealIdChange, electronList = options.electronList;
|
|
23
25
|
// 点击签署位置 实时记录点击时的印章列表
|
|
24
|
-
var
|
|
26
|
+
var _b = useState(), clickElectronicSealIdList = _b[0], setClickElectronicSealIdList = _b[1];
|
|
25
27
|
// 当前合同id数据
|
|
26
|
-
var
|
|
28
|
+
var _c = useState(function () {
|
|
27
29
|
return contractId;
|
|
28
|
-
}), currentContractId =
|
|
30
|
+
}), currentContractId = _c[0], setCurrentContractId = _c[1];
|
|
29
31
|
// 当前合同id下 附件与文档的关联关系
|
|
30
|
-
var
|
|
32
|
+
var _d = useState(function () {
|
|
31
33
|
return docAttachMap;
|
|
32
|
-
}), currentDocAttachMap =
|
|
34
|
+
}), currentDocAttachMap = _d[0], setCurrentDocAttachMap = _d[1];
|
|
33
35
|
// 当前文档列表数据
|
|
34
|
-
var
|
|
36
|
+
var _e = useState(function () {
|
|
35
37
|
return documentIdList;
|
|
36
|
-
}), currentDocumentIdList =
|
|
38
|
+
}), currentDocumentIdList = _e[0], setCurrentDocumentIdList = _e[1];
|
|
37
39
|
// 未确认盖章位置的印章信息列表
|
|
38
|
-
var
|
|
40
|
+
var _f = useState([]), unElectronicSealList = _f[0], setUnElectronicSealList = _f[1];
|
|
39
41
|
var unElectronicSealIdList = useMemo(function () {
|
|
40
42
|
return unElectronicSealList.map(function (item) { return item.sealId; });
|
|
41
43
|
}, [unElectronicSealList]);
|
|
@@ -152,7 +154,7 @@ export default function useParseElectronSetting(options) {
|
|
|
152
154
|
});
|
|
153
155
|
}
|
|
154
156
|
request({
|
|
155
|
-
url:
|
|
157
|
+
url: "/api" + scmServiceName + "/seal/confirm-seal-info",
|
|
156
158
|
method: 'POST',
|
|
157
159
|
timeout: 90000,
|
|
158
160
|
data: params,
|
|
@@ -233,7 +235,7 @@ export default function useParseElectronSetting(options) {
|
|
|
233
235
|
return;
|
|
234
236
|
}
|
|
235
237
|
request({
|
|
236
|
-
url:
|
|
238
|
+
url: "/api" + scmServiceName + "/seal/view-seal-state",
|
|
237
239
|
// 这里有一个逻辑,后端判断流程是否完结。是flowStatus === '15' 或者 canEdit === '0'
|
|
238
240
|
data: {
|
|
239
241
|
contractId: currentContractId,
|
|
@@ -260,7 +262,7 @@ export default function useParseElectronSetting(options) {
|
|
|
260
262
|
// 查询未确认盖章位置的印章信息列表
|
|
261
263
|
var checkUnStampedSealList = useMemoizedFn(function () {
|
|
262
264
|
return request({
|
|
263
|
-
url:
|
|
265
|
+
url: "/api" + scmServiceName + "/seal/query-unconfirmed-position-seal-list",
|
|
264
266
|
data: {
|
|
265
267
|
contractId: currentContractId,
|
|
266
268
|
sealIdList: electronicSealIdList,
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import i18next from 'ztxkutils/dist/i18next';
|
|
2
2
|
import { useCallback, useEffect, useState } from 'react';
|
|
3
3
|
import { message } from '../../../index';
|
|
4
|
+
import useServiceName from '../../../hooks/useServiceName';
|
|
4
5
|
/**
|
|
5
6
|
* 获取电子印章远程数据
|
|
6
7
|
*/
|
|
7
8
|
export default function useFetchQunjData(options) {
|
|
8
9
|
var request = options.request, needQj = options.needQj, flowId = options.flowId, deptId = options.deptId, companyTypes = options.companyTypes, qunjReplaceDeptId = options.qunjReplaceDeptId;
|
|
10
|
+
var _a = (useServiceName() || {}).scmServiceName, scmServiceName = _a === void 0 ? '/zmdms-scm-system' : _a;
|
|
9
11
|
// 印章列表数据
|
|
10
|
-
var
|
|
12
|
+
var _b = useState(), qunjList = _b[0], setQunjList = _b[1];
|
|
11
13
|
// 获取群杰印章数据
|
|
12
14
|
var getQunjList = useCallback(function (flowId, params) {
|
|
13
15
|
return request === null || request === void 0 ? void 0 : request({
|
|
14
|
-
url: "/api/
|
|
16
|
+
url: "/api" + scmServiceName + "/flowqjuse/query-qj-seal-list/" + flowId,
|
|
15
17
|
method: 'GET',
|
|
16
18
|
params: params,
|
|
17
19
|
}).then(function (res) {
|