提交 274b4694 authored 作者: 王鹏飞's avatar 王鹏飞

chore: 校友人才新增班级筛选

上级 d96c5909
......@@ -29,7 +29,19 @@ export function uploadFile(data: Record<string, any>) {
})
.then(() => data)
}
// 获取当前登录的校友信息
export function getAlumniUserInfo() {
return httpRequest.get('/api/hr/api/v1/alumni-talent/login-user-info')
}
// 获取班级列表
export function getClassList(params?: {
id?: string
name?: string
page?: number
limit?: number
project_prefix_arr?: string[]
}) {
return httpRequest.get('/api/hr/api/v1/classes', { params })
}
import { getClassList } from '@/api/base'
interface ClassesRequestParams {
id?: string
name?: string
page?: number
limit?: number
project_prefix_arr?: string[]
}
export function useClasses(params?: ClassesRequestParams) {
const classesList = ref([])
params = Object.assign({ limit: 100 }, params)
getClassList(params).then(res => {
classesList.value = res.data.data
})
return { classesList }
}
<script setup lang="ts">
import { useArea } from '@/composables/useArea'
import { useClasses } from '@/composables/useClasses'
import { sex, projectPrefix, industryCategory, industryCategoryList } from '@/utils/dictionary'
import { getAlumniList } from '../api'
import type { AlumniType } from '../types'
import { useUserStore } from '@/stores/user'
const router = useRouter()
const user = useUserStore()
......@@ -14,13 +14,16 @@ const appList = ref()
// 省市
const { provinceList, cityList, provinceValue, cityValue } = useArea()
// 班级
const { classesList } = useClasses({ project_prefix_arr: user.projects })
const listOptions = {
const listOptions = computed(() => ({
remote: {
httpRequest: getAlumniList,
params: {
workplace: '',
industry: '',
class_id: '',
province: '',
city: '',
project_prefix_arr: user.projects
......@@ -37,8 +40,16 @@ const listOptions = {
}
},
filters: [
{ type: 'input', label: '工作单位', prop: 'workplace' },
{ type: 'input', label: '工作单位', prop: 'workplace', placeholder: '请输入' },
{ type: 'select', label: '所在行业', prop: 'industry', options: industryCategoryList },
{
type: 'select',
label: '所在班级',
prop: 'class_id',
options: classesList.value,
valueKey: 'class_id',
labelKey: 'name'
},
{ type: 'select', label: '省份', prop: 'province', slots: 'filter-province' },
{ type: 'select', label: '城市', prop: 'city', slots: 'filter-city' }
],
......@@ -74,7 +85,7 @@ const listOptions = {
{ label: '工作单位', prop: 'workplace', align: 'center' },
{ label: '操作', slots: 'table-actions', align: 'center' }
]
}
}))
function handleUpdateList() {
nextTick(() => {
......@@ -120,7 +131,7 @@ onMounted(() => {
background: #f8f8f8;
border-radius: 20px;
.el-form-item__label {
width: 88px;
width: 80px;
}
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论