简要描述:

  • 选择部门(公用)

请求域名:

  • https://dev8.yunzmall.com/business/1/

请求URL:

GET/plugin/project-manager/index/department

参数:

参数名 是否必须 类型 说明

返回示例:

正确时返回:

{
	"result": 1,
	"msg": "",
	"data": {
		"list": [
			{
				"id": 41,
				"name": "芸信",
				"parent_id": 0,
				"has_may_department_staff": [
					{
						"id": 82,
						"department_id": 41,
						"staff_id": 67,
						"has_one_staff": {
							"id": 67,
							"name": "孙新建",
							"user_id": "SunXinJian",
							"uid": 164783,
							"avatar": "http://wework.qpic.cn/bizmail/r4f9blWlVJOpCPlAticV65autpiaZW6bLc74uEj20uqzYN6PRP3qgOwQ/0",
							"userid": "SunXinJian",
							"avatar_mediaid": "http://wework.qpic.cn/bizmail/r4f9blWlVJOpCPlAticV65autpiaZW6bLc74uEj20uqzYN6PRP3qgOwQ/0"
						}
					},
					{
						"id": 83,
						"department_id": 41,
						"staff_id": 68,
						"has_one_staff": {
							"id": 68,
							"name": "韦平",
							"user_id": "WeiPing",
							"uid": 163911,
							"avatar": "https://wework.qpic.cn/bizmail/kw0ExyS4j08ibbIFjltI6gib5XpevUZ3ePqyL3oYLkiaDcWE2n1SkAPRA/0",
							"userid": "WeiPing",
							"avatar_mediaid": "https://wework.qpic.cn/bizmail/kw0ExyS4j08ibbIFjltI6gib5XpevUZ3ePqyL3oYLkiaDcWE2n1SkAPRA/0"
						}
					},
				],
				"staff": [
					{
						"id": 67,
						"name": "孙新建",
						"user_id": "SunXinJian",
						"uid": 164783,
						"avatar": "http://wework.qpic.cn/bizmail/r4f9blWlVJOpCPlAticV65autpiaZW6bLc74uEj20uqzYN6PRP3qgOwQ/0",
						"userid": "SunXinJian",
						"avatar_mediaid": "http://wework.qpic.cn/bizmail/r4f9blWlVJOpCPlAticV65autpiaZW6bLc74uEj20uqzYN6PRP3qgOwQ/0"
					},
					{
						"id": 68,
						"name": "韦平",
						"user_id": "WeiPing",
						"uid": 163911,
						"avatar": "https://wework.qpic.cn/bizmail/kw0ExyS4j08ibbIFjltI6gib5XpevUZ3ePqyL3oYLkiaDcWE2n1SkAPRA/0",
						"userid": "WeiPing",
						"avatar_mediaid": "https://wework.qpic.cn/bizmail/kw0ExyS4j08ibbIFjltI6gib5XpevUZ3ePqyL3oYLkiaDcWE2n1SkAPRA/0"
					},
				],
				"children": [
					{
						"id": 43,
						"name": "子部门2",
						"parent_id": 41,
						"has_may_department_staff": [
							{
								"id": 86,
								"department_id": 43,
								"staff_id": 71,
								"has_one_staff": {
									"id": 71,
									"name": "柏丽芬",
									"user_id": "KaKa",
									"uid": 164913,
									"avatar": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0",
									"userid": "KaKa",
									"avatar_mediaid": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0"
								}
							},
							{
								"id": 98,
								"department_id": 43,
								"staff_id": 79,
								"has_one_staff": {
									"id": 79,
									"name": "许家健233",
									"user_id": "XUJIAJIAN2XUJIAJIAN2X_1631087200",
									"uid": 163777,
									"avatar": "",
									"userid": "XUJIAJIAN2XUJIAJIAN2X_1631087200",
									"avatar_mediaid": ""
								}
							},
						],
						"staff": [
							{
								"id": 71,
								"name": "柏丽芬",
								"user_id": "KaKa",
								"uid": 164913,
								"avatar": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0",
								"userid": "KaKa",
								"avatar_mediaid": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0"
							},
							{
								"id": 79,
								"name": "许家健233",
								"user_id": "XUJIAJIAN2XUJIAJIAN2X_1631087200",
								"uid": 163777,
								"avatar": "",
								"userid": "XUJIAJIAN2XUJIAJIAN2X_1631087200",
								"avatar_mediaid": ""
							},
						],
						"children": [
							{
								"id": 49,
								"name": "子部门2-22",
								"parent_id": 43,
								"has_may_department_staff": [
									{
										"id": 97,
										"department_id": 49,
										"staff_id": 78,
										"has_one_staff": {
											"id": 78,
											"name": "许家健",
											"user_id": "YeSeChuMingShi",
											"uid": 0,
											"avatar": "http://wework.qpic.cn/bizmail/zWfic21obEic8qqUoQRGQUVfFrI0qcZCS8dqicRRV2XtjggPoJ5WZ11mw/0",
											"userid": "YeSeChuMingShi",
											"avatar_mediaid": "http://wework.qpic.cn/bizmail/zWfic21obEic8qqUoQRGQUVfFrI0qcZCS8dqicRRV2XtjggPoJ5WZ11mw/0"
										}
									}
								],
								"staff": [
									{
										"id": 78,
										"name": "许家健",
										"user_id": "YeSeChuMingShi",
										"uid": 0,
										"avatar": "http://wework.qpic.cn/bizmail/zWfic21obEic8qqUoQRGQUVfFrI0qcZCS8dqicRRV2XtjggPoJ5WZ11mw/0",
										"userid": "YeSeChuMingShi",
										"avatar_mediaid": "http://wework.qpic.cn/bizmail/zWfic21obEic8qqUoQRGQUVfFrI0qcZCS8dqicRRV2XtjggPoJ5WZ11mw/0"
									}
								]
							},
							{
								"id": 50,
								"name": "子部门2-3",
								"parent_id": 43,
								"has_may_department_staff": [],
								"staff": [],
								"children": [
									{
										"id": 54,
										"name": "测试部门335",
										"parent_id": 50,
										"has_may_department_staff": [],
										"staff": [],
										"children": [
											{
												"id": 59,
												"name": "123456",
												"parent_id": 54,
												"has_may_department_staff": [],
												"staff": []
											},
											{
												"id": 60,
												"name": "测试部门335-1",
												"parent_id": 54,
												"has_may_department_staff": [],
												"staff": [],
												"children": [
													{
														"id": 61,
														"name": "部门233",
														"parent_id": 60,
														"has_may_department_staff": [],
														"staff": []
													}
												]
											}
										]
									},
									{
										"id": 55,
										"name": "测试部门33",
										"parent_id": 50,
										"has_may_department_staff": [],
										"staff": []
									}
								]
							},
							{
								"id": 51,
								"name": "销售部",
								"parent_id": 43,
								"has_may_department_staff": [],
								"staff": [],
								"children": [
									{
										"id": 57,
										"name": "子部门1",
										"parent_id": 51,
										"has_may_department_staff": [
											{
												"id": 90,
												"department_id": 57,
												"staff_id": 72,
												"has_one_staff": {
													"id": 72,
													"name": "韦安",
													"user_id": "ZhiHaoLeWoDuoNianDe",
													"uid": 164631,
													"avatar": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0",
													"userid": "ZhiHaoLeWoDuoNianDe",
													"avatar_mediaid": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0"
												}
											}
										],
										"staff": [
											{
												"id": 72,
												"name": "韦安",
												"user_id": "ZhiHaoLeWoDuoNianDe",
												"uid": 164631,
												"avatar": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0",
												"userid": "ZhiHaoLeWoDuoNianDe",
												"avatar_mediaid": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0"
											}
										]
									}
								]
							}
						]
					},
					{
						"id": 44,
						"name": "x测试部门1",
						"parent_id": 41,
						"has_may_department_staff": [
							{
								"id": 100,
								"department_id": 44,
								"staff_id": 80,
								"has_one_staff": {
									"id": 80,
									"name": "human",
									"user_id": "HUMAN_1632464463",
									"uid": 0,
									"avatar": "",
									"userid": "HUMAN_1632464463",
									"avatar_mediaid": ""
								}
							},
							{
								"id": 104,
								"department_id": 44,
								"staff_id": 81,
								"has_one_staff": {
									"id": 81,
									"name": "嗨",
									"user_id": "HAI_1634278023",
									"uid": 0,
									"avatar": "",
									"userid": "HAI_1634278023",
									"avatar_mediaid": ""
								}
							}
						],
						"staff": [
							{
								"id": 80,
								"name": "human",
								"user_id": "HUMAN_1632464463",
								"uid": 0,
								"avatar": "",
								"userid": "HUMAN_1632464463",
								"avatar_mediaid": ""
							},
							{
								"id": 81,
								"name": "嗨",
								"user_id": "HAI_1634278023",
								"uid": 0,
								"avatar": "",
								"userid": "HAI_1634278023",
								"avatar_mediaid": ""
							}
						],
						"children": [
							{
								"id": 53,
								"name": "子部门2-1",
								"parent_id": 44,
								"has_may_department_staff": [
									{
										"id": 91,
										"department_id": 53,
										"staff_id": 72,
										"has_one_staff": {
											"id": 72,
											"name": "韦安",
											"user_id": "ZhiHaoLeWoDuoNianDe",
											"uid": 164631,
											"avatar": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0",
											"userid": "ZhiHaoLeWoDuoNianDe",
											"avatar_mediaid": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0"
										}
									}
								],
								"staff": [
									{
										"id": 72,
										"name": "韦安",
										"user_id": "ZhiHaoLeWoDuoNianDe",
										"uid": 164631,
										"avatar": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0",
										"userid": "ZhiHaoLeWoDuoNianDe",
										"avatar_mediaid": "http://wework.qpic.cn/bizmail/GCLGu2kCfGRdvTbbt77snGvNBbFOSVq8gLaUdFibxemCFp51LazInWQ/0"
									}
								],
								"children": [
									{
										"id": 58,
										"name": "为二万人",
										"parent_id": 53,
										"has_may_department_staff": [],
										"staff": []
									}
								]
							}
						]
					},
					{
						"id": 45,
						"name": "测试部门33",
						"parent_id": 41,
						"has_may_department_staff": [
							{
								"id": 87,
								"department_id": 45,
								"staff_id": 71,
								"has_one_staff": {
									"id": 71,
									"name": "柏丽芬",
									"user_id": "KaKa",
									"uid": 164913,
									"avatar": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0",
									"userid": "KaKa",
									"avatar_mediaid": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0"
								}
							},
							{
								"id": 101,
								"department_id": 45,
								"staff_id": 80,
								"has_one_staff": {
									"id": 80,
									"name": "human",
									"user_id": "HUMAN_1632464463",
									"uid": 0,
									"avatar": "",
									"userid": "HUMAN_1632464463",
									"avatar_mediaid": ""
								}
							},
							{
								"id": 105,
								"department_id": 45,
								"staff_id": 81,
								"has_one_staff": {
									"id": 81,
									"name": "嗨",
									"user_id": "HAI_1634278023",
									"uid": 0,
									"avatar": "",
									"userid": "HAI_1634278023",
									"avatar_mediaid": ""
								}
							}
						],
						"staff": [
							{
								"id": 71,
								"name": "柏丽芬",
								"user_id": "KaKa",
								"uid": 164913,
								"avatar": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0",
								"userid": "KaKa",
								"avatar_mediaid": "http://wework.qpic.cn/bizmail/nXEfaZSylbYEJbvD0xqX34aE6h39ERia7ib0jfju7hPpKAUD2SkRfZEw/0"
							},
							{
								"id": 80,
								"name": "human",
								"user_id": "HUMAN_1632464463",
								"uid": 0,
								"avatar": "",
								"userid": "HUMAN_1632464463",
								"avatar_mediaid": ""
							},
							{
								"id": 81,
								"name": "嗨",
								"user_id": "HAI_1634278023",
								"uid": 0,
								"avatar": "",
								"userid": "HAI_1634278023",
								"avatar_mediaid": ""
							}
						],
						"children": [
							{
								"id": 52,
								"name": "test-部门A",
								"parent_id": 45,
								"has_may_department_staff": [],
								"staff": [],
								"children": [
									{
										"id": 56,
										"name": "test-部门s",
										"parent_id": 52,
										"has_may_department_staff": [],
										"staff": []
									}
								]
							}
						]
					},
					{
						"id": 46,
						"name": "3D建模部",
						"parent_id": 41,
						"has_may_department_staff": [
							{
								"id": 106,
								"department_id": 46,
								"staff_id": 82,
								"has_one_staff": {
									"id": 82,
									"name": "3086",
									"user_id": "3086_1634528901",
									"uid": 164822,
									"avatar": "",
									"userid": "3086_1634528901",
									"avatar_mediaid": ""
								}
							},
						],
						"staff": [
							{
								"id": 89,
								"name": "蓝思婷",
								"user_id": "LanSiTing",
								"uid": 164823,
								"avatar": "http://wework.qpic.cn/bizmail/BTFDs5vJvVVMvDZPbsf4ibjP3lOkBGoYD9ssvbhPVahTYnqsyVibe70A/0",
								"userid": "LanSiTing",
								"avatar_mediaid": "http://wework.qpic.cn/bizmail/BTFDs5vJvVVMvDZPbsf4ibjP3lOkBGoYD9ssvbhPVahTYnqsyVibe70A/0"
							},
						]
					},
					{
						"id": 47,
						"name": "1026",
						"parent_id": 41,
						"has_may_department_staff": [],
						"staff": []
					},
				]
			}
		]
	}
}

错误时返回:

{
  "result": 0,
  "msg": "",
  "data": []
}

list返回参数说明:部门列表信息

参数名 类型 说明
name string 部门名称
staff array 部门成员信息数组
children array 子部门数据(与父级数据结构一致)

staff返回参数说明:成员列表信息

参数名 类型 说明
id int 成员id(一般选择传这个id)
name string 成员名称
user_id string 成员user_id
avatar string 成员头像

备注:

  • 更多返回错误代码请看首页的错误代码描述