[TOC]
## 權限列表
~~~[api]
post:/competence/list
<<<
success
{
"code": 0,
"info": "成功",
"data": [{
"id": 0,
"title": "公共權限",
"child": [{
"id": 1,
"title": "門店管理",
"about": null,
"state": 0,
"type": 0,
"child": [{
"id": 4,
"title": "區域管理",
"about": null,
"state": 0,
"type": 1
}, {
"id": 5,
"title": "門店管理",
"about": null,
"state": 0,
"type": 1
}]
}]
}, {
"id": 1,
"title": "西安2",
"child": [{
"id": 2,
"title": "員工管理",
"about": null,
"state": 1,
"type": 0,
"child": [{
"id": 6,
"title": "職務管理",
"about": null,
"state": 1,
"type": 2
}, {
"id": 7,
"title": "用戶組管理",
"about": null,
"state": 1,
"type": 2
}, {
"id": 8,
"title": "員工管理",
"about": null,
"state": 1,
"type": 2
}, {
"id": 9,
"title": "權限管理",
"about": null,
"state": 1,
"type": 2
}]
}]
}, {
"id": 2,
"title": "渭南",
"child": [{
"id": 2,
"title": "員工管理",
"about": null,
"state": 1,
"type": 0,
"child": [{
"id": 6,
"title": "職務管理",
"about": null,
"state": 1,
"type": 2
}, {
"id": 7,
"title": "用戶組管理",
"about": null,
"state": 1,
"type": 2
}, {
"id": 8,
"title": "員工管理",
"about": null,
"state": 1,
"type": 2
}, {
"id": 9,
"title": "權限管理",
"about": null,
"state": 1,
"type": 2
}]
}]
}, {
"id": 3,
"title": "寶雞",
"child": [{
"id": 2,
"title": "員工管理",
"about": null,
"state": 1,
"type": 0,
"child": [{
"id": 6,
"title": "職務管理",
"about": null,
"state": 1,
"type": 2
}, {
"id": 7,
"title": "用戶組管理",
"about": null,
"state": 1,
"type": 2
}, {
"id": 8,
"title": "員工管理",
"about": null,
"state": 1,
"type": 2
}, {
"id": 9,
"title": "權限管理",
"about": null,
"state": 1,
"type": 2
}]
}]
}, {
"id": 1,
"title": "寶雞手機通訊3",
"child": [{
"id": 3,
"title": "商家工資",
"about": null,
"state": 2,
"type": 0,
"child": [{
"id": 10,
"title": "區域管理",
"about": null,
"state": 2,
"type": 3
}, {
"id": 11,
"title": "商家管理",
"about": null,
"state": 2,
"type": 3
}, {
"id": 12,
"title": "財務統計",
"about": null,
"state": 2,
"type": 3
}]
}]
}, {
"id": 2,
"title": "444",
"child": [{
"id": 3,
"title": "商家工資",
"about": null,
"state": 2,
"type": 0,
"child": [{
"id": 10,
"title": "區域管理",
"about": null,
"state": 2,
"type": 3
}, {
"id": 11,
"title": "商家管理",
"about": null,
"state": 2,
"type": 3
}, {
"id": 12,
"title": "財務統計",
"about": null,
"state": 2,
"type": 3
}]
}]
}, {
"id": 3,
"title": "333",
"child": [{
"id": 3,
"title": "商家工資",
"about": null,
"state": 2,
"type": 0,
"child": [{
"id": 10,
"title": "區域管理",
"about": null,
"state": 2,
"type": 3
}, {
"id": 11,
"title": "商家管理",
"about": null,
"state": 2,
"type": 3
}, {
"id": 12,
"title": "財務統計",
"about": null,
"state": 2,
"type": 3
}]
}]
}, {
"id": 5,
"title": "寶雞手機通訊31",
"child": [{
"id": 3,
"title": "商家工資",
"about": null,
"state": 2,
"type": 0,
"child": [{
"id": 10,
"title": "區域管理",
"about": null,
"state": 2,
"type": 3
}, {
"id": 11,
"title": "商家管理",
"about": null,
"state": 2,
"type": 3
}, {
"id": 12,
"title": "財務統計",
"about": null,
"state": 2,
"type": 3
}]
}]
}]
}
<<<
error
~~~
## 權限用戶列表
~~~[api]
post:/competence/user
*string:id#區域or門店ID
*com_id#權限ID
<<<
success
{
"code": 0,
"info": "成功",
"data": [{
"id": 1,
"title": "西安2",
"child": [{
"id": 2,
"title": "444",
"child": []
}]
}, {
"id": 2,
"title": "渭南",
"child": [{
"id": 1,
"title": "寶雞手機通訊3",
"child": [{
"id": 999,
"name": "王偉",
"checked": false
}, {
"id": 1000,
"name": "老板",
"checked": false
}, {
"id": 1001,
"name": "王偉",
"checked": false
}, {
"id": 1002,
"name": "William",
"checked": true
}]
}, {
"id": 3,
"title": "333",
"child": []
}, {
"id": 5,
"title": "寶雞手機通訊31",
"child": []
}]
}, {
"id": 3,
"title": "寶雞",
"child": []
}]
}
<<<
error
~~~
## 提交權限用戶
~~~[api]
post:/competence/edit
*string:id#區域or門店ID
*com_id#權限ID
*array:user_id#員工id數組
<<<
success
{
"code": 0,
"info": "成功",
"data": 2
}
<<<
error
~~~