123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834 |
- <template>
- <div class="free-main" id="free-main">
- <div class="free-head">
- <div class="logo">
- <a target="_blank">
- <img src="./img/logo.png">
- </a>
- <div class="text-lf">
- <div>中国(海南)国际贸易单一窗口</div>
- <span>China (HaiNan) International Trade Single Window</span>
- </div>
- <div class="text-rt">中国(海南)国际贸易单一窗口</div>
- </div>
- <div class="login">
- <div class="lg-1">无障碍</div>
- <div>长辈版</div>
- <div class="lg-2"><img width="24" height="24" src="./img/head.png"> <span>张三</span></div>
- </div>
- </div>
- <div class="free-content">
- <div class="top-box">
- <div class="top-item-1"><img src="./img/icon-top-1.png" alt=""></div>
- <!-- <div class="top-item-2">Hainan Free Trade Special Services Zone</div>
- <div class="top-item-3"><img src="./img/icon-top-3.png" alt=""></div> -->
- <div class="search">
- <a-auto-complete
- v-model:value="state.value2"
- :dropdown-match-select-width="252"
- :options="state.options"
- @search="handleSearch"
- style="width: 50%"
- >
- <template #default>
- <a-input
- v-model:value="state.value2"
- placeholder="请输入关键字进行查询"
-
- >
- <template #addonAfter>
- <div class="search-img">
- <img src="./img/icon-search.png" alt="">
- </div>
- </template>
- </a-input>
- </template>
- <template #option="item">
- <div @click="handleSearchAnchor(item.pId, item.id)" >{{item.value}}</div>
- </template>
- </a-auto-complete>
- </div>
- <div class="top-item-4"><span>热搜词:</span> <span v-for="item,key in state.hotWord" :key=key>{{item}}</span></div>
- <div class="top-item-5">
- <span v-for="item,key in state.itemList" :key=key @click="handleAnchor(`box-${key}`)">
- <img :src="getImg(`icon-${key+1}`)" alt="">
- {{item}}
- </span>
- </div>
- </div>
- <div class="cytj-box" id="box-0">
- <img src="./img/icon-tj.png" alt="">
- <div>
- <span :class="state.recommendVal == key ? 'is-active':'tj-item'" @click="handleRecommend(key)" v-for="item,key in state.cytjList" :key=key>{{item}}</span>
- </div>
- </div>
- <div class="tszq-box" id="box-1">
- <div class="title"><img src="./img/tszq.png" alt=""></div>
- <div class="cards">
- <div class="tab-list">
- <div :class="state.tszqTabVal == 0 ? 'tab-active': ''" @click="state.tszqTabVal = 0">一线出入境</div>
- <div :class="state.tszqTabVal == 1 ? 'tab-active': ''" @click="state.tszqTabVal = 1">岛内</div>
- <div :class="state.tszqTabVal == 2 ? 'tab-active': ''" @click="state.tszqTabVal = 2">二线出岛</div>
- </div>
- <div class="cards-list" v-if="state.tszqTabVal == 0">
- <div class="card-item" v-for="item,key in jsondatas.yxcrjList" :key="key">
- <div class="item-title">
- <img :src="getImg(`yx-${key+1}`)" alt="">
- {{item.title}}
- </div>
- <div class="item-content">
- <span
- v-for="el,idx in item.child"
- :key="idx" :id="el.id"
- @click="handleLink(el.url, el.id)"
- :class="state.currentKey == el.id? 'keyColor': ''">
-
- <a-tooltip>
- <template #title>{{el.value}}</template>
- {{el.value}}
- </a-tooltip>
- </span>
- </div>
- </div>
- </div>
- <div class="cards-list" v-if="state.tszqTabVal == 1">
- <div class="card-item" v-for="item,key in jsondatas.dnList" :key="key">
- <div class="item-title">
- <img :src="getImg(`dn-${key+1}`)" alt="">
- {{item.title}}
- </div>
- <div class="item-content">
- <span
- v-for="el,idx in item.child"
- :key="idx" :id="el.id"
- @click="handleLink(el.url, el.id)"
- :class="state.currentKey == el.id? 'keyColor': ''">
-
- <a-tooltip>
- <template #title>{{el.value}}</template>
- {{el.value}}
- </a-tooltip>
- </span>
- </div>
- </div>
- </div>
- <div class="cards-list" v-if="state.tszqTabVal == 2">
- <div class="card-item" v-for="item,key in jsondatas.excdList" :key="key">
- <div class="item-title">
- <img :src="getImg(`excd-${key+1}`)" alt="">
- {{item.title}}
- </div>
- <div class="item-content">
- <span
- v-for="el,idx in item.child"
- :key="idx" :id="el.id"
- @click="handleLink(el.url, el.id)"
- :class="state.currentKey == el.id? 'keyColor': ''">
-
- <a-tooltip>
- <template #title>{{el.value}}</template>
- {{el.value}}
- </a-tooltip>
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="ywld-box" id="box-2">
- <div class="title"><img src="./img/ywld.png" alt=""></div>
- <img src="./img/ywld-bg.png" alt="">
- </div>
- <div class="ggzq-box" id="box-3">
- <div class="title"><img src="./img/ggzq.png" alt=""></div>
- <div class="cards">
- <div class="cards-list">
- <div class="card-item" v-for="item,key in jsondatas.ggzqList" :key="key">
- <div class="item-title">
- <img :src="getImg(`ggzq-${key+1}`)" alt="">
- {{item.title}}
- </div>
- <div class="item-content">
- <span
- v-for="el,idx in item.child"
- :key="idx" :id="el.id"
- @click="handleLink(el.url, el.id)"
- :class="state.currentKey == el.id? 'keyColor': ''">
-
- <a-tooltip>
- <template #title>{{el.value}}</template>
- {{el.value}}
- </a-tooltip>
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="news-box">
- <div class="news-lf" id="box-4">
- <div class="top-search">
- <div><img src="./img/icon-zx.png" alt=""> <span><img src="./img/zzzx.png" alt=""></span></div>
- <div>
- <a-input
- style="width: 274px"
- v-model:value="state.value2"
- placeholder="请输入关键字进行查询"
- >
- <template #addonAfter>
- <div class="search-img">
- <img src="./img/icon-search-min.png" alt="">
- </div>
- </template>
- </a-input>
- <img src="./img/refresh.png" alt="">
- </div>
- </div>
- <div class="news-item">
- <div v-for="item,key in state.newsList" :key="key" @click="handleNew(item.url)">
- <img src="./img/icon-news.png" alt="">
- <div>
- <a-tooltip>
- <template #title>{{item.title}}</template>
- <div class="news-item-title">
- {{item.title}}
- </div>
- </a-tooltip>
- <div class="news-item-content"><span>时间:{{item.date}}</span> <span>来源:{{item.source}}</span></div>
- </div>
- </div>
- </div>
- <a-pagination
- show-less-items
- v-model:current="state.current1"
- :total="20"
- @change="handleNewsPage"
- />
- </div>
- <div class="news-rt" id="box-5">
- <div class="top-search">
- <div><img src="./img/icon-tz.png" alt=""> <span><img src="./img/tzgg.png" alt=""></span></div>
- <div>
- <a-input
- style="width: 274px"
- v-model:value="state.value2"
- placeholder="请输入关键字进行查询"
- >
- <template #addonAfter>
- <div class="search-img">
- <img src="./img/icon-search-min.png" alt="">
- </div>
- </template>
- </a-input>
- <img src="./img/refresh.png" alt="">
- </div>
- </div>
- <div class="news-item">
- <div v-for="item,key in state.noticeList" :key="key" @click="handleNew(item.url)">
- <img src="./img/icon-news.png" alt="">
- <div>
- <a-tooltip>
- <template #title>{{item.title}}</template>
- <div class="news-item-title">
- {{item.title}}
- </div>
- </a-tooltip>
- <div class="news-item-content"><span>时间:{{item.date}}</span> <span>来源:{{item.source}}</span></div>
- </div>
- </div>
- </div>
- <a-pagination
- show-less-items
- v-model:current="state.current2"
- :total="20"
- @change="handleNoticePage"
- />
- </div>
- </div>
- </div>
- <div class="free-footer"></div>
- </div>
- </template>
- <script setup lang="ts">
- import {getCurrentInstance, reactive, onMounted} from "vue";
- import { useRoute, useRouter } from 'vue-router'
- import jsondatas from './datas.json'
- const {proxy} = getCurrentInstance()
- const router = useRouter()
- function getImg(name) {
- return new URL(`./img/${name}.png`, import.meta.url).href;
- }
- const state: any = reactive({
- value1: '1',
- value2: '',
- options: jsondatas.searchList,
- hotWord: ['申报','放行','海运','税单','资质备案'],
- itemList: [
- '热点推荐',
- '特色专区',
- '业务联动',
- '公共专区',
- '最新资讯',
- '通知公告',
- ],
- cytjList: ['二线出岛零关税货物申报','二线出岛货物申报综合查询','二线出岛货物税单管理','二线出岛业务记账管理','零关税货物管理','企业资质备案','二线业务管理','业务联动'],
- recommendVal: null,
- tszqTabVal: 0,
- current1: 1,
- current2: 1,
- currentKey: '',
- newsList: jsondatas.newsList.slice(0,3),
- noticeList: jsondatas.noticeList.slice(0,3)
- })
- const handleSearch = (val: string) => {
- if(val.length) {
- state.options = jsondatas.searchList.filter(item => item.value.includes(val))
- } else {
- state.options = jsondatas.searchList
- state.currentKey = ""
- }
- };
- const handleLink = (url, id) => {
- state.currentKey = id
- const path = router.resolve({ path: url })
- window.open(path.href, "_blank");
- }
- const handleRecommend = (val) => {
- state.recommendVal = val
- const path = router.resolve({ path: '/hainan-login' })
- window.open(path.href, "_blank");
- }
- const handleNew = (url) => {
- window.open(url, "_blank");
- }
- const handleSearchAnchor = (pId, id) => {
- nextTick(() => {
- state.currentKey = id
- const main = document.getElementById('free-main')
- const isBox = pId.includes('ggzq') ? 'box-3' : 'box-1'
- if(pId.includes('yx')) {
- state.tszqTabVal = 0
- } else if(pId.includes('dn')) {
- state.tszqTabVal = 1
- } else if(pId.includes('ex')) {
- state.tszqTabVal = 2
- }
- const el = document.getElementById(isBox).getBoundingClientRect().top + main.scrollTop - 72
- main.scrollTo({
- top: el,
- behavior: 'smooth'
- });
- })
- }
- const handleAnchor = (id) => {
- const main = document.getElementById('free-main')
- const el = document.getElementById(id).getBoundingClientRect().top + main.scrollTop - 72
- main.scrollTo({
- top: el,
- behavior: 'smooth'
- });
- }
- const handleNewsPage = (page) => {
- if(page == 1) {
- state.newsList = jsondatas.newsList.slice(0,3)
- } else if(page ==2) {
- state.newsList = jsondatas.newsList.slice(3)
- }
- }
- const handleNoticePage = (page) => {
- if(page == 1) {
- state.noticeList = jsondatas.noticeList.slice(0,3)
- } else if(page ==2) {
- state.noticeList = jsondatas.noticeList.slice(3)
- }
- }
- </script>
- <style lang="less" scoped>
- .free-main {
- overflow: auto;
- width: 100%;
- height: 100%;
- position: relative;
- .free-head {
- display: flex;
- padding: 0 23px;
- height: 72px;
- width: 100%;
- position: fixed;
- top: 0;
- z-index: 1999;
- background: rgba(0,0,0,0.2);
- color: #fff;
- .logo {
- flex: 1;
- display: flex;
- align-items: center;
- a {
- text-decoration: none;
- }
- .text-lf {
- margin-left: 10px;
- font-size: 24px;
- // display: inline-block;
- border-right: 1px solid rgba(255,255,255,0.6);
- padding-right: 32px;
- margin-right: 32px;
- }
- span {
- font-size: 12px;
- display: block;
- margin-top: 2px;
- color: rgba(255,255,255,0.6);
- }
- .text-rt {
- font-size: 20px;
- }
- }
- .login {
- display: flex;
- align-items: center;
- div {
- margin: 0 10px;
- cursor: pointer;
- }
- .lg-1 {
- width: 64px;
- height: 30px;
- background: linear-gradient( 90deg, #ED7830 0%, #F19E3E 100%);
- border-radius: 29px 29px 29px 29px;
- text-align: center;
- line-height: 30px;
- }
- .lg-2 {
- span {
- vertical-align: middle;
- position: relative;
- &:after {
- position: absolute;
- content: '';
- background-image: url('./img/icon-up.png');
- background-repeat: no-repeat;
- width: 16px;
- height: 16px;
- top: 3px
- }
- }
- }
- }
- }
- .free-content {
- width: 100%;
- .title {
- font-family: YouSheBiaoTiHei;
- font-weight: 400;
- font-size: 40px;
- color: #303133;
- text-align: center;
- }
- .top-box {
- height: 890px;
- background-image: url('./img/bg.png');
- background-repeat: no-repeat;
- background-size: 100% 100%;
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- color: #fff;
- .top-item-1 {
- font-family: YouSheBiaoTiHei;
- font-weight: 400;
- font-size: 56px;
- color: #000;
- margin-bottom: 48px;
- }
- .top-item-2 {
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 20px;
- color: rgba(255,255,255,0.6);
- }
- .top-item-3 {
- font-family: jiangxizhuokai, jiangxizhuokai;
- font-weight: 400;
- font-size: 24px;
- margin-top: 16px;
- }
- .search {
- width: 100%;
- text-align: center;
- :deep(input) {
- height: 60px;
- border-radius: 4px 0 0 4px;
- border-right: 0;
- }
- :deep(.ant-input-group-addon) {
- background: #fff;
- }
- .search-img {
- cursor: pointer;
- }
- }
- .top-item-4 {
- margin: 10px 0 48px 0;
- span {
- padding-bottom: 1px;
- margin: 0 5px;
- border-bottom: 1px solid #fff;
- cursor: pointer;
- font-size: 14px;
- }
- }
- .top-item-5 {
- display: flex;
- flex-wrap: wrap;
- column-gap: 12px;
- span {
- width: 146px;
- height: 72px;
- line-height: 72px;
- color: #fff;
- text-align: center;
- cursor: pointer;
- border-radius: 4px;
- background-image: url('./img/icon-top-5.png');
- box-shadow: 0px 4px 11px 0px rgba(39,58,104,0.05);
- }
- }
- }
- .cytj-box {
- background-image: url('./img/cytj-bg.png');
- width: 1200px;
- height: 150px;
- margin: 24px auto;
- div {
- display: flex;
- flex-wrap: wrap;
- // justify-content: space-between;
- padding: 0 50px;
- margin-top: 16px;
- span {
- font-size: 16px;
- cursor: pointer;
- width: 20%;
- margin-bottom: 16px;
- }
- >:first-child {
- &::after {
- content: '';
- width: 16px;
- height: 16px;
- background-image: url('./img/hot.png');
- position: absolute;
- }
- }
- }
- .tj-item {
- color: #606266;
- position: relative;
- &::before {
- content: '';
- width: 8px;
- height: 8px;
- background: #D9D9D9;
- position: absolute;
- border-radius: 50%;
- left: -10px;
- top: 5px;
- }
- }
- .is-active {
- color: rgba(46, 129, 255, 1);
- position: relative;
- &::before {
- content: '';
- width: 8px;
- height: 8px;
- background: rgba(46, 129, 255, 1);
- position: absolute;
- border-radius: 50%;
- left: -10px;
- top: 5px;
- }
- }
- }
- .tszq-box {
- background-image: url('./img/tszq-bg.png');
- height: 640px;
- padding: 24px 0;
- .cards {
- margin-top: 34px;
- }
- .tab-list {
- display: flex;
- justify-content: center;
- text-align: center;
- div {
- width: 160px;
- height: 48px;
- line-height: 48px;
- font-size: 18px;
- color: #909399;
- border-radius: 8px 8px 0 0;
- cursor: pointer;
- font-weight: bold;
- }
- .tab-active {
- background: #DDEEFF;
- }
- }
- .cards-list {
- width: 1200px;
- height: 460px;
- margin: 0 auto;
- padding: 16px;
- background: #DDEEFF;
- border-radius: 8px;
- display: flex;
- flex-wrap: wrap;
- column-gap: 12px;
- align-content: space-between;
- justify-content: flex-start;
- .card-item {
- width: 380px;
- height: 200px;
- padding: 20px 16px;
- background: #FFFFFF;
- box-shadow: 0px 4px 10px 0px rgba(40,83,247,0.05);
- border-radius: 8px 8px 8px 8px;
- .item-title {
- font-size: 18px;
- color: #606266;
- font-weight: bold;
- margin-bottom: 12px;
- }
- .item-content {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- overflow: auto;
- height: 130px;
- cursor: pointer;
- &::-webkit-scrollbar {
- /*滚动条整体样式*/
- width : 3px; /*高宽分别对应横竖滚动条的尺寸*/
- height: 3px;
- }
- &::-webkit-scrollbar-thumb {
- /*滚动条里面小方块*/
- border-radius : 5px;
- background-color: rgba(192, 196, 204, 1);
- }
- span {
- width: 166px;
- height: 54px;
- line-height: 54px;
- text-align: center;
- display: inline-block;
- background: #EBF1FF;
- border-radius: 4px;
- font-size: 16px;
- color: #606266;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- margin: 5px 0;
- padding: 0 16px;
- }
- }
- .keyColor {
- color: #2E81FF !important;
- }
- }
- }
- }
- .ywld-box {
- text-align: center;
- margin: 24px 0;
- img {
- margin: 24px 0;
- }
- }
- .ggzq-box {
- background-image: url('./img/ggzq-bg.png');
- padding: 24px 0;
- background-size: cover;
- .cards {
- height: 537px;
- overflow: auto;
- &::-webkit-scrollbar {
- /*滚动条整体样式*/
- width : 5px; /*高宽分别对应横竖滚动条的尺寸*/
- height: 5px;
- }
- &::-webkit-scrollbar-thumb {
- /*滚动条里面小方块*/
- border-radius : 5px;
- background-color: rgba(192, 196, 204, 1);
- }
- }
- .cards-list {
- width: 1200px;
- height: 460px;
- margin: 0 auto;
- padding: 24px;
- // background: #DDEEFF;
- border-radius: 8px;
- display: flex;
- flex-wrap: wrap;
- column-gap: 12px;
- align-content: space-between;
- justify-content: flex-start;
- .card-item {
- width: 373px;
- height: 198px;
- padding: 20px 16px;
- margin: 8px 0;
- background: #FFFFFF;
- box-shadow: 0px 4px 10px 0px rgba(40,83,247,0.05);
- border-radius: 8px 8px 8px 8px;
- .item-title {
- font-size: 18px;
- color: #606266;
- margin-bottom: 12px;
- font-weight: bold;
- }
- .item-content {
- display: flex;
- flex-wrap: wrap;
- justify-content: space-between;
- overflow: auto;
- height: 130px;
- cursor: pointer;
- &::-webkit-scrollbar {
- /*滚动条整体样式*/
- width : 3px; /*高宽分别对应横竖滚动条的尺寸*/
- height: 3px;
- }
- &::-webkit-scrollbar-thumb {
- /*滚动条里面小方块*/
- border-radius : 5px;
- background-color: rgba(192, 196, 204, 1);
- }
- span {
- width: 166px;
- height: 54px;
- line-height: 54px;
- text-align: center;
- display: inline-block;
- background: #EBF1FF;
- border-radius: 4px;
- font-size: 16px;
- color: #606266;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- margin: 5px 0;
- padding: 0 16px;
- }
- .keyColor {
- color: #2E81FF !important;
- }
- }
- }
- }
- }
- .news-box {
- display: flex;
- margin: 56px auto;
- align-items: center;
- flex-wrap: wrap;
- justify-content: space-around;
- width: 1200px;
- .news-lf,.news-rt {
- background-image: url('./img/new-bg.png');
- width: 588px;
- height: 472px;
- padding: 24px;
- position: relative;
- .top-search {
- display: flex;
- >:first-child {
- flex: 1;
- }
- :deep(input) {
- height: 32px;
- border-radius: 4px 0 0 4px;
- border-right: 0;
- }
- :deep(.ant-input-group-addon) {
- background: #fff;
- }
- span {
- font-family: YouSheBiaoTiHei;
- font-weight: 400;
- font-size: 26px;
- color: #303133;
- vertical-align: middle;
- font-weight: bold;
- }
- img {
- margin-left: 10px;
- cursor: pointer;
- }
- }
-
- :deep(.ant-pagination) {
- position: absolute;
- bottom: 24px;
- right: 24px;
- }
- }
- .news-item {
- display: flex;
- flex-direction: column;
- margin: 24px 0;
- max-height: 320px;
- overflow: auto;
- cursor: pointer;
- >div {
- display: flex;
- background: #FFFFFF;
- box-shadow: 0px 4px 10px 0px rgba(40,83,247,0.05);
- border-radius: 4px;
- padding: 16px;
- align-items: center;
- margin: 8px 0;
- img {
- width: 77px;
- height: 58px;
- margin-right: 10px;
- }
- .news-item-title {
- font-weight: bold;
- font-size: 20px;
- color: #303133;
- width: 324px;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .news-item-content {
- color: #909399;
- font-size: 14px;
- margin-top: 10px;
- }
- }
- }
- :deep(.ant-pagination) {
- text-align: right;
- }
- }
- }
- .free-footer {
- height: 274px;
- background-image: url('./img/footer.png');
- background-size: 100% 100%;
- }
- }
- </style>
|