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.esm.js CHANGED
@@ -810,7 +810,7 @@ const BusinessUtils = {
810
810
  * @param contentColStartIndex 表格内容列起始索引,默认为:1
811
811
  * @param contentTotalColCount 表格内容列总数,默认为:77
812
812
  * @param addRowHeight 添加的表格行高,默认为:24(单位为像素)
813
- * @returns 返回生成的检测对象属性行数
813
+ * @returns 返回生成的检测对象属性行对象
814
814
  */
815
815
  createTestObjectAttrsCells: (gc, sheet, testObjectAttrs, addRowIndex = 0, deleteRowsCount = 0, isVertical = true, valueAlign = 'left', valuePaddingLeft = 0, contentColStartIndex = 1, contentTotalColCount = 77, addRowHeight = 24) => {
816
816
  if (!testObjectAttrs || testObjectAttrs.length === 0) {
@@ -844,7 +844,7 @@ const BusinessUtils = {
844
844
  */
845
845
  const setFontSizeFamily = (row, col, isValueCell = false) => {
846
846
  const cellObj = sheet.getCell(row, col);
847
- cellObj.fontFamily('宋体').fontSize('9pt').cellPadding(`0 0 0 ${valuePaddingLeft}`);
847
+ cellObj.fontFamily('宋体').fontSize('9pt').fontStyle('normail').cellPadding(`0 0 0 ${valuePaddingLeft}`);
848
848
  // 值单元格的时候,居左显示
849
849
  if (isValueCell) {
850
850
  cellObj.hAlign(valueAlign == 'left'
@@ -882,9 +882,19 @@ const BusinessUtils = {
882
882
  sheet.addSpan(totalRowCount, contentColStartIndex, 1, titleCellColumnCount, gc.Spread.Sheets.SheetArea.viewport);
883
883
  sheet.addSpan(totalRowCount, contentColStartIndex + titleCellColumnCount, 1, rowAttrArr.length > 1 ? titleCellValColumnCount : contentTotalColCount - titleCellColumnCount, gc.Spread.Sheets.SheetArea.viewport);
884
884
  sheet.setValue(totalRowCount, contentColStartIndex, rowAttrArr[0].title);
885
- sheet.setValue(totalRowCount, contentColStartIndex + titleCellColumnCount, rowAttrArr[0].value);
885
+ sheet.setValue(totalRowCount, contentColStartIndex + titleCellColumnCount, rowAttrArr[0].blindDisplayStatus != null && rowAttrArr[0].blindDisplayStatus != undefined && rowAttrArr[0].blindDisplayStatus == false
886
+ ? '此处隐藏'
887
+ : rowAttrArr[0].value);
886
888
  setFontSizeFamily(totalRowCount, contentColStartIndex);
887
889
  setFontSizeFamily(totalRowCount, contentColStartIndex + titleCellColumnCount, true);
890
+ // 设置“此处隐藏”单元格的字体样式
891
+ if (rowAttrArr[0].blindDisplayStatus != null && rowAttrArr[0].blindDisplayStatus != undefined && rowAttrArr[0].blindDisplayStatus == false) {
892
+ sheet
893
+ .getCell(totalRowCount, contentColStartIndex + titleCellColumnCount)
894
+ .fontFamily('宋体')
895
+ .fontSize('12px')
896
+ .fontStyle('italic');
897
+ }
888
898
  // 合并第二个属性的标题列和值列,同时设置对应单元格的内容
889
899
  if (rowAttrArr.length > 1) {
890
900
  const colIndexTitle = contentColStartIndex + titleCellColumnCount + titleCellValColumnCount;
@@ -892,9 +902,15 @@ const BusinessUtils = {
892
902
  sheet.addSpan(totalRowCount, colIndexTitle, 1, titleCellColumnCount, gc.Spread.Sheets.SheetArea.viewport);
893
903
  sheet.addSpan(totalRowCount, colIndexValue, 1, titleCellValColumnCount + 1 + (!isVertical && rowAttrArr.length == 2 ? titleCellColumnCount + titleCellValColumnCount + 1 : 0), gc.Spread.Sheets.SheetArea.viewport);
894
904
  sheet.setValue(totalRowCount, colIndexTitle, rowAttrArr[1].title);
895
- sheet.setValue(totalRowCount, colIndexValue, rowAttrArr[1].value);
905
+ sheet.setValue(totalRowCount, colIndexValue, rowAttrArr[1].blindDisplayStatus != null && rowAttrArr[1].blindDisplayStatus != undefined && rowAttrArr[1].blindDisplayStatus == false
906
+ ? '此处隐藏'
907
+ : rowAttrArr[1].value);
896
908
  setFontSizeFamily(totalRowCount, colIndexTitle);
897
909
  setFontSizeFamily(totalRowCount, colIndexValue, true);
910
+ // 设置“此处隐藏”单元格的字体样式
911
+ if (rowAttrArr[1].blindDisplayStatus != null && rowAttrArr[1].blindDisplayStatus != undefined && rowAttrArr[1].blindDisplayStatus == false) {
912
+ sheet.getCell(totalRowCount, colIndexValue).fontFamily('宋体').fontSize('12px').fontStyle('italic');
913
+ }
898
914
  }
899
915
  // 合并第三个属性的标题列和值列,同时设置对应单元格的内容
900
916
  if (rowAttrArr.length > 2) {
@@ -903,14 +919,20 @@ const BusinessUtils = {
903
919
  sheet.addSpan(totalRowCount, colIndexTitle, 1, titleCellColumnCount, gc.Spread.Sheets.SheetArea.viewport);
904
920
  sheet.addSpan(totalRowCount, colIndexValue, 1, titleCellValColumnCount + 1, gc.Spread.Sheets.SheetArea.viewport);
905
921
  sheet.setValue(totalRowCount, colIndexTitle, rowAttrArr[2].title);
906
- sheet.setValue(totalRowCount, colIndexValue, rowAttrArr[2].value);
922
+ sheet.setValue(totalRowCount, colIndexValue, rowAttrArr[2].blindDisplayStatus != null && rowAttrArr[2].blindDisplayStatus != undefined && rowAttrArr[2].blindDisplayStatus == false
923
+ ? '此处隐藏'
924
+ : rowAttrArr[2].value);
907
925
  setFontSizeFamily(totalRowCount, colIndexTitle);
908
926
  setFontSizeFamily(totalRowCount, colIndexValue, true);
927
+ // 设置“此处隐藏”单元格的字体样式
928
+ if (rowAttrArr[2].blindDisplayStatus != null && rowAttrArr[2].blindDisplayStatus != undefined && rowAttrArr[2].blindDisplayStatus == false) {
929
+ sheet.getCell(totalRowCount, colIndexValue).fontFamily('宋体').fontSize('12px').fontStyle('italic');
930
+ }
909
931
  }
910
932
  }
911
933
  // 恢复绘制
912
934
  sheet.resumePaint();
913
- return testObjectAttrsChunk.length;
935
+ return testObjectAttrsChunk;
914
936
  },
915
937
  /**
916
938
  * 获取检测对象属性值集合
@@ -23240,7 +23262,7 @@ const FormulaUtils = {
23240
23262
  if (thsd == '0.0') {
23241
23263
  for (var j = 0; j < arr1.length; j++) {
23242
23264
  var a1 = arr1[j].split('-');
23243
- if (schtz === a1[0]) {
23265
+ if (schtz == a1[0]) {
23244
23266
  qdhsz = a1[1];
23245
23267
  }
23246
23268
  }