|
@@ -5,7 +5,8 @@
|
|
<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.schoolDepartmentName" :item="yuanXi"></Autocomplete>
|
|
|
|
|
|
+ <Autocomplete class="mr-3" v-model="query.schoolDepartmentName" :item="schoolDepartmentItem"></Autocomplete>
|
|
|
|
+ <TextInput class="mr-3" v-model="query.studentName" :item="studentNameItem" @enter="handleSearch()"></TextInput>
|
|
<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>
|
|
@@ -56,6 +57,16 @@ const query = ref({
|
|
pageSize: 20,
|
|
pageSize: 20,
|
|
pageNo: 1,
|
|
pageNo: 1,
|
|
schoolDepartmentName: null,
|
|
schoolDepartmentName: null,
|
|
|
|
+ studentName: null,
|
|
|
|
+})
|
|
|
|
+
|
|
|
|
+const studentNameItem = ref({
|
|
|
|
+ type: 'text',
|
|
|
|
+ width: 300,
|
|
|
|
+ label: '请输入学生姓名搜索',
|
|
|
|
+ clearable: true,
|
|
|
|
+ hideDetails: true,
|
|
|
|
+ // appendInnerIcon: 'mdi-magnify'
|
|
})
|
|
})
|
|
|
|
|
|
const headers = [
|
|
const headers = [
|
|
@@ -67,57 +78,53 @@ const headers = [
|
|
{ title: '录用岗位', key: 'test', sortable: false, value: item => formatName(item.test) },
|
|
{ title: '录用岗位', key: 'test', sortable: false, value: item => formatName(item.test) },
|
|
{ title: '操作', key: 'actions', sortable: false }
|
|
{ title: '操作', key: 'actions', sortable: false }
|
|
]
|
|
]
|
|
-
|
|
|
|
-const tableData = ref([])
|
|
|
|
-tableData.value = [{ test: 'ces', person: { name: '123' }, id: '123'}]
|
|
|
|
-const total = ref(0)
|
|
|
|
-// 列表
|
|
|
|
|
|
+// 数据列表
|
|
|
|
+const tableData = ref([]); const total = ref(0)
|
|
const getData = async (isRefresh = false) => {
|
|
const getData = async (isRefresh = false) => {
|
|
- query.value.schoolDepartmentName = '中文系'
|
|
|
|
|
|
+ if (!query.value?.schoolDepartmentName) return
|
|
|
|
+
|
|
const { data, total: number } = await studentList(query.value)
|
|
const { data, total: number } = await studentList(query.value)
|
|
-
|
|
|
|
tableData.value = data?.records?.length && data.records.map(item=>{
|
|
tableData.value = data?.records?.length && data.records.map(item=>{
|
|
const { enterpeiseName, enterpriseRecruitJobName, jobDept } = item
|
|
const { enterpeiseName, enterpriseRecruitJobName, jobDept } = item
|
|
return { ...item.student, enterpeiseName, enterpriseRecruitJobName, jobDept }
|
|
return { ...item.student, enterpeiseName, enterpriseRecruitJobName, jobDept }
|
|
})
|
|
})
|
|
-
|
|
|
|
total.value = number
|
|
total.value = number
|
|
if (isRefresh) Snackbar.success('刷新成功')
|
|
if (isRefresh) Snackbar.success('刷新成功')
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 分页
|
|
const handleChangePage = (val) => {
|
|
const handleChangePage = (val) => {
|
|
query.value.pageNo = val
|
|
query.value.pageNo = val
|
|
getData()
|
|
getData()
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 查询
|
|
const handleSearch = (refresh = false) => {
|
|
const handleSearch = (refresh = false) => {
|
|
query.value.pageNo = 1
|
|
query.value.pageNo = 1
|
|
getData(refresh)
|
|
getData(refresh)
|
|
}
|
|
}
|
|
|
|
|
|
const schoolInfo = ref(localStorage.getItem('schoolInfo') ? JSON.parse(localStorage.getItem('schoolInfo')) : {})
|
|
const schoolInfo = ref(localStorage.getItem('schoolInfo') ? JSON.parse(localStorage.getItem('schoolInfo')) : {})
|
|
-
|
|
|
|
-const yuanXi = ref({ width: 300, items: [], clearable: false, hideDetails: true, label: '请选择院系' })
|
|
|
|
|
|
+const schoolDepartmentItem = ref({ width: 300, items: [], clearable: false, hideDetails: true, label: '请选择院系' })
|
|
|
|
|
|
// 列表
|
|
// 列表
|
|
-const getYuanXiItem = async () => {
|
|
|
|
|
|
+const getSchoolDepartmentItemItem = async () => {
|
|
const schoolId = schoolInfo.value?.school?.schoolId || null
|
|
const schoolId = schoolInfo.value?.school?.schoolId || null
|
|
if (!schoolId) return Snackbar.warning('获取学校信息失败!')
|
|
if (!schoolId) return Snackbar.warning('获取学校信息失败!')
|
|
|
|
|
|
const { data } = await schoolOrganization({ schoolId })
|
|
const { data } = await schoolOrganization({ schoolId })
|
|
- yuanXi.value.items = data?.length && data.map(item=> {
|
|
|
|
|
|
+ schoolDepartmentItem.value.items = data?.length && data.map(item=> {
|
|
return item?.title ? { label: item.title, value: item.title } : null
|
|
return item?.title ? { label: item.title, value: item.title } : null
|
|
}).filter(Boolean)
|
|
}).filter(Boolean)
|
|
|
|
|
|
- if (yuanXi.value.items?.length) {
|
|
|
|
- query.value.schoolDepartmentName = yuanXi.value.items[0].value
|
|
|
|
|
|
+ if (schoolDepartmentItem.value.items?.length) {
|
|
|
|
+ query.value.schoolDepartmentName = schoolDepartmentItem.value.items[0].value
|
|
getData()
|
|
getData()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-getYuanXiItem()
|
|
|
|
|
|
+getSchoolDepartmentItemItem()
|
|
|
|
|
|
const studentDetails = (id) => {
|
|
const studentDetails = (id) => {
|
|
- // if (id) router.push(`/recruit/teacher/studentList/detail/${id}`)
|
|
|
|
if (id) window.open(`/recruit/teacher/studentList/detail/${id}`)
|
|
if (id) window.open(`/recruit/teacher/studentList/detail/${id}`)
|
|
}
|
|
}
|
|
|
|
|