|
@@ -14,8 +14,8 @@
|
|
|
<div class="d-flex mt-3">
|
|
|
<areaType v-if="areaList.length" :list="areaList" @inputChange="val => handleSearch('areaIds', val)"></areaType>
|
|
|
<expType :isSingle="true" @inputChange="val => handleSearch('expType', val)"></expType>
|
|
|
- <educationType></educationType>
|
|
|
- <payScope></payScope>
|
|
|
+ <educationType :isSingle="true" @inputChange="val => handleSearch('eduType', val)"></educationType>
|
|
|
+ <payScope @input-change="val => handleSearch('payType', val)"></payScope>
|
|
|
<div style="width: 300px;">
|
|
|
<v-text-field
|
|
|
v-model="query.content"
|
|
@@ -24,8 +24,8 @@
|
|
|
hide-details
|
|
|
color="primary"
|
|
|
append-inner-icon="mdi-magnify"
|
|
|
- @click:append-inner="handleSearch(query.content, 'content')"
|
|
|
- @keyup.enter="handleSearch(query.content, 'content')"
|
|
|
+ @click:append-inner="handleSearch('content', { values: query.content })"
|
|
|
+ @keyup.enter="handleSearch('content', { values: query.content })"
|
|
|
>
|
|
|
</v-text-field>
|
|
|
</div>
|
|
@@ -137,24 +137,22 @@ const handleClickCategory = (k) => {
|
|
|
|
|
|
const dealRouteQuery = () => {
|
|
|
const arr = Object.keys(query).map((e, i) => {
|
|
|
- return `${i ? '&' : ''}${e}=${query[e]}`
|
|
|
+ if (e !== 'pageNo' || e !== 'pageSize') return `${i ? '&' : ''}${e}=${query[e]}`
|
|
|
})
|
|
|
const str = arr.join()
|
|
|
if (str) router.push(`${route.path}?${str}`)
|
|
|
}
|
|
|
|
|
|
const handleSearch = (key, { values }) => {
|
|
|
- console.log(values, key, 'handle-search')
|
|
|
if (values === -1 || !values || values[0] === -1) delete query[key]
|
|
|
else query[key] = values
|
|
|
dealRouteQuery()
|
|
|
- query.pageNo = 1
|
|
|
- // getPositionList()
|
|
|
+ getPositionList(true)
|
|
|
}
|
|
|
|
|
|
// 职位列表
|
|
|
const list = ref([])
|
|
|
-const query = reactive({
|
|
|
+let query = reactive({
|
|
|
// content: '',
|
|
|
// areaIds: [],
|
|
|
// expType: 0,
|
|
@@ -163,8 +161,14 @@ const query = reactive({
|
|
|
// positionId: 0,
|
|
|
})
|
|
|
// 职位列表
|
|
|
-const getPositionList = async () => {
|
|
|
- const { list: arr, total: number } = await getJobAdvertisedSearch(Object.assign(query, pageInfo.value, { enterpriseId: props.info.enterprise.id }))
|
|
|
+const getPositionList = async (isSearch) => {
|
|
|
+ query = {
|
|
|
+ ...query,
|
|
|
+ ...pageInfo.value,
|
|
|
+ enterpriseId: props.info.enterprise.id
|
|
|
+ }
|
|
|
+ if (isSearch) query.pageNo = 1
|
|
|
+ const { list: arr, total: number } = await getJobAdvertisedSearch(query)
|
|
|
total.value = number
|
|
|
list.value = arr.map(e => {
|
|
|
e.active = false
|
|
@@ -172,7 +176,7 @@ const getPositionList = async () => {
|
|
|
return e
|
|
|
})
|
|
|
}
|
|
|
-// getPositionList()
|
|
|
+getPositionList()
|
|
|
|
|
|
const handleChangePage = (index) => {
|
|
|
pageInfo.value.pageNo = index
|