NationalregionalCommissionsDevelopments.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. <template>
  2. <div>
  3. <div class="autoBox box">
  4. <div style="margin-left: 20px;">
  5. <el-breadcrumb separator="/" style="float: left;margin-left:15px; ">
  6. <el-breadcrumb-item :to="{ path: 'home' }">{{$t('common.Home')}}</el-breadcrumb-item>
  7. <el-breadcrumb-item>{{$t('common.NationalregionalCommissions')}}</el-breadcrumb-item>
  8. <el-breadcrumb-item >{{Screens}}</el-breadcrumb-item>
  9. <el-breadcrumb-item >{{$t('common.DynamicsInfo')}}</el-breadcrumb-item>
  10. </el-breadcrumb>
  11. <el-breadcrumb separator="/" style="float: right;margin:0px 15px 0 0" >
  12. <span class="cursor" :class="screenIndex==index?'screen1':'screen2'" @click="realTimeInfoScreen(item,index)"
  13. v-for="(item,index) in realTimeInfoScreens"> &nbsp;&nbsp;{{item.lable}} &nbsp;&nbsp;<span v-if="index+1!==realTimeInfoScreens.length">/</span></span>
  14. </el-breadcrumb>
  15. </div>
  16. <div style="margin-top: 30px;width: 100%;height: 260px;margin-left: 20px;">
  17. <div style="float: left;width: 55%;height: 100%;">
  18. <img :src="'api/file/pub/' " alt=""
  19. style=" width:100%;height:260px;" >
  20. </div>
  21. <div style="float: left;width: 42%;height: 100%;position: relative;">
  22. <!-- <span style="position: absolute;top: 0;right: 0;font-size: 14px;
  23. color: #0000ff;cursor: pointer;">分享</span> -->
  24. <div style="margin-top: 20px;width: 100%;">
  25. <div style="line-height: 25px;text-align: left;margin-left: 50px;
  26. font-weight: 700;">
  27. 2019全球能源互联网暨中-非能源电力大会
  28. </div>
  29. <div style="width: 100%;line-height: 45px;font-size: 14px;">
  30. <span style="margin-left: 50px;margin-right: 15px;">
  31. {{$t('common.place')}}:中国-北京
  32. </span>
  33. <span>
  34. {{$t('common.line')}}:
  35. 2020-07-21 至2020-07-23
  36. </span>
  37. <span v-if="ifcommon" @click="follow()" style="margin-left: 30px; color: #66b1ff;cursor:pointer;" >
  38. <i class = "el-icon-star-off"></i>
  39. {{$t('common.Concerned')}}
  40. </span>
  41. <span v-else @click="follow()" style="margin-left: 30px;cursor:pointer;" >
  42. <i class = "el-icon-star-off"></i>
  43. {{$t('common.follow')}}
  44. </span>
  45. <div style="width: 80%;font-size: 14px;height: 75px;
  46. -webkit-box-orient: vertical;
  47. position:relative;
  48. line-height:1.4em;
  49. overflow: hidden;
  50. height:3.9em;
  51. color: #666666;margin-left: 50px;line-height: 25px;margin-top: -10px;" class="plateCountry">
  52. 为加快全球能源互联网发展,推动“中国倡议”落地非洲,深化中非能源电力合作,合作组织与有关方面联合举办2019全球能源互联网暨中-非能源电力大会,围绕“全球能源互联网——绿色低碳可持续发展之路”和“非洲能源互联网——非洲发展新动能”两大主题开展交流研讨,发布《刚果河流域水电开发与外送研究》《构建...
  53. </div>
  54. <div style="font-size: 14px;height: 40px;text-align: center;margin-top: 20px;">
  55. <el-button type="primary"
  56. round
  57. style="width: 76px;height: 24px;line-height: 4px"
  58. @click="signUp">
  59. 报名
  60. </el-button>
  61. </div>
  62. </div>
  63. </div>
  64. </div>
  65. </div>
  66. <div style="margin: 10px 20px;">
  67. <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  68. style="height: 20px;vertical-align: middle;">
  69. 活动概述
  70. </div>
  71. <div style="margin: 10px 20px;">
  72. asdsad
  73. </div>
  74. <div style="margin: 10px 20px;">
  75. <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  76. style="height: 20px;vertical-align: middle;">
  77. 活动专家介绍
  78. </div>
  79. <div style="margin: 10px 20px;">
  80. asdsad
  81. </div>
  82. <div style="margin: 10px 20px;">
  83. <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  84. style="height: 20px;vertical-align: middle;">
  85. 活动亮点
  86. </div>
  87. <div style="margin: 10px 20px;">
  88. asdsad
  89. </div>
  90. <div style="margin: 10px 20px;">
  91. <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  92. style="height: 20px;vertical-align: middle;">
  93. 活动议程
  94. </div>
  95. <div style="margin: 10px 20px;">
  96. asdsad
  97. </div>
  98. <div style="margin: 10px 20px;border-bottom: 1px solid #5eb2fe;height: 30px;">
  99. <img src="@/assets/img/cooperationExchange/20200608_03.gif" alt=""
  100. style="height: 20px;vertical-align: middle;">
  101. 附件
  102. </div>
  103. <div v-for="(item,index) in dataList" class="List">
  104. <img v-if="state==1" :src="'./api/file/pub/${item.attachmentSavePath}'" alt="" style="width: 20%;height: 20%;" />
  105. <img v-if="state==2" src="@/assets/img/cooperationExchange/txt.png" alt="" class="Messicon" />
  106. <img v-if="state==3" src="@/assets/img/cooperationExchange/excel.png" alt="" class="Messicon" />
  107. <img v-if="state==6" src="@/assets/img/cooperationExchange/powerpoint.png" alt="" class="Messicon"/>
  108. <img v-if="state==5" src="@/assets/img/cooperationExchange/pdf.png" alt="" class="Messicon"/>
  109. <img v-if="state==4" src="@/assets/img/cooperationExchange/word.png" alt="" class="Messicon"/>
  110. <p style="display: inline-block;margin-right:150px">{{item.attachmentName}}</p>
  111. <a class="func example" @click="downloads(item.attachmentSavePath,item.attachmentName)">{{$t('common.download')}}</a>
  112. <a class="func" @click="download(item.attachmentSavePath)">{{$t('common.preview')}}</a>
  113. </div>
  114. </div>
  115. </div>
  116. </template>
  117. <script>
  118. import {countryZh, countryEn,getList} from '@/api/country'
  119. import {activityInfos, countryNationalSpace} from '@/api/cooperation/baseCooperationUnit'
  120. import GlobalRoaming from "@/components/GlobalRoaming";
  121. import { saveActivityOrUpdate, getApproverId } from "@/api/meeting/meetingApply";
  122. import {sysAttachmentInfos} from '@/api/cooperation/baseCooperationUnit'
  123. import {getToken, resetToken} from "@/utils/auth";
  124. import {saveFollowModel} from "@/api/operation/basePortalModelFollowInfo";
  125. import {getFollowModeNumlByModelIdAndUserId} from "@/api/operation/basePortalModelFollowInfo";
  126. import Base from "@/views/base/Base";
  127. export default {
  128. name: 'NationalregionalCommissionsDevelopments',
  129. extends: Base,
  130. data() {
  131. return {
  132. index: 1,
  133. projectList:[],
  134. i: '0',
  135. id: this.$route.query.key,
  136. language:'',
  137. Screens:"委员会简介",
  138. realTimeInfoScreens:[{
  139. lable:"委员会简介",
  140. value:'0'
  141. },{
  142. lable:"委员会布局",
  143. value:'1'
  144. },{
  145. lable:"委员会活动",
  146. value:'2'
  147. }],
  148. state:2,
  149. dataList:[{
  150. attachmentName:'XXX研究院研究成果汇报.PDF'
  151. },{
  152. attachmentName:'XXX研究院研究成果汇报.PDF'
  153. },{
  154. attachmentName:'XXX研究院研究成果汇报.PDF'
  155. }]
  156. }
  157. },
  158. watch: {
  159. "$i18n.locale"() {
  160. this.getBaseList();// 获取企业报名信息
  161. this.getInitData();
  162. },
  163. "toViewLogin"(){
  164. if(this.toViewLogin==true){
  165. this.loginTipsChange()
  166. }
  167. },
  168. },
  169. computed:{
  170. },
  171. mounted() {
  172. },
  173. methods: {
  174. selectBlur(e) {
  175. },
  176. realTimeInfoScreen(i,index){
  177. this.toView('nationalregionalCommissions2',index)
  178. },
  179. follow() {
  180. if (this.ifcommon) {
  181. this.followActivitie("unfollow");
  182. } else {
  183. this.followActivitie("follow");
  184. }
  185. },
  186. followActivitie(followType){
  187. let user = window.localStorage.getItem("user");
  188. if (!this.$Cookies.get('token')) {
  189. // this.$message.warning("请先登录");
  190. // this.$confirm('检测到您未登录,是否登录')
  191. // .then(_ => {
  192. // this.toView('login');
  193. // })
  194. // .catch(_ => {});
  195. this.toViewLogin = true;
  196. } else {
  197. var users = JSON.parse(user);
  198. var token = "" + getToken();
  199. var projectId = this.countryList.baseActivityEntityId;
  200. var userId = users.userId;
  201. // 接口逻辑
  202. this.submitHandler((token) => {
  203. saveFollowModel(projectId, "activity", userId, followType, token)
  204. .then((result) => {
  205. // console.log(result);
  206. this.$message({
  207. message: result.data,
  208. type: "success",
  209. });
  210. this.ifcommon = !this.ifcommon;
  211. this.resetToken();
  212. })
  213. .catch((error) => {
  214. // 此处你的业务代码
  215. });
  216. });
  217. }
  218. },
  219. // 未登录跳转
  220. loginTipsChange(){
  221. const that=this;
  222. this.num =5;
  223. // clearInterval(timer_interval);
  224. this.timer = setInterval(function() {
  225. if (that.num > 0) {
  226. that.num--;
  227. } else {
  228. if(that.toViewLogin==true){
  229. clearInterval(that.timer);
  230. that.toView('login');
  231. }else {
  232. clearInterval(that.timer);
  233. }
  234. }
  235. }, 1000)
  236. },
  237. // 判断未登录跳转是否关闭
  238. toViewLoginChange(done){
  239. this.toViewLogin=false;
  240. this.num=5;
  241. clearInterval(this.timer);
  242. },
  243. getPassAreaCode(code){
  244. this.select = code;
  245. this.formLabelAlign.selectCode = code;
  246. },
  247. getInitData() {
  248. const that =this;
  249. var users = localStorage.getItem('user');
  250. var user = JSON.parse(users);
  251. if(user != null){
  252. this.formLabelAlign.name = user.realName;
  253. }
  254. this.language = this.$i18n.locale.toUpperCase();
  255. countryNationalSpace({baseActivityEntityId: this.id,language: this.language}).then(res => {
  256. this.formLabelAlign.meetingId = res.data.meetingId;
  257. this.meetingId = res.data.meetingId;
  258. if(res.data.activityInfos != undefined){
  259. that.countryList = res.data.activityInfos[0]?res.data.activityInfos[0]:{};
  260. that.activityApplyCount = res.data.activityApplyCount;
  261. that.formLabelAlign.invitationCode = that.countryList.activityQrCode
  262. that.formLabelAlign.meetingId = res.data.meetingId;
  263. if (users) {
  264. var token = "" + getToken();
  265. var projectId = this.countryList.baseActivityEntityId;
  266. this.userId = user.userId;
  267. getFollowModeNumlByModelIdAndUserId(
  268. projectId,
  269. "activity",
  270. this.userId
  271. ).then((res) => {
  272. this.ifcommon = res.data;
  273. });
  274. }
  275. }else{
  276. that.countryList = {};
  277. that.$message({
  278. message: '无当前版本',
  279. type: 'error'
  280. });
  281. }
  282. let list = {
  283. attachmentBusinessId:this.countryList.id,
  284. attachmentBusinessType:'activityInfo'
  285. };
  286. sysAttachmentInfos(list).then(res=>{
  287. if("3" == this.countryList.activityStatusDict){
  288. if(JSON.stringify(res.data) =='{}'){
  289. this.screen = [
  290. {
  291. value: '1',
  292. lable: 'common.ActivityIntroduction'
  293. }, {
  294. value: '1',
  295. lable: 'common.ActivityAgenda'
  296. }, {
  297. value: '1',
  298. lable: 'common.ActivityReview'
  299. }
  300. ]
  301. }else{
  302. this.screen = [
  303. {
  304. value: '1',
  305. lable: 'common.ActivityIntroduction'
  306. }, {
  307. value: '1',
  308. lable: 'common.ActivityAgenda'
  309. }, {
  310. value: '1',
  311. lable: 'common.ActivityReview'
  312. }
  313. ,{
  314. value:'1',
  315. lable:'common.ActivityResults'
  316. }
  317. ]
  318. }
  319. }else{
  320. this.screen = [
  321. {
  322. value: '1',
  323. lable: 'common.ActivityIntroduction'
  324. }, {
  325. value: '1',
  326. lable: 'common.ActivityAgenda'
  327. }
  328. ]
  329. }
  330. })
  331. })
  332. this.activityStatusMap.set('活动中', 'Live');
  333. this.activityStatusMap.set('已结束', 'Closed');
  334. this.activityStatusMap.set('未开始', 'Upcoming');
  335. this.activityStatusMap.set('报名中', 'Registration open')
  336. },
  337. getBaseList(){
  338. const that =this;
  339. getList({language:this.$i18n.locale.toUpperCase()}).then(res=>{
  340. if(JSON.stringify(res.data)!=='{}'){
  341. that.projectList=res.data.baseUnitViews || [];
  342. }
  343. })
  344. },
  345. // 报名弹窗
  346. signUp(num) {
  347. // 判断是否是报名结束
  348. let user = window.localStorage.getItem('user');
  349. if (!this.$Cookies.get('token')) {
  350. // this.$message.warning("请先登录");
  351. // this.$confirm('检测到您未登录,是否登录')
  352. // .then(_ => {
  353. // this.toView('login');
  354. // })
  355. // .catch(_ => {});
  356. this.toViewLogin=true;
  357. }else {
  358. this.centerDialogVisible = true;
  359. }
  360. // if (this.countryList.registtrationFlag=='y') {
  361. //
  362. // } else {
  363. // this.$message({
  364. // message: '当前会员活动无法加入',
  365. // type: 'warning'
  366. // });
  367. // }
  368. },
  369. save: function () {
  370. //流程改造6
  371. this.formLabelAlign.auditStatusDict = '4';
  372. this.submitHandler((token) => {
  373. //流程改造7
  374. getApproverId(this.formLabelAlign.invitationCode).then((result)=>{
  375. result = result.data;
  376. //let id = result[0].userId;
  377. var str = "";
  378. for(var i = 0; i<result.length; i++){
  379. str += result[i].userId + ",";
  380. }
  381. if (str.length > 0) {
  382. str = str.substr(0, str.length - 1);
  383. }
  384. this.approverId = str;
  385. saveActivityOrUpdate(
  386. JSON.stringify(this.formLabelAlign),
  387. this.approverId,
  388. this.taskComment,
  389. token
  390. ).then((res) => {
  391. let type = 'success';
  392. if(res.msg == 'error'){
  393. res.msg = '您已报名成功,请勿重复报名。';
  394. type = 'warning';
  395. }else{
  396. res.msg = '报名成功';
  397. }
  398. this.$message({
  399. message: res.msg,
  400. type: type
  401. });
  402. this.resetToken();
  403. // 此处关闭弹出层
  404. }).catch((error) => {
  405. // 此处你的业务代码
  406. this.resetToken();
  407. });
  408. })
  409. });
  410. },
  411. getIconUrl(url) {
  412. return require("@/assets/img/cooperationExchange/" + url);
  413. },
  414. toView(router, json) {
  415. this.$router.push({name: router, params: {key: json}})
  416. },
  417. screenBack(data) {
  418. console.log(data, 'screenBackscreenBackscreenBackscreenBack')
  419. },
  420. screens(item, index) {
  421. this.i = index
  422. }
  423. }
  424. }
  425. </script>
  426. <!-- Add "scoped" attribute to limit CSS to this component only -->
  427. <style scoped>
  428. .box {
  429. margin-top: 10px;
  430. background: #fff;
  431. padding-top: 20px;
  432. padding-bottom: 10px;
  433. }
  434. body {
  435. margin: 0;
  436. }
  437. .screen1 {
  438. color:#2c5589;
  439. }
  440. .screen2 {
  441. font-size: 14px;
  442. color:#bebebe;
  443. }
  444. .Introduction {
  445. margin-top: 20px;
  446. }
  447. .List {
  448. margin: 10px 20px;
  449. }
  450. .List img {
  451. width: 45px;
  452. height: 45px;
  453. vertical-align: middle;
  454. }
  455. .Introduction li {
  456. float: left;
  457. width: 31%;
  458. height: 400px;
  459. margin-right: 22px;
  460. background: skyblue;
  461. }
  462. .el-button.is-round {
  463. padding: 0
  464. }
  465. .el-input{
  466. width: 400px;
  467. /* line-height: 52px; */
  468. }
  469. .el-input>>>.el-input__inner{
  470. height: 50px;
  471. /* width: 200px; */
  472. }
  473. .el-select>>>.el-input__inner{
  474. height: 50px;
  475. }
  476. .el-form-item>>>.el-form-item__label {
  477. padding-top: 5px;
  478. }
  479. .dcp_input /deep/.el-input__inner {
  480. width: 150px;
  481. }
  482. .dcp_input /deep/.el-select {
  483. width: 150px;
  484. }
  485. .el-select-dropdown {
  486. width: 400px!important;
  487. }
  488. .func{
  489. color: rgb(10, 15, 255);
  490. margin-right: 20px;
  491. cursor: pointer;
  492. float: right;
  493. margin-right: 50px;
  494. line-height: 50px;
  495. }
  496. </style>