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.cjs.js CHANGED
@@ -19564,6 +19564,55 @@ const FormulaUtils = {
19564
19564
  }
19565
19565
  },
19566
19566
  },
19567
+ {
19568
+ funName: 'YJDLNZXSB',
19569
+ funDesc: '水温修正系数查表',
19570
+ funDefaultVal: null,
19571
+ isAcceptArea: true,
19572
+ funParams: [
19573
+ {
19574
+ name: '温度',
19575
+ repeatable: false,
19576
+ optional: false,
19577
+ },
19578
+ ],
19579
+ funCallback: (spread, sheet, retData) => {
19580
+ //如果传递的参数小于2个,则返回空字符串
19581
+ if (retData.allCellVals.length < 1) {
19582
+ return '/';
19583
+ }
19584
+ const a = retData.allCellVals[0];
19585
+ var sw = '/'; //最后输出的值
19586
+ 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');
19587
+ for (var i = 0; i < arr.length; i++) {
19588
+ var ret = arr[i].split('-');
19589
+ if (a == ret[0]) {
19590
+ sw = ret[1];
19591
+ }
19592
+ }
19593
+ if (a.length > 2) {
19594
+ sw = a;
19595
+ var j = 0;
19596
+ for (var i = 0; i < arr.length; i++) {
19597
+ var ret = arr[i].split('-');
19598
+ if (sw == ret[0]) {
19599
+ j = i;
19600
+ }
19601
+ }
19602
+ if (j == arr.length - 1) {
19603
+ var arr1 = arr[j].split('-');
19604
+ var arr2 = arr[j - 1].split('-');
19605
+ sw = FormulaUtils.commFun.GetDataOddIncreaseEvenDecrease(FormulaUtils.commFun.InterpolationMethod_y(arr1[0], arr2[0], arr1[1], arr2[1], a), -3);
19606
+ }
19607
+ else {
19608
+ var arr1 = arr[j].split('-');
19609
+ var arr2 = arr[j + 1].split('-');
19610
+ sw = FormulaUtils.commFun.GetDataOddIncreaseEvenDecrease(FormulaUtils.commFun.InterpolationMethod_y(arr1[0], arr2[0], arr1[1], arr2[1], a), -3);
19611
+ }
19612
+ }
19613
+ return sw;
19614
+ },
19615
+ },
19567
19616
  {
19568
19617
  funName: 'YJTREND',
19569
19618
  funDesc: '返回线性回归拟合线的一组纵坐标值(y值)',