Commit 04e0deec authored by 胡斌's avatar 胡斌

Merge remote-tracking branch 'origin/moly'

parents dc3075b8 13a2555f
......@@ -163,7 +163,6 @@
<tr>
<td>渠道:</td>
<td>
<%--<div class="checkbox-inline"><label><input type="checkbox" name="channelList" id="channelList" title="allSelect" checked />全选</label></div>--%>
<div id="">
<c:forEach items="${channelList}" var="channel">
<div class="checkbox-inline">
......@@ -198,15 +197,12 @@
<tr>
<td></td>
<%--<td><button type="button" id="selectAnaInfo" class="btn btn-primary btn-small">查找指标</button>--%>
<%--<button type="button" id="selectBusiness" class="btn btn-info- btn-small">查找业务</button></td>--%>
<%--<td><button type="button" id="addAnaInfo" class="btn btn-primary">添加指标</button></td>--%>
</tr>
<tr>
<td>权重(<font color="red">必填</font>):</td>
<td><input type="number" step="0.01" class="form-control" name="descTd"
id="kpiWeightTd" value="1.00" style="display: inline;"/>
id="kpiWeightTd" value="1" style="display: inline;"/>
<span id="writeWarningInfTd"
style="color:red;display: inline;padding-left:10px;"></span></td>
</tr>
......@@ -273,8 +269,8 @@
}
});
$("input[name='provinceDetail'][value='3000']").click(function () {
alert($("input[name='provinceDetail'][value='32']").text());
alert($("input[name='provinceDetail'][value='32']").html());
/*alert($("input[name='provinceDetail'][value='32']").text());
alert($("input[name='provinceDetail'][value='32']").html());*/
if ($("input[name='provinceDetail'][value='32']").attr("checked") == "checked") {
/*$("#provinceDetailAll").next().hide();
......@@ -384,28 +380,27 @@
function updateRow(e) {
var initK = Number($(e).parent().prev()[0].innerHTML);
var pro = prompt("请输入 0~"+initK, $(e).parent().prev()[0].innerHTML);
var pro = prompt("请输入 ", $(e).parent().prev()[0].innerHTML);
pro = $.trim(pro);
if ($.isNumeric(pro)) {
pro = parseFloat(pro);
if (pro > 0) {
if (initK >= pro) {
$(e).parent().prev()[0].innerHTML = parseFloat(pro).toFixed(2);
sumkpiWeightTdVal -= initK;
sumkpiWeightTdVal += pro;
$(e).parent().prev()[0].innerHTML = parseFloat(pro.toFixed(2));
sumkpiWeightTdVal -= parseFloat(initK.toFixed(2));
sumkpiWeightTdVal += parseFloat(pro.toFixed(2));
var maxV = (1 - Number(sumkpiWeightTdVal)).toFixed(2);
$("#kpiWeightTd").val(maxV === '0.00'?'':maxV);
$("#kpiWeightTd").val(maxV === '0.00'?'':parseFloat(maxV));
}
else {
var k = sumkpiWeightTdVal - initK + pro;
if (k <= 1.00) {
$(e).parent().prev()[0].innerHTML = parseFloat(pro).toFixed(2);
sumkpiWeightTdVal -= initK;
sumkpiWeightTdVal += pro;
$(e).parent().prev()[0].innerHTML = parseFloat(pro.toFixed(2));//.toFixed(2);
sumkpiWeightTdVal -= parseFloat(initK.toFixed(2));
sumkpiWeightTdVal += parseFloat(pro.toFixed(2));
var maxV = (1 - Number(sumkpiWeightTdVal)).toFixed(2);
$("#kpiWeightTd").val(maxV === '0.00'?'':maxV);
$("#kpiWeightTd").val(maxV === '0.00'?'':parseFloat(maxV));
}else{
$.alert("输入值过大,请输入0~"+initK);
}
......@@ -420,8 +415,8 @@
//删除一条参数
function deleteRow(e) {
var v = $(e).parent().prev().text();
sumkpiWeightTdVal = sumkpiWeightTdVal - v;
$("#kpiWeightTd").val((1.00 - sumkpiWeightTdVal) === 0?'':parseFloat(1.00 - sumkpiWeightTdVal).toFixed(2));
sumkpiWeightTdVal = sumkpiWeightTdVal - parseFloat(Number(v).toFixed(2));
$("#kpiWeightTd").val((1.00 - sumkpiWeightTdVal) === 0?'':parseFloat((1.00 - sumkpiWeightTdVal).toFixed(2)));
var id = Number(e.title);
dimKpiSelected.splice($.inArray(id, dimKpiSelected), 1);
$(e).parent().parent().remove();
......@@ -448,11 +443,7 @@
//form表单提交
$("#modelSubmit").click(function () {
/*sumkpiWeightTdVal=sumkpiWeightTdVal.toFixed(2);
sumkpiWeightTdVal =parseFloat(sumkpiWeightTdVal);*/
// alert("sumkpiWeightTdVal "+sumkpiWeightTdVal);
// alert("sumkpiWeightTdVal "+typeof sumkpiWeightTdVal);
// return;
if (sumkpiWeightTdVal < 1.00) {
$.alert("权限总和需 为 1");
return;
......@@ -738,41 +729,41 @@
return;
}
var kpiWeightTdVal = $.trim($("#kpiWeightTd").val());
if (kpiWeightTdVal == "" || kpiWeightTdVal == 0) {
if (kpiWeightTdVal == "" || parseFloat(Number(kpiWeightTdVal).toFixed(2)) == 0) {
$.alert("权重不能为空");
var mmm_1 = (1 - Number(sumkpiWeightTdVal)).toFixed(2);
$("#kpiWeightTd").val(mmm_1 === '0.00'?'':mmm_1);
$("#kpiWeightTd").val(mmm_1 === '0.00'?'':parseFloat(mmm_1));
return;
}
if (kpiWeightTdVal < 0) {
$.alert("权重不能为负");
var mmm = (1 - Number(sumkpiWeightTdVal)).toFixed(2);
$("#kpiWeightTd").val(mmm === '0.00'?'':mmm);
$("#kpiWeightTd").val(mmm === '0.00'?'':parseFloat(mmm));
return;
}
if (kpiWeightTdVal > 1.00) {
$.alert("权重超值 1");
var mmmm = (1 - Number(sumkpiWeightTdVal)).toFixed(2);
$("#kpiWeightTd").val(mmmm);
$("#kpiWeightTd").val(parseFloat(mmmm));
return;
}
var tt = 0.00;
for (var jj = 0; jj < arrDimKpiChecked.length; jj++) {
tt += Number(kpiWeightTdVal);
tt += parseFloat(Number(kpiWeightTdVal).toFixed(2));
}
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);
$("#kpiWeightTd").val(parseFloat(mm));
return;
}
// 勾选指标 的 名称 和 value
var arrDimKpiidAndNameChecked = getArrDimKpiidAndNameChecked();
//向 已添加指标 添加
kpiWeightTdVal=Number(kpiWeightTdVal).toFixed(2);
kpiWeightTdVal=parseFloat(Number(kpiWeightTdVal).toFixed(2));
for (var i = 0; i < arrDimKpiidAndNameChecked.length; i++) {
var id_name = arrDimKpiidAndNameChecked[i];
var addRow = $("<tr class='" + id_name.split("_")[0] + "_" + kpiWeightTdVal + "'><td>" + id_name.split("_")[1] + "</td><td>" + kpiWeightTdVal + "</td><td><a href='javascript:;' title='" + id_name.split("_")[0] + "' onclick='deleteRow(this)'>删除</a>&nbsp;&nbsp;<a href='javascript:;' onclick='updateRow(this)'>修改</a></td></tr>");
......@@ -792,8 +783,8 @@
});
sumkpiWeightTdVal += tt;
var maxV = 1 - Number(sumkpiWeightTdVal);
$("#kpiWeightTd").val(maxV === 0?'':maxV.toFixed(2));
var maxV = parseFloat((1 - Number(sumkpiWeightTdVal)).toFixed(2));
$("#kpiWeightTd").val(maxV === 0?'':parseFloat(maxV));
});
dimKpiSelected = new Array();
......
......@@ -10,6 +10,7 @@
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
......@@ -148,7 +149,9 @@
<td>${dimKpi.name}</td>
<c:forEach items="${anaInfo.items}" var="ite">
<c:if test="${ite.kpiId == dimKpi.kpiId}">
<td>${ite.kpiWeight}</td>
<%--<td>${ite.kpiWeight}</td>--%>
<td><fmt:formatNumber type="number" value="${ite.kpiWeight}" pattern="0.00" maxFractionDigits="1"/></td>
</c:if>
</c:forEach>
<td><a href='javascript:void(0);' id="deleteRow" title='${dimKpi.kpiId}' onclick='deleteRow(this)'>删除</a>&nbsp;&nbsp;<a href='javascript:;' onclick='updateRow(this)'>修改</a></td>
......@@ -276,7 +279,7 @@
$("#updateAnaInf").click(function () {//跟新指标按钮
$(this).hide();
// $("#kpiWeightTd").val(1-Number(sumkpiWeightTdVal));
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)) === 0?'':parseFloat(1-sumkpiWeightTdVal).toFixed(2));
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)) === 0?'':parseFloat((1-sumkpiWeightTdVal).toFixed(2)));
$("#tr_id_dimkpi").show();
$("#tr_id_weight").show();
$("#addAnaInfo").show();
......@@ -676,21 +679,24 @@
}
$("#businessActivedListTd").append(strcheckBox);
}
});
}
function deleteRow(e) {
var initK=Number($(e).parent().prev()[0].innerHTML).toFixed(2);
sumkpiWeightTdVal-=initK;
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)) === 0?'':parseFloat((1-sumkpiWeightTdVal).toFixed(2)).toFixed(2));
sumkpiWeightTdVal-=parseFloat(Number(initK).toFixed(2));
var parseF=parseFloat((1-sumkpiWeightTdVal).toFixed(2));
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)) === 0?'':parseFloat((1-sumkpiWeightTdVal).toFixed(2)));
// $("#kpiWeightTd").val(parseF === 0?'':parseF);
$(e).parent().parent().remove();
}
// sumkpiWeightTdVal=1.00;
function updateRow(e){
var initK=Number($(e).parent().prev()[0].innerHTML).toFixed(2);
var pro=prompt("请输入 0~"+initK,$(e).parent().prev()[0].innerHTML);
var pro=prompt("请输入 ",$(e).parent().prev()[0].innerHTML);
pro=$.trim(pro);
if($.isNumeric(pro)){
pro=Number(pro);
......@@ -698,11 +704,12 @@
var k=sumkpiWeightTdVal-initK;
k=k+pro;
if(k <= 1.00){
$(e).parent().prev()[0].innerHTML=pro.toFixed(2);
// $(e).parent().prev()[0].innerHTML=pro.toFixed(2);
$(e).parent().prev()[0].innerHTML=parseFloat(pro.toFixed(2));
// alert("---"+pro.toFixed(2));
sumkpiWeightTdVal-=initK;
sumkpiWeightTdVal+=pro;
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)) === 0?'':parseFloat((1-sumkpiWeightTdVal).toFixed(2)).toFixed(2));
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)) === 0?'':parseFloat((1-sumkpiWeightTdVal).toFixed(2)));
}else{
$.alert("输入值过大,请输入0~"+initK);
}
......@@ -714,7 +721,6 @@
}
// '添加勾选指标' 按钮 点击事件
$("#addAnaInfo").click(function () {
// $("#kpiWeightTd").val(1-Number(sumkpiWeightTdVal));
var arrdimKpiChecked=getValueOfNamedimKpiCheck();
if(arrdimKpiChecked.length <= 0){
......@@ -723,7 +729,7 @@
}
id_kpiWeightTd_value=getValueBykpiWeightTd();
if(id_kpiWeightTd_value == 0||isNaN(id_kpiWeightTd_value)){
if(parseFloat(id_kpiWeightTd_value.toFixed(2)) == 0||isNaN(id_kpiWeightTd_value)){
$.alert("权值不能为空 或 0");
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)) === 0?'':parseFloat((1-sumkpiWeightTdVal).toFixed(2)));
return;
......@@ -745,7 +751,7 @@
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)));
return;
}
id_kpiWeightTd_value=id_kpiWeightTd_value.toFixed(2);
id_kpiWeightTd_value=parseFloat(id_kpiWeightTd_value.toFixed(2));
var kpiId_Name=getkpiid_NameOfNamedimKpiCheck();
for(var i=0;i<kpiId_Name.length;i++){
var id_name=kpiId_Name[i];
......
......@@ -132,23 +132,23 @@ function xcdFindWarningTable() {
var header = new Array();
header[0] = ["<input type='checkbox' name='ckAll' id='ckAll' class='ckAll' onclick='javascript:checkAll();'/>","checkbox","1%",""];
header[1] = ["编号","warningId","3%",""];
header[2] = ["标题","warningTitle","4%","3"];
header[3] = ["省份","provinceName","4%","4"];
header[4] = ["渠道","channelName","4%","4"];
header[5] = ["数据来源","dataSourceName","6%","8"];
header[6] = ["告警来源","warningSourceName","6%","8"];
header[7] = ["指标","kpiName","4%","3"];
// header[2] = ["标题","warningTitle","4%","3"];
header[2] = ["省份","provinceName","4%","4"];
header[3] = ["渠道","channelName","4%","4"];
header[4] = ["数据来源","dataSourceName","6%","8"];
header[5] = ["告警来源","warningSourceName","6%","8"];
header[6] = ["指标","kpiName","4%","3"];
// header[8] = ["指标名称","kpiName","5%",""];
header[8] = ["告警类型","riskEarlyWarningTypeName","6%","6"];
header[7] = ["告警类型","riskEarlyWarningTypeName","6%","6"];
// header[10] = ["配置项名称","ciName","5%",""];
header[9] = ["级别","importanceLevelName","4%","4"];
header[10] = ["发生时间","occurTime","7%",""];
header[11] = ["告警影响结束时间","influenceEndTime","7%",""];
header[12] = ["结束时间","closeTime","7%",""];
header[13] = ["协查单号","workingOrderCode","6%",""];
header[14] = ["故障单号","relevantFailureId","6%",""];
header[15] = ["告警状态","type","6%","4"];
header[16] = ["关闭类型","status","6%","4"];
header[8] = ["级别","importanceLevelName","4%","4"];
header[9] = ["发生时间","occurTime","7%",""];
header[10] = ["告警影响结束时间","influenceEndTime","7%",""];
header[11] = ["结束时间","closeTime","7%",""];
header[12] = ["协查单号","workingOrderCode","6%",""];
header[13] = ["故障单号","relevantFailureId","6%",""];
header[14] = ["告警状态","type","6%","4"];
header[15] = ["关闭类型","status","6%","4"];
window.pagging = new table_pagging({limit:16,tableId:'xcdWarningTable',header:header});
......
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