|
@@ -5,7 +5,7 @@
|
|
<div class="d-flex justify-space-between mt-8 mb-10">
|
|
<div class="d-flex justify-space-between mt-8 mb-10">
|
|
<div class="d-flex align-center">
|
|
<div class="d-flex align-center">
|
|
<!-- <span class="mx-3 color-666 font-size-14">院系</span> -->
|
|
<!-- <span class="mx-3 color-666 font-size-14">院系</span> -->
|
|
- <Autocomplete class="mr-3" v-model="query.collegeId" :item="yuanXi"></Autocomplete>
|
|
|
|
|
|
+ <Autocomplete class="mr-3" v-model="query.schoolDepartmentName" :item="yuanXi"></Autocomplete>
|
|
<v-btn color="primary" class="half-button ml-3" @click="handleSearch()">查 询</v-btn>
|
|
<v-btn color="primary" class="half-button ml-3" @click="handleSearch()">查 询</v-btn>
|
|
<v-btn class="half-button ml-3" prepend-icon="mdi-refresh" variant="outlined" color="primary" @click="handleSearch(true)">刷 新</v-btn>
|
|
<v-btn class="half-button ml-3" prepend-icon="mdi-refresh" variant="outlined" color="primary" @click="handleSearch(true)">刷 新</v-btn>
|
|
</div>
|
|
</div>
|
|
@@ -27,7 +27,7 @@
|
|
@pageHandleChange="handleChangePage"
|
|
@pageHandleChange="handleChangePage"
|
|
>
|
|
>
|
|
<template #studentName="{ item }">
|
|
<template #studentName="{ item }">
|
|
- <div class="d-flex align-center" @click="studentDetails(item.id)">
|
|
|
|
|
|
+ <div class="d-flex align-center cursor-pointer" @click="studentDetails(item.id)">
|
|
<v-avatar size="40" :image="getUserAvatar(item?.person?.avatar, item?.person?.sex)"></v-avatar>
|
|
<v-avatar size="40" :image="getUserAvatar(item?.person?.avatar, item?.person?.sex)"></v-avatar>
|
|
<span class="ml-3">{{ item?.person?.name }}</span>
|
|
<span class="ml-3">{{ item?.person?.name }}</span>
|
|
</div>
|
|
</div>
|
|
@@ -48,12 +48,14 @@ import { ref } from 'vue'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import { formatName } from '@/utils/getText'
|
|
import { formatName } from '@/utils/getText'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
|
|
+import { schoolOrganization, studentList } from '@/api/school'
|
|
|
|
+import { useRouter } from 'vue-router'; const router = useRouter()
|
|
|
|
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
const query = ref({
|
|
const query = ref({
|
|
pageSize: 20,
|
|
pageSize: 20,
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
- collegeId: null,
|
|
|
|
|
|
+ schoolDepartmentName: null,
|
|
})
|
|
})
|
|
|
|
|
|
const headers = [
|
|
const headers = [
|
|
@@ -67,13 +69,19 @@ const headers = [
|
|
]
|
|
]
|
|
|
|
|
|
const tableData = ref([])
|
|
const tableData = ref([])
|
|
|
|
+tableData.value = [{ test: 'ces', person: { name: '123' }, id: '1'}]
|
|
const total = ref(0)
|
|
const total = ref(0)
|
|
// 列表
|
|
// 列表
|
|
const getData = async (isRefresh = false) => {
|
|
const getData = async (isRefresh = false) => {
|
|
- // const { list, total: number } = await getInterviewInvitePage(query.value)
|
|
|
|
- // tableData.value = list
|
|
|
|
- // total.value = number
|
|
|
|
- tableData.value = [{ test: 'ces', person: { name: '123' }}]
|
|
|
|
|
|
+ query.value.schoolDepartmentName = '中文系'
|
|
|
|
+ const { data, total: number } = await studentList(query.value)
|
|
|
|
+
|
|
|
|
+ tableData.value = data?.records?.length && data.records.map(item=>{
|
|
|
|
+ const { enterpeiseName, enterpriseRecruitJobName, jobDept } = item
|
|
|
|
+ return { ...item.student, enterpeiseName, enterpriseRecruitJobName, jobDept }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ total.value = number
|
|
if (isRefresh) Snackbar.success('刷新成功')
|
|
if (isRefresh) Snackbar.success('刷新成功')
|
|
}
|
|
}
|
|
|
|
|
|
@@ -87,22 +95,29 @@ const handleSearch = (refresh = false) => {
|
|
getData(refresh)
|
|
getData(refresh)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const schoolInfo = ref(localStorage.getItem('schoolInfo') ? JSON.parse(localStorage.getItem('schoolInfo')) : {})
|
|
|
|
+
|
|
const yuanXi = ref({ width: 300, items: [], clearable: false, hideDetails: true, label: '请选择院系' })
|
|
const yuanXi = ref({ width: 300, items: [], clearable: false, hideDetails: true, label: '请选择院系' })
|
|
|
|
+
|
|
// 列表
|
|
// 列表
|
|
const getYuanXiItem = async () => {
|
|
const getYuanXiItem = async () => {
|
|
- // const { list } = await getInterviewInvitePage(query.value)
|
|
|
|
- yuanXi.value.items = [
|
|
|
|
- { label: '中文系', value: '中文系' },
|
|
|
|
- { label: '人文学院', value: '人文学院' },
|
|
|
|
- ]
|
|
|
|
|
|
+ const schoolId = schoolInfo.value?.school?.schoolId || null
|
|
|
|
+ if (!schoolId) return Snackbar.warning('获取学校信息失败!')
|
|
|
|
+
|
|
|
|
+ const { data } = await schoolOrganization({ schoolId })
|
|
|
|
+ yuanXi.value.items = data?.length && data.map(item=> {
|
|
|
|
+ return item?.title ? { label: item.title, value: item.title } : null
|
|
|
|
+ }).filter(Boolean)
|
|
|
|
+
|
|
if (yuanXi.value.items?.length) {
|
|
if (yuanXi.value.items?.length) {
|
|
- query.value.collegeId = yuanXi.value.items[0].value
|
|
|
|
|
|
+ query.value.schoolDepartmentName = yuanXi.value.items[0].value
|
|
getData()
|
|
getData()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
getYuanXiItem()
|
|
getYuanXiItem()
|
|
|
|
|
|
const studentDetails = (id) => {
|
|
const studentDetails = (id) => {
|
|
|
|
+ if (id) router.push(`/recruit/teacher/studentDetails/${id}`)
|
|
}
|
|
}
|
|
|
|
|
|
const exportLoading = ref(false)
|
|
const exportLoading = ref(false)
|