| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122 |
- <template>
- <div id="newsList">
- <!-- 页面头部 -->
- <HomePageHead></HomePageHead>
- <!-- 导航栏 -->
- <HomePageNavigation></HomePageNavigation>
- <!-- 列表页广告一 -->
- <HomeAdvertising :imgurl="adImg1" v-if="adImg1"></HomeAdvertising>
- <!-- 二级标题-->
- <HomeListSecondaryHeadingZgzp v-if="parent_name != ''" :name="parent_name" :nav="secondNav"
- :pinyin="parent_pinyin">
- </HomeListSecondaryHeadingZgzp>
- <main class="index_main">
- <!-- 三农资讯网-招工招聘-社会招聘 snzx_society -->
- <section class="index_2">
- <!-- 职位搜索 -->
- <div class="recruit_head_box clearfix phone_none">
- <div class="cruit_head_left">
- <span class="cruit_head_a cruit_head_only">职位搜索</span>
- </div>
- <div class="cruit_head_right clearfix">
- <!-- <span class="cruit_head_right_a" @click="createResume"
- v-if="job_search == 1 && type_id == 1">创建个人简历</span> -->
- <span class="cruit_head_right_a" @click="createJob"
- v-if="job_search == 1 && type_id == 3">发布招聘信息</span>
- </div>
- </div>
-
- <form class="phone_form clearfix pc_none" action=" " method=" ">
- <div class="phone_form_tip phone_form_tip_1 clearfix">
-
- <el-select v-model="industry_category" placeholder="全部" style="width:32%" clearable
- @change="hyChange">
- <el-option v-for="item in industry_categoryList" :key="item.hyid"
- :label="item.hyname" :value="item.hyid" />
- </el-select>
- <el-select v-model="position_category" placeholder="全部" style="width:32%" clearable
- @change="zwChange">
- <el-option v-for="item in position_categoryList" :key="item.zwid"
- :label="item.zwname" :value="item.zwid" />
- </el-select>
- <el-select v-model="position" placeholder="全部" style="width:32%" clearable
- no-data-text="请先选择职位类别" @change="jtzwChange">
- <el-option v-for="item in positionList" :key="item.zwid" :label="item.zwname"
- :value="item.zwid" />
- </el-select>
-
- </div>
- <div class="phone_form_tip phone_form_tip_2 clearfix">
-
- <el-select v-model="province" placeholder="省" style="width:15%" clearable
- @change="provinceChange">
- <el-option v-for="item in provinceList" :key="item.id" :label="item.name"
- :value="item.id" />
- </el-select>
- <el-select v-model="city" placeholder="市" style="width:15%" no-data-text="选省"
- clearable @change="cityChange">
- <el-option v-for="item in cityList" :key="item.id" :label="item.name"
- :value="item.id" />
- </el-select>
-
- <el-input v-model="keywords"
- style="width: 51%"
- placeholder="请输入搜索关键词" clearable>
- </el-input>
- <el-button type="" style="width: 13%" @click="goSearch">搜索</el-button>
- </div>
- <div class="phone_form_tip clearfix">
- </div>
- </form>
-
- <form class="cruit_form clearfix phone_none" action=" " method=" ">
- <div class="society_form_tip clearfix">
- <label class="society_form_label">行业类别:</label>
- <div class="society_form_right_a_box clearfix">
- <a class="society_form_right_a"
- :class="{ society_form_right_a_only: hyid == '' || !hyid || hyid == 0 }" title="全部"
- @click="hyChange(0)">
- 全部
- </a>
- <NuxtLink v-for="(item, index) in industry_categoryList" :key="item">
- <span class="society_form_right_a"
- :class="{ society_form_right_a_only: item.hyid == hyid }" :title="item.hyname"
- @click="hyChange(item.hyid)" v-if="index < 20 && hyIndex == 1">{{ item.hyname
- }}</span>
- <span class="society_form_right_a" v-if="hyIndex == 2" @click="hyChange(item.hyid)"
- :class="{ society_form_right_a_only: item.hyid == hyid }" :title="item.hyname">
- {{ item.hyname }}
- </span>
- </NuxtLink>
- <span class="society_form_right_btn" @click="hyIndex = 2" v-if="hyIndex == 1">展开</span>
- <span class="society_form_right_btn" @click="hyIndex = 1" v-if="hyIndex == 2">收起</span>
- </div>
- </div>
- <div class="society_form_tip clearfix">
- <label class="society_form_label">职位类别:</label>
- <div class="society_form_right_a_box clearfix">
- <a class="society_form_right_a"
- :class="{ society_form_right_a_only: zwid == '' || !zwid || zwid == 0 }" title=""
- @click="zwChange(0)">全部</a>
- <span v-for="(item, index) in position_categoryList" :key="item">
- <span class="society_form_right_a" v-if="index < 20 && zwIndex == 1"
- @click="zwChange(item.zwid)"
- :class="{ society_form_right_a_only: item.zwid == zwid }" :title="item.zwname">
- {{ item.zwname }}
- </span>
- <span class="society_form_right_a" v-if="zwIndex == 2" @click="zwChange(item.zwid)"
- :class="{ society_form_right_a_only: item.zwid == zwid }" :title="item.zwname">
- {{ item.zwname }}
- </span>
- </span>
- <span class="society_form_right_btn society_form_right_btn_up" @click="zwIndex = 2"
- v-if="zwIndex == 1">展开</span>
- <span class="society_form_right_btn society_form_right_btn_up" @click="zwIndex = 1"
- v-if="zwIndex == 2">收起</span>
- </div>
- </div>
- <div class="society_form_tip clearfix">
- <label class="society_form_label">具体职位:</label>
- <div class="society_form_right_a_box clearfix">
- <a class="society_form_right_a" @click="jtzwChange(0)"
- :class="{ society_form_right_a_only: jtzwid == '' || !jtzwid || jtzwid == 0 }"
- title="">全部</a>
- <span v-for="(item, index) in positionList" :key="item">
- <span class="society_form_right_a" v-if="index < 20 && jtzwIndex == 1"
- @click="jtzwChange(item.zwid)"
- :class="{ society_form_right_a_only: item.zwid == jtzwid }" :title="item.zwname">
- {{ item.zwname }}
- </span>
- <span class="society_form_right_a" v-if="jtzwIndex == 2" @click="jtzwChange(item.zwid)"
- :class="{ society_form_right_a_only: item.zwid == jtzwid }" :title="item.zwname">
- {{ item.zwname }}
- </span>
- </span>
- <!-- <span class="society_form_right_btn">展开</span> -->
- <span class="society_form_right_btn" @click="jtzwIndex = 2" v-if="jtzwIndex == 1">展开</span>
- <span class="society_form_right_btn" @click="jtzwIndex = 1" v-if="jtzwIndex == 2">收起</span>
- </div>
- </div>
- <div class="cruit_form_tip clearfix">
- <div class="cruit_form_per">
- <label class="cruit_form_label">地区选择:</label>
- <div class="cruit_form_label_right clearfix">
- <el-select v-model="province" placeholder="请选择省" style="width: 140px" clearable
- @change="provinceChange">
- <el-option v-for="item in provinceList" :key="item.id" :label="item.name"
- :value="item.id" />
- </el-select>
- <el-select v-model="city" placeholder="请选择市" style="width: 140px" no-data-text="请先选择省"
- clearable>
- <el-option v-for="item in cityList" :key="item.id" :label="item.name"
- :value="item.id" />
- </el-select>
- </div>
- </div>
- </div>
- <div class="cruit_form_tip clearfix">
- <div class="cruit_form_per">
- <label class="cruit_form_label">关键词:</label>
- <div class="cruit_form_label_right clearfix">
- <el-input v-model="keywords" style="width: 300px" placeholder="请输入搜索关键词" clearable />
- <el-button type="success" @click="goSearch">搜索</el-button>
- </div>
- </div>
- </div>
- </form>
- <!-- 职位搜索 -->
- </section>
- </main>
- <main class="color_main">
- <main class="index_main">
- <!-- 选项卡头 -->
- <section class="index_3 clearfix">
- <div class="recruit_head_box clearfix phone_none">
- <div class="cruit_head_left">
- <!-- <a class="cruit_head_a" :class="{ cruit_head_only: job_search == 1 }"
- @mouseover="job_search = 1" title="">找工作</a> -->
- <!-- <a class="cruit_head_a" :class="{ cruit_head_only: job_search == 2 }"
- @mouseover="job_search = 2" title="">招人才</a> -->
- <a class="cruit_head_a cruit_head_only" title="">招人才</a>
- </div>
- <div class="society_head_right clearfix">
- <!-- <div class="society_head_checkbox_box" v-if="job_search == 1 && type_id == 1">
- <el-checkbox v-model="allJob" label="" @change="toggleAllJob" />
- </div>
- <div class="society_head_right_all_box" v-if="job_search == 1 && type_id == 1">
- 全选
- </div> -->
- <div class="society_head_checkbox_box" v-if="job_search == 2 && type_id == 3">
- <el-checkbox v-model="allResume" label="" @change="toggleAllResume" />
- </div>
- <div class="society_head_right_all_box" v-if="job_search == 2 && type_id == 3">
- 全选
- </div>
- <!-- <div class="society_head_right_a" title="" v-if="job_search == 1 && type_id == 1"
- @click="getjob">申请职位</div> -->
- <div class="society_head_right_a" v-if="job_search == 2 && type_id == 3"
- @click="talkResume">沟通简历</div>
- </div>
- </div>
- <div class="phone_box_1 pc_none">
- <div class="phone_box_1_head">
- <a title="">招人才</a>
- </div>
- </div>
- <!-- 选项卡头 -->
- <!-- 选项卡 -->
- <div class=" clearfix">
- <!-- 找工作 -->
- <!-- <div class=" clearfix" v-show="job_search == 1">
- <div class="cruit_ul_2 clearfix" v-if="job_vacancy">
- <div class="cruit_li_2 clearfix" v-for="(item, index) in job_vacancy" :key="item.id">
- <div class="society_inp_checkbox_box_li_1 hand" v-if="type_id == 1">
- <el-checkbox v-model="selectedJobs" :value="item.id" @change="jobChange" />
- </div>
- <NuxtLink class="cruit_li_2_a" :href="`/${item.pinyin}/${item.id}.html`" title="">
- <div class="cruit_li_2_head_box clearfix">
- <div class="cruit_li_2_head clearfix dot1">{{ item.title }}</div>
- <div class="cruit_li_2_head_name clearfix dot1">
- {{ item.business_name }}
- </div>
- </div>
- <div class="cruit_li_2_foot_title_box clearfix">
- <span class="cruit_li_2_foot_title">{{ item.jtzw_name }}</span>
- </div>
- <div class="cruit_li_2_foot clearfix">
- <span class="cruit_li_2_foot_tag cruit_li_2_foot_addres">
- {{ item.city_name }}
- </span>
- <span class="cruit_li_2_foot_tag cruit_li_2_foot_exper"
- v-if="item.experience_name || item.education_name">
- <span class="cruit_li_2_foot_tag_in">{{ item.experience_name }}</span>
- <span class="cruit_li_2_foot_tag_in">{{ item.education_name }}</span>
- </span>
- <span class="cruit_li_2_foot_tag cruit_li_2_foot_time">
- {{ getTime(item.updated_at, 'year', 1) }}
- </span>
- </div>
- </NuxtLink>
- </div>
- </div>
- <div class="pagination" v-if="zptotal">
- <el-pagination size="small" background layout="prev, pager, next" :total="zptotal"
- class="mt-4" prev-text="上一页" next-text="下一页" @change="changePage" />
- </div>
- <div class="empty" v-if="job_vacancy == false">
- <img src="@/public/topic/empty.png" alt="" class="empty_img">
- <span class="empty_text">当前暂无数据</span>
- </div>
- </div> -->
- <!-- 找工作 -->
- <!-- 招人才 -->
- <div class=" clearfix" v-show="job_search == 2">
- <div class="society_ul_3 clearfix" v-if="job_resume">
- <div class="society_li_3 clearfix" v-for="(item, index) in job_resume" :key="item">
- <div class="society_inp_checkbox_box_li_3 hand" v-if="type_id == 3">
- <el-checkbox v-model="selectedResume" :value="item.id" @change="jobChange" />
- </div>
- <NuxtLink class="society_li_3_a" :href="`/${item.pinyin}/${item.id}.html`" title="">
- <div class="society_li_3_head_box clearfix">
- <div class="society_li_3_head clearfix dot1">
- {{ item.name }}
- </div>
- <div class="society_li_3_head_name clearfix dot1">
- {{ item.jtzw_name }}
- </div>
- </div>
- <div class="society_li_3_text_box clearfix">
- <div class="society_li_3_text">
- {{ item.sexy == 1 ? '男' : '女' }}
- <em class="point">·</em>
- </div>
- <div class="society_li_3_text" v-if="item.experience">
- {{ item.experience }}年
- <em class="point">·</em>
- </div>
- <div class="society_li_3_text">
- {{ item.origin }}
- <em class="point">·</em>
- </div>
- <div class="society_li_3_text">{{ item.hy_name }}</div>
- </div>
- <div class="society_li_3_tag_box clearfix">
- <span class="society_li_3_tag">{{ item.city_name }}</span>
- <span class="society_li_3_tag">
- {{ getTime(item.updated_at, 'year', 1) }}
- </span>
- </div>
- </NuxtLink>
- </div>
- </div>
- <div class="pagination pagination_phone_none" v-if="qztotal">
- <el-pagination size="small" background layout="prev, pager, next" :total="qztotal"
- class="mt-4" prev-text="上一页" next-text="下一页" @change="changePage" />
- </div>
- <div class="pagination pagination_pc_none" v-if="qztotal">
- <el-pagination
- pager-count="5"
- size="small"
- background
- layout="pager"
- :default-page-size="pageSize"
- :total="qztotal"
- class="mt-4"
- @current-change="changePage"
- />
- </div>
- <div class="empty" v-if="job_resume == false">
- <img src="@/public/topic/empty.png" alt="" class="empty_img">
- <span class="empty_text">当前暂无数据</span>
- </div>
- </div>
- <!-- 招人才 -->
- </div>
- <!-- 选项卡 -->
- </section>
- <!-- 招聘职位 -->
- <!-- <div class="cruit_alert_box">投递成功</div> -->
- </main>
- <!-- 弹框 -->
- <section class="cruit_alert_rgb clearfix" v-if="resumeBoo">
- <!-- 请选择要沟通的职位1 -->
- <!-- <div class="cruit_alert_rgb_box">
- <div class="cruit_alert_rgb_head_box">
- <div class="cruit_alert_rgb_close hand back100"></div>
- <div class="cruit_alert_rgb_head">请选择要沟通的职位</div>
- </div>
- <form class="cruit_alert_rgb_form clearfix" action=" " method=" ">
- <div class="cruit_alert_rgb_form_in clearfix">
- <div class="cruit_alert_rgb_li clearfix" v-for="(item, index) in 17" :key="item.id">
- <input name="type" type="checkbox" value="" class="cruit_alert_rgb_checkbox hand" />
- <label
- class="cruit_alert_rgb_label dot1">高级PHP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程HP工程师</label>
- </div>
- </div>
- <div class="cruit_alert_rgb_foot clearfix">
- <input class="cruit_alert_rgb_foot_sub hand" name="" type="submit" value="沟通职位">
- </div>
- </form>
- </div> -->
- <!-- 请选择要沟通的职位2 -->
- <!-- 请选择要投递的简历1 -->
- <div class="cruit_alert_rgb_box">
- <div class="cruit_alert_rgb_head_box">
- <div class="cruit_alert_rgb_close hand back100"></div>
- <div class="cruit_alert_rgb_head">请选择要沟通的岗位
- <span class="close" @click="resumeBoo = false">x</span>
- </div>
- </div>
- <form class="cruit_alert_rgb_form clearfix" action=" " method=" ">
- <div class="cruit_alert_rgb_form_in clearfix">
- <div class="cruit_alert_rgb_li clearfix" v-for="(item, index) in companyJobList"
- :key="item.id">
- <el-radio :value="item.id" v-model="company_job" @change="jobChange">
- <div class="cruit_alert_rgb_label dot1">
- {{ item.title }}
- </div>
- </el-radio>
- </div>
- </div>
- <div class="cruit_alert_rgb_foot clearfix">
- <div class="cruit_alert_rgb_foot_sub hand" @click="getresume">沟通岗位</div>
- </div>
- </form>
- </div>
- <!-- 请选择要投递的简历2 -->
- </section>
- </main>
- <!-- 页面底部 -->
- <HomeFoot1></HomeFoot1>
- </div>
- </template>
- <script setup>
- //1.页面必备依赖 start ---------------------------------------->
- import { ElSelect, ElOption, ElInput, ElButton, ElPagination, ElCheckbox, ElRadio, ElMessage } from 'element-plus';
- import { ref, onMounted, watch } from 'vue';
- import { useRoute } from 'vue-router'
- //当前列表名称
- const name = ref('')
- const selectedJobs = ref([])
- const selectedResume = ref([])
- const company_job = ref('')
- const allJob = ref(false)
- const allResume = ref(false)
- const job_search = ref(2) // 选项卡
- const { $webUrl, $CwebUrl, $BwebUrl } = useNuxtApp()
- //格式化跳转路径
- const getLinkPathDetail = (item) => {
- if (item.islink == 1) {
- return `${item.linkurl}`;
- } else {
- //return `/${item.aLIas_pinyin}/${item.id}`;
- //return `/newsDetail/${item.id}`
- return `/${item.pinyin}/${item.id}.html`;
- }
- }
- const nuxtApp = useNuxtApp();
- const axios = nuxtApp.$axios;
- //1.页面必备依赖 end ---------------------------------------->
- //1.获得路由id start ---------------------------------------->
- const route = useRoute();
- const hyid = ref(route.query.hyid);
- const zwid = ref(route.query.zwid);
- const jtzwid = ref(route.query.jtzwid);
- const provinceid = ref(route.query.provinceid);
- const cityid = ref(route.query.cityid);
- const keyword = route.query.keywords;
- let articleId = 0;//路由id
- let pageNum = ref(2);
- let total = ref(0);
- let zptotal = ref(0);
- let qztotal = ref(0);
- const page = ref(1)
- const pageSize = ref(15);
- let hyIndex = ref(1);
- let zwIndex = ref(1);
- let jtzwIndex = ref(1);
- //获得当前的完整路径
- const fullPath = route.path;
- //拆分,取出来中间这一段,然后提取数字部分
- const segments = fullPath.split('/');
- const targetSegment = segments[2];
- const targetRoute = segments[1];
- // console.log('111222', targetRoute);
- //const numberPart = targetSegment.match(/\d+$/)?.[0];
- //let routeId = 20 //排除路径错误可以打开这个
- //articleId = numberPart;
- //通过导航路径反向查询导航id
- const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
- method: 'GET',
- query: {
- 'pinyin': targetRoute,
- },
- });
- // console.log("111222333", getRouteId);
- if (getRouteId.code == 200) {
- articleId = getRouteId.data.category_id
- } else {
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- console.log("错误位置:通过url路径查询导航池id")
- console.log("后端错误反馈:", getRouteId.message)
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- }
- //获得html前的数字
- // const pageUrl = segments[3];
- // const pageNumber = pageUrl.split('.')[0];
- // console.log("当前URL中的页码:")
- // console.log(pageNumber)//2
- // pageNum.value = parseInt(pageNumber);
- pageNum.value = parseInt(route.params.id);
- // 创建个人简历
- let createResume = () => {
- window.open($BwebUrl + '/#/addJobHunting', '_blank');
- }
- // 发布招聘信息
- let createJob = () => {
- window.open($BwebUrl + '/#/creatJob', '_blank');
- }
- //1.获得路由id end ---------------------------------------->
- //2.页面数据 start ---------------------------------------->
- // 2.1.1 获取省份
- const province = ref('') //省
- const city = ref('') //市
- const provinceList = ref([]) //省列表
- const cityList = ref([]) //市列表
- const getArea = await requestDataPromise('/web/selectWebsiteArea', {
- method: 'GET',
- query: {},
- });
- if (getArea.code == 200) {
- provinceList.value = getArea.data;
- }
- // 2.1.2
- // 获取省份和城市
- const provinceChange = (val) => {
- provinceid.value = val;
- city.value = '';
- console.log('获取到的省份id', val);
- getCity(val)
- }
- const getCity = async (value) => {
- const getCity = await requestDataPromise('/web/selectWebsiteArea', {
- method: 'GET',
- query: {
- 'pid': value,
- },
- });
- if (getCity.code == 200) {
- cityList.value = getCity.data;
- }
- }
- // 带参数跳转 省份和城市的回显问题
- if (provinceid.value) {
- for (let i = 0; i < provinceList.value.length; i++) {
- if (provinceList.value[i].id == provinceid.value) {
- province.value = provinceList.value[i].id;
- }
- }
- const getCity = await requestDataPromise('/web/selectWebsiteArea', {
- method: 'GET',
- query: {
- 'pid': provinceid.value,
- },
- });
- if (getCity.code == 200) {
- cityList.value = getCity.data;
- }
- if (cityid.value) {
- for (let i = 0; i < cityList.value.length; i++) {
- if (cityList.value[i].id == cityid.value) {
- city.value = cityList.value[i].id;
- }
- }
- }
- }
- // 2.2.1 行业和职位
- const keywords = ref('') //关键词
- const industry_categoryList = ref([]) //行业类别列表
- const position_categoryList = ref([]) //职位类别列表
- const positionList = ref([]) //具体职位列表
- const getData = async () => {
- const getData = await requestDataPromise('/web/getWebsiteJobSelect', {
- method: 'GET',
- query: {},
- });
- if (getData.code == 200) {
- // console.log("获取到的分类数据:", getData.data);
- industry_categoryList.value = getData.data.hy; //行业
- position_categoryList.value = getData.data.zw; //职位
- if (zwid.value == 0 || zwid.value == '' || zwid.value == undefined || zwid.value == null) {
- positionList.value = getData.data.jtzw; //具体职位
- }
- }
- }
- getData()
- const job_vacancy = ref('') // 招聘岗位
- const job_resume = ref('') // 简历
- if (keyword) {
- keywords.value = keyword
- }
- const getJob = async () => {
- const getJob = await requestDataPromise('/web/getWebsiteJobList', {
- method: 'GET',
- query: {
- 'catid': articleId,
- 'city_id': provinceid.value,
- 'hy_id': hyid.value,
- 'zw_id': zwid.value,
- 'jtzw_id': jtzwid.value,
- 'page': page.value,
- 'pageSize': pageSize.value,
- 'keyword': keywords.value,
- },
- });
- if (getJob.code == 200) {
- // console.log("获取到的岗位和简历:", getJob.data);
- job_vacancy.value = getJob.data.JobRecruiting; // 招聘岗位
- job_resume.value = getJob.data.JobHunting; // 简历
- zptotal.value = getJob.data.recruit_count;
- qztotal.value = getJob.data.hunt_count;
- }
- }
- getJob()
- let hyChange = (val) => {
- console.log('hyChange', val)
- hyid.value = val;
- getJob()
- }
- let zwChange = async (val) => {
- console.log('zwChange', val)
- zwid.value = val;
- const getPosition = await requestDataPromise('/web/getPositionList', {
- method: 'GET',
- query: {
- 'zwpid': val,
- },
- })
- console.log("11112222", getPosition);
- if (getPosition.code == 200) {
- positionList.value = getPosition.data; //具体职位
- } else {
- positionList.value = []; //具体职位
- jtzwid.value = 0; //职位id
- }
- getJob()
- }
- let jtzwChange = (val) => {
- console.log('jtzwChange', val)
- jtzwid.value = val;
- getJob()
- }
- // 搜索
- const goSearch = async () => {
- const getJob = await requestDataPromise('/web/getWebsiteJobList', {
- method: 'GET',
- query: {
- 'catid': articleId,
- 'city_id': provinceid.value,
- 'hy_id': hyid.value,
- 'zw_id': zwid.value,
- 'jtzw_id': jtzwid.value,
- 'page': page.value,
- 'pageSize': pageSize.value,
- 'keyword': keywords.value,
- },
- });
- console.log("111获取到的岗位和简历:", getJob.data);
- if (getJob.code == 200) {
- job_vacancy.value = getJob.data.JobRecruiting; // 招聘岗位
- job_resume.value = getJob.data.JobHunting; // 简历
- zptotal.value = getJob.data.recruit_count;
- qztotal.value = getJob.data.hunt_count;
- }
- }
- //2.2change事件
- let jobChange = (val) => {
- console.log('jobChange', val)
- console.log('jobChange111', selectedJobs.value)
- console.log('jobChange111', selectedResume.value)
- console.log('jobChange11122', company_job.value) //企业会员的职位
- if (selectedJobs.value.length == job_vacancy.value.length) {
- allJob.value = true;
- } else {
- allJob.value = false;
- }
- if (selectedResume.value.length == job_resume.value.length) {
- allResume.value = true;
- } else {
- allResume.value = false;
- }
- }
- let toggleAllJob = () => {
- if (allJob.value) {
- selectedJobs.value = job_vacancy.value.map(item => item.id);
- } else {
- selectedJobs.value = [];
- }
- }
- let toggleAllResume = () => {
- if (allResume.value) {
- selectedResume.value = job_resume.value.map(item => item.id);
- } else {
- selectedResume.value = [];
- }
- }
- //分页事件
- let changePage = (value) => {
- console.log("当前页码", value);
- navigateTo(`/${targetSegment}/${value}.html`)
- }
- //申请职位
- let getjob = async () => {
- if (selectedJobs.value.length == 0) {
- ElMessage({
- message: '请选择要申请的职位',
- type: 'warning',
- });
- } else {
- // getWebsiteJobApply
- const getJobList = await requestDataPromise('/web/getWebsiteJobApply', {
- method: 'POST',
- body: {
- 'website_id': website_id.value,
- 'recruit_id': selectedJobs.value,
- }
- })
- if (getJobList.code == 200) {
- ElMessage({
- message: '投递成功',
- type: 'success',
- });
- } else {
- ElMessage({
- message: getJobList.message,
- type: 'error',
- });
- }
- }
- }
- //沟通简历
- let talkResume = () => {
- if (selectedResume.value.length == 0) {
- ElMessage({
- message: '请选择要沟通的简历',
- type: 'warning',
- });
- return false;
- } else {
- resumeBoo.value = true;
- }
- // resumeBoo.value = true;
- }
- // 沟通简历
- let resumeBoo = ref(false)
- let getresume = () => {
- axios.post('/web/getWebsiteJobResume', {
- website_id: website_id.value,
- recruit_id: company_job.value,
- hunt_id: selectedResume.value,
- }).then(res => {
- if (res.code == 200) {
- ElMessage({
- message: '投递成功',
- type: 'sussess',
- });
- resumeBoo.value = false;
- } else {
- ElMessage({
- message: res.message,
- type: 'error',
- });
- resumeBoo.value = false;
- }
- company_job.value = '';
- selectedResume.value = [];
- job_search.value = 2;
- allResume.value = false;
- })
- }
- // //2.3获得页面名称
- // let getPageName = async () => {
- // const pageName = await requestDataPromise('/web/getOneWebsiteCategory', {
- // method: 'GET',
- // query: {
- // 'catid': articleId
- // },
- // });
- // console.log('11122233344',pageName);
- // if (pageName.code == 200) {
- // name.value = pageName.data.alias
- // } else {
- // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- // console.log("错误位置:设置页面标题")
- // console.log("后端错误反馈:", pageName.message)
- // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- // }
- // }
- // //获得列表
- // getPageName();
- //2.页面数据 end ---------------------------------------->
- //3.二级栏目 start ---------------------------------------->
- //3.1通过id获取一级栏目
- const parent_name = ref([]);
- const parent_id = ref([]);
- const parent_pinyin = ref("");
- let getParentNav = async () => {
- const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
- method: 'GET',
- query: {
- 'catid': articleId
- },
- });
- // console.log("1112223334455", listData.data);
- if (listData.code == 200) {
- // console.log(111999)
- console.log(listData.data);
- parent_name.value = listData.data.alias;
- parent_id.value = listData.data.category_id;
- parent_pinyin.value = listData.data.aLIas_pinyin;
- } else {
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- console.log("错误位置:获取新闻列表")
- console.log("后端错误反馈:", listData.message)
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- }
- getSecondNav();
- }
- //获得父级栏目详情
- getParentNav();
- // 3.2获取二级栏目
- const secondNav = ref([]);
- let getSecondNav = async () => {
- const listData = await requestDataPromise('/web/getWebsiteModelCategory', {
- method: 'GET',
- query: {
- 'placeid': 1,
- 'pid': parent_id.value,
- 'num': 8,
- },
- });
- console.log('listData', listData);
- if (listData.code == 200) {
- secondNav.value = listData.data;
- } else {
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- console.log("错误位置:获取新闻列表")
- console.log("后端错误反馈:", listData.message)
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- }
- }
- //3.二级栏目 end ---------------------------------------->
- //4.设置seo信息 start---------------------------------------->
- //4.1 设置seo信息
- const setData = await requestDataPromise('/web/getWebsiteCategoryHead', {
- method: 'GET',
- query: {
- 'catid': articleId
- },
- });
- if (setData.code == 200) {
- let seoTitle = setData.data.seo_title;
- let seoDescription = setData.data.seo_description;
- let seoKeywords = setData.data.seo_keywords;
- let seoSuffix = setData.data.suffix;
- let seoName = setData.data.website_name;
- useSeoMeta({
- title: seoTitle + "_" + seoName + "_" + seoSuffix,
- meta: [
- { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
- { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
- { name: 'viewport', content: 'width=device-width,initial-scale=1,user-scalable=no',tagPriority: 10 }
- ]
- });
- } else {
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- console.log("错误位置:设置列表页面SEO数据")
- console.log("后端错误反馈:", setData.message)
- console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- }
- //4.设置seo信息 end---------------------------------------->
- //5.广告 start---------------------------------------->
- let adImg1 = ref({});
- let adImg2 = ref({});
- onMounted(async () => {
- //从客户端获取行政职能部门 加快打开速度
- const { $webUrl, $CwebUrl } = useNuxtApp();
- //广告1
- let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_search_0001`
- const responseAd1 = await fetch(url, {
- headers: {
- 'Content-Type': 'application/json',
- 'Userurl': $CwebUrl,
- 'Origin': $CwebUrl
- }
- });
- const resultAd1 = await responseAd1.json();
- adImg1.value = resultAd1.data[0];
- //广告2
- let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=nmgw_list_0002`
- const responseAd2 = await fetch(url2, {
- headers: {
- 'Content-Type': 'application/json',
- 'Userurl': $CwebUrl,
- 'Origin': $CwebUrl
- }
- });
- const resultAd2 = await responseAd2.json();
- adImg2.value = resultAd2.data[0];
- })
- //5.广告 end---------------------------------------->
- //获取用户信息
- let type_id = ref('')
- let website_id = ref('')
- let getUserInfo = () => {
- axios.get("/user/getUserInfo").then(response => {
- console.log("gettypeid", response.data);
- console.log("gettypeid_website_id", response.data.website_id);
- type_id.value = response.data.type_id
- website_id.value = response.data.website_id
- companyJOb()
- })
- }
- //获取当前企业会员的职位
- const companyJobList = ref([])
- let companyJOb = () => {
- axios.post("/web/getWebsiteJobRecruiting", {
- 'pageSize': pageSize.value,
- 'website_id': website_id.value,
- }).then(response => {
- console.log("gettypeid_获取到的企业会员的职位:", response.data);
- companyJobList.value = response.data
- })
- }
- onMounted(() => {
- getUserInfo()
- })
- </script>
- <style lang="less" scoped>
- @import url('@/assets/css/zgzpsearch.less');
- .empty {
- width: 100%;
- height: 150px;
- line-height: 150px;
- text-align: center;
- }
- .empty_img {
- vertical-align: -30px;
- margin-right: 20px;
- }
- .empty_text {
- font-size: 26px;
- color: #999;
- }
- </style>
-
- <style lang="less" scoped>
- @media screen and (min-width:801px){/*pc*/
-
- .pagination_pc_none{display:none;}
- .pc_none{display:none;}
- }
- @media screen and (max-width:800px){/*ipad_phone*/
-
- .index_main{width:100%;margin-top:0px;}
- .index_3{margin-top:0px;}
- .color_main{margin-bottom:30px;}
- .phone_box_1 {
- width: 92%;
- margin: 0px auto 0px;
- .phone_box_1_head {
- height: 50px;
- line-height: 50px;
- background: #fff;
- border-bottom: 1px solid #E6E6E6;
- width: 100%;
- a {
- float: left;
- height: 50px;
- line-height: 50px;
- margin: 0;
- position: relative;
- color: #489d97;
- font-size: 18px;
- font-weight: bold;
- box-sizing: border-box;
- position: relative;
- padding-left: 8px;
- }
- a::before {
- content: '';
- display: block;
- position: absolute;
- left: 0px;
- top: 18px;
- background: linear-gradient(to top, #0998A9, #6ADDD6);
- width: 3px;
- height: 15px;
- }
- }
- }
-
-
- .phone_form{
- width:92%;
- margin: 5px auto 0px;
- padding-bottom:8px;
-
- }
- .phone_form_tip{
- }
- .phone_form_tip_1 :deep(.el-select){
- margin:0px;
-
- }
- .phone_form_tip_1 :deep(.el-select:nth-of-type(2)){
- margin:0px 2%;
- box-sizing:border-box;
- }
- :deep(.el-select__wrapper){
- margin:5px 0px; padding:4px 4px 4px 8px;
- font-size:12px;box-sizing:border-box;
-
- }
- .phone_form_tip_2 :deep(.el-select){
- margin-right:2%;
- }
-
- :deep(.el-input){
- font-size:12px;
- }
- :deep(.el-button){
- border:solid 1px #ddd;
- color:#fff;float:right;margin:5px 0px 0px 0px;
- font-size:12px;
- }
- .phone_form{
- width:92%;
- margin: 5px auto 0px;
- padding-bottom:8px;
-
- }
- .phone_form_tip{
- }
- .phone_form_tip_1 :deep(.el-select){
- margin:0px;
-
- }
- .phone_form_tip_1 :deep(.el-select:nth-of-type(2)){
- margin:0px 2%;
- box-sizing:border-box;
- }
- :deep(.el-select__wrapper){
- margin:5px 0px; padding:4px 4px 4px 8px;
- font-size:12px;box-sizing:border-box;
-
- }
- .phone_form_tip_2 :deep(.el-select){
- margin-right:2%;
- }
-
- :deep(.el-input){
- font-size:12px;
- }
- :deep(.el-button){
- border:solid 1px #ddd;
- color:#fff;float:right;margin:5px 0px 0px 0px;
- font-size:12px;
- }
- .phone_form_tip_1:deep(.el-select__placeholder.is-transparent){color:#000;}
-
-
- :deep(.pagination .el-pagination.is-background .el-pager li){ margin:0px 4px;}
- .society_ul_3{ margin-top:11px;}
- .society_li_3{float:none;width:92%;margin:0px auto 11px!important; }
- .society_li_3_head{font-size:18px;margin-left:0px;}
- .society_li_3_text_box{margin-top:10px;margin-left:0px;}
- .society_li_3_text{font-size:12px;}
- .society_li_3_tag_box{margin:10px auto 15px;}
- .society_li_3_tag{ font-size:12px; }
- .pagination{width:100%;margin-bottom:0px;}
- .pagination_phone_none{display:none;}
- .phone_none{display:none;}
- }
- </style>
|