Browse Source

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

lifanagju_citu 1 year ago
parent
commit
e4bbc61c43

+ 1 - 0
components.d.ts

@@ -7,6 +7,7 @@ export {}
 
 declare module 'vue' {
   export interface GlobalComponents {
+    AreaSelect: typeof import('./src/components/AreaSelect/index.vue')['default']
     Autocomplete: typeof import('./src/components/FormUI/autocomplete/index.vue')['default']
     copy: typeof import('./src/components/CtForm/index copy.vue')['default']
     CtBtn: typeof import('./src/components/CtVuetify/CtBtn/index.vue')['default']

+ 11 - 0
src/components/AreaSelect/index.vue

@@ -0,0 +1,11 @@
+<template>
+  <div>xxx</div>
+</template>
+
+<script setup>
+defineOptions({ name: 'formPage'})
+</script>
+
+<style scoped lang="scss">
+
+</style>

+ 71 - 65
src/components/PositionLongStrip/item.vue

@@ -1,51 +1,44 @@
 <!-- 搜索页面的职位详情-长条 -->
 <template>
   <v-card class="positionItem" v-for="(item, index) in list" :key="index" @mouseenter="item.active = true" @mouseleave="item.active = false">
-    <!-- 职位、公司 -->
-    <div class="position-and-company" @click="handlePosition(item)">
-      <div class="position" @mouseenter="item.positionActive = true" @mouseleave="item.positionActive = false">
-        <p :class="['title1', {'default-active': item.positionActive }]">{{ item.job.name }}{{ item.job.pos ? ' [' + item.job.pos + '] ' : '' }}</p>
-        <div class="d-flex row2">
-          <div class="salary">
-            <span>16-18K</span>
-            <span>·13薪</span>
-          </div>
-          <template v-if="item.job?.tagList?.length">
-            <v-chip class="tipClsss" size="x-small" label v-for="(tip, i) in item.job.tagList" :key="i" color="#666">{{ tip }}</v-chip>
-            <v-chip v-bind="props" class="tipClsss" prepend-icon="mdi-message-processing" size="x-small" label color="secondary" variant="outlined">
-              <span v-if="item.active">立即沟通</span>
-              <template v-else>
-                <span class="textColor666">{{ item.contact.name }}</span>
-                <span style="margin: 0 2px;">|</span>
-                <span class="textColor666">{{ item.contact.postNameCn }}</span>
-              </template>
-            </v-chip>
-            <v-chip v-if="item.contact.status === 1" size="x-small" label color="green" variant="outlined">在线</v-chip>
-          </template>
+    <div class="position-and-company">
+      <!-- 职位 -->
+      <div class="position" @mouseenter="item.positionActive = true" @mouseleave="item.positionActive = false" @click="handlePosition(item)">
+        <div class="d-flex">
+          <p :class="['title1', {'default-active': item.positionActive }]">{{ item.job.name }}{{ item.job.pos ? ' [' + item.job.pos + '] ' : '' }}</p>
+          <p class="salary ml-1">{{ item.job.payFrom }}-{{ item.job.payTo }}/{{ item.job.payName }}</p>
+        </div>
+        <div class="mt-2">
+          <v-chip size="x-small" label v-for="(j, i) in desc" :key="i" class="mr-1" color="#666" :prepend-icon="j.mdi">{{ item.job[j.value] }}</v-chip>
         </div>
       </div>
-      <div class="company">
-        <v-img  class="companyLogo" :src="item.enterprise.logoUrl" />
-        <div>
+      <!-- 公司 -->
+      <div class="company" @click="handleEnterprise(item)">
+        <div class="float-left">
+          <v-img :src="item.enterprise.logoUrl" :alt="item.enterprise.anotherName" :width="40" style="height: 40px;border-radius: 4px;"/>
+        </div>
+        <div class="company-info">
           <v-hover>
             <template v-slot:default="{ isHovering, props }">
-              <p v-bind="props" :class="['title1', {'default-active': isHovering }]">{{ item.enterprise.anotherName }}</p>
+              <h3 v-bind="props" :class="{'default-active': isHovering }" class="title1">{{ item.enterprise.anotherName }}</h3>
             </template>
           </v-hover>
-          <v-chip  class="tipClsss" size="x-small" label v-for="(tip, i) in item.enterprise.tags" :key="i" color="#666">{{ tip }}</v-chip>
+          <p class="mt-2">{{ item.enterprise.financingName }}<span class="mx-2">|</span>{{ item.enterprise.scaleName }}<span class="mx-2">|</span>{{ item.enterprise.industryName }}</p>
         </div>
       </div>
     </div>
     <!-- 底部 -->
     <div class="footer">
       <div class="footer-left">
-        <template v-for="(jobTag, jobTagsIndex) in item.enterprise.tags1" :key="jobTagsIndex">
+        <template v-for="(jobTag, jobTagsIndex) in item.job.tagList" :key="jobTagsIndex">
           <span class="textColor666 mx-1" v-if="jobTagsIndex">|</span>
-          <span class="textColor666">{{ jobTag }}</span>
+          <span class="textColor666 dis">{{ jobTag }}</span>
         </template>
       </div>
-      <div class="footer-right" v-if="item.enterprise.welfareList?.length">
-        {{ item.enterprise.welfareList.join('、') }}
+      <div class="footer-right">
+        <v-avatar size="x-small" :image="item.contact.avatar"></v-avatar>
+        <span class="mx-2 textColor666">{{ item.contact.name }} | {{ item.contact.postNameCn }}</span>
+        <v-chip color="primary" label size="x-small">当前在线</v-chip>
       </div>
     </div>
   </v-card>
@@ -70,16 +63,50 @@ watch(
   { deep: true }
 )
 
-const emits = defineEmits(['position', 'enterprise'])
+const desc = [
+  { mdi: 'mdi-map-marker-outline', value: 'areaName' },
+  { mdi: 'mdi-school-outline', value: 'eduName' },
+  { mdi: 'mdi-clock-time-ten-outline', value: 'expName' }
+]
+
 const handlePosition = (item) => {
-  emits('position', item)
+  window.open(`/recruit/position/details/${item.job.positionId}`)
+}
+const handleEnterprise = (item) => {
+  window.open(`/enterprise/details/${item.enterprise.enterpriseId}?key=briefIntroduction`)
 }
 </script>
 
 <style lang="scss" scoped>
-
-.tipClsss { margin-right: 4px; }
-.title1 { font-size: 16px; font-weight: 500; line-height: 28px;}
+.title1 {
+  position: relative;
+  max-width: 200px;
+  margin-right: 8px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  font-size: 16px;
+  font-weight: 600;
+  &:hover {
+    color: var(--v-primary-base);
+  }
+}
+.company {
+  flex: 1;
+  display: flex;
+  justify-content: end;
+}
+.company-info {
+  float: left;
+  margin-left: 16px;
+  // width: 282px;
+}
+.company-info p {
+  height: 18px;
+  font-size: 13px;
+  font-weight: 400;
+  color: #999;
+}
 .textColor666 { color: #666; }
 .positionItem {
   width: 884px;
@@ -98,37 +125,8 @@ const handlePosition = (item) => {
     padding: 16px 20px;
     width: 100%;
     .position {
-      width: 440px;
+      width: 484px;
       padding-right: 12px;
-      .row2 {
-        display: flex;
-        align-items: center;
-        flex-wrap: wrap; /* 允许换行 */
-        width: 100%; /* 设置容器宽度 */
-        .salary {
-          display: inline;
-          font-size: 16px;
-          font-weight: 500;
-          color: #fe574a;
-          line-height: 32px;
-          float: left;
-          margin-right: 16px;
-        }
-      }
-    }
-    .company {
-      flex: 1;
-      display: flex;
-      .companyLogo {
-        height: 54px;
-        width: 54px;
-        min-width: 54px;
-        min-height: 54px;
-        max-width: 54px;
-        max-height: 54px;
-        margin-right: 20px;
-        border-radius: 8px;
-      }
     }
   }
   .footer {
@@ -144,6 +142,7 @@ const handlePosition = (item) => {
     }
     .footer-right {
       flex: 1;
+      text-align: right;
     }
     div {
       overflow: hidden;
@@ -157,4 +156,11 @@ const handlePosition = (item) => {
     white-space: nowrap;
   }
 }
+.salary {
+  font-size: 16px;
+  font-weight: 700;
+  color: #fe574a;
+  line-height: 22px;
+  flex: none;
+}
 </style>

+ 5 - 0
src/styles/index.css

@@ -74,3 +74,8 @@
   padding-left: 12px;
   line-height: 17px;
 }
+
+.resumeNoDataText {
+  color: #666;
+  font-size: 14px;
+}

+ 1 - 1
src/styles/index.min.css

@@ -1 +1 @@
-:root{--zIndex-dialog:9999;--default-bgc:#f2f4f7;--v-primary-base:#00897B;--v-error-base:#fe574a;--v-primary-lighten1:#26A69A;--v-primary-lighten2:#4DB6AC;--v-primary-lighten3:#80CBC4;--v-primary-lighten4:#B2DFDB;--default-text:#666}.buttons{height:36px;width:224px}.half-button{height:36px;width:88px}.default-width{width:1184px;min-width:1184px;max-width:1184px;margin:0 auto}.default-active{color:var(--v-primary-base) !important}.border-bottom-dashed{border-bottom:1px dashed #ccc}.white-bgc{background-color:#fff}.ellipsis{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.vline{display:inline-block;width:1px;height:10px;vertical-align:middle;background-color:#e0e0e0;margin:0 10px}.resume-box{border-radius:5px;padding:20px 30px;background-color:#fff}.resume-header{display:flex;justify-content:space-between;align-items:center;height:36px}.resume-title{font-weight:700;font-size:18px;border-left:5px solid #00897B;padding-left:12px;line-height:17px}
+:root{--zIndex-dialog:9999;--default-bgc:#f2f4f7;--v-primary-base:#00897B;--v-error-base:#fe574a;--v-primary-lighten1:#26A69A;--v-primary-lighten2:#4DB6AC;--v-primary-lighten3:#80CBC4;--v-primary-lighten4:#B2DFDB;--default-text:#666}.buttons{height:36px;width:224px}.half-button{height:36px;width:88px}.default-width{width:1184px;min-width:1184px;max-width:1184px;margin:0 auto}.default-active{color:var(--v-primary-base) !important}.border-bottom-dashed{border-bottom:1px dashed #ccc}.white-bgc{background-color:#fff}.ellipsis{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.vline{display:inline-block;width:1px;height:10px;vertical-align:middle;background-color:#e0e0e0;margin:0 10px}.resume-box{border-radius:5px;padding:20px 30px;background-color:#fff}.resume-header{display:flex;justify-content:space-between;align-items:center;height:36px}.resume-title{font-weight:700;font-size:18px;border-left:5px solid #00897B;padding-left:12px;line-height:17px}.resumeNoDataText{color:#666;font-size:14px}

+ 4 - 0
src/styles/index.scss

@@ -70,4 +70,8 @@
   border-left: 5px solid #00897B;
   padding-left: 12px;
   line-height: 17px;
+}
+.resumeNoDataText {
+  color: #666;
+  font-size: 14px;
 }

+ 1 - 1
src/views/Home/personal/components/popularEnterprises.vue

@@ -42,7 +42,7 @@ const getHotEnterpriseList = async () => {
       if (item.isEnter) {
         const valueKey = item.nameKey ? item.nameKey : 'label'
         const idKey = item.valueKey ? item.valueKey : 'value'
-        e[item.label] = dictObj[item.value].find(k => Number(k[idKey]) === e.enterprise[item.key])[valueKey]
+        e[item.label] = dictObj[item.value].find(k => Number(k[idKey]) === Number(e.enterprise[item.key]))[valueKey]
       }
       const list = e.jobList
       if (!item.isEnter) {

+ 4 - 10
src/views/recruit/company/index.vue

@@ -10,7 +10,7 @@
         <div class="clear" @click="handleClear">清空筛选条件</div>
       </div>
     </div>
-    <companyItem v-loading="loading" class="mt-3" :list="items"></companyItem>
+    <companyItem class="mt-3" :list="items"></companyItem>
     <MPagination
       :total="total"
       :page="pageInfo.pageNo"
@@ -42,7 +42,6 @@ const handleClear = () => {
 }
 
 const total = ref(0)
-const loading = ref(false)
 const items = ref([])
 const pageInfo = ref({
   pageSize: 1,
@@ -62,14 +61,9 @@ const handleSearch = async (val, key) => {
 }
 
 const getCompanyData = async () => {
-  loading.value = true
-  try {
-    const { list, total: number } = await getEnterpriseSearch(query.value)
-    total.value = number
-    items.value = dealDictData(items.value, list)
-  } finally {
-    loading.value = false
-  }
+  const { list, total: number } = await getEnterpriseSearch(query.value)
+  total.value = number
+  items.value = dealDictData(items.value, list)
 }
 getCompanyData()
 

+ 77 - 91
src/views/recruit/position/components/rightRecommend.vue

@@ -1,16 +1,13 @@
 <template>
-  <v-card class="box">
-    <h4 class="h4">推荐职位</h4>
-    <div class="content">
-      <div v-for="item, index in list " :key="index" class="itemBox">
-        <div class="left">
-          <div>{{ item.aaa }}</div>
-          <div class="textColor666 size14">{{ item.bbb }}</div>
-        </div>
-        <div class="right">
-          <div style="color: #fe574a;">{{ item.ccc }}</div>
-          <div class="textColor666 size14">{{ item.ddd }}</div>
-        </div>
+  <v-card class="position-box">
+    <h4 class="h4 mb-3">推荐职位</h4>
+    <div v-for="(item, index) in list" :key="index" class="mb-2 cursor-pointer" @click="handlePosition(item)">
+      <p class="recruit-name">{{ item.name }}</p>
+      <span class="recruit-salary">{{ item.payFrom }}-{{ item.payTo }}k/{{ item.payName }}</span>
+      <div :class="['enterprise', {'border-bottom-dashed': index !== list.length - 1}]">
+        <v-img class="float-left" :src="item.logoUrl" :width="30" :height="30"></v-img>
+        <span class="float-left enterprise-name">{{ item.anotherName }}</span>
+        <span class="float-right enterprise-address">{{ item.areaName }}</span>
       </div>
     </div>
   </v-card>
@@ -20,94 +17,83 @@
 defineOptions({name: 'retrieval-components-recommendedPositions'})
 const list = [
   {
-    aaa: '职位名称',
-    bbb: '公司名称',
-    ccc: '9-12K',
-    ddd: '广州·越秀区',
+    name: '项目经历',
+    payFrom: 11,
+    payTo: 13,
+    payName: '月',
+    logoUrl: 'https://cdn.vuetifyjs.com/images/john.jpg',
+    anotherName: '广州辞图科技有限公司',
+    areaName: '广州·越秀'
   },
   {
-    aaa: '职位名称职位名称职位名称职位名称职位名称',
-    bbb: '公司名称公司名称公司名称公司名称公司名称',
-    ccc: '9-12K',
-    ddd: '广州·越秀区-广州·越秀区广州·越秀区',
+    name: '项目经历',
+    payFrom: 11,
+    payTo: 13,
+    payName: '月',
+    logoUrl: 'https://cdn.vuetifyjs.com/images/john.jpg',
+    anotherName: '广州辞图科技有限公司',
+    areaName: '广州·越秀'
   },
-  // {
-  //   aaa: '职位名称',
-  //   bbb: '公司名称',
-  //   ccc: '9-12K',
-  //   ddd: '广州·越秀区',
-  // },
-  // {
-  //   aaa: '职位名称',
-  //   bbb: '公司名称',
-  //   ccc: '9-12K',
-  //   ddd: '广州·越秀区',
-  // },
-  // {
-  //   aaa: '职位名称',
-  //   bbb: '公司名称',
-  //   ccc: '9-12K',
-  //   ddd: '广州·越秀区',
-  // },
-  // {
-  //   aaa: '职位名称',
-  //   bbb: '公司名称',
-  //   ccc: '9-12K',
-  //   ddd: '广州·越秀区',
-  // },
-  // {
-  //   aaa: '职位名称',
-  //   bbb: '公司名称',
-  //   ccc: '9-12K',
-  //   ddd: '广州·越秀区',
-  // },
   {
-    aaa: '职位名称',
-    bbb: '公司名称',
-    ccc: '9-12K',
-    ddd: '广州·越秀区',
-  }
+    name: '项目经历',
+    payFrom: 11,
+    payTo: 13,
+    payName: '月',
+    logoUrl: 'https://cdn.vuetifyjs.com/images/john.jpg',
+    anotherName: '广州辞图科技有限公司',
+    areaName: '广州·越秀'
+  },
 ]
 </script>
 <style lang="scss" scoped>
-.textColor666 { color: #666; }
-.size14 { font-size: 14px; }
-.box {
-  width: 100%;
-  min-height: 100px;
+.position-box {
+  position: relative;
+  width: 284px;
   border-radius: 8px;
-  .h4 {
-    padding: 12px 16px;
-    background: linear-gradient(90deg, #f5fcfc 0, #fcfbfa 100%);
+  padding: 20px 15px;
+}
+.recruit-name {
+  width: 95px;
+  font-weight: 500;
+  display: inline-block;
+  max-width: 95px;
+  vertical-align: middle;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  &:hover {
+    color: var(--v-primary-base);
   }
-  .content {
-    padding: 0 8px;
-    .itemBox {
-      &:hover {
-        background-color: #f3f3f3;
-      }
-      display: flex;
-      justify-content: space-between;
-      padding: 8px 16px;
-      margin: 4px 0;
-      border-radius: 8px;
-      cursor: pointer;
-      .left {
-        width: 148px;
-        margin-right: 12px;
-      }
-      .right {
-        width: calc(100% - 160px);
-        text-align: right;
-      }
-      .left, .right {
-        div {
-          overflow: hidden;
-          text-overflow: ellipsis;
-          white-space: nowrap;
-        }
-      }
-    }
+}
+.recruit-salary {
+  float: right;
+  color: var(--v-error-base);
+  font-weight: 500;
+  height: auto;
+  vertical-align: sub;
+}
+.enterprise {
+  height: 40px;
+  line-height: 30px;
+  margin-top: 8px;
+}
+.enterprise-name {
+  width: 120px;
+  display: inline-block;
+  max-width: 120px;
+  vertical-align: middle;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+  overflow: hidden;
+  color: #666;
+  font-size: 13px;
+  margin-left: 5px;
+  &:hover {
+    color: var(--v-primary-base);
   }
 }
+.enterprise-address {
+  color: #555;
+  font-size: 13px;
+}
 </style>

+ 6 - 1
src/views/recruit/position/index.vue

@@ -39,6 +39,7 @@ import Empty from '@/components/Empty'
 import { getJobAdvertisedSearch } from '@/api/position'
 import CtPagination from '@/components/CtPagination'
 import { provide, reactive, ref } from 'vue'
+import { dealDictData } from '@/views/recruit/position/components/dict'
 
 import { useRoute, useRouter } from 'vue-router'
 defineOptions({name: 'retrieval-position-page'})
@@ -58,7 +59,11 @@ let pageReqVO = reactive({
 // 职位搜索
 const getPositionList = async () => {
   const { list, total: number } = await getJobAdvertisedSearch(pageReqVO)
-  items.value = list
+  items.value = list.map(e => {
+    e.job = { ...e.job, ...dealDictData({}, e.job) }
+    e.enterprise = { ...e.enterprise, ...dealDictData({}, e.enterprise) }
+    return e
+  })
   total.value = number
 }
 

+ 23 - 20
src/views/resume/components/jobIntention.vue

@@ -5,27 +5,30 @@
       <v-btn v-if="!isAdd" variant="text" color="primary" prepend-icon="mdi-plus-box" @click="isAdd = true">{{ $t('common.add') }}</v-btn>
     </div>
     <div v-if="!isAdd">
-      <div 
-        :class="['position-item']" 
-        v-for="(k, i) in positionList" 
-        :key="i" 
-        @mouseenter="k.active = true" 
-        @mouseleave="k.active = false"
-      >
-        <span>{{ k.name }}</span>
-        <span class="vline"></span>
-        <span>{{k.payFrom}}-{{k.payTo}}k</span>
-        <span class="vline"></span>
-        <span class="grey-text">{{ k.industryIds }}</span>
-        <span class="vline"></span>
-        <span class="grey-text">{{ k.areaName }}</span>
-        <span class="vline"></span>
-        <span class="grey-text">{{ k.jobType }}</span>
-        <span class="float-right" v-if="k.active">
-          <v-btn variant="text" color="primary" prepend-icon="mdi-square-edit-outline">{{ $t('common.edit') }}</v-btn>
-          <v-btn variant="text" color="primary" prepend-icon="mdi-trash-can-outline">{{ $t('common.delete') }}</v-btn>
-        </span>
+      <div v-if="positionList.length">
+        <div
+          :class="['position-item']" 
+          v-for="(k, i) in positionList" 
+          :key="i" 
+          @mouseenter="k.active = true" 
+          @mouseleave="k.active = false"
+        >
+          <span>{{ k.name }}</span>
+          <span class="vline"></span>
+          <span>{{k.payFrom}}-{{k.payTo}}k</span>
+          <span class="vline"></span>
+          <span class="grey-text">{{ k.industryIds }}</span>
+          <span class="vline"></span>
+          <span class="grey-text">{{ k.areaName }}</span>
+          <span class="vline"></span>
+          <span class="grey-text">{{ k.jobType }}</span>
+          <span class="float-right" v-if="k.active">
+            <v-btn variant="text" color="primary" prepend-icon="mdi-square-edit-outline">{{ $t('common.edit') }}</v-btn>
+            <v-btn variant="text" color="primary" prepend-icon="mdi-trash-can-outline">{{ $t('common.delete') }}</v-btn>
+          </span>
+        </div>
       </div>
+      <div v-else class="resumeNoDataText">请填写您的求职意向...</div>
     </div>
     <div v-if="isAdd" class="mt-2">
       <CtForm :items="items" style="width: 100%;">

+ 20 - 10
src/views/resume/components/selfEvaluation.vue

@@ -2,14 +2,14 @@
   <div class="resume-box">
     <div class="resume-header">
       <div class="resume-title">{{ $t('resume.personalAdvantages') }}</div>
-      <v-btn v-if="!isEdit" variant="text" color="primary" prepend-icon="mdi-square-edit-outline" @click="isEdit = true">{{ $t('common.edit') }}</v-btn>
+      <v-btn v-if="!isEdit" variant="text" color="primary" prepend-icon="mdi-square-edit-outline" @click="isEdit = true">{{ advantage ? $t('common.edit') : $t('common.add') }}</v-btn>
     </div>
     <div v-if="isEdit" class="mt-3 edit">
       <v-textarea 
         v-model="advantage" 
         label="请输入您的个人优势..." 
         variant="outlined" 
-        counter="200" 
+        counter="300" 
         color="primary" 
         validate-on="input"
         :rules="advantageRules"
@@ -20,7 +20,8 @@
       </div>
     </div>
     <div v-else class="content-list mt-3">
-      <div class="advantage" v-html="advantage"></div>
+      <div v-if="advantage" class="resumeNoDataText" v-html="advantage"></div>
+      <div v-else class="resumeNoDataText">请填写您的个人优势...</div>
     </div>
   </div>
 </template>
@@ -30,25 +31,38 @@ defineOptions({ name: 'selfEvaluation'})
 import { ref } from 'vue'
 import { saveResumeAdvantage } from '@/api/resume'
 import Snackbar from '@/plugins/snackbar'
+import { useUserStore } from '@/store/user'
 
 const isEdit = ref(false)
-const advantage = ref('1、熟悉 Java  技术平台,并稳定形成生产力,CCF 中国计算机学会会员,获得微软 MCP、MCSA 认证。 2、熟悉通用缓存/DB /搜索引擎/消息队列等中间件。对业内高可用高并发及分布式技术解决方案有充分理解。3、同时具备常用大数据解决方案实践经验,包括实时计算(Storm/Flink )及离线计算(Hive/ETL/Spark)。 4、对搜索推荐/订单交易等业务方向具备多年实践经验。')
+const advantage = ref('')
+const useStore = useUserStore()
+
+// 获取个人优势
+const getData = async () => {
+  await useStore.getUserBaseInfos(JSON.parse(localStorage.getItem('userInfo')).id)
+  const baseInfo = JSON.parse(localStorage.getItem('baseInfo'))
+  advantage.value = baseInfo.advantage
+}
+getData()
+
 const advantageRules = ref([
   value => {
     if (value) return true
     return '请输入您的个人优势'
   },
   value => {
-    if (value?.length <= 200) return true
-    return '请输入2-200个字符'
+    if (value?.length <= 300) return true
+    return '请输入2-300个字符'
   }
 ])
 
+// 编辑
 const handleSave = async () => {
   if (!advantage.value) return Snackbar.warning('请先输入个人优势!')
   await saveResumeAdvantage({ content: advantage.value })
   isEdit.value = false
   Snackbar.success('编辑成功')
+  await getData()
 }
 </script>
 
@@ -56,10 +70,6 @@ const handleSave = async () => {
 .content-list {
   white-space: pre-line;
 }
-.advantage {
-  color: #666;
-  font-size: 14px;
-}
 .edit {
   background-color: #f8f8f8;
   padding: 15px 10px 8px;

+ 24 - 19
src/views/resume/components/trainingExperience.vue

@@ -12,28 +12,33 @@
         <v-btn color="primary" class="half-button" @click="handleSave">{{ $t('common.save') }}</v-btn>
       </div>
     </div>
-    <div v-else v-for="(k, i) in trainExp" :key="i" class="exp mx-n2 mt-5" @mouseenter="k.active = true" @mouseleave="k.active = false">
-      <span class="float-right" v-if="k.active">
-        <v-btn variant="text" color="primary" prepend-icon="mdi-square-edit-outline" @click="handleEdit(k)">{{ $t('common.edit') }}</v-btn>
-        <v-btn variant="text" color="primary" prepend-icon="mdi-trash-can-outline" @click="handleDelete(k)">{{ $t('common.delete') }}</v-btn>
-      </span>
-      <div class="level1 d-flex align-center justify-space-between" style="height: 40px;">
+    <div v-else>
+      <div v-if="trainExp.length">
+        <div v-for="(k, i) in trainExp" :key="i" class="exp mx-n2 mt-5" @mouseenter="k.active = true" @mouseleave="k.active = false">
+          <span class="float-right" v-if="k.active">
+            <v-btn variant="text" color="primary" prepend-icon="mdi-square-edit-outline" @click="handleEdit(k)">{{ $t('common.edit') }}</v-btn>
+            <v-btn variant="text" color="primary" prepend-icon="mdi-trash-can-outline" @click="handleDelete(k)">{{ $t('common.delete') }}</v-btn>
+          </span>
+          <div class="level1 d-flex align-center justify-space-between" style="height: 40px;">
+            <div>
+              <span style="font-size: 18px; font-weight: bold;">{{ k.orgName }}</span>
+              <span class="label-title ml-5">
+                <span>{{ timesTampChange(k.startTime).slice(0, 10) }}</span>
+                <span class="mx-1">至</span>
+                <span>{{ timesTampChange(k.endTime).slice(0, 10) }}</span>
+              </span>
+            </div>
+          </div>
+          <div class="my-2">
+            <span class="label-title">培训课程:{{ k.course }}</span>
+          </div>
           <div>
-            <span style="font-size: 18px; font-weight: bold;">{{ k.orgName }}</span>
-            <span class="label-title ml-5">
-              <span>{{ timesTampChange(k.startTime).slice(0, 10) }}</span>
-              <span class="mx-1">至</span>
-              <span>{{ timesTampChange(k.endTime).slice(0, 10) }}</span>
-            </span>
+            <span class="label-title">培训描述:</span>
+            <span class="label-title">{{ k.content }}</span>
           </div>
         </div>
-        <div class="my-2">
-          <span class="label-title">培训课程:{{ k.course }}</span>
-        </div>
-        <div>
-          <span class="label-title">培训描述:</span>
-          <span class="label-title">{{ k.content }}</span>
-        </div>
+      </div>
+      <div v-else class="resumeNoDataText">请填写您的培训经历...</div>
     </div>
   </div>
 </template>