Commit 38b6a97b authored by 莫林毅's avatar 莫林毅

监控运营 ->关联告警诊断 ->关联诊断配置 ->'修改&创建关联配置' 界面

解决'批量修改参数 权值和出异常'bug
parent 3cdadcb8
......@@ -376,7 +376,8 @@
//form表单提交
$("#modelSubmit").click(function(){
sumkpiWeightTdVal=sumkpiWeightTdVal.toFixed(2);
//sumkpiWeightTdVal=sumkpiWeightTdVal.toFixed(2);
sumkpiWeightTdVal=parseFloat(2);
if(sumkpiWeightTdVal <1.00){
$.alert("权限总和需 为 1");
return;
......@@ -668,15 +669,25 @@
}
if (kpiWeightTdVal < 0){
$.alert("权重不能为负");
var mmm=(1-Number(sumkpiWeightTdVal)).toFixed(2);
$.alert(mmm);
$("#kpiWeightTd").val(mmm);
return;
}
if(kpiWeightTdVal >1.00){
$.alert("权重超值 1");
return ;
}
var k=sumkpiWeightTdVal+Number(kpiWeightTdVal);
var tt=0.00;
for(var jj=0;jj<arrDimKpiChecked.length;jj++){
tt+=Number(kpiWeightTdVal);
}
var k=sumkpiWeightTdVal+tt;
//var k=sumkpiWeightTdVal+Number(kpiWeightTdVal);
if(k > 1.00){
$.alert("权重和 超值 1");
var mm=(1-Number(sumkpiWeightTdVal)).toFixed(2);
$("#kpiWeightTd").val(mm);
return;
}
// 勾选指标 的 名称 和 value
......@@ -701,7 +712,8 @@
}
});
sumkpiWeightTdVal+=Number(kpiWeightTdVal);
//sumkpiWeightTdVal+=Number(kpiWeightTdVal);
sumkpiWeightTdVal+=tt;
var maxV=(1-Number(sumkpiWeightTdVal)).toFixed(2);
$("#kpiWeightTd").val(maxV);
//$("#kpiWeightTd").attr("max",maxV);
......@@ -718,6 +730,15 @@
return anainfoShallSaveArr;
}
/*curTotlakpiWeigh=0.00;
function getCurTotlakpiWeight(){
$("#addTr").find("tr").each(function(){
var weight=$(this).children().eq(1);
alert('weight'+weight);
alert('type weight'+typeof weight);
});
}*/
// 获取勾选指标的 数据 格式 id_名称
function getArrDimKpiidAndNameChecked(){
var arrDimKpiChecked=[];
......
......@@ -351,7 +351,6 @@
$.alert("权值总和必须为1");
return;
}
return;
var kpiId_weight=getkpiIDAndWeightShallSave();
var associationId = $("#associationId").val();
......@@ -748,8 +747,14 @@
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)));
return;
}
id_kpiWeightTd_value=Number(id_kpiWeightTd_value);
if(id_kpiWeightTd_value+Number(sumkpiWeightTdVal) > 1.00){
//id_kpiWeightTd_value=Number(id_kpiWeightTd_value);
var curm01=0.00;
for(var jj=0;jj<arrdimKpiChecked.length;jj++){
curm01+=Number(id_kpiWeightTd_value);
}
if(curm01+Number(sumkpiWeightTdVal) > 1.00){
$.alert("权值总和 不能大于 1");
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)));
return;
......@@ -768,10 +773,9 @@
}
});
}
sumkpiWeightTdVal=Number(id_kpiWeightTd_value)+Number(sumkpiWeightTdVal);
sumkpiWeightTdVal=curm01+Number(sumkpiWeightTdVal);
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)));
});
function getkpiIDAndWeightShallSave(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment