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
88eae161
Commit
88eae161
authored
Apr 14, 2020
by
张超
🎱
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
14
parent
6433b9e7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
58 additions
and
18 deletions
+58
-18
project.js
src/store/modules/project.js
+2
-1
AuthManagerEditor.vue
src/views/Editor/dialogs/editors/AuthManagerEditor.vue
+56
-17
No files found.
src/store/modules/project.js
View file @
88eae161
...
@@ -96,6 +96,7 @@ export const projectStore = {
...
@@ -96,6 +96,7 @@ export const projectStore = {
id
:
''
,
id
:
''
,
name
:
''
,
name
:
''
,
creator
:
''
,
creator
:
''
,
operators
:
'张超'
,
data
:
{
data
:
{
options
:
{},
options
:
{},
views
:
[],
views
:
[],
...
...
src/views/Editor/dialogs/editors/AuthManagerEditor.vue
View file @
88eae161
...
@@ -2,15 +2,27 @@
...
@@ -2,15 +2,27 @@
<div
class=
"project-auth-manager"
>
<div
class=
"project-auth-manager"
>
<el-card
shadow=
"hover"
>
<el-card
shadow=
"hover"
>
<h3
class=
"title"
>
当前权限用户列表
</h3>
<h3
class=
"title"
>
当前权限用户列表
</h3>
<div
class=
"user-list"
v-if=
"operators.length > 0"
>
<el-tag
<el-tag
:key=
"tag"
:key=
"tag"
v-for=
"tag in authList
"
v-for=
"tag in operators
"
closable
closable
:disable-transitions=
"false"
:disable-transitions=
"false"
@
close=
"deleteAuth(tag)"
@
close=
"deleteAuth(tag)"
>
>
{{
tag
}}
{{
tag
}}
</el-tag>
</el-tag>
</div>
<p
v-else
>
空
</p>
<el-divider></el-divider>
<el-button
type=
"primary"
size=
"small"
>
增加权限
</el-button>
<el-checkbox-group
v-model=
"checkList"
>
<el-checkbox
label=
"张超"
></el-checkbox>
<el-checkbox
label=
"复选框 B"
></el-checkbox>
<el-checkbox
label=
"复选框 C"
></el-checkbox>
<el-checkbox
label=
"禁用"
disabled
></el-checkbox>
<el-checkbox
label=
"选中且禁用"
disabled
></el-checkbox>
</el-checkbox-group>
</el-card>
</el-card>
</div>
</div>
</
template
>
</
template
>
...
@@ -22,18 +34,45 @@ export default {
...
@@ -22,18 +34,45 @@ export default {
data
()
{
data
()
{
return
{
return
{
authList
:
[
"张超"
,
"姜西西"
,
"王竹君"
],
authList
:
[
"张超"
,
"姜西西"
,
"王竹君"
],
checkList
:
[
"张超"
]
};
};
},
computed
:
{
...
mapState
({
operators
:
(
state
)
=>
state
.
project
.
operators
&&
state
.
project
.
operators
.
split
(
","
),
}),
},
mounted
()
{
},
},
methods
:
{
methods
:
{
// edit() {
// this.operators = clonePureObj(this.operators).split(",");
// },
save
()
{
// this.modifyEnv(this.editData);
},
onAdd
()
{
// this.editData.push({
// name: "",
// value: "",
// });
},
deleteAuth
(
tag
)
{
deleteAuth
(
tag
)
{
this
.
$confirm
(
this
.
$t
(
'Are you sure to delete this user auth'
)
+
tag
,
this
.
$t
(
'Alert'
),
{
this
.
$confirm
(
confirmButtonText
:
this
.
$t
(
'Confirm'
),
this
.
$t
(
"Are you sure to delete this user auth"
)
+
tag
,
cancelButtonText
:
this
.
$t
(
'Cancel'
),
this
.
$t
(
"Alert"
),
type
:
'warning'
{
}).
then
(()
=>
{
confirmButtonText
:
this
.
$t
(
"Confirm"
),
this
.
authList
=
this
.
authList
.
filter
(
item
=>
item
!==
tag
);
cancelButtonText
:
this
.
$t
(
"Cancel"
),
}).
catch
((
e
)
=>
{
type
:
"warning"
,
});
}
)
.
then
(()
=>
{
this
.
authList
=
this
.
authList
.
filter
((
item
)
=>
item
!==
tag
);
})
.
catch
((
e
)
=>
{});
console
.
log
(
tag
);
console
.
log
(
tag
);
},
},
},
},
...
...
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