| | |
| | | var x_PPK = 0; |
| | | var x_CPK = 0; |
| | | var numCount = 0 |
| | | //ç³»æ° ä¸åç |
| | | var c4 = [0.7979, 0.8862, 0.9213, 0.9400, 0.9515, 0.9594, 0.9650, 0.9693, 0.9727, 0.9754, 0.9776, 0.9794, 0.9810, 0.9823, 0.9835, 0.9845, 0.9854, 0.9862, 0.9869, 0.9876, 0.9882, 0.9887, 0.9892, 0.9896]; |
| | | |
| | | //å¹³åå¼çå¹³åå¼ |
| | | for (var j = 1; j < option.cols[0].length; j++) { |
| | | if (optionAVG.length != 0 || optionS.length != 0) { |
| | | if (optionAVG.length != 0 || optionS.length != 0) { |
| | | x_AVG = calc(x_AVG, parseFloat(optionAVG[0][option.cols[0][j].field]), "+"); |
| | | } |
| | | } |
| | |
| | | x_AVG = $("#HCenterline_X").val() == "" ? x_AVG : parseFloat($("#HCenterline_X").val()); |
| | | $("#HCenterline_X").val(x_AVG.toFixed(5)); |
| | | |
| | | //ï¼æ¯å¤©çæ°æ®-å¹³åå¼çå¹³åå¼ï¼ ä¹å¹³æ¹ å¨ç¸å |
| | | for (var i = 1; i < option.cols[0].length; i++) { |
| | | for (var j = 0; j < option.data.length - 3; j++) { |
| | | numCount += 1; |
| | |
| | | |
| | | } |
| | | } |
| | | |
| | | //ï¼sumé¤ä»¥ï¼æææ°éå-1ï¼ï¼ å¼å¹³æ¹ ä¸å
å«åä¸è¡ |
| | | x_PPK = Math.sqrt(calc(x_SUM, (numCount - 1), "/")); |
| | | //ï¼sumé¤ä»¥ï¼æææ°éï¼ï¼ å¼å¹³æ¹ ä¸å
å«åä¸è¡ |
| | | x_CPK = Math.sqrt(calc(x_SUM, numCount, "/")); |
| | | |
| | | var limit = $("#limit").val(); |
| | | if (parseInt(limit) >= 9) { |
| | | $("#HCenterline_S").val(x_PPK.toFixed(4)); |
| | |
| | | |
| | | //åå¼ æ§å¶ä¸é æ§å¶ä¸é |
| | | if (limit == 1) { |
| | | //xæ§å¶ä¸é å¹³åå¼çå¹³åå¼+ä¸åçPPK Xæ§å¶ä¸é å¹³åå¼çå¹³åå¼-ä¸åçPPK |
| | | $("#HControlUpperLimit_X").val(calc(x_AVG, calc(x_PPK, 3, "*"), "+").toFixed(5)) |
| | | $("#HControlLowerLimit_X").val(calc(x_AVG, calc(x_PPK, 3, "*"), "-").toFixed(5)) |
| | | |
| | | //è®¡ç®æ ·æ¬é为1 ç ppk |
| | | //æ£éªé¡¹ç®ï¼å¹³åå¼-ä¸é é¤ä»¥ä¸åçPPK |
| | | var min = calc(calc(x_AVG, calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+"), "-"), calc(3, x_PPK, "*"), "/"); |
| | | //æ£éªé¡¹ç®ï¼ä¸é-å¹³åå¼ é¤ä»¥ä¸åçPPK |
| | | var max = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), calc(3, x_PPK, "*"), "/"); |
| | | var DataHCPK = min > max ? max : min; |
| | | $("#HPPK").val(DataHCPK); |
| | | |
| | | //è®¡ç®æ ·æ¬é为1 ç cpk |
| | | |
| | | //è®¡ç®æ ·æ¬é为1 ç cpk |
| | | var cpkSum = 0; |
| | | var CPK_U = 0; |
| | | var CPK_N = 0; |
| | | for (var i = 1; i < option.cols[0].length; i++) { |
| | | for (var j = 0; j < option.data.length - 3; j++) { |
| | | if (i == 1) { |
| | | //è·å第ä¸è¡ç第ä¸ä¸ªå¼ |
| | | CPK_U = option.data[j][option.cols[0][i].field]; |
| | | } else { |
| | | CPK_N = option.data[j][option.cols[0][i].field]; |
| | | //å¦æç¬¬ä¸è¡ç第ä¸ä¸ªå¼å¤§äºç¬¬äºä¸ªå¼ï¼ç¬¬ä¸ä¸ªåå»ç¬¬äº å¦åå°±æ¯ ç¬¬äºä¸ªåå»ç¬¬ä¸ä¸ª |
| | | var data_un = CPK_U > CPK_N ? calc(CPK_U, CPK_N, "-") : calc(CPK_N, CPK_U, "-"); |
| | | //æå¼ç¸å |
| | | cpkSum = calc(cpkSum, data_un, "+"); |
| | | CPK_U = CPK_N; |
| | | } |
| | | } |
| | | } |
| | | //cpkSum é¤ä»¥ 第ä¸è¡æ»æ°åå»2 |
| | | cpkSum = calc(cpkSum, option.cols[0].length - 2, "/"); |
| | | //cpkSum é¤ä»¥ç³»æ° |
| | | var HAVG_CPK = calc(cpkSum, 1.128, "/"); |
| | | |
| | | //æ£éªé¡¹ç®ï¼å¹³åå¼-ä¸é é¤ä»¥ä¸åçHAVG_CPK |
| | | min = calc(calc(x_AVG, calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+"), "-"), calc(3, HAVG_CPK, "*"), "/"); |
| | | //æ£éªé¡¹ç®ï¼ä¸é-å¹³åå¼ é¤ä»¥ä¸åçHAVG_CPK |
| | | max = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), calc(3, HAVG_CPK, "*"), "/"); |
| | | DataHCPK = min > max ? max : min; |
| | | |
| | | $("#HCPK").val(DataHCPK); |
| | | } else { |
| | | //ä¸é |
| | | if ($("#HUpLimit").val() != "" && $("#HDownLimit").val() == "") { |
| | | if ($("#HUpLimit").val() != "" && $("#HDownLimit").val() == "") {//ä¸éä¸çäºç©ºï¼ä¸éçäºç©º |
| | | //æ£éªé¡¹ç®ï¼ï¼ä¸éå¼-å¹³åå¼ï¼é¤ä»¥ï¼ä¸åçPPK é¤ä»¥C4çç³»æ°:c4对åºçæ ·æ¬æ°ï¼ |
| | | var HUpLimit = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), calc(calc(3, x_PPK, "*"), c4[option.data.length - 4], "/"), "/"); |
| | | $("#HPPK").val(HUpLimit.toFixed(4)); |
| | | } |
| | | //ä¸é |
| | | else if ($("#HDownLimit").val() != "" && $("#HUpLimit").val() == "") { |
| | | else if ($("#HDownLimit").val() != "" && $("#HUpLimit").val() == "") {//ä¸éä¸çäºç©ºï¼ä¸éçäºç©º |
| | | //æ£éªé¡¹ç®ï¼ï¼å¹³åå¼-ä¸éå¼ï¼é¤ä»¥ï¼ä¸åçPPK é¤ä»¥C4çç³»æ°:c4对åºçæ ·æ¬æ°ï¼ |
| | | var HDownLimit = calc(calc(x_AVG, calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+"), "-"), calc(calc(3, x_PPK, "*"), c4[option.data.length - 4], "/"), "/"); |
| | | $("#HPPK").val(HDownLimit.toFixed(4)); |
| | | } else { |
| | | //æ£éªé¡¹ç®ï¼ï¼ä¸éå¼-å¹³åå¼ï¼é¤ä»¥ï¼ä¸åçPPK é¤ä»¥C4çç³»æ°:c4对åºçæ ·æ¬æ°ï¼ |
| | | var HUpLimit = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), calc(calc(3, x_PPK, "*"), c4[option.data.length - 4], "/"), "/"); |
| | | //æ£éªé¡¹ç®ï¼ï¼å¹³åå¼-ä¸éå¼ï¼é¤ä»¥ï¼ä¸åçPPK é¤ä»¥C4çç³»æ°:c4对åºçæ ·æ¬æ°ï¼ |
| | | var HDownLimit = (x_AVG - calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+")) / ((3 * x_PPK) / c4[option.data.length - 4]); |
| | | $("#HPPK").val(HUpLimit > HDownLimit ? HDownLimit.toFixed(4) : HUpLimit.toFixed(4)); |
| | | } |
| | |
| | | var D3 = [0,0.000, 0.000, 0.000, 0.000, 0.000, 0.076, 0.136, 0.184, 0.223]; |
| | | var D4 = [0,3.267, 2.574, 2.282, 2.114, 2.004, 1.924, 1.864, 1.816, 1.777]; |
| | | |
| | | //æ±æå·®å¼çå¹³åå¼ |
| | | for (var j = 1; j < option.cols[0].length; j++) { |
| | | if (optionAVG.length != 0 || optionS.length != 0) { |
| | | s_AVG = calc(s_AVG, parseFloat(optionS[0][option.cols[0][j].field]), "+"); |
| | |
| | | } |
| | | s_AVG = calc(s_AVG, (option.cols[0].length - 1), "/") |
| | | s_AVG = $("#HCenterline_S").val() == "" || "0" ? s_AVG : parseFloat($("#HCenterline_S").val()); |
| | | $("#HCenterline_S").val(s_AVG); |
| | | $("#HCenterline_S").val(s_AVG);//Sä¸å¿çº¿ |
| | | |
| | | var limit = $("#limit").val(); |
| | | if (parseInt(limit) < 9) { |
| | | $("#HCenterline_S").val(s_AVG.toFixed(4)); |
| | | } |
| | | |
| | | //æ±å¹³åå¼çå¹³åå¼ |
| | | for (var j = 1; j < option.cols[0].length; j++) { |
| | | if (optionAVG.length != 0 || optionS.length != 0) { |
| | | x_AVG = calc(x_AVG, parseFloat(optionAVG[0][option.cols[0][j].field]), "+"); |
| | |
| | | } |
| | | x_AVG = calc(x_AVG, (option.cols[0].length - 1), "/"); |
| | | x_AVG = $("#HCenterline_X").val() == "" ? x_AVG : parseFloat($("#HCenterline_X").val()); |
| | | $("#HCenterline_X").val(x_AVG.toFixed(5)); |
| | | $("#HCenterline_X").val(x_AVG.toFixed(5));//Xä¸å¿çº¿ |
| | | |
| | | s_CPK = calc(s_AVG, d2[option.data.length - 4], "/"); |
| | | |
| | | //åå¼ æ§å¶ä¸é æ§å¶ä¸é |
| | | if (limit > 1) { |
| | | //å¹³åå¼+ï¼A2çç³»æ°ä¹ä»¥ æå·®å¼çå¹³åå¼ï¼ |
| | | $("#HControlUpperLimit_X").val(calc(x_AVG, calc(A2[$("#limit").val() - 1], s_AVG, "*"), "+").toFixed(5)) |
| | | //å¹³åå¼-ï¼A2çç³»æ°ä¹ä»¥ æå·®å¼çå¹³åå¼ï¼ |
| | | $("#HControlLowerLimit_X").val(calc(x_AVG, calc(A2[$("#limit").val() - 1], s_AVG, "*"), "-").toFixed(5)) |
| | | } |
| | | |
| | | //å·®å¼ æ§å¶ä¸é æ§å¶ä¸é |
| | | //D4çç³»æ° ä¹ä»¥ æå·®å¼çå¹³åå¼ |
| | | $("#HControlUpperLimit_S").val(calc(D4[$("#limit").val() - 1], s_AVG, "*").toFixed(5)); |
| | | //D3çç³»æ° ä¹ä»¥ æå·®å¼çå¹³åå¼ |
| | | $("#HControlLowerLimit_S").val(calc(D3[$("#limit").val() - 1], s_AVG, "*").toFixed(5)); |
| | | var limit = $("#limit").val(); |
| | | |
| | | if (limit > 1) { |
| | | //ä¸é |
| | | if ($("#HUpLimit").val() != "" && $("#HDownLimit").val() == "") { |
| | | if ($("#HUpLimit").val() != "" && $("#HDownLimit").val() == "") {//ä¸éä¸çäºç©ºï¼ä¸éçäºç©º |
| | | //ï¼ä¸éå¼-å¹³åå¼ï¼é¤ä»¥ ä¸åçs_CPK |
| | | var HUpLimit = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), (3 * s_CPK), "/"); |
| | | $("#HCPK").val(HUpLimit.toFixed(4)); |
| | | } |
| | | //ä¸é |
| | | else if ($("#HDownLimit").val() != "" && $("#HUpLimit").val() == "") { |
| | | else if ($("#HDownLimit").val() != "" && $("#HUpLimit").val() == "") {//ä¸éä¸çäºç©ºï¼ä¸éçäºç©º |
| | | //ï¼å¹³åå¼-ä¸éå¼ï¼é¤ä»¥ ä¸åçs_CPK |
| | | var HDownLimit = calc(calc(x_AVG, calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+"), "-"), (3 * s_CPK), "/"); |
| | | $("#HCPK").val(HDownLimit.toFixed(4)); |
| | | } else { |
| | | //ï¼ä¸éå¼-å¹³åå¼ï¼é¤ä»¥ ä¸åçs_CPK |
| | | var HUpLimit = calc(calc(calc(parseFloat($("#HUpLimit").val()), parseFloat($("#HTargetVal").val()), "+"), x_AVG, "-"), (3 * s_CPK), "/"); |
| | | //ï¼å¹³åå¼-ä¸éå¼ï¼é¤ä»¥ ä¸åçs_CPK |
| | | var HDownLimit = calc(calc(x_AVG, calc(parseFloat($("#HDownLimit").val()), parseFloat($("#HTargetVal").val()), "+"), "-"), (3 * s_CPK), "/"); |
| | | if (s_CPK == 0) { |
| | | $("#HCPK").val(0); |
| | |
| | | |
| | | //计ç®spcå
«å¤§å¤å® |
| | | function spc_judge() { |
| | | //åå¼ |
| | | //åå¼ ï¼ä¸é-ä¸å¿éï¼é¤ä»¥ 3 åæ3å |
| | | var HAreaValue = calc(calc(parseFloat($("#HControlUpperLimit_X").val()), parseFloat($("#HCenterline_X").val()), "-"), 3, "/").toFixed(5); |
| | | //ä¸éé¨å |
| | | var HAreaValue_A = parseFloat($("#HControlUpperLimit_X").val()); |
| | | var HAreaValue_A = parseFloat($("#HControlUpperLimit_X").val());//ä¸é |
| | | var HAreaValue_B = calc(calc(HAreaValue, 2, "*"), parseFloat($("#HCenterline_X").val()), "+").toFixed(5); |
| | | var HAreaValue_C = calc(calc(HAreaValue, 1, "*"), parseFloat($("#HCenterline_X").val()), "+").toFixed(5); |
| | | //ä¸éé¨å |
| | | var HAreaValue_FA = parseFloat($("#HControlLowerLimit_X").val()); |
| | | var HAreaValue_FA = parseFloat($("#HControlLowerLimit_X").val());//ä¸é |
| | | var HAreaValue_FB = calc(parseFloat($("#HCenterline_X").val()),calc(HAreaValue, 2, "*"), "-").toFixed(5); |
| | | var HAreaValue_FC = calc(parseFloat($("#HCenterline_X").val()),calc(HAreaValue, 1, "*"), "-").toFixed(5); |
| | | |
| | | |
| | | let HAvg = [];//å¹³åå¼ |
| | | let HAvg = [];//å¹³åå¼ æ ¹æ®X- è¿ä¸è¡è®¡ç®ç |
| | | |
| | | for (var j = 1; j < option.cols[0].length; j++) { |
| | | if (optionAVG.length != 0) { |
| | |
| | | //è¿ç»åäºä¸ªç¹å¨ä¸å¿çº¿ä¸¤ä¾§çCåºå
|
| | | var judge_return = []; |
| | | if (HAvg.length >= 15) { |
| | | //å 为æ¯15ä¸ªç¹ æä»¥14ç䏿 å°±æ¯ç¬¬15æ¡æ°æ® ç¶åæ¯0-15ï¼1-16 |
| | | for (var i = 14; i < HAvg.length; i++) { |
| | | if (HAvg[i] >= HAreaValue_FC && HAvg[i] <= HAreaValue_C) { |
| | | //æ ¹æ®ä¸é¢çiå¼ç®åºä»é£ä¸ªä¸æ å¼å§ |
| | | for (var j = i - 14; j <= i; j++) { |
| | | //妿大äºè´c,å°äºæ£c é£å°±æé®é¢ |
| | | if (HAvg[j] >= HAreaValue_FC && HAvg[j] <= HAreaValue_C) { |
| | | //彿å䏿¡ï¼å¦æå¤§äºè´c,å°äºæ£c å°±è¿å»è¿½å 15æ¡æ°æ® |
| | | if (i == j) { |
| | | for (var j1 = i; j1 >= i - 14; j1--) { |
| | | if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | |
| | | } |
| | | } |
| | | } else { |
| | | break; |
| | | break; //ç»æ¢å½å15æ¡ï¼æ§è¡ä¸ä¸ä¸ª15æ¡ |
| | | } |
| | | } |
| | | } |
| | |
| | | for (var i = 13; i < HAvg.length; i++) { |
| | | var judge = []; |
| | | for (var j = i - 13; j < i; j++) { |
| | | //ç¨ç¬¬ä¸ä¸ªè·ç¬¬äºçå对æ¯ï¼ç¬¬äºä¸ªè·ç¬¬ä¸ä¸ªå对æ¯ï¼ä»¥æ¤å¾ªç¯ |
| | | if (HAvg[j] > HAvg[j + 1]) { |
| | | judge.push(1); |
| | | } else if (HAvg[j] < HAvg[j + 1]) { |
| | |
| | | } |
| | | } |
| | | for (var k = 0; k < judge.length; k++) { |
| | | if (judge[k] + judge[k + 1] == 0) { |
| | | if (judge[k] + judge[k + 1] == 0) { //妿ååç¸å çäº0é£å°±æ¯æ»¡è¶³ï¼ä¸æ»¡è¶³å°±ç´æ¥è·³åº |
| | | if ((k + 1) == judge.length) { |
| | | for (var j1 = i; j1 >= i - 13; j1--) { |
| | | if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | |
| | | } |
| | | } |
| | | } else { |
| | | break; |
| | | break;//ç»æ¢å½åå¾ªç¯ |
| | | } |
| | | } |
| | | } |
| | |
| | | if (HAvg.length >= 9) { |
| | | for (var i = 8; i < HAvg.length; i++) { |
| | | var judge = []; |
| | | //ç¨å¾ªç¯çå¼è·ä¸å¿çº¿å¯¹æ¯ |
| | | for (var j = i - 8; j <= i; j++) { |
| | | if (HAvg[j] > parseFloat($("#HCenterline_X").val())) { |
| | | judge.push(1); |
| | |
| | | judge.push(-1); |
| | | } |
| | | } |
| | | //对循ç¯çæå
¥çå¼ï¼ç¸å |
| | | var sum = 0; |
| | | for (var k = 0; k < judge.length; k++) { |
| | | sum += judge[k]; |
| | | } |
| | | //å¤æå¾ªç¯æå
¥ç弿¯å¦çäºæ£ä¹æè
è´ä¹ |
| | | if (sum == 9 || sum == -9) { |
| | | for (var j1 = i; j1 >= i - 8; j1--) { |
| | | if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | |
| | | //è¿ç»8ç¹è½å¨ä¸å¿çº¿ä¸¤ä¾§ä¸æ ä¸å¨Cåºä»¥å
(å³å¨Cåºä»¥å¤) |
| | | if (HAvg.length >= 8) { |
| | | for (var i = 7; i < HAvg.length; i++) { |
| | | //循ç¯ç弿¯å¦å¤§äºæ£C æè
å°äºè´C |
| | | if (HAvg[i] < HAreaValue_FC || HAvg[i] > HAreaValue_C) { |
| | | //满足 è¿è¡å¤æåé¢å¼æ¯å¦æ»¡è¶³ |
| | | for (var j = i - 7; j <= i; j++) { |
| | | if (HAvg[j] < HAreaValue_FC || HAvg[j] > HAreaValue_C) { |
| | | //妿æå齿»¡è¶³ æå
¥ |
| | | if (j == i) { |
| | | for (var j1 = i; j1 >= i - 7; j1--) { |
| | | if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | |
| | | } |
| | | } |
| | | } else { |
| | | break; |
| | | break; //æä¸ä¸ªä¸æ»¡è¶³ç´æ¥ç»æ¢å½åå¾ªç¯ |
| | | } |
| | | } |
| | | } |
| | |
| | | if (HAvg.length >= 6) { |
| | | for (var i = 5; i < HAvg.length; i++) { |
| | | var judge = []; |
| | | //ç¨ç¬¬ä¸ä¸ªè·ç¬¬äºçå对æ¯ï¼ç¬¬äºä¸ªè·ç¬¬ä¸ä¸ªå对æ¯ï¼ä»¥æ¤å¾ªç¯ |
| | | for (var j = i - 5; j < i; j++) { |
| | | if (HAvg[j] > HAvg[j + 1]) { |
| | | judge.push(1); |
| | |
| | | judge.push(-1); |
| | | } |
| | | } |
| | | //对追å çå¼ è¿è¡ç´¯å |
| | | var sum = 0; |
| | | for (var k = 0; k < judge.length; k++) { |
| | | sum += judge[k]; |
| | | } |
| | | //å¦ææ¯æ£äºæè
è´äº é£å°±å
¨é¨è¿½å |
| | | if (sum == 5 || sum == -5) { |
| | | for (var j1 = i; j1 >= i - 5; j1--) { |
| | | if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | |
| | | if (HAvg.length >= 5) { |
| | | for (var i = 4; i < HAvg.length; i++) { |
| | | var judge = []; |
| | | //å½åå¼å¦æå¤§äº ä¸å¿çº¿ å¹¶ä¸ å¤§äº æ£C |
| | | if (HAvg[i] > parseFloat($("#HCenterline_X").val()) && HAvg[i] > HAreaValue_C) { |
| | | for (var j = i - 4; j <= i; j++) { |
| | | var record = []; |
| | | //ä¸é¢æ»¡è¶³ 夿 å½åå¼å¦æå¤§äº ä¸å¿çº¿ å¹¶ä¸ å¤§äº æ£C |
| | | if (HAvg[j] > parseFloat($("#HCenterline_X").val()) && HAvg[j] > HAreaValue_C) { |
| | | record.push(HAvg[j]); |
| | | if (record.length >= 4) { |
| | | //å¦ææ»¡è¶³4æ¡ä»¥ä¸æ°æ®æé®é¢ é£å°±å¾ªç¯ææ°æ®æå
¥æ°ç» |
| | | for (var j1 = i; j1 >= i - 4; j1--) { |
| | | if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | | judge_return.push(HAvg[j1]); |
| | | //æ ¹æ® |
| | | //if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | | // judge_return.push(HAvg[j1]); |
| | | //} |
| | | if ($.inArray(record[j1], judge_return) == -1) { |
| | | judge_return.push(record[j1]); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | } |
| | | //å½åå¼å¦æå°äº ä¸å¿çº¿ å¹¶ä¸ å°äº è´C |
| | | else if (HAvg[i] < parseFloat($("#HCenterline_X").val()) && HAvg[i] < HAreaValue_FC) { |
| | | for (var j = i - 4; j <= i; j++) { |
| | | var record = []; |
| | | //ä¸é¢æ»¡è¶³ 夿 å½åå¼å¦æå°äº ä¸å¿çº¿ å¹¶ä¸ å°äº è´C |
| | | if (HAvg[j] < parseFloat($("#HCenterline_X").val()) && HAvg[j] < HAreaValue_FC) { |
| | | record.push(HAvg[j]); |
| | | if (record.length >= 4) { |
| | | //å¦ææ»¡è¶³4æ¡ä»¥ä¸æ°æ®æé®é¢ é£å°±å¾ªç¯ææ°æ®æå
¥æ°ç» |
| | | for (var j1 = i; j1 >= i - 4; j1--) { |
| | | if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | | judge_return.push(HAvg[j1]); |
| | | //if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | | // judge_return.push(HAvg[j1]); |
| | | //} |
| | | if ($.inArray(record[j1], judge_return) == -1) { |
| | | judge_return.push(record[j1]); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (HAvg.length >= 3) { |
| | | for (var i = 2; i < HAvg.length; i++) { |
| | | var judge = []; |
| | | //å½åå¼å¦æå¤§äº ä¸å¿çº¿ å¹¶ä¸ å¤§äº æ£B |
| | | if (HAvg[i] > parseFloat($("#HCenterline_X").val()) && HAvg[i] > HAreaValue_B) { |
| | | for (var j = i - 2; j <= i; j++) { |
| | | var record = []; |
| | | //ä¸é¢æ»¡è¶³ 夿 å½åå¼å¦æå¤§äº ä¸å¿çº¿ å¹¶ä¸ å¤§äº æ£B |
| | | if (HAvg[j] > parseFloat($("#HCenterline_X").val()) && HAvg[j] > HAreaValue_B) { |
| | | record.push(HAvg[j]); |
| | | if (record.length >= 2) { |
| | | //å¦ææ»¡è¶³2æ¡ä»¥ä¸æ°æ®æé®é¢ é£å°±å¾ªç¯ææ°æ®æå
¥æ°ç» |
| | | for (var j1 = i; j1 >= i - 2; j1--) { |
| | | if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | | judge_return.push(HAvg[j1]); |
| | | //if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | | // judge_return.push(HAvg[j1]); |
| | | //} |
| | | if ($.inArray(record[j1], judge_return) == -1) { |
| | | judge_return.push(record[j1]); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | } |
| | | } |
| | | //å½åå¼å¦æå°äº ä¸å¿çº¿ å¹¶ä¸ å°äº è´B |
| | | else if (HAvg[i] < parseFloat($("#HCenterline_X").val()) && HAvg[i] < HAreaValue_FB) { |
| | | for (var j = i - 2; j <= i; j++) { |
| | | var record = []; |
| | | //ä¸é¢æ»¡è¶³ 夿 å½åå¼å¦æå°äº ä¸å¿çº¿ å¹¶ä¸ å°äº è´B |
| | | if (HAvg[j] < parseFloat($("#HCenterline_X").val()) && HAvg[j] < HAreaValue_FB) { |
| | | record.push(HAvg[j]); |
| | | if (record.length >= 2) { |
| | | //å¦ææ»¡è¶³2æ¡ä»¥ä¸æ°æ®æé®é¢ é£å°±å¾ªç¯ææ°æ®æå
¥æ°ç» |
| | | for (var j1 = i; j1 >= i - 2; j1--) { |
| | | if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | | judge_return.push(HAvg[j1]); |
| | | //if ($.inArray(HAvg[j1], judge_return) == -1) { |
| | | // judge_return.push(HAvg[j1]); |
| | | //} |
| | | if ($.inArray(record[j1], judge_return) == -1) { |
| | | judge_return.push(record[j1]); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (HAvg.length >= 0) { |
| | | for (var i = 0; i < HAvg.length; i++) { |
| | | var judge = []; |
| | | //夿å½å弿¯å¦å¤§äº æ£A |
| | | if (HAvg[i] > HAreaValue_A) { |
| | | if ($.inArray(HAvg[i], judge_return) == -1) { |
| | | judge_return.push(HAvg[i]); |
| | | } |
| | | } |
| | | //夿å½å弿¯å¦å¤§äº è´A |
| | | else if (HAvg[i] < HAreaValue_FA) { |
| | | if ($.inArray(HAvg[i], judge_return) == -1) { |
| | | judge_return.push(HAvg[i]); |