| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417 |
- <template>
- <main class="panel_main">
- <div class="panel_head_box">
- <span class="panel_head_btn" @click="close_panel_btn_fun"></span>
- <h4 class="panel_head_h4">网站地图</h4>
- </div>
- <section class="panel_long clearfix">
- <div class="panel_main_in">
- <div class="panel_box ">
-
- <div class="panel_a_box ">
- <!-- {{navigation1}} -->
- <NuxtLink class="panel_a_btn dot1" :to="'/'">首页</NuxtLink>
-
- <NuxtLink class="panel_a_btn dot1"
- v-for="(per_obj,per_index) in navigation1"
- @click="getLinkPath(per_obj)" title=""
- :key="per_obj">
-
- {{per_obj.alias}}
- </NuxtLink>
-
- </div>
- </div>
-
- </div>
- </section>
- </main>
- </template>
- <script setup>
-
-
- // 注入全局导航数据
- // const navigation1 = useState('globalNavData')
- const navigation1 = ref("");
- async function getPageData2() {
- const mkdata = await requestDataPromise('/web/getWebsiteModelCategory', {
- method: 'GET',
- query: {
- 'placeid': 1,
- 'pid': 0,
- 'num': 999
- },
- });
- navigation1.value = mkdata.data;
- }
- getPageData2()
- const panelVisible = useState('panelVisible')
- // 关闭面板
- const close_panel_btn_fun = () => {
- panelVisible.value = false
- }
- //3.职能部门 start ---------------------------------------->
- let department = ref("")
- const depValue = ref("")
- // let departmentList = async () => {
- // const mkdata = await requestDataPromise('/web/selectWebsiteDepartment', {
- // method: 'GET',
- // query: {
- // 'keyword': department.value,
- // },
- // });
- // if(mkdata.code == 200){
- // department.value = mkdata.data;
- // }else{
- // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- // console.log("错误位置:获取职能部门")
- // console.log("后端错误反馈:",mkdata.message)
- // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- // }
- // }
- // //获得所有部门
- // departmentList();
- //3.职能部门 end ---------------------------------------->
- //4.展示行政区划 start ---------------------------------------->
- //let areaList = ref("")
- //4.1 省
- let province = ref("")
- let provinceid = ref("")
- let provinceList = ref("")
- // const provinceList = useState('globalProvinceData')
- //4.2 市
- let city = ref("")
- let cityid = ref("")
- let cityList = ref("")
- //4.3 县
- let region = ref("")
- //let regionid = ref("")
- let regionList = ref("")
- //选择省
- // let areaArrList = async () => {
- // const mkdata = await requestDataPromise('/web/selectWebsiteArea', {
- // method: 'GET',
- // query: {},
- // });
- // if(mkdata.code == 200){
- // provinceList.value = mkdata.data;
- // }else{
- // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- // console.log("错误位置:获取行政区划")
- // console.log("后端错误反馈:",mkdata.message)
- // console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
- // }
- // }
- // //一开始只需要获取一下省
- // areaArrList();
- //选择市
- let change = async (id) => {
- provinceid.value = id;
- const shengData = await requestDataPromise('/web/selectWebsiteArea', {
- method: 'GET',
- query: {
- 'pid': id,
- },
- });
- cityList.value = shengData.data;
- }
- //选择县
- let change1 = async (id) => {
- cityid.value = id;
- const xianData = await requestDataPromise('/web/selectWebsiteArea', {
- method: 'GET',
- query: {
- 'pid': id,
- },
- });
- regionList.value = xianData.data;
- }
- //4.展示行政区划 end ---------------------------------------->
- //5.执行搜索 start ---------------------------------------->
- const getcityid = ref("")
- //跳转到搜索页面
- // let goToSearch = (id) => {
- // console.log(id)
- // const route = `/search/search?catids=${id}`;
- // window.location.href = route;
- // }
- //获得cityid和
- let goToPrimary = async () => {
- if (province.value != "") { getcityid.value = province.value }
- if (city.value != "") { getcityid.value = city.value }
- if (region.value != "") { getcityid.value = region.value }
- if (province.value == "" && city.value == "" && region.value == "" && depValue.value == "") {
- ElMessage.error('请选择行政区划或者职能部门!')
- } else {
- // const responseStatus = await requestDataPromise('/web/selectWebsiteCategory', {
- // method: 'GET',
- // query: {
- // 'cityid': getcityid.value,
- // 'department_id': depValue.value
- // },
- // });
- // if (responseStatus.data.catid && responseStatus.data.catid.length > 0) {
- // const catids = responseStatus.data.catid.join(',');
- // const route = `/search/search?catids=${catids}`;
- // window.location.href = route;
- // } else {
- // // 可以在这里处理数组为空的情况
- // console.log('没有可用的分类ID');
- // const route = `/search/search`;
- // window.location.href = route;
- // }
- const route = `/search/search?catids=${getcityid.value}&department_id=${depValue.value}`;
- window.location.href = route;
- }
- }
- //5.执行搜索 end ---------------------------------------->
- onMounted(async () => {
- //从客户端获取行政职能部门 加快打开速度
- try {
- const { $webUrl, $CwebUrl } = useNuxtApp();
- const response = await fetch($webUrl + '/web/selectWebsiteDepartment', {
- headers: {
- 'Content-Type': 'application/json',
- 'Userurl': $CwebUrl,
- 'Origin': $CwebUrl
- }
- });
- const result = await response.json();
- department.value = result.data;
- } catch (error) {
- console.error('获取部门数据失败:', error);
- }
- //从客户端获取行政区划
- try {
- const { $webUrl, $CwebUrl } = useNuxtApp();
- const response2 = await fetch($webUrl + '/web/selectWebsiteArea', {
- headers: {
- 'Content-Type': 'application/json',
- 'Userurl': $CwebUrl,
- 'Origin': $CwebUrl
- }
- });
- const result2 = await response2.json();
- provinceList.value = result2.data;
- } catch (error) {
- console.error('获取行政区划数据失败:', error);
- }
- })
- const getLinkPath = (item) => {
- panelVisible.value = false
- // close_panel_btn_fun()
- let the_path;
- if (item.is_url == 1) {
- the_path = `${item.web_url}`;
- // return `${item.web_url}`;
- } else if (item.alias == '招工招聘') { //招工招聘
- the_path = `/${item.aLIas_pinyin}/index.html`
- // return `/${item.aLIas_pinyin}/index.html`;
- } else if (item.alias == '农民工求职') { //农民工求职
- the_path = `/${item.aLIas_pinyin}/index.html`
- // return `/${item.aLIas_pinyin}/index.html`;
- } else if (item.alias == '人力资源库') { //人力资源库
- the_path =`/${item.aLIas_pinyin}/index.html`;
- // return `/${item.aLIas_pinyin}/index.html`;
- } else if (item.children_count == 0) {
-
- the_path =`/${item.aLIas_pinyin}/list-1.html`
- // return `/${item.aLIas_pinyin}/list-1.html`;
- } else {
- the_path = `/${item.aLIas_pinyin}/index.html`;
- // return `/${item.aLIas_pinyin}/index.html`;
- }
-
- const { $router } = useNuxtApp();
- $router.push(the_path);
- }
-
- import { watch } from 'vue'
- onMounted(() => {
-
- const delayTimer_hid = ref(null);//延迟器
- delayTimer_hid.value = setTimeout(() => {
-
- watch(panelVisible, (newValue, oldValue) => {
-
- // 根据panelVisible的状态执行不同操作
- if (newValue) {
- document.body.classList.add("body_hid")
- } else {
- // 面板隐藏时的操作
- document.body.classList.remove('body_hid')
- }
- })
-
- }, 333);
-
- })
- </script>
- <style lang="less" scoped>
- @import url('@/assets/css/public/nav.less');
- </style>
- <style lang="less" scoped>
- @media screen and (max-width:800px){/*ipad_phone*/
- .dot1{word-break: keep-all; white-space: nowrap;overflow:hidden;text-overflow:ellipsis;
- }
-
- .select{overflow:hidden;height:auto;line-height:normal;}
- .select .inner{width:96%;margin:0px auto;overflow:hidden;height:auto; }
- .select .role{padding:0;height:auto;overflow:hidden;float:none;}
- .select .role .searchRole{box-sizing:border-box;width:333px; float:left;margin-left:0px;}
- .select .el-select{width:230px!important;}
- .select .role .searchRole em{margin:4px 10px;float:right;}
-
- .select .role > .title, .select .region > .title{float:none;font-size:18px;}
- .select .region{overflow:hidden;height:auto;float:none;}
- .select .region .searchRole{float:none;padding:10px 0;width:90%;margin:5px;height:auto;}
- .select .region .el-select{margin-left:17px;}
- .select .region em{margin-left:22px;}
- .panel_main{
- position:fixed;
- top:0px;
- left:0px;
- width:100%;
- height:100%;
- background:#F6F6F6;
- z-index:1999;
- overflow:hidden;
- }
- .panel_head_box{
- width:97%;margin:0px auto 4px;
- height:50px;border-bottom:1px solid #b8b8b8;
-
- text-align:center;position:relative;
- }
- .panel_long{
- height:100%;
- overflow:auto;
- }
- .panel_head_h4{height:50px;line-height:50px;display:inline-block;
- font-size:22px;color:#333;text-align:center;}
- .panel_head_btn{float:right;width:22px;height:22px; top:12px;
- position:absolute;right:0px;
- background:url('../../public/image/guanbi1.png') no-repeat center center;
- background-size:100% 100%;
- }
- .panel_main_in{width:96%;margin:0px auto;padding-bottom:66px;}
- .panel_box{}
- .panel_name_box{
- width:100%;
- height:44px;
-
- }
- .panel_name{
- float:left;font-weight:bold;
- height:44px;
- line-height:44px;
- font-size:16px;
- color:#333;
- // padding-left:20px;
- }
-
-
- .panel_a_box{
- width:100%;
- overflow:hidden;
- margin-bottom:10px;
-
- }
-
- .panel_box_line{
- border-bottom:1px solid #ddd;
- }
- .panel_a_btn{
- float:left;
- width:23%;margin: 2% 1%;box-sizing:border-box;text-align:center;
- height:44px;
- line-height:44px;
- font-size:12px;
- color:#333;
- padding:0 4px;background:#F6F6F6;border:solid 1px #ddd;
- }
- .panel_a_btn_2{
- float:left;
- width:14%;margin:4px 1.3%;box-sizing:border-box;text-align:center;
- height:33px;
- line-height:33px;
- font-size:14px;
- color:#333;
- padding:0 8px;background:#F6F6F6;border:solid 1px #ddd;
- }
-
- }
- </style>
-
- <style>
- @media screen and (min-width:801px){/*pc*/
-
-
- .pc_none{display:none;}
- }
- @media screen and (max-width:800px){/*ipad_phone*/
-
- .body_hid{
- overflow:hidden;
- }
- .phone_none{display:none;}
- }
- </style>
|