|
@@ -35,14 +35,13 @@ defineOptions({ name: 'enterprise-position-list'})
|
|
import { ref } from 'vue'
|
|
import { ref } from 'vue'
|
|
import TextUI from '@/components/FormUI/TextInput'
|
|
import TextUI from '@/components/FormUI/TextInput'
|
|
import PositionItem from './components/item.vue'
|
|
import PositionItem from './components/item.vue'
|
|
-import { useRouter } from 'vue-router'
|
|
|
|
|
|
+import { useRoute } from 'vue-router'; const route = useRoute()
|
|
|
|
+import { useRouter } from 'vue-router'; const router = useRouter()
|
|
import { getJobAdvertisedList } from '@/api/position'
|
|
import { getJobAdvertisedList } from '@/api/position'
|
|
import { dealDictArrayData } from '@/utils/position'
|
|
import { dealDictArrayData } from '@/utils/position'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
|
|
|
const { t } = useI18n()
|
|
const { t } = useI18n()
|
|
-const router = useRouter()
|
|
|
|
-const tab = ref(1)
|
|
|
|
const total = ref(0)
|
|
const total = ref(0)
|
|
const tipsText = ref(t('common.noData'))
|
|
const tipsText = ref(t('common.noData'))
|
|
const query = ref({
|
|
const query = ref({
|
|
@@ -52,6 +51,10 @@ const query = ref({
|
|
hasExpiredData: false, // true 到期职位
|
|
hasExpiredData: false, // true 到期职位
|
|
hire: false // true 众聘岗位
|
|
hire: false // true 众聘岗位
|
|
})
|
|
})
|
|
|
|
+
|
|
|
|
+const tab = ref(route.query?.hire ? 4: 1)
|
|
|
|
+if (route.query?.hire) router.replace({ path: route.path, query: { ...route.query, hire: false } })
|
|
|
|
+
|
|
const tabList = [
|
|
const tabList = [
|
|
{ label: t('position.recruitmentInProgress'), value: 1 },
|
|
{ label: t('position.recruitmentInProgress'), value: 1 },
|
|
{ label: t('position.closed'), value: 2 },
|
|
{ label: t('position.closed'), value: 2 },
|
|
@@ -72,6 +75,7 @@ const handleAdd = () => {
|
|
router.push('/recruit/enterprise/position/add')
|
|
router.push('/recruit/enterprise/position/add')
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
// 获取职位列表
|
|
// 获取职位列表
|
|
const getPositionList = async () => {
|
|
const getPositionList = async () => {
|
|
query.value.hasExpiredData = tab.value === 3 ? true : false
|
|
query.value.hasExpiredData = tab.value === 3 ? true : false
|