1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459 |
- <template>
- <div class="autoBox box" style="min-height: 900px; position: relative">
- <div class="slideShow" style="margin-top: 10px">
- <div style="width: 100%; height: 300px">
- <img
- v-if="$i18n.locale == 'zh'"
- src="../../assets/img/ResourceSharing/bannerZh.jpg"
- alt=""
- style="width: 100%; height: 100%"
- />
- <img
- v-else
- src="../../assets/img/ResourceSharing/bannerEn.jpg"
- alt=""
- style="width: 100%; height: 100%"
- />
- </div>
- </div>
- <div class="mainBody">
- <div
- class="researchClassify"
- style="width: 100%; border: 1px solid white; box-sizing: border-box"
- >
- <div class="option">
- <div style="display: inline-block">
- <span
- :class="classifySel1 == -1 ? 'active' : ''"
- style="font-size: 16px; padding: 0 7px; font-weight: 600"
- @click="cliRecommend"
- >{{ $t("common.resource") }}</span
- >
- <span
- v-for="(item, index) in classify1"
- :class="index == classifySel1 ? 'active' : ''"
- style="padding: 0 8px"
- :style="{ fontSize: $i18n.locale == 'zh' ? '16px' : '14px' }"
- s
- :key="item.value"
- @click="dataChangeByType1(item, index)"
- >{{ item.label }}</span
- >
- <!--<span :class="classifySel1==-1?'active':''"
- style="font-size: 16px;"
- :style="{marginRight:language=='zh'?'40px':'30px',fontSize:language=='zh'?'16px':'14px'}"
- @click="dataChangeByType1(-1)"
- >{{$t('common.resource')}}</span>
- <span
- v-for="(item,index) in classify1" :class="index==classifySel1?'active':''"
- style="font-size: 16px;"
- :style="{marginRight:language=='zh'?'30px':'16px',fontSize:language=='zh'?'16px':'14px'}"
- :key="item.value"
- @click="dataChangeByType1(item,index)"
- >{{item.label}}</span>-->
- </div>
- <div class="rankSearchPub">
- <div class="rank">
- <span
- :class="rankActive == 0 ? 'active' : ''"
- style="margin-right: 25px"
- @click="dataChangeByTime1"
- >{{ $t("common.resourceAccordingTime") }}
- </span>
- <span
- :class="rankActive == 1 ? 'active' : ''"
- style="margin-right: 25px"
- @click="dataChangeByHeat1"
- >{{ $t("common.resourceAccordingHeat") }}
- </span>
- </div>
- <div
- class="search"
- style="width: 104px; margin-top: 0; margin-bottom: 0"
- >
- <!--<input type="text" style="width: 270px;" :placeholder="$t('common.resourceInputName')" onkeydown="dataChangeByName1" v-model="searchText1">-->
- <!--<el-input v-model="searchText1" :placeholder="$t('common.resourceInputName')" @change="dataChangeByName1" style="width: 103px;"></el-input>-->
- <el-input
- v-model="searchText1"
- @change="dataChangeByName1"
- style="width: 104px"
- ></el-input>
- <i
- style="
- position: absolute;
- right: 0;
- margin: 18px 8px 0 0;
- opacity: 0.5;
- "
- class="el-icon-search"
- @click="dataChangeByName1"
- ></i>
- </div>
- <!--我要发布-->
- <div class="publishing">
- <span
- style="color: #0091ff; font-size: 12px; line-height: 30px"
- @click="toResultsIssue"
- >{{ $t("common.resourceWantRelease") }}</span
- >
- </div>
- </div>
- </div>
- </div>
- <div style="width: 98%; overflow: hidden; margin: auto">
- <div
- v-show="cursorList1.length == 0 || cursorList1.length == undefined"
- style="
- text-align: center;
- height: 60px;
- border-bottom: 1px solid #eee;
- border-top: 1px solid #eee;
- "
- >
- <span v-show="language == 'en'" style="line-height: 60px"
- >no data</span
- >
- <span v-show="language == 'zh'" style="line-height: 60px"
- >暂无数据</span
- >
- </div>
- <div
- v-for="(item, index) in cursorList1"
- class="cursor"
- :style="{
- 'margin-left': index % 3 == 0 ? '0' : '2.5%',
- 'margin-right': index % 3 == 2 ? '0' : '2.5%',
- }"
- @click="toDetails(item, index)"
- >
- <div
- v-if="
- item.informationVisibleStatus == 'Y' && item.reserveFive !== 1
- "
- style="
- width: 60px;
- height: 44px;
- position: absolute;
- top: 0;
- right: 0;
- "
- >
- <!-- <span style="background: red">会员</span>-->
- <img
- v-show="$i18n.locale == 'zh'"
- src="@/assets/img/ResourceSharing/vipzh.png"
- alt=""
- style="width: 100%"
- />
- <img
- v-show="$i18n.locale == 'en'"
- src="@/assets/img/ResourceSharing/vipen.png"
- alt=""
- style="width: 100%"
- />
- </div>
- <!--推荐-->
- <div
- v-if="item.reserveFive && item.reserveFive == 1"
- style="
- width: 60px;
- height: 44px;
- position: absolute;
- top: 0;
- right: 0;
- z-index: 1;
- "
- >
- <!-- <span style="background: red">会员</span>-->
- <img
- v-show="$i18n.locale == 'zh'"
- src="@/assets/img/ResourceSharing/recommendzh.png"
- alt=""
- style="width: 100%"
- />
- <img
- v-show="$i18n.locale == 'en'"
- src="@/assets/img/ResourceSharing/recommenden.png"
- alt=""
- style="width: 100%"
- />
- </div>
- <div style="box-sizing: border-box; height: 100%">
- <div
- style="
- width: 85%;
- height: 288px;
- margin: 10px auto 10px auto;
- text-align: center;
- "
- >
- <!-- <img :src="item.researchResultCover" alt="">-->
- <div
- v-if="
- item['researchResultCover'] == undefined ||
- item.researchResultCover == false ||
- item.researchResultCover == 'null' ||
- item.researchResultCover == null
- "
- style="width: 208px; height: 288px; margin: auto"
- >
- <div style="width: 208px; height: 288px; position: relative">
- <img
- src="@/assets/img/ResourceSharing/backImage.png"
- alt=""
- style="
- width: 100%;
- height: 100%;
- position: absolute;
- top: 0;
- left: 0;
- "
- />
- <p
- style="
- padding: 35px 9px 0 9px;
- width: 100%;
- height: 135px;
- box-sizing: border-box;
- margin: 0;
- text-align: center;
- position: absolute;
- top: 0;
- left: 0;
- color: #ffffff;
- font-size: 12px;
- display: flex;
- align-items: center;
- justify-content: center;
- "
- :style="{
- wordBreak: $i18n.locale == 'zh' ? 'normal;' : 'keep-all',
- }"
- >
- {{ item.name }}
- </p>
- <!--<p style="padding:110px 7px 0 7px;width:100%;height: 150px;box-sizing: border-box;margin: 0;text-align: center;
- position: absolute;top: 115px;left: 0;color: #002C6C;font-size: 12px;word-break:keep-all; ">{{item.affiliatedUnitName}}</p>-->
- </div>
- </div>
- <!-- <img v-if="item['researchResultCover']==undefined||item.researchResultCover==false||item.researchResultCover==''" src="../../assets/img/ResourceSharing/baogao.png" alt="" style="width: 208px; height: 288px;">-->
- <img
- v-else
- :src="'api/file/pub/' + item.researchResultCover"
- alt=""
- style="width: 208px; height: 288px; border: 1px solid #ccc"
- />
- </div>
- <div style="color: #333333">
- <!--<div style="width: 100%;height: 59px;font-weight: 700; font-size: 20px;text-align: center; ">
- <span style="display: inline-block; width: 5%;margin: 14px 2px;overflow: hidden;">《</span>
- <span style="display: inline-block; max-width:85%;margin: 14px 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
- {{item.name}}
- </span>
- <span style="display: inline-block; width: 5%;margin: 14px 2px;overflow: hidden;">》</span>
- </div>-->
- <div
- style="
- width: 100%;
- height: 60px;
- font-weight: 700;
- font-size: 18px;
- display: flex;
- align-items: center;
- overflow: hidden;
- padding: 14px 8px;
- box-sizing: border-box;
- margin: 14px 0;
- justify-content: center;
- "
- >
- <span
- style="max-width: 100%; overflow: hidden; text-align: center"
- :style="{
- wordBreak: $i18n.locale == 'zh' ? 'normal;' : 'keep-all',
- }"
- class="oneLine"
- >
- {{ item.name }}
- </span>
- </div>
- <!--影响高42px class cursor-->
- <p
- style="
- margin: 0 0 14px 0;
- text-align: center;
- color: #666666;
- height: 28.8px;
- "
- >
- <span
- style="
- font-weight: 400;
- font-size: 16px;
- display: inline-block;
- max-width: 85%;
- height: 24.8px;
- "
- class="oneLine"
- >{{ item.affiliatedUnitName }}</span
- >
- </p>
- <p
- style="
- margin: 14px 0 14px 0;
- color: #1890ff;
- text-align: center;
- height: 21.7px;
- "
- >
- <span
- style="
- font-weight: 400;
- font-size: 16px;
- border: 1px solid #1890ff;
- padding: 2px 14px;
- box-sizing: border-box;
- "
- >{{ item.researchResultType }}</span
- >
- </p>
- <p
- style="margin: 14px 0 16px 0; text-align: center; height: 21px"
- >
- <span style="color: #666666; font-size: 14px">{{
- item.createDate
- }}</span>
- </p>
- <div
- style="
- overflow: hidden;
- width: 100%;
- height: 46px;
- background: #f8f8f8;
- position: absolute;
- bottom: 0;
- left: 0;
- "
- >
- <div style="float: right; line-height: 46px; color: #333333">
- <img
- src="@/assets/img/ResourceSharing/collect.png"
- alt=""
- style="
- width: 16px;
- height: 16px;
- margin: 0 3px 0 15px;
- vertical-align: middle;
- "
- />
- <!-- <i class="el-icon-star-off" style="margin-right: 5px;vertical-align: middle;"></i>-->
- <!-- <span style="margin-right: 15px;vertical-align: middle;">0</span>-->
- <span
- v-if="item.num == 'null' || item.num == null"
- style="margin-right: 30px; vertical-align: middle"
- >0</span
- >
- <span
- v-else
- style="margin-right: 30px; vertical-align: middle"
- >{{ item.num }}</span
- >
- <!-- <i class="el-icon-star-off" style="margin-right: 3px;vertical-align: middle;"></i>-->
- <!-- |<img src="@/assets/img/ResourceSharing/heat.png" alt="" style="width: 16px;height: 16px;margin: 0 3px 0 15px;vertical-align: middle;">-->
- <!-- <span v-if="item.num=='null' || item.num==null" style="margin-right: 30px;vertical-align: middle;">0</span>-->
- <!-- <span v-else style="margin-right: 30px;vertical-align: middle;">{{item.num}}</span>-->
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div
- style="
- width: 100%;
- position: relative;
- height: 100px;
- margin-bottom: 30px;
- "
- v-show="cursorList1.length != 0 && cursorList1.length != undefined"
- >
- <el-pagination
- background
- style="
- height: 80px;
- position: absolute;
- left: 50%;
- top: 100px;
- transform: translate(-50%, -50%);
- "
- :current-page="page.results.currentPage - 0"
- :page-size="page.results.pageSize"
- @current-change="handleCurrentChange1"
- layout="prev, pager, next"
- :page-count="page.results.totalPage - 0"
- ></el-pagination>
- </div>
- </div>
- <el-dialog
- :title="$i18n.locale == 'zh' ? '提示' : 'Reminder'"
- :visible.sync="toViewLogin"
- :width="$i18n.locale == 'zh' ? '500px' : '750px'"
- :height="$i18n.locale == 'zh' ? '300px' : '386px'"
- :before-close="toViewLoginChange"
- >
- <div style="width: 100%; height: 100%">
- <img
- src="@/assets/img/loginTips.png"
- alt=""
- style="width: 180px; height: 180px; margin-left: 20px"
- />
- <div
- style="float: right; margin-right: 20px"
- :style="
- $i18n.locale == 'zh'
- ? 'width: 49%;margin-top: 10px;'
- : 'width: 453px;margin-top: -25px;'
- "
- >
- <div
- style="
- font-size: 20px;
- font-weight: normal;
- color: #333333;
- font-family: HiraginoSansGB-W3, HiraginoSansGB;
- line-height: 40px;
- "
- >
- {{ $t("common.ReminderFirst") }}
- </div>
- <div
- style="
- font-size: 16px;
- font-family: HiraginoSansGB-W3, HiraginoSansGB;
- font-weight: normal;
- color: #666666;
- line-height: 30px;
- "
- >
- {{ $t("common.ReminderSecond") }}
- <span style="color: #0091ff; font-size: 18px">{{ num }}</span>
- {{ $t("common.ReminderThird") }}
- </div>
- <div
- style="
- font-size: 14px;
- font-family: HiraginoSansGB-W3, HiraginoSansGB;
- font-weight: normal;
- color: #666666;
- line-height: 30px;
- "
- >
- {{ $t("common.ReminderForth") }}
- </div>
- <div
- style="
- font-size: 14px;
- font-family: HiraginoSansGB-W3, HiraginoSansGB;
- height: 33px;
- line-height: 60px;
- font-weight: normal;
- color: #0091ff;
- "
- >
- <span
- style="margin-left: 40px"
- class="cursor"
- @click="toView('login')"
- >
- {{ $t("common.ReminderFifth") }}
- </span>
- <span
- style="margin-left: 10px"
- class="cursor"
- @click="toView('Register')"
- >
- {{ $t("common.ReminderSixth") }}
- </span>
- </div>
- </div>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import Base from "@/views/base/Base";
- import { getDicts } from "@/api/dict";
- import {
- getBaseResearchResultViews,
- gatAllCarouselMapPicture,
- getRecommendesearchResultList,
- } from "@/api/research/baseResearchResultView";
- import { getBaseResearchResourcesViews } from "@/api/research/resource/baseResearchResourcesView";
- import { formatDate } from "@/utils/formatUtils";
- export default {
- name: "RealTimeInfoResault",
- data() {
- return {
- num: 5,
- timer: "",
- toViewLogin: false,
- language: this.$i18n.locale,
- params: {
- pageNo: "",
- pageSize: "",
- language: "",
- status: 0,
- name: "",
- researchResultType: "",
- researchResourcesType: "",
- },
- screenIndex: 0, //screen状态
- resourceSharingScreen: [
- {
- label: "common.resource",
- value: "0",
- },
- {
- label: "common.researchResource",
- value: "1",
- },
- ],
- page: {
- results: {
- currentPage: 0, //当前页
- totalPage: "", //页数
- pageNo: 1,
- pageSize: 6,
- language: "",
- status: 0,
- name: "",
- researchResultType: "",
- descStatus: 0,
- reserveTwo: "Y",
- },
- resource: {
- currentPage: 0, //当前页
- totalPage: "", //页数
- pageNo: 1,
- pageSize: 9,
- language: "",
- status: 0,
- name: "",
- researchResourcesType: "",
- descStatus: 0,
- effective: "Y",
- },
- },
- slideShowImg: [],
- // slideShowImgFlag:0,
- classifySel1: -1, //子分类选中
- classifySel2: -1, //子分类选中
- classify1: "",
- screen1: {
- value: "common.Type",
- item: [],
- },
- screen2: {
- value: "common.Type",
- item: [],
- },
- classify2: "",
- rankActive: 0, //时间、热度排行选中
- cursorList1: [],
- cursorList2: [],
- searchText1: "",
- searchText2: "",
- isRecommond: true,
- nowPosition: 0,
- islogin: "",
- };
- },
- created() {
- if (this.$route.query.key) {
- this.screenIndex = this.$route.query.key;
- console.log(this.screenIndex);
- }
- },
- mounted() {
- this.paramsScreen();
- this.gatAllPicture();
- this.initData();
- if (!this.$Cookies.get("token")) {
- this.islogin = false;
- } else {
- this.islogin = true;
- }
- },
- watch: {
- "$i18n.locale"() {
- // this.slideShowImgFlag=0;
- this.slideShowImg = [];
- this.gatAllPicture();
- this.initData();
- },
- screenIndex() {
- this.initData();
- },
- toViewLogin() {
- if (this.toViewLogin == true) {
- this.loginTipsChange();
- }
- },
- },
- methods: {
- initData() {
- this.getClassify();
- },
- paramsScreen() {
- if (this.$route.params.key) {
- this.screenIndex = this.$route.params.key;
- }
- },
- toDetails(item, index) {
- let params = {
- entityId: item.entityId,
- // researchResultFileId:item.researchResultFileId,
- };
- let rpath = {
- name: "resourceSharingDetails",
- query: { key: JSON.stringify(params) },
- };
- sessionStorage.setItem("pathReminder", JSON.stringify(rpath));
- this.toViewQuery("resourceSharingDetails", params);
- },
- toResourceDetails(item, index) {
- let params = {
- entityId: item.entityId,
- };
- let rpath = {
- name: "resourceSharingResourceDetails",
- query: { key: JSON.stringify(params) },
- };
- sessionStorage.setItem("pathReminder", JSON.stringify(rpath));
- this.toViewQuery("resourceSharingResourceDetails", params);
- // this.toView('resourceSharingResourceDetails',params)
- },
- toViewQuery(router, json) {
- this.$router.push({ name: router, query: { key: JSON.stringify(json) } });
- },
- toResultsIssue() {
- if (!this.$Cookies.get("token")) {
- this.toViewLogin = true;
- } else {
- console.log(1111);
- this.toView("resourceform");
- // this.toView('resourceSharingResultsIssue')
- }
- },
- toResourceIssue() {
- if (!this.$Cookies.get("token")) {
- this.toViewLogin = true;
- } else {
- this.toView("resourceform");
- // this.toView('resourceSharingResourceIssue')
- }
- },
- toView(router, json) {
- if (router == "login" || router == "Register") {
- clearInterval(this.timer);
- }
- this.$router.push({ name: router, params: { key: json } });
- },
- screenChange(item, index) {
- this.screenIndex = index;
- this.rankActive = 0;
- this.page = {
- results: {
- currentPage: 0, //当前页
- totalPage: "", //页数
- pageNo: 1,
- pageSize: 6,
- language: "",
- status: 0,
- name: "",
- researchResultType: "",
- descStatus: 0,
- reserveTwo: "Y",
- },
- resource: {
- currentPage: "", //当前页
- totalPage: "", //页数
- pageNo: 1,
- pageSize: 9,
- language: "",
- status: 0,
- name: "",
- researchResourcesType: "",
- descStatus: 0,
- effective: "Y",
- },
- };
- },
- handleCurrentChange1(val) {
- this.page.results.currentPage = val;
- this.page.results.pageNo = val;
- this.initData();
- },
- handleCurrentChange2(val) {
- this.page.resource.currentPage = val;
- this.page.resource.pageNo = val;
- this.initData();
- },
- async getClassify() {
- let that = this;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- that.classify1 = "";
- that.classify2 = "";
- that.screen1.item = [];
- that.screen2.item = [];
- await getDicts(
- "RESEARCH_RESULT_TYPE_DICT,RESEARCH_RESOURCE_TYPE_DICT"
- ).then((result) => {
- if (result.data) {
- that.classify1 = result.data[0];
- // that.screen1.item = result.data[0];
- // let labels = '';
- // if(that.$i18n.locale == 'zh'){
- // labels = '研究成果'
- // }else {
- // labels = 'results'
- // }
- // that.screen1.item.unshift({
- // label: labels,
- // value: null,
- // });
- that.classify2 = result.data[1];
- // that.screen2.item = result.data[1];
- // let labels2 = '';
- // if(that.$i18n.locale == 'zh'){
- // labels2 = '调研资源'
- // }else {
- // labels2 = 'resource'
- // }
- // that.screen2.item.unshift({
- // label: labels2,
- // value: null,
- // });
- this.language = this.$i18n.locale;
- }
- });
- if (this.islogin) {
- // this.getCursorList1();
- this.getCursorListNew();
- this.getCursorList2();
- } else {
- // this.getCursorListNew();
- this.getCursorList1();
- this.getCursorList2();
- }
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- that.classify1 = "";
- that.classify2 = "";
- that.screen1.item = [];
- that.screen2.item = [];
- await getDicts(
- "RESEARCH_RESULT_TYPE_DICT_EN,RESEARCH_RESOURCE_TYPE_DICT_EN"
- ).then((result) => {
- if (result.data) {
- that.classify1 = result.data[0];
- // that.screen1.item = result.data[0];
- // let labels = '';
- // if(that.$i18n.locale == 'zh'){
- // labels = '研究成果'
- // }else {
- // labels = 'results'
- // }
- // that.screen1.item.unshift({
- // label: labels,
- // value: null,
- // });
- that.classify2 = result.data[1];
- // that.screen2.item = result.data[1];
- // let labels2 = '';
- // if(that.$i18n.locale == 'zh'){
- // labels2 = '调研资源'
- // }else {
- // labels2 = 'resource'
- // }
- // that.screen2.item.unshift({
- // label: labels2,
- // value: null,
- // });
- this.language = this.$i18n.locale;
- }
- });
- if (that.islogin) {
- // this.getCursorList1();
- this.getCursorListNew();
- this.getCursorList2();
- } else {
- this.getCursorList1();
- // this.getCursorListNew();
- this.getCursorList2();
- }
- }
- },
- async gatAllPicture() {
- let params = {
- language: this.$i18n.locale.toUpperCase(),
- uploadCarouselMap: "Y",
- };
- gatAllCarouselMapPicture(params).then((resulet) => {
- if (resulet.data) {
- this.slideShowImg = resulet.data.addresses;
- }
- });
- },
- getCursorListNew(descStatus) {
- let that = this;
- that.nowPosition = 0;
- let param = that.page.results;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- if (descStatus == 0 || descStatus == 1) {
- param.descStatus = descStatus;
- }
- getRecommendesearchResultList(param).then((resulet) => {
- let that = this;
- let data = resulet.data;
- if (data.baseResearchResultViews) {
- that.cursorList1 = data.baseResearchResultViews;
- that.cursorList1.forEach((i) => {
- i.createDate = i.createDate
- ? formatDate(i.createDate, "YYYY-MM-DD")
- : "";
- });
- for (let i = 0; i < that.cursorList1.length; i++) {
- for (let o = 0; o < that.classify1.length; o++) {
- if (
- that.cursorList1[i].researchResultType ==
- that.classify1[o].value
- ) {
- that.cursorList1[i].researchResultType =
- that.classify1[o].label;
- }
- }
- }
- }
- if (data.page) {
- that.page.results.totalPage = data.page.totalPage;
- that.page.results.currentPage = data.page.pageNo;
- } else {
- that.page.results.totalPage = "1";
- that.page.results.currentPage = 1;
- }
- });
- },
- getCursorList1(descStatus) {
- let that = this;
- that.nowPosition = 1;
- let param = that.page.results;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- if (descStatus == 0 || descStatus == 1) {
- param.descStatus = descStatus;
- }
- getBaseResearchResultViews(param).then((resulet) => {
- let that = this;
- let data = resulet.data;
- if (data.baseResearchResultViews) {
- that.cursorList1 = data.baseResearchResultViews;
- that.cursorList1.forEach((i) => {
- i.createDate = i.createDate
- ? formatDate(i.createDate, "YYYY-MM-DD")
- : "";
- });
- for (let i = 0; i < that.cursorList1.length; i++) {
- for (let o = 0; o < that.classify1.length; o++) {
- if (
- that.cursorList1[i].researchResultType ==
- that.classify1[o].value
- ) {
- that.cursorList1[i].researchResultType =
- that.classify1[o].label;
- }
- }
- }
- /*if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
- that.cursorList1.forEach((i) => {
- if(i.uploadCarouselMap == 'Y'){
- let arr = {
- name:i.name,
- address:'',
- affiliatedUnitName:i.affiliatedUnitName,
- researchType:i.researchResultType,
- createDate:i.createDate,
- carouselMapAddress:i.carouselMapAddress,
- entityId:i.entityId,
- toView:0,
- }
- that.slideShowImg.push(arr);
- }
- })
- that.slideShowImgFlag++;
- }*/
- }
- if (data.page) {
- that.page.results.totalPage = data.page.totalPage;
- that.page.results.currentPage = data.page.pageNo;
- } else {
- that.page.results.totalPage = "1";
- that.page.results.currentPage = 1;
- }
- });
- },
- getCursorList2(descStatus) {
- let that = this;
- let param = that.page.resource;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- if (descStatus == 0 || descStatus == 1) {
- param.descStatus = descStatus;
- }
- getBaseResearchResourcesViews(param).then((resulet) => {
- let that = this;
- let data = resulet.data;
- if (data.baseResearchResourcesViews) {
- that.cursorList2 = data.baseResearchResourcesViews;
- that.cursorList2.forEach((i) => {
- i.createDate = i.createDate
- ? formatDate(i.createDate, "YYYY-MM-DD")
- : "";
- if (i.researchResourcesMedia) {
- i.researchResourcesMedia = i.researchResourcesMedia.split(",");
- i.researchResourcesMedia = i.researchResourcesMedia[0];
- }
- });
- for (let i = 0; i < that.cursorList2.length; i++) {
- for (let o = 0; o < that.classify2.length; o++) {
- if (
- that.cursorList2[i].researchResourcesType ==
- that.classify2[o].value
- ) {
- that.cursorList2[i].researchResourcesType =
- that.classify2[o].label;
- }
- }
- }
- /*if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
- that.cursorList2.forEach((i) => {
- if(i.uploadCarouselMap == 'Y'){
- let arr = {
- name:i.name,
- address:i.address,
- affiliatedUnitName:i.affiliatedUnitName,
- researchType:i.researchResourcesType,
- createDate:'',
- carouselMapAddress:i.carouselMapAddress,
- entityId:i.entityId,
- toView:1,
- }
- that.slideShowImg.push(arr);
- }
- });
- that.slideShowImgFlag++;
- }*/
- }
- if (data.page) {
- that.page.resource.totalPage = data.page.totalPage;
- that.page.resource.currentPage = data.page.pageNo;
- } else {
- that.page.resource.totalPage = "1";
- that.page.resource.currentPage = 1;
- }
- });
- },
- dataChangeByType1(item, index) {
- let that = this;
- that.nowPosition = 1;
- let param = that.page.results;
- param.pageNo = 1;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- if (item == -1) {
- that.classifySel1 = item;
- param.researchResultType = "";
- } else {
- that.classifySel1 = index;
- param.researchResultType = item.value;
- }
- getBaseResearchResultViews(param).then((resulet) => {
- let data = resulet.data;
- if (data.baseResearchResultViews) {
- that.cursorList1 = data.baseResearchResultViews;
- that.cursorList1.forEach((i) => {
- i.createDate = i.createDate
- ? formatDate(i.createDate, "YYYY-MM-DD")
- : "";
- });
- for (let i = 0; i < that.cursorList1.length; i++) {
- for (let o = 0; o < that.classify1.length; o++) {
- if (
- that.cursorList1[i].researchResultType ==
- that.classify1[o].value
- ) {
- that.cursorList1[i].researchResultType =
- that.classify1[o].label;
- }
- }
- }
- /*if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
- that.cursorList1.forEach((i) => {
- if(i.uploadCarouselMap == 'Y'){
- that.slideShowImg.push(i.carouselMapAddress);
- }
- })
- that.slideShowImgFlag++;
- }*/
- } else {
- that.cursorList1 = {};
- }
- if (data.page) {
- that.page.results.totalPage = data.page.totalPage;
- that.page.results.currentPage = data.page.pageNo;
- } else {
- that.page.results.totalPage = "1";
- that.page.results.currentPage = 1;
- }
- });
- },
- dataChangeByType2(item, index) {
- let that = this;
- that.nowPosition = 1;
- let param = that.page.resource;
- param.pageNo = 1;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- if (item == -1) {
- that.classifySel2 = item;
- param.researchResourcesType = "";
- } else {
- that.classifySel2 = index;
- param.researchResourcesType = item.value;
- }
- getBaseResearchResourcesViews(param).then((resulet) => {
- let data = resulet.data;
- if (data.baseResearchResourcesViews) {
- that.cursorList2 = data.baseResearchResourcesViews;
- that.cursorList2.forEach((i) => {
- i.createDate = i.createDate
- ? formatDate(i.createDate, "YYYY-MM-DD")
- : "";
- if (i.researchResourcesMedia) {
- i.researchResourcesMedia = i.researchResourcesMedia.split(",");
- i.researchResourcesMedia = i.researchResourcesMedia[0];
- }
- });
- for (let i = 0; i < that.cursorList2.length; i++) {
- for (let o = 0; o < that.classify2.length; o++) {
- if (
- that.cursorList2[i].researchResourcesType ==
- that.classify2[o].value
- ) {
- that.cursorList2[i].researchResourcesType =
- that.classify2[o].label;
- }
- }
- }
- /*if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
- that.cursorList2.forEach((i) => {
- if(i.uploadCarouselMap == 'Y'){
- that.slideShowImg.push(i.carouselMapAddress);
- }
- })
- that.slideShowImgFlag++;
- }*/
- } else {
- that.cursorList2 = {};
- }
- if (data.page) {
- that.page.resource.totalPage = data.page.totalPage;
- that.page.resource.currentPage = data.page.pageNo;
- } else {
- that.page.resource.totalPage = "1";
- that.page.resource.currentPage = 1;
- }
- });
- },
- dataChangeByName1(item, index) {
- let that = this;
- let param = that.page.results;
- param.pageNo = 1;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- param.name = that.searchText1;
- getBaseResearchResultViews(param).then((resulet) => {
- let that = this;
- let data = resulet.data;
- if (data.baseResearchResultViews) {
- that.cursorList1 = data.baseResearchResultViews;
- that.cursorList1.forEach((i) => {
- i.createDate = i.createDate
- ? formatDate(i.createDate, "YYYY-MM-DD")
- : "";
- });
- for (let i = 0; i < that.cursorList1.length; i++) {
- for (let o = 0; o < that.classify1.length; o++) {
- if (
- that.cursorList1[i].researchResultType ==
- that.classify1[o].value
- ) {
- that.cursorList1[i].researchResultType =
- that.classify1[o].label;
- }
- }
- }
- /*if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
- that.cursorList1.forEach((i) => {
- if(i.uploadCarouselMap == 'Y'){
- that.slideShowImg.push(i.carouselMapAddress);
- }
- })
- that.slideShowImgFlag++;
- }*/
- } else {
- that.cursorList1 = {};
- }
- if (data.page) {
- that.page.results.totalPage = data.page.totalPage;
- that.page.results.currentPage = data.page.pageNo;
- } else {
- that.page.results.totalPage = "1";
- that.page.results.currentPage = 1;
- }
- });
- },
- dataChangeByName2(item, index) {
- let that = this;
- let param = that.page.resource;
- param.pageNo = 1;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- param.name = that.searchText2;
- getBaseResearchResourcesViews(param).then((resulet) => {
- let that = this;
- let data = resulet.data;
- if (data.baseResearchResourcesViews) {
- that.cursorList2 = data.baseResearchResourcesViews;
- that.cursorList2.forEach((i) => {
- i.createDate = i.createDate
- ? formatDate(i.createDate, "YYYY-MM-DD")
- : "";
- if (i.researchResourcesMedia) {
- i.researchResourcesMedia = i.researchResourcesMedia.split(",");
- i.researchResourcesMedia = i.researchResourcesMedia[0];
- }
- });
- for (let i = 0; i < that.cursorList2.length; i++) {
- for (let o = 0; o < that.classify2.length; o++) {
- if (
- that.cursorList2[i].researchResourcesType ==
- that.classify2[o].value
- ) {
- that.cursorList2[i].researchResourcesType =
- that.classify2[o].label;
- }
- }
- }
- /*if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
- that.cursorList2.forEach((i) => {
- if(i.uploadCarouselMap == 'Y'){
- that.slideShowImg.push(i.carouselMapAddress);
- }
- })
- that.slideShowImgFlag++;
- }*/
- } else {
- that.cursorList2 = {};
- }
- if (data.page) {
- that.page.resource.totalPage = data.page.totalPage;
- that.page.resource.currentPage = data.page.pageNo;
- } else {
- that.page.resource.totalPage = "1";
- that.page.resource.currentPage = 1;
- }
- });
- },
- dataChangeByTime1() {
- console.log("time1");
- let that = this;
- let param = that.page.results;
- param.pageNo = 1;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- this.nowPosition = 0;
- if (this.nowPosition == 0) {
- this.getCursorListNew(0);
- } else {
- this.getCursorList1(0);
- }
- // this.getCursorList1(0)
- this.rankActive = 0;
- },
- dataChangeByHeat1() {
- let that = this;
- let param = that.page.results;
- param.pageNo = 1;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- this.getCursorList1(1);
- this.rankActive = 1;
- },
- dataChangeByTime2() {
- let that = this;
- let param = that.page.resource;
- param.pageNo = 1;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- this.getCursorList2(0);
- this.rankActive = 0;
- },
- dataChangeByHeat2() {
- let that = this;
- let param = that.page.resource;
- param.pageNo = 1;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- this.getCursorList2(1);
- this.rankActive = 1;
- },
- // 判断未登录跳转是否关闭
- toViewLoginChange(done) {
- this.toViewLogin = false;
- this.num = 5;
- clearInterval(this.timer);
- },
- loginTipsChange() {
- const that = this;
- this.num = 5;
- // clearInterval(timer_interval);
- this.timer = setInterval(function () {
- if (that.num > 0) {
- that.num--;
- } else {
- if (that.toViewLogin == true) {
- clearInterval(that.timer);
- that.toView("login");
- } else {
- clearInterval(that.timer);
- }
- }
- }, 1000);
- },
- dataChangeByTypeRecommed(item, index) {
- let that = this;
- that.nowPosition = 0;
- let param = that.page.results;
- // param.pageNo = 1;
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- param.language = "ZH";
- } else if (this.$i18n.locale.toUpperCase() == "EN") {
- param.language = "EN";
- }
- if (item == -1) {
- that.classifySel1 = item;
- param.researchResultType = "";
- } else {
- that.classifySel1 = index;
- param.researchResultType = item.value;
- }
- getRecommendesearchResultList(param).then((resulet) => {
- let data = resulet.data;
- if (data.baseResearchResultViews) {
- that.cursorList1 = data.baseResearchResultViews;
- that.cursorList1.forEach((i) => {
- i.createDate = i.createDate
- ? formatDate(i.createDate, "YYYY-MM-DD")
- : "";
- });
- for (let i = 0; i < that.cursorList1.length; i++) {
- for (let o = 0; o < that.classify1.length; o++) {
- if (
- that.cursorList1[i].researchResultType ==
- that.classify1[o].value
- ) {
- that.cursorList1[i].researchResultType =
- that.classify1[o].label;
- }
- }
- }
- /*if(that.slideShowImgFlag==0||that.slideShowImgFlag==1){
- that.cursorList1.forEach((i) => {
- if(i.uploadCarouselMap == 'Y'){
- that.slideShowImg.push(i.carouselMapAddress);
- }
- })
- that.slideShowImgFlag++;
- }*/
- } else {
- that.cursorList1 = {};
- }
- if (data.page) {
- that.page.results.totalPage = data.page.totalPage;
- that.page.results.currentPage = data.page.pageNo;
- } else {
- that.page.results.totalPage = "1";
- that.page.results.currentPage = 1;
- }
- });
- },
- cliRecommend() {
- if (this.islogin) {
- console.log("11");
- this.dataChangeByTypeRecommed(-1);
- } else {
- console.log("22");
- this.dataChangeByType1(-1);
- }
- },
- },
- };
- </script>
- <style scoped>
- .InfoResault {
- width: 100%;
- }
- .mainBody {
- width: 100%;
- /*margin-top: 10px;*/
- box-sizing: border-box;
- }
- .mainBody .slideShow {
- width: 100%;
- }
- .mainBody .researchClassify {
- cursor: pointer;
- /* margin: 0 20px; */
- /*height: 51px;*/
- overflow: hidden;
- margin: 20px 0 30px 0;
- background-color: #f8f8f8;
- }
- .mainBody .researchClassify .option {
- /*float: left;*/
- height: 51px;
- color: #9b9b9b;
- margin: 0 20px;
- font-size: 16px;
- font-weight: 400;
- line-height: 51px;
- /* padding: 0 10px; */
- box-sizing: border-box;
- }
- .mainBody .researchClassify .option .active {
- color: #6699ff;
- font-weight: 600;
- /*color: #eb8154;*/
- /*background-color: #fbecda;*/
- border-radius: 10px;
- line-height: 20px;
- }
- .mainBody .researchClassify .rankSearchPub {
- float: right;
- height: 56px;
- box-sizing: border-box;
- }
- .mainBody .researchClassify .rankSearchPub .rank {
- float: left;
- height: 51px;
- line-height: 51px;
- font-size: 16px;
- color: rgba(0, 0, 0, 0.65);
- }
- .mainBody .researchClassify .rankSearchPub .rank .active {
- color: #6699ff;
- font-weight: 600;
- /*color: #eb8154;*/
- /*background-color: #fbecda;*/
- border-radius: 10px;
- line-height: 20px;
- }
- .mainBody .researchClassify .rankSearchPub .search {
- float: left;
- width: 103px;
- /*height: 32px;*/
- margin: 10px 15px 9px 0;
- border-radius: 5px;
- position: relative;
- }
- .mainBody .researchClassify .rankSearchPub .search input[type="text"] {
- width: 103px;
- height: 32px;
- border: 1px solid #d9d9d9;
- margin: 0;
- padding: 0 32px 0 5px;
- box-sizing: border-box;
- border-radius: 4px;
- }
- .mainBody .researchClassify .rankSearchPub .search input[type="text"]:focus {
- border: 1px solid #0091ff;
- outline: none;
- }
- .mainBody .researchClassify .rankSearchPub .publishing {
- float: left;
- width: 72px;
- height: 32px;
- line-height: 30px;
- margin: 9px 30px 8px 0;
- /*padding: 0 20px;*/
- box-sizing: border-box;
- border: 1px solid #1890ff;
- color: #1890ff;
- border-radius: 16px;
- text-align: center;
- }
- .mainBody .cursor {
- width: 30%;
- /*height: 525px;*/
- height: 572px;
- border: 1px solid rgba(228, 228, 228, 1);
- float: left;
- margin: 0 2.5% 30px 2.5%;
- box-sizing: border-box;
- position: relative;
- }
- </style>
|