Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mingPayPc
Overview
Overview
Details
Activity
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
fengzhaoyu
mingPayPc
Commits
ad11c0d5
Commit
ad11c0d5
authored
Dec 05, 2019
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限模块
parent
006dc37b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
314 additions
and
73 deletions
+314
-73
config.js
src/api/config.js
+1
-1
Home.vue
src/components/common/Home.vue
+1
-1
ConsumptionOrder.vue
src/components/pages/CanteenManagement/ConsumptionOrder.vue
+15
-14
AllowancePayment.vue
src/components/pages/PaymentManagement/AllowancePayment.vue
+18
-17
CashierManagement.vue
src/components/pages/PaymentManagement/CashierManagement.vue
+1
-1
PaymentManagementHome.vue
...ponents/pages/PaymentManagement/PaymentManagementHome.vue
+2
-2
RechargeRecord.vue
src/components/pages/PaymentManagement/RechargeRecord.vue
+15
-14
RecordsOfConsumption.vue
...mponents/pages/PaymentManagement/RecordsOfConsumption.vue
+19
-18
SetAdministrators.vue
src/components/pages/PaymentManagement/SetAdministrators.vue
+1
-1
addOrRights.vue
src/components/pages/rightsManagement/addOrRights.vue
+0
-0
rightsManagement.vue
src/components/pages/rightsManagement/rightsManagement.vue
+4
-4
tree.vue
src/components/pages/rightsManagement/tree.vue
+237
-0
No files found.
src/api/config.js
View file @
ad11c0d5
...
...
@@ -133,7 +133,7 @@ const config = {
requiredDepartments
:
[],
// 必选部门(不可取消选中状态)
appId
:
localStorage
.
getItem
(
'agentId'
),
// 微应用的Id
permissionType
:
'GLOBAL'
,
// 可添加权限校验,选人权限,目前只有GLOBAL这个参数
responseUserOnly
:
fals
e
,
// 返回人,或者返回人和部门
responseUserOnly
:
tru
e
,
// 返回人,或者返回人和部门
startWithDepartmentId
:
-
1
,
// 仅支持0和-1
onSuccess
:
function
(
result
)
{
return
resolve
(
result
)
...
...
src/components/common/Home.vue
View file @
ad11c0d5
...
...
@@ -13,7 +13,7 @@
>
<a-menu-item
key=
"accountManagement"
>
支付管理
</a-menu-item>
<a-menu-item
key=
"classificationOfDishes"
>
食堂管理
</a-menu-item>
<
a-menu-item
key=
"historicalVisitors"
>
访客管理
</a-menu-item
>
<
!--
<a-menu-item
key=
"historicalVisitors"
>
访客管理
</a-menu-item>
--
>
<a-menu-item
key=
"rightsManagement"
>
权限管理
</a-menu-item>
</a-menu>
</a-layout-header>
...
...
src/components/pages/CanteenManagement/ConsumptionOrder.vue
View file @
ad11c0d5
...
...
@@ -2,9 +2,10 @@
<div
class=
"consumptionOrder"
>
<div
class=
"searchBox"
>
<div
class=
"choosePeople"
@
click=
"choosePeople"
style=
"width: 120px"
>
选择消费人
</div>
<a-select
placeholder=
"经办人"
:allowClear=
"true"
style=
"width: 120px;margin-right: 20px;"
@
change=
"selectAgent"
>
<a-input
style=
"width: 120px;margin-right: 20px;"
placeholder=
"经办人"
v-model=
"searchSource.agentName"
/>
<!--
<a-select
placeholder=
"经办人"
:allowClear=
"true"
style=
"width: 120px;margin-right: 20px;"
@
change=
"selectAgent"
>
<a-select-option
v-for=
"(item, index) in agentList"
:key=
"index"
:value=
"item.ddUserId"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-select>
-->
<a-select
placeholder=
"状态"
:allowClear=
"true"
style=
"width: 120px;margin-right: 20px;"
@
change=
"selectHandlestatus"
>
<a-select-option
value=
"SUCCESS"
>
已消费
</a-select-option>
<a-select-option
value=
"REFUND_SUCCESS"
>
已退款
</a-select-option>
...
...
@@ -78,7 +79,7 @@ export default {
name
:
''
},
payStatus
:
''
,
agent
Id
:
''
agent
Name
:
''
},
agentList
:
[],
pagination
:
{
...
...
@@ -119,7 +120,7 @@ export default {
}
},
created
:
function
()
{
this
.
getAgentList
()
//
this.getAgentList()
this
.
queryOrderList
()
},
methods
:
{
...
...
@@ -128,14 +129,14 @@ export default {
this
.
queryOrderList
()
},
// 获取收银员列表
getAgentList
()
{
let
AgentData
=
{
userType
:
'1'
}
$http
.
get
(
`/mingpay/v1/isv/cashier/list_cashier_all`
,
AgentData
).
then
((
res
)
=>
{
this
.
agentList
=
res
.
data
.
data
})
},
//
getAgentList () {
//
let AgentData = {
//
userType: '1'
//
}
//
$http.get(`/mingpay/v1/isv/cashier/list_cashier_all`, AgentData).then((res) => {
//
this.agentList = res.data.data
//
})
//
},
// 选人组件调用
choosePeople
()
{
const
_that
=
this
...
...
@@ -184,7 +185,7 @@ export default {
this
.
searchSource
.
payStatus
=
value
},
selectAgent
(
value
)
{
this
.
searchSource
.
agent
Id
=
value
this
.
searchSource
.
agent
Name
=
value
},
search
()
{
this
.
pagination
.
current
=
1
...
...
@@ -194,7 +195,7 @@ export default {
let
RechargeData
=
{
pageNumber
:
10
,
currentPage
:
this
.
pagination
.
current
,
agent
Id
:
this
.
searchSource
.
agentId
,
agent
Name
:
this
.
searchSource
.
agentName
,
payStatus
:
this
.
searchSource
.
payStatus
,
buyerId
:
this
.
searchSource
.
UserMessage
.
emplId
}
...
...
src/components/pages/PaymentManagement/AllowancePayment.vue
View file @
ad11c0d5
...
...
@@ -27,9 +27,10 @@
<a-select-option
value=
"TRAVEL"
>
交通补助
</a-select-option>
<a-select-option
value=
"MEAL"
>
餐补
</a-select-option>
</a-select>
<a-select
placeholder=
"经办人"
:allowClear=
"true"
style=
"width: 100px;margin-left: 15px;"
@
change=
"selectAgent"
>
<a-input
style=
"width: 120px;margin-left: 15px;"
placeholder=
"经办人"
v-model=
"searchSource.agentName"
/>
<!--
<a-select
placeholder=
"经办人"
:allowClear=
"true"
style=
"width: 100px;margin-left: 15px;"
@
change=
"selectAgent"
>
<a-select-option
v-for=
"(item, index) in agentList"
:key=
"index"
:value=
"item.ddUserId"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-select>
-->
<a-button
type=
"primary"
@
click=
"search()"
style=
"margin-left: 15px;"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"changeModel()"
style=
"margin-left: 15px;"
><a-icon
type=
"pay-circle"
/>
发放津贴
</a-button>
</div>
...
...
@@ -39,7 +40,7 @@
{{
money
.
toFixed
(
2
)
}}
</span>
<span
slot=
"type"
slot-scope=
"type"
>
{{
type
===
'TRAVEL'
?
'交通补助'
:
'餐补'
}}
</span>
<span
slot=
"agent
Id
"
>
经办人
</span>
<span
slot=
"agent
Name
"
>
经办人
</span>
<span
slot=
"endTime"
slot-scope=
"endTime"
>
{{
endTime
.
split
(
" "
)[
0
]
}}
</span>
...
...
@@ -130,7 +131,7 @@ export default {
},
{
title
:
'经办人'
,
dataIndex
:
'agent
Id
'
dataIndex
:
'agent
Name
'
},
{
title
:
'状态'
,
dataIndex
:
'couponRecordStatus'
,
...
...
@@ -156,7 +157,7 @@ export default {
name
:
''
},
type
:
''
,
agent
Id
:
''
agent
Name
:
''
},
recordsList
:
[],
pagination
:
{
...
...
@@ -181,7 +182,7 @@ export default {
},
created
:
function
()
{
this
.
queryCouponRecordList
()
this
.
getAgentList
()
//
this.getAgentList()
},
methods
:
{
// 时间筛选
...
...
@@ -214,20 +215,20 @@ export default {
onChangeEndValue
(
date
,
dateString
)
{
this
.
endTime
=
dateString
},
// 获取收银员列表
getAgentList
()
{
let
AgentData
=
{
userType
:
'1'
}
$http
.
get
(
`/mingpay/v1/isv/cashier/list_cashier_all`
,
AgentData
).
then
((
res
)
=>
{
this
.
agentList
=
res
.
data
.
data
})
},
//
//
获取收银员列表
//
getAgentList () {
//
let AgentData = {
//
userType: '1'
//
}
//
$http.get(`/mingpay/v1/isv/cashier/list_cashier_all`, AgentData).then((res) => {
//
this.agentList = res.data.data
//
})
//
},
toAllowanceDetails
(
record
,
text
,
index
)
{
this
.
$router
.
push
({
name
:
'allowanceDetails'
,
params
:
{
allowanceDetails
:
record
.
grantNumber
}
})
},
selectAgent
(
value
)
{
this
.
searchSource
.
agent
Id
=
value
this
.
searchSource
.
agent
Name
=
value
},
disabledDate
(
current
)
{
// Can not select days before today and today
...
...
@@ -240,7 +241,7 @@ export default {
currentPage
:
this
.
pagination
.
current
,
pageNumber
:
this
.
pagination
.
defaultPageSize
,
subsidyType
:
this
.
searchSource
.
type
,
agent
Id
:
this
.
searchSource
.
agentId
,
agent
Name
:
this
.
searchSource
.
agentName
,
startTime
:
this
.
startTime
?
`
${
this
.
startTime
}
00:00:00`
:
''
,
endTime
:
this
.
endTime
?
`
${
this
.
endTime
}
23:59:59`
:
''
}
...
...
src/components/pages/PaymentManagement/CashierManagement.vue
View file @
ad11c0d5
...
...
@@ -33,7 +33,7 @@ export default {
name
:
''
},
status
:
''
,
agent
Id
:
''
agent
Name
:
''
},
columns
:
[{
title
:
'成员'
,
...
...
src/components/pages/PaymentManagement/PaymentManagementHome.vue
View file @
ad11c0d5
...
...
@@ -14,8 +14,8 @@
<a-menu-item
class=
"itemFlex"
key=
"allowancePayment"
><div
:class=
"[chooseMenuList === 'allowancePayment' ? 'menuIcon menuIcon3_2' : 'menuIcon menuIcon3_1']"
></div>
津贴发放
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"recordsOfConsumption"
><div
:class=
"[chooseMenuList === 'recordsOfConsumption' ? 'menuIcon menuIcon4_2' : 'menuIcon menuIcon4_1']"
></div>
消费记录
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"systemReconciliation"
><div
:class=
"[chooseMenuList === 'systemReconciliation' ? 'menuIcon menuIcon6_2' : 'menuIcon menuIcon6_1']"
></div>
系统对账
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"cashierManagement"
><div
:class=
"[chooseMenuList === 'cashierManagement' ? 'menuIcon menuIcon5_2' : 'menuIcon menuIcon5_1']"
></div>
设置收银员
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"SetAdministrators"
><div
:class=
"[chooseMenuList === 'SetAdministrators' ? 'menuIcon menuIcon5_2' : 'menuIcon menuIcon5_1']"
></div>
设置管理员
</a-menu-item>
<
!--
<
a-menu-item
class=
"itemFlex"
key=
"cashierManagement"
><div
:class=
"[chooseMenuList === 'cashierManagement' ? 'menuIcon menuIcon5_2' : 'menuIcon menuIcon5_1']"
></div>
设置收银员
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"SetAdministrators"
><div
:class=
"[chooseMenuList === 'SetAdministrators' ? 'menuIcon menuIcon5_2' : 'menuIcon menuIcon5_1']"
></div>
设置管理员
</a-menu-item>
-->
<a-menu-item
class=
"itemFlex"
key=
"paymentManagementSetting"
><div
:class=
"[chooseMenuList === 'paymentManagementSetting' ? 'menuIcon menuIcon7_2' : 'menuIcon menuIcon7_1']"
></div>
设置中心
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"operationLog"
><div
:class=
"[chooseMenuList === 'operationLog' ? 'menuIcon menuIcon8_2' : 'menuIcon menuIcon8_1']"
></div>
操作日志
</a-menu-item>
</a-menu>
...
...
src/components/pages/PaymentManagement/RechargeRecord.vue
View file @
ad11c0d5
...
...
@@ -2,9 +2,10 @@
<div
class=
"RechargeRecord"
>
<div
class=
"searchBox"
>
<div
class=
"choosePeople"
@
click=
"choosePeople"
style=
"width: 120px"
>
选择成员
</div>
<a-select
placeholder=
"经办人"
:allowClear=
"true"
style=
"width: 120px;margin-right: 20px;"
@
change=
"selectAgent"
>
<a-input
style=
"width: 120px;margin-right: 20px;"
placeholder=
"经办人"
v-model=
"searchSource.agentName"
/>
<!--
<a-select
placeholder=
"经办人"
:allowClear=
"true"
style=
"width: 120px;margin-right: 20px;"
@
change=
"selectAgent"
>
<a-select-option
v-for=
"(item, index) in agentList"
:key=
"index"
:value=
"item.ddUserId"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-select>
-->
<a-select
placeholder=
"状态"
:allowClear=
"true"
style=
"width: 120px;margin-right: 20px;"
@
change=
"selectHandlestatus"
>
<a-select-option
value=
"SUCCESS"
>
已完成
</a-select-option>
<a-select-option
value=
"WAITING_PERMIT"
>
审批中
</a-select-option>
...
...
@@ -104,7 +105,7 @@ export default {
name
:
''
},
status
:
''
,
agent
Id
:
''
agent
Name
:
''
},
agentList
:
[]
}
...
...
@@ -113,18 +114,18 @@ export default {
computed
:
{},
created
:
function
()
{
this
.
queryRechargeList
()
this
.
getAgentList
()
//
this.getAgentList()
},
methods
:
{
// 获取收银员列表
getAgentList
()
{
let
AgentData
=
{
userType
:
'1'
}
$http
.
get
(
`/mingpay/v1/isv/cashier/list_cashier_all`
,
AgentData
).
then
((
res
)
=>
{
this
.
agentList
=
res
.
data
.
data
})
},
//
getAgentList () {
//
let AgentData = {
//
userType: '1'
//
}
//
$http.get(`/mingpay/v1/isv/cashier/list_cashier_all`, AgentData).then((res) => {
//
this.agentList = res.data.data
//
})
//
},
// 选人组件调用
choosePeople
()
{
const
_that
=
this
...
...
@@ -173,13 +174,13 @@ export default {
this
.
searchSource
.
status
=
value
},
selectAgent
(
value
)
{
this
.
searchSource
.
agent
Id
=
value
this
.
searchSource
.
agent
Name
=
value
},
queryRechargeList
()
{
let
RechargeData
=
{
pageNumber
:
10
,
currentPage
:
this
.
pagination
.
current
,
agent
Id
:
this
.
searchSource
.
agentId
,
agent
Name
:
this
.
searchSource
.
agentName
,
status
:
this
.
searchSource
.
status
,
ddUserId
:
this
.
searchSource
.
UserMessage
.
emplId
}
...
...
src/components/pages/PaymentManagement/RecordsOfConsumption.vue
View file @
ad11c0d5
...
...
@@ -6,9 +6,10 @@
<a-select-option
value=
"SUCCESS"
>
已消费
</a-select-option>
<a-select-option
value=
"REFUND_SUCCESS"
>
已退款
</a-select-option>
</a-select>
<a-select
placeholder=
"收银员"
:allowClear=
"true"
style=
"width: 120px;margin-right: 20px;"
@
change=
"selectagent"
>
<a-input
style=
"width: 120px;margin-right: 20px;"
placeholder=
"收银员"
v-model=
"searchSource.agentName"
/>
<!--
<a-select
placeholder=
"收银员"
:allowClear=
"true"
style=
"width: 120px;margin-right: 20px;"
@
change=
"selectagent"
>
<a-select-option
v-for=
"item in agentList"
:value=
"item.ddUserId"
:key=
"item.ddUserId"
>
{{
item
.
name
}}
</a-select-option>
</a-select>
</a-select>
-->
<a-button
type=
"primary"
@
click=
"search()"
>
查询
</a-button>
</div>
<div
class=
"searchUserMessage"
v-if=
"searchSource.UserMessage.emplId"
>
...
...
@@ -127,7 +128,7 @@ export default {
name
:
''
},
status
:
''
,
agent
Id
:
''
agent
Name
:
''
},
recordsList
:
[],
pagination
:
{
...
...
@@ -145,19 +146,19 @@ export default {
},
created
:
function
()
{
this
.
queryRecordList
()
this
.
queryAgentList
()
//
this.queryAgentList()
},
methods
:
{
queryAgentList
()
{
let
CashierListData
=
{
userType
:
'0'
}
$http
.
get
(
`/mingpay/v1/isv/cashier/list_cashier_all`
,
CashierListData
).
then
((
res
)
=>
{
this
.
agentList
=
res
.
data
.
data
}).
catch
(()
=>
{
this
.
$message
.
error
(
'获取操作员信息失败'
)
})
},
//
queryAgentList () {
//
let CashierListData = {
//
userType: '0'
//
}
//
$http.get(`/mingpay/v1/isv/cashier/list_cashier_all`, CashierListData).then((res) => {
//
this.agentList = res.data.data
//
}).catch(() => {
//
this.$message.error('获取操作员信息失败')
//
})
//
},
refundModal
(
record
,
text
,
index
)
{
this
.
visible
=
!
this
.
visible
this
.
refundSelect
=
record
...
...
@@ -209,7 +210,7 @@ export default {
pageNumber
:
this
.
pagination
.
defaultPageSize
,
status
:
this
.
searchSource
.
status
,
ddUserId
:
this
.
searchSource
.
UserMessage
.
emplId
,
agent
Id
:
this
.
searchSource
.
agentId
agent
Name
:
this
.
searchSource
.
agentName
}
$http
.
get
(
`/mingpay/v1/isv/consume/list_expense_record`
,
RecordListData
).
then
((
res
)
=>
{
let
data
=
res
.
data
.
data
...
...
@@ -278,10 +279,10 @@ export default {
// 搜索条件消费单状态
selectHandRecords
(
value
)
{
this
.
searchSource
.
status
=
value
},
selectagent
(
value
)
{
this
.
searchSource
.
agentId
=
value
}
// selectagent (value) {
// this.searchSource.agentId = value
// }
}
}
</
script
>
...
...
src/components/pages/PaymentManagement/SetAdministrators.vue
View file @
ad11c0d5
...
...
@@ -33,7 +33,7 @@ export default {
name
:
''
},
status
:
''
,
agent
Id
:
''
agent
Name
:
''
},
columns
:
[{
title
:
'成员'
,
...
...
src/components/pages/rightsManagement/addOrRights.vue
View file @
ad11c0d5
This diff is collapsed.
Click to expand it.
src/components/pages/rightsManagement/rightsManagement.vue
View file @
ad11c0d5
...
...
@@ -63,7 +63,7 @@ export default {
dataIndex
:
'roleName'
},
{
title
:
'角色描述'
,
dataIndex
:
'roleDes'
dataIndex
:
'roleDes
c
'
},
{
title
:
'拥有该角色的员工'
,
dataIndex
:
'userHasRoles'
,
...
...
@@ -147,7 +147,7 @@ export default {
if
(
item
.
roleCode
===
'ROLE_SUPER_ADMIN'
)
{
let
userHasRoles
=
[]
item
.
userList
.
forEach
((
userItem
,
userIndex
)
=>
{
userHasRoles
.
push
(
userItem
.
usern
ame
)
userHasRoles
.
push
(
userItem
.
realN
ame
)
this
.
superAdministratorListId
.
push
(
userItem
.
ddUserId
)
})
this
.
superAdministratorList
.
push
({
...
...
@@ -160,14 +160,14 @@ export default {
let
userHasRoles
=
[]
let
ddUserId
=
[]
item
.
userList
.
forEach
((
userItem
,
userIndex
)
=>
{
userHasRoles
.
push
(
userItem
.
usern
ame
)
userHasRoles
.
push
(
userItem
.
realN
ame
)
ddUserId
.
push
(
userItem
.
ddUserId
)
})
this
.
roleList
.
push
({
key
:
item
.
roleId
,
roleName
:
item
.
roleName
,
userHasRoles
:
userHasRoles
,
roleDes
:
item
.
roleDesc
,
roleDes
c
:
item
.
roleDesc
,
creatTime
:
item
.
createTime
,
action
:
{
ddUserId
:
ddUserId
,
name
:
userHasRoles
}
})
...
...
src/components/pages/rightsManagement/tree.vue
0 → 100644
View file @
ad11c0d5
<
template
>
<div
:class=
"classId[idx][0]"
>
<div
v-for=
"(tree, index) in trees"
:key=
"tree.id"
>
<div
:class=
"classId[idx][1]"
>
<!--
{{
tree
.
checkedList
}}
{{
tree
.
children
.
length
}}
{{
tree
.
indeterminate
}}
{{
tree
.
checkAll
}}
-->
<a-checkbox
@
change=
"e=>
{onChange(tree, index, e)}"
:indeterminate="tree.indeterminate === true"
:checked="selectList.indexOf(tree.id)>-1?tree.checkAll=true:tree.checkAll=false"
v-model="tree.checkAll"
>
{{
tree
.
name
}}
</a-checkbox>
</div>
<tree
v-model=
"selectList"
v-if=
"tree.children.length > 0"
v-on:closeParent=
"close"
:trees=
"tree.children"
:classId=
"classId"
:idx=
"idx+1"
></tree>
</div>
</div>
</
template
>
<
script
>
export
default
{
name
:
'tree'
,
props
:
{
value
:
{
type
:
Array
,
default
:
function
()
{
return
[]
}
},
trees
:
{
type
:
Array
,
default
:
function
()
{
return
[]
}
},
classId
:
{
type
:
Array
,
default
:
function
()
{
return
[]
}
},
idx
:
{
type
:
Number
,
default
:
function
()
{
return
null
}
}
},
watch
:
{
value
(
val
)
{
this
.
selectList
=
val
}
},
data
()
{
return
{
selectList
:
this
.
value
}
},
methods
:
{
close
(
data
)
{
let
oIndex
this
.
trees
.
map
((
item
,
index
)
=>
{
if
(
item
.
id
===
data
.
parentId
)
oIndex
=
index
})
let
isIndeterminate
=
false
this
.
trees
[
oIndex
].
children
.
map
(
item
=>
{
if
(
item
.
indeterminate
)
isIndeterminate
=
true
})
if
(
isIndeterminate
)
{
this
.
trees
[
oIndex
].
indeterminate
=
true
}
else
if
(
data
.
checkedList
.
length
===
0
||
data
.
checkedList
.
length
===
this
.
trees
[
oIndex
].
children
.
length
)
{
this
.
trees
[
oIndex
].
indeterminate
=
false
}
else
{
this
.
trees
[
oIndex
].
indeterminate
=
true
}
var
ind
=
this
.
selectList
.
indexOf
(
data
.
parentId
)
if
(
ind
===
-
1
)
{
this
.
selectList
.
push
(
data
.
parentId
)
}
else
if
(
ind
!==
-
1
&&
data
.
checkedList
.
length
===
0
)
{
this
.
selectList
.
splice
(
ind
,
1
)
}
this
.
trees
[
oIndex
].
checkedList
=
data
.
checkedList
if
(
data
.
checkedList
.
length
===
0
)
this
.
trees
[
oIndex
].
checkAll
=
false
var
checkedList
=
[]
this
.
trees
.
map
(
ele
=>
{
if
(
ele
.
checkAll
)
checkedList
.
push
(
ele
.
id
)
})
this
.
$emit
(
'closeParent'
,
{
parentId
:
this
.
trees
[
oIndex
].
parentId
,
checkedList
,
trees
:
this
.
trees
})
},
onChange
(
tree
,
index
,
e
)
{
let
that
=
this
var
ind
=
this
.
selectList
.
indexOf
(
tree
.
id
)
// 当存在
if
(
!
e
.
target
.
checked
)
{
// 删除当前选中数据
this
.
selectList
.
splice
(
ind
,
1
)
tree
.
indeterminate
=
false
tree
.
checkedList
=
[]
// 选中的时候先向下递归添加是否选中同时删除所有id
const
isCheckAll
=
data
=>
data
.
map
(
item
=>
{
// 将子节点全部置位false
item
.
indeterminate
=
false
item
.
checkAll
=
false
if
(
that
.
selectList
.
indexOf
(
item
.
id
)
!==
-
1
)
that
.
selectList
.
splice
(
that
.
selectList
.
indexOf
(
item
.
id
),
1
)
item
.
checkedList
=
[]
return
{
...
item
,
children
:
isCheckAll
(
item
.
children
)
}
})
this
.
trees
[
index
].
children
=
isCheckAll
(
this
.
trees
[
index
].
children
)
let
checkedList
=
[]
this
.
trees
.
map
(
ele
=>
{
if
(
ele
.
checkAll
)
checkedList
.
push
(
ele
.
id
)
})
this
.
$emit
(
'closeParent'
,
{
parentId
:
this
.
trees
[
index
].
parentId
,
checkedList
:
checkedList
,
index
})
}
else
{
// 不存在 则新增
this
.
selectList
.
push
(
tree
.
id
)
tree
.
indeterminate
=
false
tree
.
checkedList
=
tree
.
plainOptions
// 选中的时候先向下递归添加是否选中同时删除所有id
const
isCheckAll
=
data
=>
data
.
map
(
item
=>
{
// 将子节点全部置位false
item
.
indeterminate
=
false
item
.
checkAll
=
true
if
(
that
.
selectList
.
indexOf
(
item
.
id
)
===
-
1
)
that
.
selectList
.
push
(
item
.
id
)
item
.
checkedList
=
item
.
plainOptions
return
{
...
item
,
children
:
isCheckAll
(
item
.
children
)
}
})
this
.
trees
[
index
].
children
=
isCheckAll
(
this
.
trees
[
index
].
children
)
let
checkedList
=
[]
this
.
trees
.
map
(
ele
=>
{
if
(
ele
.
checkAll
)
checkedList
.
push
(
ele
.
id
)
})
this
.
$emit
(
'closeParent'
,
{
parentId
:
this
.
trees
[
index
].
parentId
,
checkedList
:
checkedList
})
}
}
}
}
</
script
>
<
style
scoped
>
.permisson
{
display
:
flex
;
height
:
500px
;
}
.permissonLeft
{
height
:
65px
;
line-height
:
65px
;
font-weight
:
400
;
width
:
9.5%
;
text-align
:
right
;
font-size
:
14px
;
color
:
rgba
(
0
,
0
,
0
,
0.85
);
}
.permissonRight
{
font-family
:
'PingFangSC-Medium;'
;
height
:
500px
;
width
:
100%
;
font-size
:
14px
;
color
:
rgba
(
0
,
0
,
0
,
0.85
);
}
.permissonTitle
{
padding
:
22px
20px
;
background
:
#FAFAFA
;
border
:
1px
solid
#F8F8F8
;
border-radius
:
4px
4px
0px
0px
;
}
.confirm
{
margin-top
:
40px
;
}
.addOrRights
/
deep
/
.ant-checkbox-group
{
width
:
100%
!important
;
color
:
rgba
(
0
,
0
,
0
,
0.85
);
}
.addOrRights
/
deep
/
.ant-row
{
width
:
100%
!important
;
}
.selectPeople
{
width
:
100%
;
font-size
:
14px
;
color
:
#cccccc
;
min-height
:
40px
;
line-height
:
40px
;
margin-left
:
5px
;
text-indent
:
10px
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.15
);
border-radius
:
5px
;
}
.box2
>
div
{
display
:
flex
;
border
:
1px
solid
#f8f8f8
;
}
.box2-2
{
flex
:
4
;
border-right
:
1px
solid
#f8f8f8
;
display
:
flex
;
align-items
:
center
;
padding-left
:
20px
;
}
.box3
{
flex
:
20
;
padding-top
:
22px
;
}
.box3
>
div
{
width
:
25%
;
float
:
left
;
}
.box3-3
{
padding-bottom
:
22px
;
padding-left
:
22px
;
}
</
style
>
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