zmdms-webui 3.4.9 → 3.5.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.
|
@@ -5,7 +5,7 @@ import { DATA_TYPE_KEY, getColumnMergeProp } from '../hooks/useParseRecords.js';
|
|
|
5
5
|
import FileTypeSelect from './file-type-select.js';
|
|
6
6
|
import FileOperation from './file-operation.js';
|
|
7
7
|
import NewFileOperation from './new-file-operation.js';
|
|
8
|
-
import { currentRecordIsOnlyQunj,
|
|
8
|
+
import { currentRecordIsOnlyQunj, isFlowCompleted, onlyQunjAttachId } from '../utils.js';
|
|
9
9
|
import dayjs from 'dayjs';
|
|
10
10
|
import { ElectronSignaturesContext } from '../index.js';
|
|
11
11
|
import ButtonCom from '../../button/button.js';
|
|
@@ -13,8 +13,17 @@ function currentRecordIsOnlyQunj(record) {
|
|
|
13
13
|
return ((record === null || record === void 0 ? void 0 : record.attachId) + "" === onlyQunjAttachId ||
|
|
14
14
|
(record === null || record === void 0 ? void 0 : record.attachId) + "" === detailOnlyQunjAttachId);
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
/**
|
|
17
|
+
* 判断流程状态是否在允许的状态列表中
|
|
18
|
+
* @param flowStatus 当前流程状态
|
|
19
|
+
* @param allowedStatus 允许的状态列表,逗号分隔的字符串,如 '50,60,70',默认为 '50'
|
|
20
|
+
*/
|
|
21
|
+
function isFlowCompleted(flowStatus, allowedStatus) {
|
|
22
|
+
if (allowedStatus === void 0) { allowedStatus = "50"; }
|
|
23
|
+
console.log("当前流程状态:", flowStatus);
|
|
24
|
+
console.log("允许的状态列表:", allowedStatus);
|
|
25
|
+
var statusList = allowedStatus.split(",").map(function (s) { return s.trim(); });
|
|
26
|
+
return statusList.includes(flowStatus + "");
|
|
18
27
|
}
|
|
19
28
|
/**
|
|
20
29
|
* 将字节数加上合适的单位
|
|
@@ -307,9 +307,9 @@ var UploadList = function (props, ref) {
|
|
|
307
307
|
}, [showTable, isDownload, isDelete]);
|
|
308
308
|
/**
|
|
309
309
|
* text 模式下的列表项自定义渲染
|
|
310
|
-
* 格式:图标 / 文件名 / 文件大小 / 下载(可选) / 删除按钮
|
|
310
|
+
* 格式:图标 / 文件名 / 文件大小 / renderDetailPrepend(可选) / 下载(可选) / 删除按钮
|
|
311
311
|
*/
|
|
312
|
-
var itemRenderText = useCallback(function (originNode, file,
|
|
312
|
+
var itemRenderText = useCallback(function (originNode, file, fileList, actions) {
|
|
313
313
|
// 上传中保持 antd 默认渲染(显示进度条)
|
|
314
314
|
if (file.status === "uploading") {
|
|
315
315
|
return originNode;
|
|
@@ -329,8 +329,16 @@ var UploadList = function (props, ref) {
|
|
|
329
329
|
}, title: isError ? undefined : fileName }, { children: [jsx("span", __assign({ className: "ztxk-upload--text-item__name-body" }, { children: nameBody })), nameExt ? (jsx("span", __assign({ className: "ztxk-upload--text-item__name-ext" }, { children: nameExt }))) : null] })));
|
|
330
330
|
return (jsxs("span", __assign({ className: classNames("ztxk-upload--text-item", {
|
|
331
331
|
"is-error": isError,
|
|
332
|
-
}) }, { children: [jsx("span", __assign({ className: "ztxk-upload--text-item__icon" }, { children: jsx(PaperClipOutlined, {}) })), isError ? (jsx(Tooltip, __assign({ title: "\u4E0A\u4F20\u5931\u8D25" }, { children: nameEl }))) : (nameEl), finalShowFileSize !== false && fileSize != null ? (jsx("span", __assign({ className: "ztxk-upload--text-item__size" }, { children: formatUnit(fileSize) }))) : null, jsxs("span", __assign({ className: "ztxk-upload--text-item__actions" }, { children: [
|
|
333
|
-
|
|
332
|
+
}) }, { children: [jsx("span", __assign({ className: "ztxk-upload--text-item__icon" }, { children: jsx(PaperClipOutlined, {}) })), isError ? (jsx(Tooltip, __assign({ title: "\u4E0A\u4F20\u5931\u8D25" }, { children: nameEl }))) : (nameEl), finalShowFileSize !== false && fileSize != null ? (jsx("span", __assign({ className: "ztxk-upload--text-item__size" }, { children: formatUnit(fileSize) }))) : null, jsxs("span", __assign({ className: "ztxk-upload--text-item__actions" }, { children: [renderDetailPrepend
|
|
333
|
+
? renderDetailPrepend(file, fileList.indexOf(file))
|
|
334
|
+
: null, isDownload && !isError ? (jsx(ButtonCom, __assign({ type: "link", size: "small", className: "ztxk-upload--text-item__download", onClick: function () { return actions.download(); } }, { children: "\u4E0B\u8F7D" }))) : null, isDelete ? (jsx(ButtonCom, __assign({ type: "link", size: "small", danger: true, className: "ztxk-upload--text-item__delete", onClick: function () { return actions.remove(); } }, { children: "\u5220\u9664" }))) : null] }))] })));
|
|
335
|
+
}, [
|
|
336
|
+
filePreview,
|
|
337
|
+
isDownload,
|
|
338
|
+
isDelete,
|
|
339
|
+
finalShowFileSize,
|
|
340
|
+
renderDetailPrepend,
|
|
341
|
+
]);
|
|
334
342
|
// 上传子元素
|
|
335
343
|
var uploadBtn = (jsx(Upload, __assign({ showUploadList: showUploadListMemo, multiple: maxCount === 1 ? false : true, beforeUpload: beforeUploadHandle, onChange: onChangeHandle, action: fileAction, headers: fileHeaders, data: fileData, fileList: innerFileList, onPreview: onPreview, onDownload: onDownload }, resetProps, { itemRender: !showTable &&
|
|
336
344
|
(!listType || listType === "text") &&
|