ztxkui 4.2.18-9 → 4.2.18-91
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/App.js +315 -291
- package/dist/Demo.js +58 -42
- package/dist/DemoCom/BasicDemo.js +57 -56
- package/dist/DemoCom/CodeQueryDemo.js +3 -2
- package/dist/DemoCom/CollapseDemo.js +28 -27
- package/dist/DemoCom/DragSort.js +11 -10
- package/dist/DemoCom/FormDemo.js +36 -30
- package/dist/DemoCom/PrintContainerDemo.js +151 -150
- package/dist/DemoCom/PrintDemo.js +15 -14
- package/dist/DemoCom/SinaturesDemo.js +9 -8
- package/dist/DemoCom/SyhDemo.js +21 -20
- package/dist/DemoCom/TableAnalyse.js +34 -33
- package/dist/DemoCom/TableDemo.js +74 -70
- package/dist/DemoCom/TableDemo1.js +34 -33
- package/dist/DemoCom/TableDetail.d.ts +9 -0
- package/dist/DemoCom/TableDetail.js +259 -0
- package/dist/DemoCom/TestCom.js +22 -19
- package/dist/DemoCom/data.d.ts +110 -0
- package/dist/DemoCom/data.js +2308 -0
- package/dist/TableDemo/BasicTable.js +103 -29
- package/dist/TableDemo/EditableTable.js +177 -91
- package/dist/TableDemo/ModalTable.js +25 -24
- package/dist/TableDemo/ProEditableTable.d.ts +21 -0
- package/dist/TableDemo/ProEditableTable.js +483 -0
- package/dist/TableDemo/data.d.ts +15 -0
- package/dist/TableDemo/data.js +44 -11
- package/dist/TableDemo/index.js +5 -4
- package/dist/TreeDemo.js +8 -7
- package/dist/TreeSelectDemo.js +10 -7
- package/dist/UI/Form/index.d.ts +3 -0
- package/dist/UI/Form/index.js +346 -0
- package/dist/UI/index.d.ts +2 -0
- package/dist/UI/index.js +10 -0
- package/dist/UploadDemo.js +12 -17
- package/dist/components/Button/button.js +3 -2
- package/dist/components/Collapse/collapse.js +2 -1
- package/dist/components/EnhanceSelect/index.d.ts +5 -1
- package/dist/components/EnhanceSelect/index.js +179 -32
- package/dist/components/EnhanceTree/index.js +4 -3
- package/dist/components/EnhanceTreeSelect/index.js +11 -5
- package/dist/components/Export/export.js +5 -4
- package/dist/components/Input/input.d.ts +3 -0
- package/dist/components/Input/input.js +53 -3
- package/dist/components/InputNumber/input-number.js +3 -2
- package/dist/components/NumberCase/index.js +9 -7
- package/dist/components/Print/print.js +4 -3
- package/dist/components/PrintContainer/AttachPreviewModal.js +3 -2
- package/dist/components/PrintContainer/PrintModal.js +4 -3
- package/dist/components/PrintContainer/handle.d.ts +2 -4
- package/dist/components/PrintContainer/handle.js +3 -2
- package/dist/components/PrintContainer/lodop.js +2 -1
- package/dist/components/PrintContainer/print-container.js +74 -73
- package/dist/components/PrintContainer/service.js +5 -4
- package/dist/components/ProForm/hooks.d.ts +23 -0
- package/dist/components/ProForm/hooks.js +209 -0
- package/dist/components/ProForm/index.d.ts +6 -0
- package/dist/components/ProForm/index.js +101 -0
- package/dist/components/ProForm/interface.d.ts +169 -0
- package/dist/components/ProForm/interface.js +1 -0
- package/dist/components/ProForm/item.d.ts +13 -0
- package/dist/components/ProForm/item.js +221 -0
- package/dist/components/ProForm/items.d.ts +5 -0
- package/dist/components/ProForm/items.js +36 -0
- package/dist/components/ProForm/search-drawer.d.ts +12 -0
- package/dist/components/ProForm/search-drawer.js +202 -0
- package/dist/components/ProForm/setting.d.ts +5 -0
- package/dist/components/ProForm/setting.js +13 -0
- package/dist/components/ProFormList/index.d.ts +12 -0
- package/dist/components/ProFormList/index.js +34 -0
- package/dist/components/ProTable/hooks.d.ts +28 -0
- package/dist/components/ProTable/hooks.js +279 -0
- package/dist/components/ProTable/index.d.ts +8 -0
- package/dist/components/ProTable/index.js +77 -0
- package/dist/components/ProTable/interface.d.ts +51 -0
- package/dist/components/ProTable/interface.js +1 -0
- package/dist/components/RangePicker/range-picker.js +5 -2
- package/dist/components/SortableCancel/sortable-cancel.d.ts +1 -0
- package/dist/components/SortableCancel/sortable-cancel.js +2 -2
- package/dist/components/Table/components/FillDown.d.ts +8 -0
- package/dist/components/Table/components/FillDown.js +11 -0
- package/dist/components/Table/components/FilterDropdown.d.ts +15 -0
- package/dist/components/Table/components/FilterDropdown.js +93 -0
- package/dist/components/Table/constants.d.ts +2 -0
- package/dist/components/Table/constants.js +2 -0
- package/dist/components/Table/hooks/useColumns.d.ts +25 -8
- package/dist/components/Table/hooks/useColumns.js +704 -180
- package/dist/components/Table/hooks/useDropRef.js +4 -2
- package/dist/components/Table/hooks/useInnerPagination.js +1 -0
- package/dist/components/Table/hooks/useSelectSubtotal.d.ts +4 -0
- package/dist/components/Table/hooks/useSelectSubtotal.js +182 -0
- package/dist/components/Table/hooks/useVituralScrollBar.d.ts +10 -0
- package/dist/components/Table/hooks/useVituralScrollBar.js +234 -0
- package/dist/components/Table/index.d.ts +11 -0
- package/dist/components/Table/table-adddel-column.d.ts +8 -5
- package/dist/components/Table/table-adddel-column.js +16 -5
- package/dist/components/Table/table-dynamic.js +165 -18
- package/dist/components/Table/table-enhance-cell.d.ts +7 -3
- package/dist/components/Table/table-enhance-cell.js +214 -109
- package/dist/components/Table/table-enhance-row.d.ts +4 -4
- package/dist/components/Table/table-enhance-row.js +10 -11
- package/dist/components/Table/table-headTooltip.d.ts +6 -0
- package/dist/components/Table/table-headTooltip.js +13 -0
- package/dist/components/Table/table-resizable-title.d.ts +4 -5
- package/dist/components/Table/table-resizable-title.js +33 -6
- package/dist/components/Table/table-sort.d.ts +11 -0
- package/dist/components/Table/table-sort.js +66 -0
- package/dist/components/Table/table.d.ts +30 -4
- package/dist/components/Table/table.js +526 -180
- package/dist/components/Table/utils/dom.d.ts +26 -0
- package/dist/components/Table/utils/dom.js +123 -0
- package/dist/components/Table/utils/filterHandle.d.ts +1 -0
- package/dist/components/Table/utils/filterHandle.js +66 -0
- package/dist/components/Table/utils/getSummaryData.d.ts +2 -1
- package/dist/components/Table/utils/getSummaryData.js +282 -25
- package/dist/components/Table/utils/shallowEqual.d.ts +2 -0
- package/dist/components/Table/utils/shallowEqual.js +35 -0
- package/dist/components/Table/utils/validate.d.ts +1 -1
- package/dist/components/Table/utils/validate.js +30 -11
- package/dist/components/TreeSelect/index.d.ts +15 -0
- package/dist/components/TreeSelect/index.js +29 -0
- package/dist/components/Upload/upload-table.js +31 -26
- package/dist/components/Upload/upload.js +23 -18
- package/dist/components/Upload/utils.js +11 -10
- package/dist/components/UploadSingle/upload-single.js +5 -4
- package/dist/components/Watermark/index.d.ts +2 -0
- package/dist/components/Watermark/index.js +2 -0
- package/dist/components/Watermark/interface.d.ts +20 -0
- package/dist/components/Watermark/interface.js +1 -0
- package/dist/components/Watermark/utils.d.ts +1 -0
- package/dist/components/Watermark/utils.js +70 -0
- package/dist/components/Watermark/water.d.ts +50 -0
- package/dist/components/Watermark/water.js +66 -0
- package/dist/components/Watermark/watermark-div.d.ts +4 -0
- package/dist/components/Watermark/watermark-div.js +41 -0
- package/dist/components/Watermark/watermark-shadow.d.ts +6 -0
- package/dist/components/Watermark/watermark-shadow.js +116 -0
- package/dist/components/Watermark/watermark.d.ts +3 -0
- package/dist/components/Watermark/watermark.js +102 -0
- package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/Gragh/Gragh.js +63 -0
- package/dist/components/WorkflowPrintContainer/component/Header.d.ts +12 -0
- package/dist/components/WorkflowPrintContainer/component/Header.js +109 -0
- package/dist/components/WorkflowPrintContainer/component/ProcessDetail.d.ts +18 -0
- package/dist/components/WorkflowPrintContainer/component/ProcessDetail.js +243 -0
- package/dist/components/WorkflowPrintContainer/component/Upload/index.d.ts +20 -0
- package/dist/components/WorkflowPrintContainer/component/Upload/index.js +59 -0
- package/dist/components/WorkflowPrintContainer/component/association/component/TableList.d.ts +10 -0
- package/dist/components/WorkflowPrintContainer/component/association/component/TableList.js +75 -0
- package/dist/components/WorkflowPrintContainer/component/association/index.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/association/index.js +92 -0
- package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/attention/component/TableList.js +38 -0
- package/dist/components/WorkflowPrintContainer/component/attention/index.d.ts +10 -0
- package/dist/components/WorkflowPrintContainer/component/attention/index.js +95 -0
- package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.d.ts +8 -0
- package/dist/components/WorkflowPrintContainer/component/audit/component/TableList.js +53 -0
- package/dist/components/WorkflowPrintContainer/component/audit/index.d.ts +7 -0
- package/dist/components/WorkflowPrintContainer/component/audit/index.js +88 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/component/TableList.js +53 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/index.d.ts +11 -0
- package/dist/components/WorkflowPrintContainer/component/previewTable/index.js +60 -0
- package/dist/components/WorkflowPrintContainer/component/send/component/TableList.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/send/component/TableList.js +50 -0
- package/dist/components/WorkflowPrintContainer/component/send/index.d.ts +9 -0
- package/dist/components/WorkflowPrintContainer/component/send/index.js +92 -0
- package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.d.ts +12 -0
- package/dist/components/WorkflowPrintContainer/component/trail/component/TableList.js +282 -0
- package/dist/components/WorkflowPrintContainer/component/trail/index.d.ts +11 -0
- package/dist/components/WorkflowPrintContainer/component/trail/index.js +56 -0
- package/dist/components/WorkflowPrintContainer/images.d.ts +2 -0
- package/dist/components/WorkflowPrintContainer/images.js +2 -0
- package/dist/components/WorkflowPrintContainer/index.d.ts +2 -0
- package/dist/components/WorkflowPrintContainer/index.js +2 -0
- package/dist/components/WorkflowPrintContainer/service.d.ts +14 -0
- package/dist/components/WorkflowPrintContainer/service.js +101 -0
- package/dist/components/WorkflowPrintContainer/usePagination.d.ts +14 -0
- package/dist/components/WorkflowPrintContainer/usePagination.js +22 -0
- package/dist/components/WorkflowPrintContainer/workflow-print-container.d.ts +100 -0
- package/dist/components/WorkflowPrintContainer/workflow-print-container.js +236 -0
- package/dist/components/business/Analyse/index.js +12 -11
- package/dist/components/business/CodeQuery/component/SearchForm.js +3 -2
- package/dist/components/business/CodeQuery/component/TableList.js +5 -4
- package/dist/components/business/CodeQuery/hooks.js +2 -1
- package/dist/components/business/CodeQuery/index.js +2 -1
- package/dist/components/business/Common/UserForgetPassword/index.js +36 -28
- package/dist/components/business/Common/UserInfo/component/MakingForm.js +11 -10
- package/dist/components/business/Common/UserInfo/index.js +7 -4
- package/dist/components/business/Common/UserPassword/index.d.ts +1 -0
- package/dist/components/business/Common/UserPassword/index.js +39 -18
- package/dist/components/business/Common/validatePassword.d.ts +1 -1
- package/dist/components/business/Common/validatePassword.js +17 -7
- package/dist/components/business/DetailCard/index.js +7 -6
- package/dist/components/business/DetailHeader/index.js +7 -6
- package/dist/components/business/DetailList/index.js +5 -4
- package/dist/components/business/DgColumns/index.js +12 -11
- package/dist/components/business/ExportButton/index.js +6 -5
- package/dist/components/business/Footer/index.js +4 -1
- package/dist/components/business/GridList/item.d.ts +1 -1
- package/dist/components/business/List/item.d.ts +1 -1
- package/dist/components/business/NewList/item.d.ts +1 -1
- package/dist/components/business/NewList/item.js +1 -1
- package/dist/components/business/OperationBtnGroup/index.js +17 -16
- package/dist/components/business/SearchContainer/hooks/useToggle.d.ts +1 -1
- package/dist/components/business/SearchContainer/hooks/useToggle.js +5 -4
- package/dist/components/business/SearchContainer/record-common-item.d.ts +14 -0
- package/dist/components/business/SearchContainer/record-common-item.js +82 -0
- package/dist/components/business/SearchContainer/record-common-list.d.ts +3 -0
- package/dist/components/business/SearchContainer/record-common-list.js +64 -0
- package/dist/components/business/SearchContainer/search-container.d.ts +13 -0
- package/dist/components/business/SearchContainer/search-container.js +32 -3
- package/dist/components/business/SearchContainer/search-drawer.d.ts +1 -0
- package/dist/components/business/SearchContainer/search-drawer.js +139 -13
- package/dist/components/business/SearchContainer/search-item.js +33 -2
- package/dist/components/business/SearchContainer/search-left.d.ts +1 -0
- package/dist/components/business/SearchContainer/search-left.js +11 -3
- package/dist/components/business/SearchContainer/search-right.js +23 -4
- package/dist/components/business/SearchContainer/useRecordCommonInit.d.ts +15 -0
- package/dist/components/business/SearchContainer/useRecordCommonInit.js +242 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearch.d.ts +7 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearch.js +140 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearchContext.d.ts +31 -0
- package/dist/components/business/SearchContainer/useRecordCommonSearchContext.js +8 -0
- package/dist/components/business/Signatures/components/AttachOperation.js +7 -6
- package/dist/components/business/Signatures/components/CompareResult.js +7 -6
- package/dist/components/business/Signatures/components/DetailTable.js +37 -34
- package/dist/components/business/Signatures/components/QunjSeal.js +5 -4
- package/dist/components/business/Signatures/components/SealCheckbox.js +3 -2
- package/dist/components/business/Signatures/components/TemplateAttach.js +2 -1
- package/dist/components/business/Signatures/index.js +64 -53
- package/dist/components/business/SortList/sort-drawer.js +5 -4
- package/dist/components/business/Template/index.js +11 -10
- package/dist/components/utils/MyStorage.d.ts +36 -0
- package/dist/components/utils/MyStorage.js +120 -0
- package/dist/components/utils/ZtxkContext.d.ts +34 -0
- package/dist/components/utils/ZtxkContext.js +13 -0
- package/dist/components/utils/fetch.d.ts +10 -0
- package/dist/components/utils/fetch.js +119 -0
- package/dist/components/utils/index.d.ts +1 -0
- package/dist/components/utils/index.js +20 -0
- package/dist/components/utils/processNumber.d.ts +12 -0
- package/dist/components/utils/processNumber.js +106 -0
- package/dist/components/utils/upload.js +6 -3
- package/dist/components/utils/useBaseContext.d.ts +5 -0
- package/dist/components/utils/useBaseContext.js +10 -0
- package/dist/components/utils/useLastest.d.ts +2 -0
- package/dist/components/utils/useLastest.js +6 -0
- package/dist/components/utils/useMemoizedFn.d.ts +4 -0
- package/dist/components/utils/useMemoizedFn.js +19 -0
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.css +1011 -7
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +200 -84
- package/dist/locales/en-US.json +818 -0
- package/dist/locales/zh-CN.json +818 -0
- package/dist/request.js +6 -5
- package/package.json +7 -2
|
@@ -45,6 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
48
49
|
import React, { useState, useCallback, useRef, useEffect, useLayoutEffect, } from 'react';
|
|
49
50
|
import { Modal, Form, SearchContainer, Input, Container, Button, message, } from '../../../../index';
|
|
50
51
|
import { validate, commonMessage } from 'ztxkutils/dist/validate';
|
|
@@ -96,14 +97,14 @@ var ForgetPassword = function (_a) {
|
|
|
96
97
|
return true;
|
|
97
98
|
}
|
|
98
99
|
else {
|
|
99
|
-
throw new Error(msg || '用户名和手机号不一致,请联系运维人员!');
|
|
100
|
+
throw new Error(msg || i18next.t('用户名和手机号不一致,请联系运维人员!'));
|
|
100
101
|
}
|
|
101
102
|
})
|
|
102
103
|
.catch(function (err) {
|
|
103
104
|
var _a, _b;
|
|
104
105
|
message.warning((err === null || err === void 0 ? void 0 : err.message) ||
|
|
105
106
|
((_b = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) ||
|
|
106
|
-
'校验用户名和手机号失败,稍后再试!');
|
|
107
|
+
i18next.t('校验用户名和手机号失败,稍后再试!'));
|
|
107
108
|
throw new Error();
|
|
108
109
|
});
|
|
109
110
|
}
|
|
@@ -113,12 +114,12 @@ var ForgetPassword = function (_a) {
|
|
|
113
114
|
var phone = form.getFieldValue('phone');
|
|
114
115
|
var account = form.getFieldValue('account');
|
|
115
116
|
if (!account) {
|
|
116
|
-
message.error('请输入您的用户名');
|
|
117
|
+
message.error(i18next.t('请输入您的用户名'));
|
|
117
118
|
setCodeLoading(false);
|
|
118
119
|
return;
|
|
119
120
|
}
|
|
120
121
|
if (!phone) {
|
|
121
|
-
message.error('请输入您的手机号');
|
|
122
|
+
message.error(i18next.t('请输入您的手机号'));
|
|
122
123
|
setCodeLoading(false);
|
|
123
124
|
return;
|
|
124
125
|
}
|
|
@@ -147,15 +148,15 @@ var ForgetPassword = function (_a) {
|
|
|
147
148
|
.then(function (res) {
|
|
148
149
|
var _a = res.data, msg = _a.msg, success = _a.success;
|
|
149
150
|
if (success === 'true') {
|
|
150
|
-
message.success('验证码发送成功!');
|
|
151
|
+
message.success(i18next.t('验证码发送成功!'));
|
|
151
152
|
}
|
|
152
153
|
else {
|
|
153
|
-
message.warning(msg || '验证码发送失败!');
|
|
154
|
+
message.warning(msg || i18next.t('验证码发送失败!'));
|
|
154
155
|
}
|
|
155
156
|
})
|
|
156
157
|
.catch(function (err) {
|
|
157
158
|
var _a, _b;
|
|
158
|
-
message.warning(((_b = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || '验证码发送失败!');
|
|
159
|
+
message.warning(((_b = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('验证码发送失败!'));
|
|
159
160
|
});
|
|
160
161
|
});
|
|
161
162
|
};
|
|
@@ -207,17 +208,17 @@ var ForgetPassword = function (_a) {
|
|
|
207
208
|
setLoading(false);
|
|
208
209
|
var _a = res.data, msg = _a.msg, code = _a.code;
|
|
209
210
|
if (code === 200) {
|
|
210
|
-
message.success(msg || '密码修改成功!');
|
|
211
|
+
message.success(msg || i18next.t('密码修改成功!'));
|
|
211
212
|
setUserPassword && setUserPassword();
|
|
212
213
|
}
|
|
213
214
|
else {
|
|
214
|
-
message.warning(msg || '密码修改失败!');
|
|
215
|
+
message.warning(msg || i18next.t('密码修改失败!'));
|
|
215
216
|
}
|
|
216
217
|
})
|
|
217
218
|
.catch(function (err) {
|
|
218
219
|
var _a, _b;
|
|
219
220
|
setLoading(false);
|
|
220
|
-
message.warning(((_b = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || '密码修改失败!');
|
|
221
|
+
message.warning(((_b = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('密码修改失败!'));
|
|
221
222
|
});
|
|
222
223
|
}, [form, encryptionHandle, request, setUserPasswordOption, setUserPassword]);
|
|
223
224
|
var onSaveHandle = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -229,34 +230,41 @@ var ForgetPassword = function (_a) {
|
|
|
229
230
|
});
|
|
230
231
|
}); }, [vallidateFn, submitParamsHandle]);
|
|
231
232
|
var footerDomFn = function () {
|
|
232
|
-
return (React.createElement(Button, { type: "primary", onClick: onSaveHandle, loading: loading },
|
|
233
|
+
return (React.createElement(Button, { type: "primary", onClick: onSaveHandle, loading: loading }, i18next.t('确认修改')));
|
|
233
234
|
};
|
|
234
|
-
return (React.createElement(Modal, { loading: loading, visible: visible, onCancel: onCancel, title:
|
|
235
|
+
return (React.createElement(Modal, { loading: loading, visible: visible, onCancel: onCancel, title: i18next.t('忘记密码'), width: "80%", footer: footerDomFn(), forceRender: true },
|
|
235
236
|
React.createElement(Container, null,
|
|
236
237
|
React.createElement(Form, { name: "forget-password-making", autoComplete: "off", form: form },
|
|
237
238
|
React.createElement(SearchContainer, { dark: true },
|
|
238
239
|
React.createElement(SearchLeft, null,
|
|
239
240
|
React.createElement("div", { style: { width: '100%' } },
|
|
240
|
-
React.createElement(Item, { label:
|
|
241
|
-
|
|
241
|
+
React.createElement(Item, { label: i18next.t('用户名'), name: "account", rules: [
|
|
242
|
+
{ required: true, message: i18next.t('请输入您的用户名') },
|
|
243
|
+
] },
|
|
244
|
+
React.createElement(Input, { autoComplete: "off", placeholder: i18next.t('请输入您的用户名') }))),
|
|
242
245
|
React.createElement("div", { style: { width: '100%' } },
|
|
243
|
-
React.createElement(Item, { label:
|
|
244
|
-
{ required: true, message: '请输入您的手机号' },
|
|
246
|
+
React.createElement(Item, { label: i18next.t('手机号'), name: "phone", rules: [
|
|
247
|
+
{ required: true, message: i18next.t('请输入您的手机号') },
|
|
245
248
|
{
|
|
246
249
|
pattern: validate.phoneValidate,
|
|
247
250
|
message: commonMessage.phoneMessage,
|
|
248
251
|
},
|
|
249
252
|
] },
|
|
250
|
-
React.createElement(Input, { autoComplete: "off", placeholder:
|
|
253
|
+
React.createElement(Input, { autoComplete: "off", placeholder: i18next.t('请输入您的手机号') }))),
|
|
251
254
|
React.createElement("div", { style: { width: '100%', display: 'flex' } },
|
|
252
|
-
React.createElement(Item, { label:
|
|
253
|
-
|
|
255
|
+
React.createElement(Item, { label: i18next.t('短信验证码'), name: "code", rules: [
|
|
256
|
+
{
|
|
257
|
+
required: true,
|
|
258
|
+
message: i18next.t('请输入您的短信验证码'),
|
|
259
|
+
},
|
|
260
|
+
] },
|
|
261
|
+
React.createElement(Input, { autoComplete: "off", placeholder: i18next.t('请输入您的短信验证码') })),
|
|
254
262
|
React.createElement(Button, { type: "primary", onClick: onSendCode, loading: codeLoading },
|
|
255
|
-
|
|
263
|
+
i18next.t('发送验证码'),
|
|
256
264
|
codeLoading ? "(" + countDown + "s)" : '')),
|
|
257
265
|
React.createElement("div", { style: { width: '100%', display: 'flex' } },
|
|
258
|
-
React.createElement(Item, { name: "newPassword", label:
|
|
259
|
-
{ required: true, message: '请输入新密码' },
|
|
266
|
+
React.createElement(Item, { name: "newPassword", label: i18next.t('新密码'), rules: [
|
|
267
|
+
{ required: true, message: i18next.t('请输入新密码') },
|
|
260
268
|
function (_a) {
|
|
261
269
|
var getFieldValue = _a.getFieldValue;
|
|
262
270
|
return ({
|
|
@@ -272,11 +280,11 @@ var ForgetPassword = function (_a) {
|
|
|
272
280
|
});
|
|
273
281
|
},
|
|
274
282
|
] },
|
|
275
|
-
React.createElement(Input.Password, { autoComplete: "off", placeholder:
|
|
283
|
+
React.createElement(Input.Password, { autoComplete: "off", placeholder: i18next.t('请输入新密码') })),
|
|
276
284
|
React.createElement("div", null,
|
|
277
|
-
React.createElement("p", { style: { height: 32,
|
|
278
|
-
React.createElement(Item, { name: "newPassword1", label:
|
|
279
|
-
{ required: true, message: '请确认密码' },
|
|
285
|
+
React.createElement("p", { style: { height: 32, color: 'red' } }, passwordMessage))),
|
|
286
|
+
React.createElement(Item, { name: "newPassword1", label: i18next.t('确认新密码'), rules: [
|
|
287
|
+
{ required: true, message: i18next.t('请确认密码') },
|
|
280
288
|
function (_a) {
|
|
281
289
|
var getFieldValue = _a.getFieldValue;
|
|
282
290
|
return ({
|
|
@@ -284,11 +292,11 @@ var ForgetPassword = function (_a) {
|
|
|
284
292
|
if (!value || getFieldValue('newPassword') === value) {
|
|
285
293
|
return Promise.resolve();
|
|
286
294
|
}
|
|
287
|
-
return Promise.reject('两次密码输入不一致');
|
|
295
|
+
return Promise.reject(i18next.t('两次密码输入不一致'));
|
|
288
296
|
},
|
|
289
297
|
});
|
|
290
298
|
},
|
|
291
299
|
], dependencies: ['newPassword'] },
|
|
292
|
-
React.createElement(Input.Password, { autoComplete: "off", placeholder:
|
|
300
|
+
React.createElement(Input.Password, { autoComplete: "off", placeholder: i18next.t('确认新密码') }))))))));
|
|
293
301
|
};
|
|
294
302
|
export default ForgetPassword;
|
|
@@ -9,6 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
12
13
|
import React, { memo, useEffect, useCallback } from 'react';
|
|
13
14
|
import { Form, SearchContainer, Input } from '../../../../../index';
|
|
14
15
|
import { validate, commonMessage } from 'ztxkutils/dist/validate';
|
|
@@ -45,26 +46,26 @@ var MakingForm = function (_a) {
|
|
|
45
46
|
React.createElement(SearchContainer, { dark: true },
|
|
46
47
|
React.createElement(SearchLeft, null,
|
|
47
48
|
React.createElement("div", { style: { width: '100%' } },
|
|
48
|
-
React.createElement(Item, { disabled: true, name: "account", label:
|
|
49
|
-
{ required: true, message: '请输入账号' },
|
|
49
|
+
React.createElement(Item, { disabled: true, name: "account", label: i18next.t('账号'), rules: [
|
|
50
|
+
{ required: true, message: i18next.t('请输入账号') },
|
|
50
51
|
{
|
|
51
52
|
pattern: validate.smallLenValidate,
|
|
52
|
-
message: commonMessage.smallLenMessage('账号'),
|
|
53
|
+
message: commonMessage.smallLenMessage(i18next.t('账号')),
|
|
53
54
|
},
|
|
54
55
|
] },
|
|
55
56
|
React.createElement(Input, { autoComplete: "new-password", disabled: true }))),
|
|
56
57
|
React.createElement("div", { style: { width: '100%' } },
|
|
57
|
-
React.createElement(Item, { disabled: !isEdit, name: "realName", label:
|
|
58
|
-
{ required: true, message: '请输入姓名' },
|
|
58
|
+
React.createElement(Item, { disabled: !isEdit, name: "realName", label: i18next.t('姓名'), rules: [
|
|
59
|
+
{ required: true, message: i18next.t('请输入姓名') },
|
|
59
60
|
{
|
|
60
61
|
pattern: validate.smallLenValidate,
|
|
61
|
-
message: commonMessage.smallLenMessage('姓名'),
|
|
62
|
+
message: commonMessage.smallLenMessage(i18next.t('姓名')),
|
|
62
63
|
},
|
|
63
64
|
] },
|
|
64
65
|
React.createElement(Input, { autoComplete: "new-password", onBlur: onFormItemBlur, disabled: !isEdit }))),
|
|
65
66
|
React.createElement("div", { style: { width: '100%' } },
|
|
66
|
-
React.createElement(Item, { disabled: !isEdit, name: "phone", label:
|
|
67
|
-
{ required: true, message: '请输入电话' },
|
|
67
|
+
React.createElement(Item, { disabled: !isEdit, name: "phone", label: i18next.t('电话'), rules: [
|
|
68
|
+
{ required: true, message: i18next.t('请输入电话') },
|
|
68
69
|
{
|
|
69
70
|
pattern: validate.phoneValidate,
|
|
70
71
|
message: commonMessage.phoneMessage,
|
|
@@ -72,7 +73,7 @@ var MakingForm = function (_a) {
|
|
|
72
73
|
] },
|
|
73
74
|
React.createElement(Input, { autoComplete: "new-password", onBlur: onFormItemBlur, disabled: !isEdit }))),
|
|
74
75
|
React.createElement("div", { style: { width: '100%' } },
|
|
75
|
-
React.createElement(Item, { disabled: !isEdit, name: "email", label:
|
|
76
|
+
React.createElement(Item, { disabled: !isEdit, name: "email", label: i18next.t('邮箱'), rules: [
|
|
76
77
|
{
|
|
77
78
|
pattern: validate.emailValidate,
|
|
78
79
|
message: commonMessage.emailMessage,
|
|
@@ -80,7 +81,7 @@ var MakingForm = function (_a) {
|
|
|
80
81
|
] },
|
|
81
82
|
React.createElement(Input, { autoComplete: "new-password", onBlur: onFormItemBlur, disabled: !isEdit }))),
|
|
82
83
|
React.createElement("div", { style: { width: '100%' } },
|
|
83
|
-
React.createElement(Item, { disabled: !isEdit, name: "identityCard", label:
|
|
84
|
+
React.createElement(Item, { disabled: !isEdit, name: "identityCard", label: i18next.t('身份证号'), rules: [
|
|
84
85
|
{
|
|
85
86
|
pattern: validate.idCardValidate,
|
|
86
87
|
message: commonMessage.idCardMessage,
|
|
@@ -45,6 +45,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
48
49
|
import React, { useEffect, useRef, useCallback, useState } from 'react';
|
|
49
50
|
import { Button, Container, message, Modal } from '../../../../index';
|
|
50
51
|
import MakingForm from './component/MakingForm';
|
|
@@ -157,7 +158,7 @@ var UserInfo = function (_a) {
|
|
|
157
158
|
.catch(function (err) {
|
|
158
159
|
var _a, _b;
|
|
159
160
|
setLoading(false);
|
|
160
|
-
message.warning(((_b = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || '用户信息修改失败!');
|
|
161
|
+
message.warning(((_b = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('用户信息修改失败!'));
|
|
161
162
|
});
|
|
162
163
|
}, [params, onCloseHandle, request, setUserInfoOption, setUserInfo]);
|
|
163
164
|
var onSaveHandle = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
@@ -170,10 +171,12 @@ var UserInfo = function (_a) {
|
|
|
170
171
|
}); }, [vallidateFn, submitParamsHandle]);
|
|
171
172
|
var footerDomFn = function () {
|
|
172
173
|
return isEdit ? (React.createElement(React.Fragment, null,
|
|
173
|
-
React.createElement(Button, { type: "primary", onClick: onSaveHandle, loading: loading },
|
|
174
|
-
React.createElement(Button, { type: "default", onClick: onCloseHandle, loading: loading },
|
|
174
|
+
React.createElement(Button, { type: "primary", onClick: onSaveHandle, loading: loading }, i18next.t('保存')),
|
|
175
|
+
React.createElement(Button, { type: "default", onClick: onCloseHandle, loading: loading }, i18next.t('取消')))) : (React.createElement(Button, { type: "primary", onClick: onStartHandle, loading: loading }, i18next.t('编辑')));
|
|
175
176
|
};
|
|
176
|
-
return (React.createElement(Modal, { visible: visible, loading: loading, onCancel: onCancel, title:
|
|
177
|
+
return (React.createElement(Modal, { visible: visible, loading: loading, onCancel: onCancel, title: i18next.t('用户信息'),
|
|
178
|
+
// footer={footerDomFn()}
|
|
179
|
+
footer: null, maskClosable: false, width: "80%" },
|
|
177
180
|
React.createElement(Container, null,
|
|
178
181
|
React.createElement(MakingForm, { params: params, isEdit: isEdit, getFormObj: getFormObjHandle, setParams: setParams }))));
|
|
179
182
|
};
|
|
@@ -45,14 +45,21 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
45
45
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
|
-
import
|
|
48
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
49
|
+
import React, { useCallback, useState, useMemo } from 'react';
|
|
49
50
|
import { Container, Form, SearchContainer, Input, message, Modal, Button, } from '../../../../index';
|
|
50
51
|
import { validatePassword, passwordMessage } from '../validatePassword';
|
|
51
52
|
var SearchLeft = SearchContainer.SearchLeft, Item = SearchContainer.SearchItem;
|
|
52
53
|
var Making = function (_a) {
|
|
53
|
-
var visible = _a.visible, onCancel = _a.onCancel, setUserPassword = _a.setUserPassword, request = _a.request, setUserPasswordOption = _a.setUserPasswordOption, encryptionHandle = _a.encryptionHandle;
|
|
54
|
+
var visible = _a.visible, onCancel = _a.onCancel, setUserPassword = _a.setUserPassword, request = _a.request, setUserPasswordOption = _a.setUserPasswordOption, encryptionHandle = _a.encryptionHandle, empSource = _a.empSource;
|
|
54
55
|
var form = Form.useForm()[0];
|
|
55
56
|
var _b = useState(false), loading = _b[0], setLoading = _b[1];
|
|
57
|
+
var isOutSource = useMemo(function () {
|
|
58
|
+
if (empSource && empSource + '' === '2') {
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
return false;
|
|
62
|
+
}, [empSource]);
|
|
56
63
|
/**提交验证 */
|
|
57
64
|
var vallidateFn = useCallback(function (callback) { return __awaiter(void 0, void 0, void 0, function () {
|
|
58
65
|
var err_1, errorFields;
|
|
@@ -84,10 +91,14 @@ var Making = function (_a) {
|
|
|
84
91
|
setLoading(true);
|
|
85
92
|
var params = form.getFieldsValue();
|
|
86
93
|
var submitParams = {
|
|
87
|
-
|
|
94
|
+
empSource: empSource,
|
|
88
95
|
newPassword: encryptionHandle(params === null || params === void 0 ? void 0 : params.newPassword),
|
|
89
96
|
newPassword1: encryptionHandle(params === null || params === void 0 ? void 0 : params.newPassword1),
|
|
90
97
|
};
|
|
98
|
+
// 外部用户 不需要旧密码
|
|
99
|
+
if (!isOutSource) {
|
|
100
|
+
submitParams.oldPassword = encryptionHandle(params === null || params === void 0 ? void 0 : params.oldPassword);
|
|
101
|
+
}
|
|
91
102
|
request(setUserPasswordOption
|
|
92
103
|
? __assign(__assign({}, setUserPasswordOption), { data: __assign(__assign({}, setUserPasswordOption.data), submitParams) }) : {
|
|
93
104
|
url: '/api/zmdms-user/update-password',
|
|
@@ -99,19 +110,27 @@ var Making = function (_a) {
|
|
|
99
110
|
setLoading(false);
|
|
100
111
|
var _a = res.data, msg = _a.msg, code = _a.code;
|
|
101
112
|
if (code === 200) {
|
|
102
|
-
message.success(msg || '密码修改成功!');
|
|
113
|
+
message.success(msg || i18next.t('密码修改成功!'));
|
|
103
114
|
setUserPassword && setUserPassword();
|
|
104
115
|
}
|
|
105
116
|
else {
|
|
106
|
-
message.warning(msg || '密码修改失败!');
|
|
117
|
+
message.warning(msg || i18next.t('密码修改失败!'));
|
|
107
118
|
}
|
|
108
119
|
})
|
|
109
120
|
.catch(function (err) {
|
|
110
121
|
var _a, _b;
|
|
111
122
|
setLoading(false);
|
|
112
|
-
message.warning(((_b = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || '密码修改失败!');
|
|
123
|
+
message.warning(((_b = (_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.msg) || i18next.t('密码修改失败!'));
|
|
113
124
|
});
|
|
114
|
-
}, [
|
|
125
|
+
}, [
|
|
126
|
+
form,
|
|
127
|
+
encryptionHandle,
|
|
128
|
+
request,
|
|
129
|
+
setUserPasswordOption,
|
|
130
|
+
setUserPassword,
|
|
131
|
+
empSource,
|
|
132
|
+
isOutSource,
|
|
133
|
+
]);
|
|
115
134
|
var onSaveHandle = useCallback(function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
116
135
|
return __generator(this, function (_a) {
|
|
117
136
|
vallidateFn(function () {
|
|
@@ -121,19 +140,21 @@ var Making = function (_a) {
|
|
|
121
140
|
});
|
|
122
141
|
}); }, [vallidateFn, submitParamsHandle]);
|
|
123
142
|
var footerDomFn = function () {
|
|
124
|
-
return (React.createElement(Button, { type: "primary", onClick: onSaveHandle, loading: loading },
|
|
143
|
+
return (React.createElement(Button, { type: "primary", onClick: onSaveHandle, loading: loading }, i18next.t('保存')));
|
|
125
144
|
};
|
|
126
|
-
return (React.createElement(Modal, { visible: visible, loading: loading, onCancel: onCancel, title:
|
|
145
|
+
return (React.createElement(Modal, { visible: visible, loading: loading, onCancel: onCancel, title: i18next.t('用户信息'), footer: footerDomFn(), maskClosable: false, width: "80%" },
|
|
127
146
|
React.createElement(Container, null,
|
|
128
147
|
React.createElement(Form, { name: "user-password-making", form: form },
|
|
129
148
|
React.createElement(SearchContainer, { dark: true },
|
|
130
149
|
React.createElement(SearchLeft, null,
|
|
131
|
-
React.createElement("div", { style: { width: '100%' } },
|
|
132
|
-
React.createElement(Item, { name: "oldPassword", label:
|
|
133
|
-
|
|
150
|
+
isOutSource ? null : (React.createElement("div", { style: { width: '100%' } },
|
|
151
|
+
React.createElement(Item, { name: "oldPassword", label: i18next.t('原密码'), rules: [
|
|
152
|
+
{ required: true, message: i18next.t('请输入原密码') },
|
|
153
|
+
] },
|
|
154
|
+
React.createElement(Input.Password, { autoComplete: "new-password" })))),
|
|
134
155
|
React.createElement("div", { style: { width: '100%', display: 'flex' } },
|
|
135
|
-
React.createElement(Item, { name: "newPassword", label:
|
|
136
|
-
{ required: true, message: '请输入新密码' },
|
|
156
|
+
React.createElement(Item, { name: "newPassword", label: i18next.t('新密码'), rules: [
|
|
157
|
+
{ required: true, message: i18next.t('请输入新密码') },
|
|
137
158
|
function (_a) {
|
|
138
159
|
var getFieldValue = _a.getFieldValue;
|
|
139
160
|
return ({
|
|
@@ -150,10 +171,10 @@ var Making = function (_a) {
|
|
|
150
171
|
},
|
|
151
172
|
] },
|
|
152
173
|
React.createElement(Input.Password, { autoComplete: "new-password" })),
|
|
153
|
-
React.createElement("div",
|
|
174
|
+
React.createElement("div", { style: { width: '60%' } },
|
|
154
175
|
React.createElement("p", { style: { height: 32, lineHeight: '32px', color: 'red' } }, passwordMessage))),
|
|
155
|
-
React.createElement(Item, { name: "newPassword1", label:
|
|
156
|
-
{ required: true, message: '请确认密码' },
|
|
176
|
+
React.createElement(Item, { name: "newPassword1", label: i18next.t('确认新密码'), rules: [
|
|
177
|
+
{ required: true, message: i18next.t('请确认密码') },
|
|
157
178
|
function (_a) {
|
|
158
179
|
var getFieldValue = _a.getFieldValue;
|
|
159
180
|
return ({
|
|
@@ -161,7 +182,7 @@ var Making = function (_a) {
|
|
|
161
182
|
if (!value || getFieldValue('newPassword') === value) {
|
|
162
183
|
return Promise.resolve();
|
|
163
184
|
}
|
|
164
|
-
return Promise.reject('两次密码输入不一致');
|
|
185
|
+
return Promise.reject(i18next.t('两次密码输入不一致'));
|
|
165
186
|
},
|
|
166
187
|
});
|
|
167
188
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const passwordMessage
|
|
1
|
+
export declare const passwordMessage: string;
|
|
2
2
|
export declare function validatePassword(password: any, username: any): {
|
|
3
3
|
result: boolean;
|
|
4
4
|
message: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
2
|
+
export var passwordMessage = i18next.t('密码必须包含大小写字母、数字、特殊字符且最小长度为8,且不能出现连续数字或字符,不能出现相同字符,且禁止使用用户账号作为密码');
|
|
2
3
|
var alphabet1 = [
|
|
3
4
|
'abcdefghijklmnopqrstuvwxyz',
|
|
4
5
|
'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
|
|
@@ -26,14 +27,14 @@ export function validatePassword(password, username) {
|
|
|
26
27
|
if (!regex.test(password)) {
|
|
27
28
|
return {
|
|
28
29
|
result: false,
|
|
29
|
-
message: '密码中必须包含大小写字母、数字、特殊字符,且长度必须大于8个字符!',
|
|
30
|
+
message: i18next.t('密码中必须包含大小写字母、数字、特殊字符,且长度必须大于8个字符!'),
|
|
30
31
|
};
|
|
31
32
|
}
|
|
32
33
|
// 检查密码是否与用户名相同
|
|
33
34
|
if (password === username) {
|
|
34
35
|
return {
|
|
35
36
|
result: false,
|
|
36
|
-
message: '密码与用户名相同!',
|
|
37
|
+
message: i18next.t('密码与用户名相同!'),
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
// 检查密码中是否有相同且连续的字符 超过三次
|
|
@@ -44,7 +45,7 @@ export function validatePassword(password, username) {
|
|
|
44
45
|
if (count1 >= 2) {
|
|
45
46
|
return {
|
|
46
47
|
result: false,
|
|
47
|
-
message: '密码中有相同且连续超过三次的字符!',
|
|
48
|
+
message: i18next.t('密码中有相同且连续超过三次的字符!'),
|
|
48
49
|
};
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -74,7 +75,10 @@ export function validatePassword(password, username) {
|
|
|
74
75
|
// 密码中不应含有连续的字母或数字
|
|
75
76
|
return {
|
|
76
77
|
result: false,
|
|
77
|
-
message:
|
|
78
|
+
message: i18next.t('从第{{slot0}}个字符开始,有连续{{slot1}}超过三位的字母或数字!', {
|
|
79
|
+
slot0: startChart + 1,
|
|
80
|
+
slot1: currentConsecutiveCount === 1 ? '递减' : '递增',
|
|
81
|
+
}),
|
|
78
82
|
};
|
|
79
83
|
}
|
|
80
84
|
}
|
|
@@ -109,7 +113,10 @@ export function validatePassword(password, username) {
|
|
|
109
113
|
// 密码中不应含有连续的字母或数字
|
|
110
114
|
return {
|
|
111
115
|
result: false,
|
|
112
|
-
message:
|
|
116
|
+
message: i18next.t('从第{{slot0}}个字符开始,有按键盘横向连续{{slot1}}超过三位的字母!', {
|
|
117
|
+
slot0: startChart + 1,
|
|
118
|
+
slot1: currentConsecutiveCount === 1 ? '递减' : '递增',
|
|
119
|
+
}),
|
|
113
120
|
};
|
|
114
121
|
}
|
|
115
122
|
}
|
|
@@ -144,7 +151,10 @@ export function validatePassword(password, username) {
|
|
|
144
151
|
// 密码中不应含有连续的字母或数字
|
|
145
152
|
return {
|
|
146
153
|
result: false,
|
|
147
|
-
message:
|
|
154
|
+
message: i18next.t('从第{{slot0}}个字符开始,有按键盘竖向连续{{slot1}}超过三位的字母或数字!', {
|
|
155
|
+
slot0: startChart + 1,
|
|
156
|
+
slot1: currentConsecutiveCount === 1 ? '递减' : '递增',
|
|
157
|
+
}),
|
|
148
158
|
};
|
|
149
159
|
}
|
|
150
160
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
1
2
|
import React, { memo } from 'react';
|
|
2
3
|
import TransList from '../List';
|
|
3
4
|
import { Row, Col } from 'antd';
|
|
@@ -11,7 +12,7 @@ var DetailCard = function (_a) {
|
|
|
11
12
|
React.createElement("div", { className: "detail_card_header_info" },
|
|
12
13
|
React.createElement(TransList, { justify: "start" }, desc &&
|
|
13
14
|
desc.map(function (item, index) {
|
|
14
|
-
if (item.title === '状态') {
|
|
15
|
+
if (item.title === i18next.t('状态')) {
|
|
15
16
|
return (React.createElement(FormItem, { title: item.title, key: index },
|
|
16
17
|
React.createElement(Tag, { content: item.content, color: "" + (item.content === '作废' ? 'red' : 'blue') })));
|
|
17
18
|
}
|
|
@@ -19,11 +20,11 @@ var DetailCard = function (_a) {
|
|
|
19
20
|
})))),
|
|
20
21
|
React.createElement("div", { className: "detail_card_body" },
|
|
21
22
|
React.createElement(Row, { wrap: false, className: "detail_card_body_header" },
|
|
22
|
-
React.createElement(Col, { span: 1, className: "detail_card_body_item detail_card_body_item_center" },
|
|
23
|
-
React.createElement(Col, { span: 2, className: "detail_card_body_item" },
|
|
24
|
-
React.createElement(Col, { span: 3, className: "detail_card_body_item" },
|
|
25
|
-
React.createElement(Col, { span: 2, className: "detail_card_body_item detail_card_body_item_center" },
|
|
26
|
-
React.createElement(Col, { span: 16, className: "detail_card_body_item" },
|
|
23
|
+
React.createElement(Col, { span: 1, className: "detail_card_body_item detail_card_body_item_center" }, i18next.t('节点')),
|
|
24
|
+
React.createElement(Col, { span: 2, className: "detail_card_body_item" }, i18next.t('操作人')),
|
|
25
|
+
React.createElement(Col, { span: 3, className: "detail_card_body_item" }, i18next.t('操作事项')),
|
|
26
|
+
React.createElement(Col, { span: 2, className: "detail_card_body_item detail_card_body_item_center" }, i18next.t('操作时间')),
|
|
27
|
+
React.createElement(Col, { span: 16, className: "detail_card_body_item" }, i18next.t('备注'))),
|
|
27
28
|
records &&
|
|
28
29
|
records.map(function (item, index) {
|
|
29
30
|
return (React.createElement(Row, { wrap: false, key: index },
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
1
2
|
import React, { memo } from 'react';
|
|
2
3
|
import ZtIcon from '../../ZtIcon';
|
|
3
4
|
var DetailHeader = function (_a) {
|
|
@@ -11,18 +12,18 @@ var DetailHeader = function (_a) {
|
|
|
11
12
|
marginRight: '10px',
|
|
12
13
|
} }),
|
|
13
14
|
headerName && React.createElement("span", null, headerName),
|
|
14
|
-
detailType && React.createElement("span", null,
|
|
15
|
+
detailType && (React.createElement("span", null,
|
|
15
16
|
detailType,
|
|
16
|
-
|
|
17
|
+
i18next.t('详情'))),
|
|
17
18
|
code && React.createElement("span", null, code),
|
|
18
19
|
type && React.createElement("span", null, type),
|
|
19
|
-
progress && (React.createElement(React.Fragment, null, progress === '超期' ? (React.createElement("span", { style: { color: 'red' } },
|
|
20
|
-
|
|
20
|
+
progress && (React.createElement(React.Fragment, null, progress === i18next.t('超期') ? (React.createElement("span", { style: { color: 'red' } },
|
|
21
|
+
i18next.t('进度'),
|
|
21
22
|
progress)) : (React.createElement("span", null,
|
|
22
|
-
|
|
23
|
+
i18next.t('进度'),
|
|
23
24
|
progress))))),
|
|
24
25
|
React.createElement("div", { className: "detail_header_right" }, (createDate || createrName) && (React.createElement(React.Fragment, null,
|
|
25
|
-
|
|
26
|
+
i18next.t('创建:'),
|
|
26
27
|
React.createElement("span", null, createDate),
|
|
27
28
|
createrName && createDate && React.createElement("span", null, "/"),
|
|
28
29
|
React.createElement("span", null, createrName)))))));
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import i18next from 'ztxkutils/dist/i18next';
|
|
1
2
|
import React, { memo } from 'react';
|
|
2
3
|
import { Descriptions } from 'antd';
|
|
3
4
|
import { Button, message } from '../../../index';
|
|
@@ -83,7 +84,7 @@ var DetailList = function (_a) {
|
|
|
83
84
|
var fileSize = item.fileSize, size = item.size;
|
|
84
85
|
if (fileSize >= MAX_PREVIEW_FILE_SIZE ||
|
|
85
86
|
size >= MAX_PREVIEW_FILE_SIZE) {
|
|
86
|
-
message.warning('文件过大,暂不支持在线预览,请先下载后查看!');
|
|
87
|
+
message.warning(i18next.t('文件过大,暂不支持在线预览,请先下载后查看!'));
|
|
87
88
|
}
|
|
88
89
|
else {
|
|
89
90
|
previewFile(fileBaseUrl, item === null || item === void 0 ? void 0 : item.attachId, {
|
|
@@ -96,7 +97,7 @@ var DetailList = function (_a) {
|
|
|
96
97
|
catch (err) {
|
|
97
98
|
//
|
|
98
99
|
}
|
|
99
|
-
} },
|
|
100
|
+
} }, i18next.t('预览'))),
|
|
100
101
|
!downloadBtnDisable && (React.createElement(Button, { type: "link", onClick: function () {
|
|
101
102
|
return downloadFileCallBack(apiBaseUrl, item === null || item === void 0 ? void 0 : item.attachId, item === null || item === void 0 ? void 0 : item.attachName, {
|
|
102
103
|
callbackAfter: function () {
|
|
@@ -104,7 +105,7 @@ var DetailList = function (_a) {
|
|
|
104
105
|
onDownLoadCallbackAfter(item);
|
|
105
106
|
},
|
|
106
107
|
});
|
|
107
|
-
} },
|
|
108
|
+
} }, i18next.t('下载')))));
|
|
108
109
|
})));
|
|
109
110
|
}
|
|
110
111
|
return null;
|
|
@@ -134,6 +135,6 @@ var DetailList = function (_a) {
|
|
|
134
135
|
: 'start'),
|
|
135
136
|
alignItems: 'center',
|
|
136
137
|
} },
|
|
137
|
-
React.createElement("span", null,
|
|
138
|
+
React.createElement("span", null, i18next.t('检查人员签字')))))));
|
|
138
139
|
};
|
|
139
140
|
export default memo(DetailList);
|