rapid-spreadjs 1.0.147 → 1.0.149
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/index.cjs.js +29 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +29 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/types/business.d.ts +2 -0
- package/dist/utils/business.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -832,7 +832,7 @@ const BusinessUtils = {
|
|
|
832
832
|
* @param contentColStartIndex 表格内容列起始索引,默认为:1
|
|
833
833
|
* @param contentTotalColCount 表格内容列总数,默认为:77
|
|
834
834
|
* @param addRowHeight 添加的表格行高,默认为:24(单位为像素)
|
|
835
|
-
* @returns
|
|
835
|
+
* @returns 返回生成的检测对象属性行对象
|
|
836
836
|
*/
|
|
837
837
|
createTestObjectAttrsCells: (gc, sheet, testObjectAttrs, addRowIndex = 0, deleteRowsCount = 0, isVertical = true, valueAlign = 'left', valuePaddingLeft = 0, contentColStartIndex = 1, contentTotalColCount = 77, addRowHeight = 24) => {
|
|
838
838
|
if (!testObjectAttrs || testObjectAttrs.length === 0) {
|
|
@@ -866,7 +866,7 @@ const BusinessUtils = {
|
|
|
866
866
|
*/
|
|
867
867
|
const setFontSizeFamily = (row, col, isValueCell = false) => {
|
|
868
868
|
const cellObj = sheet.getCell(row, col);
|
|
869
|
-
cellObj.fontFamily('宋体').fontSize('9pt').cellPadding(`0 0 0 ${valuePaddingLeft}`);
|
|
869
|
+
cellObj.fontFamily('宋体').fontSize('9pt').fontStyle('normail').cellPadding(`0 0 0 ${valuePaddingLeft}`);
|
|
870
870
|
// 值单元格的时候,居左显示
|
|
871
871
|
if (isValueCell) {
|
|
872
872
|
cellObj.hAlign(valueAlign == 'left'
|
|
@@ -904,9 +904,19 @@ const BusinessUtils = {
|
|
|
904
904
|
sheet.addSpan(totalRowCount, contentColStartIndex, 1, titleCellColumnCount, gc.Spread.Sheets.SheetArea.viewport);
|
|
905
905
|
sheet.addSpan(totalRowCount, contentColStartIndex + titleCellColumnCount, 1, rowAttrArr.length > 1 ? titleCellValColumnCount : contentTotalColCount - titleCellColumnCount, gc.Spread.Sheets.SheetArea.viewport);
|
|
906
906
|
sheet.setValue(totalRowCount, contentColStartIndex, rowAttrArr[0].title);
|
|
907
|
-
sheet.setValue(totalRowCount, contentColStartIndex + titleCellColumnCount, rowAttrArr[0].
|
|
907
|
+
sheet.setValue(totalRowCount, contentColStartIndex + titleCellColumnCount, rowAttrArr[0].blindDisplayStatus != null && rowAttrArr[0].blindDisplayStatus != undefined && rowAttrArr[0].blindDisplayStatus == false
|
|
908
|
+
? '此处隐藏'
|
|
909
|
+
: rowAttrArr[0].value);
|
|
908
910
|
setFontSizeFamily(totalRowCount, contentColStartIndex);
|
|
909
911
|
setFontSizeFamily(totalRowCount, contentColStartIndex + titleCellColumnCount, true);
|
|
912
|
+
// 设置“此处隐藏”单元格的字体样式
|
|
913
|
+
if (rowAttrArr[0].blindDisplayStatus != null && rowAttrArr[0].blindDisplayStatus != undefined && rowAttrArr[0].blindDisplayStatus == false) {
|
|
914
|
+
sheet
|
|
915
|
+
.getCell(totalRowCount, contentColStartIndex + titleCellColumnCount)
|
|
916
|
+
.fontFamily('宋体')
|
|
917
|
+
.fontSize('12px')
|
|
918
|
+
.fontStyle('italic');
|
|
919
|
+
}
|
|
910
920
|
// 合并第二个属性的标题列和值列,同时设置对应单元格的内容
|
|
911
921
|
if (rowAttrArr.length > 1) {
|
|
912
922
|
const colIndexTitle = contentColStartIndex + titleCellColumnCount + titleCellValColumnCount;
|
|
@@ -914,9 +924,15 @@ const BusinessUtils = {
|
|
|
914
924
|
sheet.addSpan(totalRowCount, colIndexTitle, 1, titleCellColumnCount, gc.Spread.Sheets.SheetArea.viewport);
|
|
915
925
|
sheet.addSpan(totalRowCount, colIndexValue, 1, titleCellValColumnCount + 1 + (!isVertical && rowAttrArr.length == 2 ? titleCellColumnCount + titleCellValColumnCount + 1 : 0), gc.Spread.Sheets.SheetArea.viewport);
|
|
916
926
|
sheet.setValue(totalRowCount, colIndexTitle, rowAttrArr[1].title);
|
|
917
|
-
sheet.setValue(totalRowCount, colIndexValue, rowAttrArr[1].
|
|
927
|
+
sheet.setValue(totalRowCount, colIndexValue, rowAttrArr[1].blindDisplayStatus != null && rowAttrArr[1].blindDisplayStatus != undefined && rowAttrArr[1].blindDisplayStatus == false
|
|
928
|
+
? '此处隐藏'
|
|
929
|
+
: rowAttrArr[1].value);
|
|
918
930
|
setFontSizeFamily(totalRowCount, colIndexTitle);
|
|
919
931
|
setFontSizeFamily(totalRowCount, colIndexValue, true);
|
|
932
|
+
// 设置“此处隐藏”单元格的字体样式
|
|
933
|
+
if (rowAttrArr[1].blindDisplayStatus != null && rowAttrArr[1].blindDisplayStatus != undefined && rowAttrArr[1].blindDisplayStatus == false) {
|
|
934
|
+
sheet.getCell(totalRowCount, colIndexValue).fontFamily('宋体').fontSize('12px').fontStyle('italic');
|
|
935
|
+
}
|
|
920
936
|
}
|
|
921
937
|
// 合并第三个属性的标题列和值列,同时设置对应单元格的内容
|
|
922
938
|
if (rowAttrArr.length > 2) {
|
|
@@ -925,14 +941,20 @@ const BusinessUtils = {
|
|
|
925
941
|
sheet.addSpan(totalRowCount, colIndexTitle, 1, titleCellColumnCount, gc.Spread.Sheets.SheetArea.viewport);
|
|
926
942
|
sheet.addSpan(totalRowCount, colIndexValue, 1, titleCellValColumnCount + 1, gc.Spread.Sheets.SheetArea.viewport);
|
|
927
943
|
sheet.setValue(totalRowCount, colIndexTitle, rowAttrArr[2].title);
|
|
928
|
-
sheet.setValue(totalRowCount, colIndexValue, rowAttrArr[2].
|
|
944
|
+
sheet.setValue(totalRowCount, colIndexValue, rowAttrArr[2].blindDisplayStatus != null && rowAttrArr[2].blindDisplayStatus != undefined && rowAttrArr[2].blindDisplayStatus == false
|
|
945
|
+
? '此处隐藏'
|
|
946
|
+
: rowAttrArr[2].value);
|
|
929
947
|
setFontSizeFamily(totalRowCount, colIndexTitle);
|
|
930
948
|
setFontSizeFamily(totalRowCount, colIndexValue, true);
|
|
949
|
+
// 设置“此处隐藏”单元格的字体样式
|
|
950
|
+
if (rowAttrArr[2].blindDisplayStatus != null && rowAttrArr[2].blindDisplayStatus != undefined && rowAttrArr[2].blindDisplayStatus == false) {
|
|
951
|
+
sheet.getCell(totalRowCount, colIndexValue).fontFamily('宋体').fontSize('12px').fontStyle('italic');
|
|
952
|
+
}
|
|
931
953
|
}
|
|
932
954
|
}
|
|
933
955
|
// 恢复绘制
|
|
934
956
|
sheet.resumePaint();
|
|
935
|
-
return testObjectAttrsChunk
|
|
957
|
+
return testObjectAttrsChunk;
|
|
936
958
|
},
|
|
937
959
|
/**
|
|
938
960
|
* 获取检测对象属性值集合
|
|
@@ -23262,7 +23284,7 @@ const FormulaUtils = {
|
|
|
23262
23284
|
if (thsd == '0.0') {
|
|
23263
23285
|
for (var j = 0; j < arr1.length; j++) {
|
|
23264
23286
|
var a1 = arr1[j].split('-');
|
|
23265
|
-
if (schtz
|
|
23287
|
+
if (schtz == a1[0]) {
|
|
23266
23288
|
qdhsz = a1[1];
|
|
23267
23289
|
}
|
|
23268
23290
|
}
|