Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cmszMonitorAnalysis
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liuna
cmszMonitorAnalysis
Commits
937b63c5
Commit
937b63c5
authored
Dec 27, 2017
by
莫林毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监控运营 -> 告警关联诊断 '创建&修改关联指标' 界面
1 去除 权值和为 1 功能 [权值默认都为 1] 2 隐藏 '权值' 列
parent
74f32667
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
42 deletions
+28
-42
AssociateDiagosisConfiguration.jsp
...views/MonitorOperation/AssociateDiagosisConfiguration.jsp
+2
-2
CreateDiagosis.jsp
.../webapp/WEB-INF/views/MonitorOperation/CreateDiagosis.jsp
+12
-26
UpdateAnaInfo.jsp
...n/webapp/WEB-INF/views/MonitorOperation/UpdateAnaInfo.jsp
+14
-14
No files found.
src/main/webapp/WEB-INF/views/MonitorOperation/AssociateDiagosisConfiguration.jsp
View file @
937b63c5
...
...
@@ -250,7 +250,7 @@
$
.
dialog
({
title
:
""
,
content
:
"<div id='paramList'>"
+
"<div class='col-xs-12'><div class='panel panel-default' ><div class='panel-heading' >指标列表</div><div class='panel-body'> <table class='table table-hover table-striped'> <thead> <tr> <th width='20%'>指标ID</th><th width='30%'>指标编码</th> <th width='30%' >指标名称</th> <th width='20%'>指标权值</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div>"
+
"<div class='col-xs-12'><div class='panel panel-default' ><div class='panel-heading' >指标列表</div><div class='panel-body'> <table class='table table-hover table-striped'> <thead> <tr> <th width='20%'>指标ID</th><th width='30%'>指标编码</th> <th width='30%' >指标名称</th> <th width='20%'
style='display: none'
>指标权值</th> </tr> </thead> <tbody> </tbody> </table> </div> </div> </div>"
+
"</div>"
,
lock
:
true
,
width
:
700
,
...
...
@@ -279,7 +279,7 @@
paramTbody
.
append
(
$
(
"<tr></tr>"
).
append
(
"<td>"
+
kpiId
+
"</td>"
)
.
append
(
"<td>"
+
jsonDa
.
code
+
"</td>"
)
.
append
(
"<td>"
+
jsonDa
.
name
+
"</td>"
)
.
append
(
"<td>"
+
kpiWeight
+
"</td>"
));
.
append
(
"<td
style='display: none'
>"
+
kpiWeight
+
"</td>"
));
}
});
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/CreateDiagosis.jsp
View file @
937b63c5
...
...
@@ -133,7 +133,7 @@
<thead>
<tr>
<th>
指标名称
</th>
<th>
权重值
</th>
<th
style=
"display: none"
>
权重值
</th>
<th><a
href=
"javascript:deleteAllTr()"
>
删除所有
</a></th>
</tr>
</thead>
...
...
@@ -199,7 +199,7 @@
<td></td>
</tr>
<tr>
<tr
style=
"display:none;"
>
<td>
权重(
<font
color=
"red"
>
必填
</font>
):
</td>
<td><input
type=
"number"
step=
"0.01"
class=
"form-control"
name=
"descTd"
id=
"kpiWeightTd"
value=
"1"
style=
"display: inline;"
/>
...
...
@@ -269,26 +269,13 @@
}
});
$
(
"input[name='provinceDetail'][value='3000']"
).
click
(
function
()
{
/*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();
$("#provinceDetailAll").hide();
$("input[name='provinceDetail'][value!='32']").next().hide();
$("input[name='provinceDetail'][value!='32']").hide();
if
(
$
(
"input[name='provinceDetail'][value='32']"
).
attr
(
"checked"
)
==
"checked"
)
{
*/
$
(
"#provinceDetailAll"
).
prop
(
"disabled"
,
"disabled"
);
$
(
"input[name='provinceDetail'][value!='32']"
).
prop
(
"disabled"
,
"disabled"
);
}
else
{
/* $("#provinceDetailAll").next().show();
$("#provinceDetailAll").show();
$("input[name='provinceDetail'][value!='32']").next().show();
$("input[name='provinceDetail'][value!='32']").show();*/
$
(
"#provinceDetailAll"
).
removeAttr
(
"disabled"
);
$
(
"input[name='provinceDetail'][value!='32']"
).
removeAttr
(
"disabled"
);
}
...
...
@@ -419,8 +406,8 @@
//删除一条参数
function
deleteRow
(
e
)
{
var
v
=
$
(
e
).
parent
().
prev
().
text
();
sumkpiWeightTdVal
=
parseFloat
((
sumkpiWeightTdVal
-
parseFloat
(
Number
(
v
).
toFixed
(
2
))).
toFixed
(
2
));
$
(
"#kpiWeightTd"
).
val
((
1.00
-
sumkpiWeightTdVal
)
===
0
?
''
:
parseFloat
((
1.00
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
/*
sumkpiWeightTdVal = parseFloat((sumkpiWeightTdVal - parseFloat(Number(v).toFixed(2))).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,10 +435,10 @@
//form表单提交
$
(
"#modelSubmit"
).
click
(
function
()
{
if
(
sumkpiWeightTdVal
<
1.00
)
{
/*
if (sumkpiWeightTdVal < 1.00) {
$.alert("权限总和需 为 1");
return;
}
}
*/
var
anainfoShallSaveArr
=
getAnainfoShallSave
();
var
arrDimKpiChecked
=
getArrDimKpiChecked
();
var
provinceDetailChecked
=
getDetailProvinceCheckedValues
();
...
...
@@ -733,7 +720,7 @@
return
;
}
var
kpiWeightTdVal
=
$
.
trim
(
$
(
"#kpiWeightTd"
).
val
());
if
(
kpiWeightTdVal
==
""
||
parseFloat
(
Number
(
kpiWeightTdVal
).
toFixed
(
2
))
==
0
)
{
/*
if (kpiWeightTdVal == "" || parseFloat(Number(kpiWeightTdVal).toFixed(2)) == 0) {
$.alert("权重不能为空");
var mmm_1 = (1 - Number(sumkpiWeightTdVal)).toFixed(2);
$("#kpiWeightTd").val(mmm_1 === '0.00'?'':parseFloat(mmm_1));
...
...
@@ -756,13 +743,12 @@
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(parseFloat(mm));
return;
}
}
*/
// 勾选指标 的 名称 和 value
var
arrDimKpiidAndNameChecked
=
getArrDimKpiidAndNameChecked
();
...
...
@@ -770,7 +756,7 @@
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> <a href='javascript:;' onclick='updateRow(this)'>修改</a></td></tr>"
);
var
addRow
=
$
(
"<tr class='"
+
id_name
.
split
(
"_"
)[
0
]
+
"_"
+
kpiWeightTdVal
+
"'><td>"
+
id_name
.
split
(
"_"
)[
1
]
+
"</td><td
style='display:none;'>"
+
kpiWeightTdVal
+
"</td><td><a href='javascript:;' title='"
+
id_name
.
split
(
"_"
)[
0
]
+
"' onclick='deleteRow(this)'>删除</a> </td></tr>"
);
//
<
a
href
=
'javascript:;'
onclick
=
'updateRow(this)'
>
修改
<
/a
>
$
(
"#addTr"
).
append
(
addRow
);
dimKpiSelected
.
push
(
Number
(
id_name
.
split
(
"_"
)[
0
]));
}
...
...
@@ -786,9 +772,9 @@
}
});
sumkpiWeightTdVal
+=
tt
;
/*
sumkpiWeightTdVal += tt;
var maxV = parseFloat((1 - Number(sumkpiWeightTdVal)).toFixed(2));
$
(
"#kpiWeightTd"
).
val
(
maxV
===
0
?
''
:
parseFloat
(
maxV
));
$("#kpiWeightTd").val(maxV === 0?'':parseFloat(maxV));
*/
});
dimKpiSelected
=
new
Array
();
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/UpdateAnaInfo.jsp
View file @
937b63c5
...
...
@@ -139,7 +139,7 @@
<tr>
<input
type=
"hidden"
class=
"btn btn-default"
id=
"modelReset2"
/>
<th>
指标名称
</th><th>
权重值
</th><th><a
href=
"javascript:deleteAllTr()"
>
删除所有
</a></th>
<th>
指标名称
</th><th
style=
"display: none"
>
权重值
</th><th><a
href=
"javascript:deleteAllTr()"
>
删除所有
</a></th>
</tr>
</thead>
...
...
@@ -150,11 +150,11 @@
<c:forEach
items=
"${anaInfo.items}"
var=
"ite"
>
<c:if
test=
"${ite.kpiId == dimKpi.kpiId}"
>
<
%
--
<
td
>
${ite.kpiWeight}
</td>
--%>
<td><fmt:formatNumber
type=
"number"
value=
"${ite.kpiWeight}"
pattern=
"0.00"
maxFractionDigits=
"1"
/></td>
<td
style=
"display: none"
><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>
<
a
href=
'javascript:;'
onclick=
'updateRow(this)'
>
修改
</a></td
>
<td><a
href=
'javascript:void(0);'
id=
"deleteRow"
title=
'${dimKpi.kpiId}'
onclick=
'deleteRow(this)'
>
删除
</a>
<
/td><
%
--
<
a
href=
'javascript:;'
onclick=
'updateRow(this)'
>
修改
</a>
--%
>
</tr>
</c:forEach>
...
...
@@ -211,7 +211,7 @@
</td>
</tr>
<tr
id=
"tr_id_weight"
>
<tr
id=
"tr_id_weight"
style=
"display: none"
>
<td>
权重(
<font
color=
"red"
>
必填
</font>
):
</td>
<td><input
type=
"number"
step=
"0.01"
class=
"form-control"
name=
"descTd"
id=
"kpiWeightTd"
style=
"display: inline;"
/>
<span
id=
"writeWarningInfTd"
style=
"color:red;display: inline;padding-left:10px;"
></span></td>
...
...
@@ -281,7 +281,7 @@
// $("#kpiWeightTd").val(1-Number(sumkpiWeightTdVal));
$
(
"#kpiWeightTd"
).
val
(
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
))
===
0
?
''
:
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
$
(
"#tr_id_dimkpi"
).
show
();
$
(
"#tr_id_weight"
).
show
();
//
$("#tr_id_weight").show();
$
(
"#addAnaInfo"
).
show
();
$
(
"#modelReset"
).
show
();
...
...
@@ -353,10 +353,10 @@
$
(
"#kpiWeightTd"
).
val
(
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
))
===
0
?
''
:
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
var
kk
=
parseFloat
((
sumkpiWeightTdVal
).
toFixed
(
2
));
if
(
kk
<
1.00
){
/*
if( kk <1.00){
$.alert("权值总和必须为1");
return;
}
}
*/
var
kpiId_weight
=
getkpiIDAndWeightShallSave
();
var
associationId
=
$
(
"#associationId"
).
val
();
...
...
@@ -727,7 +727,7 @@
}
id_kpiWeightTd_value
=
getValueBykpiWeightTd
();
if
(
parseFloat
(
id_kpiWeightTd_value
.
toFixed
(
2
))
==
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;
...
...
@@ -738,8 +738,6 @@
return;
}
var curm01=0.00;
for(var jj=0;jj<arrdimKpiChecked.length;jj++){
curm01+=Number(id_kpiWeightTd_value);
...
...
@@ -748,12 +746,13 @@
$.alert("权值总和 不能大于 1");
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2)));
return;
}
}
*/
id_kpiWeightTd_value
=
parseFloat
(
id_kpiWeightTd_value
.
toFixed
(
2
));
id_kpiWeightTd_value
=
1
;
var
kpiId_Name
=
getkpiid_NameOfNamedimKpiCheck
();
for
(
var
i
=
0
;
i
<
kpiId_Name
.
length
;
i
++
){
var
id_name
=
kpiId_Name
[
i
];
var
addRow
=
$
(
"<tr class='"
+
id_name
.
split
(
"_"
)[
0
]
+
"' id='dimKpiCheck_"
+
id_name
.
split
(
"_"
)[
0
]
+
"'><td>"
+
id_name
.
split
(
"_"
)[
1
].
split
(
" "
)[
0
]
+
"</td><td
>"
+
id_kpiWeightTd_value
+
"</td><td><a href='javascript:;' onclick='deleteRow(this)'>删除</a> <a href='javascript:;' onclick='updateRow(this)'>修改</a></td></tr>"
);
var
addRow
=
$
(
"<tr class='"
+
id_name
.
split
(
"_"
)[
0
]
+
"' id='dimKpiCheck_"
+
id_name
.
split
(
"_"
)[
0
]
+
"'><td>"
+
id_name
.
split
(
"_"
)[
1
].
split
(
" "
)[
0
]
+
"</td><td
style='display: none'>"
+
id_kpiWeightTd_value
+
"</td><td><a href='javascript:;' onclick='deleteRow(this)'>删除</a> </td></tr>"
);
//
<
a
href
=
'javascript:;'
onclick
=
'updateRow(this)'
>
修改
<
/a
>
$
(
"#addTr"
).
append
(
addRow
);
$
(
"input[name='dimKpiCheck']"
).
each
(
function
(
e
)
{
if
(
$
(
this
).
attr
(
"checked"
))
{
...
...
@@ -762,8 +761,8 @@
}
});
}
sumkpiWeightTdVal
=
curm01
+
Number
(
sumkpiWeightTdVal
);
$
(
"#kpiWeightTd"
).
val
(
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
))
===
0
?
''
:
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
/*
sumkpiWeightTdVal=curm01+Number(sumkpiWeightTdVal);
$("#kpiWeightTd").val(parseFloat((1-sumkpiWeightTdVal).toFixed(2))===0?'':parseFloat((1-sumkpiWeightTdVal).toFixed(2)));
*/
});
...
...
@@ -786,6 +785,7 @@
var
val
=
$
(
"#kpiWeightTd"
).
val
();
return
parseFloat
(
val
);
}
$
(
"#modelReset"
).
click
(
function
(){
window
.
location
.
reload
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment