rapid-spreadjs 1.0.159 → 1.0.161
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 +26 -12
- 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 +26 -12
- 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/utils/business.d.ts +5 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -835,7 +835,7 @@ const BusinessUtils = {
|
|
|
835
835
|
* @param contentColStartIndex 表格内容列起始索引,默认为:1
|
|
836
836
|
* @param contentTotalColCount 表格内容列总数,默认为:77
|
|
837
837
|
* @param addRowHeight 添加的表格行高,默认为:24(单位为像素)
|
|
838
|
-
* @returns
|
|
838
|
+
* @returns 返回生成的检测对象属性行单元格数组和行对象数组,格式如:{ allRowCells: [[{row:0,col:0}]], attrObjs: [[{fieldName:"attr1",title:"属性1",value:"值1"}]] }
|
|
839
839
|
*/
|
|
840
840
|
createTestObjectAttrsCells: (gc, sheet, testObjectAttrs, addRowIndex = 0, deleteRowsCount = 0, isVertical = true, valueAlign = 'left', valuePaddingLeft = 0, contentColStartIndex = 1, contentTotalColCount = 77, addRowHeight = 24) => {
|
|
841
841
|
if (!testObjectAttrs || testObjectAttrs.length === 0) {
|
|
@@ -881,7 +881,10 @@ const BusinessUtils = {
|
|
|
881
881
|
: gc.Spread.Sheets.HorizontalAlign.left);
|
|
882
882
|
}
|
|
883
883
|
};
|
|
884
|
+
// 返回所有单元格的二维数组
|
|
885
|
+
let allRowCells = [];
|
|
884
886
|
for (let i = 0; i < testObjectAttrsChunk.length; i++) {
|
|
887
|
+
let curRowCells = [];
|
|
885
888
|
const rowAttrArr = testObjectAttrsChunk[i];
|
|
886
889
|
// 获取总行数
|
|
887
890
|
const totalRowCount = addRowIndex + i; //sheet.getRowCount();
|
|
@@ -910,6 +913,8 @@ const BusinessUtils = {
|
|
|
910
913
|
sheet.setValue(totalRowCount, contentColStartIndex + titleCellColumnCount, rowAttrArr[0].blindDisplayStatus != null && rowAttrArr[0].blindDisplayStatus != undefined && rowAttrArr[0].blindDisplayStatus == true
|
|
911
914
|
? '此处隐藏'
|
|
912
915
|
: rowAttrArr[0].value);
|
|
916
|
+
curRowCells.push({ row: totalRowCount, col: contentColStartIndex });
|
|
917
|
+
curRowCells.push({ row: totalRowCount, col: contentColStartIndex + titleCellColumnCount });
|
|
913
918
|
setFontSizeFamily(totalRowCount, contentColStartIndex);
|
|
914
919
|
setFontSizeFamily(totalRowCount, contentColStartIndex + titleCellColumnCount, true);
|
|
915
920
|
// 设置“此处隐藏”单元格的字体样式
|
|
@@ -934,6 +939,8 @@ const BusinessUtils = {
|
|
|
934
939
|
sheet.setValue(totalRowCount, colIndexValue, rowAttrArr[1].blindDisplayStatus != null && rowAttrArr[1].blindDisplayStatus != undefined && rowAttrArr[1].blindDisplayStatus == true
|
|
935
940
|
? '此处隐藏'
|
|
936
941
|
: rowAttrArr[1].value);
|
|
942
|
+
curRowCells.push({ row: totalRowCount, col: colIndexTitle });
|
|
943
|
+
curRowCells.push({ row: totalRowCount, col: colIndexValue });
|
|
937
944
|
setFontSizeFamily(totalRowCount, colIndexTitle);
|
|
938
945
|
setFontSizeFamily(totalRowCount, colIndexValue, true);
|
|
939
946
|
// 设置“此处隐藏”单元格的字体样式
|
|
@@ -951,6 +958,8 @@ const BusinessUtils = {
|
|
|
951
958
|
sheet.setValue(totalRowCount, colIndexValue, rowAttrArr[2].blindDisplayStatus != null && rowAttrArr[2].blindDisplayStatus != undefined && rowAttrArr[2].blindDisplayStatus == true
|
|
952
959
|
? '此处隐藏'
|
|
953
960
|
: rowAttrArr[2].value);
|
|
961
|
+
curRowCells.push({ row: totalRowCount, col: colIndexTitle });
|
|
962
|
+
curRowCells.push({ row: totalRowCount, col: colIndexValue });
|
|
954
963
|
setFontSizeFamily(totalRowCount, colIndexTitle);
|
|
955
964
|
setFontSizeFamily(totalRowCount, colIndexValue, true);
|
|
956
965
|
// 设置“此处隐藏”单元格的字体样式
|
|
@@ -958,10 +967,15 @@ const BusinessUtils = {
|
|
|
958
967
|
sheet.getCell(totalRowCount, colIndexValue).fontFamily('宋体').fontSize('12px').fontStyle('italic');
|
|
959
968
|
}
|
|
960
969
|
}
|
|
970
|
+
// 将当前行的所有单元格添加到allRowCells数组中
|
|
971
|
+
allRowCells.push(curRowCells);
|
|
961
972
|
}
|
|
962
973
|
// 恢复绘制
|
|
963
974
|
sheet.resumePaint();
|
|
964
|
-
return
|
|
975
|
+
return {
|
|
976
|
+
allRowCells: allRowCells,
|
|
977
|
+
attrObjs: testObjectAttrsChunk,
|
|
978
|
+
};
|
|
965
979
|
},
|
|
966
980
|
/**
|
|
967
981
|
* 获取检测对象属性值集合
|
|
@@ -16267,10 +16281,10 @@ const FormulaUtils = {
|
|
|
16267
16281
|
let symbol = '/';
|
|
16268
16282
|
//如果传递的参数小于2个,则返回符号
|
|
16269
16283
|
if (retData.allCellVals.length < 2) {
|
|
16270
|
-
if (sheet.getValue(retData.arguments[1].$gt[0].row, retData.arguments[1].$gt[0].col) != '/') {
|
|
16271
|
-
|
|
16272
|
-
|
|
16273
|
-
}
|
|
16284
|
+
// if (sheet.getValue(retData.arguments[1].$gt[0].row, retData.arguments[1].$gt[0].col) != '/') {
|
|
16285
|
+
// sheet.setValue(retData.arguments[1].$gt[0].row, retData.arguments[1].$gt[0].col, '/');
|
|
16286
|
+
// return symbol;
|
|
16287
|
+
// }
|
|
16274
16288
|
return symbol;
|
|
16275
16289
|
}
|
|
16276
16290
|
if (retData.allCellVals[0]._error != undefined && retData.allCellVals[0]._error != null) {
|
|
@@ -16287,12 +16301,12 @@ const FormulaUtils = {
|
|
|
16287
16301
|
}
|
|
16288
16302
|
}
|
|
16289
16303
|
});
|
|
16290
|
-
if (syjglist.length == 0) {
|
|
16291
|
-
|
|
16292
|
-
|
|
16293
|
-
|
|
16294
|
-
|
|
16295
|
-
}
|
|
16304
|
+
// if (syjglist.length == 0) {
|
|
16305
|
+
// if (sheet.getValue(retData.arguments[1].$gt[0].row, retData.arguments[1].$gt[0].col) != '/') {
|
|
16306
|
+
// sheet.setValue(retData.arguments[1].$gt[0].row, retData.arguments[1].$gt[0].col, '/');
|
|
16307
|
+
// return symbol;
|
|
16308
|
+
// }
|
|
16309
|
+
// }
|
|
16296
16310
|
// console.log(retData);
|
|
16297
16311
|
// console.log(jsyq);
|
|
16298
16312
|
// console.log(syjglist);
|