FinancialServicesBoxView.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  1. <template>
  2. <div>
  3. <div style="width: 100%;height: 190px;background: #fff;">
  4. <div style="float: left;width: 20%;height: 100%;position: relative;">
  5. <img src="@/assets/img/userCenter/user.png" alt="" style="width: 130px;position: absolute;left: 50%;top: 45%;transform: translate(-50%,-50%);">
  6. </div>
  7. <div style="float: left;width: 50%;height: 100%;">
  8. <div style="width: 96.5%;margin-left: 10px;margin-top: 20px;height: 80%;">
  9. <div>
  10. <span style="font-size: 20px;color: #2c5589;font-weight: 700;">{{userInfor.userName}}</span>
  11. <span v-if="userInfor.tag1" class="tag">{{realStatusDicts[this.realStatus]}}</span>
  12. <span v-if="userInfor.tag1" class="tag">{{userMobileStatusDicts[this.mobileStatus]}}</span>
  13. <span v-if="userInfor.tag1" class="tag">{{userEmailStatusDicts[this.emailStatus]}}</span>
  14. </div>
  15. <div style="margin-top: 10px;font-size: 14px;color: #999;">
  16. <span style="margin-right: 25px;">
  17. <i class="el-icon-message" aria-hidden="true"></i>
  18. {{userInfor.Email}}
  19. </span>
  20. <div style="margin-top: 10px;font-size: 14px;color: #999;">
  21. <span>
  22. <i class="el-icon-mobile-phone" aria-hidden="true"></i>
  23. {{userInfor.tel}}
  24. </span>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. <div style="float: left;width: 19.8%;height: 100%;border-left: 1px solid #ebebeb;">
  30. <div style="width: 96.4%;margin-left: 10px;margin-top: 20px;height: 80%;">
  31. <div>
  32. <span style="font-size: 18px;color: #2c5589;font-weight: 700;">{{$t('common.MessageRemind')}}</span>
  33. <i class="fa fa-volume-up" aria-hidden="true" style="color: #2c5589;margin-left: 20px;font-size: 18px;"></i>
  34. </div>
  35. <div style="margin-top: 10px;font-size: 14px;color: #999;">
  36. <span style="display:block;line-height: 30px;" @click="toView('SystemMessage','/SystemMessage')"
  37. class="cursor">
  38. {{$t('common.SystemRemind')}}:<span class="num1">0</span>
  39. </span>
  40. <span style="display:block;line-height: 30px;" @click="toView('notification','/notification')"
  41. class="cursor">
  42. {{$t('common.Announcements')}}:<span class="num1">0</span>
  43. </span>
  44. <span style="display:block;line-height: 30px;" @click="toView('myConsultingService','/myConsultingService')"
  45. class="cursor">
  46. {{$t('common.MyAdvice')}}:<span class="num2">0</span>
  47. </span>
  48. <span style="display:block;line-height: 30px;" @click="toView('communication','/communication')"
  49. class="cursor">
  50. {{$t('common.interactiveMessage')}}:<span class="num2">0</span>
  51. </span>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. <div style="width: 100%;height: 100px;background: #fff;margin-top: 15px;">
  57. <div class="title">
  58. <span> <i class="el-icon-menu" aria-hidden="true" style="margin-right:10px"></i>{{$t('common.FunctionRecommended')}}</span>
  59. </div>
  60. <div style="width: 100%;height: 50px;line-height: 50px;font-size: 15px;color: #666;">
  61. <span style="padding: 3px 30px;border-right: 1px solid #2c5589;" @click="toViewDevelopmentCooperation()"> <i class="el-icon-message" aria-hidden="true" style="margin-right:5px;color: #2c5589;" ></i>{{$t('common.CooperationForum')}}</span>
  62. <span style="padding: 3px 30px;border-right: 1px solid #2c5589;" @click="toOnlineMeeting()"> <i class="el-icon-microphone" aria-hidden="true" style="margin-right:5px;color: #2c5589;"></i>{{$t('common.OnlineMeeting')}}</span>
  63. </div>
  64. </div>
  65. <!--我的项目-->
  66. <div style="width: 100%;background: #fff;margin-top: 15px;">
  67. <div class="title">
  68. <span> <i class="el-icon-office-building" aria-hidden="true" style="margin-right:10px"></i>{{$t('common.UserMyProject')}}</span>
  69. <span style="float: right;font-size: 14px;color: #666;line-height: 80px;" @click="toMyProject()">{{$t('common.More')}} <i class="el-icon-arrow-right" aria-hidden="true" style="margin-right:10px"></i></span>
  70. </div>
  71. <div style="width: 100%;height: 160px;">
  72. <div class="recommend">
  73. <ul>
  74. <li v-for="(item,index) in myProject" v-if="index<4" :key="index + 2" style="margin-left: 20px;">
  75. <img @click="toViewProject('projectPresentationDetails',item.id,index)"
  76. :src="'api/file/pub/'+ item.bannerImg" alt
  77. style="width: 100%;height: 115px;cursor: pointer;"/>
  78. <div style="color: #bcbcbc;font-size: 14px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;">
  79. {{item.followName}}
  80. </div>
  81. </li>
  82. </ul>
  83. </div>
  84. </div>
  85. </div>
  86. <div style="width: 100%;background: #fff;margin-top: 15px;">
  87. <div class="title">
  88. <span> <i class="el-icon-wind-power" aria-hidden="true" style="margin-right:10px"></i>{{$t('common.UserMyActivities')}}</span>
  89. <span style="float: right;font-size: 14px;color: #666;line-height: 80px;" @click="toMyProject()">{{$t('common.More')}} <i class="el-icon-arrow-right" aria-hidden="true" style="margin-right:10px"></i></span>
  90. </div>
  91. <div style="width: 100%;height: 160px;">
  92. <div class="recommend">
  93. <ul>
  94. <li v-for="(item,index) in myActivity" v-if="index<4" :key="index + 2" style="margin-left: 20px;">
  95. <img @click="toViewActivity('CooperationExchangeListDetails',item.id,index)"
  96. :src="'api/file/pub/' + item.bannerImg" alt
  97. style="width: 100%;height: 115px;cursor: pointer;"/>
  98. <div
  99. style="color: #bcbcbc;font-size: 14px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;"
  100. >{{item.followName}}
  101. </div>
  102. </li>
  103. </ul>
  104. </div>
  105. </div>
  106. </div>
  107. </div>
  108. </template>
  109. <script>
  110. import {getPortalMyFollowMode} from "@/api/userCenter/myFollow";
  111. import {getToken} from "@/utils/auth";
  112. import {getUserInfoStatus} from "@/api/userCenter";
  113. export default {
  114. name: 'FinancialServicesBoxView',
  115. data () {
  116. return {
  117. projectNum:[],
  118. projectParams: {
  119. pageNo: 1,
  120. pageSize: 10,
  121. technicalCategories: "",
  122. technicalScope:"",
  123. phaseType:"",
  124. createBy: "",
  125. projectName:"",
  126. publishingChannels:"1",
  127. approveStatus:"",
  128. language:""
  129. },
  130. userInfor:{
  131. userName:"",
  132. tag1:'1',
  133. tag2:'1',
  134. tag3:'1',
  135. enterpriseName:'common.threeGorgesCorporation',
  136. Email:'',
  137. tel:''
  138. },
  139. mobileStatus:"",
  140. emailStatus:"",
  141. realStatus:'',
  142. userMobileStatusDicts:{0:this.$t('common.PhoneNumberVerified'),1:this.$t('common.PhoneNumberNotVerified')},
  143. userEmailStatusDicts:{0:this.$t('common.EmailVerified'),1:this.$t('common.EmailNotVerified')},
  144. realStatusDicts:{true:this.$t('common.RealNameVerification'),false:this.$t('common.RealNameNotVerification')},
  145. myProject:[],
  146. myActivity:[],
  147. recommend:[],
  148. }
  149. },
  150. watch: {
  151. "$i18n.locale"() {
  152. this.userMobileStatusDicts={0:this.$t('common.PhoneNumberVerified'),1:this.$t('common.PhoneNumberNotVerified')};
  153. this.userEmailStatusDicts={0:this.$t('common.EmailVerified'),1:this.$t('common.EmailNotVerified')};
  154. this.realStatusDicts={true:this.$t('common.RealNameVerification'),false:this.$t('common.RealNameNotVerification')};
  155. this.initData();
  156. },
  157. },
  158. mounted(){
  159. this.initData();
  160. },
  161. methods:{
  162. toView(router, json,index) {
  163. window.localStorage.setItem('router', router);
  164. this.$store.commit('modify', router);
  165. const { href } =this.$router.resolve({
  166. name: router,
  167. query: {
  168. key: json,
  169. dataIndex:index,
  170. }
  171. });
  172. window.open(href, '_blank');
  173. },
  174. //项目跳转
  175. toViewProject(router, json,index) {
  176. window.localStorage.setItem('router', router);
  177. this.$store.commit('modify', router);
  178. const { href } =this.$router.resolve({
  179. name: router,
  180. query: {
  181. key: json,
  182. dataIndex:index,
  183. }
  184. });
  185. window.open(href, '_blank');
  186. },
  187. //活动跳转
  188. toViewActivity(router,json){
  189. this.$store.commit('modify', router);
  190. window.localStorage.setItem('router', router);
  191. const { href } = this.$router.resolve({
  192. name: router,
  193. query: {
  194. key: json
  195. },
  196. });
  197. window.open(href, '_blank');
  198. },
  199. //跳转到发展合作留言
  200. toViewDevelopmentCooperation(){
  201. var router = "developmentCooperation";
  202. this.toView(router)
  203. },
  204. //跳转到在线会议
  205. toOnlineMeeting(){
  206. var router = "onlineMeeting";
  207. this.toView(router)
  208. },
  209. //跳到我的项目
  210. toMyProject(){
  211. this.toView("myFollow");
  212. },
  213. //查看项目
  214. findProject(item,index){
  215. this.toView('projectPresentationDetails',item.id,index)
  216. },
  217. //查看留言
  218. findLeavMesage(item){
  219. alert("查看留言")
  220. },
  221. initData(){
  222. //获取用户信息
  223. getUserInfoStatus().then((result) => {
  224. var data =result.data;
  225. this.userInfor.userName =data.name;
  226. this.userInfor.Email = data.email;
  227. if(!this.userInfor.Email){
  228. this.userInfor.Email =this.$t('common.noHave');
  229. }
  230. this.userInfor.tel = data.newMobile;
  231. if(!this.userInfor.tel){
  232. this.userInfor.tel =this.$t('common.noHave');
  233. }
  234. this.mobileStatus=data.userMobileStatus;
  235. this.emailStatus=data.userEmailStatus;
  236. this.realStatus = data.realStatus;
  237. });
  238. //获取对应的项目数据
  239. this.projectParams.language = this.$i18n.locale.toUpperCase();
  240. let token =getToken();
  241. let list = {
  242. modelType:"project",
  243. language:this.$i18n.locale.toUpperCase(),
  244. pageNo:1,
  245. pageSize:4,
  246. }
  247. getPortalMyFollowMode(list,token).then(res=> {
  248. this.myProject = res.data ? res.data.models : [];
  249. if(this.myProject && this.myProject.length > 0){
  250. this.myProject.forEach(element => {
  251. if(element.bannerImg && element.bannerImg instanceof Array && element.bannerImg[0] != ''){
  252. var bannerImgs = element.bannerImg;
  253. element.bannerImg = bannerImgs[0];
  254. }else if(element.bannerImg && element.bannerImg.constructor==String && element.bannerImg !='') {
  255. var bannerImgs = element.bannerImg.split(",");
  256. element.bannerImg = bannerImgs[0];
  257. }else{
  258. element.bannerImg = "def/projectdefault.png"
  259. }
  260. });
  261. }
  262. });
  263. token =getToken();
  264. list = {
  265. modelType:"activity",
  266. language:this.$i18n.locale.toUpperCase(),
  267. pageNo:1,
  268. pageSize:4,
  269. }
  270. getPortalMyFollowMode(list,token).then(res=> {
  271. this.myActivity = res.data ? res.data.models : [];
  272. if(this.myActivity && this.myActivity.length > 0){
  273. this.myActivity.forEach(element => {
  274. if(element.bannerImg && element.bannerImg !=''){
  275. var bannerImgs = element.bannerImg.split(",");
  276. element.bannerImg = bannerImgs[0];
  277. }
  278. });
  279. }
  280. });
  281. },
  282. getIconUrl(url){
  283. return require("@/assets/img/userCenter/"+url)
  284. },
  285. getPorjectUrl(url){
  286. if(null == url){
  287. url = "api/file/pub//def/projectdefault.png"
  288. }
  289. return url;
  290. }
  291. }
  292. }
  293. </script>
  294. <style scoped>
  295. .tag {
  296. display: inline-block;
  297. padding: 3px 10px;
  298. background: #95bef2;
  299. border-radius: 12px;
  300. color: #fff;
  301. font-size: 12px;
  302. margin-left: 15px;
  303. }
  304. .num1 {
  305. color: #328cfc;
  306. font-weight: 700;
  307. }
  308. .num2 {
  309. font-weight: 700;
  310. color: #d8361d;
  311. }
  312. .title {
  313. height: 50px;
  314. margin-left: 30px;
  315. margin-right: 30px;
  316. border-bottom: 1px solid #ebebeb;
  317. line-height: 50px;
  318. font-size: 17px;
  319. color: #2c5589;
  320. font-weight: 700;
  321. }
  322. .init {
  323. /* padding:0 30px; */
  324. height: 450px;
  325. padding-bottom: 30px;
  326. width: 100%;
  327. }
  328. .init ul {
  329. text-align: top;
  330. height: 100%;
  331. display: flex;
  332. display: -webkit-flex; /* Safari */
  333. justify-content:space-between;
  334. flex-wrap:wrap;
  335. }
  336. .init li {
  337. width: 430px;
  338. height: 130px;
  339. text-align: top;
  340. margin-bottom: 10px;
  341. }
  342. .initLiItem {
  343. float: left;
  344. height: 100%;
  345. width: 230px;
  346. position: relative;
  347. display: flex;
  348. flex-direction: column;
  349. }
  350. .initLiItemFirst {
  351. text-align: center;
  352. margin-top: 40px;
  353. font-size: 18px;
  354. color: #666;
  355. font-weight: 600;
  356. }
  357. /* .initLiItem div, */
  358. .initLiItem span:hover {
  359. color: #2c5589;
  360. }
  361. #myActivity li{
  362. float: left;
  363. width: 300px;
  364. height: 200px;
  365. margin-right: -80px;
  366. background: skyblue;
  367. }
  368. #myActivity ul{
  369. text-align: top;
  370. margin-top: 20px;
  371. height: 200px;
  372. display: flex;
  373. display: -webkit-flex; /* Safari */
  374. justify-content:space-between;
  375. flex-wrap:nowrap;
  376. }
  377. .swiper-container {
  378. width: 100%;
  379. height: 200px;
  380. }
  381. .swiper-slide {
  382. text-align: center;
  383. font-size: 18px;
  384. background: #fff;
  385. /* Center slide text vertically */
  386. display: -webkit-box;
  387. display: -ms-flexbox;
  388. display: -webkit-flex;
  389. display: flex;
  390. -webkit-box-pack: center;
  391. -ms-flex-pack: center;
  392. -webkit-justify-content: center;
  393. justify-content: center;
  394. -webkit-box-align: center;
  395. -ms-flex-align: center;
  396. -webkit-align-items: center;
  397. align-items: center;
  398. }
  399. .swiper-slide {
  400. margin-right: 10px !important;
  401. }
  402. .recommend {
  403. margin-top: 16px;
  404. /* margin-left: 30px; */
  405. }
  406. .recommend li {
  407. display: inline-block;
  408. width: 170px;
  409. /* height: 130px; */
  410. text-align: center;
  411. margin-right: 16px;
  412. }
  413. .cursor:hover {
  414. color: red;
  415. }
  416. </style>