|
@@ -2,33 +2,15 @@
|
|
<template>
|
|
<template>
|
|
<v-card class="card-box pa-3">
|
|
<v-card class="card-box pa-3">
|
|
<div class="d-flex justify-space-between align-center">
|
|
<div class="d-flex justify-space-between align-center">
|
|
- <!-- 统计 -->
|
|
|
|
<div class="d-flex align-center statistics">
|
|
<div class="d-flex align-center statistics">
|
|
<div v-for="(val, index) in statistics" :key="index" class="statistics-card pa-5">
|
|
<div v-for="(val, index) in statistics" :key="index" class="statistics-card pa-5">
|
|
<div class="color-666">{{ val.label }}</div>
|
|
<div class="color-666">{{ val.label }}</div>
|
|
<div class="">
|
|
<div class="">
|
|
- <span class="value font-weight-bold color-primary">{{ val.count }}</span>
|
|
|
|
|
|
+ <span class="value font-weight-bold color-primary">{{ val.value }}</span>
|
|
<span class="color-999 font-size-14">人</span>
|
|
<span class="color-999 font-size-14">人</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <!-- 时间范围筛选 -->
|
|
|
|
- <div class="d-flex align-center ml-7">
|
|
|
|
- <span class="color-666">实习日期</span>
|
|
|
|
- <div class="ml-5">
|
|
|
|
- <date-picker
|
|
|
|
- v-model="date"
|
|
|
|
- :item="{
|
|
|
|
- mode: 'daterange',
|
|
|
|
- clearable: true,
|
|
|
|
- placeholder: '请选择要查看的时间范围',
|
|
|
|
- format: 'YYYY/MM/DD',
|
|
|
|
- width: 250
|
|
|
|
- }"
|
|
|
|
- @change="handleChangeDate"
|
|
|
|
- />
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div class="mt-5">
|
|
<div class="mt-5">
|
|
@@ -73,19 +55,22 @@
|
|
defineOptions({name: 'studentList-internship-situation'})
|
|
defineOptions({name: 'studentList-internship-situation'})
|
|
import { ref, onMounted } from 'vue'
|
|
import { ref, onMounted } from 'vue'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
import { getUserAvatar } from '@/utils/avatar'
|
|
-import DatePicker from '@/components/FormUI/datePicker'
|
|
|
|
import UploadRecommendationLetterForm from './RecommendationLetterForm'
|
|
import UploadRecommendationLetterForm from './RecommendationLetterForm'
|
|
import IssueCertificateForm from './CertificateForm'
|
|
import IssueCertificateForm from './CertificateForm'
|
|
import { getStudentPage, getRecordStatusCount, saveRecommend, saveCertificate } from '@/api/recruit/enterprise/student'
|
|
import { getStudentPage, getRecordStatusCount, saveRecommend, saveCertificate } from '@/api/recruit/enterprise/student'
|
|
-import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { dealDictObjData } from '@/utils/position'
|
|
import { formatName } from '@/utils/getText'
|
|
import { formatName } from '@/utils/getText'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { timesTampChange } from '@/utils/date'
|
|
import { convertTimestampsToDayRange } from '@/utils/date'
|
|
import { convertTimestampsToDayRange } from '@/utils/date'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
|
+import { studentPracticeStatistics } from '@/api/school'
|
|
|
|
|
|
const date = ref(null)
|
|
const date = ref(null)
|
|
-const statistics = ref([])
|
|
|
|
|
|
+const statistics = ref([
|
|
|
|
+ { label: '等待实习', value: 0, key: 'waitInternshipNumber' },
|
|
|
|
+ { label: '实习中', value: 1, key: 'internshipNumber' },
|
|
|
|
+ { label: '实习结束', value: 0, key: 'internshipSuccessNumber' }
|
|
|
|
+])
|
|
|
|
|
|
const loading = ref(false)
|
|
const loading = ref(false)
|
|
const total = ref(0)
|
|
const total = ref(0)
|
|
@@ -94,18 +79,16 @@ const query = ref({
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
startTime: null
|
|
startTime: null
|
|
})
|
|
})
|
|
-const tableData = ref([])
|
|
|
|
|
|
+const tableData = ref([
|
|
|
|
+ { workProvinceName: '辞图科技', internshipNumber: 1, internshipSuccessNumber: 0, waitInternshipNumber: 0 },
|
|
|
|
+])
|
|
|
|
+const schoolInfo = ref(localStorage.getItem('schoolInfo') ? JSON.parse(localStorage.getItem('schoolInfo')) : {})
|
|
|
|
|
|
const headers = [
|
|
const headers = [
|
|
- { title: '学生姓名', key: 'studentName', sortable: false },
|
|
|
|
- { title: '就读学校', key: 'student.schoolName', sortable: false },
|
|
|
|
- { title: '所属院系', key: 'student.schoolDepartmentName', sortable: false },
|
|
|
|
- { title: '所属专业', key: 'student.majorName', sortable: false },
|
|
|
|
- { title: '应聘职位', key: 'job.name', sortable: false, value: item => formatName(item.job.name) },
|
|
|
|
- { title: '到岗日期', key: 'startTime', sortable: false, value: item => timesTampChange(item.startTime, 'Y-M-D') },
|
|
|
|
- { title: '结束日期', key: 'endTime', sortable: false, value: item => timesTampChange(item.endTime, 'Y-M-D') },
|
|
|
|
- { title: '创建日期', key: 'createTime', sortable: false, value: item => timesTampChange(item.createTime) },
|
|
|
|
- { title: '操作', key: 'actions', sortable: false }
|
|
|
|
|
|
+ { title: '实习企业', key: 'workProvinceName', sortable: false },
|
|
|
|
+ { title: '实习中', key: 'internshipNumber', sortable: false },
|
|
|
|
+ { title: '实习结束', key: 'internshipSuccessNumber', sortable: false },
|
|
|
|
+ { title: '等待实习', key: 'waitInternshipNumber', sortable: false },
|
|
]
|
|
]
|
|
|
|
|
|
// 学生列表
|
|
// 学生列表
|
|
@@ -127,18 +110,19 @@ const getList = async () => {
|
|
// 数值统计
|
|
// 数值统计
|
|
const getStatistics = async () => {
|
|
const getStatistics = async () => {
|
|
try {
|
|
try {
|
|
- const data = await getRecordStatusCount({ type: '-1' })
|
|
|
|
- statistics.value.forEach(e => {
|
|
|
|
- const obj = data.find(val => val.key === e.value)
|
|
|
|
- e.count = obj ? obj.value : 0
|
|
|
|
- })
|
|
|
|
|
|
+ const data = await studentPracticeStatistics({ schoolId: schoolInfo.value?.school?.schoolId })
|
|
|
|
+ console.log(data, 'data')
|
|
|
|
+ // statistics.value.forEach(e => {
|
|
|
|
+ // const obj = data.find(val => val.key === e.value)
|
|
|
|
+ // e.count = obj ? obj.value : 0
|
|
|
|
+ // })
|
|
} catch {}
|
|
} catch {}
|
|
}
|
|
}
|
|
|
|
|
|
onMounted(async () => {
|
|
onMounted(async () => {
|
|
- const { data } = await getDict('student_practice_status')
|
|
|
|
- statistics.value = data
|
|
|
|
- // getStatistics()
|
|
|
|
|
|
+ // const { data } = await getDict('student_practice_status')
|
|
|
|
+ // statistics.value = data
|
|
|
|
+ getStatistics()
|
|
// getList()
|
|
// getList()
|
|
})
|
|
})
|
|
|
|
|