Xiao_123 7 mēneši atpakaļ
vecāks
revīzija
91d511c31b

+ 1 - 1
src/views/recruit/personal/PersonalCenter/resume/online/components/basicInfo.vue

@@ -136,7 +136,7 @@ let completeStatus = false
 const overlay = ref(false) // 加载中
 let baseInfo = ref({})
 let userInfo = ref({})
-const getBasicInfo = () => { // 获取基础信息
+const getBasicInfo = () => {
   const key = localStorage.getItem('baseInfo')
   if (!key || !Object.keys(key).length) return
   baseInfo.value = JSON.parse(key) // 人才信息

+ 4 - 2
src/views/recruit/personal/PersonalCenter/resume/online/components/jobIntention.vue

@@ -240,8 +240,10 @@ const getJobInterested = async () => {
   const data = await getResumeJobInterested()
   // 完成度展示
   emit('complete', { status: Boolean(data?.length), id: 'jobIntention' })
-  if (!data.length) return
-  interestList.value = data
+  if (!data.length) {
+    interestList.value = []
+    return
+  }
   interestList.value = dealJobData(data)
 }
 getJobInterested()

+ 1 - 2
src/views/recruit/personal/PersonalCenter/resume/online/components/selfEvaluation.vue

@@ -15,7 +15,7 @@
         :rules="advantageRules"
       ></v-textarea>
       <div class="text-end">
-        <v-btn class="half-button mr-3" variant="tonal" @click="isEdit = false">{{ $t('common.cancel') }}</v-btn>
+        <v-btn class="half-button mr-3" variant="tonal" @click="isEdit = false; getData()">{{ $t('common.cancel') }}</v-btn>
         <v-btn color="primary" class="half-button" @click="handleSave">{{ $t('common.save') }}</v-btn>
       </div>
     </div>
@@ -42,7 +42,6 @@ const useStore = useUserStore()
 const getData = async () => {
   await useStore.getUserBaseInfos(JSON.parse(localStorage.getItem('userInfo'))?.id)
   const baseInfo = JSON.parse(localStorage.getItem('baseInfo'))
-  // if (!baseInfo) return
   advantage.value = baseInfo?.advantage || ''
   // 完成度展示
   emit('complete', { status: Boolean(advantage.value), id: 'selfEvaluation' })

+ 1 - 5
src/views/recruit/personal/PersonalCenter/resume/online/components/vocationalSkills.vue

@@ -101,17 +101,13 @@ getData()
 
 // 保存 职业技能
 const handleSave = async () => {
-  // console.log(1, 'console', formPageRef.value.formRef)
-  const { valid } = await formPageRef.value.validate()
-  console.log(222, valid)
+  const { valid } = await formPageRef.value.formRef.validate()
   if (!valid) return
   const obj = {}
   formItems.value.options.forEach(e => {
-    // obj[e.key] = e.value - 0
     obj[e.key] = e.value
   })
   if (editId.value) obj.id = editId.value
-  console.log(1, 'obj', obj)
   await saveResumePersonSkill(obj)
   Snackbar.success('保存成功!')
   isEdit.value = false

+ 3 - 6
src/views/recruit/personal/PersonalCenter/resume/online/index.vue

@@ -81,13 +81,10 @@ const completeNum = ref(0)
 const complete = (val) => {
   if (!val?.id) return
   completeNum.value = 0
+  const data = items.value.find(e => e.id === val.id)
+  data.status = val.status || false
   items.value.forEach(e => {
-    if (e.id === val.id) {
-      e.status = val.status || false
-    }
-    if (e.status) {
-      completeNum.value++
-    }
+    if (e.status) complete.value++
   })
 }
 </script>