| | |
| | | <label class="layui-form-label" style="width: 85px;">ä¸é</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HUpLimit" id="HUpLimit" style="background-color:#efefef4d;" readonly> |
| | | <input type="hidden" class="layui-input" name="HControlUpperLimit" id="HControlUpperLimit" > |
| | | <input type="hidden" class="layui-input" name="HControlLowerLimit" id="HControlLowerLimit" > |
| | | <input type="hidden" class="layui-input" name="HControlUpperLimit" id="HControlUpperLimit"> |
| | | <input type="hidden" class="layui-input" name="HControlLowerLimit" id="HControlLowerLimit"> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin: 10px 0 10px;display:none;"> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">è¿æ»¤</label> |
| | | <div class="layui-input-block"> |
| | | <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;"> |
| | | </select> |
| | | <label class="layui-form-label" style="width: 85px;">Std.Dev</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="HStdDev" name="HStdDev" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;"> |
| | | <option value="0" selected="selected"></option> |
| | | <option value="=">=</option> |
| | | <option value=">=">>=</option> |
| | | <option value=">">></option> |
| | | <option value="<="><=</option> |
| | | <option value="<"><</option> |
| | | <option value="<>"><></option> |
| | | <option value="7">å
å«</option> |
| | | <option value="8">å·¦å
å«</option> |
| | | <option value="9">å³å
å«</option> |
| | | <option value="10">ä¸å
å«</option> |
| | | </select> |
| | | <label class="layui-form-label" style="width: 85px;">Sigma</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="HSigma" name="HSigma" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <input type="text" class="layui-input" value="" name="ColContent" id="ColContent"> |
| | | <label class="layui-form-label" style="width: 85px;">PPK</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HPPK" id="HPPK" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">ï¼°ï¼°</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HPP" id="HPP" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-row" style="margin-top:5px;"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">C a</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="HCA" name="HCA" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">C P K</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" id="HCPK" name="HCPK" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">C P</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HCP" id="HCP" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label" style="width: 85px;">Grade</label> |
| | | <div class="layui-input-block" style="margin-left: 120px;"> |
| | | <input type="text" class="layui-input" name="HGrade" id="HGrade" style="background-color:#efefef4d;" readonly> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | if (limit > data1.data.length - 3) { |
| | | layer.msg("åæ ·æ°éè¶
è¿å®é
æ°é!", { icon: 5 }); |
| | | } else { |
| | | var data = [];//ååæ®µæ°æ® |
| | | var col = []; |
| | | var totalArray = []; |
| | | //ç»ç©ºçæ°ç»èµå¼ |
| | | for (var key in data1.list) {//循åºéåæ°ç» |
| | | data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });//仿¯ä¸ªå¯¹è±¡ä¸æåæ°æ® |
| | | } |
| | | for (var i = 0; i < data.length; i++) {//éådataæ°ç»éçæ°æ® |
| | | col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 }); |
| | | } |
| | | |
| | | option.cols = [col]; |
| | | option.data = data1.data; |
| | | optionAVG = data1.data[limit + 1]; |
| | | optionS = data1.data[limit + 2]; |
| | | optionAVG[0] = data1.data[limit + 1]; |
| | | optionS[0] = data1.data[limit + 2]; |
| | | table.render(option); |
| | | set_Line(); |
| | | } |
| | |
| | | let HAvg = [];//å¹³åå¼ |
| | | let HDifference = [];//å·®å¼ |
| | | |
| | | //è·å两个ææä¹é´çç¸å·® |
| | | var time1 = Date.parse(new Date($("#HBeginDate").val()));//å¼å§æ¶é´ |
| | | var time2 = Date.parse(new Date($("#HEndDate").val()));//ç»ææ¶é´ |
| | | var Days = Math.abs(parseInt((time2 - time1) / 1000 / 3600 / 24)); |
| | | //è·åå¹´ |
| | | var yyyy = new Date($("#HBeginDate").val()).getFullYear(); |
| | | //è·åæä»½ |
| | | var MM = new Date($("#HBeginDate").val()).getMonth() + 1; |
| | | //è·åå¼å§æä»½çæå¤§å¤©æ° |
| | | var SumMonth = new Date(yyyy, MM, 0).getDate(); //卿䏤æä¹å·® |
| | | //è·åå¼å§æ¥æçå¤©æ° |
| | | var HBEGINDATE = new Date(new Date($("#HBeginDate").val())).getDate(); //è·åå¼å§æ¥æå¤©æ° |
| | | |
| | | var k = 0;//æ¶éå¾ªç¯æ¬¡æ° |
| | | for (var j = 0; j <= (Days - k); j++) { |
| | | /* columns.push({ field: Format(yyyy + '/' + MM + '/' + (HBEGINDATE + j), 'yyyy-MM-dd'), title: Format(yyyy + '/' + MM + '/' + (HBEGINDATE + j), 'MM.dd'), width: 120 })*/ |
| | | if (optionAVG != [] || optionS != []) { |
| | | HAvg.push(optionAVG[Format(yyyy + '/' + MM + '/' + (HBEGINDATE + j), 'yyyy-MM-dd')]); |
| | | HDifference.push(optionS[Format(yyyy + '/' + MM + '/' + (HBEGINDATE + j), 'yyyy-MM-dd')]); |
| | | for (var j = 1; j < option.cols[0].length; j++) { |
| | | if (optionAVG.length != 0 || optionS.length != 0) { |
| | | HAvg.push(optionAVG[0][option.cols[0][j].field]); |
| | | HDifference.push(optionS[0][option.cols[0][j].field]); |
| | | } else { |
| | | HAvg.push(0); |
| | | HDifference.push(0); |
| | | } |
| | | |
| | | //跨年çè¯ ä¼ä»ä¸æä¸å·å¼å§ |
| | | if (MM == 12 && (HBEGINDATE + j) == 31) { |
| | | yyyy += 1; |
| | | MM = 1; |
| | | SumMonth = new Date(yyyy, MM, 0).getDate(); |
| | | HBEGINDATE = 0; |
| | | k += j; |
| | | j = 0; |
| | | } else if ((HBEGINDATE + j) == SumMonth) { //è·¨æ ææ°å ä¸ å¤©æ°ä»ä¸å¼å§ |
| | | HBEGINDATE = 0; |
| | | MM += 1; |
| | | SumMonth = new Date(yyyy, MM, 0).getDate(); |
| | | k += j; |
| | | j = 0; |
| | | } |
| | | } |
| | | |
| | | for (let i = 0; i <= Days; i++) { |
| | | H_X.push(i + 1); |
| | | for (let i = 1; i < option.cols[0].length; i++) { |
| | | H_X.push(option.cols[0][i].field); |
| | | } |
| | | |
| | | option_ZXT_Avg = { |
| | |
| | | }, |
| | | yAxis: { |
| | | type: 'value', |
| | | min: parseInt($("#HTargetVal").val()) + parseInt($("#HDownLimit").val()) - 1, // 设置æå°å¼ |
| | | max: parseInt($("#HTargetVal").val()) + parseInt($("#HUpLimit").val()) + 1, // 设置æå¤§å¼ |
| | | interval: 0.1, // 设置é´è· |
| | | min: parseFloat($("#HDownLimit").val()) != 0 ? (parseFloat($("#HTargetVal").val()) + parseFloat($("#HDownLimit").val()) * 1.3) : 0, // 设置æå°å¼ |
| | | max: parseFloat($("#HTargetVal").val()) + parseFloat($("#HUpLimit").val()) * 1.3, // 设置æå¤§å¼ |
| | | interval: (parseFloat($("#HUpLimit").val()) - parseFloat($("#HDownLimit").val()))/10, // 设置é´è· |
| | | }, |
| | | series: [ |
| | | { |
| | |
| | | markLine: { |
| | | symbol: 'none',//廿ç®å¤´ |
| | | data: [ |
| | | { yAxis: $("#HUpLimit").val(), lineStyle: { color: '#FF1D00' }, label: { color: '#FF1D00', fontSize: 10 } }, |
| | | { yAxis: parseFloat($("#HTargetVal").val()) + parseFloat($("#HUpLimit").val()), lineStyle: { color: '#FF1D00' }, label: { color: '#FF1D00', fontSize: 10 } }, |
| | | { |
| | | yAxis: $("#HDownLimit").val(), lineStyle: { color: '#FF1D00' }, label: { color: '#FF1D00', fontSize: 10 } |
| | | yAxis: parseFloat($("#HTargetVal").val()) + parseFloat($("#HDownLimit").val()), lineStyle: { color: '#FF1D00' }, label: { color: '#FF1D00', fontSize: 10 } |
| | | }, |
| | | { |
| | | yAxis: $("#HControlUpperLimit").val(), lineStyle: { color: '#2cb615' }, label: { color: '#2cb615', fontSize: 10 } |
| | | yAxis: parseFloat($("#HTargetVal").val()) + parseFloat($("#HControlUpperLimit").val()), lineStyle: { color: '#2cb615' }, label: { color: '#2cb615', fontSize: 10 } |
| | | }, |
| | | { |
| | | yAxis: $("#HControlLowerLimit").val(), lineStyle: { color: '#2cb615' }, label: { color: '#2cb615', fontSize: 10 } |
| | | yAxis: parseFloat($("#HTargetVal").val()) + parseFloat($("#HControlLowerLimit").val()), lineStyle: { color: '#2cb615' }, label: { color: '#2cb615', fontSize: 10 } |
| | | } |
| | | ] |
| | | }, |