|
@@ -13,41 +13,61 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="mt-5">
|
|
|
- <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>
|
|
|
- </div>
|
|
|
+ <CtTable
|
|
|
+ class="mt-5"
|
|
|
+ :items="tableData"
|
|
|
+ :headers="headers"
|
|
|
+ :loading="loading"
|
|
|
+ :elevation="0"
|
|
|
+ :is-tools="false"
|
|
|
+ :showPage="true"
|
|
|
+ :total="total"
|
|
|
+ :page-info="query"
|
|
|
+ itemKey="id"
|
|
|
+ @pageHandleChange="handleChangePage"
|
|
|
+ >
|
|
|
+ <template #enterpriseName="{ item }">
|
|
|
+ <div class="d-flex align-center">
|
|
|
+ <v-avatar size="40" :image="item.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'"></v-avatar>
|
|
|
+ <span class="ml-3 color-primary cursor-pointer" @click="handleEnterprise(item.id)">{{ formatName(item.anotherName || item.name) }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template #internshipNumber="{ item }">
|
|
|
+ <span class="color-primary cursor-pointer" @click="handleDetail(item, '实习中')">{{ item.internshipNumber || 0 }}人</span>
|
|
|
+ </template>
|
|
|
+ <template #waitInternshipNumber="{ item }">
|
|
|
+ <span class="color-primary cursor-pointer" @click="handleDetail(item, '等待实习')">{{ item.waitInternshipNumber || 0 }}人</span>
|
|
|
+ </template>
|
|
|
+ <template #internshipSuccessNumber="{ item }">
|
|
|
+ <span class="color-primary cursor-pointer" @click="handleDetail(item, '结束实习')">{{ item.internshipSuccessNumber || 0 }}人</span>
|
|
|
+ </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>
|
|
|
</v-card>
|
|
|
|
|
|
- <!-- 上传推荐信 -->
|
|
|
- <CtDialog :visible="showLitterDialog" :widthType="2" titleClass="text-h6" title="上传推荐信" @close="handleLetterClose" @submit="handleSubmitLetter">
|
|
|
- <UploadRecommendationLetterForm ref="RecommendationLetterRef" />
|
|
|
- </CtDialog>
|
|
|
-
|
|
|
- <!-- 颁发实习证书 -->
|
|
|
- <CtDialog :visible="showCertificateDialog" :widthType="2" titleClass="text-h6" title="颁发实习证书" @close="handleCertificateClose" @submit="handleSubmitCertificate">
|
|
|
- <IssueCertificateForm ref="IssueCertificateFormRef" />
|
|
|
+ <CtDialog :visible="drill.show" :widthType="1" titleClass="text-h6" :footer="false" :title="drill.title" @close="handleClose">
|
|
|
+ <CtTable
|
|
|
+ :items="drill.list"
|
|
|
+ :headers="drill.headers"
|
|
|
+ :loading="false"
|
|
|
+ :elevation="0"
|
|
|
+ :isTools="false"
|
|
|
+ :showPage="true"
|
|
|
+ :total="drill.total"
|
|
|
+ :page-info="drill.query"
|
|
|
+ itemKey="id"
|
|
|
+ @pageHandleChange="handleChangeDrillPage"
|
|
|
+ >
|
|
|
+ <template #studentName="{ item }">
|
|
|
+ <div class="d-flex align-center">
|
|
|
+ <v-avatar size="40" :image="getUserAvatar(item.headImg, item.teacherSex)"></v-avatar>
|
|
|
+ <span class="ml-3 color-primary cursor-pointer" @click="handleToStudentDetail(item.studentId)">{{ item.studentName || item.phone }}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </CtTable>
|
|
|
</CtDialog>
|
|
|
</template>
|
|
|
|
|
@@ -55,17 +75,12 @@
|
|
|
defineOptions({name: 'studentList-internship-situation'})
|
|
|
import { ref, onMounted } from 'vue'
|
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
|
-import UploadRecommendationLetterForm from './RecommendationLetterForm'
|
|
|
-import IssueCertificateForm from './CertificateForm'
|
|
|
-import { getStudentPage, getRecordStatusCount, saveRecommend, saveCertificate } from '@/api/recruit/enterprise/student'
|
|
|
+import { getStudentPage } from '@/api/recruit/enterprise/student'
|
|
|
import { dealDictObjData } from '@/utils/position'
|
|
|
import { formatName } from '@/utils/getText'
|
|
|
-import { timesTampChange } from '@/utils/date'
|
|
|
-import { convertTimestampsToDayRange } from '@/utils/date'
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
import { studentPracticeStatistics } from '@/api/school'
|
|
|
|
|
|
-const date = ref(null)
|
|
|
const statistics = ref([
|
|
|
{ label: '等待实习', value: 0, key: 'waitInternshipNumber' },
|
|
|
{ label: '实习中', value: 1, key: 'internshipNumber' },
|
|
@@ -80,12 +95,26 @@ const query = ref({
|
|
|
startTime: null
|
|
|
})
|
|
|
const tableData = ref([
|
|
|
- { workProvinceName: '辞图科技', internshipNumber: 1, internshipSuccessNumber: 0, waitInternshipNumber: 0 },
|
|
|
+ {
|
|
|
+ "id": 1,
|
|
|
+ "name": "门墩儿信息科技有限公司",
|
|
|
+ "anotherName": "门墩儿",
|
|
|
+ "industryId": "1829087620475494402",
|
|
|
+ "industryName": '互联网',
|
|
|
+ "scale": "0",
|
|
|
+ "scaleName": '0-20人',
|
|
|
+ "logoUrl": "https://minio.menduner.com/dev/1e6893918ef378ca280360078dfe74ade10b27101c89865261824b46de7d34a6.png",
|
|
|
+ internshipNumber: 2,
|
|
|
+ internshipSuccessNumber: 0,
|
|
|
+ waitInternshipNumber: 0
|
|
|
+ }
|
|
|
])
|
|
|
const schoolInfo = ref(localStorage.getItem('schoolInfo') ? JSON.parse(localStorage.getItem('schoolInfo')) : {})
|
|
|
|
|
|
const headers = [
|
|
|
- { title: '实习企业', key: 'workProvinceName', sortable: false },
|
|
|
+ { title: '实习企业', key: 'enterpriseName', sortable: false },
|
|
|
+ { title: '所在行业', key: 'industryName', sortable: false },
|
|
|
+ { title: '企业规模', key: 'scaleName', sortable: false },
|
|
|
{ title: '实习中', key: 'internshipNumber', sortable: false },
|
|
|
{ title: '实习结束', key: 'internshipSuccessNumber', sortable: false },
|
|
|
{ title: '等待实习', key: 'waitInternshipNumber', sortable: false },
|
|
@@ -122,7 +151,7 @@ const getStatistics = async () => {
|
|
|
onMounted(async () => {
|
|
|
// const { data } = await getDict('student_practice_status')
|
|
|
// statistics.value = data
|
|
|
- getStatistics()
|
|
|
+ // getStatistics()
|
|
|
// getList()
|
|
|
})
|
|
|
|
|
@@ -131,75 +160,64 @@ const handleChangePage = (val) => {
|
|
|
getList()
|
|
|
}
|
|
|
|
|
|
-// 时间范围选择
|
|
|
-const handleChangeDate = (time) => {
|
|
|
- if (time && time.length) {
|
|
|
- query.value.startTime = convertTimestampsToDayRange(time)
|
|
|
- } else {
|
|
|
- query.value.startTime = []
|
|
|
- }
|
|
|
- query.value.pageNo = 1
|
|
|
- getList()
|
|
|
-}
|
|
|
-
|
|
|
-// 上传推荐信
|
|
|
-const recordId = ref(null)
|
|
|
-const showLitterDialog = ref(false)
|
|
|
-const RecommendationLetterRef = ref(null)
|
|
|
-const handleUploadLetter = (id) => {
|
|
|
- recordId.value = id
|
|
|
- showLitterDialog.value = true
|
|
|
+// 跳转企业详情
|
|
|
+const handleEnterprise = (id) => {
|
|
|
+ if (!id) return
|
|
|
+ window.open(`/recruit/personal/company/details/${id}?key=briefIntroduction`)
|
|
|
}
|
|
|
-const handleLetterClose = () => {
|
|
|
- recordId.value = null
|
|
|
- showLitterDialog.value = false
|
|
|
-}
|
|
|
-const handleSubmitLetter = async () => {
|
|
|
- const { valid } = await RecommendationLetterRef.value.CtFormRef.formRef.validate()
|
|
|
- if (!valid) return
|
|
|
- const query = RecommendationLetterRef.value.getQuery()
|
|
|
|
|
|
- try {
|
|
|
- await saveRecommend({ id: recordId.value, recommendationLetter: query.url })
|
|
|
- Snackbar.success('上传成功')
|
|
|
- getList()
|
|
|
- handleLetterClose()
|
|
|
- } catch {
|
|
|
- handleLetterClose()
|
|
|
- }
|
|
|
+// 实习学生
|
|
|
+const drill = ref({
|
|
|
+ total: 0,
|
|
|
+ query: {
|
|
|
+ size: 10,
|
|
|
+ current: 1
|
|
|
+ },
|
|
|
+ title: '学生列表',
|
|
|
+ show: false,
|
|
|
+ list: [{
|
|
|
+ studentName: '张三',
|
|
|
+ enterpriseName: '北京字节跳动科技有限公司',
|
|
|
+ phone: '12345678901',
|
|
|
+ schoolDepartmentName: '计算机科学与技术',
|
|
|
+ majorName: '计算机科学与技术',
|
|
|
+ schoolClassName: '2019级',
|
|
|
+ studentNo: '2019111111',
|
|
|
+ studentId: 1,
|
|
|
+ teacherSex: '1',
|
|
|
+ headImg: '',
|
|
|
+ phone: '12345678901',
|
|
|
+ studentPracticeStatus: '实习中'
|
|
|
+ }],
|
|
|
+ headers: [
|
|
|
+ { title: '学生姓名', key: 'studentName', sortable: false },
|
|
|
+ { title: '实习企业', key: 'enterpriseName', sortable: false },
|
|
|
+ { title: '联系电话', key: 'phone', sortable: false },
|
|
|
+ { title: '所属院系', key: 'schoolDepartmentName', sortable: false },
|
|
|
+ { title: '所属专业', key: 'majorName', sortable: false },
|
|
|
+ { title: '所在班级', key: 'schoolClassName', sortable: false },
|
|
|
+ { title: '学号', key: 'studentNo', sortable: false },
|
|
|
+ { title: '状态', key: 'studentPracticeStatus', sortable: false },
|
|
|
+ ]
|
|
|
+})
|
|
|
+// 学生列表
|
|
|
+const handleDetail = (item, label) => {
|
|
|
+ drill.value.title = `${item.anotherName} - 状态[${label}] - 学生列表`
|
|
|
+ drill.value.query.current = 1
|
|
|
+ drill.value.show = true
|
|
|
}
|
|
|
|
|
|
-// 颁发实习证书
|
|
|
-const showCertificateDialog = ref(false)
|
|
|
-const IssueCertificateFormRef = ref(null)
|
|
|
-const handleIssueCertificate = (id) => {
|
|
|
- recordId.value = id
|
|
|
- showCertificateDialog.value = true
|
|
|
+const handleClose = () => {
|
|
|
+ drill.value.show = false
|
|
|
+ drill.value.list = []
|
|
|
}
|
|
|
-const handleCertificateClose = () => {
|
|
|
- recordId.value = null
|
|
|
- showCertificateDialog.value = false
|
|
|
-}
|
|
|
-const handleSubmitCertificate = async () => {
|
|
|
- const { valid } = await IssueCertificateFormRef.value.CtFormRef.formRef.validate()
|
|
|
- if (!valid) return
|
|
|
- const query = IssueCertificateFormRef.value.getQuery()
|
|
|
|
|
|
- try {
|
|
|
- await saveCertificate({ id: recordId.value, ...query })
|
|
|
- Snackbar.success('上传成功')
|
|
|
- getList()
|
|
|
- handleCertificateClose()
|
|
|
- } catch {
|
|
|
- handleCertificateClose()
|
|
|
- }
|
|
|
-
|
|
|
-}
|
|
|
+const handleToStudentDetail = (id) => {}
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
.statistics {
|
|
|
- width: 50%;
|
|
|
+ width: 70%;
|
|
|
&-card {
|
|
|
width: 33.33%;
|
|
|
margin-right: 12px;
|