Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
api-gateway
Overview
Overview
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
API
api-gateway
Commits
1d8513ee
Commit
1d8513ee
authored
Oct 23, 2019
by
无尘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改环境配置校验
parent
6ae80ec6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
13 deletions
+22
-13
index.html
dist/index.html
+2
-2
app.45caf9a7e415f5be71c428b5fac243ea.css
dist/static/css/app.45caf9a7e415f5be71c428b5fac243ea.css
+0
-0
20.2d4182c658605d675867.js
dist/static/js/20.2d4182c658605d675867.js
+2
-0
20.fbee988040820ff30dfa.js
dist/static/js/20.fbee988040820ff30dfa.js
+0
-2
manifest.82d7809acab5e96549ac.js
dist/static/js/manifest.82d7809acab5e96549ac.js
+2
-2
createEnvSet.vue
src/views/index/createEnvSet.vue
+16
-7
No files found.
dist/index.html
View file @
1d8513ee
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><link
rel=
"shortcut icon"
href=
./favicon.ico
><title>
API网关管理平台
</title><link
href=
./static/css/app.41352e334b1e8e1f692170a64db3325c.css
rel=
stylesheet
></head><body
style=
"min-width: 1400px;"
><div
id=
app
></div><script
src=
//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js
></script><script>
// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();
</script><script
src=
//web-1251519181.file.myqcloud.com/components/input.2.0.15.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/delete.2.0.01.js
></script><script
type=
text/javascript
src=
./static/js/manifest.a80ae78fe14fae606c1f.js
></script><script
type=
text/javascript
src=
./static/js/vendor.71dc162eb690bf6a36a0.js
></script><script
type=
text/javascript
src=
./static/js/app.49b33f10c1f62207e977.js
></script></body></html>
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><link
rel=
"shortcut icon"
href=
./favicon.ico
><title>
API网关管理平台
</title><link
href=
./static/css/app.45caf9a7e415f5be71c428b5fac243ea.css
rel=
stylesheet
></head><body
style=
"min-width: 1400px;"
><div
id=
app
></div><script
src=
//web-1251519181.file.myqcloud.com/lib/vue/2.6.6/vue.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/img-preview.2.0.00.js
></script><script>
// Raven.config('https://3715a345910d4c768e7a1ec14619c2d5@sentry.io/1413672').install();
</script><script
src=
//web-1251519181.file.myqcloud.com/components/input.2.0.15.js
></script><script
src=
//web-1251519181.file.myqcloud.com/components/delete.2.0.01.js
></script><script
type=
text/javascript
src=
./static/js/manifest.82d7809acab5e96549ac.js
></script><script
type=
text/javascript
src=
./static/js/vendor.71dc162eb690bf6a36a0.js
></script><script
type=
text/javascript
src=
./static/js/app.49b33f10c1f62207e977.js
></script></body></html>
\ No newline at end of file
\ No newline at end of file
dist/static/css/app.4
1352e334b1e8e1f692170a64db3325c
.css
→
dist/static/css/app.4
5caf9a7e415f5be71c428b5fac243ea
.css
View file @
1d8513ee
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dist/static/js/20.2d4182c658605d675867.js
0 → 100644
View file @
1d8513ee
webpackJsonp
([
20
],{
OB28
:
function
(
e
,
t
){},
vm6Q
:
function
(
e
,
t
,
a
){
"use strict"
;
Object
.
defineProperty
(
t
,
"__esModule"
,{
value
:
!
0
});
var
o
=
a
(
"mvHQ"
),
r
=
a
.
n
(
o
),
n
=
a
(
"319J"
),
s
=
a
(
"l46T"
),
l
=
a
(
"Kkt8"
),
i
=
a
(
"P9l9"
),
c
=
a
(
"TUB1"
),
d
=
a
(
"LlAa"
),
u
=
{
name
:
"createEnvSet"
,
components
:{
navBread
:
n
.
a
,
limitInput
:
s
.
a
,
limitTextarea
:
l
.
a
},
data
:
function
(){
return
{
navPath
:[{
name
:
"环境管理"
,
path
:
"/envManage"
},{
name
:
"配置列表"
,
path
:
"/envManage?tabChildid=second"
},{
name
:
this
.
$route
.
query
.
backendProxyId
?
"show"
==
this
.
$route
.
query
.
envSetFlag
?
"查看配置"
:
"修改配置"
:
"新增配置"
,
path
:
""
}],
formData
:{
backendProxyId
:
this
.
$route
.
query
.
backendProxyId
||
""
,
proxyType
:
this
.
$route
.
query
.
proxyType
||
"0"
,
proxyCode
:
""
,
proxyName
:
""
,
description
:
""
,
envParams
:
""
},
rules
:{
proxyName
:[{
required
:
!
0
,
message
:
"请输入配置名称"
,
trigger
:
"blur"
}],
proxyCode
:[{
required
:
!
0
,
message
:
"请输入配置code"
,
trigger
:
"blur"
}]},
shoEnvFlag
:
!
1
,
tableData
:[{
sceneCode
:
""
,
proxyParams
:[{
balence
:
"random"
,
url
:
""
,
weight
:
""
,
zookeeperUrl
:
""
}]}],
envOptions
:[]}},
methods
:{
showEnvSet
:
function
(){
this
.
shoEnvFlag
=!
0
},
toDel
:
function
(
e
,
t
,
a
){
e
.
proxyParams
.
splice
(
a
,
1
)},
toAdd
:
function
(
e
,
t
,
a
){
e
.
proxyParams
.
push
({
balence
:
""
,
url
:
""
,
weight
:
""
,
zookeeperUrl
:
""
})},
handleDel
:
function
(
e
,
t
){
var
a
=
this
;
a
.
$confirm
(
"确定删除该环境?"
,
"提示"
,{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
(){
a
.
tableData
.
splice
(
e
,
1
)}).
catch
(
function
(){})},
toAddRow
:
function
(){
this
.
tableData
.
push
({
sceneCode
:
""
,
proxyParams
:[{
balence
:
""
,
url
:
""
,
weight
:
""
,
zookeeperUrl
:
""
}]})},
handleSave
:
function
(
e
){
var
t
=
this
;
t
.
formData
.
proxyName
=
String
(
t
.
formData
.
proxyName
).
replace
(
/
\s
+/g
,
""
),
t
.
formData
.
proxyCode
=
String
(
t
.
formData
.
proxyCode
).
replace
(
/
\s
+/g
,
""
),
t
.
$refs
[
e
].
validate
(
function
(
e
){
if
(
!
e
)
return
!
1
;
t
.
saveData
()})},
saveData
:
function
(){
var
e
=
this
,
t
=!
0
,
a
=!
0
,
o
=!
0
;
if
(
e
.
tableData
.
forEach
(
function
(
r
){
""
==
r
.
sceneCode
&&
(
t
=!
1
),
0
==
e
.
formData
.
proxyType
?
r
.
proxyParams
.
forEach
(
function
(
r
){
!
1
===
/
((
2
(
5
[
0-5
]
|
[
0-4
]\d))
|
[
0-1
]?\d{1,2})(\.((
2
(
5
[
0-5
]
|
[
0-4
]\d))
|
[
0-1
]?\d{1,2})){3}
/g
.
test
(
r
.
url
)
&&
(
o
=!
1
),
r
.
weight
<
1
e4
||
(
a
=!
1
),
""
!=
r
.
url
&&
""
!=
r
.
weight
||
(
t
=!
1
),
e
.
$delete
(
r
,
"zookeeperUrl"
)}):
r
.
proxyParams
.
forEach
(
function
(
a
){
""
==
a
.
zookeeperUrl
&&
(
t
=!
1
),
e
.
$delete
(
a
,
"balence"
),
e
.
$delete
(
a
,
"url"
),
e
.
$delete
(
a
,
"weight"
)})}),
!
t
)
return
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
"请完善环境配置"
}),
!
1
;
if
(
!
a
)
return
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
"请填写小于10000以内的权重值"
}),
!
1
;
if
(
!
o
)
return
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
"请填写正确的 IP 地址"
}),
!
1
;
var
n
=
{
backendProxyId
:
e
.
formData
.
backendProxyId
,
proxyType
:
e
.
formData
.
proxyType
,
proxyName
:
e
.
formData
.
proxyName
,
proxyCode
:
e
.
formData
.
proxyCode
,
description
:
e
.
formData
.
description
,
envParams
:
e
.
shoEnvFlag
?
r
()(
e
.
tableData
):
""
};
Object
(
i
.
b
)(
e
.
$route
.
query
.
backendProxyId
?
"/gateway-manage/update-proxy"
:
"/gateway-manage/create-proxy"
,
n
).
then
(
function
(
t
){
var
a
=
t
.
data
;
if
(
"0000"
==
a
.
code
)
return
c
.
a
.
showmsg
(
"保存成功"
,
"success"
),
void
e
.
$router
.
push
(
"/envManage?tabChildid=second"
);
d
.
a
.
errorMsg
(
a
)}).
catch
(
function
(
t
){
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
t
.
message
})})},
getEnvData
:
function
(){
var
e
=
this
;
Object
(
i
.
a
)(
"/gateway-manage/list-all-scene"
,{}).
then
(
function
(
t
){
var
a
=
t
.
data
;
"0000"
!=
a
.
code
?
d
.
a
.
errorMsg
(
a
):
e
.
envOptions
=
a
.
result
||
[]}).
catch
(
function
(
t
){
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
t
.
message
})})},
getData
:
function
(){
var
e
=
this
,
t
=
{
backendProxyId
:
e
.
formData
.
backendProxyId
};
Object
(
i
.
a
)(
"/gateway-manage/get-proxy"
,
t
).
then
(
function
(
t
){
var
a
=
t
.
data
;
if
(
"0000"
==
a
.
code
){
e
.
formData
=
a
.
result
;
var
o
=
JSON
.
parse
(
a
.
result
.
envParams
);
return
e
.
tableData
=
o
,
void
(
e
.
tableData
.
length
&&
(
e
.
shoEnvFlag
=!
0
))}
d
.
a
.
errorMsg
(
a
)}).
catch
(
function
(
t
){
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
t
.
message
})})}},
watch
:{
$route
:{
handler
:
function
(
e
,
t
){},
deep
:
!
0
}},
mounted
:
function
(){
this
.
$emit
(
"showTab"
,
3
),
this
.
getEnvData
(),
this
.
$route
.
query
.
backendProxyId
&&
this
.
getData
()}},
p
=
{
render
:
function
(){
var
e
=
this
,
t
=
e
.
$createElement
,
a
=
e
.
_self
.
_c
||
t
;
return
a
(
"div"
,{
staticClass
:
"api-body-content border-box"
},[
a
(
"div"
,{
staticClass
:
"common-nav"
},[
a
(
"nav-bread"
,{
attrs
:{
navPath
:
e
.
navPath
}})],
1
),
e
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"api-body-main common-body-main border-box"
},[
a
(
"div"
,{
staticClass
:
"api-main-content border-box"
},[
a
(
"div"
,{
staticClass
:
"base-set-wrap"
},[
a
(
"div"
,{
staticClass
:
"set-title font-14 color-303133"
},[
e
.
_v
(
"基础配置"
)]),
e
.
_v
(
" "
),
a
(
"el-form"
,{
ref
:
"envForm"
,
attrs
:{
model
:
e
.
formData
,
"label-width"
:
"94px"
,
rules
:
e
.
rules
}},[
a
(
"el-form-item"
,{
attrs
:{
label
:
"参数类型:"
}},[
e
.
_v
(
"
\
n "
+
e
.
_s
(
0
==
e
.
formData
.
proxyType
?
"http"
:
"dubbo"
)
+
"
\
n "
)]),
e
.
_v
(
" "
),
a
(
"el-form-item"
,{
attrs
:{
label
:
"配置名称:"
,
prop
:
"proxyName"
}},[
a
(
"limitInput"
,{
attrs
:{
inputWidth
:
440
,
inputValue
:
e
.
formData
.
proxyName
,
holder
:
"请输入配置名称"
,
getByType
:
"word"
,
maxLength
:
20
},
on
:{
"update:inputValue"
:
function
(
t
){
e
.
$set
(
e
.
formData
,
"proxyName"
,
t
)}}})],
1
),
e
.
_v
(
" "
),
a
(
"el-form-item"
,{
attrs
:{
label
:
"配置code:"
,
prop
:
"proxyCode"
}},[
a
(
"limitInput"
,{
attrs
:{
inputWidth
:
440
,
disflag
:
!!
e
.
formData
.
setId
,
inputValue
:
e
.
formData
.
proxyCode
,
holder
:
"请输入配置code"
,
getByType
:
"word"
,
maxLength
:
20
},
on
:{
"update:inputValue"
:
function
(
t
){
e
.
$set
(
e
.
formData
,
"proxyCode"
,
t
)}}})],
1
),
e
.
_v
(
" "
),
a
(
"el-form-item"
,{
attrs
:{
label
:
"备注:"
,
prop
:
"description"
}},[
a
(
"limit-textarea"
,{
attrs
:{
inputWidth
:
440
,
inputValue
:
e
.
formData
.
description
,
holder
:
"请输入备注内容"
,
getByType
:
"word"
,
maxLength
:
100
},
on
:{
"update:inputValue"
:
function
(
t
){
e
.
$set
(
e
.
formData
,
"description"
,
t
)}}})],
1
),
e
.
_v
(
" "
),
e
.
shoEnvFlag
?
e
.
_e
():
a
(
"el-form-item"
,{
attrs
:{
label
:
""
}},[
a
(
"div"
,{
staticClass
:
"show-set-env"
,
on
:{
click
:
e
.
showEnvSet
}},[
a
(
"span"
,{
staticClass
:
"font-14 color-5584FF"
},[
e
.
_v
(
"添加环境配置"
)]),
a
(
"i"
,{
staticClass
:
"iconfont iconxiala1 font-14 color-5584FF p-l-10"
})])])],
1
)],
1
),
e
.
_v
(
" "
),
e
.
shoEnvFlag
?
a
(
"div"
,{
staticClass
:
"env-set-wrap"
},[
a
(
"div"
,{
staticClass
:
"set-title font-14 color-303133"
},[
e
.
_v
(
"环境配置"
)]),
e
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"env-set-body"
},[
a
(
"el-table"
,{
staticStyle
:{
width
:
"100%"
},
attrs
:{
data
:
e
.
tableData
}},[
a
(
"el-table-column"
,{
attrs
:{
prop
:
"envName"
,
label
:
"配置名称"
,
"show-overflow-tooltip"
:
""
},
scopedSlots
:
e
.
_u
([{
key
:
"default"
,
fn
:
function
(
t
){
return
[
a
(
"el-select"
,{
attrs
:{
placeholder
:
"请选择"
},
model
:{
value
:
t
.
row
.
sceneCode
,
callback
:
function
(
a
){
e
.
$set
(
t
.
row
,
"sceneCode"
,
a
)},
expression
:
"scope.row.sceneCode"
}},
e
.
_l
(
e
.
envOptions
,
function
(
e
){
return
a
(
"el-option"
,{
key
:
e
.
sceneCode
,
attrs
:{
label
:
e
.
sceneName
,
value
:
e
.
sceneCode
}})}))]}}])}),
e
.
_v
(
" "
),
0
==
e
.
$route
.
query
.
proxyType
?
a
(
"el-table-column"
,{
attrs
:{
label
:
"IP地址"
,
width
:
"550px"
},
scopedSlots
:
e
.
_u
([{
key
:
"default"
,
fn
:
function
(
t
){
return
e
.
_l
(
t
.
row
.
proxyParams
,
function
(
o
,
r
){
return
a
(
"div"
,{
key
:
r
,
class
:[
"ip-cell "
,
0
==
r
?
""
:
"m-t-18"
]},[
a
(
"el-input"
,{
staticClass
:
"w-200 font-14"
,
attrs
:{
placeholder
:
"请输入ip地址"
},
model
:{
value
:
o
.
url
,
callback
:
function
(
t
){
e
.
$set
(
o
,
"url"
,
t
)},
expression
:
"item.url"
}}),
a
(
"el-input"
,{
staticClass
:
"w-200 font-14 m-l-10"
,
attrs
:{
placeholder
:
"请输入权重值"
},
model
:{
value
:
o
.
weight
,
callback
:
function
(
t
){
e
.
$set
(
o
,
"weight"
,
t
)},
expression
:
"item.weight"
}}),
e
.
_v
(
" "
),
t
.
row
.
proxyParams
.
length
>
1
&&
r
<
t
.
row
.
proxyParams
.
length
-
1
?
a
(
"i"
,{
staticClass
:
"inline-block vertical-middle pointer el-icon-minus font-14 p-l-10"
,
on
:{
click
:
function
(
a
){
e
.
toDel
(
t
.
row
,
t
.
$index
,
r
)}}}):
e
.
_e
(),
e
.
_v
(
" "
),
t
.
row
.
proxyParams
.
length
-
1
==
r
?
a
(
"i"
,{
staticClass
:
"inline-block vertical-middle pointer el-icon-plus font-14 p-l-10"
,
on
:{
click
:
function
(
a
){
e
.
toAdd
(
t
.
row
,
t
.
$index
,
r
)}}}):
e
.
_e
()],
1
)})}}])}):
e
.
_e
(),
e
.
_v
(
" "
),
1
==
e
.
$route
.
query
.
proxyType
?
a
(
"el-table-column"
,{
attrs
:{
label
:
"注册中心"
,
width
:
"550px"
},
scopedSlots
:
e
.
_u
([{
key
:
"default"
,
fn
:
function
(
t
){
return
e
.
_l
(
t
.
row
.
proxyParams
,
function
(
t
,
o
){
return
a
(
"div"
,{
key
:
o
,
class
:[
"ip-cell w-206"
,
0
==
o
?
""
:
"m-t-18"
]},[
a
(
"el-input"
,{
staticClass
:
"font-14"
,
attrs
:{
placeholder
:
""
},
model
:{
value
:
t
.
zookeeperUrl
,
callback
:
function
(
a
){
e
.
$set
(
t
,
"zookeeperUrl"
,
a
)},
expression
:
"item.zookeeperUrl"
}})],
1
)})}}])}):
e
.
_e
(),
e
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
label
:
"操作"
,
"show-overflow-tooltip"
:
""
},
scopedSlots
:
e
.
_u
([{
key
:
"default"
,
fn
:
function
(
t
){
return
[
e
.
tableData
.
length
>
1
?
a
(
"el-button"
,{
attrs
:{
type
:
"text"
},
on
:{
click
:
function
(
a
){
e
.
handleDel
(
t
.
$index
,
t
.
row
)}}},[
e
.
_v
(
"删除"
)]):
e
.
_e
()]}}])})],
1
)],
1
),
e
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"add-row text-center pointer"
,
on
:{
click
:
e
.
toAddRow
}},[
a
(
"i"
,{
staticClass
:
"el-icon-circle-plus-outline font-14 color-5584FF"
}),
a
(
"span"
,{
staticClass
:
"font-14 color-5584FF p-l-4"
},[
e
.
_v
(
"添加行"
)])])]):
e
.
_e
(),
e
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"save-wrap"
,
style
:{
"padding-left"
:
e
.
shoEnvFlag
?
"0"
:
"97px"
}},[
a
(
"el-button"
,{
attrs
:{
disabled
:
"show"
==
e
.
$route
.
query
.
envSetFlag
,
type
:
"primary"
},
on
:{
click
:
function
(
t
){
e
.
handleSave
(
"envForm"
)}}},[
e
.
_v
(
"保存"
)])],
1
)])])])},
staticRenderFns
:[]};
var
m
=
a
(
"VU/8"
)(
u
,
p
,
!
1
,
function
(
e
){
a
(
"OB28"
)},
"data-v-22bed44e"
,
null
);
t
.
default
=
m
.
exports
}});
\ No newline at end of file
dist/static/js/20.fbee988040820ff30dfa.js
deleted
100644 → 0
View file @
6ae80ec6
webpackJsonp
([
20
],{
thwS
:
function
(
e
,
t
){},
vm6Q
:
function
(
e
,
t
,
a
){
"use strict"
;
Object
.
defineProperty
(
t
,
"__esModule"
,{
value
:
!
0
});
var
o
=
a
(
"mvHQ"
),
r
=
a
.
n
(
o
),
n
=
a
(
"319J"
),
s
=
a
(
"l46T"
),
l
=
a
(
"Kkt8"
),
i
=
a
(
"P9l9"
),
c
=
a
(
"TUB1"
),
d
=
a
(
"LlAa"
),
u
=
{
name
:
"createEnvSet"
,
components
:{
navBread
:
n
.
a
,
limitInput
:
s
.
a
,
limitTextarea
:
l
.
a
},
data
:
function
(){
return
{
navPath
:[{
name
:
"环境管理"
,
path
:
"/envManage"
},{
name
:
"配置列表"
,
path
:
"/envManage?tabChildid=second"
},{
name
:
this
.
$route
.
query
.
backendProxyId
?
"show"
==
this
.
$route
.
query
.
envSetFlag
?
"查看配置"
:
"修改配置"
:
"新增配置"
,
path
:
""
}],
formData
:{
backendProxyId
:
this
.
$route
.
query
.
backendProxyId
||
""
,
proxyType
:
this
.
$route
.
query
.
proxyType
||
"0"
,
proxyCode
:
""
,
proxyName
:
""
,
description
:
""
,
envParams
:
""
},
rules
:{
proxyName
:[{
required
:
!
0
,
message
:
"请输入配置名称"
,
trigger
:
"blur"
}],
proxyCode
:[{
required
:
!
0
,
message
:
"请输入配置code"
,
trigger
:
"blur"
}]},
shoEnvFlag
:
!
1
,
tableData
:[{
sceneCode
:
""
,
proxyParams
:[{
balence
:
"random"
,
url
:
""
,
weight
:
""
,
zookeeperUrl
:
""
}]}],
envOptions
:[]}},
methods
:{
showEnvSet
:
function
(){
this
.
shoEnvFlag
=!
0
},
toDel
:
function
(
e
,
t
,
a
){
e
.
proxyParams
.
splice
(
a
,
1
)},
toAdd
:
function
(
e
,
t
,
a
){
e
.
proxyParams
.
push
({
balence
:
""
,
url
:
""
,
weight
:
""
,
zookeeperUrl
:
""
})},
handleDel
:
function
(
e
,
t
){
var
a
=
this
;
a
.
$confirm
(
"确定删除该环境?"
,
"提示"
,{
confirmButtonText
:
"确定"
,
cancelButtonText
:
"取消"
,
type
:
"warning"
}).
then
(
function
(){
a
.
tableData
.
splice
(
e
,
1
)}).
catch
(
function
(){})},
toAddRow
:
function
(){
this
.
tableData
.
push
({
sceneCode
:
""
,
proxyParams
:[{
balence
:
""
,
url
:
""
,
weight
:
""
,
zookeeperUrl
:
""
}]})},
handleSave
:
function
(
e
){
var
t
=
this
;
t
.
formData
.
proxyName
=
String
(
t
.
formData
.
proxyName
).
replace
(
/
\s
+/g
,
""
),
t
.
formData
.
proxyCode
=
String
(
t
.
formData
.
proxyCode
).
replace
(
/
\s
+/g
,
""
),
t
.
$refs
[
e
].
validate
(
function
(
e
){
if
(
!
e
)
return
!
1
;
t
.
saveData
()})},
saveData
:
function
(){
var
e
=
this
,
t
=!
0
,
a
=!
0
,
o
=!
0
,
n
=
/
((
2
(
5
[
0-5
]
|
[
0-4
]\d))
|
[
0-1
]?\d{1,2})(\.((
2
(
5
[
0-5
]
|
[
0-4
]\d))
|
[
0-1
]?\d{1,2})){3}
/g
;
if
(
e
.
tableData
.
forEach
(
function
(
r
){
""
==
r
.
sceneCode
&&
(
t
=!
1
),
0
==
e
.
formData
.
proxyType
?
r
.
proxyParams
.
forEach
(
function
(
r
){
o
=
n
.
test
(
r
.
url
),
a
=
r
.
weight
<
1
e6
,
t
=
""
!=
r
.
url
&&
""
!=
r
.
weight
,
e
.
$delete
(
r
,
"zookeeperUrl"
)}):
r
.
proxyParams
.
forEach
(
function
(
a
){
t
=
""
!=
a
.
zookeeperUrl
,
e
.
$delete
(
a
,
"balence"
),
e
.
$delete
(
a
,
"url"
),
e
.
$delete
(
a
,
"weight"
)})}),
!
t
)
return
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
"请完善环境配置"
}),
!
1
;
if
(
!
a
)
return
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
"请填写正确的权重值"
}),
!
1
;
if
(
!
o
)
return
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
"请填写正确的 IP 地址"
}),
!
1
;
var
s
=
{
backendProxyId
:
e
.
formData
.
backendProxyId
,
proxyType
:
e
.
formData
.
proxyType
,
proxyName
:
e
.
formData
.
proxyName
,
proxyCode
:
e
.
formData
.
proxyCode
,
description
:
e
.
formData
.
description
,
envParams
:
e
.
shoEnvFlag
?
r
()(
e
.
tableData
):
""
};
Object
(
i
.
b
)(
e
.
$route
.
query
.
backendProxyId
?
"/gateway-manage/update-proxy"
:
"/gateway-manage/create-proxy"
,
s
).
then
(
function
(
t
){
var
a
=
t
.
data
;
if
(
"0000"
==
a
.
code
)
return
c
.
a
.
showmsg
(
"保存成功"
,
"success"
),
void
e
.
$router
.
push
(
"/envManage?tabChildid=second"
);
d
.
a
.
errorMsg
(
a
)}).
catch
(
function
(
t
){
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
t
.
message
})})},
getEnvData
:
function
(){
var
e
=
this
;
Object
(
i
.
a
)(
"/gateway-manage/list-all-scene"
,{}).
then
(
function
(
t
){
var
a
=
t
.
data
;
"0000"
!=
a
.
code
?
d
.
a
.
errorMsg
(
a
):
e
.
envOptions
=
a
.
result
||
[]}).
catch
(
function
(
t
){
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
t
.
message
})})},
getData
:
function
(){
var
e
=
this
,
t
=
{
backendProxyId
:
e
.
formData
.
backendProxyId
};
Object
(
i
.
a
)(
"/gateway-manage/get-proxy"
,
t
).
then
(
function
(
t
){
var
a
=
t
.
data
;
if
(
"0000"
==
a
.
code
){
e
.
formData
=
a
.
result
;
var
o
=
JSON
.
parse
(
a
.
result
.
envParams
);
return
e
.
tableData
=
o
,
void
(
e
.
tableData
.
length
&&
(
e
.
shoEnvFlag
=!
0
))}
d
.
a
.
errorMsg
(
a
)}).
catch
(
function
(
t
){
e
.
$message
.
error
({
duration
:
1
e3
,
message
:
t
.
message
})})}},
watch
:{
$route
:{
handler
:
function
(
e
,
t
){},
deep
:
!
0
}},
mounted
:
function
(){
this
.
$emit
(
"showTab"
,
3
),
this
.
getEnvData
(),
this
.
$route
.
query
.
backendProxyId
&&
this
.
getData
()}},
p
=
{
render
:
function
(){
var
e
=
this
,
t
=
e
.
$createElement
,
a
=
e
.
_self
.
_c
||
t
;
return
a
(
"div"
,{
staticClass
:
"api-body-content border-box"
},[
a
(
"div"
,{
staticClass
:
"common-nav"
},[
a
(
"nav-bread"
,{
attrs
:{
navPath
:
e
.
navPath
}})],
1
),
e
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"api-body-main common-body-main border-box"
},[
a
(
"div"
,{
staticClass
:
"api-main-content border-box"
},[
a
(
"div"
,{
staticClass
:
"base-set-wrap"
},[
a
(
"div"
,{
staticClass
:
"set-title font-14 color-303133"
},[
e
.
_v
(
"基础配置"
)]),
e
.
_v
(
" "
),
a
(
"el-form"
,{
ref
:
"envForm"
,
attrs
:{
model
:
e
.
formData
,
"label-width"
:
"94px"
,
rules
:
e
.
rules
}},[
a
(
"el-form-item"
,{
attrs
:{
label
:
"参数类型:"
}},[
e
.
_v
(
"
\
n "
+
e
.
_s
(
0
==
e
.
formData
.
proxyType
?
"http"
:
"dubbo"
)
+
"
\
n "
)]),
e
.
_v
(
" "
),
a
(
"el-form-item"
,{
attrs
:{
label
:
"配置名称:"
,
prop
:
"proxyName"
}},[
a
(
"limitInput"
,{
attrs
:{
inputWidth
:
440
,
inputValue
:
e
.
formData
.
proxyName
,
holder
:
"请输入配置名称"
,
getByType
:
"word"
,
maxLength
:
20
},
on
:{
"update:inputValue"
:
function
(
t
){
e
.
$set
(
e
.
formData
,
"proxyName"
,
t
)}}})],
1
),
e
.
_v
(
" "
),
a
(
"el-form-item"
,{
attrs
:{
label
:
"配置code:"
,
prop
:
"proxyCode"
}},[
a
(
"limitInput"
,{
attrs
:{
inputWidth
:
440
,
disflag
:
!!
e
.
formData
.
setId
,
inputValue
:
e
.
formData
.
proxyCode
,
holder
:
"请输入配置code"
,
getByType
:
"word"
,
maxLength
:
20
},
on
:{
"update:inputValue"
:
function
(
t
){
e
.
$set
(
e
.
formData
,
"proxyCode"
,
t
)}}})],
1
),
e
.
_v
(
" "
),
a
(
"el-form-item"
,{
attrs
:{
label
:
"备注:"
,
prop
:
"description"
}},[
a
(
"limit-textarea"
,{
attrs
:{
inputWidth
:
440
,
inputValue
:
e
.
formData
.
description
,
holder
:
"请输入备注内容"
,
getByType
:
"word"
,
maxLength
:
100
},
on
:{
"update:inputValue"
:
function
(
t
){
e
.
$set
(
e
.
formData
,
"description"
,
t
)}}})],
1
),
e
.
_v
(
" "
),
e
.
shoEnvFlag
?
e
.
_e
():
a
(
"el-form-item"
,{
attrs
:{
label
:
""
}},[
a
(
"div"
,{
staticClass
:
"show-set-env"
,
on
:{
click
:
e
.
showEnvSet
}},[
a
(
"span"
,{
staticClass
:
"font-14 color-5584FF"
},[
e
.
_v
(
"添加环境配置"
)]),
a
(
"i"
,{
staticClass
:
"iconfont iconxiala1 font-14 color-5584FF p-l-10"
})])])],
1
)],
1
),
e
.
_v
(
" "
),
e
.
shoEnvFlag
?
a
(
"div"
,{
staticClass
:
"env-set-wrap"
},[
a
(
"div"
,{
staticClass
:
"set-title font-14 color-303133"
},[
e
.
_v
(
"环境配置"
)]),
e
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"env-set-body"
},[
a
(
"el-table"
,{
staticStyle
:{
width
:
"100%"
},
attrs
:{
data
:
e
.
tableData
}},[
a
(
"el-table-column"
,{
attrs
:{
prop
:
"envName"
,
label
:
"配置名称"
,
"show-overflow-tooltip"
:
""
},
scopedSlots
:
e
.
_u
([{
key
:
"default"
,
fn
:
function
(
t
){
return
[
a
(
"el-select"
,{
attrs
:{
placeholder
:
"请选择"
},
model
:{
value
:
t
.
row
.
sceneCode
,
callback
:
function
(
a
){
e
.
$set
(
t
.
row
,
"sceneCode"
,
a
)},
expression
:
"scope.row.sceneCode"
}},
e
.
_l
(
e
.
envOptions
,
function
(
e
){
return
a
(
"el-option"
,{
key
:
e
.
sceneCode
,
attrs
:{
label
:
e
.
sceneName
,
value
:
e
.
sceneCode
}})}))]}}])}),
e
.
_v
(
" "
),
0
==
e
.
$route
.
query
.
proxyType
?
a
(
"el-table-column"
,{
attrs
:{
label
:
"IP地址"
,
width
:
"550px"
},
scopedSlots
:
e
.
_u
([{
key
:
"default"
,
fn
:
function
(
t
){
return
e
.
_l
(
t
.
row
.
proxyParams
,
function
(
o
,
r
){
return
a
(
"div"
,{
key
:
r
,
class
:[
"ip-cell "
,
0
==
r
?
""
:
"m-t-18"
]},[
a
(
"el-input"
,{
staticClass
:
"w-200 font-14"
,
attrs
:{
placeholder
:
"请输入ip地址"
},
model
:{
value
:
o
.
url
,
callback
:
function
(
t
){
e
.
$set
(
o
,
"url"
,
t
)},
expression
:
"item.url"
}}),
a
(
"el-input"
,{
staticClass
:
"w-200 font-14 m-l-10"
,
attrs
:{
placeholder
:
"请输入权重值"
},
model
:{
value
:
o
.
weight
,
callback
:
function
(
t
){
e
.
$set
(
o
,
"weight"
,
t
)},
expression
:
"item.weight"
}}),
e
.
_v
(
" "
),
t
.
row
.
proxyParams
.
length
>
1
&&
r
<
t
.
row
.
proxyParams
.
length
-
1
?
a
(
"i"
,{
staticClass
:
"inline-block vertical-middle pointer el-icon-minus font-14 p-l-10"
,
on
:{
click
:
function
(
a
){
e
.
toDel
(
t
.
row
,
t
.
$index
,
r
)}}}):
e
.
_e
(),
e
.
_v
(
" "
),
t
.
row
.
proxyParams
.
length
-
1
==
r
?
a
(
"i"
,{
staticClass
:
"inline-block vertical-middle pointer el-icon-plus font-14 p-l-10"
,
on
:{
click
:
function
(
a
){
e
.
toAdd
(
t
.
row
,
t
.
$index
,
r
)}}}):
e
.
_e
()],
1
)})}}])}):
e
.
_e
(),
e
.
_v
(
" "
),
1
==
e
.
$route
.
query
.
proxyType
?
a
(
"el-table-column"
,{
attrs
:{
label
:
"注册中心"
,
width
:
"550px"
},
scopedSlots
:
e
.
_u
([{
key
:
"default"
,
fn
:
function
(
t
){
return
e
.
_l
(
t
.
row
.
proxyParams
,
function
(
t
,
o
){
return
a
(
"div"
,{
key
:
o
,
class
:[
"ip-cell w-206"
,
0
==
o
?
""
:
"m-t-18"
]},[
a
(
"el-input"
,{
staticClass
:
"font-14"
,
attrs
:{
placeholder
:
""
},
model
:{
value
:
t
.
zookeeperUrl
,
callback
:
function
(
a
){
e
.
$set
(
t
,
"zookeeperUrl"
,
a
)},
expression
:
"item.zookeeperUrl"
}})],
1
)})}}])}):
e
.
_e
(),
e
.
_v
(
" "
),
a
(
"el-table-column"
,{
attrs
:{
label
:
"操作"
,
"show-overflow-tooltip"
:
""
},
scopedSlots
:
e
.
_u
([{
key
:
"default"
,
fn
:
function
(
t
){
return
[
e
.
tableData
.
length
>
1
?
a
(
"el-button"
,{
attrs
:{
type
:
"text"
},
on
:{
click
:
function
(
a
){
e
.
handleDel
(
t
.
$index
,
t
.
row
)}}},[
e
.
_v
(
"删除"
)]):
e
.
_e
()]}}])})],
1
)],
1
),
e
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"add-row text-center pointer"
,
on
:{
click
:
e
.
toAddRow
}},[
a
(
"i"
,{
staticClass
:
"el-icon-circle-plus-outline font-14 color-5584FF"
}),
a
(
"span"
,{
staticClass
:
"font-14 color-5584FF p-l-4"
},[
e
.
_v
(
"添加行"
)])])]):
e
.
_e
(),
e
.
_v
(
" "
),
a
(
"div"
,{
staticClass
:
"save-wrap"
,
style
:{
"padding-left"
:
e
.
shoEnvFlag
?
"0"
:
"97px"
}},[
a
(
"el-button"
,{
attrs
:{
disabled
:
"show"
==
e
.
$route
.
query
.
envSetFlag
,
type
:
"primary"
},
on
:{
click
:
function
(
t
){
e
.
handleSave
(
"envForm"
)}}},[
e
.
_v
(
"保存"
)])],
1
)])])])},
staticRenderFns
:[]};
var
m
=
a
(
"VU/8"
)(
u
,
p
,
!
1
,
function
(
e
){
a
(
"thwS"
)},
"data-v-2c708bf0"
,
null
);
t
.
default
=
m
.
exports
}});
\ No newline at end of file
dist/static/js/manifest.
a80ae78fe14fae606c1f
.js
→
dist/static/js/manifest.
82d7809acab5e96549ac
.js
View file @
1d8513ee
!
function
(
e
){
var
n
=
window
.
webpackJsonp
;
window
.
webpackJsonp
=
function
(
r
,
a
,
c
){
for
(
var
f
,
d
,
i
,
u
=
0
,
b
=
[];
u
<
r
.
length
;
u
++
)
d
=
r
[
u
],
t
[
d
]
&&
b
.
push
(
t
[
d
][
0
]),
t
[
d
]
=
0
;
for
(
f
in
a
)
Object
.
prototype
.
hasOwnProperty
.
call
(
a
,
f
)
&&
(
e
[
f
]
=
a
[
f
]);
for
(
n
&&
n
(
r
,
a
,
c
);
b
.
length
;)
b
.
shift
()();
if
(
c
)
for
(
u
=
0
;
u
<
c
.
length
;
u
++
)
i
=
o
(
o
.
s
=
c
[
u
]);
return
i
};
var
r
=
{},
t
=
{
24
:
0
};
function
o
(
n
){
if
(
r
[
n
])
return
r
[
n
].
exports
;
var
t
=
r
[
n
]
=
{
i
:
n
,
l
:
!
1
,
exports
:{}};
return
e
[
n
].
call
(
t
.
exports
,
t
,
t
.
exports
,
o
),
t
.
l
=!
0
,
t
.
exports
}
o
.
e
=
function
(
e
){
var
n
=
t
[
e
];
if
(
0
===
n
)
return
new
Promise
(
function
(
e
){
e
()});
if
(
n
)
return
n
[
2
];
var
r
=
new
Promise
(
function
(
r
,
o
){
n
=
t
[
e
]
=
[
r
,
o
]});
n
[
2
]
=
r
;
var
a
=
document
.
getElementsByTagName
(
"head"
)[
0
],
c
=
document
.
createElement
(
"script"
);
c
.
type
=
"text/javascript"
,
c
.
charset
=
"utf-8"
,
c
.
async
=!
0
,
c
.
timeout
=
12
e4
,
o
.
nc
&&
c
.
setAttribute
(
"nonce"
,
o
.
nc
),
c
.
src
=
o
.
p
+
"static/js/"
+
e
+
"."
+
{
0
:
"52863aa1d72d31066413"
,
1
:
"0ebe3ead93207dc78a78"
,
2
:
"e15d500cb69741920d46"
,
3
:
"67ea89e5dfb21df3acd0"
,
4
:
"dc37e918bcb2ad0360d1"
,
5
:
"842d518baa251c8fedc4"
,
6
:
"52e14b1f79af7d86f42f"
,
7
:
"b2a85a42ddd430235a63"
,
8
:
"81460c8c66d06cfea732"
,
9
:
"c98145195e68a6e13faf"
,
10
:
"638039a7b39908980436"
,
11
:
"f27d1de28264fbbe30ff"
,
12
:
"ccbc18453e41490e2dba"
,
13
:
"b109164d2be44afb7733"
,
14
:
"9825bb69e60b8030c230"
,
15
:
"6700988b665e14f99d41"
,
16
:
"915ed31249867849353a"
,
17
:
"f25417e1883c9c1447d8"
,
18
:
"780884c4a1f6b58000f8"
,
19
:
"2d360187148e631a1193"
,
20
:
"fbee988040820ff30dfa"
,
21
:
"55879284ad4d1f03fbe0"
}[
e
]
+
".js"
;
var
f
=
setTimeout
(
d
,
12
e4
);
function
d
(){
c
.
onerror
=
c
.
onload
=
null
,
clearTimeout
(
f
);
var
n
=
t
[
e
];
0
!==
n
&&
(
n
&&
n
[
1
](
new
Error
(
"Loading chunk "
+
e
+
" failed."
)),
t
[
e
]
=
void
0
)}
return
c
.
onerror
=
c
.
onload
=
d
,
a
.
appendChild
(
c
),
r
},
o
.
m
=
e
,
o
.
c
=
r
,
o
.
d
=
function
(
e
,
n
,
r
){
o
.
o
(
e
,
n
)
||
Object
.
defineProperty
(
e
,
n
,{
configurable
:
!
1
,
enumerable
:
!
0
,
get
:
r
})},
o
.
n
=
function
(
e
){
var
n
=
e
&&
e
.
__esModule
?
function
(){
return
e
.
default
}:
function
(){
return
e
};
return
o
.
d
(
n
,
"a"
,
n
),
n
},
o
.
o
=
function
(
e
,
n
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
e
,
n
)},
o
.
p
=
"./"
,
o
.
oe
=
function
(
e
){
throw
console
.
error
(
e
),
e
}}([]);
!
function
(
e
){
var
n
=
window
.
webpackJsonp
;
window
.
webpackJsonp
=
function
(
r
,
a
,
c
){
for
(
var
d
,
f
,
i
,
u
=
0
,
b
=
[];
u
<
r
.
length
;
u
++
)
f
=
r
[
u
],
t
[
f
]
&&
b
.
push
(
t
[
f
][
0
]),
t
[
f
]
=
0
;
for
(
d
in
a
)
Object
.
prototype
.
hasOwnProperty
.
call
(
a
,
d
)
&&
(
e
[
d
]
=
a
[
d
]);
for
(
n
&&
n
(
r
,
a
,
c
);
b
.
length
;)
b
.
shift
()();
if
(
c
)
for
(
u
=
0
;
u
<
c
.
length
;
u
++
)
i
=
o
(
o
.
s
=
c
[
u
]);
return
i
};
var
r
=
{},
t
=
{
24
:
0
};
function
o
(
n
){
if
(
r
[
n
])
return
r
[
n
].
exports
;
var
t
=
r
[
n
]
=
{
i
:
n
,
l
:
!
1
,
exports
:{}};
return
e
[
n
].
call
(
t
.
exports
,
t
,
t
.
exports
,
o
),
t
.
l
=!
0
,
t
.
exports
}
o
.
e
=
function
(
e
){
var
n
=
t
[
e
];
if
(
0
===
n
)
return
new
Promise
(
function
(
e
){
e
()});
if
(
n
)
return
n
[
2
];
var
r
=
new
Promise
(
function
(
r
,
o
){
n
=
t
[
e
]
=
[
r
,
o
]});
n
[
2
]
=
r
;
var
a
=
document
.
getElementsByTagName
(
"head"
)[
0
],
c
=
document
.
createElement
(
"script"
);
c
.
type
=
"text/javascript"
,
c
.
charset
=
"utf-8"
,
c
.
async
=!
0
,
c
.
timeout
=
12
e4
,
o
.
nc
&&
c
.
setAttribute
(
"nonce"
,
o
.
nc
),
c
.
src
=
o
.
p
+
"static/js/"
+
e
+
"."
+
{
0
:
"52863aa1d72d31066413"
,
1
:
"0ebe3ead93207dc78a78"
,
2
:
"e15d500cb69741920d46"
,
3
:
"67ea89e5dfb21df3acd0"
,
4
:
"dc37e918bcb2ad0360d1"
,
5
:
"842d518baa251c8fedc4"
,
6
:
"52e14b1f79af7d86f42f"
,
7
:
"b2a85a42ddd430235a63"
,
8
:
"81460c8c66d06cfea732"
,
9
:
"c98145195e68a6e13faf"
,
10
:
"638039a7b39908980436"
,
11
:
"f27d1de28264fbbe30ff"
,
12
:
"ccbc18453e41490e2dba"
,
13
:
"b109164d2be44afb7733"
,
14
:
"9825bb69e60b8030c230"
,
15
:
"6700988b665e14f99d41"
,
16
:
"915ed31249867849353a"
,
17
:
"f25417e1883c9c1447d8"
,
18
:
"780884c4a1f6b58000f8"
,
19
:
"2d360187148e631a1193"
,
20
:
"2d4182c658605d675867"
,
21
:
"55879284ad4d1f03fbe0"
}[
e
]
+
".js"
;
var
d
=
setTimeout
(
f
,
12
e4
);
function
f
(){
c
.
onerror
=
c
.
onload
=
null
,
clearTimeout
(
d
);
var
n
=
t
[
e
];
0
!==
n
&&
(
n
&&
n
[
1
](
new
Error
(
"Loading chunk "
+
e
+
" failed."
)),
t
[
e
]
=
void
0
)}
return
c
.
onerror
=
c
.
onload
=
f
,
a
.
appendChild
(
c
),
r
},
o
.
m
=
e
,
o
.
c
=
r
,
o
.
d
=
function
(
e
,
n
,
r
){
o
.
o
(
e
,
n
)
||
Object
.
defineProperty
(
e
,
n
,{
configurable
:
!
1
,
enumerable
:
!
0
,
get
:
r
})},
o
.
n
=
function
(
e
){
var
n
=
e
&&
e
.
__esModule
?
function
(){
return
e
.
default
}:
function
(){
return
e
};
return
o
.
d
(
n
,
"a"
,
n
),
n
},
o
.
o
=
function
(
e
,
n
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
e
,
n
)},
o
.
p
=
"./"
,
o
.
oe
=
function
(
e
){
throw
console
.
error
(
e
),
e
}}([]);
\ No newline at end of file
\ No newline at end of file
src/views/index/createEnvSet.vue
View file @
1d8513ee
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* @Author: 无尘
* @Author: 无尘
* @Date: 2019-07-30 15:17:39
* @Date: 2019-07-30 15:17:39
* @LastEditors: 无尘
* @LastEditors: 无尘
* @LastEditTime: 2019-10-23 17:
07:33
* @LastEditTime: 2019-10-23 17:
36:14
-->
-->
<
template
>
<
template
>
<div
class=
"api-body-content border-box"
>
<div
class=
"api-body-content border-box"
>
...
@@ -224,21 +224,30 @@ export default {
...
@@ -224,21 +224,30 @@ export default {
let
spaceFlag
=
true
;
let
spaceFlag
=
true
;
let
weightFlag
=
true
;
let
weightFlag
=
true
;
let
ipFlag
=
true
;
let
ipFlag
=
true
;
const
pattern
=
/
((
2
(
5
[
0-5
]
|
[
0-4
]\d))
|
[
0-1
]?\d{1,2})(\.((
2
(
5
[
0-5
]
|
[
0-4
]\d))
|
[
0-1
]?\d{1,2})){3}
/g
;
that
.
tableData
.
forEach
(
ele
=>
{
that
.
tableData
.
forEach
(
ele
=>
{
if
(
ele
.
sceneCode
==
''
)
{
if
(
ele
.
sceneCode
==
''
)
{
spaceFlag
=
false
;
spaceFlag
=
false
;
}
}
if
(
that
.
formData
.
proxyType
==
0
)
{
if
(
that
.
formData
.
proxyType
==
0
)
{
ele
.
proxyParams
.
forEach
(
child
=>
{
ele
.
proxyParams
.
forEach
(
child
=>
{
ipFlag
=
pattern
.
test
(
child
.
url
);
const
pattern
=
/
((
2
(
5
[
0-5
]
|
[
0-4
]\d))
|
[
0-1
]?\d{1,2})(\.((
2
(
5
[
0-5
]
|
[
0-4
]\d))
|
[
0-1
]?\d{1,2})){3}
/g
;
weightFlag
=
child
.
weight
<
1000000
?
true
:
false
;
if
(
pattern
.
test
(
child
.
url
)
===
false
)
{
spaceFlag
=
child
.
url
==
''
||
child
.
weight
==
''
?
false
:
true
;
ipFlag
=
false
;
}
if
(
!
(
child
.
weight
<
10000
))
{
weightFlag
=
false
;
}
if
(
child
.
url
==
''
||
child
.
weight
==
''
)
{
spaceFlag
=
false
;
}
that
.
$delete
(
child
,
'zookeeperUrl'
);
that
.
$delete
(
child
,
'zookeeperUrl'
);
});
});
}
else
{
}
else
{
ele
.
proxyParams
.
forEach
(
child
=>
{
ele
.
proxyParams
.
forEach
(
child
=>
{
spaceFlag
=
child
.
zookeeperUrl
==
''
?
false
:
true
;
if
(
child
.
zookeeperUrl
==
''
)
{
spaceFlag
=
false
;
}
that
.
$delete
(
child
,
'balence'
);
that
.
$delete
(
child
,
'balence'
);
that
.
$delete
(
child
,
'url'
);
that
.
$delete
(
child
,
'url'
);
that
.
$delete
(
child
,
'weight'
);
that
.
$delete
(
child
,
'weight'
);
...
@@ -255,7 +264,7 @@ export default {
...
@@ -255,7 +264,7 @@ export default {
if
(
!
weightFlag
)
{
if
(
!
weightFlag
)
{
that
.
$message
.
error
({
that
.
$message
.
error
({
duration
:
1000
,
duration
:
1000
,
message
:
'请填写
正确
的权重值'
message
:
'请填写
小于10000以内
的权重值'
});
});
return
false
;
return
false
;
}
}
...
...
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