简要描述:

  • 员工审批-获取部门列表

请求域名:

  • http://xx.com

请求URL:

POST/route=plugin.staff-audit.frontend.audit.getDepartmentList

返回示例:

正确时返回:

{
    "result": 1,
    "msg": "成功",
    "data": [
        {
            "id": 45,//部门ID
            "name": "芸信",
            "level": 1,
            "parent_id": 0,
            "childs": [
                {
                    "id": 46,//部门ID
                    "name": "子部门2",
                    "level": 2,
                    "parent_id": 45,
                    "childs": [
                        {
                            "id": 49,//部门ID
                            "name": "子部门2-22",
                            "level": 3,
                            "parent_id": 46,
                            "childs": []
                        },
                        {
                            "id": 50,
                            "name": "子部门2-3",
                            "level": 3,
                            "parent_id": 46,
                            "childs": [
                                {
                                    "id": 54,
                                    "name": "测试部门335",
                                    "level": 4,
                                    "parent_id": 50,
                                    "childs": [
                                        {
                                            "id": 58,
                                            "name": "123456",
                                            "level": 5,
                                            "parent_id": 54,
                                            "childs": []
                                        },
                                        {
                                            "id": 59,
                                            "name": "测试部门335-1",
                                            "level": 5,
                                            "parent_id": 54,
                                            "childs": [
                                                {
                                                    "id": 61,
                                                    "name": "部门233",
                                                    "level": 6,
                                                    "parent_id": 59,
                                                    "childs": []
                                                }
                                            ]
                                        }
                                    ]
                                },
                                {
                                    "id": 55,
                                    "name": "测试部门33",
                                    "level": 4,
                                    "parent_id": 50,
                                    "childs": []
                                }
                            ]
                        },
                        {
                            "id": 51,
                            "name": "销售部",
                            "level": 3,
                            "parent_id": 46,
                            "childs": [
                                {
                                    "id": 57,
                                    "name": "子部门1",
                                    "level": 4,
                                    "parent_id": 51,
                                    "childs": []
                                }
                            ]
                        }
                    ]
                },
                {
                    "id": 47,
                    "name": "x测试部门1",
                    "level": 2,
                    "parent_id": 45,
                    "childs": [
                        {
                            "id": 53,
                            "name": "子部门2-1",
                            "level": 3,
                            "parent_id": 47,
                            "childs": [
                                {
                                    "id": 95,
                                    "name": "为二万人",
                                    "level": 4,
                                    "parent_id": 53,
                                    "childs": []
                                }
                            ]
                        }
                    ]
                },
                {
                    "id": 48,
                    "name": "测试部门33",
                    "level": 2,
                    "parent_id": 45,
                    "childs": [
                        {
                            "id": 76,
                            "name": "test-部门A",
                            "level": 3,
                            "parent_id": 48,
                            "childs": [
                                {
                                    "id": 77,
                                    "name": "test-部门s",
                                    "level": 4,
                                    "parent_id": 76,
                                    "childs": []
                                }
                            ]
                        }
                    ]
                },
                {
                    "id": 67,
                    "name": "3D建模部",
                    "level": 2,
                    "parent_id": 45,
                    "childs": []
                },
                {
                    "id": 97,
                    "name": "ddd",
                    "level": 2,
                    "parent_id": 45,
                    "childs": []
                },
                {
                    "id": 414,
                    "name": "精英部",
                    "level": 2,
                    "parent_id": 45,
                    "childs": []
                }
            ]
        }
    ]
}