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
fcbabc9e
Commit
fcbabc9e
authored
Jul 15, 2019
by
智勇
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'jiakewei' into 'master'
修改bug 模糊查询 等等 See merge request !32
parents
9e05e5b9
6a7a5204
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
3 deletions
+28
-3
application.vue
src/views/pipeline/application.vue
+28
-3
No files found.
src/views/pipeline/application.vue
View file @
fcbabc9e
...
...
@@ -5,6 +5,12 @@
<el-input
v-model=
"listQuery.new_user"
placeholder=
"新建用户"
clearable
style=
"width: 200px;"
class=
"filter-item"
@
keyup.enter.native=
"handleFilter"
/>
<el-button
v-waves
class=
"filter-item"
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleFilter"
>
{{
$t
(
'
table.search
'
)
}}
</el-button>
<el-button
class=
"filter-item"
type=
"primary"
icon=
"el-icon-edit"
@
click=
"handleCreate"
>
添加
</el-button>
<el-switch
v-model=
"value1"
style=
"float: right"
inactive-text=
"系统列表"
active-text=
"用户列表"
@
change=
"filterUserData(value1)"
/>
</div>
<el-table
...
...
@@ -24,7 +30,7 @@
<span
class=
"link-type"
@
click=
"handleUpdate(scope.row)"
>
{{
scope
.
row
.
application_name
}}
</span>
</
template
>
</el-table-column>
<el-table-column
label=
"项目->分支"
align=
"center"
>
<el-table-column
label=
"项目->分支"
align=
"center"
width=
"300px"
>
<
template
slot-scope=
"scope"
>
<div
v-for=
"item in scope.row.repos"
:key=
"item.id"
><b>
{{
item
.
repository
}}
</b>
->
{{
item
.
ref
.
name
|
replaceeRef
}}
</div>
</
template
>
...
...
@@ -62,7 +68,7 @@
<el-option
v-for=
"item in repos"
:value=
"item.project_name"
:label=
"item.project_name"
:key=
"item.project_name"
/>
</el-select>
<label
style=
"margin:20px"
>
分支
</label>
<el-select
v-model=
"repoAndRefItem.ref"
filterable
value-key=
"id"
style=
"width:30%"
class=
"filter-item"
>
<el-select
v-model=
"repoAndRefItem.ref
.name
"
filterable
value-key=
"id"
style=
"width:30%"
class=
"filter-item"
>
<el-option
v-for=
"item in refs[repoAndRefItem.repository]"
:value=
"item"
:label=
"item.name"
:key=
"item.name"
/>
</el-select>
<el-button
:disabled=
"index===0?true:false"
style=
"margin-left:5px"
@
click=
"temp.repos.splice(index, 1)"
>
删除
</el-button>
...
...
@@ -133,6 +139,7 @@ export default {
},
data
()
{
return
{
value1
:
true
,
repository
:
''
,
total
:
0
,
cacheData
:
{},
...
...
@@ -167,6 +174,9 @@ export default {
this
.
getApplications
()
},
methods
:
{
filterUserData
()
{
this
.
getApplications
()
},
getApplications
()
{
for
(
const
prop
in
this
.
listQuery
)
{
if
(
this
.
listQuery
[
prop
]
===
''
)
{
...
...
@@ -175,7 +185,22 @@ export default {
}
var
arr
=
Object
.
keys
(
this
.
listQuery
)
getApplications
(
arr
.
length
>
0
?
this
.
listQuery
:
null
).
then
(
res
=>
{
this
.
applications
=
res
.
data
if
(
!
this
.
value1
)
{
this
.
applications
=
res
.
data
.
filter
((
item
)
=>
{
if
(
item
.
application_name
.
indexOf
(
'
master分支订阅
'
)
>
-
1
&&
item
.
new_user
.
indexOf
(
'
胡慧
'
)
>
-
1
)
{
return
item
}
})
}
else
{
this
.
applications
=
res
.
data
.
filter
((
item
)
=>
{
if
(
item
.
application_name
.
indexOf
(
'
master分支订阅
'
)
<=
0
&&
item
.
new_user
.
indexOf
(
'
胡慧
'
)
<=
0
)
{
return
item
}
})
}
// this.applications = res.data.map((item)=>{
//
// })
this
.
listLoading
=
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