RealTimeInfoLatetDevelopment.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648
  1. <template>
  2. <div class="autoBox box" style="background: #fff">
  3. <div class="menu">
  4. <el-breadcrumb separator="/">
  5. <el-breadcrumb-item :to="{ path: 'home' }">{{
  6. $t("common.Home")
  7. }}</el-breadcrumb-item>
  8. <el-breadcrumb-item :to="{ path: 'realTimeInfo1' }">{{
  9. $t("common.NewsData")
  10. }}</el-breadcrumb-item>
  11. <el-breadcrumb-item>{{
  12. $t("common.LatestDevelopment")
  13. }}</el-breadcrumb-item>
  14. </el-breadcrumb>
  15. </div>
  16. <div class="content">
  17. <div>
  18. <img
  19. v-if="$i18n.locale == 'zh'"
  20. style="width: 100%"
  21. src="@/assets/img/realTimeInfo/newszh.png"
  22. alt=""
  23. />
  24. <img
  25. v-if="$i18n.locale == 'en'"
  26. style="width: 100%"
  27. src="@/assets/img/realTimeInfo/newsen.png"
  28. alt=""
  29. />
  30. </div>
  31. <div class="pageTurn">
  32. <div style="float: left; margin-left: 20px">
  33. <div class="timeSelect">
  34. <span>{{ $t("common.Years") }}:</span>
  35. <el-date-picker
  36. v-model="years1"
  37. type="year"
  38. :placeholder="$t('common.Querybydate')"
  39. >
  40. </el-date-picker>
  41. </div>
  42. <div class="pageQu">
  43. <div style="float: left">{{ $t("common.Issue") }}:</div>
  44. <el-input
  45. v-model="issue"
  46. :placeholder="$t('common.PleasEenterIssue')"
  47. ></el-input>
  48. </div>
  49. <el-button class="queryBtn" @click="queryData">{{
  50. $t("common.WeeklySerch")
  51. }}</el-button>
  52. <el-button class="queryBtn" @click="resetQuery">{{
  53. $t("common.realClear")
  54. }}</el-button>
  55. <div style="clear: both"></div>
  56. </div>
  57. <div class="pageTitle">
  58. <div style="display: inline-block" v-if="detailsItem.title">
  59. <!-- <span>{{this.data}}</span>-->
  60. <span v-if="$i18n.locale == 'zh'">每日运行分析</span>
  61. <span v-if="$i18n.locale == 'en'">Daily Operation Analysis</span>
  62. <span v-if="$i18n.locale == 'zh'" style="margin-left: 10px"
  63. >{{ date }}年</span
  64. >
  65. <span v-if="$i18n.locale == 'en'" style="margin-left: 10px"
  66. >{{ date }} Years</span
  67. >
  68. <div
  69. v-if="$i18n.locale == 'zh'"
  70. style="display: inline-block; margin: 0 10px"
  71. >
  72. 第<span style="color: red">{{ currentPer }}</span
  73. >期
  74. </div>
  75. <div
  76. v-if="$i18n.locale == 'en'"
  77. style="display: inline-block; margin: 0 10px"
  78. >
  79. Order by <span style="color: red">{{ currentPer }}</span>
  80. </div>
  81. </div>
  82. <div class="upAndDownload">
  83. <div class="pageBtn" @click="upPage">
  84. {{ $t("common.PreviousArticle") }}
  85. </div>
  86. <div class="pageBtn" @click="downPage">
  87. {{ $t("common.NextArticle") }}
  88. </div>
  89. </div>
  90. </div>
  91. <div style="clear: both"></div>
  92. </div>
  93. <div class="details">
  94. <div class="newList">
  95. <div class="newscontent">
  96. <!-- 信息要情-->
  97. <div class="title">
  98. <i class="el-icon-document-copy"></i>
  99. {{ $t("common.ImportantInformation") }}
  100. </div>
  101. <div v-if="newsList">
  102. <div
  103. v-for="(newsItem, nwesIndex) in newsList" :key="nwesIndex"
  104. class="newlistDetail"
  105. @click="getOnlyData(newsItem.id)"
  106. >
  107. <div v-if="newsItem">
  108. <div class="newstitle">
  109. <span>{{ nwesIndex + 1 }}. {{ newsItem.title }}</span>
  110. <div class="newstip">
  111. {{ newsItem.tag }}
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. <div v-else>{{ $t("common.NoData") }}</div>
  118. <!-- 运行数据-->
  119. <div class="title">
  120. <i class="el-icon-s-data"></i>
  121. {{ $t("common.OperatingData") }}
  122. </div>
  123. <div>
  124. <div
  125. v-for="(dataItem, dataIndex) in dataListzh" :key="dataIndex"
  126. class="newlistDetail"
  127. @click="getRunData(dataItem.id)"
  128. >
  129. <div class="newstitle">
  130. {{ dataIndex + 1 }}. <span>{{ dataItem.title }}</span>
  131. <div class="newstip">
  132. {{ dataItem.international }}
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. </div>
  138. </div>
  139. <div
  140. v-if="!detailsItem.title"
  141. style="width: 100%; text-align: center; margin-top: 30px"
  142. >
  143. {{ $t("common.NoData") }}
  144. </div>
  145. <div class="detailPDF" v-if="detailsItem.title">
  146. <div style="text-align: center">
  147. <span class="pdfsTitle">{{ detailsItem.title }}</span>
  148. <div class="newstip" v-if="detailsItem.tag">
  149. {{ detailsItem.tag }}
  150. </div>
  151. <div class="newstip" v-if="detailsItem.international">
  152. {{ detailsItem.international }}
  153. </div>
  154. </div>
  155. <div class="dividing" v-if="detailsItem.title"></div>
  156. <div v-html="detailsItem.contentHtml" style="line-height: 30px"></div>
  157. <div
  158. style="text-align: right; margin-top: 50px"
  159. v-if="detailsItem.auther"
  160. >
  161. (<span>{{ $t("common.Source") }}:{{ detailsItem.auther }}</span
  162. >)
  163. </div>
  164. <div class="dividing"></div>
  165. <div class="tip">
  166. {{ $t("common.contentisreproduced") }}
  167. </div>
  168. </div>
  169. </div>
  170. </div>
  171. </div>
  172. </template>
  173. <script>
  174. import {
  175. getNewInternationalInformationList,
  176. getNewDataArticle,
  177. dataArticleGate,
  178. searchInformationByNextButton,
  179. searchDataArticleByNextButton,
  180. } from "@/api/operation/baseAdvertisement";
  181. import { getBaseInvestmentGuidelinesInfos } from "@/api/financialService/baseInvestmentGuidelinesInfo";
  182. import { sysAttachmentInfos } from "../../api/cooperation/baseCooperationUnit";
  183. export default {
  184. name: "RealTimeInfoLatetDevelopment",
  185. data() {
  186. return {
  187. newsList: [],
  188. dataListzh: [],
  189. detailsItem: {},
  190. date: "",
  191. years1: "",
  192. id: "",
  193. tips: [
  194. {
  195. title: "1.包括清华大学等十多家机构",
  196. },
  197. {
  198. title: "2.中英气候变化风险评估",
  199. },
  200. ],
  201. currentId: this.$route.query.key,
  202. currentPer: "",
  203. pdfSrc: null,
  204. showPdfDeta: {},
  205. isRunData: false,
  206. issue: "",
  207. currentInfo: {},
  208. };
  209. },
  210. mounted() {
  211. // this.getOnlyData();
  212. this.getNewsActive();
  213. },
  214. watch: {
  215. "$i18n.locale"() {
  216. // this.getOnlyData();
  217. this.getNewsActive();
  218. },
  219. },
  220. methods: {
  221. iniTime(temTime) {
  222. this.date = temTime;
  223. },
  224. upPage() {
  225. let that = this;
  226. let params = {
  227. type: that.newsList[0].type,
  228. languageDict: that.$i18n.locale.toUpperCase(),
  229. buttonType: "previous",
  230. year: that.newsList[0].remark,
  231. };
  232. searchInformationByNextButton(params).then((res) => {
  233. if (res.data) {
  234. let data = res.data.internationalInformationInfo;
  235. if (data) {
  236. that.newsList = data;
  237. that.detailsItem = data[0];
  238. that.currentPer = that.newsList[0].type;
  239. let time = that.newsList[0].remark;
  240. that.iniTime(time);
  241. that.getRunnewlist(that.newsList[0].type, that.newsList[0].remark);
  242. } else if (typeof res.data == "string") {
  243. if (that.$i18n.locale == "zh") {
  244. that.$message({
  245. message: "信息要情" + res.data,
  246. type: "warring",
  247. });
  248. } else {
  249. that.$message({
  250. message: " Important Information" + res.data,
  251. type: "warring",
  252. });
  253. }
  254. } else {
  255. that.newsList = [];
  256. that.detailsItem = {};
  257. that.dataListzh = [];
  258. if (this.$i18n.locale == "zh") {
  259. this.$message({
  260. message: "信息要情暂无数据",
  261. type: "warring",
  262. });
  263. } else {
  264. this.$message({
  265. message: "Important Information No Data",
  266. type: "warring",
  267. });
  268. }
  269. }
  270. }
  271. });
  272. },
  273. downPage() {
  274. let that = this;
  275. let params = {
  276. type: that.newsList[0].type,
  277. languageDict: that.$i18n.locale.toUpperCase(),
  278. buttonType: "next",
  279. year: that.newsList[0].remark,
  280. };
  281. searchInformationByNextButton(params).then((res) => {
  282. if (res.data) {
  283. let data = res.data.internationalInformationInfo;
  284. if (data) {
  285. that.newsList = data;
  286. that.detailsItem = data[0];
  287. that.currentPer = that.newsList[0].type;
  288. let time = that.newsList[0].remark;
  289. that.iniTime(time);
  290. that.getRunnewlist(that.detailsItem.type, time);
  291. } else if (typeof res.data == "string") {
  292. if (that.$i18n.locale == "zh") {
  293. that.$message({
  294. message: "信息要情" + res.data,
  295. type: "warring",
  296. });
  297. } else {
  298. that.$message({
  299. message: " Important Information" + res.data,
  300. type: "warring",
  301. });
  302. }
  303. } else {
  304. that.dataListzh = [];
  305. that.newsList = [];
  306. that.detailsItem = {};
  307. if (this.$i18n.locale == "zh") {
  308. this.$message({
  309. message: "信息要情暂无数据",
  310. type: "warring",
  311. });
  312. } else {
  313. this.$message({
  314. message: "Important Information No Data",
  315. type: "warring",
  316. });
  317. }
  318. }
  319. }
  320. });
  321. },
  322. getRunnewlist(type, remark) {
  323. let that = this;
  324. let params = {
  325. type: type,
  326. language: that.$i18n.locale.toUpperCase(),
  327. customContentView: remark,
  328. };
  329. getNewDataArticle(params).then((res) => {
  330. if (res.data) {
  331. let data = res.data.dataArticle;
  332. if (data) {
  333. that.dataListzh = data;
  334. } else if (typeof res.data == "string") {
  335. if (that.$i18n.locale == "zh") {
  336. that.$message({
  337. message: "运行数据" + res.data,
  338. type: "warring",
  339. });
  340. } else {
  341. that.$message({
  342. message: " Operating Data" + res.data,
  343. type: "warring",
  344. });
  345. }
  346. } else {
  347. that.dataListzh = [];
  348. if (that.$i18n.locale == "zh") {
  349. that.$message({
  350. message: "暂无运行数据",
  351. type: "warring",
  352. });
  353. } else {
  354. that.$message({
  355. message: "No running data is available",
  356. type: "warring",
  357. });
  358. }
  359. }
  360. }
  361. });
  362. },
  363. queryData() {
  364. let that = this;
  365. if (that.years1 && that.issue) {
  366. let year = that.formatDate(that.years1);
  367. year = year.split("-");
  368. let parm = {
  369. type: that.issue,
  370. endTime: year[0],
  371. };
  372. this.getNewsActive(parm);
  373. } else {
  374. if (this.$i18n.locale == "zh") {
  375. this.$message({
  376. message: "查询值不能为空",
  377. type: "warring",
  378. });
  379. } else {
  380. this.$message({
  381. message: "The query value cannot be empty",
  382. type: "warring",
  383. });
  384. }
  385. }
  386. },
  387. getNewsActive(pram) {
  388. let that = this;
  389. let params = {};
  390. if (pram) {
  391. params = {
  392. ...pram,
  393. language: that.$i18n.locale.toUpperCase(),
  394. };
  395. } else {
  396. params = {
  397. language: that.$i18n.locale.toUpperCase(),
  398. };
  399. }
  400. getNewInternationalInformationList(params).then((res) => {
  401. if (res.data.InternationalInformationInfo) {
  402. that.newsList = res.data.InternationalInformationInfo;
  403. that.detailsItem = that.newsList[0];
  404. console.log('---->',that.detailsItem);
  405. that.currentPer = that.newsList[0].type;
  406. let time2 = that.newsList[0].remark;
  407. that.iniTime(time2);
  408. if (pram) {
  409. that.getRunDataList(
  410. pram,
  411. that.newsList[0].type,
  412. that.detailsItem.remark
  413. );
  414. } else {
  415. that.getRunDataList(
  416. "",
  417. that.newsList[0].type,
  418. that.detailsItem.remark
  419. );
  420. this.getOnlyData();
  421. }
  422. } else {
  423. this.newsList = [];
  424. this.detailsItem = {};
  425. this.dataListzh = [];
  426. if (this.$i18n.locale == "zh") {
  427. this.$message({
  428. message: "信息要情暂无数据",
  429. type: "warring",
  430. });
  431. } else {
  432. this.$message({
  433. message: "Important Information No Data",
  434. type: "warring",
  435. });
  436. }
  437. }
  438. });
  439. },
  440. getOnlyData(id) {
  441. let _this = this;
  442. _this.isRunData = false;
  443. _this.id = _this.$route.query.key;
  444. let params = {
  445. id: id || _this.id,
  446. language: _this.$i18n.locale.toUpperCase(),
  447. };
  448. getNewInternationalInformationList(params).then((res) => {
  449. if (res.data.InternationalInformationInfo) {
  450. let tem = res.data.InternationalInformationInfo;
  451. _this.detailsItem = tem[0];
  452. } else {
  453. _this.detailsItem = {};
  454. }
  455. });
  456. },
  457. //获取运行数据
  458. getRunData(value) {
  459. let that = this;
  460. that.isRunData = true;
  461. let params = {
  462. id: value,
  463. language: that.$i18n.locale.toUpperCase(),
  464. };
  465. dataArticleGate(params).then((res) => {
  466. if (res.data.dataArticle[0]) {
  467. that.detailsItem = res.data.dataArticle[0];
  468. that.detailsItem.author = res.data.dataArticle[0].auther;
  469. } else {
  470. that.detailsItem = {};
  471. if (that.$i18n.locale == "zh") {
  472. that.$message({
  473. message: "暂无运行数据",
  474. type: "warring",
  475. });
  476. } else {
  477. that.$message({
  478. message: "No running data is available",
  479. type: "warring",
  480. });
  481. }
  482. }
  483. });
  484. },
  485. getRunDataList(time, type, cud) {
  486. let that = this;
  487. let params = {};
  488. if (time) {
  489. params = {
  490. ...time,
  491. language: that.$i18n.locale.toUpperCase(),
  492. customContentView: cud,
  493. };
  494. } else {
  495. params = {
  496. type: type,
  497. language: that.$i18n.locale.toUpperCase(),
  498. customContentView: cud,
  499. };
  500. }
  501. getNewDataArticle(params).then((res) => {
  502. if (res.data) {
  503. that.dataListzh = res.data.dataArticle;
  504. } else {
  505. that.dataListzh = [];
  506. if (this.$i18n.locale == "zh") {
  507. this.$message({
  508. message: "运行数据暂无数据",
  509. type: "warring",
  510. });
  511. } else {
  512. this.$message({
  513. message: "No running data is available",
  514. type: "warring",
  515. });
  516. }
  517. }
  518. });
  519. },
  520. resetQuery() {
  521. this.years1 = "";
  522. this.issue = "";
  523. let parm = {
  524. type: '',
  525. endTime: '',
  526. };
  527. this.getNewsActive(parm);
  528. },
  529. },
  530. };
  531. </script>
  532. <style scoped>
  533. .menu {
  534. padding: 20px;
  535. margin-top: 20px;
  536. }
  537. .content {
  538. padding: 20px;
  539. }
  540. .timeSelect {
  541. float: left;
  542. }
  543. .pageTurn {
  544. width: 100%;
  545. height: 62px;
  546. line-height: 62px;
  547. background: #e8eef5;
  548. margin: 20px 0;
  549. text-align: right;
  550. }
  551. .pageTitle {
  552. /*width: 65%;*/
  553. /*float: right;*/
  554. text-align: center;
  555. }
  556. .upAndDownload {
  557. float: right;
  558. }
  559. .pageBtn {
  560. display: inline-block;
  561. margin-right: 30px;
  562. cursor: pointer;
  563. }
  564. .details {
  565. width: 100%;
  566. height: 100%;
  567. display: flex;
  568. justify-content: space-between;
  569. }
  570. .newList {
  571. width: 32%;
  572. }
  573. .newscontent {
  574. width: 95%;
  575. }
  576. .newsLogo {
  577. width: 100%;
  578. height: 100px;
  579. }
  580. .title {
  581. height: 30px;
  582. margin-top: 20px;
  583. background: #1b579f;
  584. color: #fff;
  585. line-height: 30px;
  586. padding: 0 10px;
  587. }
  588. .newlistDetail {
  589. margin-top: 20px;
  590. cursor: pointer;
  591. /* display: flex; */
  592. }
  593. .newstitle {
  594. display: inline-block;
  595. }
  596. .newstip {
  597. display: inline-block;
  598. background: #e8f6ff;
  599. color: #4db8ff;
  600. padding: 2px 10px;
  601. margin-left: 20px;
  602. font-size: 12px;
  603. }
  604. .detailPDF {
  605. width: 65%;
  606. padding-top: 20px;
  607. }
  608. .pdfsTitle {
  609. font-size: 24px;
  610. color: #2c558a;
  611. }
  612. .dividing {
  613. width: 100%;
  614. background: #ccc;
  615. height: 1px;
  616. margin: 30px 0;
  617. }
  618. .tip {
  619. color: #666;
  620. line-height: 30px;
  621. }
  622. .pageQu {
  623. float: left;
  624. margin-left: 20px;
  625. margin-right: 20px;
  626. }
  627. >>> .el-input__inner {
  628. width: 100px !important;
  629. height: 30px;
  630. }
  631. >>> .el-input {
  632. width: 100px !important;
  633. }
  634. .queryBtn {
  635. height: 30px;
  636. margin-top: 18px;
  637. line-height: 5px;
  638. background: #0ab8ed;
  639. color: #fff;
  640. cursor: pointer;
  641. }
  642. </style>