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

chore: update

上级 f3b003fe
......@@ -94,3 +94,10 @@ body {
.el-button.is-link {
--el-button-text-color: #399ee8;
}
.subtitle {
padding: 30px 0 20px;
font-size: 18px;
font-weight: 500;
line-height: 1;
color: #333;
}
......@@ -8,7 +8,7 @@ import { getSignature } from '@/api/base'
const props = withDefaults(defineProps<{ modelValue: string | []; prefix?: string }>(), {
prefix: 'upload/admin/'
})
const emit = defineEmits(['update:modelValue'])
const emit = defineEmits(['update:modelValue', 'success'])
const uploadData = ref()
......@@ -54,6 +54,7 @@ const handleSuccess = (response: any, file: any, files: any) => {
} else {
emit('update:modelValue', file.raw.url)
}
emit('success', file, files)
}
// 上传限制
......@@ -90,6 +91,7 @@ const handlePreview: UploadProps['onPreview'] = uploadFile => {
:file-list="fileList"
class="uploader"
>
<slot>
<template v-if="showFileList">
<template v-if="$attrs['list-type'] === 'picture-card'">
<el-icon><Plus /></el-icon>
......@@ -102,6 +104,7 @@ const handlePreview: UploadProps['onPreview'] = uploadFile => {
<el-image :src="(modelValue as string)" fit="contain" v-if="modelValue" />
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
</div>
</slot>
<template #tip>
<div class="el-upload__tip"><slot name="tip"></slot></div>
</template>
......
......@@ -159,7 +159,15 @@ const rows: Record<string, any>[] = [
title: '企业注册',
// href: '/hr/company/create'
onClick() {
ElMessage({ message: '暂未开放' })
if (!user.isLogin) {
location.href = `${import.meta.env.VITE_LOGIN_URL}?rd=${encodeURIComponent(location.href)}`
return
}
if (user.projects.length === 0) {
ElMessage({ message: '请联系我们完成企业注册' })
} else {
window.open('/hr/company/create')
}
}
},
{
......
import httpRequest from '@/utils/axios'
import type { CompanyType } from './types'
// 创建公司
export function createCompany(data: CompanyType) {
return httpRequest.post('/api/psp/backend/banner/create', data)
}
// 更新公司
// 更新企业信息
export function updateCompany(data: CompanyType) {
return httpRequest.post('/api/psp/backend/banner/update', data)
return httpRequest.post('/api/hr/api/v1/company/commit', data)
}
// 获取登录用户的企业详情
export function getMyCompany() {
return httpRequest.get('/api/hr/api/v1/company/login-user-company')
}
// 获取公司详情
// 获取企业详情
export function getCompany(params: { id: string }) {
return httpRequest.get('/api/psp/backend/banner/view', { params })
return httpRequest.get(`/api/hr/api/v1/company/${params.id}`, { params })
}
......@@ -7,4 +7,8 @@ export interface CompanyType {
nature: string
code: string
business_licence: string
province: string
city: string
industry: string
status?: 1 | 2 | 3 | 4
}
<script setup lang="ts">
import { ElMessage } from 'element-plus'
import type { FormInstance } from 'element-plus'
import type { FormInstance, FormRules } from 'element-plus'
import AppEditor from '@/components/tinymce/Index.vue'
import { createCompany, updateCompany, getCompany } from '../api'
import { updateCompany, getMyCompany } from '../api'
import type { CompanyType } from '../types'
import { companyTypeList } from '@/utils/dictionary'
import { companyTypeList, industryCategoryList } from '@/utils/dictionary'
import { useArea } from '@/composables/useArea'
const props = defineProps<{ id?: string }>()
const router = useRouter()
......@@ -17,49 +19,62 @@ const form = reactive<CompanyType>({
email: '',
nature: '',
code: '',
business_licence: ''
business_licence: '',
province: '',
city: '',
industry: ''
})
const rules = {
const rules = reactive<FormRules>({
province: [{ required: true, message: '请选择省份', trigger: 'change' }],
city: [{ required: true, message: '请选择城市', trigger: 'change' }],
industry: [{ required: true, message: '请选择行业类别', trigger: 'change' }],
logo: [{ required: true, message: '请上传公司LOGO', trigger: 'change' }],
name: [{ required: true, message: '请输入公司名称', trigger: 'blur' }],
desc: [{ required: true, message: '请输入公司介绍', trigger: 'blur' }],
email: [{ required: true, message: '请输入企业邮箱', trigger: 'blur' }],
email: [
{ required: true, message: '请输入企业邮箱', trigger: 'blur' },
{ type: 'email', message: '请输入正确的邮箱地址', trigger: ['blur', 'change'] }
],
nature: [{ required: true, message: '请选择公司性质', trigger: 'blur' }],
code: [{ required: true, message: '请输入社会统一信用代码', trigger: 'blur' }],
business_licence: [{ required: true, message: '请上传营业执照附件', trigger: 'change' }]
})
// 省市
const { provinceList, cityList, provinceValue } = useArea()
function onProvinceChange() {
provinceValue.value = form.province
}
// 待审核可以修改
const disabled = computed(() => {
return !(!form.status || form.status === 4)
})
// 提交
const onSubmit = () => {
if (!formRef.value) return
formRef.value.validate().then(() => {
props.id ? update() : create()
update()
})
}
// 取消
const onCancel = () => {
router.replace('/banner')
}
// 创建
const create = () => {
createCompany(form).then(() => {
ElMessage({ message: '创建成功', type: 'success' })
router.push('/banner')
})
router.replace('/')
}
// 修改
const update = () => {
const params = { ...form, id: props.id as string }
updateCompany(params).then(() => {
ElMessage({ message: '修改成功', type: 'success' })
router.push('/banner')
ElMessage({ message: '提交成功', type: 'success' })
router.push('/')
})
}
onMounted(() => {
props.id &&
getCompany({ id: props.id }).then(res => {
Object.assign(form, res.data)
getMyCompany().then(res => {
Object.assign(form, res.data.detail)
})
})
</script>
......@@ -70,10 +85,10 @@ onMounted(() => {
<p class="company-register__tips">请完成企业信息认证,完成后即可发布职位</p>
<AppCard>
<div class="company-register__status">
<p style="color: #60b0ea">待审核</p>
<p style="color: #1dc388">审核通过</p>
<p style="color: #898989">审核不通过</p>
<p style="color: #f8524b">已禁用</p>
<p style="color: #60b0ea" v-if="form.status === 3">待审核</p>
<p style="color: #1dc388" v-if="form.status === 1">审核通过</p>
<p style="color: #898989" v-if="form.status === 4">审核不通过</p>
<p style="color: #f8524b" v-if="form.status === 2">已禁用</p>
</div>
<el-form
ref="formRef"
......@@ -81,17 +96,32 @@ onMounted(() => {
:rules="rules"
label-width="170px"
label-position="left"
status-icon
style="margin: 0 190px"
:disabled="disabled"
>
<el-form-item label="省份" prop="province">
<el-select filterable clearable v-model="form.province" style="width: 100%" @change="onProvinceChange">
<el-option v-for="item in provinceList" :value="item.label" :key="item.code"></el-option>
</el-select>
</el-form-item>
<el-form-item label="城市" prop="city">
<el-select filterable clearable v-model="form.city" no-data-text="请先选择省份" style="width: 100%">
<el-option v-for="item in cityList" :value="item.label" :key="item.code"></el-option>
</el-select>
</el-form-item>
<el-form-item label="行业类别" prop="industry">
<el-select filterable clearable v-model="form.industry" style="width: 100%" @change="onProvinceChange">
<el-option v-for="item in industryCategoryList" :value="item.label" :key="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="公司LOGO" prop="logo">
<AppUpload v-model="form.logo" accept="image/*"></AppUpload>
<AppUpload v-model="form.logo" accept="image/*" :disabled="disabled"></AppUpload>
</el-form-item>
<el-form-item label="公司名称" prop="name">
<el-input v-model="form.name" placeholder="请输入" />
<el-input v-model="form.name" placeholder="请输入" maxlength="50" />
</el-form-item>
<el-form-item label="公司介绍" prop="desc">
<AppEditor v-model="form.desc" placeholder="请输入"></AppEditor>
<AppEditor v-model="form.desc" placeholder="请输入" :disabled="disabled"></AppEditor>
</el-form-item>
<el-form-item label="企业邮箱" prop="email">
<el-input v-model="form.email" placeholder="请输入" />
......@@ -105,11 +135,13 @@ onMounted(() => {
<el-input v-model="form.code" placeholder="请输入" />
</el-form-item>
<el-form-item label="营业执照附件" prop="business_licence">
<AppUpload v-model="form.business_licence" accept="image/*"></AppUpload>
<AppUpload v-model="form.business_licence" accept="image/*" :disabled="disabled"></AppUpload>
</el-form-item>
<el-row justify="center" style="margin: 60px 0 20px">
<el-button type="primary" auto-insert-space @click="onSubmit">提交</el-button>
<el-button auto-insert-space @click="onCancel">取消</el-button>
<el-button type="primary" auto-insert-space @click="onSubmit" style="border-radius: 10px" v-if="!disabled"
>点击提交</el-button
>
<el-button auto-insert-space @click="onCancel" v-if="false">取消</el-button>
</el-row>
</el-form>
</AppCard>
......
<script setup lang="ts">
import AppCard from '../../../../components/base/AppCard.vue'
let isUploaded = $ref(false)
const uploadButtonText = computed(() => (isUploaded ? '已投递' : '申请该职位'))
const uploadFileUrl = ref('')
function handleUploadSuccess(e: any) {
isUploaded = true
console.log(e)
}
const jobContent = ref(
`岗位职责
1、建立申请风险评分、欺诈评分、催收评分等系列预测模型;
2、分析模型效果,使用统计方法设计模型使用方案;
3、对各类场景下的金融产品进行客户分群、多因素模型敏感性分析;
4、对于指标波动等情况进行分析,出具分析报告,提出有效建议。
任职资格:
1、本科及以上学历,数学、应用数学、金融数学、统计学、自动化、人工智能相关专业优先。
2、1年左右建模经验(专业相关的应届毕业生也可)
3、了解风险建模相关工作内容及流程。
4、熟练使用Python、SQL、R、SAS等工具,了解各类模型分类与回归算法,有数据发掘经验。
5、工作责任心强,抗压能力强,有较好的学习能力及创新精神。`
)
const jobContentHtml = computed(() => {
return jobContent.value.replace(/\n/g, '<br />')
})
</script>
<template>
<AppCard>
<div class="job-info"></div>
<h2>职位描述</h2>
<div class="job-info">
<div class="job-info-hd">
<h4>Java开发工程师</h4>
<p>15000-25000</p>
</div>
<div class="job-info-bd">
<ul>
<li>河北-唐山</li>
<li>本科</li>
</ul>
</div>
<div class="job-info-ft">
<AppUpload
:disabled="isUploaded"
v-model="uploadFileUrl"
accept="application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
@success="handleUploadSuccess"
><el-button type="primary" :disabled="isUploaded" style="border-radius: 10px">
{{ uploadButtonText }}
</el-button></AppUpload
>
<p class="job-info-company">
<span>专业技术类</span>
<span><router-link to="/hr/company/view/123" target="_blank">河北唐山技术开发有限公司</router-link></span>
</p>
</div>
</div>
<h2 class="job-desc-title">职位描述</h2>
<div class="job-desc" v-html="jobContentHtml"></div>
</AppCard>
</template>
......@@ -14,5 +65,68 @@ import AppCard from '../../../../components/base/AppCard.vue'
padding: 26px;
background: #f8f8f8;
border-radius: 20px;
.el-upload__tip {
display: none;
}
}
.job-info-hd {
display: flex;
align-items: center;
h4 {
font-size: 22px;
font-weight: 500;
line-height: 1;
color: #333333;
}
p {
margin-left: 30px;
font-size: 22px;
font-weight: 500;
line-height: 1;
color: #f26a5d;
}
}
.job-info-bd {
padding: 10px 0 24px;
ul {
display: flex;
}
li {
padding: 0 4px;
font-size: 12px;
line-height: 22px;
color: #7a7a7a;
background-color: #fff;
border-radius: 4px;
}
li + li {
margin-left: 10px;
}
}
.job-info-ft {
display: flex;
justify-content: space-between;
}
.job-info-company {
font-size: 16px;
line-height: 40px;
color: #666;
span + span {
margin-left: 60px;
}
}
.job-desc-title {
padding: 30px 0 20px;
font-size: 18px;
font-weight: 500;
line-height: 1;
color: #333333;
}
.job-desc {
font-size: 14px;
font-weight: 400;
line-height: 34px;
color: #666666;
}
</style>
......@@ -101,7 +101,7 @@ onMounted(() => {
</el-row>
</el-form-item>
<el-form-item label="岗位描述" prop="desc">
<el-input type="textarea" v-model="form.desc" :autosize="{ minRows: 6, maxRows: 10 }" maxlength="200" />
<el-input type="textarea" v-model="form.desc" :autosize="{ minRows: 12, maxRows: 20 }" maxlength="200" />
</el-form-item>
<el-row justify="center" style="margin: 40px 0 20px">
<el-button type="primary" auto-insert-space @click="onSubmit">发布</el-button>
......
......@@ -12,8 +12,69 @@ const listOptions = {
</script>
<template>
<h2>岗位详情</h2>
<div class="job-view">
<h2 class="subtitle" style="padding-top: 10px">岗位详情</h2>
<div class="job-info">
<dl>
<dt>岗位名称</dt>
<dd>北京奔驰技术工人</dd>
</dl>
<dl>
<dt>岗位类型</dt>
<dd>技术工人</dd>
</dl>
<dl>
<dt>岗位地点</dt>
<dd>北京</dd>
</dl>
<dl>
<dt>学历要求</dt>
<dd>大专</dd>
</dl>
<dl>
<dt>公司名称</dt>
<dd>北京奔驰技术工人某某公司</dd>
</dl>
<dl>
<dt>薪资范围</dt>
<dd>10000-13000</dd>
</dl>
<dl style="grid-column: 3; grid-row: 1/5">
<dt>岗位介绍</dt>
<dd>
中加本硕直通车项目是针对大专及本科生提升学历、移居海外的定制通道。
采用国内2.5+1.5(专升本)/3.5+2(本硕连读)年的合作模式即可分别获得加拿大卡普顿大学的本科与硕士学位,符合条件的国内院校的大专及本科生分别在国内完成2.5年及3.5年的专科和本科的学习,可直接进入加拿大卡普顿大学进行本科和硕士阶段的学习。本项目对接经教育部认证的国外名校,旨在帮助学生缩短留学周期,让学生顺利完成国外规定的学业课程,获得国外学位及移民海外的需求。
中加本硕直通车项目是针对大专及本科生提升学历、移居海外的定制通道。
采用国内2.5+1.5(专升本)/3.5+2(本硕连读)年的合作模式即可分别获得加拿大卡普顿大学的本科与硕士学位,符合条件的国内院校的大专及本科生分别在国内完成2.5年及3.5年的专科和本科的学习,可直接进入加拿大卡普顿大学进行本科和硕士阶段的学习。本项目对接经教育部认证的国外名校,旨在帮助学生缩短留学周期,让学生顺利完成国外规定的学业课程,获得国外学位及移民海外的需求。
中加本硕直通车项目是针对大专及本科生提升学历、移居海外的定制通道。
采用国内2.5+1.5(专升本)/3.5+2(本硕连读)年的合作模式即可分别获得加拿大卡普顿大学的本科与硕士学位,符合条件的国内院校的大专及本科生分别在国内完成2.5年及3.5年的专科和本科的学习,可直接进入加拿大卡普顿大学进行本科和硕士阶段的学习。本项目对接经教育部认证的国外名校,旨在帮助学生缩短留学周期,让学生顺利完成国外规定的学业课程,获得国外学位及移民海外的需求。
</dd>
</dl>
</div>
<h2 class="subtitle" style="padding-bottom: 0">简历</h2>
<AppList v-bind="listOptions">
<template #table-actions> 查看 </template>
</AppList>
</div>
</template>
<style lang="scss">
.job-info {
display: grid;
grid-template-columns: 254px 206px 1fr;
row-gap: 30px;
padding: 32px;
background-color: #f8f8f8;
border-radius: 20px;
dt {
font-size: 14px;
font-weight: 400;
color: #666666;
}
dd {
font-size: 16px;
font-weight: 400;
color: #333333;
}
}
</style>
......@@ -5,12 +5,43 @@ defineProps<{ data: ProjectType }>()
<template>
<div class="project-item">
<router-link :to="`/project/view/${data.id}`" target="_blank">
<img :src="data.logo" class="project-item__pic" />
<div class="project-item__content">
<h2>{{ data.name }}</h2>
<p>{{ data.desc }}</p>
</div>
</router-link>
</div>
</template>
<style lang="scss"></style>
<style lang="scss">
.project-item {
margin-bottom: 20px;
width: 275px;
height: 305px;
background: #fafafa;
border-radius: 6px;
}
.project-item__pic {
width: 100%;
height: 142px;
object-fit: cover;
}
.project-item__content {
padding: 16px;
h2 {
margin-bottom: 18px;
font-size: 18px;
font-weight: 500;
line-height: 1;
color: #333333;
}
p {
font-size: 14px;
font-weight: 300;
line-height: 24px;
color: #666666;
}
}
</style>
......@@ -7,8 +7,6 @@ export interface ProjectType {
contact: string
contact_mobile: string
status: 1 | 2 | 3 | 4
start_time: string
end_time: string
documents: string[]
}
......
<script setup lang="ts">
import { Plus } from '@element-plus/icons-vue'
import type { ProjectType } from '../types'
import ProjectItem from '../components/ProjectItem.vue'
const projectList = ref<ProjectType[]>([])
const projectList = ref<ProjectType[]>([
{
id: '1',
name: 'SEAL学习中心',
logo: 'https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png',
type: 1,
desc: '中加本硕直通车项目是针对大专及本科生提升学历、移居海外的定制通道。采用国内2.5+1.5(专升本)/3.5+2(本硕连读)年的…',
contact: '123',
contact_mobile: '123',
status: 1,
documents: []
},
{
id: '2',
name: '项目1',
logo: 'https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png',
type: 1,
desc: '中加本硕直通车项目是针对大专及本科生提升学历、移居海外的定制通道。采用国内2.5+1.5(专升本)/3.5+2(本硕连读)年的…',
contact: '123',
contact_mobile: '123',
status: 2,
documents: []
}
])
</script>
<template>
<AppContainer background="#fff">
<section>
<h2 class="section-title">我的项目</h2>
<h2 class="subtitle">我的项目</h2>
<div class="project-list">
<ProjectItem v-for="item in projectList" :key="item.id" :data="item"></ProjectItem>
<div class="project-item">
<router-link to="/project/create" class="project-item__add"><Plus />发布新项目</router-link>
</div>
</div>
</section>
<section>
<h2 class="section-title">项目列表</h2>
<h2 class="subtitle">项目列表</h2>
<div class="project-list">
<ProjectItem v-for="item in projectList" :key="item.id" :data="item"></ProjectItem>
</div>
</section>
</AppContainer>
</template>
<style lang="scss">
.project-list {
display: flex;
flex-wrap: wrap;
.project-item {
margin-right: 20px;
}
}
.project-item__add {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 20px;
font-weight: 400;
line-height: 34px;
color: #666666;
cursor: pointer;
svg {
width: 30px;
}
}
</style>
<script setup lang="ts">
const files = [
{
name: 'index.ts',
url: 'https://raw.githubusercontent.com/vuejs/vue/dev/examples/todo/src/index.ts'
},
{
name: 'index.ts',
url: 'https://raw.githubusercontent.com/vuejs/vue/dev/examples/todo/src/index.ts'
}
]
</script>
<template>
<AppCard>
<section class="project-info">
<img src="https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png" class="project-info__pic" />
<div class="project-info__forms">
<dl>
<dt>项目名称</dt>
<dd>abc</dd>
</dl>
<dl>
<dt>开始时间</dt>
<dd>abc</dd>
</dl>
<dl>
<dt>联系人</dt>
<dd>abc</dd>
</dl>
<dl>
<dt>项目类型</dt>
<dd>abc</dd>
</dl>
<dl>
<dt>结束时间</dt>
<dd>abc</dd>
</dl>
<dl>
<dt>联系电话</dt>
<dd>abc</dd>
</dl>
</div>
</section>
<section class="project-desc">
<h2 class="subtitle">项目介绍</h2>
<div class="box">
中加本硕直通车项目是针对大专及本科生提升学历、移居海外的定制通道。
采用国内2.5+1.5(专升本)/3.5+2(本硕连读)年的合作模式即可分别获得加拿大卡普顿大学的本科与硕士学位,符合条件的国内院校的大专及本科生分别在国内完成2.5年及3.5年的专科和本科的学习,可直接进入加拿大卡普顿大学进行本科和硕士阶段的学习。本项目对接经教育部认证的国外名校,旨在帮助学生缩短留学周期,让学生顺利完成国外规定的学业课程,获得国外学位及移民海外的需求。
</div>
</section>
<section class="project-files">
<h2 class="subtitle">项目文件</h2>
<ul>
<li v-for="(item, index) in files" :key="index">
<a :href="item.url" target="_blank">
<p>{{ item.name }}</p>
<span>预览</span>
</a>
</li>
</ul>
</section>
</AppCard>
</template>
<style lang="scss">
.project-info {
display: flex;
align-items: center;
}
.project-info__pic {
width: 242px;
height: 155px;
border-radius: 10px;
overflow: hidden;
}
.project-info__forms {
margin-left: 90px;
flex: 1;
display: grid;
grid-template-columns: repeat(3, 1fr);
column-gap: 20px;
row-gap: 40px;
dt {
font-size: 14px;
font-weight: 400;
color: #666666;
}
dd {
font-size: 16px;
font-weight: 400;
color: #333333;
}
}
.project-desc {
font-size: 14px;
font-weight: 400;
line-height: 24px;
color: #666666;
.box {
padding: 28px;
background: #f8f8f8;
border-radius: 20px;
}
}
.project-files {
ul {
display: grid;
grid-template-columns: repeat(4, 1fr);
column-gap: 40px;
row-gap: 40px;
}
li {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
height: 170px;
background: #f8f8f8;
border-radius: 20px;
p {
padding: 14px 0;
font-size: 18px;
font-weight: 400;
line-height: 14px;
color: #2b2b2b;
}
span {
font-size: 16px;
font-weight: 500;
line-height: 14px;
color: #b80140;
}
}
}
</style>
......@@ -51,7 +51,7 @@ httpRequest.interceptors.request.use(
httpRequest.interceptors.response.use(
function (response) {
const { data } = response
if (data.code === 0) {
if (data.code === 0 || !Object.hasOwnProperty.call(data, 'code')) {
return data
}
// 未登录
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论