Просмотр исходного кода

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

lifanagju_citu 9 месяцев назад
Родитель
Сommit
7a482375dd

+ 9 - 33
src/views/recruit/personal/PersonalCenter/components/interview/item.vue

@@ -41,15 +41,10 @@
         </div>
       </div>
   </div>
-
-  <CtDialog :visible="show" title="同意面试邀请" :footer="true" widthType="2" @close="handleClose" @submit="handleSubmit">
-    <TextInput v-model="query.phone" :item="textItem"></TextInput>
-  </CtDialog>
 </template>
 
 <script setup>
 defineOptions({ name: 'interview-item'})
-import { ref } from 'vue'
 import { useI18n } from '@/hooks/web/useI18n'
 import { timesTampChange } from '@/utils/date'
 import { userInterviewInviteReject, userInterviewInviteConsent } from '@/api/recruit/personal/personalCenter'
@@ -64,16 +59,6 @@ const props = defineProps({
     default: () => []
   }
 })
-const show = ref(false)
-const query = ref({
-  id: null,
-  phone: null
-})
-const textItem = ref({
-  type: 'text',
-  clearable: true,
-  label: '联系号码 *'
-})
 
 // 企业详情
 const handleToEnterprise = (item) => {
@@ -85,29 +70,20 @@ const handleToEnterprise = (item) => {
 // 同意
 const handleAgree = (val) => {
   if (!val.id) return
-  query.value.id = val.id
+  const query = {
+    id: val.id
+  }
   const baseInfo = localStorage.getItem('baseInfo')
   if (baseInfo) {
     const { phone } = JSON.parse(baseInfo)
-    query.value.phone = phone
+    query.phone = phone
   }
-  show.value = true
-}
 
-const handleClose = () => {
-  show.value = false
-  query.value = {
-    id: null,
-    phone: null
-  }
-}
-
-const handleSubmit = async () => {
-  if (!query.value.phone) return Snackbar.warning('请填写您的联系号码')
-  await userInterviewInviteConsent(query.value)
-  Snackbar.success(t('common.operationSuccessful'))
-  handleClose()
-  emits('refresh')
+  Confirm(t('common.confirmTitle'), '是否确定接收此面试邀请?').then(async () => {
+    await userInterviewInviteConsent(query)
+    Snackbar.success(t('common.operationSuccessful'))
+    emits('refresh')
+  })
 }
 
 // 拒绝

+ 11 - 11
src/views/recruit/personal/company/index.vue

@@ -14,8 +14,8 @@
       <companyItem class="mt-3" :list="items"></companyItem>
       <MPagination
         :total="total"
-        :page="pageInfo.pageNo"
-        :limit="pageInfo.pageSize"
+        :page="query.pageNo"
+        :limit="query.pageSize"
         @handleChange="handleChangePage"
       ></MPagination>
     </div>
@@ -43,12 +43,9 @@ const clear = ref(false)
 
 const total = ref(0)
 const items = ref([])
-const pageInfo = ref({
-  pageSize: 10,
-  pageNo: 1
-})
 const query = ref({
-  ...pageInfo.value
+  pageNo: 1,
+  pageSize: 12
 })
 
 const dealRouteQuery = (data) => {
@@ -74,15 +71,18 @@ const handleSearch = async (val, key) => {
 
 const getCompanyData = async () => {
   const { list, total: number } = await getEnterpriseSearch(query.value)
+  if (!list.length) {
+    list.value = []
+    total.value = 0
+    return
+  }
   total.value = number
   items.value = dealDictArrayData([], list)
 }
 
 const handleClear = () => {
   clear.value = true
-  query.value = {
-    ...pageInfo.value
-  }
+  query.value.pageNo = 1
   router.push(route.path)
   getCompanyData()
 }
@@ -103,7 +103,7 @@ if (Object.keys(route.query).length) {
 
 // 分页
 const handleChangePage = (index) => {
-  pageInfo.value.pageNo = index
+  query.value.pageNo = index
   getCompanyData()
 }
 </script>