RealTimeInfoMoreInfo.vue 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137
  1. <template>
  2. <div class="autoBox box"
  3. style="min-height: 600px">
  4. <div class="message"
  5. id="message">
  6. <ul class="realTimeInfo_scree"
  7. :class="messageBarFixed ? 'isFixed' :''">
  8. <li style="display: block;"
  9. :class="index==realTimeInfoScreenItem?'span1 cursor':'span2 cursor'"
  10. v-for="(i,index) in realTimeInfo_scree"
  11. :style="$i18n.locale=='zh' || index==0 ?'text-align:center;':''"
  12. @click="realTimeInfoScreensChange(i,index)">
  13. <span style="margin-right: 5px;"
  14. :style="$i18n.locale=='zh' || index==0 ?'text-align:center;':'margin-left:15px'">
  15. <img :src="getIconUrl(index)"
  16. alt=""
  17. v-if="index!==0"
  18. style="vertical-align: middle;width: 28px;height:28px;">
  19. </span>
  20. {{i.label=='common.LatestNews'?$t('common.LatestNews'):i.label}}
  21. </li>
  22. </ul>
  23. </div>
  24. <div style="width: 690px;float: left;padding-left: 10px;">
  25. <div class="serch">
  26. <div style="color: #2C558A;margin-right: 20px;padding-bottom: 10px;
  27. border-bottom: 1px solid #869bb6;font-weight: 700;height: 100px;position: relative;">
  28. <span style="position: absolute;bottom: 9px;left: 0;">
  29. {{label==null?$t('common.LatestNews'):realTimeInfoScreeMap[label]?realTimeInfoScreeMap[label]:$t('common.AllNews')}}
  30. </span>
  31. <!--滚动快讯-->
  32. <div class="ScrollExpress" v-if="isZh" :key="'zh'">
  33. <div class="express">{{$t('common.ScrolltoExpress')}}</div>
  34. <!-- 滚动快讯-->
  35. <div class="scrollBox1" v-if="scrollNewsList.length>0" ref="goodSwiper">
  36. <div class="swiper-banner swiper_vertical" id="swiper_vertical">
  37. <div class="swiper-wrapper swiper-wrapper-vertical swiper_vertical">
  38. <div class="swiper-slide swiper_vertical" v-for="(item,index1) in scrollNewsList" :key="index1">
  39. <div>
  40. <div class="type">
  41. <span> {{realTimeInfo_scree_zh[item.typeDict].label}}</span>
  42. </div>
  43. <div style="float: left;margin-left: 10px">
  44. <span>{{formatDate(item.publishDate,'HH:mm')}}</span>
  45. </div>
  46. <p class="text1">
  47. <span class="scrollName small red">{{item.title}}</span>
  48. </p>
  49. </div>
  50. <div style="clear:both;"></div>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="ScrollExpress" v-if="isZh == false" :key="'en'">
  57. <div class="express">{{$t('common.ScrolltoExpress')}}</div>
  58. <!-- 滚动快讯-->
  59. <div class="scrollBox2" v-if="scrollNewsList.length>0" ref="goodSwiper">
  60. <div class="swiper-banner swiper_vertical" id="swiper_vertical">
  61. <div class="swiper-wrapper swiper-wrapper-vertical swiper_vertical">
  62. <div class="swiper-slide swiper_vertical" v-for="(item,index2) in scrollNewsList" :key="index2">
  63. <div>
  64. <div class="type">
  65. <span> {{realTimeInfo_scree_en[item.typeDict].label}}</span>
  66. </div>
  67. <div style="float: left;margin-left: 10px">
  68. <span>{{formatDate(item.publishDate,'HH:mm')}}</span>
  69. </div>
  70. <p class="text2">
  71. <span class="scrollName small red">{{item.title}}</span>
  72. </p>
  73. </div>
  74. <div style="clear:both;"></div>
  75. </div>
  76. </div>
  77. </div>
  78. </div>
  79. </div>
  80. <el-input :placeholder="$t('common.EnterContent')"
  81. v-model="title"
  82. maxlength="50"
  83. show-word-limit
  84. class="input-with-select"
  85. style="width: 650px;margin-left: 85px;">
  86. <el-button class="cursor"
  87. slot="append"
  88. type="primary"
  89. @click="getData(title)">{{$t('common.Search')}}</el-button>
  90. </el-input>
  91. </div>
  92. <!--全部资讯-->
  93. <div class="cursor"
  94. style="padding: 10px 0 0 0px;border-bottom: 1px solid #eee;"
  95. v-for="(item,index) in initList"
  96. @click="toView('realTimeInfoItemdetails',item.baseEntityId)">
  97. <div v-if="item.pictureUrl"
  98. style="width: 126px;float:left;overflow: hidden;">
  99. <img :src="'api/file/pub/' + item.pictureUrl"
  100. alt=""
  101. style="width: 126px;height: 82px;"
  102. class="mouseItemImg">
  103. </div>
  104. <div v-if="item.pictureUrl"
  105. style="float: right;width: 540px;overflow: hidden;margin: 0 10px;">
  106. <div style="color: #333;font-weight: 700;font-size: 18px;margin-bottom: 10px;">
  107. {{item.title}}
  108. <div class="isnewdata newLine1" v-if="nowDate == formatDate(item.publishDate) && $i18n.locale == 'zh'">new</div>
  109. <div class="isnewdata newLine2" v-if="nowDate == formatDate(item.publishDate) && $i18n.locale == 'en'">new</div>
  110. <div style="clear: both"></div>
  111. </div>
  112. <div style="color: #333;font-size: 14px;
  113. -webkit-box-orient: vertical;
  114. position:relative;
  115. line-height:1.4em;
  116. overflow: hidden;
  117. height:2.8em;"
  118. class="plate">{{item.content}}</div>
  119. <div style="color: #999999;;line-height: 38px;font-size: 12px;">
  120. <span>{{item.auther?item.auther:''}}</span>
  121. <span style="float: right;margin-right: 10px;">{{formatDate(item.publishDate)}}</span>
  122. </div>
  123. </div>
  124. <div v-else
  125. style="overflow: hidden;margin: 0px 10px;">
  126. <div style="color: #333;font-weight: 700;font-size: 18px;margin-bottom: 10px;">
  127. {{item.title}}
  128. <div class="isnewdata newLine1" v-if="nowDate == formatDate(item.publishDate) && $i18n.locale == 'zh'">new</div>
  129. <div class="isnewdata newLine2" v-if="nowDate == formatDate(item.publishDate) && $i18n.locale == 'en'">new</div>
  130. <div style="clear: both"></div>
  131. </div>
  132. <div style="color: #333;font-size: 14px;
  133. -webkit-box-orient: vertical;
  134. position:relative;
  135. line-height:1.4em;
  136. overflow: hidden;
  137. height:2.8em;"
  138. class="plate"
  139. v-html="item.content"></div>
  140. <div style="color: #999999;;line-height: 38px;font-size: 12px;">
  141. <span>{{item.auther?item.auther:''}}</span>
  142. <span style="float: right;margin-right: 10px;">{{formatDate(item.publishDate)}}</span>
  143. </div>
  144. </div>
  145. <div style="clear: both;"></div>
  146. </div>
  147. </div>
  148. </div>
  149. <div style="width: 300px;float: left;margin-top: 59px;">
  150. <!-- 最新动态 -->
  151. <!-- <div style="padding-top: 35px;">-->
  152. <!-- <div style="color: #2C558A;margin-top: 20px;padding-bottom: 10px;-->
  153. <!-- border-bottom: 1px solid #869bb6;font-weight: 700;">-->
  154. <!-- <div class="newsTitle title1" @click="changeTitle(0)">{{$t('common.LatestDevelopment')}}</div>-->
  155. <!-- </div>-->
  156. <!-- &lt;!&ndash;最新动态&ndash;&gt;-->
  157. <!-- <div style="padding: 5px 0 0 0;"-->
  158. <!-- class="cursor"-->
  159. <!-- v-for="(item,index) in newsActiveList"-->
  160. <!-- @click="toView('realTimeInfoLatetDevelopment',item.businessId)">-->
  161. <!-- <div style="width: 100%;">-->
  162. <!-- <div style="color: #333;font-size: 16px;margin-bottom: 10px;line-height: 29px;">-->
  163. <!-- <span class="hotInfoIndex">{{index+1}}</span> {{item.title}}-->
  164. <!-- </div>-->
  165. <!-- </div>-->
  166. <!-- </div>-->
  167. <!-- </div>-->
  168. <!-- 热点新闻和最新推荐 -->
  169. <div style="padding-top: 35px;">
  170. <div style="color: #2C558A;margin-top: 20px;padding-bottom: 10px;
  171. border-bottom: 1px solid #869bb6;font-weight: 700;">
  172. <div class="newsTitle" :class="titleIndex == 0?'title1':'title2'" @click="changeTitle(0)" v-if="islogin">{{$t('common.IntelligentRecommendation')}}</div>
  173. <div class="newsTitle" :class="islogin?titleIndex == 1?'title1':'title2':'title1'" @click="changeTitle(1)">{{$t('common.hotnews')}}</div>
  174. </div>
  175. <!-- 最新推荐-->
  176. <div style="padding: 5px 0 0 0;"
  177. class="cursor"
  178. v-show="islogin && titleIndex == 0 "
  179. v-for="(item,index) in newRecommonList"
  180. @click="toView('realTimeInfoItemdetails',item.baseEntityId)">
  181. <div style="width: 100%;">
  182. <div style="color: #333;font-size: 16px;margin-bottom: 10px;line-height: 29px;">
  183. <span class="hotInfoIndex">{{index+1}}</span> {{item.title}}
  184. </div>
  185. </div>
  186. </div>
  187. <!--热点新闻-->
  188. <div style="padding: 5px 0 0 0;"
  189. class="cursor"
  190. v-show="!islogin || titleIndex == 1 "
  191. v-for="(item,index) in hotNews"
  192. @click="toView('realTimeInfoItemdetails',item.baseEntityId)">
  193. <div style="width: 100%;">
  194. <div style="color: #333;font-size: 16px;margin-bottom: 10px;line-height: 29px;">
  195. <span class="hotInfoIndex">{{index+1}}</span> {{item.title}}
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. <!-- 点击排行 -->
  201. <div>
  202. <div style="color: #2C558A;margin-top: 20px;padding-bottom: 10px;
  203. border-bottom: 1px solid #869bb6;font-weight: 700;">
  204. <span class="title1 newsTitle" v-if="$i18n.locale == 'zh'">{{$t('common.ClickRank')}}</span>
  205. <span class="title1 newsTitle" v-if="$i18n.locale == 'en'" style="width:30%!important;">{{$t('common.ClickRank')}}</span>
  206. <div style="float: right;font-weight: 500;margin-top: 5px">
  207. <span @click="changeClikRange('1')"
  208. :style="curClickType =='1'?'background-color: #0079ef;color:#fff':'background-color: white;'"
  209. style="cursor: pointer;padding: 5px 8px;border-radius: 8px;">{{$t('common.infoDay')}}</span>
  210. <span> • </span>
  211. <span @click="changeClikRange('2')"
  212. :style="curClickType =='2'?'background-color: #0079ef;color:#fff':'background-color: white;'"
  213. style="cursor: pointer;padding: 5px 8px;border-radius: 8px;">{{$t('common.infoWeek')}}</span>
  214. <span> • </span>
  215. <span @click="changeClikRange('3')"
  216. :style="curClickType =='3'?'background-color: #0079ef;color:#fff':'background-color: white;'"
  217. style="cursor: pointer;padding: 5px 8px;border-radius: 8px;">{{$t('common.infoMonth')}}</span>
  218. </div>
  219. </div>
  220. <div style="padding: 5px 0 0 0;"
  221. class="cursor"
  222. v-for="(item,index) in hitsList"
  223. v-if="informationMap[item]"
  224. @click="toView('realTimeInfoItemdetails',informationMap[item].baseEntityId)">
  225. <div style="width: 100%;">
  226. <div style="color: #333;font-size: 16px;margin-bottom: 10px;line-height: 29px;"
  227. v-if="!showMoreFlag && index < 5">
  228. <span class="hotInfoIndex">{{index+1}}</span> {{informationMap[item]?informationMap[item].title:''}}
  229. </div>
  230. <div style="color: #333;font-size: 16px;margin-bottom: 10px;line-height: 29px;"
  231. v-if="showMoreFlag">
  232. <span class="hotInfoIndex">{{index+1}}</span> {{informationMap[item]?informationMap[item].title:''}}
  233. </div>
  234. </div>
  235. </div>
  236. <span style="display: block;text-align: right;color: #7d7de1;"
  237. class="cursor show-more dept-btn zk"
  238. @click="showMore()">{{!showMoreFlag?$t('common.More'):$t('common.pickUp')}}
  239. <i :class="!showMoreFlag?'fa fa-angle-down':'fa fa-angle-up'"></i>
  240. </span>
  241. </div>
  242. <!-- 资讯 -->
  243. <!-- <div style="position: relative;height:331px "
  244. v-show="$i18n.locale=='zh'">
  245. <img src="@/assets/img/realTimeInfo/zixun.png"
  246. width="100%"
  247. height="300px"
  248. style="position: absolute;left: 0;top: 0;"
  249. alt="">
  250. <div style="color: #0091FF;margin-top: 20px;padding-bottom: 10px;position: absolute;left: 0;top: 0;
  251. font-weight: 700;padding-left: 15px;">{{$t('common.News')}}
  252. </div>
  253. <div style="padding: 5px 0 0 15px;font-weight: normal;color: #333333;
  254. line-height: 26px;font-size: 14px; position: absolute;left: 0;top: 50px;"
  255. class="cursor">
  256. 基于智能爬虫和自动化翻译技术,以联合国环境署、环球时报、中华人民共和国商务部等
  257. <span style="color: #0091FF;font-weight: 700;">1700</span>
  258. 余个全球主要新闻资讯
  259. 网站为数据来源,采集政治外交、经济社会、能源电力、气候环境等新闻资讯
  260. <span style="color: #0091FF;font-weight: 700;">150</span>
  261. 万余条。
  262. </div>
  263. <div style="color: #0091FF;margin-top: 20px;padding-bottom: 1px;position: absolute;left: 0;top: 180px;
  264. margin-left: 15px;font-size: 14px;border-bottom: 1px solid #0091FF;"
  265. class="cursor"
  266. @click="openPDF(1)">
  267. 资讯网站采集列表
  268. </div>
  269. <div style="color: #0091FF;margin-top: 20px;padding-bottom: 1px;position: absolute;left: 0;top: 210px;
  270. margin-left: 15px;font-size: 14px;border-bottom: 1px solid #0091FF;"
  271. class="cursor"
  272. @click="openPDF(2)">
  273. 资讯分类
  274. </div>
  275. </div>
  276. <div style="position: relative;height:279px "
  277. v-show="$i18n.locale=='zh'">
  278. <img src="@/assets/img/realTimeInfo/shuju.png"
  279. width="100%"
  280. height="300px"
  281. style="position: absolute;left: 0;top: 0;"
  282. alt="">
  283. <div style="color: #0091FF;margin-top: 20px;padding-bottom: 10px;position: absolute;left: 0;top: 0;
  284. font-weight: 700;padding-left: 15px;">{{$t('common.DataInformation')}}
  285. </div>
  286. <div style="padding: 5px 0 0 15px;font-weight: normal;color: #333333;
  287. line-height: 26px;font-size: 14px; position: absolute;left: 0;top: 50px;"
  288. class="cursor">
  289. 拓展经济社会、能源电力、气候环境、科技创新等数据采集范围,涵盖国际能源署、世界银行、非洲能源数据库、美国能源信息署等
  290. <span style="color: #0091FF;font-weight: 700;">13</span>
  291. 个主要结构化数据源,采集与数据源同步更新的统计指标数据多达
  292. <span style="color: #0091FF;font-weight: 700;">900</span>
  293. 余类、
  294. <span style="color: #0091FF;font-weight: 700;">230</span>
  295. 亿余项。
  296. </div>
  297. <div style="color: #0091FF;margin-top: 20px;padding-bottom: 1px;position: absolute;left: 0;top: 200px;
  298. margin-left: 15px;font-size: 14px;border-bottom: 1px solid #0091FF;"
  299. class="cursor"
  300. @click="openPDF(3)">
  301. 指标数据种类
  302. </div>
  303. <div style="color: #0091FF;margin-top: 20px;padding-bottom: 1px;position: absolute;left: 0;top: 230px;
  304. margin-left: 15px;font-size: 14px;border-bottom: 1px solid #0091FF;"
  305. class="cursor"
  306. @click="openPDF(4)">
  307. 数据来源单位
  308. </div>
  309. </div> -->
  310. </div>
  311. <div style="clear: both;"></div>
  312. <!-- 分页 -->
  313. <div style="width: 100%;position: relative;height: 100px;">
  314. <el-pagination style="height: 80px;position: absolute;left: 50%;top: 100px;transform: translate(-50%,-50%);"
  315. background
  316. layout="prev, pager, next"
  317. :total=total
  318. :page-size=13
  319. @current-change="handleCurrentChange"></el-pagination>
  320. </div>
  321. <el-dialog width="60%"
  322. :visible.sync="innerVisible1"
  323. append-to-body>
  324. <iframe v-if="$i18n.locale=='zh'"
  325. width="100%"
  326. id="embed"
  327. name="main"
  328. ref="embed1"
  329. height="600px"
  330. :src="srcPdf+'#toolbar=0'"
  331. frameborder="0"></iframe>
  332. </el-dialog>
  333. </div>
  334. </template>
  335. <script>
  336. import { getInformationById } from "@/api/baseUnitView";
  337. import { getDicts } from "@/api/dict";
  338. import { cmsInformationViews, getHotInformationList, topClickList, getRecommendInformationList} from "@/api/baseUnitView";
  339. import 'swiper/dist/idangerous.swiper.css'
  340. import Swiper from 'swiper/dist/idangerous.swiper.min.js'
  341. import {formatDate} from "@/utils/formatUtils";
  342. import {getLatestRecommendInfomation} from "@/api/realTimeInfo/infoJournalView";
  343. import {getInformationList} from "@/api/cooperation/baseCooperationUnit";
  344. import {getNewInternationalInformationList} from "@/api/operation/baseAdvertisement";
  345. export default {
  346. name: 'RealTimeInfoMoreInfo',
  347. // components:[
  348. // rfSwiperSlide
  349. // ],
  350. data () {
  351. return {
  352. title: '',
  353. initList: [],
  354. hotNews: [],
  355. srcPdf: null,
  356. innerVisible1: false,
  357. realTimeInfo_scree: [],
  358. realTimeInfo_scree_zh: [],
  359. realTimeInfo_scree_en: [],
  360. messageBarFixed: false,
  361. initData: [],
  362. realTimeInfoScreenItem: 0,
  363. page: {
  364. },
  365. list: '',
  366. total: 0,
  367. label: '',
  368. hitsList: [],
  369. //最新推荐
  370. newRecommonList:[],
  371. scrollNewsList:[],
  372. curClickType: '1',
  373. informationMap: {},
  374. showMoreFlag: false,
  375. topClickList: {},
  376. titleIndex:0,
  377. scrollArr:[],
  378. isNew:[],
  379. scrollData:[],
  380. isZh:true,
  381. newStu:{
  382. stu:false
  383. },
  384. nowDate:'',
  385. islogin:'',
  386. newsActiveList:[],
  387. }
  388. },
  389. created () {
  390. this.enterpriseDetails = this.$route.params.key;
  391. this.getScrollList()
  392. if(this.$i18n.locale == 'zh'){
  393. this.isZh = true
  394. }else{
  395. this.isZh = false
  396. }
  397. },
  398. computed: {
  399. realTimeInfoScreeMap: function () {
  400. return this.realTimeInfo_scree.array2Obj('value', 'label');
  401. },
  402. },
  403. watch: {
  404. '$i18n.locale' () {
  405. if(this.$i18n.locale == 'zh'){
  406. this.isZh = true
  407. }else{
  408. this.isZh = false
  409. }
  410. this.getHotList();
  411. this.getHitsList();
  412. this.getList();
  413. this.getNewRecommed();
  414. this.getNewsActive();
  415. this.$nextTick(() => {
  416. this.getScrollList()
  417. });
  418. this.getRelevantList(1, this.page.value, this.$i18n.locale.toUpperCase())
  419. }
  420. },
  421. mounted () {
  422. this.getList1()
  423. this.cofLogin()
  424. this.$store.commit('modify', 'realTimeInfo');
  425. window.localStorage.setItem('router', 'realTimeInfo');
  426. // this.getData();
  427. this.getHotList();
  428. this.getHitsList();
  429. this.getList();
  430. this.getNewRecommed();
  431. this.getNewsActive();
  432. this.$nextTick(() => {
  433. this.getScrollList()
  434. });
  435. // this.getNewRecommed()
  436. this.getRelevantList(1, this.page.value, this.$i18n.locale.toUpperCase());
  437. window.addEventListener('scroll', this.handleScroll)
  438. },
  439. destroyed () {
  440. window.removeEventListener('scroll', this.handleScroll)
  441. },
  442. methods: {
  443. openPDF (num) {
  444. this.innerVisible1 = true;
  445. if (num == 1) {
  446. // 资讯网站采集列表
  447. this.srcPdf = '/api/file/pub/def/news/news2.pdf';
  448. } else if (num == 2) {
  449. // 资讯分类
  450. this.srcPdf = '/api/file/pub/def/news/news3.pdf';
  451. } else if (num == 3) {
  452. // 指标数据种类
  453. this.srcPdf = '/api/file/pub/def/news/news1.pdf';
  454. } else if (num == 4) {
  455. // 数据来源单位
  456. this.srcPdf = '/api/file/pub/def/news/news4.pdf';
  457. }
  458. },
  459. showMore () {
  460. this.showMoreFlag = !this.showMoreFlag;
  461. },
  462. handleScroll () {
  463. var scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
  464. var offsetTop = document.querySelector('.realTimeInfo_scree').offsetTop
  465. if (scrollTop > 400) {
  466. this.messageBarFixed = true;
  467. } else if (scrollTop < 400) {
  468. this.messageBarFixed = false;
  469. }
  470. },
  471. changeClikRange (clickType) {
  472. this.curClickType = clickType;
  473. this.hitsList = this.topClickList[this.curClickType];
  474. },
  475. async getList () {
  476. await getDicts(this.$i18n.locale == 'en' ? "CMS_INFORMATION_TYPE_DICT_EN" : "CMS_INFORMATION_TYPE_DICT").then((result) => {
  477. if (result.data) {
  478. this.realTimeInfo_scree = result.data[0] || [];
  479. let both = {
  480. label: 'common.LatestNews',
  481. value: null
  482. };
  483. this.realTimeInfo_scree.unshift(both);
  484. this.$forceUpdate();
  485. }
  486. });
  487. },
  488. async getList1 () {
  489. await getDicts('CMS_INFORMATION_TYPE_DICT','CMS_INFORMATION_TYPE_DICT_EN').then((result) => {
  490. if (result.data) {
  491. this.realTimeInfo_scree_zh = result.data[0] || [];
  492. let both = {
  493. label: 'common.LatestNews',
  494. value: null
  495. };
  496. this.realTimeInfo_scree_zh.unshift(both);
  497. this.$forceUpdate();
  498. }
  499. });
  500. await getDicts('CMS_INFORMATION_TYPE_DICT_EN').then((result) => {
  501. if (result.data) {
  502. this.realTimeInfo_scree_en = result.data[0] || [];
  503. let both = {
  504. label: 'common.LatestNews',
  505. value: null
  506. };
  507. this.realTimeInfo_scree_en.unshift(both);
  508. this.$forceUpdate();
  509. }
  510. });
  511. },
  512. getHotList () {
  513. let list = {
  514. pageSize: this.$i18n.locale == 'zh' ? 5 : 10,
  515. language: this.$i18n.locale.toUpperCase(),
  516. businessType: "information",
  517. }
  518. getHotInformationList(list).then(res => {
  519. this.hotNews = res.data.cmsInformationView;
  520. })
  521. },
  522. //获取最新推荐
  523. getNewRecommed(type){
  524. let list = {
  525. typeDict: type ? type : '',
  526. pageSize: this.$i18n.locale == 'zh' ? 5 : 10,
  527. language: this.$i18n.locale.toUpperCase(),
  528. businessType: "information",
  529. }
  530. if(type == 0){
  531. let list = {
  532. pageSize: this.$i18n.locale == 'zh' ? 5 : 10,
  533. language: this.$i18n.locale.toUpperCase(),
  534. businessType: "information",
  535. }
  536. }else{
  537. }
  538. getRecommendInformationList(list).then((res)=>{
  539. this.newRecommonList = res.data.cmsInformationView;
  540. })
  541. },
  542. getHitsList () {
  543. let list = {
  544. language: this.$i18n.locale.toUpperCase(),
  545. }
  546. topClickList(list).then(res => {
  547. var data = res.data;
  548. if (data) {
  549. this.topClickList = data.topClickList;
  550. this.hitsList = this.topClickList[this.curClickType];
  551. this.informationMap = data.informationMap;
  552. }
  553. })
  554. },
  555. getRelevantList (num, type, language, title) {
  556. let page = {
  557. typeDict: type,
  558. language: language,
  559. pageSize: 13,
  560. pageNo: num,
  561. businessType: "information",
  562. title: title ? title : ''
  563. }
  564. cmsInformationViews(page).then(res => {
  565. // this.initList= res.data.allDataList;
  566. if (res.data && res.data.page) {
  567. this.initList = res.data.page.list || [];
  568. this.total = res.data.page.totalCount - 0;
  569. var myDate = new Date();
  570. this.nowDate = formatDate(myDate, 'YYYY-MM-DD')
  571. this.initList.forEach(element => {
  572. element.content = element.content.replace(/<[^>]+>|&[^>]+;/g, "");
  573. // element.publishDate = formatDate(element.publishDate, 'YYYY-MM-DD')
  574. // let wtWork=this.wtWorkTaskInfo.workTaskDesc.replace(/<[^>]+>|&[^>]+;/g, "")
  575. });
  576. console.log('this.initList')
  577. console.log(this.initList)
  578. } else {
  579. this.initList = []
  580. }
  581. });
  582. },
  583. getData (title) {
  584. this.getRelevantList(1, this.page.value, this.$i18n.locale.toUpperCase(), title)
  585. },
  586. handleCurrentChange (val) {
  587. console.log(`当前页: ${val}`, val);
  588. this.getRelevantList(val, this.page.value, this.$i18n.locale.toUpperCase())
  589. },
  590. getImg (url) {
  591. return require("@/assets/img/realTimeInfo/" + url)
  592. },
  593. realTimeInfoScreensChange (i, index) {
  594. this.realTimeInfoScreenItem = index;
  595. this.page = i;
  596. this.label = i.value;
  597. // this.title='';
  598. // this.getRelevantList(1,i.value,this.$i18n.locale.toUpperCase())
  599. this.getData(this.title);
  600. this.getNewRecommed(this.realTimeInfoScreenItem)
  601. },
  602. getIconUrl (url) {
  603. if (url == this.realTimeInfoScreenItem) {
  604. return require("@/assets/img/realTimeInfo/tag/" + 'mouse' + url + 'Click.png')
  605. } else {
  606. return require("@/assets/img/realTimeInfo/tag/" + 'mouse' + url + '.png');
  607. }
  608. },
  609. toView (router, json) {
  610. this.$store.commit('modify', router);
  611. window.localStorage.setItem('router', router);
  612. // this.$router.push({name:router,query:json})
  613. const { href } = this.$router.resolve({
  614. name: router,
  615. query: {
  616. key: json
  617. }
  618. });
  619. window.open(href, '_blank');
  620. },
  621. screenBack (data) {
  622. console.log(data, 'screenBackscreenBackscreenBackscreenBack')
  623. },
  624. screen (i) {
  625. this.index = i
  626. },
  627. getInformation (num) {
  628. this.informationsClass = num
  629. },
  630. //切换推荐和热点新闻
  631. changeTitle(i){
  632. this.titleIndex =i;
  633. },
  634. // //获取滚动快讯数据
  635. // getScrollData(){
  636. // let page = {
  637. // typeDict: type,
  638. // language: language,
  639. // pageSize: 13,
  640. // pageNo: num,
  641. // businessType: "information",
  642. // title: title ? title : ''
  643. // }
  644. // cmsInformationViews(page).then(res => {
  645. // this.scrollData = res.data.data.allDataList;
  646. // })
  647. // },
  648. //滚动快讯
  649. async getScrollList(){ //created中调用
  650. let _this = this;
  651. let params = {
  652. language: this.$i18n.locale.toLocaleUpperCase(),
  653. pageSize: 5,
  654. pageNo: 1,
  655. businessType: "information",
  656. title:''
  657. }
  658. await cmsInformationViews(params).then(res => {
  659. this.scrollNewsList = res.data.allDataList;
  660. this.scrollLength = this.scrollNewsList.length;
  661. })
  662. this.$nextTick(function () {
  663. if (this.scrollLength > 0) {
  664. if (this.scrollLength == 1) {
  665. this.isAutoplay = 0;
  666. this.isLoop = false;
  667. } else {
  668. this.isAutoplay = 1;
  669. this.isLoop = true;
  670. }
  671. var mySwiper = new Swiper('.swiper-banner', {
  672. //滚动方向
  673. mode: 'vertical',
  674. autoplay: 5000,
  675. loop: this.isLoop,
  676. speed: 300,
  677. autoplayDisableOnInteraction: false,
  678. preventLinksPropagation: true,
  679. observer: true,
  680. observeParents: false,
  681. eventTarget: 'container',
  682. preventLinks: false,
  683. updateOnImagesReady: true,
  684. })
  685. //点击swiper跳转到详情
  686. $('.swiper-slide').click(function () {
  687. let dataindex1 = mySwiper.activeLoopIndex;
  688. let dataindex2 = mySwiper.activeIndex;
  689. let str = mySwiper.slides[dataindex2].innerText;
  690. var index=str.lastIndexOf("\n");
  691. str=str.substring(index+1,str.length);
  692. let id = '';
  693. _this.scrollNewsList.forEach(item =>{
  694. if(item.title == str){
  695. id = item.baseEntityId
  696. }
  697. });
  698. _this.toView('realTimeInfoItemdetails', id)
  699. })
  700. }
  701. })
  702. },
  703. cofLogin(){
  704. if (!this.$Cookies.get('token')){
  705. this.islogin = false;
  706. }else {
  707. this.islogin = true;
  708. }
  709. },
  710. getNewsActive(){
  711. let params = {
  712. pageSize:5,
  713. language:this.$i18n.locale.toUpperCase(),
  714. businessType:'information',
  715. };
  716. getNewInternationalInformationList(params).then(res=>{
  717. this.newsActiveList = res.data.InternationalInformationInfo || []
  718. })
  719. },
  720. }
  721. }
  722. </script>
  723. <!-- Add "scoped" attribute to limit CSS to this component only -->
  724. <style scoped>
  725. .box {
  726. margin-top: 10px;
  727. background: #fff;
  728. /* height: 500px; */
  729. padding: 20px 0;
  730. }
  731. .crumbs {
  732. margin-left: 20px;
  733. }
  734. .message {
  735. width: 188px;
  736. float: left;
  737. margin-top: 108px;
  738. }
  739. body {
  740. margin: 0;
  741. }
  742. .swipers {
  743. position: absolute;
  744. top: 30px;
  745. left: 100px;
  746. width: 460px;
  747. height: 390px;
  748. }
  749. .isFixed {
  750. width: 188px;
  751. position: fixed;
  752. top: 0;
  753. z-index: 999;
  754. }
  755. /* .notFixed{
  756. position: absolute;
  757. } */
  758. .details {
  759. position: absolute;
  760. top: 30px;
  761. left: 600px;
  762. width: 460px;
  763. height: 390px;
  764. }
  765. .swiper-container {
  766. width: 100%;
  767. height: 300px;
  768. margin-left: auto;
  769. margin-right: auto;
  770. }
  771. .swiper-slide {
  772. background-size: cover;
  773. background-position: center;
  774. }
  775. .gallery-top {
  776. height: 80%;
  777. width: 100%;
  778. }
  779. .gallery-thumbs {
  780. height: 20%;
  781. box-sizing: border-box;
  782. padding: 10px 0;
  783. }
  784. .gallery-thumbs .swiper-slide {
  785. width: 25%;
  786. height: 100%;
  787. opacity: 0.4;
  788. }
  789. .gallery-thumbs .swiper-slide-thumb-active {
  790. opacity: 1;
  791. }
  792. .initData_label {
  793. color: #6c8c9d;
  794. font-weight: 700;
  795. font-size: 18px;
  796. line-height: 42px;
  797. }
  798. .enterprise_style {
  799. line-height: 40px;
  800. color: #6c819d;
  801. /* padding-left: 100px; */
  802. font-size: 18px;
  803. /* font-weight: 700; */
  804. margin-top: 5px;
  805. margin-left: 100px;
  806. border-bottom: 1px solid #95d13e;
  807. }
  808. .enterprise_style_span {
  809. padding: 10px;
  810. text-align: center;
  811. height: 100%;
  812. background: #95d13e;
  813. color: #fff;
  814. /* border-bottom: 2px solid #6699ff; */
  815. }
  816. .enterprise_style_product tr {
  817. line-height: 30px;
  818. width: 100%;
  819. display: inline-block;
  820. border-bottom: 1px dashed #ccc;
  821. font-size: 14px;
  822. color: #6c819d;
  823. margin-bottom: 5px;
  824. }
  825. .recommend {
  826. margin-top: 15px;
  827. margin-left: 100px;
  828. }
  829. .recommend li {
  830. display: inline-block;
  831. width: 170px;
  832. /* height: 130px; */
  833. text-align: center;
  834. margin-right: 15px;
  835. }
  836. .information1 {
  837. display: inline-block;
  838. width: 123px;
  839. height: 100%;
  840. border: 1px solid rgba(228, 228, 228, 1);
  841. text-align: center;
  842. background: #f9f9f9;
  843. color: #999;
  844. }
  845. .information2 {
  846. display: inline-block;
  847. width: 123px;
  848. height: 100%;
  849. border-top: 3px solid #2c5589;
  850. text-align: center;
  851. color: #2c5589;
  852. }
  853. .information1:hover {
  854. color: #ff0036;
  855. }
  856. .realTimeInfo_scree .span1,
  857. .realTimeInfo_scree .span2 {
  858. /* padding: 0 10px; */
  859. font-size: 20px;
  860. display: inline-block;
  861. height: 50px;
  862. line-height: 50px;
  863. /* background: #385386; */
  864. /* margin-right: 30px; */
  865. width: 100%;
  866. /* text-align: center;*/
  867. color: #0079ef;
  868. border: 1px solid #d8d8d8;
  869. }
  870. .realTimeInfo_scree li:nth-of-type(1) {
  871. background: #385386;
  872. color: #fff;
  873. }
  874. .realTimeInfo_scree .span2 {
  875. background: #fff;
  876. color: #666;
  877. }
  878. .realTimeInfo_scree .span1 {
  879. border-radius: 6px !important;
  880. }
  881. .serch >>> .el-input__inner {
  882. border: 1px solid #4f84ba;
  883. }
  884. .serch >>> .el-button {
  885. background: #4f84ba;
  886. border: 1px solid #4f84ba;
  887. border-left: none;
  888. border-radius: 0;
  889. color: #fff;
  890. }
  891. .mouseItemImg:hover {
  892. transform: scale(1.5);
  893. /* transition-timing-function:cubic-bezier(0.75,0,0.125,1); */
  894. transition: all 0.5s;
  895. }
  896. .hotInfoIndex {
  897. width: 20px;
  898. height: 19px;
  899. background: #d00;
  900. display: inline-block;
  901. text-align: center;
  902. margin-right: 5px;
  903. color: #fff;
  904. line-height: 19px;
  905. position: relative;
  906. font-style: normal;
  907. }
  908. .ScrollExpress{
  909. position: absolute;
  910. bottom: 5px;
  911. left: 90px;
  912. width: 80%;
  913. height: 30px;
  914. line-height: 30px;
  915. background: #F5F5F6;
  916. border-radius: 15px;
  917. font-size: 15px;
  918. }
  919. .newsScroll{
  920. width: 80%;
  921. height: 100%;
  922. display: inline-block;
  923. overflow-y: scroll;
  924. /*overflow: scroll;*/
  925. }
  926. .express{
  927. margin-left: 24px;
  928. display: inline-block;
  929. }
  930. .type{
  931. /*display: inline-block;*/
  932. margin-left: 20px;
  933. border: 1px solid #286FCF;
  934. box-sizing: border-box;
  935. line-height: 16px;
  936. text-align: center;
  937. color: #286FCF;
  938. padding: 1px 2px;
  939. font-size: 16px;
  940. float: left;
  941. margin-top: 5px;
  942. }
  943. .news{
  944. display: inline-block;
  945. margin-left: 20px;
  946. color: #666;
  947. }
  948. .newsTitle{
  949. display: inline-block;
  950. width: 46%;
  951. padding: 0 5px;
  952. height: 30px;
  953. text-align: center;
  954. line-height: 30px;
  955. border-radius: 5px;
  956. overflow: hidden;
  957. text-overflow: ellipsis;
  958. white-space: nowrap;
  959. }
  960. .title1{
  961. background: #286FCF;
  962. color: #fff;
  963. }
  964. .title2{
  965. background: #E9EEF2;
  966. color:#286FCF;
  967. }
  968. .red {
  969.   color: red;
  970. }
  971. .scrollBox2 {
  972. width: 88%;
  973. height: 100%;
  974. display: flex;
  975. flex-direction: column;
  976. align-items: center;
  977. justify-content: space-between;
  978. background: #F5F5F6;
  979. color: #666;
  980. /*border-radius: 50px;*/
  981. font-size: 18px;
  982. -webkit-transform-origin-x: 0;
  983. -webkit-transform: scale(0.80);
  984. overflow: hidden;
  985. position: absolute;
  986. left: 150px;
  987. top:0;
  988. /*text-align: left;*/
  989. z-index: 1;
  990. }
  991. .scrollBox1{
  992. width: 100%;
  993. height: 100%;
  994. display: flex;
  995. flex-direction: column;
  996. align-items: center;
  997. justify-content: space-between;
  998. background: #F5F5F6;
  999. color: #666;
  1000. /*border-radius: 50px;*/
  1001. font-size: 18px;
  1002. -webkit-transform-origin-x: 0;
  1003. -webkit-transform: scale(0.80);
  1004. overflow: hidden;
  1005. position: absolute;
  1006. left: 95px;
  1007. top:0;
  1008. /*text-align: left;*/
  1009. z-index: 1;
  1010. }
  1011. .text1{
  1012. width: 75%;
  1013. height: 20px;
  1014. /*display: inline-block;*/
  1015. margin: 5px 0 0 10px;
  1016. overflow: hidden;
  1017. line-height: 20px;
  1018. text-overflow: ellipsis;
  1019. white-space: nowrap;
  1020. cursor: pointer;
  1021. float: left;
  1022. }
  1023. .text2{
  1024. width: 60%;
  1025. height: 20px;
  1026. /*display: inline-block;*/
  1027. margin: 5px 0 0 10px;
  1028. overflow: hidden;
  1029. line-height: 20px;
  1030. text-overflow: ellipsis;
  1031. white-space: nowrap;
  1032. cursor: pointer;
  1033. float: left;
  1034. }
  1035. .srollHead {
  1036. width: 18px;
  1037. height:18px;
  1038. border-radius: 50%;
  1039. }
  1040. .scrollName {
  1041. width:100%;
  1042. overflow: hidden;
  1043. white-space: nowrap;
  1044. text-overflow: ellipsis;
  1045. margin: 0 .05rem;
  1046. }
  1047. .slide-enter-active,
  1048. .slide-leave-active {
  1049. transition: all 1.5s linear;
  1050. }
  1051. .slide-enter {
  1052. transform: translateY(42px);
  1053. }
  1054. .slide-leave-to {
  1055. transform: translateY(-42px);
  1056. }
  1057. .swiper-wrapper {
  1058. font-size:16px;
  1059. }
  1060. .swiper-container-autoheight,
  1061. .swiper-container-autoheight .swiper-slide {
  1062. font-size: 0;
  1063. position: relative;
  1064. }
  1065. .swiper_vertical {
  1066. width: 100% !important;
  1067. height: 100%;
  1068. /*display: flex;*/
  1069. }
  1070. .swiper-wrapper-vertical {
  1071. /*transition-timing-function: linear !important;*/
  1072. transition-timing-function:cubic-bezier(0, 0.77, 0.58, 1) !important;;
  1073. }
  1074. .isnewdata{
  1075. display: inline-block;
  1076. margin-right: 10px;
  1077. border: 1px solid red;
  1078. padding: 0 5px;
  1079. border-radius: 10px;
  1080. color: red;
  1081. font-size: 13px;
  1082. text-align: center;
  1083. height: 15px;
  1084. float: right;
  1085. }
  1086. .newLine1{
  1087. line-height: 13px;
  1088. }
  1089. .newLine2{
  1090. line-height: 14px;
  1091. }
  1092. </style>