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
38b6a97b
Commit
38b6a97b
authored
Dec 12, 2017
by
莫林毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监控运营 ->关联告警诊断 ->关联诊断配置 ->'修改&创建关联配置' 界面
解决'批量修改参数 权值和出异常'bug
parent
3cdadcb8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
8 deletions
+33
-8
CreateDiagosis.jsp
.../webapp/WEB-INF/views/MonitorOperation/CreateDiagosis.jsp
+24
-3
UpdateAnaInfo.jsp
...n/webapp/WEB-INF/views/MonitorOperation/UpdateAnaInfo.jsp
+9
-5
No files found.
src/main/webapp/WEB-INF/views/MonitorOperation/CreateDiagosis.jsp
View file @
38b6a97b
...
@@ -376,7 +376,8 @@
...
@@ -376,7 +376,8 @@
//form表单提交
//form表单提交
$
(
"#modelSubmit"
).
click
(
function
(){
$
(
"#modelSubmit"
).
click
(
function
(){
sumkpiWeightTdVal
=
sumkpiWeightTdVal
.
toFixed
(
2
);
//sumkpiWeightTdVal=sumkpiWeightTdVal.toFixed(2);
sumkpiWeightTdVal
=
parseFloat
(
2
);
if
(
sumkpiWeightTdVal
<
1.00
){
if
(
sumkpiWeightTdVal
<
1.00
){
$
.
alert
(
"权限总和需 为 1"
);
$
.
alert
(
"权限总和需 为 1"
);
return
;
return
;
...
@@ -668,15 +669,25 @@
...
@@ -668,15 +669,25 @@
}
}
if
(
kpiWeightTdVal
<
0
){
if
(
kpiWeightTdVal
<
0
){
$
.
alert
(
"权重不能为负"
);
$
.
alert
(
"权重不能为负"
);
var
mmm
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
$
.
alert
(
mmm
);
$
(
"#kpiWeightTd"
).
val
(
mmm
);
return
;
return
;
}
}
if
(
kpiWeightTdVal
>
1.00
){
if
(
kpiWeightTdVal
>
1.00
){
$
.
alert
(
"权重超值 1"
);
$
.
alert
(
"权重超值 1"
);
return
;
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
){
if
(
k
>
1.00
){
$
.
alert
(
"权重和 超值 1"
);
$
.
alert
(
"权重和 超值 1"
);
var
mm
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
$
(
"#kpiWeightTd"
).
val
(
mm
);
return
;
return
;
}
}
// 勾选指标 的 名称 和 value
// 勾选指标 的 名称 和 value
...
@@ -701,7 +712,8 @@
...
@@ -701,7 +712,8 @@
}
}
});
});
sumkpiWeightTdVal
+=
Number
(
kpiWeightTdVal
);
//sumkpiWeightTdVal+=Number(kpiWeightTdVal);
sumkpiWeightTdVal
+=
tt
;
var
maxV
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
var
maxV
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
$
(
"#kpiWeightTd"
).
val
(
maxV
);
$
(
"#kpiWeightTd"
).
val
(
maxV
);
//$("#kpiWeightTd").attr("max",maxV);
//$("#kpiWeightTd").attr("max",maxV);
...
@@ -718,6 +730,15 @@
...
@@ -718,6 +730,15 @@
return
anainfoShallSaveArr
;
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_名称
// 获取勾选指标的 数据 格式 id_名称
function
getArrDimKpiidAndNameChecked
(){
function
getArrDimKpiidAndNameChecked
(){
var
arrDimKpiChecked
=
[];
var
arrDimKpiChecked
=
[];
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/UpdateAnaInfo.jsp
View file @
38b6a97b
...
@@ -351,7 +351,6 @@
...
@@ -351,7 +351,6 @@
$
.
alert
(
"权值总和必须为1"
);
$
.
alert
(
"权值总和必须为1"
);
return
;
return
;
}
}
return
;
var
kpiId_weight
=
getkpiIDAndWeightShallSave
();
var
kpiId_weight
=
getkpiIDAndWeightShallSave
();
var
associationId
=
$
(
"#associationId"
).
val
();
var
associationId
=
$
(
"#associationId"
).
val
();
...
@@ -748,8 +747,14 @@
...
@@ -748,8 +747,14 @@
$
(
"#kpiWeightTd"
).
val
(
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
$
(
"#kpiWeightTd"
).
val
(
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
return
;
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"
);
$
.
alert
(
"权值总和 不能大于 1"
);
$
(
"#kpiWeightTd"
).
val
(
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
$
(
"#kpiWeightTd"
).
val
(
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
return
;
return
;
...
@@ -768,10 +773,9 @@
...
@@ -768,10 +773,9 @@
}
}
});
});
}
}
sumkpiWeightTdVal
=
Number
(
id_kpiWeightTd_value
)
+
Number
(
sumkpiWeightTdVal
);
sumkpiWeightTdVal
=
curm01
+
Number
(
sumkpiWeightTdVal
);
$
(
"#kpiWeightTd"
).
val
(
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
$
(
"#kpiWeightTd"
).
val
(
parseFloat
((
1
-
sumkpiWeightTdVal
).
toFixed
(
2
)));
});
});
function
getkpiIDAndWeightShallSave
(){
function
getkpiIDAndWeightShallSave
(){
...
...
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