Toggle navigation
Toggle navigation
This project
Loading...
Sign in
monitor_v3
/
hg-monitor-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
袁晋鹏
3 years ago
Commit
edc2e8783e523614fdfbaad50fde3ac7e9c1f67a
1 parent
f5930902
优化运算符不等于和不包含
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
9 deletions
hg-monitor-web-base/src/main/resources/static/src/controller/alarmpolicyAdd.js
hg-monitor-web-base/src/main/resources/static/src/controller/alarmpolicyAdd.js
View file @
edc2e87
...
...
@@ -673,7 +673,7 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist','tabl
return
false
;
}
var
policyFlag
=
$
(
this
).
data
(
"flag"
);
var
conOjb
=
{
"0"
:
">"
,
"1"
:
"<"
,
"2"
:
"="
,
"3"
:
">="
,
"4"
:
"<="
,
"5"
:
"!="
,
"6"
:
"equals"
,
"7"
:
"!
equals"
,
"8"
:
"contains"
,
"9"
:
"startsWith"
,
"10"
:
"endsWith"
,
"11"
:
"!
contains"
};
var
conOjb
=
{
"0"
:
">"
,
"1"
:
"<"
,
"2"
:
"="
,
"3"
:
">="
,
"4"
:
"<="
,
"5"
:
"!="
,
"6"
:
"equals"
,
"7"
:
"!
,equals"
,
"8"
:
"contains"
,
"9"
:
"startsWith"
,
"10"
:
"endsWith"
,
"11"
:
"!,
contains"
};
var
doms
=
$
(
`
[
id
^=
$
{
policyFlag
}
-
policy
-
box
]
`
);
var
policyStr
=
''
;
var
relationobj
=
{
"1"
:
0
,
"3"
:
1
,
"5"
:
2
,
"7"
:
3
,
"9"
:
4
,
"11"
:
5
,
"13"
:
6
,
"15"
:
7
,
"17"
:
8
,
"19"
:
9
,
"21"
:
10
}
...
...
@@ -713,8 +713,11 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist','tabl
seriouspolicyItems
.
push
(
itemObj
);
if
(
conditon
<
5
)
{
//数字类的
policyStr
+=
`
Double
.
parseDouble
([
$
{
kpiId
},
kpiValue
])
$
{
conOjb
[
conditon
]}
$
{
conval
}
`
;
}
else
{
//字符串类的
}
else
if
(
conditon
==
7
||
conditon
==
11
)
{
//字符串类的
policyStr
+=
`
!
[
$
{
kpiId
},
kpiValue
]
$
{
conOjb
[
conditon
].
split
(
","
)[
1
]}(
"${conval}"
)
`
;
}
else
{
policyStr
+=
`
[
$
{
kpiId
},
kpiValue
]
$
{
conOjb
[
conditon
]}(
"${conval}"
)
`
;
}
}
else
{
var
itemObj
=
{
...
...
@@ -725,13 +728,16 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist','tabl
'operatorValue'
:
conval
,
"relationSymbol"
:
''
,
"isTermOver"
:
0
,
"sort"
:
i
-
1
,
"sort"
:
j
,
"policyFlag"
:
policyFlag
}
seriouspolicyItems
.
push
(
itemObj
);
if
(
conditon
<
5
)
{
policyStr
+=
`
[
$
{
param
}]
$
{
conOjb
[
conditon
]}
"${conval}"
`
;
}
else
{
}
else
if
(
conditon
==
7
||
conditon
==
11
)
{
//字符串类的
policyStr
+=
`
!
[
$
{
param
}]
$
{
conOjb
[
conditon
].
split
(
","
)[
1
]}(
"${conval}"
)
`
;
}
else
{
policyStr
+=
`
[
$
{
param
}]
$
{
conOjb
[
conditon
]}(
"${conval}"
)
`
;
}
...
...
@@ -775,7 +781,9 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist','tabl
importantpolicyItems
.
push
(
itemObj
);
if
(
conditon
<
5
)
{
//数字类的
policyStr
+=
`
Double
.
parseDouble
([
$
{
kpiId
},
kpiValue
])
$
{
conOjb
[
conditon
]}
$
{
conval
}
`
;
}
else
{
//字符串类的
}
else
if
(
conditon
==
7
||
conditon
==
11
)
{
//字符串类的
policyStr
+=
`
!
[
$
{
kpiId
},
kpiValue
]
$
{
conOjb
[
conditon
].
split
(
","
)[
1
]}(
"${conval}"
)
`
;
}
else
{
//字符串类的
policyStr
+=
`
[
$
{
kpiId
},
kpiValue
]
$
{
conOjb
[
conditon
]}(
"${conval}"
)
`
;
}
}
else
{
...
...
@@ -787,13 +795,16 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist','tabl
'operatorValue'
:
conval
,
"relationSymbol"
:
''
,
"isTermOver"
:
0
,
"sort"
:
i
-
1
,
"sort"
:
j
,
"policyFlag"
:
policyFlag
}
importantpolicyItems
.
push
(
itemObj
);
if
(
conditon
<
5
)
{
policyStr
+=
`
[
$
{
param
}]
$
{
conOjb
[
conditon
]}
"${conval}"
`
;
}
else
{
}
else
if
(
conditon
==
7
||
conditon
==
11
)
{
//字符串类的
policyStr
+=
`
!
[
$
{
param
}]
$
{
conOjb
[
conditon
].
split
(
","
)[
1
]}(
"${conval}"
)
`
;
}
else
{
policyStr
+=
`
[
$
{
param
}]
$
{
conOjb
[
conditon
]}(
"${conval}"
)
`
;
}
...
...
@@ -838,6 +849,8 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist','tabl
commonlypolicyItems
.
push
(
itemObj
);
if
(
conditon
<
5
)
{
//数字类的
policyStr
+=
`
Double
.
parseDouble
([
$
{
kpiId
},
kpiValue
])
$
{
conOjb
[
conditon
]}
$
{
conval
}
`
;
}
else
if
(
conditon
==
7
||
conditon
==
11
)
{
//字符串类的
policyStr
+=
`
!
[
$
{
kpiId
},
kpiValue
]
$
{
conOjb
[
conditon
].
split
(
","
)[
1
]}(
"${conval}"
)
`
;
}
else
{
//字符串类的
policyStr
+=
`
[
$
{
kpiId
},
kpiValue
]
$
{
conOjb
[
conditon
]}(
"${conval}"
)
`
;
}
...
...
@@ -850,13 +863,15 @@ layui.define(['form', 'admin', 'laydate', 'common','sessions','reskpilist','tabl
'operatorValue'
:
conval
,
"relationSymbol"
:
''
,
"isTermOver"
:
0
,
"sort"
:
i
-
1
,
"sort"
:
j
,
"policyFlag"
:
policyFlag
}
commonlypolicyItems
.
push
(
itemObj
);
if
(
conditon
<
5
)
{
policyStr
+=
`
[
$
{
param
}]
$
{
conOjb
[
conditon
]}
"${conval}"
`
;
}
else
{
}
else
if
(
conditon
==
7
||
conditon
==
11
)
{
//字符串类的
policyStr
+=
`
!
[
$
{
param
}]
$
{
conOjb
[
conditon
].
split
(
","
)[
1
]}(
"${conval}"
)
`
;
}
else
{
policyStr
+=
`
[
$
{
param
}]
$
{
conOjb
[
conditon
]}(
"${conval}"
)
`
;
}
...
...
Please
register
or
login
to post a comment