rapid-spreadjs 1.0.63 → 1.0.65

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
@@ -12834,7 +12834,6 @@ const FormulaUtils = {
12834
12834
  //自定义函数逻辑
12835
12835
  cusFun.prototype.evaluate = function () {
12836
12836
  // 获取该自定义公式被引用单元格的索引
12837
- console.log('所有参数:', arguments);
12838
12837
  /**
12839
12838
  * 说明:
12840
12839
  * 如果isContext=true,则arguments的第一个参数为上下文参数,后面的参数才是自定义参数真正传入的参数
@@ -19543,6 +19542,55 @@ const FormulaUtils = {
19543
19542
  }
19544
19543
  },
19545
19544
  },
19545
+ {
19546
+ funName: 'YJDLNZXSB',
19547
+ funDesc: '水温修正系数查表',
19548
+ funDefaultVal: null,
19549
+ isAcceptArea: true,
19550
+ funParams: [
19551
+ {
19552
+ name: '温度',
19553
+ repeatable: false,
19554
+ optional: false,
19555
+ },
19556
+ ],
19557
+ funCallback: (spread, sheet, retData) => {
19558
+ //如果传递的参数小于2个,则返回空字符串
19559
+ if (retData.allCellVals.length < 2) {
19560
+ return '/';
19561
+ }
19562
+ const a = retData.allCellVals[0];
19563
+ var sw = '/'; //最后输出的值
19564
+ var arr = new Array('18-1.050', '18.5-1.038', '19-1.025', '19.5-1.012', '20-1.000', '20.5-0.988', '21-0.976', '21.5-0.965', '22-0.953');
19565
+ for (var i = 0; i < arr.length; i++) {
19566
+ var ret = arr[i].split('-');
19567
+ if (a == ret[0]) {
19568
+ sw = ret[1];
19569
+ }
19570
+ }
19571
+ if (a.length > 2) {
19572
+ sw = a;
19573
+ var j = 0;
19574
+ for (var i = 0; i < arr.length; i++) {
19575
+ var ret = arr[i].split('-');
19576
+ if (sw == ret[0]) {
19577
+ j = i;
19578
+ }
19579
+ }
19580
+ if (j == arr.length - 1) {
19581
+ var arr1 = arr[j].split('-');
19582
+ var arr2 = arr[j - 1].split('-');
19583
+ sw = FormulaUtils.commFun.GetDataOddIncreaseEvenDecrease(FormulaUtils.commFun.InterpolationMethod_y(arr1[0], arr2[0], arr1[1], arr2[1], a), -3);
19584
+ }
19585
+ else {
19586
+ var arr1 = arr[j].split('-');
19587
+ var arr2 = arr[j + 1].split('-');
19588
+ sw = FormulaUtils.commFun.GetDataOddIncreaseEvenDecrease(FormulaUtils.commFun.InterpolationMethod_y(arr1[0], arr2[0], arr1[1], arr2[1], a), -3);
19589
+ }
19590
+ }
19591
+ return sw;
19592
+ },
19593
+ },
19546
19594
  {
19547
19595
  funName: 'YJTREND',
19548
19596
  funDesc: '返回线性回归拟合线的一组纵坐标值(y值)',