Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
binhai-video
Project
Project
Details
Activity
Releases
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
binhai-jiaoguan
binhai-video
Commits
91a221d4
Commit
91a221d4
authored
Nov 17, 2023
by
刘怀志
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将取值为null或者undefined的字段剔除不传到后台
parent
6cffda67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
17 deletions
+23
-17
request.js
src/utils/request.js
+13
-1
networkTopology.vue
...ligentOperationMaintenance/components/networkTopology.vue
+10
-16
No files found.
src/utils/request.js
View file @
91a221d4
...
...
@@ -47,6 +47,12 @@ service.interceptors.request.use(config => {
var
resultEncryptFlag
=
secret
.
checkResultEncryptAble
()
// get请求映射params参数
if
(
config
.
method
===
'get'
&&
config
.
params
)
{
// 将取值为null或者undefined的字段剔除不传到后台
for
(
let
key
in
config
.
params
)
{
if
(
config
.
params
[
key
]
==
undefined
||
config
.
params
[
key
]
==
null
){
delete
config
.
params
[
key
]
}
}
console
.
log
(
'加密前参数get'
,
config
.
params
)
if
(
paramEncryptFlag
&&
config
.
params
)
{
config
.
headers
[
'Product'
]
=
'Advanced'
...
...
@@ -89,8 +95,14 @@ service.interceptors.request.use(config => {
}
}
console
.
log
(
'加密前参数post'
,
config
.
data
)
if
(
paramEncryptFlag
&&
config
.
data
)
{
// 将取值为null或者undefined的字段剔除不传到后台
for
(
let
key
in
config
.
params
)
{
if
(
config
.
params
[
key
]
==
undefined
||
config
.
params
[
key
]
==
null
){
delete
config
.
params
[
key
]
}
}
console
.
log
(
'加密前参数post'
,
config
.
data
)
config
.
data
=
secret
.
encrypt
(
config
.
data
)
}
return
config
...
...
src/views/intelligentOperationMaintenance/components/networkTopology.vue
View file @
91a221d4
<
template
>
<div
class=
"app-container"
>
<el-form
v-show=
"showSearch"
ref=
"queryForm"
:model=
"queryParams"
size=
"small"
:inline=
"true"
label-width=
"88px"
>
<el-form-item
label=
"链路带宽"
prop=
"linkBandwidth"
>
<el-form-item
label=
"链路带宽"
prop=
"linkBandwidth
Param
"
>
<el-select
v-model=
"queryParams.linkBandwidth"
v-model=
"queryParams.linkBandwidth
Param
"
clearable
placeholder=
"请选链路带宽"
style=
"width: 100%"
...
...
@@ -133,15 +133,8 @@ export default {
queryParams
:
{
pageNum
:
1
,
pageSize
:
10
,
userId
:
null
,
deviceId
:
null
,
deviceName
:
null
,
leftIp
:
null
,
rightIp
:
null
,
linkBandwidth
:
null
,
bandwidthUtilizationString
:
null
,
packetLossRate
:
null
,
linkType
:
null
linkBandwidthParam
:
''
,
bandwidthUtilizationString
:
''
},
// 表单参数
form
:
{},
...
...
@@ -164,9 +157,11 @@ export default {
getList
()
{
this
.
loading
=
true
const
temp
=
{
...
this
.
queryParams
,
maxBandwidthUtil
:
this
.
queryParams
.
bandwidthUtilizationString
?
this
.
queryParams
.
bandwidthUtilizationString
.
split
(
','
)[
1
]
:
null
,
minBandwidthUtil
:
this
.
queryParams
.
bandwidthUtilizationString
?
this
.
queryParams
.
bandwidthUtilizationString
.
split
(
','
)[
0
]
:
null
...
this
.
queryParams
}
if
(
this
.
queryParams
.
bandwidthUtilizationString
)
{
temp
[
'maxBandwidthUtil'
]
=
this
.
queryParams
.
bandwidthUtilizationString
.
split
(
','
)[
1
]
temp
[
'minBandwidthUtil'
]
=
this
.
queryParams
.
bandwidthUtilizationString
.
split
(
','
)[
0
]
}
listTopology
(
temp
).
then
(
response
=>
{
this
.
topologyList
=
response
.
rows
...
...
@@ -188,9 +183,8 @@ export default {
deviceName
:
null
,
leftIp
:
null
,
rightIp
:
null
,
linkBandwidth
:
null
,
linkBandwidth
Param
:
null
,
bandwidthUtilizationString
:
null
,
packetLossRate
:
null
,
linkType
:
null
,
createBy
:
null
,
createTime
:
null
,
...
...
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