소스 검색

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

Xiao_123 2 달 전
부모
커밋
1ab679738b

+ 1 - 3
components.d.ts

@@ -30,6 +30,7 @@ declare module 'vue' {
     CtTextField: typeof import('./src/components/CtVuetify/CtTextField/index.vue')['default']
     DatePicker: typeof import('./src/components/DatePicker/index.vue')['default']
     Echarts: typeof import('./src/components/Echarts/index.vue')['default']
+    ElCascader: typeof import('element-plus/es')['ElCascader']
     ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
     Empty: typeof import('./src/components/Empty/index.vue')['default']
     File: typeof import('./src/components/Upload/file.vue')['default']
@@ -73,7 +74,4 @@ declare module 'vue' {
     VerifySlide: typeof import('./src/components/Verifition/Verify/VerifySlide.vue')['default']
     WangEditor: typeof import('./src/components/FormUI/wangEditor/index.vue')['default']
   }
-  export interface ComponentCustomProperties {
-    vLoading: typeof import('element-plus/es')['ElLoadingDirective']
-  }
 }

+ 9 - 8
src/views/recruit/components/jobFairEntShare/index.vue

@@ -67,8 +67,8 @@ const drawCanvas = () => {
       thirdImg.onload = () => {
         // 企业头像
         ctx.save()
-        const secondImgWidth = 80
-        const secondImgHeight = 80
+        const secondImgWidth = 120
+        const secondImgHeight = 120
         const x = (canvas.width - secondImgWidth) / 2
         const y = canvas.height - secondImgHeight - 460
         
@@ -81,7 +81,7 @@ const drawCanvas = () => {
         // 企业名称
         const maxTextWidth = 400
         const text = props.enterpriseName
-        const fontStyle = 'bold 18px Arial'
+        const fontStyle = 'bold 24px Arial'
         ctx.font = fontStyle
         let truncatedText = text
         while (ctx.measureText(truncatedText + '...').width > maxTextWidth && truncatedText.length > 0) {
@@ -97,16 +97,17 @@ const drawCanvas = () => {
         const tagPaddingLeftRight = 20
         const tagPaddingTopBottom = 10
         const tagRadius = 8
-        const tagSpacing = 30
-        let tagY = textY + tagSpacing
-        props.positionList.forEach((tag) => {
+        const tagSpacing = 22
+        let tagY = textY + tagSpacing + 10
+        props.positionList.forEach((tag, index) => {
           let truncatedTag = tag
           while (ctx.measureText(truncatedTag + '...').width > maxTextWidth - 2 * tagPaddingLeftRight && truncatedTag.length > 0) {
             truncatedTag = truncatedTag.slice(0, -1)
           }
           if (truncatedTag !== tag) truncatedTag += '...'
 
-          const tagWidth = ctx.measureText(truncatedTag).width + 2 * tagPaddingLeftRight
+          // bug:第一个职位标签多出长度,需-64
+          const tagWidth = ctx.measureText(truncatedTag).width + 2 * tagPaddingLeftRight - (index ? 0 : 64)
           const tagX = x + (secondImgWidth - tagWidth) / 2
 
           ctx.fillStyle = '#00B760'
@@ -123,7 +124,7 @@ const drawCanvas = () => {
           ctx.closePath()
           ctx.fill()
 
-          ctx.font = '16px Arial'
+          ctx.font = '18px Arial'
           ctx.fillStyle = '#fff'
           ctx.fillText(truncatedTag, tagX + tagPaddingLeftRight, tagY + tagPaddingTopBottom + 10)
 

+ 11 - 3
src/views/recruit/enterprise/jobFair/details.vue

@@ -1,13 +1,15 @@
 <template>
   <v-card class="card-box pa-4" :style="`background-color: ${jobFairInfo?.backgroundColour}`">
     <div class="position-relative">
-      <div class="text-center mb-5 mt-2 font-weight-bold font-size-20" style="color: #fff">{{ jobFairInfo?.title?.replace(/<\/?p[^>]*>/gi, '') }}</div>
+      <div class="text-center my-6 mx-10 px-15 font-weight-bold font-size-20" style="color: #fff">{{ jobFairInfo?.title?.replace(/<\/?p[^>]*>/gi, '') }}</div>
       <div class="d-flex justify-space-between mb-3 align-center">
-        <div style="color: #fff;">剩余可发布职位数:{{ jobNum }}个</div>
+        <div>
+          <span v-if="jobNum && Number(jobNum)" style="color: #fff;">剩余可发布职位数:{{ jobNum }}个</span>
+        </div>
         <div>
           <!-- <v-btn color="#fff" :style="`color: ${jobFairInfo?.backgroundColour || 'var(--v-primary-base)'}`" @click="handleAdd">新增职位</v-btn> -->
           <v-btn color="#fff" class="mx-3" :style="`color: ${jobFairInfo?.backgroundColour || 'var(--v-primary-base)'}`" @click="handleJoin">选择已发布的职位加入招聘会</v-btn>
-          <v-btn color="#fff" v-if="jobFairInfo?.contentImg" :style="`color: ${jobFairInfo?.backgroundColour || 'var(--v-primary-base)'}`" prepend-icon="mdi-share" @click="handleShare">我的分享海报</v-btn>
+          <!-- <v-btn color="#fff" v-if="jobFairInfo?.contentImg" :style="`color: ${jobFairInfo?.backgroundColour || 'var(--v-primary-base)'}`" prepend-icon="mdi-share" @click="handleShare">我的分享海报</v-btn> -->
         </div>
       </div>
       <JobItem :items="jobList" @refresh="getJobList(), getJobNum()"></JobItem>
@@ -82,6 +84,12 @@
           @success="handlePreview"
         ></JobFairEntShare>
       </div>
+      <!-- 招聘会分享按钮 -->
+      <div v-if="jobFairInfo?.contentImg" style="position: absolute; right: 12px; top: -16px; z-index: 999;">
+        <div class="cursor-pointer pa-2 white-bgc" style="border-radius: 8px;" @click.stop="handleShare">
+          <v-icon color="primary" size="26">mdi-share</v-icon>
+        </div>
+      </div>
     </div>
   </v-card>
 

+ 1 - 1
src/views/recruit/enterprise/positionManagement/components/item.vue

@@ -21,7 +21,7 @@
           </div>
           <div class="d-flex align-center" :class="{'cursor-pointer': tab === 1, 'ml-15': tab === 1}" @click="handleDetail(val)">
             <span class="position-name">{{ formatName(val.name) }}</span>
-            <svg-icon v-if="val.bizId" name="jobFair" class="ml-1" size="25"></svg-icon>
+            <svg-icon v-if="val.jobFairIds?.length" name="jobFair" class="ml-1" size="25"></svg-icon>
           </div>
           <div :class="['mt-3', 'other-info', 'ellipsis', {'ml-10': tab === 1}]">
             <span>{{ !val.areaId ? '全国' : val.area?.str }}</span>