提交 d72c2d94 authored 作者: 王鹏飞's avatar 王鹏飞

chore: update

上级 f6dcc485
......@@ -14,6 +14,7 @@
"countup.js": "^2.2.0",
"element-plus": "^2.2.5",
"pinia": "^2.0.14",
"qs": "^6.10.5",
"vue": "^3.2.37",
"vue-router": "^4.0.16"
},
......@@ -21,6 +22,7 @@
"@rushstack/eslint-patch": "^1.1.3",
"@types/blueimp-md5": "^2.18.0",
"@types/node": "^17.0.43",
"@types/qs": "^6.9.7",
"@vitejs/plugin-vue": "^2.3.3",
"@vue/eslint-config-typescript": "^11.0.0",
"@vue/tsconfig": "^0.1.3",
......@@ -346,6 +348,12 @@
"integrity": "sha512-jnUpgw8fL9kP2iszfIDyBQtw5Mf4/XSqy0Loc1J9pI14ejL83XcCEvSf50Gs/4ET0I9VCCDoOfufQysj0S66xA==",
"dev": true
},
"node_modules/@types/qs": {
"version": "6.9.7",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
"dev": true
},
"node_modules/@typescript-eslint/eslint-plugin": {
"version": "5.28.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.28.0.tgz",
......@@ -1134,7 +1142,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
"dev": true,
"dependencies": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.2"
......@@ -2434,8 +2441,7 @@
"node_modules/function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"node_modules/functional-red-black-tree": {
"version": "1.0.1",
......@@ -2447,7 +2453,6 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
"dev": true,
"dependencies": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
......@@ -2557,7 +2562,6 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"dependencies": {
"function-bind": "^1.1.1"
},
......@@ -2578,7 +2582,6 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
"dev": true,
"engines": {
"node": ">= 0.4"
},
......@@ -3200,7 +3203,6 @@
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
"integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
......@@ -3563,10 +3565,9 @@
}
},
"node_modules/qs": {
"version": "6.10.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
"integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
"dev": true,
"version": "6.10.5",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.5.tgz",
"integrity": "sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ==",
"dependencies": {
"side-channel": "^1.0.4"
},
......@@ -3836,7 +3837,6 @@
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"dev": true,
"dependencies": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
......@@ -5000,6 +5000,12 @@
"integrity": "sha512-jnUpgw8fL9kP2iszfIDyBQtw5Mf4/XSqy0Loc1J9pI14ejL83XcCEvSf50Gs/4ET0I9VCCDoOfufQysj0S66xA==",
"dev": true
},
"@types/qs": {
"version": "6.9.7",
"resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz",
"integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==",
"dev": true
},
"@typescript-eslint/eslint-plugin": {
"version": "5.28.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.28.0.tgz",
......@@ -5560,7 +5566,6 @@
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
"dev": true,
"requires": {
"function-bind": "^1.1.1",
"get-intrinsic": "^1.0.2"
......@@ -6445,8 +6450,7 @@
"function-bind": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
"dev": true
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"functional-red-black-tree": {
"version": "1.0.1",
......@@ -6458,7 +6462,6 @@
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
"dev": true,
"requires": {
"function-bind": "^1.1.1",
"has": "^1.0.3",
......@@ -6541,7 +6544,6 @@
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
"dev": true,
"requires": {
"function-bind": "^1.1.1"
}
......@@ -6555,8 +6557,7 @@
"has-symbols": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
"dev": true
"integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="
},
"http-errors": {
"version": "2.0.0",
......@@ -7062,8 +7063,7 @@
"object-inspect": {
"version": "1.12.0",
"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz",
"integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==",
"dev": true
"integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g=="
},
"once": {
"version": "1.4.0",
......@@ -7330,10 +7330,9 @@
"dev": true
},
"qs": {
"version": "6.10.3",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz",
"integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
"dev": true,
"version": "6.10.5",
"resolved": "https://registry.npmjs.org/qs/-/qs-6.10.5.tgz",
"integrity": "sha512-O5RlPh0VFtR78y79rgcgKK4wbAI0C5zGVLztOIdpWX6ep368q5Hv6XRxDvXuZ9q3C6v+e3n8UfZZJw7IIG27eQ==",
"requires": {
"side-channel": "^1.0.4"
}
......@@ -7514,7 +7513,6 @@
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
"integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
"dev": true,
"requires": {
"call-bind": "^1.0.0",
"get-intrinsic": "^1.0.2",
......
......@@ -19,6 +19,7 @@
"countup.js": "^2.2.0",
"element-plus": "^2.2.5",
"pinia": "^2.0.14",
"qs": "^6.10.5",
"vue": "^3.2.37",
"vue-router": "^4.0.16"
},
......@@ -26,6 +27,7 @@
"@rushstack/eslint-patch": "^1.1.3",
"@types/blueimp-md5": "^2.18.0",
"@types/node": "^17.0.43",
"@types/qs": "^6.9.7",
"@vitejs/plugin-vue": "^2.3.3",
"@vue/eslint-config-typescript": "^11.0.0",
"@vue/tsconfig": "^0.1.3",
......
<script setup lang="ts">
import AppLayout from './layout/Index.vue'
// const menus = [
// { title: '发布职位', path: '/hr/posts/job' },
// { title: '校友人才', path: '/hr/alumni' }
// ]
</script>
<template>
<AppLayout>
<AppContainer background="white"></AppContainer>
</AppLayout>
</template>
......@@ -27,13 +27,16 @@ function genMenuClassName(item: MenuType) {
</li>
</ul>
</div>
<div class="app-container-main"><slot></slot></div>
<div class="app-container-main">
<slot>
<router-view></router-view>
</slot>
</div>
</div>
</template>
<style lang="scss">
.app-container {
padding: 40px 0 30px;
display: flex;
align-items: flex-start;
}
......
......@@ -58,7 +58,7 @@ const fetchList = (isReset = false) => {
// 翻页参数设置
if (props.hasPagination) {
requestParams.page = page.currentPage
requestParams['per-page'] = page.size
requestParams.limit = page.size
}
// 接口请求之前
if (beforeRequest) {
......@@ -73,7 +73,7 @@ const fetchList = (isReset = false) => {
return (
httpRequest(requestParams)
.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
dataList.value = list
})
......
......@@ -3,7 +3,9 @@
<AppHeader></AppHeader>
<section class="app-layout-container">
<div class="app-layout-inner">
<slot>
<router-view></router-view>
</slot>
</div>
</section>
<AppFooter></AppFooter>
......@@ -24,5 +26,6 @@ import AppFooter from './Footer.vue'
.app-layout-inner {
width: 1200px;
margin: 0 auto;
padding: 40px 0 30px;
}
</style>
......@@ -60,16 +60,28 @@ const rows: Record<string, any>[] = [
},
{
attrs: { style: 'flex: 0 0 194px;' },
title: '实习就业',
title: '职业技能培训',
items: [
{
icon: 'https://webapp-pub.ezijing.com/project/saas/icon_5_1.png',
hoverIcon: 'https://webapp-pub.ezijing.com/project/saas/icon_5_1_hover.png',
title: '实习就业平台',
href: 'https://www.ezijing.com/services/employment'
icon: 'https://webapp-pub.ezijing.com/project/saas/icon_2_3_1.png',
hoverIcon: 'https://webapp-pub.ezijing.com/project/saas/icon_2_3_1_hover.png',
title: '数字职业技能培训中心',
href: 'https://vst-saas.ezijing.com'
}
]
}
// {
// attrs: { style: 'flex: 0 0 194px;' },
// title: '实习就业',
// items: [
// {
// icon: 'https://webapp-pub.ezijing.com/project/saas/icon_5_1.png',
// hoverIcon: 'https://webapp-pub.ezijing.com/project/saas/icon_5_1_hover.png',
// title: '实习就业平台',
// href: 'https://www.ezijing.com/services/employment'
// }
// ]
// }
],
[
{
......@@ -119,19 +131,19 @@ const rows: Record<string, any>[] = [
href: 'https://marywood-learning.ezijing.com'
}
]
},
{
attrs: { style: 'flex: 0 0 194px;' },
title: '职业技能培训',
items: [
{
icon: 'https://webapp-pub.ezijing.com/project/saas/icon_2_3_1.png',
hoverIcon: 'https://webapp-pub.ezijing.com/project/saas/icon_2_3_1_hover.png',
title: '数字职业技能培训中心',
href: 'https://vst-saas.ezijing.com'
}
]
}
// {
// attrs: { style: 'flex: 0 0 194px;' },
// title: '职业技能培训',
// items: [
// {
// icon: 'https://webapp-pub.ezijing.com/project/saas/icon_2_3_1.png',
// hoverIcon: 'https://webapp-pub.ezijing.com/project/saas/icon_2_3_1_hover.png',
// title: '数字职业技能培训中心',
// href: 'https://vst-saas.ezijing.com'
// }
// ]
// }
],
[
{
......@@ -141,13 +153,19 @@ const rows: Record<string, any>[] = [
icon: 'https://webapp-pub.ezijing.com/project/saas/icon_7_1.png',
hoverIcon: 'https://webapp-pub.ezijing.com/project/saas/icon_7_1_hover.png',
title: '企业注册',
href: '/hr/company/create'
// href: '/hr/company/create'
onClick() {
ElMessage({ message: '暂未开放' })
}
},
{
icon: 'https://webapp-pub.ezijing.com/project/saas/icon_7_2.png',
hoverIcon: 'https://webapp-pub.ezijing.com/project/saas/icon_7_2_hover.png',
title: '招聘岗位',
href: '/hr/posts/job'
// href: '/hr/posts/job'
onClick() {
ElMessage({ message: '暂未开放' })
}
},
{
className: 'is-blue',
......@@ -161,7 +179,10 @@ const rows: Record<string, any>[] = [
icon: 'https://webapp-pub.ezijing.com/project/saas/icon_7_4.png',
hoverIcon: 'https://webapp-pub.ezijing.com/project/saas/icon_7_4_hover.png',
title: '岗位求职',
href: '/hr/job'
// href: '/hr/job'
onClick() {
ElMessage({ message: '暂未开放' })
}
}
]
},
......@@ -173,13 +194,19 @@ const rows: Record<string, any>[] = [
icon: 'https://webapp-pub.ezijing.com/project/saas/icon_7_5.png',
hoverIcon: 'https://webapp-pub.ezijing.com/project/saas/icon_7_5_hover.png',
title: '发布项目',
href: '/project/create'
// href: '/project/create'
onClick() {
ElMessage({ message: '暂未开放' })
}
},
{
icon: 'https://webapp-pub.ezijing.com/project/saas/icon_7_6.png',
hoverIcon: 'https://webapp-pub.ezijing.com/project/saas/icon_7_6_hover.png',
title: '寻找项目',
href: '/project'
// href: '/project'
onClick() {
ElMessage({ message: '暂未开放' })
}
}
]
}
......@@ -262,13 +289,11 @@ const rows: Record<string, any>[] = [
</template>
<style lang="scss">
.home {
padding-top: 20px;
overflow: hidden;
}
.row {
display: flex;
margin: 20px 0;
}
.row + .row {
margin-top: 20px;
}
.row-cell {
flex: 1;
......
import httpRequest from '@/utils/axios'
// 获取校友列表
export function getAlumniList(params: {
project_prefix_arr: []
workplace: string
industry: string
province: string
city: string
}) {
return httpRequest.get('/api/hr/api/v1/alumni-talents', { params })
}
// 获取校友详情
export function getAlumniDetail(params: { id: string }) {
return httpRequest.get(`/api/hr/admin/v1/alumni-tenant/${params.id}`, { params })
}
import type { RouteRecordRaw } from 'vue-router'
import AppLayout from '@/components/layout/Index.vue'
import HRLayout from '@/components/HRLayout.vue'
export const routes: Array<RouteRecordRaw> = [
{
path: '/hr/alumni',
component: AppLayout,
component: HRLayout,
children: [
{
path: '',
component: () => import('./views/List.vue')
}
]
},
{
path: '/hr/alumni',
component: AppLayout,
children: [
{
path: 'view/:id',
component: () => import('./views/View.vue'),
......
export interface AlumniType {
id: string
sso_id: string
username: string
sex: string
birthday: string
graduating_institution: string
specialty: string
highest_qualification: string
class_id: string
project_prefix: string
province: string
city: string
industry: string
workplace: string
department: string
position: string
created_at: string
updated_at: string
}
<script setup lang="ts">
const menus = [
{ title: '发布职位', path: '/hr/posts/job' },
{ title: '校友人才', path: '/hr/alumni' }
]
import { sex } from '@/utils/dictionary'
import { getAlumniList } from '../api'
import type { AlumniType } from '../types'
const listOptions = {
remote: {
httpRequest: getAlumniList,
params: {
project_prefix_arr: ['sofia']
}
},
filters: [
{ type: 'input', label: '公司名称', prop: 'name' },
{ type: 'select', label: '所在行业', prop: 'type' },
{ type: 'select', label: '省份', prop: 'education' }
{ type: 'input', label: '工作单位', prop: 'workplace' },
{ type: 'select', label: '所在行业', prop: 'industry' },
{ type: 'select', label: '省份', prop: 'province' },
{ type: 'select', label: '城市', prop: 'city' }
],
columns: [
{ label: '姓名', prop: 'username' },
{ label: '性别', prop: 'type' },
{ label: '班级', prop: 'class_id' },
{ label: '项目', prop: 'project_prefix' },
{ label: '省份', prop: 'education' },
{ label: '城市', prop: 'education' },
{ label: '所在行业', prop: 'education' },
{ label: '公司名称', prop: 'education' },
{ label: '操作', prop: 'education' }
{ label: '姓名', prop: 'username', align: 'center' },
{
label: '性别',
prop: 'sex',
align: 'center',
computed({ row }: { row: AlumniType }) {
console.log(row.sex)
return sex[row.sex] || row.sex
}
},
{ label: '班级', prop: 'class.name', align: 'center' },
{ label: '项目', prop: 'project_prefix', 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-actions', align: 'center' }
],
data: [{ username: '哈哈哈' }, { username: '哈哈哈' }]
}
</script>
<template>
<AppContainer :menus="menus" background="white">
<AppList v-bind="listOptions"> </AppList>
</AppContainer>
<AppList v-bind="listOptions">
<template #table-actions="{ row }">
<router-link :to="`/hr/alumni/view/${row.id}`">查看</router-link>
</template>
</AppList>
</template>
<style lang="scss" scoped>
......
<script setup lang="ts">
const menus = [
{ title: '发布职位', path: '/hr/posts/job' },
{ title: '校友人才', path: '/hr/alumni' }
]
import { getAlumniDetail } from '../api'
// import type { AlumniType } from '../types'
const listOptions = {
remote: {},
filters: [
{ type: 'input', label: '岗位名称', prop: 'name' },
{ type: 'select', label: '岗位类型', prop: 'type' },
{ type: 'select', label: '学历要求', prop: 'education' },
{ type: 'select', label: '工作地点', prop: 'work_locations' }
],
columns: [
{ label: '编号', prop: 'name' },
{ label: '岗位名称', prop: 'name' },
{ label: '岗位类型', prop: 'type' },
{ label: '地点', prop: 'work_locations' },
{ label: '学历要求', prop: 'education' },
{ label: '薪酬范围', prop: 'education' },
{ label: '投递人数', prop: 'education' },
{ label: '状态', prop: 'status' },
{ label: '操作', prop: 'education' }
]
}
const props = defineProps<{ id: string }>()
const data: any = reactive({
id: '',
sso_id: '',
username: '',
sex: '',
birthday: '',
graduating_institution: '',
specialty: '',
highest_qualification: '',
class_id: '',
project_prefix: '',
province: '',
city: '',
industry: '',
workplace: '',
department: '',
position: '',
created_at: '',
updated_at: ''
})
onMounted(() => {
getAlumniDetail({ id: props.id }).then(res => {
Object.assign(data, res.data.detail)
})
})
</script>
<template>
<AppContainer :menus="menus" background="white">
<AppList v-bind="listOptions">
<router-link to="/hr/posts/job/create">
<el-button type="primary">发布岗位</el-button>
</router-link>
</AppList>
</AppContainer>
<AppCard>
<div class="alumni-info">
<dl>
<dt>编号</dt>
<dd></dd>
</dl>
<dl>
<dt>姓名</dt>
<dd>{{ data.username }}</dd>
</dl>
<dl>
<dt>所在项目</dt>
<dd>{{ data.project_prefix }}</dd>
</dl>
<dl>
<dt>所在班级</dt>
<dd>{{ data.class?.name }}</dd>
</dl>
<dl>
<dt>省份</dt>
<dd>{{ data.province }}</dd>
</dl>
<dl>
<dt>城市</dt>
<dd>{{ data.city }}</dd>
</dl>
<dl>
<dt>所在行业</dt>
<dd>{{ data.industry }}</dd>
</dl>
<dl>
<dt>工作单位</dt>
<dd>{{ data.workplace }}</dd>
</dl>
</div>
</AppCard>
<AppCard class="company-info">
<h1>企业简介<span>Company Profile</span></h1>
<p class="tips">暂未注册企业</p>
</AppCard>
</template>
<style lang="scss">
.alumni-info {
padding: 24px;
display: grid;
grid-template-columns: repeat(5, 1fr);
dl {
margin: 10px;
text-align: center;
height: 38px;
border-left: 1px dashed #c9c9c9;
}
dl:nth-child(5n + 1) {
border-left: none;
}
dt {
font-size: 14px;
font-weight: 400;
color: #666666;
}
dd {
font-size: 18px;
font-weight: 400;
color: #333333;
}
}
.company-info {
padding: 44px;
margin-top: 20px;
h1 {
font-size: 32px;
font-weight: bold;
line-height: 1;
color: #141414;
padding-bottom: 25px;
border-bottom: 1px solid #ddd;
span {
margin-left: 6px;
font-size: 26px;
font-family: Lato;
font-weight: 400;
line-height: 32px;
color: #666666;
}
}
.tips {
padding: 100px 0;
font-size: 26px;
font-family: Lato;
font-weight: 400;
line-height: 32px;
color: #666666;
text-align: center;
}
}
</style>
import type { RouteRecordRaw } from 'vue-router'
import AppLayout from '@/components/layout/Index.vue'
import HRLayout from '@/components/HRLayout.vue'
export const routes: Array<RouteRecordRaw> = [
{
path: '/hr/posts',
component: AppLayout,
component: HRLayout,
children: [
{ path: 'job', component: () => import('./views/Job.vue') },
{ path: 'job/create', component: () => import('./views/JobUpdate.vue') },
......
<script setup lang="ts">
import AppList from '@/components/base/AppList.vue'
import { jobTypeList, educationList } from '@/utils/dictionary'
const menus = [
{ title: '发布职位', path: '/hr/posts/job' },
{ title: '校友人才', path: '/hr/alumni' }
]
const appList = $ref<InstanceType<typeof AppList> | null>(null)
const listOptions = {
remote: {},
......@@ -33,7 +30,6 @@ const listOptions = {
</script>
<template>
<AppContainer :menus="menus" background="white">
<AppList v-bind="listOptions" ref="appList">
<div style="margin: 20px 0">
<router-link to="/hr/posts/job/create">
......@@ -51,7 +47,6 @@ const listOptions = {
</router-link>
</template>
</AppList>
</AppContainer>
</template>
<style lang="scss" scoped>
......
......@@ -5,11 +5,6 @@ import { createCompany, updateCompany, getCompany } from '../api'
import type { JobType } from '../types'
import { jobTypeList, educationList } from '@/utils/dictionary'
const menus = [
{ title: '发布职位', path: '/hr/posts/job' },
{ title: '校友人才', path: '/hr/alumni' }
]
const props = defineProps<{ id?: string }>()
const router = useRouter()
......@@ -69,7 +64,6 @@ onMounted(() => {
</script>
<template>
<AppContainer :menus="menus" background="white">
<el-form
ref="formRef"
:model="form"
......@@ -114,5 +108,4 @@ onMounted(() => {
<el-button auto-insert-space @click="onCancel">取消</el-button>
</el-row>
</el-form>
</AppContainer>
</template>
<script setup lang="ts">
const menus = [
{ title: '发布职位', path: '/hr/posts/job' },
{ title: '校友人才', path: '/hr/alumni' }
]
const listOptions = {
remote: {},
columns: [
......@@ -17,10 +12,8 @@ const listOptions = {
</script>
<template>
<AppContainer :menus="menus" background="white">
<h2>岗位详情</h2>
<AppList v-bind="listOptions">
<template #table-actions> 查看 </template>
</AppList>
</AppContainer>
</template>
import axios from 'axios'
import qs from 'qs'
import { ElMessage } from 'element-plus'
import router from '@/router'
const httpRequest = axios.create({
baseURL: 'https://learn-api.ezijing.com',
// baseURL: 'https://learn-api.ezijing.com',
timeout: 60000,
withCredentials: true
withCredentials: true,
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
// 请求拦截
httpRequest.interceptors.request.use(
function (config) {
// 权限接口单独签名
// https://gitlab.ezijing.com/root/api-documents/-/blob/master/ezijing_permissions/%E7%AD%BE%E5%90%8D%E9%AA%8C%E8%AF%81.md
if (config.url && /^\/api\/hr/.test(config.url)) {
// 默认参数
const defaultHeaders = {
timestamp: Date.now(),
nonce: Math.random().toString(36).slice(-8),
// 'secret-id': import.meta.env.VITE_SECRET_ID,
// 'secret-key': import.meta.env.VITE_SECRET_KEY,
signature: 'UG7wBenexQhiuD2wpCwuxkU0jqcj006d'
}
// config.headers = Object.assign(config.headers, defaultHeaders)
config.params = Object.assign(config.params, defaultHeaders)
}
if (config.headers?.['Content-Type'] === 'application/x-www-form-urlencoded') {
config.data = qs.stringify(config.data, { skipNulls: true })
}
if (config.headers?.['Content-Type'] === 'multipart/form-data') {
const formData = new window.FormData()
for (const key in config.data) {
formData.append(key, config.data[key])
}
config.data = formData
}
return config
},
function (error) {
return Promise.reject(error)
}
)
// 响应拦截
httpRequest.interceptors.response.use(
function (response) {
const { data } = response
// 正常返回
if (data.code === 0) {
return data
}
// 未登录
if (data.code === 4001) {
location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(location.href)}`
return Promise.reject(data)
}
if (data.code === 1 || data.code === 404) {
ElMessage.error(data.message || data.msg)
return Promise.reject(data)
}
return data
},
function (error) {
if (error.response) {
......@@ -26,7 +68,11 @@ httpRequest.interceptors.response.use(
// 未登录
if (status === 403) {
location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(location.href)}`
} else if (status === 400) {
// 未授权
router.push('/401')
} else {
ElMessage.error(message)
console.error(`${status}: ${message}`)
}
} else {
......
......@@ -58,3 +58,12 @@ export const projectType = {
}
// 项目类型列表
export const projectTypeList = json2Array(projectType)
// 性别
export const sex = {
'0': '女士',
'1': '先生',
'2': '未知'
}
// 性别
export const sexList = json2Array(sex)
......@@ -17,7 +17,7 @@ export default defineConfig(({ mode }) => {
dts: true,
eslintrc: { enabled: true }
}),
checker({ vueTsc: true, eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' } })
checker({ eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' } })
],
server: {
open: true,
......@@ -25,6 +25,14 @@ export default defineConfig(({ mode }) => {
https: {
key: fs.readFileSync(path.join(__dirname, './https/dev.ezijing.com.key')),
cert: fs.readFileSync(path.join(__dirname, './https/dev.ezijing.com.pem'))
},
proxy: {
'/api': 'https://e-saas.ezijing.com/'
// '/api/saas': {
// target: 'https://saas-company-api.ezijing.com/',
// changeOrigin: true,
// rewrite: path => path.replace('/api/saas', '')
// }
}
},
resolve: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论