Xiao_123 hai 1 ano
pai
achega
38dd445a52
Modificáronse 1 ficheiros con 9 adicións e 8 borrados
  1. 9 8
      src/components/Enterprise/components/positions.vue

+ 9 - 8
src/components/Enterprise/components/positions.vue

@@ -19,7 +19,7 @@
       <div style="width: 200px;">
         <v-text-field  variant="outlined" placeholder="请输入职位名称" hide-details>
           <template #append-inner>
-            <v-btn color="primary" size="x-small">搜索</v-btn>
+            <v-btn color="primary" size="x-small" @click="getPositionList">搜索</v-btn>
           </template>
         </v-text-field>
       </div>
@@ -88,14 +88,10 @@ const props = defineProps({
 
 const total = ref(0)
 const pageInfo = ref({
-  size: 1,
+  size: 10,
   current: 1
 })
 
-const handleChangePage = (index) => {
-  console.log(index, 'handle-page')
-}
-
 const handlePosition = (val) => {
   window.open(`/recruit/position/details/${val.job.positionId}`)
 }
@@ -132,7 +128,7 @@ const handleClickCategory = (k) => {
 const list = ref([])
 const getPositionList = async () => {
   const pageReqVO = {
-    ...pageInfo,
+    ...pageInfo.value,
     // content: '',
     // areaIds: [],
     // expType: 0,
@@ -146,7 +142,7 @@ const getPositionList = async () => {
     // financingStatus: 0,
     enterpriseId: props.info.enterprise.id
   }
-  const { list: arr, total: number } = await getJobAdvertisedSearch({ pageReqVO })
+  const { list: arr, total: number } = await getJobAdvertisedSearch({ ...pageReqVO })
   total.value = number
   list.value = arr.map(e => {
     e.job = { ...e.job, ...dealDictData({}, e.job) }
@@ -155,6 +151,11 @@ const getPositionList = async () => {
 }
 getPositionList()
 
+const handleChangePage = (index) => {
+  pageInfo.value.current = index
+  getPositionList()
+}
+
 // 城市、学历、工作经验
 const desc = [
   { mdi: 'mdi-map-marker-outline', value: 'areaName' },