Browse Source

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

lifanagju_citu 10 tháng trước cách đây
mục cha
commit
25eabeffc5

+ 5 - 1
src/components/PositionLongStrip/item.vue

@@ -45,7 +45,11 @@
       </div>
       <div class="footer-right">
         <v-avatar size="x-small" :image="item.contact.avatar || 'https://minio.citupro.com/dev/menduner/7.png'"></v-avatar>
-        <span class="mx-2 textColor666">{{ item.contact.name }} | {{ item.contact.postNameCn }}</span>
+        <span class="mx-2 textColor666">
+          {{ item.contact.name }}
+          <span v-if="item?.contact?.postNameCn">|</span>
+          {{ item.contact.postNameCn }}
+        </span>
       </div>
     </div>
   </div>

+ 1 - 8
src/layout/personal/navBar.vue

@@ -139,8 +139,6 @@ const show = ref(false)
 const radios = ref(null)
 const enterpriseList = ref([])
 const changeLoginType = async () => {
-  // router.push({ path: '/login' })
-  // router.push({ name: 'login', query: { loginType: 330 } })
   const data = await getUserBindEnterpriseList() // 申请通过才有数据,否则空数组
   enterpriseList.value = data || []
   if (data?.length) {
@@ -162,11 +160,6 @@ const toEnterprise = async (enterpriseId) => {
   router.push({ path: '/recruit/enterprise' })
   localStorage.setItem('loginType', 'enterprise')
 }
-// // 切换为招聘者
-// const changeRole = async () => {
-//   await userStore.userLogout()
-//   router.push({ name: 'login', query: { loginType: 330 } })
-// }
 
 // 查看用户是否有在申请中的数据
 const getApplyInfo = async () => {
@@ -199,7 +192,7 @@ const items = ref([
 let baseInfo = ref(JSON.parse(localStorage.getItem('baseInfo')) || {}) // 人才信息
 
 userStore.$subscribe((mutation, state) => {
-  baseInfo.value = state.baseInfo
+  if (Object.keys(state.baseInfo).length) baseInfo.value = state.baseInfo
 })
 
 const handleLogin = () => {

+ 5 - 0
src/views/integral/components/integralShow.vue

@@ -71,7 +71,12 @@ const handleClickMall = () => {
 const integralDetails = () => {
   window.open(props.isEnterprise ? '/enterprise/memberCenter/myPoints' : '/integral/pointsManagement')
 }
+
+defineExpose({
+  getIntegral
+})
 </script>
+
 <style lang="scss" scoped>
 .statisticsBox {
   padding: 10px 0;

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

@@ -286,7 +286,9 @@ const handleSubmit = async () =>{
   const obj = resumeList.value.find(e => e.id === selectResume.value)
   if (!obj) return Snackbar.warning(t('resume.selectedResumeNotExist'))
   await jobCvRelSend({ jobId: id, title: obj.title, url: obj.url })
-  Snackbar.success(t('resume.deliverySuccess'))
+  setTimeout(() => {
+    Snackbar.success(t('resume.deliverySuccess'))
+  }, 3000)
   handleClose()
   deliveryCheck()
 }

+ 1 - 1
src/views/recruit/personal/position/components/rightRecommend.vue

@@ -3,7 +3,7 @@
     <h4 class="h4 mb-3">{{ $t('position.recommend') }}</h4>
     <div v-for="(item, index) in items" :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>
+      <span class="recruit-salary">{{ item.payFrom }}-{{ item.payTo }}/{{ item.payName }}</span>
       <div :class="['enterprise', {'border-bottom-dashed': index !== items.length - 1}]" @click="handleEnterprise(item)">
         <v-img class="float-left" :src="item.logoUrl || 'https://minio.citupro.com/dev/menduner/company-avatar.png'" :width="30" :height="30"></v-img>
         <span class="float-left enterprise-name">{{ item.anotherName }}</span>

+ 10 - 54
src/views/recruit/personal/taskCenter/components/signIn.vue

@@ -1,7 +1,7 @@
 <!-- 签到 -->
 <template>
   <div>
-    <integralShow></integralShow>
+    <integralShow ref="integralRef"></integralShow>
     <div class="text-end signInRecord mt-3" @click="handleRecord">
       {{ $t('taskCenter.signInRecord') }}
       <v-icon>mdi-chevron-right</v-icon>
@@ -36,43 +36,21 @@
       </span>
       <v-btn class="half-button" color="primary" size="small" :loading="signLoading" :disabled="todaySignIn" @click="handleSignIn">{{ todaySignIn ? '已签到' : '签到' }}</v-btn>
     </div>
-
-    <!-- 签到记录 -->
-    <!-- <v-navigation-drawer v-model="drawer" location="right" temporary width="600" class="drawer">
-      <v-data-table
-        :items="recordList"
-        :headers="headers"
-        disable-sort
-        height="80vh"
-      >
-        <template #bottom></template>
-      </v-data-table>
-      <CtPagination
-        v-if="total > 0"
-        :total="total"
-        :page="pageNo"
-        :limit="pageSize"
-        @handleChange="handleChangePage"
-      ></CtPagination>
-    </v-navigation-drawer> -->
   </div>
 </template>
 
 <script setup>
 defineOptions({name: 'personal-taskCenter-signIn'})
 import { ref } from 'vue'
-// import { timesTampChange } from '@/utils/date'
+import { useUserStore } from '@/store/user'
 import { useI18n } from '@/hooks/web/useI18n'
-import { 
-  getRewardSignInRecordSummary, 
-  getRewardSignInConfigList, 
-  createRewardSignInRecord, 
-  // getRewardSignInRecordPage 
-} from '@/api/sign'
+import { getRewardSignInRecordSummary, getRewardSignInConfigList, createRewardSignInRecord } from '@/api/sign'
 import integralShow from '@/views/integral/components/integralShow.vue'
 import Snackbar from '@/plugins/snackbar'
 
 const { t } = useI18n()
+const userStore = useUserStore()
+const integralRef = ref()
 // 连续签到天数
 const continuousDay = ref(0)
 // 今天有无签到
@@ -82,18 +60,6 @@ const configList = ref([])
 const todayNumber = ref()
 const signLoading = ref(false)
 
-// 签到记录
-// const total = ref(0)
-// const drawer = ref(false)
-// const pageSize = ref(10)
-// const pageNo = ref(1)
-// const recordList = ref([])
-// const headers = [
-//   { title: t('taskCenter.signInDays'), key: 'day' },
-//   { title: t('taskCenter.points'), key: 'point' },
-//   { title: t('taskCenter.createTime'), key: 'createTime', value: item => timesTampChange(item.createTime)}
-// ]
-
 // 获取签到规则列表
 const getConfigList = async () => {
   const data = await getRewardSignInConfigList()
@@ -117,30 +83,20 @@ const handleSignIn = async () => {
   await createRewardSignInRecord()
   setTimeout(async () => {
     await getSummary()
+    
+    // 更新积分数
+    await integralRef.value.getIntegral()
+    await userStore.getUserAccountInfo()
+
     Snackbar.success(t('taskCenter.signInSuccess'))
     signLoading.value = false
   }, 1000)
 }
 
-// 签到记录
-// const getRecordList = async () => {
-//   const res = await getRewardSignInRecordPage(pageNo.value, pageSize.value)
-//   recordList.value = res.list
-//   total.value = res.total
-// }
-
 const handleRecord = () => {
-  // drawer.value = true
-  // pageNo.value = 1
-  // recordList.value = []
-  // getRecordList()
   window.open('/integral/pointsManagement')
 }
 
-// const handleChangePage = (e) => {
-//   pageNo.value = e
-//   getRecordList()
-// }
 </script>
 
 <style lang="scss" scoped>