|
@@ -174,7 +174,6 @@
|
|
|
<script setup lang="ts">
|
|
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
|
|
|
import { dateFormatter } from '@/utils/formatTime'
|
|
|
-import download from '@/utils/download'
|
|
|
import { JobAdvertisedApi, JobAdvertisedVO } from '@/api/menduner/system/job'
|
|
|
import JobAdvertisedForm from './JobAdvertisedForm.vue'
|
|
|
import { dealDictArrayData } from '@/utils/transform/position'
|
|
@@ -184,7 +183,6 @@ import { getDict } from '@/hooks/web/useDictionaries'
|
|
|
defineOptions({ name: 'JobAdvertised' })
|
|
|
|
|
|
const message = useMessage() // 消息弹窗
|
|
|
-const { t } = useI18n() // 国际化
|
|
|
|
|
|
const loading = ref(true) // 列表的加载中
|
|
|
const list = ref<JobAdvertisedVO[]>([]) // 列表的数据
|
|
@@ -205,14 +203,19 @@ const queryParams = reactive({
|
|
|
hire: true
|
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
-const exportLoading = ref(false) // 导出的加载中
|
|
|
|
|
|
// 职位类型、地区树状列表
|
|
|
const areaTreeData = ref([])
|
|
|
const positionTreeData = ref([])
|
|
|
const getDictData = async () => {
|
|
|
const { data } = await getDict('areaTreeData', {}, 'areaTreeData')
|
|
|
- areaTreeData.value = data && data.length ? data : []
|
|
|
+ const obj = data.find(e => e.name === '中国')
|
|
|
+ areaTreeData.value = obj?.children ? obj.children.map(e =>{
|
|
|
+ // 市辖区直接显示区
|
|
|
+ const municipality = e.children && e.children.length && e.children[0].name === '市辖区'
|
|
|
+ if (municipality && e.children[0].children?.length) e.children = e.children[0].children
|
|
|
+ return e
|
|
|
+ }) : []
|
|
|
|
|
|
const { data: position } = await getDict('positionTreeData', {}, 'positionTreeData')
|
|
|
positionTreeData.value = position && position.length ? position : []
|