Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
05139b39
Commit
05139b39
authored
Aug 27, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增IP白名单页面
parent
f46e37c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
273 additions
and
0 deletions
+273
-0
IPManager.vue
src/components/systemManagement/IPManager.vue
+265
-0
config.js
src/router/config.js
+8
-0
No files found.
src/components/systemManagement/IPManager.vue
0 → 100644
View file @
05139b39
<
style
>
.startCityMG
.query_box
{
font-size
:
12px
;
padding
:
29px
0
;
padding-right
:
30px
;
display
:
flex
;
justify-content
:
space-between
;
}
.startCityMG
.query_box
label
{
display
:
inline-block
;
margin-right
:
25px
;
width
:
80px
;
text-align
:
right
;
}
.startCityMG
.addCompany
{
width
:
440px
;
max-height
:
600px
;
}
.startCityMG
.addCompany
.el-dialog__body
{
padding-bottom
:
0
;
}
.startCityMG
.el-switch.is-checked
.el-switch__core
{
border-color
:
#4bca81
;
background-color
:
#4bca81
;
}
.noData
{
text-align
:
center
;
padding
:
20px
;
}
.startCityMG
.city_box
{
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
}
.startCityMG
.city_box
.el-input
{
width
:
88%
;
}
.startCityMG
.city_box
.el-input
input
{
width
:
100%
;
}
.startCityMG
.query_box
li
label
{
display
:
inline-block
;
min-width
:
80px
;
text-align
:
right
;
font-style
:
normal
;
margin
:
0
20px
0
0
;
}
</
style
>
<
template
>
<div
class=
"flexOne startCityMG"
>
<div
class=
"query-box"
>
<ul>
<li>
<span>
<em>
域名/IP
</em>
<el-input
v-model=
"msg.Name"
placeholder=
"域名/IP"
@
keyup
.
enter
.
native=
"getList"
class=
"w210"
>
</el-input>
</span>
</li>
<li>
<span>
<em>
白名单IP
</em>
<el-input
v-model=
"msg.IPAddress"
placeholder=
"白名单IP"
@
keyup
.
enter
.
native=
"getList"
class=
"w210"
></el-input>
</span>
</li>
<li>
<input
type=
"button"
class=
"hollowFixedBtn"
value=
"查询"
@
click=
"resetPageIndex(),getList()"
/>
<input
type=
"button"
class=
"normalBtn"
value=
"新增"
@
click=
"outerVisible = true,dialogTitle='新增出发城市'"
/>
</li>
</ul>
</div>
<table
class=
"singeRowTable"
border=
"0"
cellspacing=
"0"
cellpadding=
"0"
v-loading=
"loading"
>
<tr>
<th
width=
""
>
编号
</th>
<th
width=
""
>
域名/Ip
</th>
<th>
白名单
</th>
<th
width=
"200"
>
{{
$t
(
'system.table_operation'
)
}}
</th>
</tr>
<tr
v-for=
"(item,index) in DataList"
>
<td>
{{
item
.
Id
}}
</td>
<td>
{{
item
.
Name
}}
</td>
<td>
{{
item
.
IPAddress
}}
</td>
<td
style=
"position: relative;"
>
<el-row>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('system.table_edit')"
placement=
"top-start"
>
<el-button
type=
"primary"
icon=
"el-icon-edit"
circle
@
click=
"outerVisible = true,dialogTitle='修改出发城市',updateData(item.Id)"
></el-button>
</el-tooltip>
<el-tooltip
class=
"item"
effect=
"dark"
:content=
"$t('system.table_delete')"
placement=
"top-start"
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
circle
@
click=
"deleteStartCity(item.Id)"
></el-button>
</el-tooltip>
</el-row>
</td>
</tr>
</table>
<div
class=
"noData"
v-show=
"noData"
>
{{
$t
(
'system.content_noData'
)
}}
</div>
<el-pagination
background
@
current-change=
"handleCurrentChange"
:current-page
.
sync=
"currentPage"
layout=
"total,prev, pager, next, jumper"
:page-size=
"msg.pageSize"
:total=
"total"
>
</el-pagination>
<el-dialog
custom-class=
'addCompany'
:title=
"dialogTitle"
:visible
.
sync=
"outerVisible"
center
:before-close=
"closeChangeMachie"
>
<el-form
label-width=
"100px"
>
<el-form-item
label=
"域名/IP"
>
<el-input
type=
"text"
v-model=
"addMsg.Name"
placeholder=
"域名/IP"
class=
"w210"
></el-input>
</el-form-item>
<el-form-item
label=
"IP地址"
>
<el-input
type=
"text"
v-model=
"addMsg.IPAddress"
placeholder=
"IP地址"
class=
"w210"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<button
class=
"normalBtn"
type=
"primary"
@
click=
"submitForm('addMsg')"
>
{{
$t
(
'pub.saveBtn'
)
}}
</button>
<button
class=
"hollowFixedBtn"
@
click=
"outerVisible = false,resetForm('addMsg')"
>
{{
$t
(
'pub.cancelBtn'
)
}}
</button>
</div>
</el-dialog>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
startCityList
:
[],
BranchGetList
:
[],
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
Name
:
""
,
IPAddress
:
""
},
addMsg
:
{
Id
:
0
,
Name
:
""
,
IPAddress
:
""
},
DataList
:
[],
countryList
:
[],
provinceList
:
[],
cityList
:
[],
loading
:
true
,
total
:
0
,
currentPage
:
1
,
outerVisible
:
false
,
noData
:
false
,
dialogTitle
:
""
,
};
},
methods
:
{
getList
()
{
//获取数据分页
this
.
loading
=
true
;
this
.
apipost
(
"ipmanager_get_GetPageList"
,
this
.
msg
,
res
=>
{
this
.
loading
=
false
;
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
total
=
res
.
data
.
data
.
count
;
this
.
DataList
=
res
.
data
.
data
.
pageData
;
this
.
noData
=
!
this
.
total
>
0
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
addIpManager
()
{
//新增出发城市
this
.
apipost
(
"ipmanager_post_Set"
,
this
.
addMsg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
Success
(
"保存成功!"
);
this
.
getList
();
this
.
outerVisible
=
false
;
this
.
resetForm
(
"addMsg"
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{}
);
},
updateData
(
ID
)
{
//修改
let
msg
=
{
Id
:
ID
};
this
.
apipost
(
"ipmanager_get_Get"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
addMsg
=
res
.
data
.
data
;
}
},
err
=>
{}
);
},
//删除
deleteStartCity
(
ID
)
{
var
that
=
this
;
this
.
Confirm
(
"是否删除?"
,
function
()
{
var
msg
=
{
Id
:
ID
};
that
.
apipost
(
"ipmanager_post_Remove"
,
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
"删除成功"
);
that
.
getList
();
}
},
null
);
});
},
handleCurrentChange
(
val
)
{
//翻页功能按钮
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
submitForm
(
addMsg
)
{
//提交创建、修改表单
let
that
=
this
;
that
.
addIpManager
();
},
initAddMsg
()
{
this
.
addMsg
.
Id
=
0
;
this
.
addMsg
.
Name
=
""
;
this
.
addMsg
.
IPAddress
=
""
;
},
resetPageIndex
()
{
//查询初始化页码
this
.
msg
.
pageIndex
=
1
;
this
.
currentPage
=
1
;
},
closeChangeMachie
(
done
)
{
this
.
initAddMsg
();
},
resetForm
(
formName
)
{
this
.
initAddMsg
();
}
},
mounted
()
{
this
.
getList
();
}
};
</
script
>
\ No newline at end of file
src/router/config.js
View file @
05139b39
...
...
@@ -938,6 +938,14 @@ export default {
title
:
'出发城市管理'
},
},
{
path
:
'/IPManager'
,
//IP白名单管理
name
:
'IPManager'
,
component
:
resolve
=>
require
([
'@/components/systemManagement/IPManager'
],
resolve
),
meta
:
{
title
:
'IP白名单管理'
},
},
{
path
:
'/airlineManagement'
,
//航空公司管理
name
:
'airlineManagement'
,
...
...
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