|
@@ -1,10 +1,114 @@
|
|
|
-<!-- -->
|
|
|
+<!-- 学生列表 -->
|
|
|
<template>
|
|
|
- <div>学生列表</div>
|
|
|
+ <v-card class="px-3">
|
|
|
+ <!-- 院系 -->
|
|
|
+ <div class="d-flex justify-space-between mt-8 mb-10">
|
|
|
+ <div class="d-flex align-center">
|
|
|
+ <!-- <span class="mx-3 color-666 font-size-14">院系</span> -->
|
|
|
+ <Autocomplete class="mr-3" v-model="query.collegeId" :item="yuanXi"></Autocomplete>
|
|
|
+ <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>
|
|
|
+ </div>
|
|
|
+ <v-btn :loading="exportLoading" prepend-icon="mdi-export-variant" color="primary" variant="tonal" class="ml-3" @click="null">导出</v-btn>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <!-- 学生列表 -->
|
|
|
+ <div class="mt-5" style="min-height: 500px;">
|
|
|
+ <CtTable
|
|
|
+ :items="tableData"
|
|
|
+ :headers="headers"
|
|
|
+ :loading="loading"
|
|
|
+ :elevation="0"
|
|
|
+ :is-tools="false"
|
|
|
+ :showPage="true"
|
|
|
+ :total="total"
|
|
|
+ :page-info="query"
|
|
|
+ itemKey="id"
|
|
|
+ @pageHandleChange="handleChangePage"
|
|
|
+ >
|
|
|
+ <template #studentName="{ item }">
|
|
|
+ <div class="d-flex align-center">
|
|
|
+ <v-avatar size="40" :image="getUserAvatar(item?.person?.avatar, item?.person?.sex)"></v-avatar>
|
|
|
+ <span class="ml-3">{{ item?.person?.name }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #actions="{ item }">
|
|
|
+ <v-btn v-if="!item?.recommendationLetter" color="primary" variant="text" @click="handleUploadLetter(item.id)">上传推荐信</v-btn>
|
|
|
+ <v-btn v-if="!item?.evaluate" color="#00897B" variant="text" @click="handleIssueCertificate(item.id)">颁发实习证书</v-btn>
|
|
|
+ </template>
|
|
|
+ </CtTable>
|
|
|
+ <!-- <Loading :visible="loading"></Loading> -->
|
|
|
+ </div>
|
|
|
+ </v-card >
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
defineOptions({name: 'studentList-index'})
|
|
|
+import { ref } from 'vue'
|
|
|
+import Snackbar from '@/plugins/snackbar'
|
|
|
+import { formatName } from '@/utils/getText'
|
|
|
+
|
|
|
+const loading = ref(false)
|
|
|
+const query = ref({
|
|
|
+ pageSize: 20,
|
|
|
+ pageNo: 1,
|
|
|
+ collegeId: null,
|
|
|
+})
|
|
|
+
|
|
|
+const headers = [
|
|
|
+ { title: '学生姓名', key: 'studentName', sortable: false },
|
|
|
+ { title: '学生学号', key: 'studentName', sortable: false },
|
|
|
+ { title: '所属专业', key: 'studentName', sortable: false },
|
|
|
+ { title: '录用企业', key: 'studentName', sortable: false, value: item => formatName(item.job.name) },
|
|
|
+ { title: '录用部门', key: 'studentName', sortable: false, value: item => formatName(item.job.name) },
|
|
|
+ { title: '录用岗位', key: 'studentName', sortable: false, value: item => formatName(item.job.name) },
|
|
|
+ { title: '操作', key: 'actions', sortable: false }
|
|
|
+]
|
|
|
+
|
|
|
+const tableData = ref([])
|
|
|
+const total = ref(0)
|
|
|
+// 列表
|
|
|
+const getData = async (isRefresh = false) => {
|
|
|
+ // const { list, total: number } = await getInterviewInvitePage(query.value)
|
|
|
+ // tableData.value = list
|
|
|
+ // total.value = number
|
|
|
+ if (isRefresh) Snackbar.success('刷新成功')
|
|
|
+}
|
|
|
+
|
|
|
+const handleChangePage = (val) => {
|
|
|
+ query.value.pageNo = val
|
|
|
+ getData()
|
|
|
+}
|
|
|
+
|
|
|
+const handleSearch = (refresh = false) => {
|
|
|
+ query.value.pageNo = 1
|
|
|
+ getData(refresh)
|
|
|
+}
|
|
|
+
|
|
|
+const yuanXi = ref({ width: 300, items: [], clearable: false, hideDetails: true, label: '请选择院系' })
|
|
|
+// 列表
|
|
|
+const getYuanXiItem = async () => {
|
|
|
+ // const { list } = await getInterviewInvitePage(query.value)
|
|
|
+ yuanXi.value.items = [
|
|
|
+ { label: '中文系', value: '中文系' },
|
|
|
+ { label: '人文学院', value: '人文学院' },
|
|
|
+ ]
|
|
|
+ if (yuanXi.value.items?.length) {
|
|
|
+ query.value.collegeId = yuanXi.value.items[0].value
|
|
|
+ getData()
|
|
|
+ }
|
|
|
+}
|
|
|
+getYuanXiItem()
|
|
|
+
|
|
|
+const exportLoading = ref(false)
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
+.title {
|
|
|
+ color: var(--color-333);
|
|
|
+ font-weight: 600;
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+.left {
|
|
|
+ min-width: 200px;
|
|
|
+}
|
|
|
</style>
|