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
5644c224
Commit
5644c224
authored
May 14, 2019
by
智勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
全选
parent
3f033b95
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
4 deletions
+28
-4
deployEnv.vue
src/views/docker/deployEnv.vue
+15
-2
envTemplate.vue
src/views/docker/envTemplate.vue
+13
-2
No files found.
src/views/docker/deployEnv.vue
View file @
5644c224
...
@@ -13,13 +13,14 @@
...
@@ -13,13 +13,14 @@
<el-card>
<el-card>
<el-button
<el-button
v-for=
"item in ns.repos"
v-for=
"item in ns.repos"
:key=
"item.
domain
"
:key=
"item.
appname
"
:type=
"dependant[ns.type] && dependant[ns.type].find(sys => sys.appname === item.appname) ? 'success' : ''"
:type=
"dependant[ns.type] && dependant[ns.type].find(sys => sys.appname === item.appname) ? 'success' : ''"
style=
"margin:3px"
style=
"margin:3px"
@
click=
"selectSystem(item, ns.type)"
>
@
click=
"selectSystem(item, ns.type)"
>
{{
item
.
appname
}}
{{
item
.
appname
}}
</el-button>
</el-button>
</el-card>
</el-card>
<el-checkbox
:indeterminate=
"isIndeterminate[ns.type]"
v-model=
"checkAll[ns.type]"
@
change=
"handleCheckAllChange(checkAll[ns.type],ns.type)"
>
全选
</el-checkbox>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -47,7 +48,9 @@ export default {
...
@@ -47,7 +48,9 @@ export default {
dependant
:
{},
dependant
:
{},
repoNamespaces
:
[],
repoNamespaces
:
[],
currentTemplate
:
''
,
currentTemplate
:
''
,
templates
:
{}
templates
:
{},
checkAll
:
{},
isIndeterminate
:
{}
}
}
},
},
...
@@ -64,6 +67,10 @@ export default {
...
@@ -64,6 +67,10 @@ export default {
getAllRepos
()
{
getAllRepos
()
{
getAppRepos
().
then
(
res
=>
{
getAppRepos
().
then
(
res
=>
{
this
.
repoNamespaces
=
res
.
data
this
.
repoNamespaces
=
res
.
data
this
.
repoNamespaces
.
forEach
(
item
=>
{
this
.
checkAll
[
item
.
type
]
=
false
this
.
isIndeterminate
[
item
.
type
]
=
true
})
})
})
},
},
...
@@ -83,6 +90,12 @@ export default {
...
@@ -83,6 +90,12 @@ export default {
}
}
},
},
handleCheckAllChange
(
val
,
type
)
{
this
.
$set
(
this
.
dependant
,
type
,
[])
this
.
isIndeterminate
[
type
]
=
false
if
(
val
)
this
.
dependant
[
type
]
=
this
.
repoNamespaces
.
filter
(
item
=>
item
.
type
===
type
)[
0
].
repos
.
concat
()
},
useTemplate
()
{
useTemplate
()
{
const
vm
=
this
const
vm
=
this
const
t
=
this
.
templates
.
find
(
item
=>
item
.
name
===
this
.
currentTemplate
)
const
t
=
this
.
templates
.
find
(
item
=>
item
.
name
===
this
.
currentTemplate
)
...
...
src/views/docker/envTemplate.vue
View file @
5644c224
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
{{
item
.
appname
}}
{{
item
.
appname
}}
</el-button>
</el-button>
</el-card>
</el-card>
<el-checkbox
:indeterminate=
"isIndeterminate[ns.type]"
v-model=
"checkAll[ns.type]"
@
change=
"handleCheckAllChange(checkAll[ns.type],ns.type)"
>
全选
</el-checkbox>
</el-form-item>
</el-form-item>
</el-form
>
</el-form
>
<div
style=
"float:right"
>
<div
style=
"float:right"
>
...
@@ -53,7 +54,8 @@ export default {
...
@@ -53,7 +54,8 @@ export default {
currentTemplate
:
''
,
currentTemplate
:
''
,
currentTemplateObj
:
{},
currentTemplateObj
:
{},
templates
:
{},
templates
:
{},
loading
:
true
checkAll
:
{},
isIndeterminate
:
{}
}
}
},
},
...
@@ -66,7 +68,10 @@ export default {
...
@@ -66,7 +68,10 @@ export default {
getAllRepos
()
{
getAllRepos
()
{
getAllRepos
().
then
(
res
=>
{
getAllRepos
().
then
(
res
=>
{
this
.
repoNamespaces
=
res
.
data
this
.
repoNamespaces
=
res
.
data
this
.
loading
=
false
this
.
repoNamespaces
.
forEach
(
item
=>
{
this
.
checkAll
[
item
.
type
]
=
false
this
.
isIndeterminate
[
item
.
type
]
=
true
})
})
})
},
},
...
@@ -87,6 +92,12 @@ export default {
...
@@ -87,6 +92,12 @@ export default {
}
}
},
},
handleCheckAllChange
(
val
,
type
)
{
this
.
$set
(
this
.
dependant
,
type
,
[])
this
.
isIndeterminate
[
type
]
=
false
if
(
val
)
this
.
dependant
[
type
]
=
this
.
repoNamespaces
.
filter
(
item
=>
item
.
type
===
type
)[
0
].
repos
.
concat
()
},
useTemplate
()
{
useTemplate
()
{
const
vm
=
this
const
vm
=
this
this
.
currentTemplateObj
=
this
.
templates
.
find
(
item
=>
item
.
name
===
this
.
currentTemplate
)
this
.
currentTemplateObj
=
this
.
templates
.
find
(
item
=>
item
.
name
===
this
.
currentTemplate
)
...
...
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