rapid-spreadjs 1.0.34 → 1.0.36

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
@@ -18553,6 +18553,95 @@ const FormulaUtils = {
18553
18553
  return tdz;
18554
18554
  },
18555
18555
  },
18556
+ {
18557
+ funName: 'YJSXS',
18558
+ funDesc: '水温查表',
18559
+ funDefaultVal: null,
18560
+ // isContainNullUndefinedVal: true,
18561
+ funParams: [
18562
+ {
18563
+ name: '温度',
18564
+ repeatable: false,
18565
+ optional: false,
18566
+ },
18567
+ ],
18568
+ funCallback: (spread, sheet, retData) => {
18569
+ //如果传递的参数小于1个,则返回空字符串
18570
+ if (retData.allCellVals.length < 1) {
18571
+ return '';
18572
+ }
18573
+ let a = retData.allCellVals[0] + '';
18574
+ var sw; //最后输出的值
18575
+ var arr = new Array('15-0.002', '16-0.003', '17-0.003', '18-0.004', '19-0.004', '20-0.005', '21-0.005', '22-0.006', '23-0.006', '24-0.007', '25-0.008');
18576
+ for (var i = 0; i < arr.length; i++) {
18577
+ var ret = arr[i].split('-');
18578
+ if (a == ret[0]) {
18579
+ sw = ret[1];
18580
+ }
18581
+ }
18582
+ if (a.length > 2) {
18583
+ var sw = a;
18584
+ sw = sw.substring(0, sw.indexOf('.'));
18585
+ var j = 0;
18586
+ for (var i = 0; i < arr.length; i++) {
18587
+ var ret = arr[i].split('-');
18588
+ if (sw == ret[0]) {
18589
+ j = i;
18590
+ }
18591
+ }
18592
+ if (j == arr.length - 1) {
18593
+ var arr1 = arr[j].split('-');
18594
+ var arr2 = arr[j - 1].split('-');
18595
+ sw = FormulaUtils.commFun.GetDataOddIncreaseEvenDecrease(FormulaUtils.commFun.InterpolationMethod_y(arr1[0], arr2[0], arr1[1], arr2[1], a), -3);
18596
+ }
18597
+ else {
18598
+ var arr1 = arr[j].split('-');
18599
+ var arr2 = arr[j + 1].split('-');
18600
+ sw = FormulaUtils.commFun.GetDataOddIncreaseEvenDecrease(FormulaUtils.commFun.InterpolationMethod_y(arr1[0], arr2[0], arr1[1], arr2[1], a), -3);
18601
+ }
18602
+ }
18603
+ return sw;
18604
+ },
18605
+ },
18606
+ {
18607
+ funName: 'YJFN635',
18608
+ funDesc: '重型动力触探承载力查表',
18609
+ funDefaultVal: null,
18610
+ // isContainNullUndefinedVal: true,
18611
+ funParams: [
18612
+ {
18613
+ name: '地基图类型',
18614
+ repeatable: false,
18615
+ optional: false,
18616
+ },
18617
+ {
18618
+ name: '修正后击数',
18619
+ repeatable: false,
18620
+ optional: false,
18621
+ },
18622
+ ],
18623
+ funCallback: (spread, sheet, retData) => {
18624
+ //如果传递的参数小于2个,则返回空字符串
18625
+ if (retData.allCellVals.length < 2) {
18626
+ return '';
18627
+ }
18628
+ let djtlx = retData.allCellVals[0], xzhjs = retData.allCellVals[1];
18629
+ var czl; //最后输出的值
18630
+ if (djtlx == '中砂-砂砾土') {
18631
+ var arr = new Array('15-0.002', '16-0.003', '17-0.003', '18-0.004', '19-0.004', '20-0.005', '21-0.005', '22-0.006', '23-0.006', '24-0.007', '25-0.008');
18632
+ }
18633
+ else {
18634
+ var arr = new Array('3-140', '4-170', '5-200', '6-240', '7-280', '8-320', '9-360', '10-400', '12-480', '14-540', '16-600', '18-660', '20-720', '22-780', '24-830', '26-870', '28-900', '30-930', '35-970', '40-1000');
18635
+ }
18636
+ for (var i = 0; i < arr.length; i++) {
18637
+ var ret = arr[i].split('-');
18638
+ if (xzhjs == ret[0]) {
18639
+ czl = ret[1];
18640
+ }
18641
+ }
18642
+ return czl;
18643
+ },
18644
+ },
18556
18645
  ],
18557
18646
  };
18558
18647