zmdms-webui 1.9.8 → 1.9.9
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/es/applayoutheader/tabs/index.js +3 -2
- package/dist/es/button/buttonDownload.js +4 -4
- package/dist/es/button/buttonExport.js +7 -7
- package/dist/es/button/buttonPreview.js +2 -2
- package/dist/es/dynamicsetting/dynamicDrawer.js +4 -3
- package/dist/es/electronsignatures/dgcomponents/useDg.js +7 -7
- package/dist/es/electronsignatures/electroncomponents/electron-seal-batch-download.js +7 -6
- package/dist/es/electronsignatures/electroncomponents/useCheckedSealInfoList.js +3 -3
- package/dist/es/electronsignatures/electroncomponents/useFetchElectronData.js +3 -3
- package/dist/es/electronsignatures/electroncomponents/utils.js +9 -9
- package/dist/es/electronsignatures/filecomponents/file-upload.js +8 -7
- package/dist/es/electronsignatures/hooks/useParseElectronSetting.js +9 -9
- package/dist/es/electronsignatures/hooks/useParseQunjListData.js +4 -4
- package/dist/es/electronsignatures/index.js +20 -19
- package/dist/es/electronsignatures/qunjcomponents/code-modal.js +5 -5
- package/dist/es/electronsignatures/qunjcomponents/useFetchQunjData.js +4 -4
- package/dist/es/login/forget-password.js +10 -10
- package/dist/es/message/index.d.ts +5 -0
- package/dist/es/message/index.js +70 -0
- package/dist/es/modal/modal.js +4 -3
- package/dist/es/table/components/FilterDropdown.js +3 -2
- package/dist/es/table/components/table-header-operation/FillDown.js +3 -2
- package/dist/es/table/excel.js +53 -25
- package/dist/es/table/interface.d.ts +4 -0
- package/dist/es/table/table.js +6 -2
- package/dist/es/table/useDynamicListByColumns.js +6 -4
- package/dist/es/table/utils.js +5 -5
- package/dist/es/uploadlist/hooks.js +10 -10
- package/dist/es/uploadlist/uploadList.js +4 -3
- package/dist/es/uploadlist/uploadListDetail.js +3 -2
- package/dist/es/uploadlist/uploadTable.js +3 -2
- package/dist/es/uploadlist/utils.js +2 -2
- package/dist/index.build.d.ts +2 -1
- package/dist/index.dark.css +1 -1
- package/dist/index.default.css +1 -1
- package/dist/index.es.js +2 -1
- package/package.json +1 -1
- package/dist/es/microloading/index.css +0 -1
- package/dist/es/modal/index.css +0 -1
- package/dist/es/notauthpage/index.css +0 -0
- package/dist/es/notroutepage/index.css +0 -0
- package/dist/es/pagination/index.css +0 -1
- package/dist/es/placeholder/index.css +0 -1
- package/dist/es/print/index.css +0 -1
- package/dist/es/select/index.css +0 -1
- package/dist/es/table/index.css +0 -1
- package/dist/es/tabs/index.css +0 -1
- package/dist/es/tag/index.css +0 -1
- package/dist/es/title/index.css +0 -1
- package/dist/es/tree/index.css +0 -1
- package/dist/es/treeselect/index.css +0 -1
- package/dist/es/uploadlist/index.css +0 -1
- package/dist/es/watermark/index.css +0 -1
- package/dist/es/zttransfer/index.css +0 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { useRef, useMemo, useState, useEffect
|
|
1
|
+
import { useRef, useMemo, useState, useEffect } from 'react';
|
|
2
2
|
import { getCurrentDynamicItems, getDynamicVersionByKey, setDynamicVersionByKey } from '../dynamicsetting/useDynamic.js';
|
|
3
3
|
import { TABLE_DYNAMIC_KEY } from './constant.js';
|
|
4
4
|
import isEqual from 'lodash/isEqual';
|
|
5
|
+
import { useMemoizedFn } from 'ahooks';
|
|
5
6
|
|
|
6
7
|
// 处理列信息
|
|
7
8
|
function parseColumn(column, index, indexs) {
|
|
@@ -66,7 +67,7 @@ function getDynamicList(dynamicKey, columns) {
|
|
|
66
67
|
return result;
|
|
67
68
|
}
|
|
68
69
|
function useDynamicListByColumns(columns, options) {
|
|
69
|
-
var dynamicKey = options.dynamicKey, dynamicVersion = options.dynamicVersion;
|
|
70
|
+
var dynamicKey = options.dynamicKey, dynamicVersion = options.dynamicVersion, customDynamicListHandle = options.customDynamicListHandle;
|
|
70
71
|
// 动态列配置手动刷新基础配置
|
|
71
72
|
var dynamicSettingRef = useRef(null);
|
|
72
73
|
// 初始化list
|
|
@@ -116,10 +117,11 @@ function useDynamicListByColumns(columns, options) {
|
|
|
116
117
|
setDynamicVersionByKey(TABLE_DYNAMIC_KEY, dynamicKey, dynamicVersion);
|
|
117
118
|
}
|
|
118
119
|
}, [dynamicKey, dynamicVersion]);
|
|
119
|
-
var onCurrentListChange =
|
|
120
|
+
var onCurrentListChange = useMemoizedFn(function (newDynamicList) {
|
|
120
121
|
// console.log(newDynamicList);
|
|
121
122
|
setCurrentDynamicList(newDynamicList);
|
|
122
|
-
|
|
123
|
+
customDynamicListHandle === null || customDynamicListHandle === void 0 ? void 0 : customDynamicListHandle(newDynamicList);
|
|
124
|
+
});
|
|
123
125
|
return {
|
|
124
126
|
defaultDynamicList: defaultDynamicList,
|
|
125
127
|
currentDynamicList: currentDynamicList,
|
package/dist/es/table/utils.js
CHANGED
|
@@ -2,7 +2,7 @@ import { __spreadArray, __assign, __awaiter, __generator } from '../_virtual/_ts
|
|
|
2
2
|
import { filterHandle } from './components/FilterDropdown.js';
|
|
3
3
|
import { MERGE_ROW_SPANS, MERGE_KEY, MERGE_INDEX, IS_SUMMARY } from './constant.js';
|
|
4
4
|
import { plus } from 'zmdms-utils';
|
|
5
|
-
import
|
|
5
|
+
import myMessage from '../message/index.js';
|
|
6
6
|
|
|
7
7
|
// 递归处理columns
|
|
8
8
|
function recursionColumns(columns, currentDynamicList, newColumns, columnsIndexs) {
|
|
@@ -138,7 +138,7 @@ function copyColData(key, options) {
|
|
|
138
138
|
try {
|
|
139
139
|
if ((navigator === null || navigator === void 0 ? void 0 : navigator.clipboard) && window.isSecureContext) {
|
|
140
140
|
(_b = (_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText(str)) === null || _b === void 0 ? void 0 : _b.then(function () {
|
|
141
|
-
|
|
141
|
+
myMessage.success("复制成功!");
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
else {
|
|
@@ -147,17 +147,17 @@ function copyColData(key, options) {
|
|
|
147
147
|
document.body.appendChild(textarea);
|
|
148
148
|
textarea.select();
|
|
149
149
|
if (document.execCommand) {
|
|
150
|
-
|
|
150
|
+
myMessage.success("复制成功!");
|
|
151
151
|
document.execCommand("copy");
|
|
152
152
|
}
|
|
153
153
|
else {
|
|
154
|
-
|
|
154
|
+
myMessage.info("\u590D\u5236\u5931\u8D25\uFF01\u8BF7\u624B\u5DE5\u590D\u5236\n ".concat(str));
|
|
155
155
|
}
|
|
156
156
|
document.body.removeChild(textarea);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
catch (err) {
|
|
160
|
-
|
|
160
|
+
myMessage.info("\u590D\u5236\u5931\u8D25\uFF01\u8BF7\u624B\u5DE5\u590D\u5236\n ".concat(str));
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
163
|
}
|
|
@@ -4,7 +4,7 @@ import { flushSync } from 'react-dom';
|
|
|
4
4
|
import { getFileExtension, isImageExtension, createDownloadLink, createUploadFileLink, TOKEN_KEY, getToken, exactRound, times, divide } from 'zmdms-utils';
|
|
5
5
|
import MemoUploadList from './uploadList.js';
|
|
6
6
|
import { useLatest } from 'ahooks';
|
|
7
|
-
import
|
|
7
|
+
import myMessage from '../message/index.js';
|
|
8
8
|
|
|
9
9
|
// 默认限制的文件类型
|
|
10
10
|
var NO_ACCEPT = ["exe"];
|
|
@@ -27,16 +27,16 @@ function useBeforeUpload(props) {
|
|
|
27
27
|
}
|
|
28
28
|
if (disAllowDuplicateFile &&
|
|
29
29
|
((_b = (_a = fileListRef.current) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, function (item) { return item.name === fileName || item.attachName === fileName; }))) {
|
|
30
|
-
|
|
30
|
+
myMessage.warning("不能上传同名附件!");
|
|
31
31
|
return MemoUploadList.LIST_IGNORE;
|
|
32
32
|
}
|
|
33
33
|
// 文件大小
|
|
34
34
|
if (fileSize === 0) {
|
|
35
|
-
|
|
35
|
+
myMessage.warning("不能上传空文件!");
|
|
36
36
|
return MemoUploadList.LIST_IGNORE;
|
|
37
37
|
}
|
|
38
38
|
if (isImage && !isImageExtension(fileExtension)) {
|
|
39
|
-
|
|
39
|
+
myMessage.warning("不能上传非图片格式的文件!");
|
|
40
40
|
return MemoUploadList.LIST_IGNORE;
|
|
41
41
|
}
|
|
42
42
|
// 获取支持的附件类型
|
|
@@ -44,16 +44,16 @@ function useBeforeUpload(props) {
|
|
|
44
44
|
ACCEPT = ACCEPT.map(function (a) { return a.toLowerCase(); });
|
|
45
45
|
// 默认支持任何格式的文件,但是不支持exe
|
|
46
46
|
if (ACCEPT.length > 0 && !ACCEPT.includes(fileExtension)) {
|
|
47
|
-
|
|
47
|
+
myMessage.warning("\u4E0D\u652F\u6301 ".concat(fileExtension, " \u6587\u4EF6\u683C\u5F0F"));
|
|
48
48
|
return MemoUploadList.LIST_IGNORE;
|
|
49
49
|
}
|
|
50
50
|
if (ACCEPT.length === 0 && NO_ACCEPT.includes(fileExtension)) {
|
|
51
|
-
|
|
51
|
+
myMessage.warning("\u4E0D\u652F\u6301 ".concat(fileExtension, " \u6587\u4EF6\u683C\u5F0F"));
|
|
52
52
|
return MemoUploadList.LIST_IGNORE;
|
|
53
53
|
}
|
|
54
54
|
// 文件大小限制
|
|
55
55
|
if (maxSize && fileSize > maxSize) {
|
|
56
|
-
|
|
56
|
+
myMessage.warning("\u6587\u4EF6\u8D85\u51FA ".concat(maxSizeStr, "\uFF01"));
|
|
57
57
|
return MemoUploadList.LIST_IGNORE;
|
|
58
58
|
}
|
|
59
59
|
return Promise.resolve(file);
|
|
@@ -343,7 +343,7 @@ function uploadFile(props) {
|
|
|
343
343
|
if (xhr.status === 200) {
|
|
344
344
|
var response = JSON.parse(xhr.responseText);
|
|
345
345
|
if (!response) {
|
|
346
|
-
|
|
346
|
+
myMessage.warning("文件上传失败!");
|
|
347
347
|
}
|
|
348
348
|
var code = response.code, data_1 = response.data, msg = response.msg;
|
|
349
349
|
if (code === 200) {
|
|
@@ -351,7 +351,7 @@ function uploadFile(props) {
|
|
|
351
351
|
}
|
|
352
352
|
else {
|
|
353
353
|
reject();
|
|
354
|
-
|
|
354
|
+
myMessage.warning(msg || "文件上传失败!");
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
else {
|
|
@@ -360,7 +360,7 @@ function uploadFile(props) {
|
|
|
360
360
|
? JSON.parse(xhr.response)
|
|
361
361
|
: { msg: "文件上传失败,请检查网络!" };
|
|
362
362
|
reject();
|
|
363
|
-
|
|
363
|
+
myMessage.warning(result.msg || "文件上传失败!");
|
|
364
364
|
}
|
|
365
365
|
catch (err) {
|
|
366
366
|
reject();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest, __assign, __awaiter, __generator } from '../_virtual/_tslib.js';
|
|
2
2
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { memo, forwardRef, useRef, useState, useEffect, useMemo, useImperativeHandle } from 'react';
|
|
4
|
-
import { Upload, Popconfirm, Dropdown
|
|
4
|
+
import { Upload, Popconfirm, Dropdown } from 'antd';
|
|
5
5
|
import UploadTable from './uploadTable.js';
|
|
6
6
|
import UploadListDetail from './uploadListDetail.js';
|
|
7
7
|
import { ETABLE_COLUMN_TYPE } from './interface.js';
|
|
@@ -17,6 +17,7 @@ import LoadingOutlined from '../node_modules/@ant-design/icons/es/icons/LoadingO
|
|
|
17
17
|
import ButtonCom from '../button/button.js';
|
|
18
18
|
import UploadOutlined from '../node_modules/@ant-design/icons/es/icons/UploadOutlined.js';
|
|
19
19
|
import ModalComponent from '../modal/modal.js';
|
|
20
|
+
import myMessage from '../message/index.js';
|
|
20
21
|
import DownloadOutlined from '../node_modules/@ant-design/icons/es/icons/DownloadOutlined.js';
|
|
21
22
|
|
|
22
23
|
// 最大字节
|
|
@@ -107,7 +108,7 @@ var UploadList = function (props, ref) {
|
|
|
107
108
|
case 0:
|
|
108
109
|
checked = (_b = (_a = tableRef.current) === null || _a === void 0 ? void 0 : _a.getChecked) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
109
110
|
if (!checked || checked.length === 0) {
|
|
110
|
-
|
|
111
|
+
myMessage.info("请选择需要操作的数据!");
|
|
111
112
|
return [2 /*return*/];
|
|
112
113
|
}
|
|
113
114
|
if (!onBeforeDeleteValidate) return [3 /*break*/, 4];
|
|
@@ -147,7 +148,7 @@ var UploadList = function (props, ref) {
|
|
|
147
148
|
case 0:
|
|
148
149
|
checked = (_b = (_a = tableRef.current) === null || _a === void 0 ? void 0 : _a.getChecked) === null || _b === void 0 ? void 0 : _b.call(_a);
|
|
149
150
|
if (!checked || checked.length === 0) {
|
|
150
|
-
|
|
151
|
+
myMessage.info("请选择需要操作的数据!");
|
|
151
152
|
return [2 /*return*/];
|
|
152
153
|
}
|
|
153
154
|
(_c = tableRef.current) === null || _c === void 0 ? void 0 : _c.setLoading(true);
|
|
@@ -4,9 +4,10 @@ import { forwardRef, useState, useImperativeHandle } from 'react';
|
|
|
4
4
|
import { downloadFile } from 'zmdms-utils';
|
|
5
5
|
import { toPreviewFile } from './utils.js';
|
|
6
6
|
import ButtonCom from '../button/button.js';
|
|
7
|
+
import myMessage from '../message/index.js';
|
|
7
8
|
import LinkOutlined from '../node_modules/@ant-design/icons/es/icons/LinkOutlined.js';
|
|
8
9
|
import DownloadOutlined from '../node_modules/@ant-design/icons/es/icons/DownloadOutlined.js';
|
|
9
|
-
import { Spin
|
|
10
|
+
import { Spin } from 'antd';
|
|
10
11
|
|
|
11
12
|
var UploadTable = function (_a, ref) {
|
|
12
13
|
var _b;
|
|
@@ -203,7 +204,7 @@ var UploadTable = function (_a, ref) {
|
|
|
203
204
|
if (isPreviewAuth) {
|
|
204
205
|
return operationCallback("preview", record, index);
|
|
205
206
|
}
|
|
206
|
-
|
|
207
|
+
myMessage.info("暂无预览权限!");
|
|
207
208
|
return Promise.resolve();
|
|
208
209
|
}, style: { textAlign: "left" }, title: record.attachName }, { children: [jsx(LinkOutlined, {}), record.attachName] })) })), jsx("div", __assign({ className: "preview-list__item--right" }, { children: isDownloadAuth ? (jsx(ButtonCom, __assign({ type: "link", onClick: function () { return operationCallback("download", record, index); }, style: { textAlign: "left" }, title: "\u4E0B\u8F7D" }, { children: jsx(DownloadOutlined, {}) }))) : null }))] }), record.attachId || record.fileId || index));
|
|
209
210
|
}) })) })));
|
|
@@ -9,7 +9,8 @@ import dayjs from 'dayjs';
|
|
|
9
9
|
import { toPreviewFile } from './utils.js';
|
|
10
10
|
import ButtonCom from '../button/button.js';
|
|
11
11
|
import OperationBtn from '../operationbtn/operationBtn.js';
|
|
12
|
-
import
|
|
12
|
+
import myMessage from '../message/index.js';
|
|
13
|
+
import { Progress } from 'antd';
|
|
13
14
|
|
|
14
15
|
var UploadTable = function (_a, ref) {
|
|
15
16
|
var dataSource = _a.dataSource, action = _a.action, headers = _a.headers, data = _a.data, method = _a.method, setInnerFileList = _a.setInnerFileList, isPublic = _a.isPublic, _b = _a.API_BASEURL, API_BASEURL = _b === void 0 ? "" : _b, _c = _a.FILE_API_BASEURL, FILE_API_BASEURL = _c === void 0 ? "" : _c, maxPreviewSize = _a.maxPreviewSize, isPreview = _a.isPreview, isDelete = _a.isDelete, isDownload = _a.isDownload; _a.listType; var tableColumns = _a.tableColumns, onBeforeDownloadValidate = _a.onBeforeDownloadValidate, onBeforePreviewValidate = _a.onBeforePreviewValidate, onBeforeDeleteValidate = _a.onBeforeDeleteValidate;
|
|
@@ -329,7 +330,7 @@ var UploadTable = function (_a, ref) {
|
|
|
329
330
|
// 重新上传
|
|
330
331
|
var onReloadUploadHandle = function (record, index) {
|
|
331
332
|
if (!record.originFileObj) {
|
|
332
|
-
|
|
333
|
+
myMessage.error("当前失败项,没有找到附件原件信息,无法重新上传!");
|
|
333
334
|
return;
|
|
334
335
|
}
|
|
335
336
|
setLoading(true);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { formatUnit, previewFile } from 'zmdms-utils';
|
|
2
|
-
import
|
|
2
|
+
import myMessage from '../message/index.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 附件预览方法
|
|
@@ -9,7 +9,7 @@ import { message } from 'antd';
|
|
|
9
9
|
function toPreviewFile(fileInfo, info) {
|
|
10
10
|
var maxPreviewSize = info.maxPreviewSize, FILE_API_BASEURL = info.FILE_API_BASEURL, uploadTableData = info.uploadTableData;
|
|
11
11
|
if (fileInfo.attachSize > maxPreviewSize) {
|
|
12
|
-
|
|
12
|
+
myMessage.info("\u6587\u4EF6\u5927\u4E8E".concat(formatUnit(maxPreviewSize), ",\u6682\u4E0D\u652F\u6301\u5728\u7EBF\u9884\u89C8\uFF0C\u8BF7\u5148\u4E0B\u8F7D\u540E\u67E5\u770B"));
|
|
13
13
|
}
|
|
14
14
|
else {
|
|
15
15
|
previewFile(fileInfo.attachId, fileInfo.attachName, {
|
package/dist/index.build.d.ts
CHANGED
|
@@ -47,7 +47,8 @@ export { default as ZtTransfer } from './es/zttransfer/zt-transfer.js';
|
|
|
47
47
|
export { default as Watermark } from './es/watermark/watermark.js';
|
|
48
48
|
export { default as Sortable } from './es/sortable/sortable.js';
|
|
49
49
|
export { default as ElectronSignatures } from './es/electronsignatures/index.js';
|
|
50
|
-
export {
|
|
50
|
+
export { default as message } from './es/message/index.js';
|
|
51
|
+
export { Affix, Anchor, AutoComplete, Avatar, BackTop, Badge, Breadcrumb, Card, Carousel, Cascader, Checkbox, Col, Comment, ConfigProvider, Divider, Drawer, Dropdown, Empty, Grid, Image, Layout, List, Mentions, Menu, PageHeader, Popconfirm, Popover, Progress, Radio, Rate, Result, Row, Segmented, Skeleton, Slider, Space, Spin, Statistic, Steps, Switch, Timeline, Tooltip, Transfer, Typography, Upload, notification } from 'antd';
|
|
51
52
|
export { IButtonProps } from './es/button/interface.js';
|
|
52
53
|
export { IButtonDownloadProps } from './es/button/buttonDownload.js';
|
|
53
54
|
export { IButtonExportProps } from './es/button/buttonExport.js';
|