123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 |
- <template>
- <div class="box">
- <banner></banner>
- <div class="content-box">
- <div class="title">SY-CRS-BsAb</div>
- <div class="v-content">
- <el-row :gutter="20">
- <el-col :span="5" :xs="8" v-for="(nav, i) in syList" :key="i" class="list">
- <div class="content" @click="tapProfile(nav)">
- <img class="profile-img" :src="nav.img" />
- <p class="text">{{nav.title}}</p>
- </div>
- </el-col>
- </el-row>
- </div>
-
- <div class="title">Other materials</div>
- <div class="v-content">
- <el-row :gutter="20">
- <el-col :span="5" :xl="6" :lg="6" :md="8" :sm="8" :xs="8" v-for="(nav, i) in list" :key="i" class="list">
- <div class="content" @click="tapProfile(nav)">
- <img class="profile-img" :src="nav.img" />
- <p class="text">{{nav.title}}</p>
- </div>
- </el-col>
- </el-row>
- </div>
- </div>
-
- <div class="pop-up" v-if="popShow">
- <div class="pop_content">
- {{ $t("nav.MaterialsDownload") }
-
- {{ profile.title }
- <div class="pop_img">
- <div class="hea_icon">
- <i @click="downloadPdf(profile.link, profile.title)" class="el-icon-download"></i>
- <i @click="popShow = false" class="el-icon-close icon"></i>
- </div>
- <img class="image" :src="profile.contentImg" alt="">
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import banner from "@/components/banner";
- export default {
- name: "profile",
- components: {
- banner
- },
- data() {
- return {
- list: this.$t("downloadList.list"),
- syList: this.$t("downloadList.syList"),
- popShow: false,
- profile: null
- };
- },
- methods: {
- tapProfile(item) {
- this.popShow = true;
- this.profile = item;
- },
- downloadPdf(pdfUrl, title) {
- console.log(pdfUrl, title);
- const loading = this.$loading({
- lock: true,
- text: this.$t('Download.loading') + '...',
- background: 'rgba(0, 0, 0, 0.7)'
- });
- const xhr = new XMLHttpRequest();
- xhr.open('GET', pdfUrl, true);
- xhr.responseType = 'blob';
- xhr.onload = () => {
- if (xhr.status === 200) {
- const blob = new Blob([xhr.response], { type: 'application/pdf' });
- const url = URL.createObjectURL(blob);
- const link = document.createElement('a');
- link.href = url;
- link.download = title +'.pdf';
- link.click();
- URL.revokeObjectURL(url);
- setTimeout(() => {
- // 关闭Loading
- loading.close();
- }, 1000);
- }
- };
- xhr.send()
- }
- },
- mounted() {},
- created() {
- }
- };
- </script>
- <style lang="scss" scoped>
- @media screen and (min-width: 751px) and (max-width: 9999px) {
- .content-box{
- width: 1200px;
- margin: 40px auto 0;
- .title{
- font-size: 18px;
- font-weight: bold;
- color: #333333;
- margin-bottom: 20px;
- }
- .v-content{
- margin: auto;
- .el-col-5{
- width: 20%;
- }
- .content{
- // height: 310px;
- background: #F4F8FF;
- // border-radius: 20px;
- border-radius: 5px 21px 21px 5px;
- padding:0 10px 10px;
- margin-bottom: 20px;
- cursor: pointer;
- &:hover{
- box-shadow: 0px 0px 18px 0px rgba(0,72,255,0.58);
- }
- .profile-img{
- width: 100%;
- }
- .text{
- font-size: 14px;
- line-height: 20px;
- word-wrap: break-word;
- margin-top: 4px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- }
- }
- }
- .v-one{
- margin-bottom: 20px;
- .content{
- padding: 20px 10px;
- }
- }
- }
- // 弹框
- .pop-up{
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.5);
- z-index: 99999;
- .pop_content{
- max-width: 1200px;
- width: 640px;
- background: #fff;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- padding: 10px;
- .pop_img{
- box-shadow: 0px 0px 18px 0px rgba(0,0,0,0.3);
- // margin-top: 20px;
- border-radius: 20px;
- position: relative;
- .hea_icon{
- position: absolute;
- top: 10px;
- right: 10px;
- color: #035AA8;
- font-size: 28px;
- font-weight: 600;
- cursor: pointer;
- }
- .image{
- display: block;
- width: 100%
- }
- }
- }
- }
- }
- @media screen and (min-width: 0px) and (max-width: 750px) {
- .content-box{
- width: 100%;
- margin: 40px auto 0;
- padding: 0 10px;
- .title{
- font-size: 18px;
- font-weight: bold;
- color: #333333;
- margin-bottom: 20px;
- }
- .v-content{
- margin: auto;
- // .el-col-5{
- // width: 33.%;
- // }
- .content{
- // height: 310px;
- background: #F4F8FF;
- // border-radius: 20px;
- border-radius: 5px 21px 21px 5px;
- padding:0 10px 10px;
- margin-bottom: 20px;
- cursor: pointer;
- &:hover{
- box-shadow: 0px 0px 18px 0px rgba(0,72,255,0.58);
- }
- .profile-img{
- width: 100%;
- }
- .text{
- font-size: 14px;
- line-height: 20px;
- word-wrap: break-word;
- margin-top: 4px;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
- }
- }
- }
- .v-one{
- margin-bottom: 20px;
- .content{
- padding: 20px 10px;
- }
- }
- }
- // 弹框
- .pop-up{
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background: rgba(0, 0, 0, 0.5);
- z-index: 99999;
- .pop_content{
- width:90%;
- background: #fff;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- padding: 10px;
- .pop_img{
- box-shadow: 0px 0px 18px 0px rgba(0,0,0,0.3);
- // margin-top: 20px;
- border-radius: 20px;
- position: relative;
- .hea_icon{
- position: absolute;
- top: 10px;
- right: 10px;
- color: #035AA8;
- font-size: 20px;
- font-weight: 600;
- cursor: pointer;
- }
- .image{
- display: block;
- width: 100%
- }
- }
- }
- }
- }
- </style>
|