提交 255b43d9 authored 作者: matian's avatar matian

chore:校友管理开发

上级 95fcdae9
...@@ -58,7 +58,7 @@ const fetchList = (isReset = false) => { ...@@ -58,7 +58,7 @@ const fetchList = (isReset = false) => {
// 翻页参数设置 // 翻页参数设置
if (props.hasPagination) { if (props.hasPagination) {
requestParams.page = page.currentPage requestParams.page = page.currentPage
requestParams['per-page'] = page.size requestParams.limit = page.size
} }
// 接口请求之前 // 接口请求之前
if (beforeRequest) { if (beforeRequest) {
...@@ -73,7 +73,7 @@ const fetchList = (isReset = false) => { ...@@ -73,7 +73,7 @@ const fetchList = (isReset = false) => {
return ( return (
httpRequest(requestParams) httpRequest(requestParams)
.then((res: any) => { .then((res: any) => {
const { list = [], total = 0 } = callback ? callback(res.data, requestParams) : res.data || {} const { data: list = [], total = 0 } = callback ? callback(res.data, requestParams) : res.data || {}
page.total = total page.total = total
dataList.value = list dataList.value = list
}) })
......
import httpRequest from '@/utils/axios' import httpRequest from '@/utils/axios'
// 获取视频列表 // 获取校友列表
export function getVideoList(params?: { type?: string; page?: number; page_size?: number }) { export function getAlumniList(params?: {
return httpRequest.get('/api/psp/backend/video/index', { params }) username?: string
sex?: string
class_id?: string
province?: string
city?: string
industry?: string
workplace?: string
page?: number
limit?: number
}) {
return httpRequest.get('/api/hr/admin/v1/alumni-tenants', { params })
}
// 获取校友详情
export function getAlumniView(params: { id: string }) {
return httpRequest.get(`/api/hr/admin/v1/alumni-tenant/${params.id}`, { params })
} }
const allPrefix = [
{ prefix: 'sofia', name: '索菲亚' },
{ prefix: 'kelley', name: '凯丽' },
{ prefix: 'marywood', name: '玛丽伍德' },
{ prefix: 'marywood_plus', name: '玛丽伍德1+1' },
{ prefix: 'cbu_plus', name: '加州浸会大学1+1' },
{ prefix: 'sbu_plus', name: '纽约大学石溪分校1+1' }
]
export default allPrefix
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue'
import { getAlumniList } from '../api'
const appList = ref() const appList = ref()
const listOptions = {
const listOptions = $computed(() => { remote: {
return { httpRequest: getAlumniList,
remote: { params: {
params: { type: '' } project_prefix: '',
username: '',
sex: '',
class_id: '',
province: '',
city: '',
industry: '',
workplace: ''
}
},
filters: [
{ type: 'input', prop: 'username', placeholder: '姓名' },
{
type: 'select',
prop: 'sex',
placeholder: '性别',
options: [
{ value: '0', label: '女士' },
{ value: '1', label: '先生' },
{ value: '2', label: '未知' }
]
}, },
filters: [ { type: 'input', prop: 'class_id', placeholder: '班级' },
{ type: 'input', prop: 'username', placeholder: '姓名' }, { type: 'input', prop: 'province', placeholder: '省份' },
{ { type: 'input', prop: 'city', placeholder: '城市' },
type: 'select', { type: 'input', prop: 'industry', placeholder: '所在行业' },
prop: 'sex', { type: 'input', prop: 'workplace', placeholder: '工作单位' }
placeholder: '性别', ],
options: [ columns: [
{ value: '0', label: '男' }, { label: '姓名', prop: 'username', align: 'center' },
{ value: '1', label: '女' } {
] label: '性别',
}, prop: 'sex',
{ type: 'input', prop: 'class_id', placeholder: '班级' }, align: 'center',
{ type: 'input', prop: 'province', placeholder: '省份' }, computed(row: any) {
{ type: 'input', prop: 'city', placeholder: '城市' }, if (row.row.sex === '0') {
{ type: 'input', prop: 'industry', placeholder: '所在行业' }, return '女士'
{ type: 'input', prop: 'workplace', placeholder: '工作单位' } } else if (row.row.sex === '1') {
], return '女士'
columns: [ } else if (row.row.sex === '2') {
{ label: '姓名', prop: 'username', align: 'center' }, return '女士'
{ label: '性别', prop: 'sex', align: 'center' }, }
{ label: '班级', prop: 'class_id', align: 'center' },
{ label: '省份', prop: 'province', align: 'center' },
{ label: '城市', prop: 'city', align: 'center' },
{ label: '所在行业', prop: 'industry', align: 'center' },
{ label: '工作单位', prop: 'workplace', align: 'center' },
{ label: '是否已注册', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-operate', width: 230, align: 'center' }
],
data: [
{
username: 'lisi'
} }
] },
} { label: '班级', prop: 'name', align: 'center' },
}) { label: '省份', prop: 'province', align: 'center' },
{ label: '城市', prop: 'city', align: 'center' },
{ label: '所在行业', prop: 'industry', align: 'center' },
{ label: '工作单位', prop: 'workplace', align: 'center' },
{ label: '操作', slots: 'table-operate', width: 230, align: 'center' }
]
}
</script> </script>
<template> <template>
...@@ -48,7 +65,7 @@ const listOptions = $computed(() => { ...@@ -48,7 +65,7 @@ const listOptions = $computed(() => {
<AppList v-bind="listOptions" ref="appList"> <AppList v-bind="listOptions" ref="appList">
<template #table-operate="{ row }"> <template #table-operate="{ row }">
<el-space> <el-space>
<router-link :to="`/alumni/view?${row.id}`"> <router-link :to="`/alumni/view?id=${row.id}`">
<el-link type="primary">查看</el-link> <el-link type="primary">查看</el-link>
</router-link> </router-link>
</el-space> </el-space>
......
<script setup lang="ts"> <script setup lang="ts">
import { getAlumniView } from '../api'
import allPrefixList from '../prefix'
const route = useRoute() const route = useRoute()
//审核通过 // const detailList = reactive({
const handleAdultSuccess = () => { // username: 'lisi',
console.log('审核通过') // sex: '男',
history.go(-1) // birthday: '1999-11-12',
} // graduating_institution: '清华',
//审核不通过 // specialty: '计算机科学与技术',
const handleAdultFailed = () => { // highest_qualification: '博士',
console.log('审核不通过') // province: '北京',
history.go(-1) // city: '北京',
} // project_prefix: 'x1',
// name: '11',
const detailList = reactive({ // workplace: '紫荆',
username: 'lisi', // industry: '专业技术类',
sex: '男', // department: '研发',
birthday: '1999-11-12', // position: '前端开发',
graduating_institution: '清华', // status: '11',
specialty: '计算机科学与技术', // num: 100
highest_qualification: '博士', // })
province: '北京', const detailList = ref('')
city: '北京', onMounted(() => {
project_prefix: 'x1', getAlumniDetail()
class_id: '11',
workplace: '紫荆',
industry: '专业技术类',
department: '研发',
position: '前端开发',
status: '11',
num: 100
}) })
const getAlumniDetail = () => {
const params: any = { id: route.query.id }
getAlumniView(params).then((res: any) => {
detailList.value = res.data.detail
})
}
// allPrefixList.find(item => item.prefix === detailList.project_prefix)
</script> </script>
<template> <template>
...@@ -49,30 +51,15 @@ const detailList = reactive({ ...@@ -49,30 +51,15 @@ const detailList = reactive({
<el-descriptions-item label="省份:">{{ detailList.province }}</el-descriptions-item> <el-descriptions-item label="省份:">{{ detailList.province }}</el-descriptions-item>
<el-descriptions-item label="城市:">{{ detailList.city }}</el-descriptions-item> <el-descriptions-item label="城市:">{{ detailList.city }}</el-descriptions-item>
<el-descriptions-item label="项目:">{{ detailList.project_prefix }}</el-descriptions-item> <el-descriptions-item label="项目:">{{ detailList.project_prefix }}</el-descriptions-item>
<el-descriptions-item label="班级:">{{ detailList.class_id }}</el-descriptions-item> <el-descriptions-item label="班级:">{{ detailList.name }}</el-descriptions-item>
<el-descriptions-item label="工作单位:">{{ detailList.workplace }}</el-descriptions-item> <el-descriptions-item label="工作单位:">{{ detailList.workplace }}</el-descriptions-item>
<el-descriptions-item label="行业类别:">{{ detailList.industry }}</el-descriptions-item> <el-descriptions-item label="行业类别:">{{ detailList.industry }}</el-descriptions-item>
<el-descriptions-item label="工作部门:">{{ detailList.department }}</el-descriptions-item> <el-descriptions-item label="工作部门:">{{ detailList.department }}</el-descriptions-item>
<el-descriptions-item label="工作职位:">{{ detailList.position }}</el-descriptions-item> <el-descriptions-item label="工作职位:">{{ detailList.position }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-divider />
<el-descriptions :column="3" title="企业信息">
<el-descriptions-item label="状态:">{{ detailList.status }}</el-descriptions-item>
<el-descriptions-item label="工作单位:">{{ detailList.workplace }}</el-descriptions-item>
<el-descriptions-item label="岗位数量:">{{ detailList.num }}</el-descriptions-item> // 待修改
</el-descriptions>
<el-row justify="end" v-if="route.query.isAdult === '1'">
<el-button type="primary" @click="handleAdultSuccess">审批通过</el-button>
<el-button type="warning" @click="handleAdultFailed"> 审批不通过</el-button>
</el-row>
</AppCard> </AppCard>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
// :deep(.el-descriptions__title) {
// font-size: 18px;
// font-weight: 500;
// color: #333333;
// }
:deep(.el-descriptions__label) { :deep(.el-descriptions__label) {
font-size: 14px; font-size: 14px;
font-weight: 400; font-weight: 400;
......
...@@ -4,14 +4,14 @@ import { fileURLToPath, URL } from 'url' ...@@ -4,14 +4,14 @@ import { fileURLToPath, URL } from 'url'
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue' import vue from '@vitejs/plugin-vue'
import checker from 'vite-plugin-checker' // import checker from 'vite-plugin-checker'
import AutoImport from 'unplugin-auto-import/vite' import AutoImport from 'unplugin-auto-import/vite'
export default defineConfig(({ mode }) => { export default defineConfig(({ mode }) => {
return { return {
base: mode === 'prod' ? 'https://webapp-pub.ezijing.com/website/prod/admin-saas-hr/' : '/', base: mode === 'prod' ? 'https://webapp-pub.ezijing.com/website/prod/admin-saas-hr/' : '/',
plugins: [ plugins: [
checker({ vueTsc: true, eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' } }), // checker({ vueTsc: true, eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' } }),
vue({ reactivityTransform: true }), vue({ reactivityTransform: true }),
AutoImport({ AutoImport({
imports: ['vue', 'vue/macros', 'vue-router', '@vueuse/core'], imports: ['vue', 'vue/macros', 'vue-router', '@vueuse/core'],
...@@ -27,7 +27,7 @@ export default defineConfig(({ mode }) => { ...@@ -27,7 +27,7 @@ export default defineConfig(({ mode }) => {
cert: fs.readFileSync(path.join(__dirname, './https/dev.ezijing.com.pem')) cert: fs.readFileSync(path.join(__dirname, './https/dev.ezijing.com.pem'))
}, },
proxy: { proxy: {
'/api': 'https://psp-center.ezijing.com' '/api': 'https://saas-hr-admin.ezijing.com'
} }
}, },
resolve: { resolve: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论