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
1c6e4772
Commit
1c6e4772
authored
Dec 13, 2017
by
胡斌
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/moly'
parents
6e3f9d96
898d58ea
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
10 deletions
+36
-10
CreateDiagosis.jsp
.../webapp/WEB-INF/views/MonitorOperation/CreateDiagosis.jsp
+26
-4
UpdateAnaInfo.jsp
...n/webapp/WEB-INF/views/MonitorOperation/UpdateAnaInfo.jsp
+10
-6
No files found.
src/main/webapp/WEB-INF/views/MonitorOperation/CreateDiagosis.jsp
View file @
1c6e4772
...
...
@@ -166,7 +166,7 @@
<tr>
<td>
权重(
<font
color=
"red"
>
必填
</font>
):
</td>
<td><input
type=
"number"
class=
"form-control"
name=
"descTd"
id=
"kpiWeightTd"
value=
"1.00"
style=
"display: inline;"
/>
<td><input
type=
"number"
step=
"0.01"
class=
"form-control"
name=
"descTd"
id=
"kpiWeightTd"
value=
"1.00"
style=
"display: inline;"
/>
<span
id=
"writeWarningInfTd"
style=
"color:red;display: inline;padding-left:10px;"
></span></td>
</tr>
...
...
@@ -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,26 @@
}
if
(
kpiWeightTdVal
<
0
){
$
.
alert
(
"权重不能为负"
);
var
mmm
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
$
(
"#kpiWeightTd"
).
val
(
mmm
);
return
;
}
if
(
kpiWeightTdVal
>
1.00
){
$
.
alert
(
"权重超值 1"
);
var
mmmm
=
(
1
-
Number
(
sumkpiWeightTdVal
)).
toFixed
(
2
);
$
(
"#kpiWeightTd"
).
val
(
mmmm
);
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 +713,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 +731,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
=
[];
...
...
src/main/webapp/WEB-INF/views/MonitorOperation/UpdateAnaInfo.jsp
View file @
1c6e4772
...
...
@@ -208,7 +208,7 @@
</tr>
<tr
id=
"tr_id_weight"
>
<td>
权重(
<font
color=
"red"
>
必填
</font>
):
</td>
<td><input
type=
"number"
class=
"form-control"
name=
"descTd"
id=
"kpiWeightTd"
style=
"display: inline;"
/>
<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>
</tr>
...
...
@@ -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
(){
...
...
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