Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-editor
Project
Project
Details
Activity
Releases
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
劳工
zeroing-editor
Commits
0b5f668e
Commit
0b5f668e
authored
Apr 17, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
过滤创建者
parent
5200368d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
AuthManagerEditor.vue
src/views/Editor/dialogs/editors/AuthManagerEditor.vue
+10
-6
No files found.
src/views/Editor/dialogs/editors/AuthManagerEditor.vue
View file @
0b5f668e
<
template
>
<div
class=
"project-auth-manager"
>
<p><b>
{{
$t
(
'Creator'
)
}}
</b>
:
{{
project
.
creator
}}
</p>
<el-select
style=
"width: 100%;"
size=
"mini"
v-model=
"operators"
filterable
multiple
:disabled=
"!editable"
>
<el-select
style=
"width: 100%;"
size=
"mini"
v-model=
"operators
ExcludeCreator
"
filterable
multiple
:disabled=
"!editable"
>
<el-option
v-for=
"(item, index) in devPersons"
:key=
"index"
:disabled=
"item.name === project.creator || item.name === currentOperator"
v-if=
"item.name !== project.creator"
:disabled=
"item.name === currentOperator"
:label=
"item.name"
:value=
"item.name"
>
</el-option>
...
...
@@ -23,6 +24,7 @@
return
{
devPersons
:
[],
operators
:
[],
operatorsExcludeCreator
:
[],
};
},
computed
:
{
...
...
@@ -40,22 +42,24 @@
async
edit
()
{
this
.
devPersons
=
await
getDevPersons
();
this
.
operators
=
this
.
project
.
operators
.
split
(
','
);
this
.
operatorsExcludeCreator
=
this
.
operators
.
concat
().
filter
(
item
=>
item
!==
this
.
project
.
creator
);
this
.
operatorsOrigin
=
this
.
operators
.
concat
().
sort
().
join
(
','
);
},
async
save
()
{
let
operatorsNew
=
this
.
operators
.
concat
().
sort
().
join
(
','
);
let
operators
=
this
.
operatorsExcludeCreator
.
concat
();
operators
.
unshift
(
this
.
project
.
creator
);
let
operatorsNew
=
operators
.
sort
().
join
(
','
);
if
(
operatorsNew
===
this
.
operatorsOrigin
)
{
return
;
}
let
operatorsStr
=
this
.
operators
.
join
(
','
);
updateOperators
(
this
.
projectId
,
operatorsStr
)
updateOperators
(
this
.
projectId
,
operatorsNew
)
.
then
(()
=>
{
this
.
$message
({
message
:
this
.
$t
(
"Operate success"
),
type
:
"success"
,
});
this
.
modifyOperators
(
operators
Str
);
this
.
modifyOperators
(
operators
New
);
})
.
catch
((
e
)
=>
{
this
.
$message
({
message
:
e
.
message
,
type
:
"error"
});
...
...
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