fix: 修复设计师大厅部门筛选API调用
This commit is contained in:
parent
1080a49eaa
commit
841154677f
@ -304,7 +304,7 @@ import { message } from 'ant-design-vue'
|
||||
import DefaultLayout from '@/layouts/DefaultLayout.vue'
|
||||
import Icon from '@/components/Icon.vue'
|
||||
import * as designerApi from '@/api/designer'
|
||||
import * as departmentApi from '@/api/department'
|
||||
import { fetchDepartmentOverview } from '@/api/department'
|
||||
import type { DesignerStats } from '@/api/designer'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
@ -430,12 +430,13 @@ const loadDesigners = async () => {
|
||||
// 加载接单部门列表(二级部门)
|
||||
const loadReceivingDepts = async () => {
|
||||
try {
|
||||
const response = await departmentApi.getDepartments()
|
||||
const response = await fetchDepartmentOverview()
|
||||
if (response.code === 200 && response.data) {
|
||||
// 只获取接单类型的二级部门(parent_id 不为空且 dept_type 为 receiving)
|
||||
// 只获取接单类型的二级部门(parentId 不为空且 deptType 为 receiving)
|
||||
receivingDepts.value = response.data.filter((dept: Department) =>
|
||||
dept.deptType === 'receiving' && dept.parentId !== null
|
||||
dept.deptType === 'receiving' && dept.parentId != null
|
||||
)
|
||||
console.log('接单部门列表:', receivingDepts.value)
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('加载部门列表失败:', error)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user