|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<v-card class="pa-5 card-box">
|
|
|
<div class="d-flex justify-space-between">
|
|
|
- <v-tabs v-model="query.status" align-tabs="start" color="primary" bg-color="#f7f8fa" @update:model-value="handleSearch">
|
|
|
+ <v-tabs v-model="query.status" align-tabs="start" color="primary" bg-color="#f7f8fa" @update:model-value="handleUpdateTab">
|
|
|
<v-tab v-for="k in tabList" :value="k.value" :key="k.value">{{ k.label }}</v-tab>
|
|
|
</v-tabs>
|
|
|
<TextInput v-model="textItems.value" :item="textItems" @appendInnerClick="handleSearch" @enter="handleSearch"></TextInput>
|
|
@@ -27,6 +27,7 @@ defineOptions({ name: 'public-recruitment-deliver'})
|
|
|
import { ref } from 'vue'
|
|
|
import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
import { getHireJobCvPage } from '@/api/recruit/public/delivery'
|
|
|
+import { dealDictObjData } from '@/views/recruit/personal/position/components/dict'
|
|
|
import TablePage from './components/table.vue'
|
|
|
|
|
|
const total = ref(0)
|
|
@@ -42,6 +43,7 @@ const textItems = ref({
|
|
|
value: '',
|
|
|
width: 250,
|
|
|
label: '搜索姓名',
|
|
|
+ clearable: true,
|
|
|
appendInnerIcon: 'mdi-magnify'
|
|
|
})
|
|
|
|
|
@@ -56,12 +58,29 @@ getTabData()
|
|
|
|
|
|
const getList = async () => {
|
|
|
const res = await getHireJobCvPage(query.value)
|
|
|
- items.value = res.list
|
|
|
+ if (!res.list.length) {
|
|
|
+ items.value = []
|
|
|
+ total.value = 0
|
|
|
+ return
|
|
|
+ }
|
|
|
+ items.value = res.list.map(e => {
|
|
|
+ let obj = e
|
|
|
+ obj.person = Object.assign(e.person, dealDictObjData({}, e.person))
|
|
|
+ obj.job = Object.assign(e.job, dealDictObjData({}, e.job))
|
|
|
+ return obj
|
|
|
+ })
|
|
|
total.value = res.total
|
|
|
}
|
|
|
getList()
|
|
|
|
|
|
const handleSearch = () => {
|
|
|
+ if (textItems.value.value) query.value.name = textItems.value.value
|
|
|
+ else delete query.value.name
|
|
|
+ query.value.pageNo = 1
|
|
|
+ getList()
|
|
|
+}
|
|
|
+
|
|
|
+const handleUpdateTab = () => {
|
|
|
query.value.pageNo = 1
|
|
|
getList()
|
|
|
}
|