|
@@ -103,6 +103,7 @@ class DeptAndJobView(ModelViewSet):
|
|
|
|
|
|
'''
|
|
|
根据部门id获取部门岗位中间表的该部门所有岗位信息
|
|
|
+ 返回中间表id和岗位name
|
|
|
'''
|
|
|
|
|
|
def list(self, request, *args, **kwargs):
|
|
@@ -111,5 +112,8 @@ class DeptAndJobView(ModelViewSet):
|
|
|
deptAndJob = Dept_job.objects.filter(dept_id=deptId).all()
|
|
|
data = []
|
|
|
for DJ in deptAndJob:
|
|
|
- data.append(model_to_dict(DJ.job))
|
|
|
+ data.append({
|
|
|
+ 'id': DJ.id,
|
|
|
+ 'name': DJ.job.name
|
|
|
+ })
|
|
|
return Response(data=data, status=status.HTTP_200_OK)
|