RealTimeInfoMoreInfo1.vue 44 KB

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