Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qahome-diamond
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QA
qahome-diamond
Commits
12bbb7ea
Commit
12bbb7ea
authored
Oct 28, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加k8s conf
parent
e88bd005
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
115 additions
and
101 deletions
+115
-101
manager.vue
src/views/dbconfig/manager.vue
+17
-4
index.vue
src/views/proconfig/index.vue
+98
-97
No files found.
src/views/dbconfig/manager.vue
View file @
12bbb7ea
...
@@ -32,17 +32,22 @@
...
@@ -32,17 +32,22 @@
<!-- <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> -->
<!-- <pagination v-show="total>0" :total="total" :page.sync="listQuery.page" :limit.sync="listQuery.limit" @pagination="getList" /> -->
<el-dialog
:title=
"dialogStatus"
:visible.sync=
"dialogFormVisible"
>
<el-dialog
:title=
"dialogStatus"
:visible.sync=
"dialogFormVisible"
>
<el-alert
v-show=
"dialogStatus==='新建'"
style=
"margin-bottom:20px"
title=
"新建需要管理员权限"
type=
"warning"
/>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"temp"
label-position=
"left"
label-width=
"90px"
style=
"width: 90%; margin-left:40px;"
>
<el-form
ref=
"dataForm"
:rules=
"rules"
:model=
"temp"
label-position=
"left"
label-width=
"90px"
style=
"width: 90%; margin-left:40px;"
>
<el-form-item
label=
"Database"
prop=
"dbname"
>
<el-form-item
label=
"Database"
prop=
"dbname"
>
<el-input
v-model=
"temp.dbname"
style=
"width:100%"
/>
<el-input
v-model=
"temp.dbname"
:disabled=
"disabled"
style=
"width:100%"
/>
</el-form-item>
</el-form-item>
<el-form
:inline=
"true"
:rules=
"rules"
:model=
"temp"
class=
"demo-form-inline"
label-width=
"90px"
>
<el-form
:inline=
"true"
:rules=
"rules"
:model=
"temp"
class=
"demo-form-inline"
label-width=
"90px"
>
<el-form-item
label=
"Host"
prop=
"ip"
>
<el-form-item
label=
"Host"
prop=
"ip"
>
<el-input
v-model=
"temp.ip"
placeholder=
"数据库同步环境IP"
class=
"input-width"
/>
<el-input
v-model=
"temp.ip"
:disabled=
"disabled"
placeholder=
"数据库同步环境IP"
class=
"input-width"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"Port"
prop=
"port"
>
<el-form-item
label=
"Port"
prop=
"port"
>
<el-input
v-model=
"temp.port"
placeholder=
"数据库同步环境端口"
class=
"input-width"
/>
<el-input
v-model=
"temp.port"
:disabled=
"disabled"
placeholder=
"数据库同步环境端口"
class=
"input-width"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<el-form
:inline=
"true"
:model=
"temp"
class=
"demo-form-inline"
label-width=
"90px"
>
<el-form
:inline=
"true"
:model=
"temp"
class=
"demo-form-inline"
label-width=
"90px"
>
...
@@ -60,7 +65,7 @@
...
@@ -60,7 +65,7 @@
</el-form>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
>
<div
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"dialogFormVisible = false"
>
{{ $t('table.cancel') }}
</el-button>
<el-button
@
click=
"dialogFormVisible = false"
>
{{ $t('table.cancel') }}
</el-button>
<el-button
v-permission=
"['admin']
"
type=
"primary"
@
click=
"createData()"
>
{{ $t('table.confirm') }}
</el-button>
<el-button
:disabled=
"disabled && dialogStatus==='新建'
"
type=
"primary"
@
click=
"createData()"
>
{{ $t('table.confirm') }}
</el-button>
</div>
</div>
</el-dialog>
</el-dialog>
...
@@ -92,6 +97,7 @@ export default {
...
@@ -92,6 +97,7 @@ export default {
return
{
return
{
temp
:
{
temp
:
{
},
},
disabled
:
undefined
,
dialogFormVisible
:
false
,
dialogFormVisible
:
false
,
dialogDeleteVisible
:
false
,
dialogDeleteVisible
:
false
,
dialogStatus
:
''
,
dialogStatus
:
''
,
...
@@ -110,6 +116,7 @@ export default {
...
@@ -110,6 +116,7 @@ export default {
},
},
created
()
{
created
()
{
this
.
getConfig
()
this
.
getConfig
()
this
.
disabled
=
!
this
.
$store
.
getters
.
roles
.
includes
(
'
admin
'
)
},
},
methods
:
{
methods
:
{
getConfig
()
{
getConfig
()
{
...
@@ -133,6 +140,9 @@ export default {
...
@@ -133,6 +140,9 @@ export default {
this
.
resetTemp
()
this
.
resetTemp
()
this
.
dialogStatus
=
'
新建
'
this
.
dialogStatus
=
'
新建
'
this
.
dialogFormVisible
=
true
this
.
dialogFormVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'
dataForm
'
].
clearValidate
()
})
},
},
createData
()
{
createData
()
{
...
@@ -156,6 +166,9 @@ export default {
...
@@ -156,6 +166,9 @@ export default {
this
.
temp
=
Object
.
assign
({},
row
)
// copy obj
this
.
temp
=
Object
.
assign
({},
row
)
// copy obj
this
.
dialogStatus
=
'
编辑
'
this
.
dialogStatus
=
'
编辑
'
this
.
dialogFormVisible
=
true
this
.
dialogFormVisible
=
true
this
.
$nextTick
(()
=>
{
this
.
$refs
[
'
dataForm
'
].
clearValidate
()
})
},
},
handleDelete
(
row
)
{
handleDelete
(
row
)
{
...
...
src/views/proconfig/index.vue
View file @
12bbb7ea
This diff is collapsed.
Click to expand it.
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