CommitteeInformation.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244
  1. <!-- 委员会全部资料列表 -->
  2. <template>
  3. <div class="autoBox box1" style="position: relative; background: #f5f5f5">
  4. <div class="center" style="">
  5. <div class="left">
  6. <div class="topImg" style="display: flex">
  7. <div class="topLeft">
  8. <span>{{ $t("common.comprehensive") }}/</span>
  9. <span>{{ $t("common.detailed") }}/</span>
  10. <span>{{ $t("common.major") }}</span>
  11. </div>
  12. <div class="topTitle">
  13. <h1>{{ $t("common.committeeInformation") }}</h1>
  14. </div>
  15. <div class="topRight">
  16. <img
  17. class="img1"
  18. style="display: block; width: 176px; height: 232px"
  19. src="@/assets/img/committeeWorkSpace/img3.png"
  20. alt=""
  21. />
  22. <img
  23. class="img2"
  24. style="display: block; width: 176px; height: 232px"
  25. src="@/assets/img/committeeWorkSpace/img2.png"
  26. alt=""
  27. />
  28. <img
  29. class="img3"
  30. style="display: block; width: 176px; height: 232px"
  31. src="@/assets/img/committeeWorkSpace/img1.png"
  32. alt=""
  33. />
  34. </div>
  35. </div>
  36. <div :class="$i18n.locale=='zh'?'centerLeft1':'centerLeft1En'">
  37. <div class="topSearch">
  38. <el-input
  39. @clear="reset"
  40. @change="searchTitle"
  41. clearable
  42. suffix-icon="el-icon-search"
  43. style="width: 200px; height: 20px; margin-top: 10px"
  44. v-model="search"
  45. :placeholder="$t('common.pleaseEnter')"
  46. ></el-input>
  47. <el-button
  48. @click="toUpload"
  49. style="margin-left: 10px"
  50. type="primary"
  51. plain
  52. >{{ $t("common.upload") }}</el-button
  53. >
  54. <el-button
  55. plain
  56. v-if="isSubscription"
  57. @click="cancelSubscribe"
  58. type="danger"
  59. >{{ $t("common.cancelSubscribe") }}</el-button
  60. >
  61. <!--<el-button
  62. plain
  63. v-if="!isSubscription"
  64. @click="subscribe"
  65. type="danger"
  66. >{{ $t("common.subscribe") }}</el-button
  67. >-->
  68. </div>
  69. <div class="area">
  70. <Screen
  71. v-bind:screen1="screen1s"
  72. :screen2="screen2s"
  73. :screen1def="screen1def"
  74. :screen2Item="screen2Item"
  75. @screenBack="screenBack"
  76. ></Screen>
  77. <div class="choice">
  78. <el-select
  79. clearable
  80. @clear="reset1"
  81. v-model="regionalNationalCommission"
  82. style="width: 150px; height: 20px"
  83. :placeholder="$t('common.select')"
  84. >
  85. <el-option
  86. v-for="item in regionalNationalCommissionList"
  87. :key="item.id"
  88. :label="$i18n.locale === 'en' ? item.committeeNameEn : item.committeeName"
  89. :value="item.id"
  90. >
  91. </el-option>
  92. </el-select>
  93. </div>
  94. </div>
  95. <!--<div v-cloak :class="$i18n.locale=='zh'?'toggleLabel':'toggleLabelEn'">
  96. <ul style="display: flex">
  97. <li v-if="$i18n.locale=='zh'?true:false" v-for="(item,index) in switchList" :class="demo == index ?'switchSecond':'switchFirst'" style="width: 100px;line-height: 50px" :key="index" @click="switchTabs(index)"
  98. >
  99. {{item}}
  100. </li>
  101. <li v-if="$i18n.locale=='zh'?false:true" v-for="(item,index) in switchList1" :class="demo == index ?'switchSecond':'switchFirst'" style="width: 100px;line-height: 50px" :key="index" @click="switchTabs(index)"
  102. >
  103. {{item}}
  104. </li>
  105. </ul>
  106. </div>-->
  107. <div v-if="demo== 0?true:false">
  108. <div v-if="showContent" style="width: 100%" :class="$i18n.locale=='zh'?'content':'contentEn'">
  109. <ul>
  110. <li
  111. v-for="(item, index) in allInformation"
  112. style="margin-left: 25px; margin-right: 15px; float: left"
  113. @click="toDetail(item)"
  114. >
  115. <el-card>
  116. <img
  117. style="width: 208px; height: 288px; display: block"
  118. :src="'data:image/jpeg;base64,' + item.coverBase64"
  119. alt=""
  120. />
  121. </el-card>
  122. <div class="title" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
  123. <span :title="item.title" >{{ item.title }}</span>
  124. </div>
  125. <div class="committee" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
  126. <span :title="item.reserveFour" >{{ item.reserveFour }}</span>
  127. </div>
  128. <div class="Time">
  129. <span>{{
  130. item.createDate | time("YYYY-MM-DD HH:mm:ss")
  131. }}</span>
  132. </div>
  133. </li>
  134. </ul>
  135. </div>
  136. <div v-else :class="$i18n.locale=='zh'?'content':'contentEn'">
  137. <div style="margin-left: 550px">
  138. <el-empty :description="$t('common.noData')"></el-empty>
  139. </div>
  140. </div>
  141. <!-- 分页 -->
  142. <div class="pag">
  143. <el-pagination
  144. type="index"
  145. background
  146. :prev-text= "prevText"
  147. :next-text="nextText"
  148. layout="prev, pager, next, total"
  149. :page-sizes="[8, 20, 50, 100, 200]"
  150. :total="total - 0"
  151. @current-change="handleCurrentChange"
  152. @size-change="handleSizeChange"
  153. ></el-pagination>
  154. </div>
  155. </div>
  156. <div v-else>
  157. <div v-if="showContent1" style="width: 100%" :class="$i18n.locale=='zh'?'content':'contentEn'">
  158. <ul>
  159. <li
  160. v-for="(item, index) in subscribeList"
  161. style="margin-left: 25px; margin-right: 15px; float: left"
  162. @click="toDetail(item)"
  163. >
  164. <el-card>
  165. <img
  166. style="width: 208px; height: 288px; display: block"
  167. :src="'data:image/jpeg;base64,' + item.coverBase64"
  168. alt=""
  169. />
  170. </el-card>
  171. <div class="title" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
  172. <span :title="item.title" >{{ item.title }}</span>
  173. </div>
  174. <div class="committee" style="overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
  175. <span :title="item.reserveFour" >{{ item.reserveFour }}</span>
  176. </div>
  177. <div class="Time">
  178. <span>{{
  179. item.createDate | time("YYYY-MM-DD HH:mm:ss")
  180. }}</span>
  181. </div>
  182. </li>
  183. </ul>
  184. </div>
  185. <div v-if="!showContent1" :class="$i18n.locale=='zh'?'content':'contentEn'">
  186. <div style="margin-left: 550px">
  187. <el-empty :description="$t('common.noData')"></el-empty>
  188. </div>
  189. </div>
  190. <!-- 分页 -->
  191. <div v-if="showContent1" class="pag">
  192. <el-pagination
  193. type="index"
  194. background
  195. :prev-text= "prevText"
  196. :next-text="nextText"
  197. layout="prev, pager, next, total"
  198. :page-sizes="[8, 20, 50, 100, 200]"
  199. :total="total1 - 0"
  200. @current-change="handleCurrentChange1"
  201. @size-change="handleSizeChange1"
  202. ></el-pagination>
  203. </div>
  204. </div>
  205. </div>
  206. <!-- 订阅dialog -->
  207. <el-dialog
  208. :visible.sync="subscribeDialogVisible"
  209. width="30%"
  210. :before-close="dialogBeforeClose"
  211. >
  212. <div style="padding: 0 50px 0 0px">
  213. <el-form ref="form" :model="form" label-width="200px">
  214. <el-form-item :label="$t('common.subscribe')">
  215. <el-select
  216. multiple
  217. style="width: 80%;overflow: hidden;text-overflow: ellipsis;white-space: normal;"
  218. v-model="form.committee"
  219. :placeholder="$t('common.selectCommittee')"
  220. >
  221. <el-option
  222. v-for="item in nationalCommitteeList"
  223. :key="item.id"
  224. :label="$i18n.locale === 'en' ? item.label2 : item.label"
  225. :value="item.id"
  226. >
  227. </el-option>
  228. </el-select>
  229. <div style="display: flex">
  230. <img
  231. style="
  232. display: block;
  233. width: 16px;
  234. height: 16px;
  235. margin-top: 10px;
  236. "
  237. src="@/assets/img/committeeWorkSpace/tishi.png"
  238. alt=""
  239. />
  240. <span style="margin-left: 5px">{{
  241. $t("common.multipleCommittee")
  242. }}</span>
  243. </div>
  244. </el-form-item>
  245. <el-form-item :label="$t('common.updateNotice')">
  246. <el-radio-group v-model="form.resource">
  247. <el-radio label="2">{{ $t("common.noNeed") }}</el-radio>
  248. <el-radio label="1">{{ $t("common.need") }}</el-radio>
  249. </el-radio-group>
  250. </el-form-item>
  251. <el-form-item v-if="isShow" :label="$t('common.mail')">
  252. <el-input
  253. style="width: 80%"
  254. v-model="form.email"
  255. :placeholder="$t('common.pleaseInput')"
  256. ></el-input>
  257. </el-form-item>
  258. <el-form-item v-if="isShow" :label="$t('common.pushFrequency')">
  259. <el-select
  260. style="width: 80%"
  261. v-model="form.push"
  262. :placeholder="$t('common.select')"
  263. >
  264. <el-option
  265. :label="$t('common.monthly')"
  266. value="1"
  267. ></el-option>
  268. <el-option :label="$t('common.season')" value="2"></el-option>
  269. </el-select>
  270. </el-form-item>
  271. </el-form>
  272. <div class="backImg">
  273. <img
  274. src="@/assets/img/committeeWorkSpace/background (2).png"
  275. alt=""
  276. />
  277. </div>
  278. </div>
  279. <div slot="footer" style="margin-right: 28%">
  280. <el-button
  281. type="primary"
  282. style="width: 120px"
  283. @click="subscription"
  284. >{{ $t("common.subscribe") }}</el-button
  285. >
  286. <el-button style="width: 120px" @click="cancel">{{
  287. $t("common.cancel")
  288. }}</el-button>
  289. </div>
  290. </el-dialog>
  291. </div>
  292. </div>
  293. </div>
  294. </template>
  295. <script>
  296. import {
  297. toObtainListAllInformation2,
  298. allDataQuery,
  299. queryNationalCommittee,
  300. getNationalCommittee,
  301. allDataSubscription,
  302. determineWhetherToSubscribeTo,
  303. getTheSubscriptionListOfAllMaterials,
  304. unsubscribe,
  305. } from "@/api/committee/committeeWorkSpace";
  306. import moment from "moment";
  307. import { getToken } from "@/api/token";
  308. import Screen from "@/components/screen";
  309. import {getWorkSpacePermission} from "@/api/committee/nrc";
  310. export default {
  311. name: "CommitteeInformation",
  312. components: {
  313. Screen,
  314. },
  315. data() {
  316. return {
  317. switchList:['全部',"订阅"],
  318. switchList1:['All',"Subscribe"],
  319. activeName:'first',
  320. data: [
  321. {
  322. url: "https://img0.baidu.com/it/u=1612726526,4275795108&fm=253&fmt=auto&app=138&f=JPEG?w=717&h=500",
  323. id: 1,
  324. time: "2021-10-31",
  325. type: "哥伦比亚互联网研究",
  326. },
  327. {
  328. url: "https://img0.baidu.com/it/u=1612726526,4275795108&fm=253&fmt=auto&app=138&f=JPEG?w=717&h=500",
  329. id: 2,
  330. time: "2021-10-31",
  331. type: "全球能源互联网解决无电、贫困、健康问题行动计划",
  332. },
  333. {
  334. url: "https://img0.baidu.com/it/u=1612726526,4275795108&fm=253&fmt=auto&app=138&f=JPEG?w=717&h=500",
  335. id: 3,
  336. time: "2021-10-31",
  337. type: "公文",
  338. },
  339. {
  340. url: "https://img0.baidu.com/it/u=1612726526,4275795108&fm=253&fmt=auto&app=138&f=JPEG?w=717&h=500",
  341. id: 4,
  342. time: "2021-10-31",
  343. type: "公文",
  344. },
  345. {
  346. url: "https://img0.baidu.com/it/u=1612726526,4275795108&fm=253&fmt=auto&app=138&f=JPEG?w=717&h=500",
  347. id: 5,
  348. time: "2021-10-31",
  349. type: "公文",
  350. },
  351. {
  352. url: "https://img0.baidu.com/it/u=1612726526,4275795108&fm=253&fmt=auto&app=138&f=JPEG?w=717&h=500",
  353. id: 6,
  354. time: "2021-10-31",
  355. type: "公文",
  356. },
  357. ],
  358. form: {
  359. committee: "",
  360. resource: "1",
  361. email: "",
  362. push: "",
  363. },
  364. pageSize:undefined,
  365. pageSize1:undefined,
  366. isShow: true,
  367. subscribeDialogVisible: null,
  368. imformationSearch: "",
  369. search: "",
  370. prevText:"上一页",
  371. nextText:"下一页",
  372. screen1s: {
  373. value: "common.regionalCommissions",
  374. item: [],
  375. },
  376. screen2s: {
  377. value: "common.Byletter",
  378. item: [
  379. {
  380. value: null,
  381. ifValue: true,
  382. label: "common.All",
  383. },
  384. {
  385. ifValue: false,
  386. value: "A",
  387. label: "A",
  388. },
  389. {
  390. ifValue: false,
  391. value: "B",
  392. label: "B",
  393. },
  394. {
  395. ifValue: false,
  396. value: "C",
  397. label: "C",
  398. },
  399. {
  400. ifValue: false,
  401. value: "D",
  402. label: "D",
  403. },
  404. {
  405. ifValue: false,
  406. value: "E",
  407. label: "E",
  408. },
  409. {
  410. ifValue: false,
  411. value: "F",
  412. label: "F",
  413. },
  414. {
  415. ifValue: false,
  416. value: "G",
  417. label: "G",
  418. },
  419. {
  420. ifValue: false,
  421. value: "H",
  422. label: "H",
  423. },
  424. {
  425. ifValue: false,
  426. value: "I",
  427. label: "I",
  428. },
  429. {
  430. ifValue: false,
  431. value: "J",
  432. label: "J",
  433. },
  434. {
  435. ifValue: false,
  436. value: "K",
  437. label: "K",
  438. },
  439. {
  440. ifValue: false,
  441. value: "L",
  442. label: "L",
  443. },
  444. {
  445. ifValue: false,
  446. value: "M",
  447. label: "M",
  448. },
  449. {
  450. ifValue: false,
  451. value: "N",
  452. label: "N",
  453. },
  454. {
  455. ifValue: false,
  456. value: "O",
  457. label: "O",
  458. },
  459. {
  460. ifValue: false,
  461. value: "P",
  462. label: "P",
  463. },
  464. {
  465. ifValue: false,
  466. value: "Q",
  467. label: "Q",
  468. },
  469. {
  470. ifValue: false,
  471. value: "R",
  472. label: "R",
  473. },
  474. {
  475. ifValue: false,
  476. value: "S",
  477. label: "S",
  478. },
  479. {
  480. ifValue: false,
  481. value: "T",
  482. label: "T",
  483. },
  484. {
  485. ifValue: false,
  486. value: "U",
  487. label: "U",
  488. },
  489. {
  490. ifValue: false,
  491. value: "V",
  492. label: "V",
  493. },
  494. {
  495. ifValue: false,
  496. value: "W",
  497. label: "W",
  498. },
  499. {
  500. ifValue: false,
  501. value: "X",
  502. label: "X",
  503. },
  504. {
  505. ifValue: false,
  506. value: "Y",
  507. label: "Y",
  508. },
  509. {
  510. ifValue: false,
  511. value: "Z",
  512. label: "Z",
  513. },
  514. ],
  515. },
  516. screen1def: null,
  517. screen2Item: null,
  518. allInformation: [],
  519. regionalNationalCommission: "",
  520. regionalNationalCommissionList: [],
  521. regionalNationalCommissionListFull: [],
  522. committeeoptionsfull: [],
  523. total: "",
  524. total1: "",
  525. pageNo: "",
  526. pageNo1: "",
  527. committee: "",
  528. letter: "",
  529. showContent: true,
  530. showContent1: true,
  531. nationalCommitteeList: [],
  532. subscriptionInformation: {
  533. createBy: "",
  534. createDate: "",
  535. frequency: "",
  536. id: "",
  537. mailAddr: "",
  538. reserveFive: "",
  539. reserveFour: "",
  540. reserveOne: "",
  541. reserveThree: "",
  542. reserveTwo: "",
  543. sendMail: "",
  544. subscribeCommittee: "",
  545. subscribeStatus: "",
  546. subscribeTime: "",
  547. subscriber: "",
  548. updateBy: "",
  549. updateDate: "",
  550. },
  551. isSubscription: null,
  552. imgPath: "",
  553. imgUrlZero: "",
  554. imgUrlOne: "",
  555. imgUrlTwo: "",
  556. imgUrlThree: "",
  557. imgUrlFour: "",
  558. imgUrlFive: "",
  559. imgUrlSix: "",
  560. imgUrlSeven: "",
  561. demo:0,
  562. subscribeList:[],
  563. };
  564. },
  565. filters: {
  566. time(date, type) {
  567. return moment(date).format(type);
  568. },
  569. },
  570. watch: {
  571. "$i18n.locale"() {
  572. this.queryNationalCommittee();
  573. this.toObtainListAllInformation();
  574. if(this.$i18n.locale != 'en'){
  575. this.prevText="上一页";
  576. this.nextText="下一页";
  577. }else{
  578. this.prevText="Previous";
  579. this.nextText="Next";
  580. }
  581. this.nationalCommitteeList = new Array();
  582. if(this.$i18n.locale == "en"){
  583. for(let i=0;i<this.committeeoptionsfull.length;i++){
  584. if(this.committeeoptionsfull[i].label2!="" && this.committeeoptionsfull[i].label2!=null && this.committeeoptionsfull[i].label2!=undefined){
  585. this.nationalCommitteeList.push(this.committeeoptionsfull[i]);
  586. }
  587. }
  588. }else{
  589. this.nationalCommitteeList = this.committeeoptionsfull;
  590. }
  591. this.regionalNationalCommissionList = new Array();
  592. if(this.$i18n.locale == "en"){
  593. for(let i=0;i<this.regionalNationalCommissionListFull.length;i++){
  594. if(this.regionalNationalCommissionListFull[i].committeeNameEn!="" && this.regionalNationalCommissionListFull[i].committeeNameEn!=null && this.regionalNationalCommissionListFull[i].committeeNameEn!=undefined){
  595. this.regionalNationalCommissionList.push(this.regionalNationalCommissionListFull[i]);
  596. }
  597. }
  598. }else{
  599. this.regionalNationalCommissionList = this.regionalNationalCommissionListFull;
  600. }
  601. },
  602. "form.resource": {
  603. handler() {
  604. if (this.form.resource === "2") {
  605. this.isShow = false;
  606. } else {
  607. this.isShow = true;
  608. }
  609. },
  610. deep: true,
  611. },
  612. regionalNationalCommission: {
  613. handler() {
  614. this.committee = this.regionalNationalCommission;
  615. this.toObtainListAllInformation();
  616. this.getSubscriptionList();
  617. },
  618. deep: true,
  619. },
  620. },
  621. mounted() {
  622. this.initData();
  623. if(this.$i18n.locale != 'en'){
  624. this.prevText="上一页";
  625. this.nextText="下一页";
  626. }else{
  627. this.prevText="Previous";
  628. this.nextText="Next";
  629. }
  630. },
  631. destroyed() {},
  632. methods: {
  633. switchTabs(index) {
  634. this.demo = index
  635. },
  636. initData() {
  637. this.determineWhetherToSubscribeTo();
  638. this.toObtainListAllInformation();
  639. this.accessToNationalCommittee();
  640. this.queryNationalCommittee();
  641. this.getSubscriptionList();
  642. },
  643. // 查询条件
  644. queryNationalCommittee() {
  645. allDataQuery().then((res) => {
  646. var data = res.data;
  647. var dataFull = new Array();
  648. if(this.$i18n.locale == 'en'){
  649. for (let i = 0; i < data.length; i++) {
  650. if(data[i].label2!="" && data[i].label2!=null && data[i].label2!=undefined){
  651. data[i].label = data[i].label2
  652. dataFull.push(data[i]);
  653. }
  654. }
  655. }else{
  656. dataFull=data;
  657. }
  658. console.log(data);
  659. if (data) {
  660. this.screen1s.item = dataFull || [];
  661. let labelmsg = "";
  662. if(this.$i18n.locale == "en"){
  663. labelmsg = "All";
  664. }else{
  665. labelmsg = "全部";
  666. }
  667. let both = {
  668. label: labelmsg,
  669. value: null,
  670. };
  671. this.screen1s.item.unshift(both);
  672. }
  673. });
  674. },
  675. // 获取国家委员会
  676. accessToNationalCommittee() {
  677. var id = this.committee ? this.committee : "";
  678. queryNationalCommittee(id).then((res) => {
  679. this.regionalNationalCommissionListFull = res.data;
  680. // this.regionalNationalCommissionList = res.data;
  681. console.log(res.data);
  682. if(this.$i18n.locale == "en"){
  683. for(let i=0;i<this.regionalNationalCommissionListFull.length;i++){
  684. if(this.regionalNationalCommissionListFull[i].committeeNameEn!="" && this.regionalNationalCommissionListFull[i].committeeNameEn!=null && this.regionalNationalCommissionListFull[i].committeeNameEn!=undefined){
  685. this.regionalNationalCommissionList.push(this.regionalNationalCommissionListFull[i]);
  686. }
  687. }
  688. }else{
  689. this.regionalNationalCommissionList = this.regionalNationalCommissionListFull;
  690. }
  691. });
  692. },
  693. // 获取全部资料列表
  694. toObtainListAllInformation() {
  695. var params = this.pageNo ? this.pageNo : "1";
  696. var query = this.committee ? this.committee : "";
  697. var pageSize = this.pageSize ? this.pageSize : "8";
  698. var query1 = this.letter ? this.letter : "";
  699. var queryConditions = this.search ? this.search : "";
  700. toObtainListAllInformation2(params, pageSize, query, query1, queryConditions).then(
  701. (res) => {
  702. var data = res.data;
  703. if (JSON.stringify(data) !== "{}") {
  704. this.showContent = true;
  705. this.allInformation = res.data.nrcMaterialStorehouses;
  706. if(this.$i18n.locale == 'en'){
  707. for (let i = 0; i < this.allInformation.length; i++) {
  708. this.allInformation[i].reserveFour = this.allInformation[i].belongCommitteeEn
  709. }
  710. }
  711. this.total = res.data.page.totalCount;
  712. } else {
  713. this.showContent = false;
  714. }
  715. }
  716. );
  717. },
  718. // 获取订阅列表
  719. getSubscriptionList(){
  720. var params = this.pageNo1 ? this.pageNo1 : "1";
  721. var query = this.committee ? this.committee : "";
  722. var pageSize = this.pageSize1 ? this.pageSize1 : "8";
  723. var query1 = this.letter ? this.letter : "";
  724. var queryConditions = this.search ? this.search : "";
  725. getTheSubscriptionListOfAllMaterials(params, pageSize, query, query1, queryConditions).then((res) => {
  726. var data = res.data;
  727. console.log(res)
  728. if (JSON.stringify(data) !== "{}") {
  729. this.showContent1 = true;
  730. this.subscribeList = res.data.nrcMaterialStorehouse;
  731. // if(this.$i18n.locale == 'en'){
  732. // for (let i = 0; i < this.allInformation.length; i++) {
  733. // this.allInformation[i].reserveFour = this.allInformation[i].belongCommitteeEn
  734. // }
  735. // }
  736. this.total1 = res.data.page.totalCount;
  737. } else {
  738. this.subscribeList = []
  739. this.showContent1 = false;
  740. }
  741. })
  742. .catch((err) => {
  743. console.log(111)
  744. this.showContent1 = false;
  745. })
  746. },
  747. // 订阅 获取国家委员会
  748. getNationalCommitteeList() {
  749. getNationalCommittee().then((res) => {
  750. var data = res.data;
  751. if (data) {
  752. // this.nationalCommitteeList = data;
  753. this.committeeoptionsfull = data;
  754. }
  755. if(this.$i18n.locale == "en"){
  756. for(let i=0;i<this.committeeoptionsfull.length;i++){
  757. if(this.committeeoptionsfull[i].label2!="" && this.committeeoptionsfull[i].label2!=null && this.committeeoptionsfull[i].label2!=undefined){
  758. this.nationalCommitteeList.push(this.committeeoptionsfull[i]);
  759. }
  760. }
  761. }else{
  762. this.nationalCommitteeList = this.committeeoptionsfull;
  763. }
  764. });
  765. },
  766. // 判断是否订阅
  767. determineWhetherToSubscribeTo() {
  768. getToken().then((res) => {
  769. determineWhetherToSubscribeTo(res.data).then((res) => {
  770. if (res.data) {
  771. this.isSubscription = true;
  772. } else {
  773. this.isSubscription = false;
  774. }
  775. });
  776. });
  777. },
  778. // 取消订阅
  779. cancelSubscribe() {
  780. getToken().then((res) => {
  781. unsubscribe(res.data).then((res) => {
  782. if (res.status === "200") {
  783. this.determineWhetherToSubscribeTo();
  784. this.getSubscriptionList()
  785. let msg = '';
  786. if(this.$i18n.locale == 'en'){
  787. msg = `Unsubscribe Successfully `
  788. }else{
  789. msg = `取消订阅成功`
  790. }
  791. this.$message({
  792. message: msg,
  793. type: "success",
  794. });
  795. }
  796. });
  797. });
  798. },
  799. handleSizeChange(val) {
  800. this.pageSize = val;
  801. this.toObtainListAllInformation();
  802. console.log(`每页 ${val} 条`);
  803. },
  804. handleCurrentChange(val) {
  805. this.pageNo = val;
  806. this.toObtainListAllInformation();
  807. window.scrollTo(0, 0);
  808. },
  809. handleSizeChange1(val) {
  810. this.pageSize1 = val;
  811. this.getSubscriptionList();
  812. console.log(`每页 ${val} 条`);
  813. },
  814. handleCurrentChange1(val) {
  815. this.pageNo1 = val;
  816. this.getSubscriptionList();
  817. window.scrollTo(0, 0);
  818. },
  819. // 上传
  820. toUpload() {
  821. getWorkSpacePermission().then(res => {
  822. if(res.data == 1){
  823. this.$router.push("uploadCommitteeInformation");
  824. }else {
  825. if(this.$i18n.locale == 'en'){
  826. this.$message.error("The User Does Not Have Access Permission");
  827. }else {
  828. this.$message.error("该账户没有上传权限");
  829. }
  830. return
  831. }
  832. })
  833. },
  834. // 订阅
  835. subscribe() {
  836. this.getNationalCommitteeList();
  837. this.subscribeDialogVisible = true;
  838. },
  839. subscription() {
  840. getToken().then((res) => {
  841. this.subscriptionInformation.frequency = this.form.push;
  842. this.subscriptionInformation.mailAddr = this.form.email;
  843. this.subscriptionInformation.sendMail = this.form.resource;
  844. this.subscriptionInformation.subscribeCommittee =
  845. this.form.committee.toString();
  846. let params = this.subscriptionInformation;
  847. console.log(params);
  848. allDataSubscription(res.data, params)
  849. .then((res) => {
  850. let msg ='';
  851. if(this.$i18n.locale == 'en'){
  852. msg = `Subscription Succeeded`
  853. }else{
  854. msg = `订阅成功`
  855. }
  856. if (res) {
  857. this.$message({
  858. message: msg,
  859. type: "success",
  860. });
  861. this.emptyForm();
  862. this.subscribeDialogVisible = false;
  863. this.determineWhetherToSubscribeTo();
  864. this.getSubscriptionList();
  865. }
  866. })
  867. .catch((error) => {
  868. // this.emptyForm();
  869. // this.subscribeDialogVisible = false;
  870. if(this.$i18n.locale == 'en'){
  871. if(error.msg=="请输入必填参数"){
  872. error.msg="Please enter required parameter";
  873. }
  874. }
  875. this.$message({
  876. message: `${error.msg}`,
  877. type: "error",
  878. });
  879. });
  880. });
  881. },
  882. cancel() {
  883. this.emptyForm();
  884. this.subscribeDialogVisible = false;
  885. },
  886. // 清空form
  887. emptyForm() {
  888. this.form.committee = "";
  889. this.form.email = "";
  890. this.form.push = "";
  891. },
  892. dialogBeforeClose() {
  893. this.emptyForm();
  894. this.subscribeDialogVisible = false;
  895. },
  896. toDetail(item) {
  897. this.$router.push({
  898. name: "CommitteeInformationListDetail",
  899. params: { id: item.id },
  900. });
  901. },
  902. screenBack(data) {
  903. this.committee = data.click1;
  904. this.letter = data.click2;
  905. this.regionalNationalCommission = "";
  906. this.toObtainListAllInformation();
  907. this.accessToNationalCommittee();
  908. this.getSubscriptionList()
  909. },
  910. // 搜索
  911. searchTitle() {
  912. this.toObtainListAllInformation();
  913. this.getSubscriptionList()
  914. },
  915. // 清空输入款
  916. reset() {
  917. this.toObtainListAllInformation();
  918. this.getSubscriptionList();
  919. },
  920. // 清空选择框
  921. reset1() {
  922. this.toObtainListAllInformation();
  923. this.getSubscriptionList();
  924. },
  925. },
  926. };
  927. </script>
  928. <style scoped>
  929. .backImg {
  930. position: absolute;
  931. right: 0;
  932. bottom: 0;
  933. z-index: -10;
  934. }
  935. ::v-deep .el-dialog {
  936. left: 50%;
  937. top: 50%;
  938. transform: translate(-50%, -50%);
  939. margin: 0px !important;
  940. }
  941. .box1 {
  942. padding: 0 0 20px 0;
  943. position: absolute;
  944. }
  945. .center {
  946. display: flex;
  947. }
  948. .topImg {
  949. display: inline-block;
  950. width: 1200px;
  951. height: 324px;
  952. background: url("../../assets/img/committeeWorkSpace/informationTop.png")
  953. no-repeat 100% 100%;
  954. }
  955. .topLeft {
  956. position: absolute;
  957. left: 200px;
  958. top: 100px;
  959. }
  960. .topLeft span {
  961. font-family: "PingFang SC";
  962. font-style: normal;
  963. font-weight: 500;
  964. font-size: 24px;
  965. line-height: 25px;
  966. /* display: flex;
  967. align-items: center; */
  968. text-align: center;
  969. font-feature-settings: "tnum" on, "lnum" on;
  970. color: #274e92;
  971. }
  972. .topTitle {
  973. position: absolute;
  974. left: 200px;
  975. top: 120px;
  976. }
  977. .topTitle h1 {
  978. color: #ffffff;
  979. font-size: 40px;
  980. }
  981. .topRight {
  982. position: absolute;
  983. right: 0;
  984. width: 500px;
  985. height: 324px;
  986. }
  987. .topRight .img1 {
  988. position: absolute;
  989. top: 70px;
  990. left: 20px;
  991. z-index: 9;
  992. }
  993. .topRight .img2 {
  994. position: absolute;
  995. top: 50px;
  996. left: 160px;
  997. z-index: 8;
  998. }
  999. .topRight .img3 {
  1000. position: absolute;
  1001. top: 40px;
  1002. left: 270px;
  1003. z-index: 7;
  1004. }
  1005. .topSearch {
  1006. position: absolute;
  1007. right: 20px;
  1008. }
  1009. .pag {
  1010. position: absolute;
  1011. bottom: 0;
  1012. right: 25%;
  1013. }
  1014. .centerLeft1 {
  1015. height: 1250px;
  1016. width: 1200px;
  1017. border-radius: 0px;
  1018. background: #fff;
  1019. }
  1020. .centerLeft1En {
  1021. height: 1350px;
  1022. width: 1200px;
  1023. border-radius: 0px;
  1024. background: #fff;
  1025. }
  1026. .left {
  1027. position: relative;
  1028. }
  1029. .top .top1 {
  1030. position: absolute;
  1031. width: 5.5px;
  1032. height: 10.5px;
  1033. left: 20px;
  1034. top: 35px;
  1035. background: #376ac7;
  1036. z-index: 1;
  1037. }
  1038. .top .top2 {
  1039. position: absolute;
  1040. width: 5.5px;
  1041. height: 15px;
  1042. left: 20px;
  1043. top: 35px;
  1044. background: #83bd50;
  1045. }
  1046. .top .allApplication {
  1047. position: absolute;
  1048. height: 22px;
  1049. left: 34px;
  1050. top: 31px;
  1051. }
  1052. .top .allApplication span {
  1053. font-family: "PingFang SC";
  1054. font-style: normal;
  1055. font-weight: 600;
  1056. font-size: 16px;
  1057. line-height: 22px;
  1058. color: #375586;
  1059. }
  1060. .top .notice {
  1061. position: absolute;
  1062. height: 22px;
  1063. left: 160px;
  1064. top: 32px;
  1065. }
  1066. .top .notice span {
  1067. font-family: "PingFang SC";
  1068. font-style: normal;
  1069. font-weight: 600;
  1070. font-size: 16px;
  1071. line-height: 22px;
  1072. color: rgba(10, 10, 10, 0.85);
  1073. }
  1074. .top .more {
  1075. position: absolute;
  1076. height: 16px;
  1077. right: 21px;
  1078. top: 31px;
  1079. }
  1080. .top .more span {
  1081. font-family: "Roboto";
  1082. font-style: normal;
  1083. font-weight: 500;
  1084. font-size: 14px;
  1085. line-height: 16px;
  1086. color: #4790f7;
  1087. }
  1088. .area {
  1089. position: absolute;
  1090. top: 400px;
  1091. }
  1092. .toggleLabel{
  1093. text-align: center;
  1094. width: 300px;
  1095. cursor:pointer;
  1096. position: absolute;
  1097. top: 540px;
  1098. margin-left: 50px;
  1099. }
  1100. .toggleLabelEn{
  1101. text-align: center;
  1102. width: 300px;
  1103. cursor:pointer;
  1104. position: absolute;
  1105. top: 620px;
  1106. margin-left: 50px;
  1107. }
  1108. .switchFirst{
  1109. color:#999;
  1110. }
  1111. .switchSecond{
  1112. color: #2779fb;
  1113. border-bottom: 3px solid #2779fb;
  1114. }
  1115. .choice {
  1116. position: absolute;
  1117. right: 0;
  1118. top: 55px;
  1119. }
  1120. .content {
  1121. position: absolute;
  1122. top:530px;
  1123. overflow: auto;
  1124. height: 62%;
  1125. }
  1126. .contentEn{
  1127. position: absolute;
  1128. top:630px;
  1129. overflow: auto;
  1130. height: 62%;
  1131. }
  1132. .contentEn .title {
  1133. width: 208px;
  1134. height: 30px;
  1135. text-align: center;
  1136. /*text-overflow: -o-ellipsis-lastline;*/
  1137. overflow: hidden;
  1138. text-overflow: ellipsis;
  1139. /*display: -webkit-box;*/
  1140. /*-webkit-line-clamp: 2;*/
  1141. /*line-clamp: 2;*/
  1142. -webkit-box-orient: vertical;
  1143. margin-left: 15px;
  1144. margin-top: 5px;
  1145. }
  1146. .contentEn .committee {
  1147. height: 30px;
  1148. max-width: 230px;
  1149. /*margin-top: 10px;*/
  1150. font-family: "PingFang SC";
  1151. font-style: normal;
  1152. font-weight: 400;
  1153. font-size: 16px;
  1154. line-height: 25px;
  1155. color: rgba(0, 0, 0, 0.65);
  1156. text-align: center;
  1157. font-feature-settings: "tnum" on, "lnum" on;
  1158. }
  1159. .contentEn .Time {
  1160. /* width: 208px; */
  1161. height: 44px;
  1162. font-family: "PingFang SC";
  1163. font-style: normal;
  1164. font-weight: 400;
  1165. font-size: 16px;
  1166. line-height: 25px;
  1167. color: rgba(0, 0, 0, 0.65);
  1168. text-align: center;
  1169. font-feature-settings: "tnum" on, "lnum" on;
  1170. }
  1171. .contentEn .title span {
  1172. font-family: "PingFang SC";
  1173. font-style: normal;
  1174. font-weight: 500;
  1175. font-size: 18px;
  1176. line-height: 22px;
  1177. color: rgba(0, 0, 0, 0.85);
  1178. }
  1179. .content .title {
  1180. width: 208px;
  1181. height: 30px;
  1182. text-align: center;
  1183. /*text-overflow: -o-ellipsis-lastline;*/
  1184. overflow: hidden;
  1185. text-overflow: ellipsis;
  1186. /*display: -webkit-box;*/
  1187. /*-webkit-line-clamp: 2;*/
  1188. /*line-clamp: 2;*/
  1189. -webkit-box-orient: vertical;
  1190. margin-left: 15px;
  1191. margin-top: 5px;
  1192. }
  1193. .content .committee {
  1194. height: 30px;
  1195. max-width: 230px;
  1196. /*margin-top: 10px;*/
  1197. font-family: "PingFang SC";
  1198. font-style: normal;
  1199. font-weight: 400;
  1200. font-size: 16px;
  1201. line-height: 25px;
  1202. color: rgba(0, 0, 0, 0.65);
  1203. text-align: center;
  1204. font-feature-settings: "tnum" on, "lnum" on;
  1205. }
  1206. .content .Time {
  1207. /* width: 208px; */
  1208. height: 44px;
  1209. font-family: "PingFang SC";
  1210. font-style: normal;
  1211. font-weight: 400;
  1212. font-size: 16px;
  1213. line-height: 25px;
  1214. color: rgba(0, 0, 0, 0.65);
  1215. text-align: center;
  1216. font-feature-settings: "tnum" on, "lnum" on;
  1217. }
  1218. .content .title span {
  1219. font-family: "PingFang SC";
  1220. font-style: normal;
  1221. font-weight: 500;
  1222. font-size: 18px;
  1223. line-height: 22px;
  1224. color: rgba(0, 0, 0, 0.85);
  1225. }
  1226. </style>