Ver código fonte

企业基本信息显示有误bug

Xiao_123 7 meses atrás
pai
commit
dcd5d7e6df

+ 1 - 1
src/layout/company/navBar.vue

@@ -140,7 +140,7 @@ let baseInfo = ref(JSON.parse(localStorage.getItem('entBaseInfo')) || {})
 let enterpriseUserAccount = ref(JSON.parse(localStorage.getItem('enterpriseUserAccount')) || {}) // 账户信息
 
 userStore.$subscribe((mutation, state) => {
-  if (Object.keys(state.baseInfo).length) baseInfo.value = state.entBaseInfo
+  if (Object.keys(state.entBaseInfo).length) baseInfo.value = state.entBaseInfo
   if (Object.keys(state.enterpriseUserAccount).length) enterpriseUserAccount.value = state.enterpriseUserAccount
 })
 

+ 19 - 36
src/views/recruit/enterprise/entInfoSetting/index.vue

@@ -6,18 +6,18 @@
       <ProgressBar
         label="企业信息填写完成度:"
         :num="completeNum"
-        :total="tabList?.length"
+        :total="status?.length"
         :fontSize="14"
         :inlineDisplay="true"
         style="width: 350px;"
       ></ProgressBar>
     </div>
     <v-card class="card-box pa-5" style="min-height: 500px">
-      <v-tabs v-model="tab" @update:model-value="handleTabClick" align-tabs="start" color="primary" bg-color="#f7f8fa">
+      <v-tabs v-model="tab" align-tabs="start" color="primary" bg-color="#f7f8fa">
         <v-tab v-for="val in tabList" :key="val.value" :value="val.value" >
           {{ val.label }}
           <template v-slot:append>
-            <template v-if="val.status === false">
+            <template v-if="status.find(e => e.id === val.id).status === false">
               <v-icon color="orange">mdi-information-outline</v-icon>
               <v-tooltip activator="parent" location="top">请完善{{ val.label }}</v-tooltip>
             </template>
@@ -28,20 +28,12 @@
         <template v-for="item in tabList" :key="item.id">
           <div v-show="item.value === tab">
             <component
-              ref="tabRef"
-              class="mb-3"
               :is="item.path"
-              @complete="complete"
-              @change="val => tab = val"
+              @complete="handleComplete"
             />
           </div>
         </template>
       </div>
-      <!-- <v-window v-model="tab" class="mt-3">
-        <v-window-item :value="val.value" v-for="val in tabList" :key="val.value">
-          <component :is="val.path" ref="tabRef"></component>
-        </v-window-item>
-      </v-window> -->
     </v-card>
   </div>
 </template>
@@ -54,54 +46,45 @@ import enterpriseAlbum from './informationSettingsComponents/enterpriseAlbum.vue
 import welfareLabel from './informationSettingsComponents/welfareLabel.vue'
 import enterpriseLabel from './informationSettingsComponents/enterpriseLabel.vue'
 import businessInformation from './informationSettingsComponents/businessInformation.vue'
-// import authentication from './informationSettingsComponents/authentication.vue'
 import ProgressBar from '@/components/ProgressBar'
-import { ref, shallowRef, watch } from 'vue'
+import { ref, watch } from 'vue'
 import { 
   useRoute, 
-  // useRouter
 } from 'vue-router'
 import { useI18n } from '@/hooks/web/useI18n'
 
 const route = useRoute()
-// const router = useRouter()
 const { t } = useI18n()
 // tab
-const tabRef = shallowRef()
 const tab = ref(1)
