| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <template>
- <v-card class="card-box pa-3">
- <CtTable
- :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 class="entLogoImg" tile 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="handleDetail(item.id)">{{ formatName(item.anotherName || item.name) }}</span>
- </div>
- </template>
- <template #studentCount="{ item }">
- <span class="color-primary cursor-pointer" @click="handleStudent(item.id)">{{ item.studentCount || 0 }}人</span>
- </template>
- </CtTable>
- </v-card>
- <CtDialog :visible="drill.show" :widthType="1" titleClass="text-h6" :footer="false" :title="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"
- >
- </CtTable>
- </CtDialog>
- </template>
- <script setup>
- defineOptions({name: 'internship-company'})
- import { ref, onMounted } from 'vue'
- import { internshipCompanyList } from '@/api/school'
- import { formatName } from '@/utils/getText'
- const total = ref(0)
- const loading = ref(false)
- const query = ref({
- size: 10,
- current: 10,
- schoolId: JSON.parse(localStorage.getItem('schoolInfo'))?.schoolId
- })
- const tableData = ref([
- {
- "id": 1,
- "name": "门墩儿信息科技有限公司",
- "anotherName": "门墩儿",
- "industryId": "1829087620475494402",
- "industryName": '互联网',
- "scale": "0",
- "scaleName": '0-20人',
- "logoUrl": "https://minio.menduner.com/dev/1e6893918ef378ca280360078dfe74ade10b27101c89865261824b46de7d34a6.png",
- studentCount: 2
- }
- ])
- const headers = [
- { title: '企业名称', key: 'enterpriseName', sortable: false },
- { title: '在岗实习学生', key: 'studentCount', sortable: false },
- { title: '所在行业', key: 'industryName', sortable: false },
- { title: '企业规模', key: 'scaleName', sortable: false }
- ]
- const getList = async () => {
- try {
- const data = await internshipCompanyList(query.value)
- console.log(data, 'data')
- } catch {}
- }
- const handleChangePage = (page) => {
- query.value.current = page
- getList()
- }
- // 跳转企业详情
- const handleDetail = (id) => {
- if (!id) return
- window.open(`/recruit/personal/company/details/${id}?key=briefIntroduction`)
- }
- const drill = ref({
- total: 0,
- query: {
- size: 10,
- current: 1
- },
- show: false,
- list: [],
- headers: [
- { title: '学生姓名', key: 'studentName', sortable: false },
- ]
- })
- // 在岗实习学生列表
- const handleStudent = (id) => {
- drill.value.query.current = 1
- drill.value.show = true
- }
- const handleChangeDrillPage = (page) => {
- drill.value.query.current = page
- }
- const handleClose = () => {
- drill.value.show = false
- drill.value.list = []
- }
- onMounted(async () => {
- // await getList()
- })
- </script>
- <style lang="scss" scoped>
- </style>
|