Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
T
total-platform
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
物业总平台
total-platform
Commits
17f0a0a9
提交
17f0a0a9
authored
8月 29, 2023
作者:
宋雄
浏览文件
操作
浏览文件
下载
差异文件
合并2.0
上级
f24a5d72
6de553f9
全部展开
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
758 行增加
和
9 行删除
+758
-9
api.js
src/api/api.js
+10
-1
PartnersDetails.vue
src/views/settled/partners/PartnersDetails.vue
+0
-0
PartnersList.vue
src/views/settled/partners/PartnersList.vue
+0
-0
RoleDataruleModal.vue
src/views/settled/partners/modules/RoleDataruleModal.vue
+121
-0
SelectRulesModal.vue
src/views/settled/partners/modules/SelectRulesModal.vue
+221
-0
ShareBalanceModal.vue
src/views/settled/partners/modules/ShareBalanceModal.vue
+201
-0
UserRoleModal.vue
src/views/settled/partners/modules/UserRoleModal.vue
+201
-0
UserModal.vue
src/views/system/modules/UserModal.vue
+4
-8
没有找到文件。
src/api/api.js
浏览文件 @
17f0a0a9
...
@@ -89,6 +89,7 @@ const getVisitInfo = (params)=>getAction("/sys/visitInfo",params);
...
@@ -89,6 +89,7 @@ const getVisitInfo = (params)=>getAction("/sys/visitInfo",params);
const
queryUserByDepId
=
(
params
)
=>
getAction
(
"/sys/user/queryUserByDepId"
,
params
);
const
queryUserByDepId
=
(
params
)
=>
getAction
(
"/sys/user/queryUserByDepId"
,
params
);
// 重复校验
// 重复校验
const
checkOnlyUserName
=
(
params
)
=>
getAction
(
"/sys/user/checkOnlyUserName"
,
params
);
// 用户账号
const
duplicateCheck
=
(
params
)
=>
getAction
(
"/sys/duplicate/check"
,
params
);
const
duplicateCheck
=
(
params
)
=>
getAction
(
"/sys/duplicate/check"
,
params
);
// 加载分类字典
// 加载分类字典
const
loadCategoryData
=
(
params
)
=>
getAction
(
"/sys/category/loadAllData"
,
params
);
const
loadCategoryData
=
(
params
)
=>
getAction
(
"/sys/category/loadAllData"
,
params
);
...
@@ -115,6 +116,10 @@ const getCouncilsDetailApi = (params)=>getAction("/property-central/councils/pro
...
@@ -115,6 +116,10 @@ const getCouncilsDetailApi = (params)=>getAction("/property-central/councils/pro
const
auditCouncilsApi
=
(
params
)
=>
postAction
(
"/property-central/councils/propertyCouncils/audit"
,
params
);
const
auditCouncilsApi
=
(
params
)
=>
postAction
(
"/property-central/councils/propertyCouncils/audit"
,
params
);
const
freezeOrCouncilsApi
=
(
params
)
=>
getAction
(
`/property-central/councils/propertyCouncils/freezeOrThaw/
${
params
.
id
}
/
${
params
.
status
}
`
,{});
const
freezeOrCouncilsApi
=
(
params
)
=>
getAction
(
`/property-central/councils/propertyCouncils/freezeOrThaw/
${
params
.
id
}
/
${
params
.
status
}
`
,{});
const
getPartnersDetailApi
=
(
params
)
=>
getAction
(
"/property-central/partners/partnersInfo/queryById"
,
params
);
const
auditPartnersApi
=
(
params
)
=>
postAction
(
"/property-central/partners/partnersInfo/audit"
,
params
);
const
operatePartnersApi
=
(
params
)
=>
getAction
(
`/property-central/partners/partnersInfo/operate/
${
params
.
id
}
/
${
params
.
status
}
`
,{});
//费用管理
//费用管理
const
getCostListApi
=
(
params
)
=>
getAction
(
"/property-central/property/propertyChargrule/list"
,
params
);
const
getCostListApi
=
(
params
)
=>
getAction
(
"/property-central/property/propertyChargrule/list"
,
params
);
const
getCostDetailApi
=
(
params
)
=>
getAction
(
"/property-central/property/propertyChargrule/queryById"
,
params
);
const
getCostDetailApi
=
(
params
)
=>
getAction
(
"/property-central/property/propertyChargrule/queryById"
,
params
);
...
@@ -200,6 +205,7 @@ export {
...
@@ -200,6 +205,7 @@ export {
getLoginfo
,
getLoginfo
,
getVisitInfo
,
getVisitInfo
,
queryUserByDepId
,
queryUserByDepId
,
checkOnlyUserName
,
duplicateCheck
,
duplicateCheck
,
queryTreeListForRole
,
queryTreeListForRole
,
queryTreeListByTypeForRole
,
queryTreeListByTypeForRole
,
...
@@ -252,7 +258,10 @@ export {
...
@@ -252,7 +258,10 @@ export {
queryByIdIntegralDetailApi
,
queryByIdIntegralDetailApi
,
refundQueryByIdApi
,
refundQueryByIdApi
,
auditRefundOrderApi
,
auditRefundOrderApi
,
confirmRefundOrderApi
confirmRefundOrderApi
,
getPartnersDetailApi
,
auditPartnersApi
,
operatePartnersApi
}
}
...
...
src/views/settled/partners/PartnersDetails.vue
0 → 100644
浏览文件 @
17f0a0a9
差异被折叠。
点击展开。
src/views/settled/partners/PartnersList.vue
0 → 100644
浏览文件 @
17f0a0a9
差异被折叠。
点击展开。
src/views/settled/partners/modules/RoleDataruleModal.vue
0 → 100644
浏览文件 @
17f0a0a9
<
template
>
<a-drawer
title=
"数据规则/按钮权限配置"
width=
"365"
:closable=
"false"
@
close=
"onClose"
:visible=
"visible"
>
<a-tabs
defaultActiveKey=
"1"
>
<a-tab-pane
tab=
"数据规则"
key=
"1"
>
<a-checkbox-group
v-model=
"dataruleChecked"
v-if=
"dataruleList.length>0"
>
<a-row>
<a-col
:span=
"24"
v-for=
"(item,index) in dataruleList"
:key=
" 'dr'+index "
>
<a-checkbox
:value=
"item.id"
>
{{
item
.
ruleName
}}
</a-checkbox>
</a-col>
<a-col
:span=
"24"
>
<div
style=
"width: 100%;margin-top: 15px"
>
<a-button
@
click=
"saveDataruleForRole"
type=
"primary"
size=
"small"
icon=
"save"
>
点击保存
</a-button>
</div>
</a-col>
</a-row>
</a-checkbox-group>
<div
v-else
><h3>
无配置信息!
</h3></div>
</a-tab-pane>
<!--
<a-tab-pane
tab=
"按钮权限"
key=
"2"
>
敬请期待!!!
</a-tab-pane>
-->
</a-tabs>
</a-drawer>
</
template
>
<
script
>
import
ARow
from
'ant-design-vue/es/grid/Row'
import
ACol
from
'ant-design-vue/es/grid/Col'
import
{
getAction
,
postAction
}
from
'@/api/manage'
export
default
{
name
:
'RoleDataruleModal'
,
components
:
{
ACol
,
ARow
},
data
(){
return
{
functionId
:
''
,
roleId
:
''
,
visible
:
false
,
tabList
:
[{
key
:
'1'
,
tab
:
'数据规则'
,
},
{
key
:
'2'
,
tab
:
'按钮权限'
,
}],
activeTabKey
:
'1'
,
url
:{
datarule
:
"/sys/role/datarule"
,
},
dataruleList
:[],
dataruleChecked
:[]
}
},
methods
:{
loadData
(){
getAction
(
`
${
this
.
url
.
datarule
}
/
${
this
.
functionId
}
/
${
this
.
roleId
}
`
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
.
success
){
this
.
dataruleList
=
res
.
result
.
datarule
let
drChecked
=
res
.
result
.
drChecked
if
(
drChecked
){
this
.
dataruleChecked
=
drChecked
.
split
(
","
)
}
}
})
},
saveDataruleForRole
(){
if
(
!
this
.
dataruleChecked
||
this
.
dataruleChecked
.
length
==
0
){
this
.
$message
.
warning
(
"请注意,现未勾选任何数据权限!"
)
}
let
params
=
{
permissionId
:
this
.
functionId
,
roleId
:
this
.
roleId
,
dataRuleIds
:
this
.
dataruleChecked
.
join
(
","
)
}
console
.
log
(
"保存数据权限"
,
params
)
postAction
(
this
.
url
.
datarule
,
params
).
then
(
res
=>
{
if
(
res
.
success
){
this
.
$message
.
success
(
res
.
message
)
}
else
{
this
.
$message
.
error
(
res
.
message
)
}
})
},
show
(
functionId
,
roleId
){
this
.
onReset
()
this
.
functionId
=
functionId
this
.
roleId
=
roleId
this
.
visible
=
true
this
.
loadData
()
},
onClose
(){
this
.
visible
=
false
this
.
onReset
()
},
onTabChange
(
key
)
{
this
.
activeTabKey
=
key
},
onReset
(){
this
.
functionId
=
''
this
.
roleId
=
''
this
.
dataruleList
=
[]
this
.
dataruleChecked
=
[]
}
}
}
</
script
>
<
style
scoped
>
</
style
>
\ No newline at end of file
src/views/settled/partners/modules/SelectRulesModal.vue
0 → 100644
浏览文件 @
17f0a0a9
<
template
>
<div>
<a-modal
centered
:title=
"title"
:width=
"1000"
:visible=
"visible"
@
ok=
"selectRulesOK"
@
cancel=
"handleCancel"
cancelText=
"关闭"
>
<!-- 查询区域 -->
<div
class=
"table-page-search-wrapper"
>
<a-form
layout=
"inline"
@
keyup
.
enter
.
native=
"searchQuery"
>
<a-row
:gutter=
"24"
>
<a-col
:span=
"10"
>
<a-form-item
label=
"分利规则名称"
>
<a-input
placeholder=
"请输入分利规则名称"
v-model=
"queryParam.ruleName"
></a-input>
</a-form-item>
</a-col>
<a-col
:span=
"8"
>
<span
style=
"float: left;overflow: hidden;"
class=
"table-page-search-submitButtons"
>
<a-button
type=
"primary"
@
click=
"searchQuery"
icon=
"search"
>
查询
</a-button>
<a-button
type=
"primary"
@
click=
"searchReset"
icon=
"reload"
style=
"margin-left: 8px"
>
重置
</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!-- table区域-begin -->
<div>
<a-table
size=
"small"
bordered
rowKey=
"id"
:columns=
"columns"
:dataSource=
"dataSource1"
:pagination=
"ipagination"
:loading=
"loading"
:scroll=
"
{ y: 240 }"
:rowSelection="{selectedRowKeys: selectedRowKeys,onSelect:onSelect,onChange: onSelectChange}"
@change="handleTableChange">
</a-table>
</div>
<!-- table区域-end -->
</a-modal>
</div>
</
template
>
<
script
>
import
{
filterObj
}
from
'@/utils/util'
import
{
getAction
}
from
'@/api/manage'
export
default
{
name
:
"selectRulesModal"
,
data
()
{
return
{
title
:
"选择小区"
,
names
:
[],
visible
:
false
,
// 查询条件
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'分利规则名称'
,
align
:
"center"
,
width
:
100
,
dataIndex
:
'ruleName'
},
{
title
:
'判断条件'
,
align
:
"center"
,
width
:
100
,
dataIndex
:
'judgingCondition'
},
{
title
:
'sass总平台分利'
,
align
:
"center"
,
width
:
150
,
dataIndex
:
'saasBenefits'
},
{
title
:
'合作伙伴分利'
,
align
:
"center"
,
width
:
100
,
dataIndex
:
'partnerBenefits'
},
{
title
:
'小区分利'
,
align
:
"center"
,
width
:
100
,
dataIndex
:
'communityBenefits'
},
],
//数据集
dataSource1
:
[],
// 分页参数
ipagination
:
{
current
:
1
,
pageSize
:
10
,
pageSizeOptions
:
[
'10'
,
'20'
,
'30'
],
showTotal
:
(
total
,
range
)
=>
{
return
range
[
0
]
+
"-"
+
range
[
1
]
+
" 共"
+
total
+
"条"
},
showQuickJumper
:
true
,
showSizeChanger
:
true
,
total
:
0
},
isorter
:
{
column
:
'createTime'
,
order
:
'desc'
,
},
loading
:
false
,
selectedRowKeys
:
[],
selectedRows
:
[],
selectedCurrently
:[],
// selectedRowKeys:[],
url
:
{
list
:
"/property-central/sharerule/shareRule/list"
,
}
}
},
created
()
{
this
.
loadData
();
},
methods
:
{
searchQuery
()
{
this
.
loadData
(
1
);
},
searchReset
()
{
this
.
queryParam
=
{};
this
.
loadData
(
1
);
},
handleCancel
()
{
this
.
visible
=
false
;
},
selectRulesOK
()
{
this
.
$emit
(
"selectFinished"
,
this
.
selectedCurrently
);
this
.
visible
=
false
;
},
loadData
(
arg
)
{
//加载数据 若传入参数1则加载第一页的内容
if
(
arg
===
1
)
{
this
.
ipagination
.
current
=
1
;
}
var
params
=
this
.
getQueryParams
();
//查询条件
getAction
(
this
.
url
.
list
,
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
dataSource1
=
res
.
result
.
records
;
this
.
ipagination
.
total
=
res
.
result
.
total
;
}
})
},
getQueryParams
()
{
var
param
=
Object
.
assign
({},
this
.
queryParam
,
this
.
isorter
);
param
.
pageNo
=
this
.
ipagination
.
current
;
param
.
pageSize
=
this
.
ipagination
.
pageSize
;
return
filterObj
(
param
);
},
onSelect
(
record
,
selected
)
{
// if (selected === true) {
// this.selectedCurrently = record;
// }
},
onSelectChange
(
selectedRowKeys
,
selectedRows
)
{
this
.
selectedRowKeys
=
selectedRowKeys
;
this
.
selectionRows
=
selectedRows
;
this
.
selectedCurrently
=
selectedRows
;
},
handleTableChange
(
pagination
,
filters
,
sorter
)
{
//分页、排序、筛选变化时触发
console
.
log
(
sorter
);
//TODO 筛选
if
(
Object
.
keys
(
sorter
).
length
>
0
)
{
this
.
isorter
.
column
=
sorter
.
field
;
this
.
isorter
.
order
=
"ascend"
==
sorter
.
order
?
"asc"
:
"desc"
}
this
.
ipagination
=
pagination
;
this
.
loadData
();
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.ant-card-body .table-operator {
margin-bottom: 18px;
}
.ant-table-tbody .ant-table-row td {
padding-top: 15px;
padding-bottom: 15px;
}
.anty-row-operator button {
margin: 0 5px
}
.ant-btn-danger {
background-color: #ffffff
}
.ant-modal-cust-warp {
height: 100%
}
.ant-modal-cust-warp .ant-modal-body {
height: calc(100% - 110px) !important;
overflow-y: auto
}
.ant-modal-cust-warp .ant-modal-content {
height: 90% !important;
overflow-y: hidden
}
</
style
>
\ No newline at end of file
src/views/settled/partners/modules/ShareBalanceModal.vue
0 → 100644
浏览文件 @
17f0a0a9
<
template
>
<div>
<a-modal
centered
:title=
"title"
:width=
"1000"
:visible=
"visible"
:footer=
"null"
@
cancel=
"handleCancel"
cancelText=
"关闭"
>
<!-- table区域-begin -->
<div>
<a-table
size=
"small"
bordered
rowKey=
"id"
:columns=
"columns"
:dataSource=
"dataSource1"
:pagination=
"ipagination"
:loading=
"loading"
@
change=
"handleTableChange"
>
<span
slot=
"balanceStatus"
slot-scope=
"text, record"
>
<a-tag
color=
"blue"
v-if=
"record.balanceStatus === 2"
>
结算待审核
</a-tag>
<a-tag
color=
"green"
v-else-if=
"record.balanceStatus === 3"
>
已结算
</a-tag>
<a-tag
color=
"red"
v-else-if=
"record.balanceStatus === 4"
>
结算驳回
</a-tag>
</span>
</a-table>
</div>
<!-- table区域-end -->
</a-modal>
</div>
</
template
>
<
script
>
import
{
filterObj
}
from
'@/utils/util'
import
{
getAction
}
from
'@/api/manage'
export
default
{
name
:
'ShareBalanceModal'
,
data
()
{
return
{
title
:
'推广费用明细'
,
names
:
[],
visible
:
false
,
// 查询条件
queryParam
:
{},
// 表头
columns
:
[
{
title
:
'结算单号'
,
dataIndex
:
'balanceNum'
,
key
:
'balanceNum'
,
align
:
'center'
,
},
{
title
:
'提交时间'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
align
:
'center'
,
},
{
title
:
'提交人'
,
dataIndex
:
'createBy'
,
key
:
'createBy'
,
align
:
'center'
,
},
{
title
:
'结算总金额'
,
dataIndex
:
'balanceMoney'
,
key
:
'balanceMoney'
,
align
:
'center'
,
},
// {
// title: '账单数量',
// dataIndex: 'balanceCount',
// key: 'balanceCount',
// align: 'center',
// },
{
title
:
'结算方式'
,
dataIndex
:
'balanceWay'
,
key
:
'balanceWay'
,
align
:
'center'
,
},
{
title
:
'结算状态'
,
dataIndex
:
'balanceStatus'
,
scopedSlots
:
{
customRender
:
'balanceStatus'
},
key
:
'balanceStatus'
,
align
:
'center'
,
},
],
//数据集
dataSource1
:
[],
// 分页参数
ipagination
:
{
current
:
1
,
pageSize
:
10
,
pageSizeOptions
:
[
'10'
,
'20'
,
'30'
],
showTotal
:
(
total
,
range
)
=>
{
return
range
[
0
]
+
'-'
+
range
[
1
]
+
' 共'
+
total
+
'条'
},
showQuickJumper
:
true
,
showSizeChanger
:
true
,
total
:
0
,
},
isorter
:
{
column
:
'createTime'
,
order
:
'desc'
,
},
loading
:
false
,
selectedRowKeys
:
[],
selectedRows
:
[],
selectedShops
:
{},
url
:
{
list
:
'/property-central/partners/shareBalance/list'
,
},
platformCode
:
''
,
}
},
methods
:
{
show
(
platformCode
)
{
this
.
platformCode
=
platformCode
this
.
visible
=
true
},
searchQuery
()
{
this
.
loadData
(
1
)
},
searchReset
()
{
this
.
queryParam
=
{}
this
.
loadData
(
1
)
},
handleCancel
()
{
this
.
visible
=
false
},
loadData
(
arg
)
{
//加载数据 若传入参数1则加载第一页的内容
if
(
arg
===
1
)
{
this
.
ipagination
.
current
=
1
}
var
params
=
this
.
getQueryParams
()
//查询条件
params
.
platformCode
=
this
.
platformCode
params
.
platformType
=
'partner'
params
.
balanceStatus
=
3
getAction
(
this
.
url
.
list
,
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
this
.
dataSource1
=
res
.
result
.
records
this
.
ipagination
.
total
=
res
.
result
.
total
}
})
},
getQueryParams
()
{
var
param
=
Object
.
assign
({},
this
.
queryParam
,
this
.
isorter
)
param
.
pageNo
=
this
.
ipagination
.
current
param
.
pageSize
=
this
.
ipagination
.
pageSize
return
filterObj
(
param
)
},
handleTableChange
(
pagination
,
filters
,
sorter
)
{
//分页、排序、筛选变化时触发
console
.
log
(
sorter
)
//TODO 筛选
if
(
Object
.
keys
(
sorter
).
length
>
0
)
{
this
.
isorter
.
column
=
sorter
.
field
this
.
isorter
.
order
=
'ascend'
==
sorter
.
order
?
'asc'
:
'desc'
}
this
.
ipagination
=
pagination
this
.
loadData
()
},
},
watch
:
{
visible
()
{
if
(
this
.
visible
)
{
this
.
loadData
(
1
)
}
},
},
}
</
script
>
<
style
lang=
"less"
scoped
>
.ant-card-body .table-operator {
margin-bottom: 18px;
}
.ant-table-tbody .ant-table-row td {
padding-top: 15px;
padding-bottom: 15px;
}
.anty-row-operator button {
margin: 0 5px;
}
.ant-btn-danger {
background-color: #ffffff;
}
.ant-modal-cust-warp {
height: 100%;
}
.ant-modal-cust-warp .ant-modal-body {
height: calc(100% - 110px) !important;
overflow-y: auto;
}
.ant-modal-cust-warp .ant-modal-content {
height: 90% !important;
overflow-y: hidden;
}
</
style
>
\ No newline at end of file
src/views/settled/partners/modules/UserRoleModal.vue
0 → 100644
浏览文件 @
17f0a0a9
<
template
>
<a-drawer
:title=
"title"
:maskClosable=
"true"
width=
650
placement=
"right"
:closable=
"true"
@
close=
"close"
:visible=
"visible"
style=
"overflow: auto;padding-bottom: 53px;"
>
<a-form>
<a-form-item
label=
'所拥有的权限'
>
<a-tree
checkable
@
check=
"onCheck"
:checkedKeys=
"checkedKeys"
:treeData=
"treeData"
@
expand=
"onExpand"
@
select=
"onTreeNodeSelect"
:selectedKeys=
"selectedKeys"
:expandedKeys=
"expandedKeysss"
:checkStrictly=
"checkStrictly"
>
<span
slot=
"hasDatarule"
slot-scope=
"
{slotTitle,ruleFlag}">
{{
slotTitle
}}
<a-icon
v-if=
"ruleFlag"
type=
"align-left"
style=
"margin-left:5px;color: red;"
></a-icon>
</span>
</a-tree>
</a-form-item>
</a-form>
<div
class=
"drawer-bootom-button"
>
<a-dropdown
style=
"float: left"
:trigger=
"['click']"
placement=
"topCenter"
>
<a-menu
slot=
"overlay"
>
<a-menu-item
key=
"1"
@
click=
"switchCheckStrictly(1)"
>
父子关联
</a-menu-item>
<a-menu-item
key=
"2"
@
click=
"switchCheckStrictly(2)"
>
取消关联
</a-menu-item>
<a-menu-item
key=
"3"
@
click=
"checkALL"
>
全部勾选
</a-menu-item>
<a-menu-item
key=
"4"
@
click=
"cancelCheckALL"
>
取消全选
</a-menu-item>
<a-menu-item
key=
"5"
@
click=
"expandAll"
>
展开所有
</a-menu-item>
<a-menu-item
key=
"6"
@
click=
"closeAll"
>
合并所有
</a-menu-item>
</a-menu>
<a-button>
树操作
<a-icon
type=
"up"
/>
</a-button>
</a-dropdown>
<a-popconfirm
title=
"确定放弃编辑?"
@
confirm=
"close"
okText=
"确定"
cancelText=
"取消"
>
<a-button
style=
"margin-right: .8rem"
>
取消
</a-button>
</a-popconfirm>
<a-button
@
click=
"handleSubmit(false)"
type=
"primary"
:loading=
"loading"
ghost
style=
"margin-right: 0.8rem"
>
仅保存
</a-button>
<a-button
@
click=
"handleSubmit(true)"
type=
"primary"
:loading=
"loading"
>
保存并关闭
</a-button>
</div>
<role-datarule-modal
ref=
"datarule"
></role-datarule-modal>
</a-drawer>
</
template
>
<
script
>
import
{
queryTreeListByTypeForRole
,
queryRolePermission
,
saveRolePermission
}
from
'@/api/api'
import
RoleDataruleModal
from
'./RoleDataruleModal.vue'
export
default
{
name
:
"RoleModal"
,
components
:{
RoleDataruleModal
},
data
(){
return
{
roleId
:
""
,
treeData
:
[],
defaultCheckedKeys
:[],
checkedKeys
:[],
expandedKeysss
:[],
allTreeKeys
:[],
autoExpandParent
:
true
,
checkStrictly
:
false
,
title
:
"物业权限配置"
,
visible
:
false
,
loading
:
false
,
selectedKeys
:[]
}
},
methods
:
{
onTreeNodeSelect
(
id
){
if
(
id
&&
id
.
length
>
0
){
this
.
selectedKeys
=
id
}
this
.
$refs
.
datarule
.
show
(
this
.
selectedKeys
[
0
],
this
.
roleId
)
},
onCheck
(
o
)
{
if
(
this
.
checkStrictly
){
this
.
checkedKeys
=
o
.
checked
;
}
else
{
this
.
checkedKeys
=
o
}
},
show
(
roleId
){
this
.
roleId
=
roleId
this
.
visible
=
true
;
},
close
()
{
this
.
reset
()
this
.
$emit
(
'close'
);
this
.
visible
=
false
;
},
onExpand
(
expandedKeys
){
this
.
expandedKeysss
=
expandedKeys
;
this
.
autoExpandParent
=
false
},
reset
()
{
this
.
expandedKeysss
=
[]
this
.
checkedKeys
=
[]
this
.
defaultCheckedKeys
=
[]
this
.
loading
=
false
},
expandAll
()
{
this
.
expandedKeysss
=
this
.
allTreeKeys
},
closeAll
()
{
this
.
expandedKeysss
=
[]
},
checkALL
()
{
this
.
checkedKeys
=
this
.
allTreeKeys
},
cancelCheckALL
()
{
//this.checkedKeys = this.defaultCheckedKeys
this
.
checkedKeys
=
[]
},
switchCheckStrictly
(
v
)
{
if
(
v
==
1
){
this
.
checkStrictly
=
false
}
else
if
(
v
==
2
){
this
.
checkStrictly
=
true
}
},
handleCancel
()
{
this
.
close
()
},
handleSubmit
(
exit
)
{
let
that
=
this
;
let
params
=
{
roleId
:
that
.
roleId
,
permissionIds
:
that
.
checkedKeys
.
join
(
","
),
lastpermissionIds
:
that
.
defaultCheckedKeys
.
join
(
","
),
};
that
.
loading
=
true
;
console
.
log
(
"请求参数:"
,
params
);
saveRolePermission
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
){
that
.
$message
.
success
(
res
.
message
);
that
.
loading
=
false
;
if
(
exit
)
{
that
.
close
()
}
}
else
{
that
.
$message
.
error
(
res
.
message
);
that
.
loading
=
false
;
if
(
exit
)
{
that
.
close
()
}
}
this
.
loadData
();
})
},
loadData
(){
queryTreeListByTypeForRole
({
platformType
:
'partner'
}).
then
((
res
)
=>
{
this
.
treeData
=
res
.
result
.
treeList
this
.
allTreeKeys
=
res
.
result
.
ids
queryRolePermission
({
roleId
:
this
.
roleId
}).
then
((
res
)
=>
{
this
.
checkedKeys
=
[...
res
.
result
];
this
.
defaultCheckedKeys
=
[...
res
.
result
];
this
.
expandedKeysss
=
this
.
allTreeKeys
;
console
.
log
(
this
.
defaultCheckedKeys
)
})
})
}
},
watch
:
{
visible
()
{
if
(
this
.
visible
)
{
this
.
loadData
();
}
}
}
}
</
script
>
<
style
lang=
"less"
scoped
>
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</
style
>
\ No newline at end of file
src/views/system/modules/UserModal.vue
浏览文件 @
17f0a0a9
...
@@ -151,8 +151,7 @@
...
@@ -151,8 +151,7 @@
import
{
getAction
}
from
'@/api/manage'
import
{
getAction
}
from
'@/api/manage'
import
{
addUser
,
editUser
,
queryUserRole
,
queryall
}
from
'@/api/api'
import
{
addUser
,
editUser
,
queryUserRole
,
queryall
}
from
'@/api/api'
import
{
disabledAuthFilter
}
from
"@/utils/authFilter"
import
{
disabledAuthFilter
}
from
"@/utils/authFilter"
import
{
duplicateCheck
}
from
'@/api/api'
import
{
duplicateCheck
,
checkOnlyUserName
}
from
'@/api/api'
export
default
{
export
default
{
name
:
"UserModal"
,
name
:
"UserModal"
,
components
:
{
components
:
{
...
@@ -170,7 +169,7 @@
...
@@ -170,7 +169,7 @@
dateFormat
:
"YYYY-MM-DD"
,
dateFormat
:
"YYYY-MM-DD"
,
validatorRules
:{
validatorRules
:{
username
:[{
required
:
true
,
message
:
'请输入用户账号!'
},
username
:[{
required
:
true
,
message
:
'请输入用户账号!'
},
{
validator
:
this
.
validateUsername
,}],
{
validator
:
this
.
validateUsername
,
trigger
:
'blur'
}],
password
:
[{
required
:
true
,
pattern
:
/^
(?=
.*
[
a-zA-Z
])(?=
.*
\d)(?=
.*
[
~!@#$%^&*()_+`
\-
={}:";'<>?,.
/])
.
{8,}
$/
,
message
:
'密码由8位数字、大小写字母和特殊符号组成!'
},
password
:
[{
required
:
true
,
pattern
:
/^
(?=
.*
[
a-zA-Z
])(?=
.*
\d)(?=
.*
[
~!@#$%^&*()_+`
\-
={}:";'<>?,.
/])
.
{8,}
$/
,
message
:
'密码由8位数字、大小写字母和特殊符号组成!'
},
{
validator
:
this
.
validateToNextPassword
,
trigger
:
'change'
}],
{
validator
:
this
.
validateToNextPassword
,
trigger
:
'change'
}],
confirmpassword
:
[{
required
:
true
,
message
:
'请重新输入登录密码!'
,},
confirmpassword
:
[{
required
:
true
,
message
:
'请重新输入登录密码!'
,},
...
@@ -443,12 +442,9 @@
...
@@ -443,12 +442,9 @@
},
},
validateUsername
(
rule
,
value
,
callback
){
validateUsername
(
rule
,
value
,
callback
){
var
params
=
{
var
params
=
{
tableName
:
'sys_user'
,
userName
:
value
,
fieldName
:
'username'
,
fieldVal
:
value
,
dataId
:
this
.
userId
};
};
duplicateCheck
(
params
).
then
((
res
)
=>
{
checkOnlyUserName
(
params
).
then
((
res
)
=>
{
if
(
res
.
success
)
{
if
(
res
.
success
)
{
callback
()
callback
()
}
else
{
}
else
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论