Просмотр исходного кода

Merge branch 'dev' of https://git.citupro.com/zhengnaiwen_citu/menduner into dev

lifanagju_citu 10 месяцев назад
Родитель
Сommit
7c2ada435b

+ 1 - 0
components.d.ts

@@ -27,6 +27,7 @@ declare module 'vue' {
     Empty: typeof import('./src/components/Empty/index.vue')['default']
     HeadSearch: typeof import('./src/components/headSearch/index.vue')['default']
     HotPromoted: typeof import('./src/components/Enterprise/hotPromoted.vue')['default']
+    Img: typeof import('./src/components/Upload/img.vue')['default']
     'Index copy': typeof import('./src/components/CtForm/index copy.vue')['default']
     IndustryTypeCard: typeof import('./src/components/industryTypeCard/index.vue')['default']
     Info: typeof import('./src/components/Enterprise/info.vue')['default']

+ 7 - 0
src/api/recruit/enterprise/personnel/index.js

@@ -28,4 +28,11 @@ export const personCvUnfitPage = async (params) => {
     url: '/app-admin-api/menduner/system/person-cv/unfitPage',
     params
   })
+}
+
+// 招聘端-牛人管理-取消不合适
+export const personCvUnfitCancel = async (id) => {
+  return await request.post({
+    url: `/app-admin-api/menduner/system/person-cv/unfit/cancellation?id=${id}`
+  })
 }

+ 78 - 0
src/components/Upload/img.vue

@@ -0,0 +1,78 @@
+<template>
+  <div v-if="!src" class="upload d-flex align-center justify-center" @click="openFileInput">
+    <v-icon color="#ccc" size="50">mdi-plus</v-icon>
+    <input
+      type="file"
+      ref="fileInput"
+      accept="image/*"
+      style="display: none;"
+      @change="handleUploadFile"
+    />
+  </div>
+  <div v-else style="position: relative;">
+    <v-img :src="src" width="120" height="120" rounded></v-img>
+    <v-icon color="primary" class="close" @click="handleClose">mdi-close-circle</v-icon>
+  </div>
+</template>
+
+<script setup>
+// 图片上传
+defineOptions({ name: 'upload-img'})
+import { ref } from 'vue'
+import { uploadFile } from '@/api/common'
+import { useI18n } from '@/hooks/web/useI18n'
+import Snackbar from '@/plugins/snackbar'
+
+const emit = defineEmits(['success', 'delete'])
+
+const { t } = useI18n()
+const src = ref('')
+
+// 选择文件
+const fileInput = ref()
+const clicked = ref(false)
+const openFileInput = () => {
+  if (clicked.value) return
+  clicked.value = true
+  fileInput.value.click()
+  clicked.value = false
+}
+
+// 文件上传
+const handleUploadFile = async (e) => {
+  const file = e.target.files[0]
+  const size = file.size
+  if (size / (1024*1024) > 10) {
+    Snackbar.warning(t('common.fileSizeExceed'))
+    return
+  }
+  const formData = new FormData()
+  formData.append('file', file)
+  const { data } = await uploadFile(formData)
+  if (!data) return Snackbar.error('上传失败')
+  src.value = data
+  Snackbar.success(t('common.uploadSucMsg'))
+  emit('success', data)
+}
+
+const handleClose = () => {
+  src.value = ''
+  emit('delete')
+}
+</script>
+
+<style scoped lang="scss">
+.upload {
+  width: 120px;
+  height: 120px;
+  border: 1px solid #ccc;
+  border-radius: 4px;
+  cursor: pointer;
+}
+.close {
+  position: absolute;
+  top: -10px;
+  right: -10px;
+  cursor: pointer;
+}
+</style>

+ 32 - 2
src/views/recruit/enterprise/informationManagement/informationSettingsComponents/authentication.vue

@@ -13,8 +13,19 @@
   <div v-else>
     <div class="topTip">为了您在平台有更好的操作体验,请进行实名认证</div>
     <div class="d-flex align-center justify-center flex-column">