-const tabList = ref([
+const tabList = [
   { label: t('enterprise.infoSetting.basicInfo'), value: 1, path: basicInfo, id: 'basicInfo' },
   { label: t('enterprise.infoSetting.enterpriseLogo'), value: 2, path: enterpriseLogo, id: 'enterpriseLogo' },
   { label: t('enterprise.infoSetting.enterpriseAlbum'), value: 3, path: enterpriseAlbum, id: 'enterpriseAlbum' },
   { label: t('enterprise.infoSetting.welfareLabel'), value: 4, path: welfareLabel, id: 'welfareLabel' },
   { label: t('enterprise.infoSetting.enterpriseLabel'), value: 7, path: enterpriseLabel, id: 'enterpriseLabel' },
   { label: t('enterprise.infoSetting.businessInformation'), value: 5, path: businessInformation, id: 'businessInformation' },
-  // { label: t('setting.realNameAuthentication'), value: 6, path: authentication, id: 'authentication' },
+]
+const status = ref([
+  { id: 'basicInfo', status: false },
+  { id: 'enterpriseLogo', status: false },
+  { id: 'enterpriseAlbum', status: false },
+  { id: 'welfareLabel', status: false },
+  { id: 'enterpriseLabel', status: false },
+  { id: 'businessInformation', status: false }
 ])
 
-watch(() => route?.query?.tabKey, (newVal) => { // newQuery, oldQuery
+watch(() => route?.query?.tabKey, (newVal) => {
   if (newVal) tab.value = newVal - 0
 }, { deep: true, immediate: true })
 
-const handleTabClick = () => {
-  // 基本信息-获取企业管理员实名认证信息
-  // if (tab.value === 1) {
-  //   tabRef.value[0].getAuthInfo()
-  // }
-  // router.push(`${route.path}?tabKey=${tab.value.toString()}`)
-}
-
 const completeNum = ref(0)
-const complete = (val) => {
+const handleComplete = (val) => {
   if (!val?.id) return
   completeNum.value = 0
-  tabList.value.forEach(e => {
-    if (e.id === val.id) {
-      e.status = val.status || false
-    }
-    if (e.status) {
-      completeNum.value++
-    }
+  status.value.forEach(e => {
+    if (e.id === val.id) e.status = val.status || false
+    if (e.status) completeNum.value++
   })
 }
 </script>

+ 2 - 13
src/views/recruit/enterprise/entInfoSetting/informationSettingsComponents/basicInfo.vue

@@ -40,7 +40,7 @@ import { getDict } from '@/hooks/web/useDictionaries'
 import { useI18n } from '@/hooks/web/useI18n'
 import industryTypeCard from '@/components/industryTypeCard'
 import Snackbar from '@/plugins/snackbar'
-const emit = defineEmits(['complete', 'change'])
+const emit = defineEmits(['complete'])
 
 const { t } = useI18n()
 const CtFormRef = ref()
@@ -130,15 +130,6 @@ const formItems = ref({
       rules: [v => !!v || '请选择企业规模'],
       items: []
     },
-    // {
-    //   type: 'text',
-    //   key: 'workTime',
-    //   value: null,
-    //   col: 6,
-    //   class: 'mb-3',
-    //   label: '上班时间(示例:上午09:00 - 下午17:00)',
-    //   placeholder: '请输入上班时间'
-    // },
     {
       type: 'datePicker',
       key: 'openTime',
@@ -149,8 +140,6 @@ const formItems = ref({
       col: 6,
       flexStyle: 'mr-3',
       outlined: true,
-      // rules: [v => !!v || '请选择开业时间']
-      // options: {},
     },
     {
       slotName: 'prepare',
@@ -223,7 +212,7 @@ const getBaseInfo = async () => {
       item.value = data[item.key] ? data[item.key] : item.default
     } else item.value = data[item.key]
     // 完成度展示
-    if (item.value === undefined || item.value === null || item.value === '') completeStatus = false
+    if (item.rules && (item.value === undefined || item.value === null || item.value === '')) completeStatus = false
   })
   // 完成度展示
   emit('complete', { status: completeStatus, id: 'basicInfo' })

+ 31 - 29
src/views/recruit/enterprise/entInfoSetting/informationSettingsComponents/enterpriseLabel.vue

@@ -1,39 +1,41 @@
 <!-- 企业标签 -->
 <template>
-  <span style="font-size: 16px;" class="mr-1">已选择标签</span>
-  <span style="font-size: 14px; color: var(--color-666);">(最多10个标签)</span>
-  <div class="mb-15">
-    <v-chip
-      v-for="(item, index) in chosen" :key="index"
-      class="chip mx-2 mt-4"
-      label color="primary"
-    >
-      {{ item }}
-      <v-icon size="18" color="primary" style="margin-left: 6px;" @click="closeClick(item)">mdi-close-circle</v-icon>
-    </v-chip>
-    <div>
-      <div v-if="customTag" class="d-flex align-center mx-2 mt-4">
-        <TextUI class="mr-2" :item="textItem" @appendInnerClick.stop="appendInnerClick"></TextUI>
-        <v-icon size="22" color="#ccc" style="cursor: pointer;" @click="customTag = false">mdi-close</v-icon>
-      </div>
-      <div v-else @click="customTag = true">
-        <v-chip class="chip mx-2 mt-4" label color="#fd7b4ee6"><v-icon icon="mdi-plus" start></v-icon>自定义标签</v-chip>
-      </div>
-    </div>
-  </div>
-  <div v-for="(val, index) in chipList" :key="'enterpriseLabel' + index" class="mb-8">
-    <span style="font-size: 16px;">{{ val?.nameCn || '--' }}</span>
-    <div v-if="val?.children?.length">
+  <div>
+    <span style="font-size: 16px;" class="mr-1">已选择标签</span>
+    <span style="font-size: 14px; color: var(--color-666);">(最多10个标签)</span>
+    <div class="mb-15">
       <v-chip
-        v-for="(item, index) in val.children" :key="index"
+        v-for="(item, index) in chosen" :key="index"
         class="chip mx-2 mt-4"
         label color="primary"
-        :disabled="chosen.includes(item?.nameCn )"
-        @click="choseClick(item?.nameCn )"
       >
-        <v-icon icon="mdi-plus" start></v-icon>
-        {{ item?.nameCn || '--' }}
+        {{ item }}
+        <v-icon size="18" color="primary" style="margin-left: 6px;" @click="closeClick(item)">mdi-close-circle</v-icon>
       </v-chip>
+      <div>
+        <div v-if="customTag" class="d-flex align-center mx-2 mt-4">
+          <TextUI class="mr-2" :item="textItem" @appendInnerClick.stop="appendInnerClick"></TextUI>
+          <v-icon size="22" color="#ccc" style="cursor: pointer;" @click="customTag = false">mdi-close</v-icon>
+        </div>
+        <div v-else @click="customTag = true">
+          <v-chip class="chip mx-2 mt-4" label color="#fd7b4ee6"><v-icon icon="mdi-plus" start></v-icon>自定义标签</v-chip>
+        </div>
+      </div>
+    </div>
+    <div v-for="(val, index) in chipList" :key="'enterpriseLabel' + index" class="mb-8">
+      <span style="font-size: 16px;">{{ val?.nameCn || '--' }}</span>
+      <div v-if="val?.children?.length">
+        <v-chip
+          v-for="(item, index) in val.children" :key="index"
+          class="chip mx-2 mt-4"
+          label color="primary"
+          :disabled="chosen.includes(item?.nameCn )"
+          @click="choseClick(item?.nameCn )"
+        >
+          <v-icon icon="mdi-plus" start></v-icon>
+          {{ item?.nameCn || '--' }}
+        </v-chip>
+      </div>
     </div>
   </div>
 </template>

+ 9 - 9
src/views/recruit/enterprise/entInfoSetting/informationSettingsComponents/enterpriseLogo.vue

@@ -29,16 +29,16 @@
         </div>
       </div>
     </div>
-  </div>
 
-  <ImgCropper 
-    :visible="isShowCopper" 
-    :image="selectPic" 
-    :cropBoxResizable="true"
-    @submit="handleHideCopper" 
-    :aspectRatio="1 / 1" 
-    @close="isShowCopper = false; selectPic = ''"
-  ></ImgCropper>
+    <ImgCropper 
+      :visible="isShowCopper" 
+      :image="selectPic" 
+      :cropBoxResizable="true"
+      @submit="handleHideCopper" 
+      :aspectRatio="1 / 1" 
+      @close="isShowCopper = false; selectPic = ''"
+    ></ImgCropper>
+  </div>
 </template>
 
 <script setup>

+ 31 - 29
src/views/recruit/enterprise/entInfoSetting/informationSettingsComponents/welfareLabel.vue

@@ -1,39 +1,41 @@
 <!-- 福利标签 -->
 <template>
-  <span style="font-size: 16px;" class="mr-1">已选择标签</span>
-  <span style="font-size: 14px; color: var(--color-666);">(最多10个标签)</span>
-  <div class="mb-15">
-    <v-chip
-      v-for="(item, index) in chosen" :key="index"
-      class="chip mx-2 mt-4"
-      label color="#ea8d03"
-    >
-      {{ item }}
-      <v-icon size="18" color="#ea8d03" style="margin-left: 6px;" @click="closeClick(item)">mdi-close-circle</v-icon>
-    </v-chip>
-    <div>
-      <div v-if="customTag" class="d-flex align-center mx-2 mt-4">
-        <TextUI class="mr-2" :item="textItem" @appendInnerClick.stop="appendInnerClick"></TextUI>
-        <v-icon size="22" color="#ccc" style="cursor: pointer;" @click="customTag = false">mdi-close</v-icon>
-      </div>
-      <div v-else @click="customTag = true">
-        <v-chip class="chip mx-2 mt-4" label color="#fd7b4ee6"><v-icon icon="mdi-plus" start></v-icon>自定义标签</v-chip>
-      </div>
-    </div>
-  </div>
-  <div v-for="(val, index) in chipList" :key="'welfareLabel' + index" class="mb-8">
-    <span style="font-size: 16px;">{{ val?.nameCn || '--' }}</span>
-    <div v-if="val?.children?.length">
+  <div>
+    <span style="font-size: 16px;" class="mr-1">已选择标签</span>
+    <span style="font-size: 14px; color: var(--color-666);">(最多10个标签)</span>
+    <div class="mb-15">
       <v-chip
-        v-for="(item, index) in val.children" :key="index"
+        v-for="(item, index) in chosen" :key="index"
         class="chip mx-2 mt-4"
         label color="#ea8d03"
-        :disabled="chosen.includes(item?.nameCn )"
-        @click="choseClick(item?.nameCn )"
       >
-        <v-icon icon="mdi-plus" start></v-icon>
-        {{ item?.nameCn || '--' }}
+        {{ item }}
+        <v-icon size="18" color="#ea8d03" style="margin-left: 6px;" @click="closeClick(item)">mdi-close-circle</v-icon>
       </v-chip>
+      <div>
+        <div v-if="customTag" class="d-flex align-center mx-2 mt-4">
+          <TextUI class="mr-2" :item="textItem" @appendInnerClick.stop="appendInnerClick"></TextUI>
+          <v-icon size="22" color="#ccc" style="cursor: pointer;" @click="customTag = false">mdi-close</v-icon>
+        </div>
+        <div v-else @click="customTag = true">
+          <v-chip class="chip mx-2 mt-4" label color="#fd7b4ee6"><v-icon icon="mdi-plus" start></v-icon>自定义标签</v-chip>
+        </div>
+      </div>
+    </div>
+    <div v-for="(val, index) in chipList" :key="'welfareLabel' + index" class="mb-8">
+      <span style="font-size: 16px;">{{ val?.nameCn || '--' }}</span>
+      <div v-if="val?.children?.length">
+        <v-chip
+          v-for="(item, index) in val.children" :key="index"
+          class="chip mx-2 mt-4"
+          label color="#ea8d03"
+          :disabled="chosen.includes(item?.nameCn )"
+          @click="choseClick(item?.nameCn )"
+        >
+          <v-icon icon="mdi-plus" start></v-icon>
+          {{ item?.nameCn || '--' }}
+        </v-chip>
+      </div>
     </div>
   </div>
 </template>

+ 1 - 1
src/views/recruit/personal/recommend/index.vue

@@ -8,7 +8,7 @@
       <div class="d-flex">
         <div class="mt-3">
           <positionList :items="items" @selectChange="selectChange"></positionList>
-          <div class="loading defaultLink-i" @click="router.push('/recruit/personal/position')">加载更多</div>
+          <div class="loading defaultLink-i" @click="router.push('/recruit/personal/position')">查看更多职位</div>
           <div v-if="showLoadingMore" :class="['loading', {'defaultLink-i': !loadingType}]" @click="handleChangePage">{{ loadingText[loadingType] }}</div>
         </div>
         <div class="position-details ml-1" style="flex: 1; overflow: hidden;">