Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fns_backend
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhang Xiaojie
fns_backend
Commits
5ab4918c
Commit
5ab4918c
authored
Nov 29, 2021
by
chenqikuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 调配修改
parent
6e793e1a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
11 deletions
+23
-11
addNormalManagerModal.vue
src/components/UserManage/addNormalManagerModal.vue
+23
-11
No files found.
src/components/UserManage/addNormalManagerModal.vue
View file @
5ab4918c
...
@@ -306,11 +306,9 @@ export default Vue.extend({
...
@@ -306,11 +306,9 @@ export default Vue.extend({
this
.
fooList
=
list
this
.
fooList
=
list
let
branchDetailMsg
:
iBranchDetailMsg
=
undefined
as
unknown
as
iBranchDetailMsg
let
branchDetailMsg
:
iBranchDetailMsg
=
undefined
as
unknown
as
iBranchDetailMsg
if
(
this
.
modalMode
===
eAddManagerModalMode
.
create
)
{
if
(
this
.
modalMode
===
eAddManagerModalMode
.
create
)
{
console
.
log
(
this
.
branchDetailMsg
,
'show this.branchDetailMsg'
)
branchDetailMsg
=
this
.
branchDetailMsg
branchDetailMsg
=
this
.
branchDetailMsg
}
else
if
(
this
.
modalMode
===
eAddManagerModalMode
.
edit
)
{
}
else
if
(
this
.
modalMode
===
eAddManagerModalMode
.
edit
)
{
branchDetailMsg
=
this
.
personalMsg
.
branchDetailMsg
branchDetailMsg
=
this
.
personalMsg
.
branchDetailMsg
console
.
log
(
this
.
personalMsg
.
branchDetailMsg
,
'show this.personalMsg.branchDetailMsg'
)
this
.
form
.
level
=
this
.
level
this
.
form
.
level
=
this
.
level
this
.
form
.
name
=
this
.
personalMsg
.
name
this
.
form
.
name
=
this
.
personalMsg
.
name
}
}
...
@@ -344,9 +342,28 @@ export default Vue.extend({
...
@@ -344,9 +342,28 @@ export default Vue.extend({
}
}
}
}
/* 调配时 设置disable,限制可选的范围*/
if
(
this
.
modalMode
===
eAddManagerModalMode
.
edit
)
{
const
user
=
getUserMsg
()
this
.
fooList
.
map
((
foo
,
index
)
=>
{
if
(
index
+
1
+
1
<=
(
user
?.
level
||
0
))
{
foo
.
disable
=
true
}
})
/* 如果是管理员,则需要查询同级操作权限 */
if
(
user
?.
newRole
===
eNewRoleRelatedToBackEnd
.
Management
)
{
const
attrRet
=
await
StaffService
.
getInstance
().
getAttr
()
if
(
attrRet
.
code
===
200
)
{
const
privilege
=
attrRet
.
data
.
privilege
/* 设置同级操作权限 */
this
.
fooList
[
user
.
level
-
1
].
disable
=
!
privilege
}
}
}
const
fetchOptionListForEverySettledBranchEdit
=
async
(
list
:
typeof
fooList
)
=>
{
const
fetchOptionListForEverySettledBranchEdit
=
async
(
list
:
typeof
fooList
)
=>
{
list
.
forEach
(
async
(
item
,
index
)
=>
{
list
.
forEach
(
async
(
item
,
index
)
=>
{
if
(
index
===
0
)
{
if
(
index
===
0
&&
!
item
.
disable
)
{
const
ret
=
await
StaffService
.
getInstance
().
getBranch
({
const
ret
=
await
StaffService
.
getInstance
().
getBranch
({
level
:
eLevel
.
firstLevel_branch
,
level
:
eLevel
.
firstLevel_branch
,
page
:
1
,
page
:
1
,
...
@@ -356,6 +373,7 @@ export default Vue.extend({
...
@@ -356,6 +373,7 @@ export default Vue.extend({
this
.
fooList
[
0
].
options
=
ret
.
data
.
item
this
.
fooList
[
0
].
options
=
ret
.
data
.
item
}
}
}
else
{
}
else
{
if
(
!
item
.
disable
)
{
const
ret
=
await
StaffService
.
getInstance
().
getBranch
({
const
ret
=
await
StaffService
.
getInstance
().
getBranch
({
level
:
index
+
1
,
level
:
index
+
1
,
page
:
1
,
page
:
1
,
...
@@ -366,20 +384,14 @@ export default Vue.extend({
...
@@ -366,20 +384,14 @@ export default Vue.extend({
this
.
fooList
[
index
].
options
=
ret
.
data
.
item
this
.
fooList
[
index
].
options
=
ret
.
data
.
item
}
}
}
}
}
})
})
}
}
if
(
this
.
modalMode
===
eAddManagerModalMode
.
edit
)
{
if
(
this
.
modalMode
===
eAddManagerModalMode
.
edit
)
{
await
fetchOptionListForEverySettledBranchEdit
(
this
.
fooList
)
await
fetchOptionListForEverySettledBranchEdit
(
this
.
fooList
)
}
}
/* 调配时 设置disable,限制可选的范围*/
if
(
this
.
modalMode
===
eAddManagerModalMode
.
edit
)
{
this
.
fooList
.
map
((
foo
,
index
)
=>
{
if
(
index
+
1
+
1
<=
this
.
searchLevel2
)
{
foo
.
disable
=
true
}
})
}
this
.
fooList
=
[...
this
.
fooList
]
this
.
fooList
=
[...
this
.
fooList
]
await
this
.
fetchNextOptions
()
await
this
.
fetchNextOptions
()
console
.
log
(
this
.
fooList
,
'show foolist'
)
console
.
log
(
this
.
fooList
,
'show foolist'
)
...
...
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