zmdms-webui 2.4.5 → 2.4.7
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.
|
@@ -789,6 +789,8 @@ var useTableRender = function (params) {
|
|
|
789
789
|
if (onlyFixed === void 0) { onlyFixed = false; }
|
|
790
790
|
ctx.strokeStyle = COLORS.border;
|
|
791
791
|
ctx.lineWidth = 1;
|
|
792
|
+
// 计算实际数据行数(只绘制到有数据的地方)
|
|
793
|
+
var dataRowCount = processedDataSource.length;
|
|
792
794
|
// 绘制表头底部边框(只在非fixed时绘制一次,使用2px更明显)
|
|
793
795
|
if (!onlyFixed) {
|
|
794
796
|
ctx.lineWidth = 1;
|
|
@@ -798,6 +800,8 @@ var useTableRender = function (params) {
|
|
|
798
800
|
ctx.stroke();
|
|
799
801
|
ctx.lineWidth = 1; // 恢复为1px
|
|
800
802
|
}
|
|
803
|
+
// 计算实际数据区域的底部位置
|
|
804
|
+
var dataBottomY = Math.min(headerHeight + dataRowCount * rowHeight - scrollState.scrollTop, displayHeight);
|
|
801
805
|
// 绘制垂直边框(只绘制body部分,从headerHeight开始,表头边框在drawHeaderCell中绘制)
|
|
802
806
|
columnRenderInfos.forEach(function (info, colIndex) {
|
|
803
807
|
var x = info.x, width = info.width, fixed = info.fixed, fixedLeft = info.fixedLeft;
|
|
@@ -814,7 +818,8 @@ var useTableRender = function (params) {
|
|
|
814
818
|
if (drawX >= 0 && drawX <= displayWidth) {
|
|
815
819
|
ctx.beginPath();
|
|
816
820
|
ctx.moveTo(drawX, headerHeight);
|
|
817
|
-
|
|
821
|
+
// 只绘制到数据区域的底部,而不是整个容器高度
|
|
822
|
+
ctx.lineTo(drawX, dataBottomY);
|
|
818
823
|
ctx.stroke();
|
|
819
824
|
}
|
|
820
825
|
});
|
|
@@ -851,8 +856,8 @@ var useTableRender = function (params) {
|
|
|
851
856
|
});
|
|
852
857
|
}
|
|
853
858
|
};
|
|
854
|
-
//
|
|
855
|
-
for (var i = startRow; i <= endRow; i++) {
|
|
859
|
+
// 绘制水平边框(只绘制实际数据行的边框)
|
|
860
|
+
for (var i = startRow; i <= endRow && i <= dataRowCount; i++) {
|
|
856
861
|
_loop_1(i);
|
|
857
862
|
}
|
|
858
863
|
// 为合并单元格绘制底部边框
|
|
@@ -1361,6 +1366,8 @@ var useTableRender = function (params) {
|
|
|
1361
1366
|
hoverRow: state.hoverRowIndex,
|
|
1362
1367
|
selection: state.cellSelection,
|
|
1363
1368
|
resizing: resizeState === null || resizeState === void 0 ? void 0 : resizeState.isResizing,
|
|
1369
|
+
sortOrder: state.sortOrder,
|
|
1370
|
+
sortField: state.sortField,
|
|
1364
1371
|
});
|
|
1365
1372
|
// 如果关键参数没有变化,跳过重绘
|
|
1366
1373
|
if (lastRenderParamsRef.current === renderParamsHash) {
|
|
@@ -40,7 +40,7 @@ var ElectronSignatures = function (props) {
|
|
|
40
40
|
// fmsIsElectronicSealPushLabel = '推送银行',
|
|
41
41
|
_j = props.fmsIsElectronicSealPushLabel,
|
|
42
42
|
// fmsIsElectronicSealPushLabel = '推送银行',
|
|
43
|
-
fmsIsElectronicSealPushLabel = _j === void 0 ? "加盖银行签章" : _j, isSingleQj = props.isSingleQj, _k = props.isQjUseModal, isQjUseModal = _k === void 0 ? true : _k, defaultJustNeedQj = props.defaultJustNeedQj, isDeleteAllFileWhenJustUseQj = props.isDeleteAllFileWhenJustUseQj, _l = props.isShowQysWhenNeedNotQys, isShowQysWhenNeedNotQys = _l === void 0 ? true : _l, _m = props.isControlNeedQys, isControlNeedQys = _m === void 0 ? true : _m, isDeletePlaceholderFileData = props.isDeletePlaceholderFileData, caseId = props.caseId, resetProps = __rest(props, ["request", "isUnControlled", "contractNumFlowIds", "fileUploadProps", "isShowFileUpload", "otherOptions", "fileBaseUrl", "apiBaseUrl", "electronHandleRef", "onValueChange", "isValidateSuccess", "refreshCode", "onCheckedComparison", "onFileTypeChangeGetItem", "tableScroll", "getCreateTimeHand", "isShowElectronBatchBtn", "isShowDownloadBatchBtn", "isShowBatchDeleteBtn", "batchDownloadZipName", "isShowDoubleSignedBatchBtn", "isShowFileType", "isShowFileTypeMerge", "fmsIsElectronicSealLabel", "fmsIsElectronicSealPushLabel", "isSingleQj", "isQjUseModal", "defaultJustNeedQj", "isDeleteAllFileWhenJustUseQj", "isShowQysWhenNeedNotQys", "isControlNeedQys", "isDeletePlaceholderFileData", "caseId"]);
|
|
43
|
+
fmsIsElectronicSealPushLabel = _j === void 0 ? "加盖银行签章" : _j, isSingleQj = props.isSingleQj, _k = props.isQjUseModal, isQjUseModal = _k === void 0 ? true : _k, defaultJustNeedQj = props.defaultJustNeedQj, isDeleteAllFileWhenJustUseQj = props.isDeleteAllFileWhenJustUseQj, _l = props.isShowQysWhenNeedNotQys, isShowQysWhenNeedNotQys = _l === void 0 ? true : _l, _m = props.isControlNeedQys, isControlNeedQys = _m === void 0 ? true : _m, isDeletePlaceholderFileData = props.isDeletePlaceholderFileData, caseId = props.caseId, _o = props.needOrganizationId, needOrganizationId = _o === void 0 ? true : _o, resetProps = __rest(props, ["request", "isUnControlled", "contractNumFlowIds", "fileUploadProps", "isShowFileUpload", "otherOptions", "fileBaseUrl", "apiBaseUrl", "electronHandleRef", "onValueChange", "isValidateSuccess", "refreshCode", "onCheckedComparison", "onFileTypeChangeGetItem", "tableScroll", "getCreateTimeHand", "isShowElectronBatchBtn", "isShowDownloadBatchBtn", "isShowBatchDeleteBtn", "batchDownloadZipName", "isShowDoubleSignedBatchBtn", "isShowFileType", "isShowFileTypeMerge", "fmsIsElectronicSealLabel", "fmsIsElectronicSealPushLabel", "isSingleQj", "isQjUseModal", "defaultJustNeedQj", "isDeleteAllFileWhenJustUseQj", "isShowQysWhenNeedNotQys", "isControlNeedQys", "isDeletePlaceholderFileData", "caseId", "needOrganizationId"]);
|
|
44
44
|
var selectRows = useRef(null);
|
|
45
45
|
var onValueChange = useMemoizedFn(function (info) {
|
|
46
46
|
_onValueChange && _onValueChange(info);
|
|
@@ -63,7 +63,7 @@ var ElectronSignatures = function (props) {
|
|
|
63
63
|
// 获得部门信息
|
|
64
64
|
var getDeptInfo = useCheckedSealInfoList$1(request).getDeptInfo;
|
|
65
65
|
// 达观操作
|
|
66
|
-
var
|
|
66
|
+
var _p = useDg(request), compareHandle = _p.compareHandle, lookCompareHandle = _p.lookCompareHandle;
|
|
67
67
|
// 存储当前点击的选择比对模板的一些参数
|
|
68
68
|
var dgInfoRef = useRef({});
|
|
69
69
|
var myCompareHandle = useMemoizedFn(function (templateId) {
|
|
@@ -94,7 +94,7 @@ var ElectronSignatures = function (props) {
|
|
|
94
94
|
});
|
|
95
95
|
});
|
|
96
96
|
// 基础地址
|
|
97
|
-
var
|
|
97
|
+
var _q = useBaseContext(), API_BASE_URL = _q.apiBaseUrl, FILE_BASE_URL = _q.fileBaseUrl;
|
|
98
98
|
var apiBaseUrl = _apiBaseUrl || API_BASE_URL;
|
|
99
99
|
var fileBaseUrl = _fileBaseUrl || FILE_BASE_URL;
|
|
100
100
|
// 将配置分级处理
|
|
@@ -122,16 +122,16 @@ var ElectronSignatures = function (props) {
|
|
|
122
122
|
return ((resetProps === null || resetProps === void 0 ? void 0 : resetProps.canEdit) + "" === "1" || (resetProps === null || resetProps === void 0 ? void 0 : resetProps.canEdit) === true);
|
|
123
123
|
}, [resetProps.canEdit]);
|
|
124
124
|
// 表格是否处于loading中
|
|
125
|
-
var
|
|
125
|
+
var _r = useState(), loading = _r[0], setLoading = _r[1];
|
|
126
126
|
// 当前是否处于仅需要群杰印章的状态
|
|
127
|
-
var
|
|
128
|
-
var
|
|
127
|
+
var _s = useState(defaultJustNeedQj || false), justNeedQj = _s[0], setJustNeedQj = _s[1];
|
|
128
|
+
var _t = useState(""), organizationId = _t[0], setOrganizationId = _t[1];
|
|
129
129
|
/**
|
|
130
130
|
* 通过部门Id获得公司id
|
|
131
131
|
*/
|
|
132
132
|
useEffect(function () {
|
|
133
133
|
var _deptId = resetProps.deptId;
|
|
134
|
-
if (_deptId) {
|
|
134
|
+
if (_deptId && needOrganizationId) {
|
|
135
135
|
// 调用接口
|
|
136
136
|
getDeptInfo({
|
|
137
137
|
id: _deptId,
|
|
@@ -167,7 +167,7 @@ var ElectronSignatures = function (props) {
|
|
|
167
167
|
var firstDataType = resetProps.dataType || dataTypeSort[0];
|
|
168
168
|
// 记录下需要处理的所有数据
|
|
169
169
|
// TODO: 定义allData 类型
|
|
170
|
-
var
|
|
170
|
+
var _u = useState({}), allData = _u[0], setAllData = _u[1];
|
|
171
171
|
// 收集修改数据
|
|
172
172
|
var onTrackChange = useMemoizedFn(function (dataType, data) {
|
|
173
173
|
setAllData(function (preAllData) {
|
|
@@ -180,12 +180,12 @@ var ElectronSignatures = function (props) {
|
|
|
180
180
|
});
|
|
181
181
|
});
|
|
182
182
|
// 合并数据(数据最终还是要在一个表格中显示)
|
|
183
|
-
var
|
|
183
|
+
var _v = useMergeRecords({
|
|
184
184
|
allData: allData,
|
|
185
185
|
dataTypeSort: dataTypeSort,
|
|
186
186
|
isDeleteAllFileWhenJustUseQj: isDeleteAllFileWhenJustUseQj,
|
|
187
187
|
isDeletePlaceholderFileData: isDeletePlaceholderFileData,
|
|
188
|
-
}), mergeRecords =
|
|
188
|
+
}), mergeRecords = _v.mergeRecords, isHiddenColumns = _v.isHiddenColumns;
|
|
189
189
|
// 附件归属
|
|
190
190
|
var fileTypeColumns = useFileTypeColumns({
|
|
191
191
|
records: mergeRecords,
|
|
@@ -701,7 +701,7 @@ var ElectronSignatures = function (props) {
|
|
|
701
701
|
});
|
|
702
702
|
},
|
|
703
703
|
}); }, []);
|
|
704
|
-
var
|
|
704
|
+
var _w = allData[firstDataType] || {}, sameTypeRecords = _w.records, setSameTypeRecords = _w.setRecords, parseCurrentUploadFile = _w.parseCurrentUploadFile;
|
|
705
705
|
function addFile(info, callback) {
|
|
706
706
|
var _a;
|
|
707
707
|
var file = info.file;
|
|
@@ -362,6 +362,10 @@ interface IElectronSignaturesProps extends IElectronSignaturesItem, IElectronSig
|
|
|
362
362
|
* 表格的scroll配置
|
|
363
363
|
*/
|
|
364
364
|
tableScroll?: any;
|
|
365
|
+
/**
|
|
366
|
+
* 是否需要获取公司id
|
|
367
|
+
*/
|
|
368
|
+
needOrganizationId?: boolean;
|
|
365
369
|
}
|
|
366
370
|
/**
|
|
367
371
|
* 群杰选中数据相关类型
|
|
@@ -412,18 +416,18 @@ interface IChangeValue {
|
|
|
412
416
|
/** 经济责任人是否选中 */
|
|
413
417
|
isCheckedEconomic?: boolean;
|
|
414
418
|
/** 合同ID */
|
|
415
|
-
contractId?: IElectronSignaturesItem[
|
|
419
|
+
contractId?: IElectronSignaturesItem["contractId"];
|
|
416
420
|
/** 后台用于维护当前合同id下附件id(key)与文档id(value)的关系map 后台解绑文档时使用 */
|
|
417
|
-
docAttachMap?: IElectronSignaturesItem[
|
|
421
|
+
docAttachMap?: IElectronSignaturesItem["docAttachMap"];
|
|
418
422
|
/** 文档id 列表 */
|
|
419
|
-
documentIdList?: IElectronSignaturesItem[
|
|
423
|
+
documentIdList?: IElectronSignaturesItem["documentIdList"];
|
|
420
424
|
/** 当前盖过章的附件列表 */
|
|
421
|
-
checkAttachIdList?: IElectronSignaturesItem[
|
|
425
|
+
checkAttachIdList?: IElectronSignaturesItem["checkAttachIdList"];
|
|
422
426
|
fileList?: any;
|
|
423
427
|
/** 当前群杰印章相关数据 */
|
|
424
|
-
qunjSeal?: IElectronSignaturesItem[
|
|
428
|
+
qunjSeal?: IElectronSignaturesItem["qunjSeal"];
|
|
425
429
|
/** 当前群杰盖章地点发生改变 */
|
|
426
|
-
qunjAddress?: IElectronSignaturesItem[
|
|
430
|
+
qunjAddress?: IElectronSignaturesItem["qunjAddress"];
|
|
427
431
|
/** 合同份数是否合理 */
|
|
428
432
|
qunjCountIsValidate?: boolean;
|
|
429
433
|
}
|
|
@@ -494,7 +498,7 @@ interface IFileUploadProps {
|
|
|
494
498
|
onFileChange?: any;
|
|
495
499
|
children?: React.ReactNode;
|
|
496
500
|
multiple?: boolean;
|
|
497
|
-
type?: ButtonProps[
|
|
501
|
+
type?: ButtonProps["type"];
|
|
498
502
|
}
|
|
499
503
|
|
|
500
504
|
export { IChangeValue, ICheckQunjItemProps, IElectronSignaturesItem, IElectronSignaturesItemPublic, IElectronSignaturesProps, IFileFieldsName, IFileItem, IFileUploadProps, IQunjProps };
|
|
@@ -1,53 +1,53 @@
|
|
|
1
1
|
var FILE_FIELDS_NAME = {
|
|
2
2
|
/** 附件id */
|
|
3
|
-
attachId:
|
|
3
|
+
attachId: "attachId",
|
|
4
4
|
/** 附件名 */
|
|
5
|
-
attachName:
|
|
5
|
+
attachName: "attachName",
|
|
6
6
|
/** 上一版附件id */
|
|
7
|
-
oldVersionId:
|
|
7
|
+
oldVersionId: "oldVersionId",
|
|
8
8
|
/** 上一版附件名 */
|
|
9
|
-
oldVersionName:
|
|
9
|
+
oldVersionName: "oldVersionName",
|
|
10
10
|
/** 附件大小 bite */
|
|
11
|
-
attachSize:
|
|
11
|
+
attachSize: "attachSize",
|
|
12
12
|
/** 附件类型code */
|
|
13
|
-
attachType:
|
|
13
|
+
attachType: "attachType",
|
|
14
14
|
/** 附件类型名 */
|
|
15
|
-
attachTypeName:
|
|
15
|
+
attachTypeName: "attachTypeName",
|
|
16
16
|
/** 是否存入样板 */
|
|
17
|
-
isCustomerReference:
|
|
17
|
+
isCustomerReference: "isCustomerReference",
|
|
18
18
|
/** 模板附件id */
|
|
19
|
-
templateAttachId:
|
|
19
|
+
templateAttachId: "templateAttachId",
|
|
20
20
|
/** 模板附件名 */
|
|
21
|
-
templateAttachName:
|
|
21
|
+
templateAttachName: "templateAttachName",
|
|
22
22
|
/** 模板附件大小 */
|
|
23
|
-
templateAttachSize:
|
|
23
|
+
templateAttachSize: "templateAttachSize",
|
|
24
24
|
/** 比对结果附件id */
|
|
25
|
-
compareAttachId:
|
|
25
|
+
compareAttachId: "compareAttachId",
|
|
26
26
|
/** 比对结果附件名 */
|
|
27
|
-
compareAttachName:
|
|
27
|
+
compareAttachName: "compareAttachName",
|
|
28
28
|
/** 比对结果附件大小 */
|
|
29
|
-
compareAttachSize:
|
|
29
|
+
compareAttachSize: "compareAttachSize",
|
|
30
30
|
/** 是否添加水印 */
|
|
31
|
-
isWatermark:
|
|
31
|
+
isWatermark: "isWatermark",
|
|
32
32
|
/** 是否加盖电子印章 */
|
|
33
|
-
isElectronicSeal:
|
|
33
|
+
isElectronicSeal: "isElectronicSeal",
|
|
34
34
|
/** 样板号 */
|
|
35
|
-
templateCrNo:
|
|
35
|
+
templateCrNo: "templateCrNo",
|
|
36
36
|
/** 外部客户产融平台电子印章 */
|
|
37
|
-
fmsIsElectronicSeal:
|
|
37
|
+
fmsIsElectronicSeal: "fmsIsElectronicSeal",
|
|
38
38
|
/** 是否展示外部客户产融平台电子印章勾选框 */
|
|
39
|
-
showFmsIsElectronicSeal:
|
|
40
|
-
showFmsIsPushBank:
|
|
39
|
+
showFmsIsElectronicSeal: "showFmsIsElectronicSeal",
|
|
40
|
+
showFmsIsPushBank: "showFmsIsPushBank",
|
|
41
41
|
/** 双签件 */
|
|
42
|
-
doubleSignedSealInfoDTOList:
|
|
42
|
+
doubleSignedSealInfoDTOList: "doubleSignedSealInfoDTOList",
|
|
43
43
|
/** 是否推送银行 */
|
|
44
|
-
fmsIsPushBank:
|
|
44
|
+
fmsIsPushBank: "fmsIsPushBank",
|
|
45
45
|
/** 是否添加群杰印章信息 */
|
|
46
|
-
isQunj:
|
|
46
|
+
isQunj: "isQunj",
|
|
47
47
|
/** 群杰印章盖章地点 */
|
|
48
|
-
qunjAddress:
|
|
48
|
+
qunjAddress: "qunjAddress",
|
|
49
49
|
/** 群杰印章信息 */
|
|
50
|
-
qunjSeal:
|
|
50
|
+
qunjSeal: "qunjSeal",
|
|
51
51
|
};
|
|
52
52
|
|
|
53
53
|
export { FILE_FIELDS_NAME };
|
package/dist/es/table/utils.js
CHANGED
|
@@ -587,7 +587,7 @@ function sortRecords(_a) {
|
|
|
587
587
|
}
|
|
588
588
|
// 否则保持原样
|
|
589
589
|
else {
|
|
590
|
-
result =
|
|
590
|
+
result = records;
|
|
591
591
|
}
|
|
592
592
|
return result;
|
|
593
593
|
}
|
|
@@ -725,17 +725,6 @@ function sortByDimensions(records, dimensionKeys, order, columns) {
|
|
|
725
725
|
// 如果有明确的排序配置,使用它
|
|
726
726
|
sortConfig = { field: order.field, order: order.order };
|
|
727
727
|
}
|
|
728
|
-
else {
|
|
729
|
-
// 如果没有明确排序,检查维度字段是否有自定义sorter,优先使用第一个有sorter的字段
|
|
730
|
-
for (var _i = 0, dimensionKeys_1 = dimensionKeys; _i < dimensionKeys_1.length; _i++) {
|
|
731
|
-
var dimensionKey = dimensionKeys_1[_i];
|
|
732
|
-
var column = findColumnByKey(dimensionKey);
|
|
733
|
-
if (column && typeof column.sorter === "function") {
|
|
734
|
-
sortConfig = { field: dimensionKey, order: "ascend" };
|
|
735
|
-
break; // 找到第一个有sorter的字段就使用,按维度顺序优先
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
}
|
|
739
728
|
return groupByDimensionsHierarchical(records, dimensionKeys, 0, sortConfig);
|
|
740
729
|
}
|
|
741
730
|
/**
|