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
c2bd15f8
Commit
c2bd15f8
authored
Oct 21, 2019
by
无尘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改菜单
parent
995fa9b7
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
+8
-8
index.html
dist/index.html
+2
-2
app.6e71c9fbcca5be2e040c0c7e57b8e539.css
dist/static/css/app.6e71c9fbcca5be2e040c0c7e57b8e539.css
+0
-0
18.1bdfcff9439ca81fcf5a.js
dist/static/js/18.1bdfcff9439ca81fcf5a.js
+2
-0
18.f9c030a2728c83c74159.js
dist/static/js/18.f9c030a2728c83c74159.js
+0
-2
manifest.65500fe516342718439d.js
dist/static/js/manifest.65500fe516342718439d.js
+2
-2
createEnvSet.vue
src/views/index/createEnvSet.vue
+2
-2
No files found.
dist/index.html
View file @
c2bd15f8
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><link
rel=
"shortcut icon"
href=
./favicon.ico
><title>
API网关管理平台
</title><link
href=
./static/css/app.15f9f426de918ed101ea67e22ffbba48.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.7f87dc9fa7baed2cdd28.js
></script><script
type=
text/javascript
src=
./static/js/vendor.71dc162eb690bf6a36a0.js
></script><script
type=
text/javascript
src=
./static/js/app.154c36bdc57283833b6b.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.6e71c9fbcca5be2e040c0c7e57b8e539.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.65500fe516342718439d.js
></script><script
type=
text/javascript
src=
./static/js/vendor.71dc162eb690bf6a36a0.js
></script><script
type=
text/javascript
src=
./static/js/app.154c36bdc57283833b6b.js
></script></body></html>
\ No newline at end of file
\ No newline at end of file
dist/static/css/app.
15f9f426de918ed101ea67e22ffbba48
.css
→
dist/static/css/app.
6e71c9fbcca5be2e040c0c7e57b8e539
.css
View file @
c2bd15f8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
dist/static/js/18.1bdfcff9439ca81fcf5a.js
0 → 100644
View file @
c2bd15f8
webpackJsonp
([
18
],{
"Gyu+"
:
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
;
if
(
e
.
tableData
.
forEach
(
function
(
a
){
""
==
a
.
sceneCode
&&
(
t
=!
1
),
0
==
e
.
formData
.
proxyType
?
a
.
proxyParams
.
forEach
(
function
(
a
){
t
=
""
!=
a
.
url
&&
""
!=
a
.
weight
,
e
.
$delete
(
a
,
"zookeeperUrl"
)}):
a
.
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
;
var
a
=
{
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
.
a
)(
e
.
$route
.
query
.
backendProxyId
?
"/gateway-manage/update-proxy"
:
"/gateway-manage/create-proxy"
,
a
).
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
(
"Gyu+"
)},
"data-v-56836300"
,
null
);
t
.
default
=
m
.
exports
}});
\ No newline at end of file
dist/static/js/18.f9c030a2728c83c74159.js
deleted
100644 → 0
View file @
995fa9b7
webpackJsonp
([
18
],{
uOJr
:
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
;
if
(
e
.
tableData
.
forEach
(
function
(
a
){
""
==
a
.
sceneCode
&&
(
t
=!
1
),
0
==
e
.
formData
.
proxyType
?
a
.
proxyParams
.
forEach
(
function
(
a
){
t
=
""
!=
a
.
url
&&
""
!=
a
.
weight
,
e
.
$delete
(
a
,
"zookeeperUrl"
)}):
a
.
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
;
var
a
=
{
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
.
a
)(
e
.
$route
.
query
.
backendProxyId
?
"/gateway-manage/update-proxy"
:
"/gateway-manage/create-proxy"
,
a
).
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
(
"uOJr"
)},
"data-v-44c36867"
,
null
);
t
.
default
=
m
.
exports
}});
\ No newline at end of file
dist/static/js/manifest.
7f87dc9fa7baed2cdd28
.js
→
dist/static/js/manifest.
65500fe516342718439d
.js
View file @
c2bd15f8
!
function
(
e
){
var
n
=
window
.
webpackJsonp
;
window
.
webpackJsonp
=
function
(
r
,
o
,
a
){
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
o
)
Object
.
prototype
.
hasOwnProperty
.
call
(
o
,
f
)
&&
(
e
[
f
]
=
o
[
f
]);
for
(
n
&&
n
(
r
,
o
,
a
);
b
.
length
;)
b
.
shift
()();
if
(
a
)
for
(
u
=
0
;
u
<
a
.
length
;
u
++
)
i
=
c
(
c
.
s
=
a
[
u
]);
return
i
};
var
r
=
{},
t
=
{
24
:
0
};
function
c
(
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
,
c
),
t
.
l
=!
0
,
t
.
exports
}
c
.
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
,
c
){
n
=
t
[
e
]
=
[
r
,
c
]});
n
[
2
]
=
r
;
var
o
=
document
.
getElementsByTagName
(
"head"
)[
0
],
a
=
document
.
createElement
(
"script"
);
a
.
type
=
"text/javascript"
,
a
.
charset
=
"utf-8"
,
a
.
async
=!
0
,
a
.
timeout
=
12
e4
,
c
.
nc
&&
a
.
setAttribute
(
"nonce"
,
c
.
nc
),
a
.
src
=
c
.
p
+
"static/js/"
+
e
+
"."
+
{
0
:
"52863aa1d72d31066413"
,
1
:
"0ebe3ead93207dc78a78"
,
2
:
"e15d500cb69741920d46"
,
3
:
"67ea89e5dfb21df3acd0"
,
4
:
"dc37e918bcb2ad0360d1"
,
5
:
"f02293cf72bd2cfd95f2"
,
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
:
"f9c030a2728c83c74159"
,
19
:
"40fd9824f7542ed7f56d"
,
20
:
"c163ea91d150e0ca1cb1"
,
21
:
"55879284ad4d1f03fbe0"
}[
e
]
+
".js"
;
var
f
=
setTimeout
(
d
,
12
e4
);
function
d
(){
a
.
onerror
=
a
.
onload
=
null
,
clearTimeout
(
f
);
var
n
=
t
[
e
];
0
!==
n
&&
(
n
&&
n
[
1
](
new
Error
(
"Loading chunk "
+
e
+
" failed."
)),
t
[
e
]
=
void
0
)}
return
a
.
onerror
=
a
.
onload
=
d
,
o
.
appendChild
(
a
),
r
},
c
.
m
=
e
,
c
.
c
=
r
,
c
.
d
=
function
(
e
,
n
,
r
){
c
.
o
(
e
,
n
)
||
Object
.
defineProperty
(
e
,
n
,{
configurable
:
!
1
,
enumerable
:
!
0
,
get
:
r
})},
c
.
n
=
function
(
e
){
var
n
=
e
&&
e
.
__esModule
?
function
(){
return
e
.
default
}:
function
(){
return
e
};
return
c
.
d
(
n
,
"a"
,
n
),
n
},
c
.
o
=
function
(
e
,
n
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
e
,
n
)},
c
.
p
=
"./"
,
c
.
oe
=
function
(
e
){
throw
console
.
error
(
e
),
e
}}([]);
!
function
(
e
){
var
n
=
window
.
webpackJsonp
;
window
.
webpackJsonp
=
function
(
r
,
o
,
a
){
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
o
)
Object
.
prototype
.
hasOwnProperty
.
call
(
o
,
f
)
&&
(
e
[
f
]
=
o
[
f
]);
for
(
n
&&
n
(
r
,
o
,
a
);
b
.
length
;)
b
.
shift
()();
if
(
a
)
for
(
u
=
0
;
u
<
a
.
length
;
u
++
)
i
=
c
(
c
.
s
=
a
[
u
]);
return
i
};
var
r
=
{},
t
=
{
24
:
0
};
function
c
(
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
,
c
),
t
.
l
=!
0
,
t
.
exports
}
c
.
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
,
c
){
n
=
t
[
e
]
=
[
r
,
c
]});
n
[
2
]
=
r
;
var
o
=
document
.
getElementsByTagName
(
"head"
)[
0
],
a
=
document
.
createElement
(
"script"
);
a
.
type
=
"text/javascript"
,
a
.
charset
=
"utf-8"
,
a
.
async
=!
0
,
a
.
timeout
=
12
e4
,
c
.
nc
&&
a
.
setAttribute
(
"nonce"
,
c
.
nc
),
a
.
src
=
c
.
p
+
"static/js/"
+
e
+
"."
+
{
0
:
"52863aa1d72d31066413"
,
1
:
"0ebe3ead93207dc78a78"
,
2
:
"e15d500cb69741920d46"
,
3
:
"67ea89e5dfb21df3acd0"
,
4
:
"dc37e918bcb2ad0360d1"
,
5
:
"f02293cf72bd2cfd95f2"
,
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
:
"1bdfcff9439ca81fcf5a"
,
19
:
"40fd9824f7542ed7f56d"
,
20
:
"c163ea91d150e0ca1cb1"
,
21
:
"55879284ad4d1f03fbe0"
}[
e
]
+
".js"
;
var
f
=
setTimeout
(
d
,
12
e4
);
function
d
(){
a
.
onerror
=
a
.
onload
=
null
,
clearTimeout
(
f
);
var
n
=
t
[
e
];
0
!==
n
&&
(
n
&&
n
[
1
](
new
Error
(
"Loading chunk "
+
e
+
" failed."
)),
t
[
e
]
=
void
0
)}
return
a
.
onerror
=
a
.
onload
=
d
,
o
.
appendChild
(
a
),
r
},
c
.
m
=
e
,
c
.
c
=
r
,
c
.
d
=
function
(
e
,
n
,
r
){
c
.
o
(
e
,
n
)
||
Object
.
defineProperty
(
e
,
n
,{
configurable
:
!
1
,
enumerable
:
!
0
,
get
:
r
})},
c
.
n
=
function
(
e
){
var
n
=
e
&&
e
.
__esModule
?
function
(){
return
e
.
default
}:
function
(){
return
e
};
return
c
.
d
(
n
,
"a"
,
n
),
n
},
c
.
o
=
function
(
e
,
n
){
return
Object
.
prototype
.
hasOwnProperty
.
call
(
e
,
n
)},
c
.
p
=
"./"
,
c
.
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 @
c2bd15f8
...
@@ -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-
09 10:48
:11
* @LastEditTime: 2019-10-
21 15:34
:11
-->
-->
<
template
>
<
template
>
<div
class=
"api-body-content border-box"
>
<div
class=
"api-body-content border-box"
>
...
@@ -103,7 +103,7 @@ export default {
...
@@ -103,7 +103,7 @@ export default {
path
:
'/envManage?tabChildid=second'
path
:
'/envManage?tabChildid=second'
},
},
{
{
name
:
this
.
$route
.
query
.
backendProxyId
?
'修改配置'
:
this
.
$route
.
query
.
envSetFlag
==
'show'
?
'查看配置'
:
'新增
配置'
,
name
:
!
this
.
$route
.
query
.
backendProxyId
?
'新增配置'
:
this
.
$route
.
query
.
envSetFlag
==
'show'
?
'查看配置'
:
'修改
配置'
,
path
:
''
path
:
''
}
}
],
],
...
...
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