rapid-spreadjs 1.0.64 → 1.0.66

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
@@ -19542,6 +19542,55 @@ const FormulaUtils = {
19542
19542
  }
19543
19543
  },
19544
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 < 1) {
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
+ },
19545
19594
  {
19546
19595
  funName: 'YJTREND',
19547
19596
  funDesc: '返回线性回归拟合线的一组纵坐标值(y值)',