Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
李宁
/
Activity
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e5b81eec
authored
Nov 24, 2025
by
李宁
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
969889c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
11 deletions
channelBusiManage/src/components/DesktopMain.vue
channelBusiManage/src/components/OrganizationTree.vue
channelBusiManage/src/components/DesktopMain.vue
View file @
e5b81ee
...
...
@@ -271,7 +271,7 @@
</div>
</template>
<
script
setup
lang=
"ts"
>
import
{
ref
,
computed
}
from
'vue'
import
{
ref
,
computed
,
onMounted
,
getCurrentInstance
}
from
'vue'
import
{
LayoutDashboard
,
DollarSign
,
...
...
@@ -293,6 +293,8 @@ import RoleManagement, { type Permission } from './RoleManagement.vue'
import
UserManagement
,
{
type
User
as
UserType
}
from
'./UserManagement.vue'
import
RoleIcon
from
'./icons/RoleIcon.vue'
const
platformLogo
=
ref
(
platformLogoImg
)
// 获取全局API实例
const
{
$api
}
=
getCurrentInstance
()
!
.
appContext
.
config
.
globalProperties
// 本地Role类型定义,确保permissions字段是必需的
interface
Role
{
id
:
string
...
...
@@ -481,7 +483,7 @@ const roles = ref<Role[]>([
}
])
// 权限数据
const
permissions
=
ref
<
Permission
[]
>
(
JSON
.
parse
(
localStorage
.
getItem
(
'pcUserInfo'
)
||
'{}'
)
.
functions
||
[])
const
permissions
=
ref
<
Permission
[]
>
(
userInfo
.
value
.
functions
||
[])
// 根据订单ID获取订单详情
const
getOrderById
=
(
orderId
:
string
)
=>
{
return
allOrders
.
value
.
find
((
order
:
any
)
=>
order
.
id
===
orderId
)
...
...
@@ -675,6 +677,40 @@ const organizations = ref<Organization[]>([
]
}
])
// 生命周期
onMounted
(()
=>
{
getArea
()
})
const
getArea
=
async
()
=>
{
try
{
const
response
=
await
$api
.
queryAreaData
({
areaId
:
userInfo
.
value
.
areaId
})
if
(
response
&&
response
.
c
===
0
)
{
let
pa
=
response
.
d
pa
.
id
+=
''
pa
.
type
=
pa
.
areaLevel
==
2
?
'地市'
:
'区县'
pa
.
name
=
pa
.
areaName
pa
.
parentId
+=
''
pa
.
children
.
forEach
(
item
=>
{
item
.
id
+=
''
item
.
type
=
item
.
areaLevel
==
2
?
'地市'
:
'区县'
item
.
name
=
item
.
areaName
item
.
parentId
+=
''
})
organizations
.
value
=
[
pa
]
console
.
log
(
pa
)
}
}
catch
(
error
)
{
}
}
// 当前登录用户ID
const
currentUserId
=
ref
(
'user-001'
)
// 用户数据
...
...
channelBusiManage/src/components/OrganizationTree.vue
View file @
e5b81ee
...
...
@@ -169,15 +169,9 @@ const isSelectable = (org: Organization): boolean => {
console
.
log
(
'区县级账号,检查组织类型是否为区县:'
,
org
.
type
===
'区县'
)
return
org
.
type
===
'区县'
case
'一线人员'
:
// 一线人员只能选择区县下的客户经理团队
console
.
log
(
'一线人员账号,检查组织类型是否为客户经理团队:'
,
org
.
type
===
'客户经理团队'
)
if
(
org
.
type
!==
'客户经理团队'
)
{
return
false
}
// 检查该客户经理团队是否属于某个区县
const
result
=
isUnderCounty
(
org
)
console
.
log
(
'客户经理团队是否属于区县下:'
,
result
)
return
result
// 区县级只能选择区县级组织
console
.
log
(
'区县级账号,检查组织类型是否为区县:'
,
org
.
type
===
'区县'
)
return
org
.
type
===
'区县'
default
:
return
true
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment