zmdms-webui 1.9.8 → 2.0.0
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 +52 -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 +59 -9
- 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
|
}
|
|
@@ -447,6 +447,7 @@ function startColumnInsertTableData(options) {
|
|
|
447
447
|
* @param mergeKeys 合并字段
|
|
448
448
|
* @param dimensionSummaryKeys 维度合计字段
|
|
449
449
|
* @param summaryKeys 合计字段
|
|
450
|
+
* @param isDimensionDynamic 维度合并
|
|
450
451
|
*/
|
|
451
452
|
function flattenRecordsOptimized(records, mergeKeys, dimensionSummaryKeys, summaryKeys, isDimensionDynamic) {
|
|
452
453
|
var _a;
|
|
@@ -460,7 +461,13 @@ function flattenRecordsOptimized(records, mergeKeys, dimensionSummaryKeys, summa
|
|
|
460
461
|
var result = isDimensionDynamic
|
|
461
462
|
? sortByDimensions(__spreadArray([], records, true), mergeKeys)
|
|
462
463
|
: __spreadArray([], records, true);
|
|
463
|
-
// 1.
|
|
464
|
+
// 1. 如果开启了维度合并,按 mergeKeys 的最后一位来计算合计值
|
|
465
|
+
if (isDimensionDynamic && mergeKeys.length > 0) {
|
|
466
|
+
var lastMergeKey = mergeKeys[mergeKeys.length - 1];
|
|
467
|
+
var groupedResult = groupByLastMergeKey(result, lastMergeKey, summaryKeys);
|
|
468
|
+
result = groupedResult;
|
|
469
|
+
}
|
|
470
|
+
// 2. 首先插入维度合计行
|
|
464
471
|
if (dimensionSummaryKeys &&
|
|
465
472
|
dimensionSummaryKeys.length > 0 &&
|
|
466
473
|
summaryKeys &&
|
|
@@ -468,11 +475,11 @@ function flattenRecordsOptimized(records, mergeKeys, dimensionSummaryKeys, summa
|
|
|
468
475
|
result = insertDimensionSummaryRows(result, mergeKeys, // 传入完整的维度字段列表
|
|
469
476
|
dimensionSummaryKeys, summaryKeys);
|
|
470
477
|
}
|
|
471
|
-
//
|
|
478
|
+
// 3. 为每行初始化合并信息
|
|
472
479
|
for (var i = 0; i < result.length; i++) {
|
|
473
480
|
result[i] = __assign(__assign({}, result[i]), (_a = {}, _a[MERGE_ROW_SPANS] = {}, _a[MERGE_KEY] = Date.now() + Math.floor(Math.random() * 100000), _a[MERGE_INDEX] = -1, _a));
|
|
474
481
|
}
|
|
475
|
-
//
|
|
482
|
+
// 4. 按层级处理每个合并字段
|
|
476
483
|
for (var keyIndex = 0; keyIndex < mergeKeys.length; keyIndex++) {
|
|
477
484
|
var currentKey = mergeKeys[keyIndex];
|
|
478
485
|
// 找出所有需要处理的分组起始点
|
|
@@ -522,7 +529,7 @@ function flattenRecordsOptimized(records, mergeKeys, dimensionSummaryKeys, summa
|
|
|
522
529
|
}
|
|
523
530
|
}
|
|
524
531
|
}
|
|
525
|
-
//
|
|
532
|
+
// 5. 最后统一计算MERGE_INDEX(合并后的逻辑行号)
|
|
526
533
|
var logicalRowIndex = 0;
|
|
527
534
|
var _loop_2 = function (i) {
|
|
528
535
|
// 检查当前行是否是被合并的行(不是第一行)
|
|
@@ -702,6 +709,49 @@ function hasParentGroupChanged(records, currentIndex, mergeKeys, currentKeyIndex
|
|
|
702
709
|
}
|
|
703
710
|
}
|
|
704
711
|
return false;
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* 按最后一个合并键进行分组并计算合计值
|
|
715
|
+
*/
|
|
716
|
+
function groupByLastMergeKey(records, lastMergeKey, summaryKeys) {
|
|
717
|
+
var groups = new Map();
|
|
718
|
+
// 按最后一个合并键分组
|
|
719
|
+
for (var _i = 0, records_2 = records; _i < records_2.length; _i++) {
|
|
720
|
+
var record = records_2[_i];
|
|
721
|
+
var key = record[lastMergeKey];
|
|
722
|
+
var keyStr = String(key);
|
|
723
|
+
if (!groups.has(keyStr)) {
|
|
724
|
+
groups.set(keyStr, []);
|
|
725
|
+
}
|
|
726
|
+
groups.get(keyStr).push(record);
|
|
727
|
+
}
|
|
728
|
+
// 为每个分组创建合计行
|
|
729
|
+
var result = [];
|
|
730
|
+
for (var _a = 0, _b = Array.from(groups.entries()); _a < _b.length; _a++) {
|
|
731
|
+
var _c = _b[_a], keyStr = _c[0], items = _c[1];
|
|
732
|
+
var summaryRow = {};
|
|
733
|
+
// 复制第一条记录的所有字段作为基础
|
|
734
|
+
if (items.length > 0) {
|
|
735
|
+
Object.assign(summaryRow, items[0]);
|
|
736
|
+
}
|
|
737
|
+
// 设置最后一个合并键的值
|
|
738
|
+
summaryRow[lastMergeKey] = keyStr;
|
|
739
|
+
var _loop_6 = function (summaryKey) {
|
|
740
|
+
summaryRow[summaryKey] = items
|
|
741
|
+
.filter(function (item) { return !isSummaryRow(item); }) // 排除已有的合计行
|
|
742
|
+
.reduce(function (sum, item) {
|
|
743
|
+
var value = parseFloat(item[summaryKey]) || 0;
|
|
744
|
+
return plus(sum, value);
|
|
745
|
+
}, 0);
|
|
746
|
+
};
|
|
747
|
+
// 计算合计值
|
|
748
|
+
for (var _d = 0, summaryKeys_2 = summaryKeys; _d < summaryKeys_2.length; _d++) {
|
|
749
|
+
var summaryKey = summaryKeys_2[_d];
|
|
750
|
+
_loop_6(summaryKey);
|
|
751
|
+
}
|
|
752
|
+
result.push(summaryRow);
|
|
753
|
+
}
|
|
754
|
+
return result;
|
|
705
755
|
}
|
|
706
756
|
|
|
707
757
|
export { copyColData, flattenRecordsOptimized, getFilterRecords, getNextColumn, getTableColumns, parsePasteData, startColumnInsertTableData };
|
|
@@ -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';
|