-      <CtForm ref="CtFormRef" :items="formItems" style="width: 300px;"></CtForm>
-      <v-btn class="buttons" color="primary" @click="authentication = !authentication">{{ $t('common.submit') }}</v-btn>
+      <CtForm ref="CtFormRef" :items="formItems" style="width: 300px;">
+        <template #idCardImg1="{ item }">
+          <div class="color-666 font-size-14 mr-5">{{ item.label }}</div>
+          <Img @success="val => item.value = val" @delete="item.value = ''"></Img>
+        </template>
+        <template #idCardImg2="{ item }">
+          <div class="mt-5 d-flex">
+            <div class="color-666 font-size-14 mr-5">{{ item.label }}</div>
+            <Img @success="val => item.value = val" @delete="item.value = ''"></Img>
+          </div>
+        </template>
+      </CtForm>
+      <v-btn class="buttons mt-5" color="primary" @click="authentication = !authentication">{{ $t('common.submit') }}</v-btn>
     </div>
   </div>
 </template>
@@ -42,6 +53,18 @@ const formItems = ref({
       value: '',
       label: '身份证号码 *',
       rules: [v => !!v || '请输入您的身份证号码']
+    },
+    {
+      slotName: 'idCardImg1',
+      value: '',
+      label: '身份证-国徽照 *',
+      rules: [v => !!v || '请上传']
+    },
+    {
+      slotName: 'idCardImg2',
+      value: '',
+      label: '身份证-人像照 *',
+      rules: [v => !!v || '请上传']
     }
   ]
 })
@@ -62,4 +85,11 @@ const formItems = ref({
   font-size: 14px;
   padding: 25px;
 }
+.upload {
+  width: 120px;
+  height: 120px;
+  border: 1px solid #ccc;
+  border-radius: 4px;
+  cursor: pointer;
+}
 </style>

+ 11 - 1
src/views/recruit/enterprise/personnelManagement/components/table.vue

@@ -36,6 +36,7 @@
           <!-- <v-btn color="primary" variant="text" @click="handleInterviewInvite(item)">邀请面试</v-btn> -->
           <v-btn color="primary" variant="text" @click="handleAction('', 0, item)">入职</v-btn>
         </div>
+        <v-btn v-if="tab === 4" color="primary" variant="text" @click="handleCancelEliminate(item)">取消不合适</v-btn>
       </template>
     </v-data-table>
   </div>
@@ -45,7 +46,7 @@
 defineOptions({ name: 'table-page'})
 import { ref, computed, watch } from 'vue'
 import { previewFile } from '@/utils'
-import { personJobCvLook, joinEliminate, personEntryByEnterprise } from '@/api/recruit/enterprise/personnel'
+import { personJobCvLook, joinEliminate, personEntryByEnterprise, personCvUnfitCancel } from '@/api/recruit/enterprise/personnel'
 import { useI18n } from '@/hooks/web/useI18n'
 import Snackbar from '@/plugins/snackbar'
 
@@ -115,6 +116,7 @@ const handleEliminate = async (item) => {
   const query = {
     bizId: item.id,
     jobId: item.job.id,
+    userId: item.userId,
     type: props.tab === 0 ? '0' : '1' // 投递简历0 已邀约1
   }
   await joinEliminate(query)
@@ -122,6 +124,14 @@ const handleEliminate = async (item) => {
   emit('refresh')
 }
 
+// 取消不合适
+const handleCancelEliminate = async (item) => {
+  if (!item.id) return
+  await personCvUnfitCancel(item.id)
+  Snackbar.success(t('common.operationSuccessful'))
+  emit('refresh')
+}
+
 // 查看简历
 const handlePreviewResume = async ({ url, id }) => {
   if (!url || !id) return

+ 2 - 2
src/views/recruit/personal/position/components/details.vue

@@ -23,7 +23,7 @@
       <div class="d-flex justify-space-between mb-5">
         <div>
           <v-chip v-if="info.hire && info.hirePrice && info.hirePrice > 0" label color="primary">赏金:{{ commissionCalculation(info.hirePrice, 1) }}元</v-chip>
-          <v-chip v-if="info.hire && info.hirePoint && info.hirePoint > 0" label color="primary">积分:{{ commissionCalculation(info.hirePoint, 1) }}点</v-chip>
+          <v-chip v-if="info.hire && info.hirePoint && info.hirePoint > 0" label color="primary" class="ml-1">积分:{{ commissionCalculation(info.hirePoint, 1) }}点</v-chip>
         </div>
         <div class="banner-tools-btns">
           <v-btn
@@ -32,7 +32,7 @@
             color="error"
             prepend-icon="mdi-share-outline"
             style="height: 36px;"
-            v-if="info?.hire && info?.hirePoint && info?.hirePoint > 0"
+            v-if="info?.hire && info?.hirePrice && info?.hirePrice > 0"
             @click="handleShare"
           >我要赏金</v-btn>
           <v-btn