ProjectPresentation.vue 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069
  1. <template>
  2. <div>
  3. <div class="autoBox boxs">
  4. <div>
  5. <el-breadcrumb separator="/" style="float: left;margin:15px ">
  6. <el-breadcrumb-item :to="{ path: 'home' }">{{$t('common.Home')}}</el-breadcrumb-item>
  7. <el-breadcrumb-item>{{$t('common.ProjectResources')}}</el-breadcrumb-item>
  8. </el-breadcrumb>
  9. </div>
  10. </div>
  11. <div class="autoBox boxs search" >
  12. <!-- 搜索框位置 -->
  13. <!-- <el-input :placeholder="$t('common.EnterContent')"
  14. v-model="params.fuzzySearch"
  15. class="input-with-select"
  16. maxlength="50"
  17. show-word-limit
  18. style="width: 650px;margin-left: 20px;padding: 20px 0;">
  19. <el-button class="cursor"
  20. slot="append"
  21. type="primary"
  22. @click="getData">{{$t('common.Search')}}</el-button>
  23. </el-input> -->
  24. <!-- 条件选择位置 -->
  25. <div class="area">
  26. <Screen v-bind:screen1="screen1s" :screen2="screen2s" :screen1def="screen1def" :screen2Item="screen2Item" @screenBack="screenBack"></Screen>
  27. </div>
  28. <!-- 最近发布和最多关注 -->
  29. <div>
  30. <div style="margin:30px 20px 0 20px;height:100px;border-bottom:1px solid #aaaaaa;">
  31. <div style="margin: 20px 0;width: 1200px;font-size:14px;color: #000;">
  32. <i class="fa fa-ioxhost" aria-hidden="true"></i>
  33. {{$t('common.totalFind')}}
  34. <span style="color: #000;font-size: 14px;font-weight: 600;">{{num}}</span> {{$t('common.Projects')}}
  35. </div>
  36. <!-- :class=" index==0?'projectSlot2': index==1?'projectSlot3':'projectSlot1'"-->
  37. <div
  38. :class="islogin?index==0?'projectSlot2': index==1?'projectSlot3':'projectSlot1':index==0?'projectSlot4':'projectSlot5'"
  39. class="cursor"
  40. >
  41. <span
  42. style="padding:0 13px;height: 35px;display: inline-block;width: 120px;"
  43. v-show="islogin"
  44. @click="screen(3)"
  45. :class="index==3?'screen2':'screen1'"
  46. >{{$t('common.IntelligentRecommendation')}}</span>
  47. <span
  48. style="padding:0 13px;height: 35px;display: inline-block;width: 120px;"
  49. @click="screen(0)"
  50. :class="index==0?'screen2':'screen1'"
  51. >{{$t('common.LatestRelease')}}</span>
  52. <span
  53. id="attention2"
  54. style="padding:0 13px;height: 35px;display: inline-block;width: 120px;"
  55. @click="screen(1)"
  56. :class="index==1?'screen2':'screen1'"
  57. >{{$t('common.MostAttention')}}</span>
  58. <div style="float: right">
  59. <div style="float: left;
  60. margin-right: 50px;
  61. background: rgb(204,216,229);
  62. width: 120px;
  63. text-align: center;
  64. color: #000;
  65. cursor: pointer;
  66. " @click="jump">
  67. {{$t('common.EnergyConversion')}}
  68. </div>
  69. <div style="float: right;margin-right: 50px;font-size: 20px;" class="menu">
  70. <i class="fa fa-bars" aria-hidden="true" :style="projectFaIcon==1?'color:#000':'color:#bcbcbc'" style="margin-right: 20px;" @click="projectFaIcon=1"></i>
  71. <i class="el-icon-menu" @click="projectFaIcon=2" :style="projectFaIcon==2?'color:#000':'color:#bcbcbc'"></i>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </div>
  77. <!-- 项目列表 -->
  78. <div v-show="projectFaIcon==1" class="projectList" v-for="(item,index) in initData" :key="index">
  79. <div style="color:#333">
  80. <!-- 项目图片 -->
  81. <div style="position: absolute;left: 0;top: 0px;width: 224px;height: 182px;" class="newtip">
  82. <img :src="'api/fileextend/pub/'+ item.bannerList[0] + '?custom=224_182'" alt style="width: 224px;height: 182px;"/>
  83. <!-- 最新发布标志 -->
  84. <!-- <img src="@/assets/img/projectPresentation/newTip.png" alt="" v-if="ifnew(index)" style="position: absolute;top: 0;left: 0;"> -->
  85. <!-- 最新发布标志 -->
  86. <!-- <img src="@/assets/img/projectPresentation/newTip.png" alt="" v-if="ifnew(index) && $i18n.locale=='zh'" style="position: absolute;top: 0;left: 0;width:44px;">-->
  87. <!-- <img src="@/assets/img/projectPresentation/NEW.png" alt="" v-if="ifnew(index) && $i18n.locale=='en'" style="position: absolute;top: 0;left:0;width:44px;">-->
  88. <!-- 推荐项目标志 -->
  89. <span style="float:right;position: absolute;right: 0;top: 0;width: 55px;"
  90. v-if="item.recommendFlag=='y'&& $i18n.locale=='zh'">
  91. <img src="@/assets/img/projectPresentation/recommendzh.png" alt="" style="width: 100%;">
  92. <!-- {{$t('common.RecommendedProject')}} -->
  93. </span>
  94. <span style="float:right;position: absolute;right: 0;top: 0;width:55px;"
  95. v-if="item.recommendFlag=='y'&& $i18n.locale=='en'">
  96. <img src="@/assets/img/projectPresentation/recommenden.png" alt="" style="width: 100%;">
  97. <!-- {{$t('common.RecommendedProject')}} -->
  98. </span>
  99. </div>
  100. <div style="margin-left: 240px;margin-top: 30px;width: 700px; font-size: 12px;position: relative;"
  101. @click="toView('projectPresentationDetails',item.projectId,index)">
  102. <div style="width: 100%;">
  103. <!-- 项目名称 -->
  104. <span class="initData_label cursor" >{{item.projectName}}</span>
  105. <div class="newTitle2" v-if="ifnew(index)">new</div>
  106. </div>
  107. <div style="line-height: 25px;width: 810px;">
  108. <span style="margin-right: 100px;">
  109. <i class="el-icon-location-outline"></i>
  110. {{$t('common.ProjectArea')}}: {{item.bannerFour}}
  111. </span>
  112. </div>
  113. <div style="line-height: 25px;width: 810px;">
  114. <span>
  115. <i class="el-icon-office-building" aria-hidden="true"></i>
  116. {{$t('common.ProjectCategory')}}: {{screen2sMap[item.technicalCategories]}}
  117. </span>
  118. </div>
  119. <div style="line-height: 25px;width: 810px;">
  120. <span>
  121. <!-- <i class="fa fa-star-o"></i>-->
  122. <!-- {{item.num == 'null' || item.num == undefined? 0:item.num}}{{$t('common.HasAttentiond')}}/{{handlePublishTimeDesc(toDate,item.createDate,$i18n.locale)}} {{$t('common.release')}}-->
  123. <i class="el-icon-c-scale-to-original" style="color: rgb(51, 51, 51);margin-top: 2px;"></i>
  124. {{$t('common.CurrentStage')}}: {{item.phaseType}}
  125. </span>
  126. </div>
  127. <div style="-webkit-box-orient: vertical;
  128. position:relative;
  129. line-height:1.4em;
  130. overflow: hidden;
  131. height:4.2em;margin-top: 5px;width: 810px;" class="plate">
  132. <span>
  133. <i class=" el-icon-date" style="color: #999;"></i>
  134. {{$t('common.ProjectDescription')}}: {{item.bannerThree}}
  135. </span>
  136. </div>
  137. </div>
  138. <!-- <div style="margin-left: 200px;">-->
  139. <!-- <el-tag style="margin: 10px 10px 0 0;" v-for="(tag,j) in item.projectLabel">{{tag}}</el-tag>-->
  140. <!-- </div>-->
  141. </div>
  142. </div>
  143. <!--项目列表 ul布局 -->
  144. <ul
  145. v-show="projectFaIcon==2"
  146. class="initListBox2">
  147. <li v-for="(item,index) in initData" :key="index" @click="toView('projectPresentationDetails',item.projectId,index)"
  148. class="cursor" style="width: 370px;height: 530px;float: left;box-shadow:5px 5px 5px #f1f1f1 ;position: relative;border: 1px solid #ccc;margin-top: 20px;">
  149. <!-- 项目图片 -->
  150. <div class="newtip">
  151. <img
  152. :src="'api/fileextend/pub/'+ item.bannerList[0] +'?custom=370_220'" alt style="width:100%;height: 220px;"
  153. />
  154. <!-- 最新发布标志 -->
  155. <!-- <img src="@/assets/img/projectPresentation/newTip.png" alt="" v-if="ifnew(index) && $i18n.locale=='zh'" style="position: absolute;top: 0;left: 0;width:44px;">-->
  156. <!-- <img src="@/assets/img/projectPresentation/NEW.png" alt="" v-if="ifnew(index) && $i18n.locale=='en'" style="position: absolute;top: 0;left: 0;width:44px;">-->
  157. </div>
  158. <!-- 推荐项目标志 -->
  159. <span style="float:right;position: absolute;right: 0;top: 0;width: 55px;"
  160. v-if="item.recommendFlag=='y'&& $i18n.locale=='zh'">
  161. <img src="@/assets/img/projectPresentation/recommendzh.png" alt="" style="width: 100%;">
  162. </span>
  163. <span style="float:right;position: absolute;right:0;top: 0;width: 55px;"
  164. v-if="item.recommendFlag=='y'&& $i18n.locale=='en'">
  165. <img src="@/assets/img/projectPresentation/recommenden.png" alt="" style="width: 100%;">
  166. </span>
  167. <!-- <img :src="'/api/file/pub/'+item.photo" alt="" style="width: 100%;height: 340px;"> -->
  168. <div style=" color: #bcbcbc;padding: 0 10px;margin-left: 15px;">
  169. <div>
  170. <span class="ul_initData_label cursor" style="color: #666;">{{item.projectName}}</span>
  171. <span class="newTitle" v-if="ifnew(index)">new</span>
  172. </div>
  173. <div style="line-height: 25px;color:#666;margin-top: 2px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" >
  174. <span style="margin-right: 20px;" >
  175. <i class="el-icon-location-outline"></i>
  176. {{$t('common.ProjectArea')}}: {{item.bannerFour}}
  177. </span>
  178. </div>
  179. <div style="line-height: 25px;color:#666;margin-top: 2px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">
  180. <span >
  181. <i class="el-icon-office-building" aria-hidden="true"></i>
  182. {{$t('common.ProjectCategory')}}: {{screen2sMap[item.technicalCategories]}}
  183. </span>
  184. </div>
  185. <!-- <div style="color:#666;line-height: 25px;margin-top: 2px;overflow: hidden;text-overflow:ellipsis;white-space: nowrap;">-->
  186. <!-- <span>-->
  187. <!-- <i class="fa fa-database"></i>-->
  188. <!-- {{$t('common.TechnicalScope')}}: {{screen3sMap[item.technicalScope]}}-->
  189. <!-- </span>-->
  190. <!-- </div>-->
  191. <!-- <div style="color:#333">
  192. <span>
  193. <i class="fa fa-star-o"></i>
  194. {{item.num == 'null' || item.num == undefined? 0:item.num}}{{$t('common.HasAttentiond')}}/{{handlePublishTimeDesc(toDate,item.createDate,$i18n.locale)}} {{$t('common.release')}}
  195. </span>
  196. </div> -->
  197. <div style="color:#666;line-height: 25px;">
  198. <span>
  199. <i class="el-icon-c-scale-to-original" style="color: rgb(51, 51, 51);margin-top: 2px;"></i>
  200. {{$t('common.CurrentStage')}}: {{item.phaseType}}
  201. </span>
  202. </div>
  203. <div style="color:#666;margin-top: 5px;-webkit-box-orient: vertical;
  204. position:relative;
  205. line-height:1.4em;
  206. overflow: hidden;
  207. height:4.2em;" class="plate">
  208. <span>
  209. <i class=" el-icon-date" style="color: #999;"></i>
  210. {{$t('common.ProjectDescription')}}: {{item.bannerThree}}
  211. </span>
  212. </div>
  213. <div style="color:#666;line-height: 25px;margin-top: 15px;background: #F8F8F8;position: absolute;
  214. bottom: 0;left: 0;width: 100%;height: 47px;line-height: 47px;">
  215. <span style="float: right;margin-right: 20px;">
  216. <!-- <div>-->
  217. <i class="el-icon-location-outline"></i>{{item.unitCountry}} |<i class="fa fa-database" style="margin-left:10px;">
  218. </i>{{screen3sMap[item.technicalScope]}}
  219. <!-- </div>-->
  220. </span>
  221. </div>
  222. </div>
  223. <!-- <div style="margin-left: 10px;">
  224. <el-tag v-if="item.projectLabel != ''" style="margin: 10px 10px 0 0;" v-for="(tag,j) in item.projectLabel">{{tag}}</el-tag>
  225. </div> -->
  226. </li>
  227. <li v-if="initDataOther.length!=0" v-for="(item,index) in initDataOther" :key="'other'+index" class="cursor" style="width: 370px;height: 530px;float: left;box-shadow:5px 5px 5px #f1f1f1 ;position: relative;border: 1px solid #ccc;margin-top: 20px; visibility: hidden">
  228. </li>
  229. </ul>
  230. <div style="clear: both;"></div>
  231. <!-- 分页 -->
  232. <div style="width: 100%;position: relative;height: 100px;">
  233. <el-pagination
  234. type="index"
  235. style="height: 80px;position: absolute;left: 50%;top: 100px;transform: translate(-50%,-50%);"
  236. background
  237. :index="indexMethod"
  238. layout="prev, pager, next"
  239. :page-size="6"
  240. :total="num-0"
  241. @current-change="handleCurrentChange"
  242. ></el-pagination>
  243. </div>
  244. <div
  245. style="margin: 0 20px; margin-top: 20px; min-height: 200px"
  246. class="continents2"
  247. >
  248. <div style="border-bottom: 1px solid #0079ef; padding-bottom: 5px">
  249. <img
  250. src="@/assets/img/cooperationExchange/20200608_03.gif"
  251. alt=""
  252. style="height: 20px; vertical-align: middle"
  253. />
  254. <span style="margin-left: 5px">{{
  255. $t('common.EnterpriseShow')
  256. }}</span>
  257. <span
  258. style="color: #333; font-size: 12px; float: right; cursor: pointer"
  259. @click="ChangeUnitBatch"
  260. >{{ $t('common.NextBatch') }}</span
  261. >
  262. </div>
  263. <ul>
  264. <li
  265. v-for="(item, index) in initData3"
  266. :key="index"
  267. @click="toViewTargtBack('enterpriseDetails',item)"
  268. class="LiActive cursor"
  269. >
  270. <div style="position: relative; margin: 0 22px" class="border">
  271. <div style="width: 100%; text-align: center; padding-top: 30px">
  272. <div>
  273. <img
  274. :src="'/api/file/pub/' + item.photo"
  275. alt=""
  276. style="width: 100%; height: 160px"
  277. v-if="item.photo"
  278. />
  279. <img
  280. :src="'api/file/pub/' + '/def/projectdefault.png'"
  281. alt=""
  282. style="width: 100%; height: 160px"
  283. v-if="!item.photo"
  284. />
  285. </div>
  286. <div style="color: rgba(51, 51, 51, 1); font-weight: 700">
  287. {{ item.unitName }}
  288. </div>
  289. </div>
  290. </div>
  291. </li>
  292. </ul>
  293. </div>
  294. </div>
  295. </div>
  296. </template>
  297. <script>
  298. import Base from "@/views/base/Base";
  299. import {getDicts} from '@/api/dict';
  300. import Screen from "@/components/screen";
  301. import { gateGetProjectViewInfo, getBannerPath,getBaseProjectPortalsViews,getRecommendByPortals} from "@/api/project/baseProjectView";
  302. import { getBaseProjectInfos } from "@/api/project/baseProjectInfo";
  303. import Bus from "@/api/bus"; //注意引入
  304. import { getBaseUnitViews } from '@/api/baseUnitView'
  305. export default {
  306. name: "projectPresentation",
  307. components: { Screen },
  308. extends: Base,
  309. data() {
  310. return {
  311. initDataOther:[],
  312. attaments: [],
  313. toDate:0,
  314. attamentParams: {
  315. attachmentBusinessId: "",
  316. attachmentBusinessType: "base_project_archives_file",
  317. },
  318. num: 0,
  319. params: {
  320. pageNo: 1,
  321. pageSize: 6,
  322. language: '',
  323. continentCountry: "",
  324. technicalCategories: "",
  325. //0为默认排序,1为关注排序
  326. descStatus:0,
  327. messageOpenType:"Y",
  328. status:1,
  329. fuzzySearch:null,
  330. },
  331. screenIndex: 0,
  332. index: 0,
  333. projectFaIcon:2,
  334. screen1s: {
  335. value: "common.Region",
  336. item: [
  337. ],
  338. },
  339. screen2s: {
  340. value: "common.Category",
  341. item: [
  342. ],
  343. },
  344. screen3s: {
  345. value: "common.cope",
  346. item: [
  347. ],
  348. },
  349. screen4s: {
  350. value: "common.cope",
  351. item: [
  352. ],
  353. },
  354. recommend: [],
  355. initData: [],
  356. IntelligentRecommendation:[],
  357. islogin:'',
  358. screen1def:null,
  359. screen2Item:null,
  360. banner:null,
  361. uniNum: 0,
  362. unitPage: {
  363. pageSize: "4",
  364. pageNo: "1",
  365. areDict: '',
  366. language: '',
  367. },
  368. initData3: [],
  369. };
  370. },
  371. watch:{
  372. '$i18n.locale'(){
  373. this.toInitData();
  374. // this.cofLogin()
  375. // this.getRcommoendTip()
  376. // this.getBaseProject();
  377. },
  378. },
  379. computed: {
  380. // screen1sMap: function () {
  381. // return this.screen1s.item.array2Obj("value", "label");
  382. // },
  383. screen2sMap: function () {
  384. return this.screen2s.item.array2Obj("value", "label");
  385. },
  386. screen3sMap: function () {
  387. return this.screen3s.item.array2Obj("value", "label");
  388. },
  389. },
  390. mounted() {
  391. this.cofLogin()
  392. this.$store.commit('modify', 'projectPresentation');
  393. window.localStorage.setItem('router', 'projectPresentation');
  394. this.toInitData();
  395. // this.getRcommoendTip()
  396. // this.getRecommended();
  397. this.toDate=Date.parse(new Date());
  398. this.ifnew();
  399. this.bannerFourClick();
  400. this.getRecommended();
  401. /* this.screenBack(this.screen1def);*/
  402. },
  403. methods: {
  404. jump(){
  405. // window.open('https://www.geidcp.com/#/unitConversionindex')
  406. // this.$router.push({path:"/unitConversionindex"})
  407. const { href } =this.$router.resolve({
  408. name: 'unitConversionindex'
  409. });
  410. window.open(href, '_blank');
  411. },
  412. cofLogin(){
  413. if (!this.$Cookies.get('token')){
  414. this.index = 0;
  415. this.islogin = false;
  416. }else {
  417. this.index = 3;
  418. this.params.descStatus = 3;
  419. this.islogin = true;
  420. // this.getRcommoendTip()
  421. }
  422. },
  423. toInitData: function () {
  424. console.log('this.index')
  425. console.log(this.index)
  426. if(this.index == 3){
  427. this.getRcommoendTip();
  428. }else{
  429. this.getBaseProject();
  430. }
  431. if(this.$i18n.locale=='en'){
  432. getDicts("CONTINENT_CODE_DICT_EN,PROJECT_CATEGORIES_DICT_EN,TECHNICAL_SCOPE_DICT_EN").then(
  433. (result) => {
  434. var data = result.data;
  435. if (data) {
  436. this.screen1s.item = result.data[0] || [];
  437. let both={
  438. label:'all',
  439. value:null
  440. };
  441. this.screen1s.item.unshift(both);
  442. this.screen2s.item = result.data[1] || [];
  443. this.screen3s.item = result.data[2] || [];
  444. this.screen2s.item.unshift(both);
  445. }
  446. }
  447. );
  448. }else {
  449. getDicts("CONTINENT_CODE_DICT,PROJECT_CATEGORIES_DICT,TECHNICAL_SCOPE_DICT").then((result) => {
  450. var data = result.data;
  451. if (data) {
  452. this.screen1s.item = result.data[0] || [];
  453. let both={
  454. label:'全部',
  455. value:null
  456. };
  457. this.screen1s.item.unshift(both);
  458. this.screen2s.item = result.data[1] || [];
  459. this.screen3s.item = result.data[2] || [];
  460. this.screen2s.item.unshift(both);
  461. }
  462. });
  463. }
  464. },
  465. getBaseProject(){
  466. this.params.language=this.$i18n.locale.toUpperCase();
  467. // this.index = 0;
  468. getBaseProjectPortalsViews(this.params).then((result) => {
  469. var data = result.data;
  470. // console.log(data.baseProjectViews,'----------------------------------------------')
  471. if (data.baseProjectViews) {
  472. data.page.totalCount = data.page.totalCount-0;
  473. this.num = data.page.totalCount;
  474. this.initData = data.baseProjectViews;
  475. this.getphaseType(this.initData);
  476. this.initDataOther = [];
  477. var initDataNum = this.initData.length%3
  478. initDataNum = 3-initDataNum;
  479. if(initDataNum!=3){
  480. for (var i=0;i<(initDataNum);i++){
  481. this.initDataOther[i] = {}
  482. }
  483. }
  484. data.baseProjectViews.forEach((item,index)=>{
  485. if(item.projectLabel == undefined){
  486. item.projectLabel = []
  487. }else{
  488. item.projectLabel=item.projectLabel.split(',');
  489. }
  490. if(item.unitCountry != undefined){
  491. var unitCountryin = item.unitCountry.split(",")
  492. var unitCountryout = '';
  493. if(unitCountryin.length>2){
  494. for(var i=0;i<2;i++){
  495. unitCountryout = unitCountryout+unitCountryin[i]+",";
  496. }
  497. unitCountryout = unitCountryout.substr(0,unitCountryout.length-1)+",..."
  498. item.unitCountry = unitCountryout;
  499. }
  500. }
  501. // var technicalCategoriesin = item.technicalCategories.split(',');
  502. // var technicalCategoriesout = '';
  503. // technicalCategoriesin.forEach((item,index)=>{
  504. // technicalCategoriesout=technicalCategoriesout+
  505. // });
  506. if('' == item.bannerList[0])
  507. {
  508. item.bannerList[0]="/def/projectdefault.png"
  509. }
  510. })
  511. }else {
  512. this.initData = [];
  513. this.num = 0
  514. }
  515. })
  516. },
  517. //获取推荐内容
  518. getRcommoendTip(){
  519. // this.index = 3;
  520. let params1 = {
  521. pageNo:this.params.pageNo,
  522. pageSize: 6,
  523. language: this.$i18n.locale.toUpperCase(),
  524. //0为默认排序,1为关注排序
  525. descStatus:0,
  526. messageOpenType:"Y",
  527. status:1,
  528. fuzzySearch:null,
  529. };
  530. getRecommendByPortals(params1).then((result) => {
  531. var data = result.data;
  532. if (data.baseProjectViews) {
  533. data.page.totalCount = data.page.totalCount-0;
  534. this.num = data.page.totalCount;
  535. this.initData = data.baseProjectViews;
  536. this.getphaseType(this.initData);
  537. this.initDataOther = [];
  538. var initDataNum = this.initData.length%3
  539. initDataNum = 3-initDataNum;
  540. if(initDataNum!=3){
  541. for (var i=0;i<(initDataNum);i++){
  542. this.initDataOther[i] = {}
  543. }
  544. }
  545. data.baseProjectViews.forEach((item,index)=>{
  546. if(item.projectLabel == undefined){
  547. item.projectLabel = []
  548. }else{
  549. item.projectLabel=item.projectLabel.split(',');
  550. }
  551. if(item.unitCountry != undefined){
  552. var unitCountryin = item.unitCountry.split(",")
  553. var unitCountryout = '';
  554. if(unitCountryin.length>2){
  555. for(var i=0;i<2;i++){
  556. unitCountryout = unitCountryout+unitCountryin[i]+",";
  557. }
  558. unitCountryout = unitCountryout.substr(0,unitCountryout.length-1)+",..."
  559. item.unitCountry = unitCountryout;
  560. }
  561. }
  562. // var technicalCategoriesin = item.technicalCategories.split(',');
  563. // var technicalCategoriesout = '';
  564. // technicalCategoriesin.forEach((item,index)=>{
  565. // technicalCategoriesout=technicalCategoriesout+
  566. // });
  567. if('' == item.bannerList[0])
  568. {
  569. item.bannerList[0]="/def/projectdefault.png"
  570. }
  571. })
  572. }else {
  573. this.initData = [];
  574. this.num = 0
  575. }
  576. })
  577. },
  578. getphaseType(data){
  579. getDicts(this.$i18n.locale=='zh'?"PHASE_TYPE_DICT":"PHASE_TYPE_DICT_EN").then((resulet) => {
  580. // console.log('类型字典')
  581. // console.log(resulet)
  582. resulet.data[0].forEach((i) => {
  583. data.forEach((j)=>{
  584. if (i.value == j.phaseType) {
  585. j.phaseType = i.label;
  586. }
  587. })
  588. });
  589. });
  590. },
  591. getRecommended(){
  592. let params= {
  593. pageSize: 5,
  594. language: this.$i18n.locale.toUpperCase(),
  595. recommendFlag:'y',
  596. descStatus:0
  597. }
  598. const that =this;
  599. that.recommend=[];
  600. getBaseProjectPortalsViews(params).then((res) => {
  601. if (res.data.baseProjectViews) {
  602. res.data.baseProjectViews.forEach(item=>{
  603. if(item.bannerOne){
  604. let commendImg={
  605. img:item.bannerOne[0],
  606. num:22,
  607. id:item.id
  608. }
  609. that.recommend.push(commendImg);
  610. }
  611. // else{
  612. // let commendImg={
  613. // img:'/def/enterpriseDefault.png',
  614. // num:22,
  615. // id:item.id
  616. // }
  617. // that.recommend.push(commendImg);
  618. // }
  619. })
  620. console.log(res.data.baseUnitViews,that.init,that.recommend);
  621. } else {
  622. // this.$message("当前推荐企业暂无信息");
  623. }
  624. });
  625. },
  626. getIconUrl(url) {
  627. return require("@/assets/img/realTimeInfo/" + url);
  628. },
  629. toView(router, json,index) {
  630. console.log(router, json,index,'---------- ----')
  631. this.index = this.params.descStatus;
  632. this.dataIndex = this.params;
  633. this.cruPage = this.params.pageNo;
  634. window.localStorage.setItem('router', router);
  635. this.$store.commit('modify', router);
  636. Bus.$emit("router", router); //存 Bus.$emit
  637. const { href } =this.$router.resolve({
  638. name: router,
  639. query: {
  640. key: json,
  641. screenId:this.index,
  642. dataIndex:index,
  643. cruPage:this.cruPage
  644. }
  645. });
  646. window.open(href, '_blank');
  647. // this.$store.commit('modify', router);
  648. // window.localStorage.setItem('router', router);
  649. // const { href } = this.$router.resolve({
  650. // name: 'routerItem',
  651. // params: {
  652. // key: json,
  653. // screenId:this.index,
  654. // dataIndex:index,
  655. // cruPage:this.cruPage
  656. // }
  657. // });
  658. // window.open(href, '_blank');
  659. },
  660. getData () {
  661. this.params.pageNo=0;
  662. this.getBaseProject();
  663. },
  664. screenBack(data) {
  665. //判断banner是否存在值
  666. console.log("this.data.click1 ",data.click1)
  667. this.params.continentCountry = data.click1;
  668. this.params.technicalCategories = data.click2;
  669. this.params.pageNo=0;
  670. if(this.index == 3){
  671. if(data.click1 !== null || data.click2 !== null){
  672. consloe.log("data.click1判断里面的:",data.click1)
  673. this.index = 0;
  674. this.params.descStatus = 0;
  675. this.screen1def = data.click1;
  676. this.screen2Item = data.click2;
  677. this.getBaseProject();
  678. }else{
  679. this.params.continentCountry = data.click1;
  680. this.params.technicalCategories = data.click2;
  681. this.index = 3;
  682. this.params.descStatus = 3;
  683. this.screen1def = null;
  684. this.screen2Item = null;
  685. this.getRcommoendTip()
  686. }
  687. }else{
  688. this.screen1def = data.click1;
  689. this.screen2Item = data.click2;
  690. this.getBaseProject();
  691. }
  692. this.getRecommended();
  693. },
  694. //判断区域数据
  695. bannerFourClick(){
  696. console.log("this.$route.params.banner",this.$route.params.banner);
  697. if (this.$route.params.banner === 'undefined' || this.$route.params.banner === undefined){
  698. this.banner = null;
  699. }else {
  700. if (this.$route.params.banner === '亚洲'){
  701. this.banner = 'asia';
  702. }else if (this.$route.params.banner === '非洲'){
  703. this.banner = 'africa';
  704. }else if (this.$route.params.banner === '欧洲'){
  705. this.banner = 'europe';
  706. }else if (this.$route.params.banner === '北美洲'){
  707. this.banner = 'northamerica';
  708. }else if (this.$route.params.banner === '南美洲'){
  709. this.banner = 'southamerica';
  710. }else if (this.$route.params.banner === '大洋洲'){
  711. this.banner = 'oceania';
  712. }else {
  713. this.banner = this.$route.params.banner;
  714. }
  715. this.screen1def = '3';
  716. this.index = 3;
  717. let data = {};
  718. data.click1 = this.banner;
  719. this.screenBack(data);
  720. }
  721. },
  722. // 分页
  723. handleCurrentChange(val){
  724. this.params.pageNo=val
  725. if(this.index == 3){
  726. this.getRcommoendTip()
  727. }else{
  728. this.getBaseProject();
  729. }
  730. },
  731. realTimeInfoScreen(i, index) {
  732. this.screenIndex = index;
  733. this.Screens = i;
  734. },
  735. realTimeInfoScreensChange(i, index) {
  736. this.realTimeInfoScreenItem = index;
  737. },
  738. screen(i) {
  739. let _this = this
  740. if(i!==this.params.descStatus){
  741. this.index=i;
  742. this.params.descStatus = i;
  743. if(i == 3){
  744. this.index = 3;
  745. this.params.descStatus = 3;
  746. setTimeout(()=>{
  747. _this.screen1def = '1';
  748. _this.screen1def = null;
  749. },100)
  750. setTimeout(()=>{
  751. _this.screen2Item = '1';
  752. _this.screen2Item = null;
  753. },200)
  754. this.getRcommoendTip();
  755. }else{
  756. this.getBaseProject();
  757. }
  758. }
  759. },
  760. ifnew: function(i){
  761. if(i<5 && this.index ==0 && this.params.pageNo==1){
  762. return true
  763. }else{
  764. return false
  765. }
  766. },
  767. //分页索引接着上一页的索引
  768. indexMethod(index){
  769. return (this.page-1)*10+index+1;
  770. },
  771. //企业展示换一页
  772. ChangeUnitBatch() {
  773. console.log("this.unitPage.pageNo",this.unitPage.pageNo)
  774. console.log("his.uniNum",this.uniNum)
  775. if (this.unitPage.pageNo * 5 <= this.uniNum) {
  776. //this.$message(this.$t('common.Nodataavailable'));
  777. this.unitPage.pageNo++
  778. this.getRecommended()
  779. }
  780. },
  781. //获取企业展示信息
  782. getRecommended(){
  783. /* let unitPage={
  784. recommendFlag:'y',
  785. pageSize: "4",
  786. pageNo: "1",
  787. areDict: that.initData.areDict,
  788. language:this.$i18n.locale.toUpperCase(),
  789. descStatus:'0',
  790. }*/
  791. if (this.screen1def == null || this.screen1def == 'null' || this.screen1def == undefined) {
  792. this.unitPage.areDict = 'asia';
  793. }else{
  794. this.unitPage.areDict = this.screen1def;
  795. }
  796. this.unitPage.language = this.$i18n.locale.toUpperCase();
  797. console.log("这是进入的数据内容了"+this.unitPage.areDict);
  798. getBaseUnitViews(this.unitPage).then((res) => {
  799. if (res.data.baseUnitViews) {
  800. this.uniNum = res.data.page.totalCount;
  801. console.log("当前所有的数据量是"+this.uniNum);
  802. this.initData3 = res.data.baseUnitViews;
  803. console.log(res.data.baseUnitViews,this.init);
  804. } else {
  805. this.initData3 = []
  806. this.uniNum = ''
  807. // this.$message("当前推荐企业暂无信息");
  808. }
  809. this.loading = false;
  810. });
  811. },
  812. //跳转正常企业
  813. toViewTargtBack(router,json){
  814. this.$store.commit('modify', router);
  815. window.localStorage.setItem('router', router);
  816. const { href } = this.$router.resolve({
  817. name: router,
  818. query: {
  819. key: json.baseEntityId
  820. }
  821. });
  822. window.open(href, '_blank');
  823. },
  824. },
  825. };
  826. </script>
  827. <!-- Add "scoped" attribute to limit CSS to this component only -->
  828. <style scoped>
  829. ul {
  830. margin: 0;
  831. padding: 0;
  832. }
  833. .box,
  834. .boxs {
  835. margin-top: 10px;
  836. background: #fff;
  837. /* height: 500px; */
  838. padding-bottom: 10px;
  839. }
  840. .boxs {
  841. padding-bottom: 40px;
  842. }
  843. /* .area{
  844. margin-left: 30px;
  845. background-color: #faf2f2;
  846. } */
  847. body {
  848. margin: 0;
  849. }
  850. .projectSlot1{
  851. height: 35px;width: 65%;line-height: 35px;
  852. background: url("~@/assets/img/projectPresentation/1.png") no-repeat;
  853. }
  854. .projectSlot2{
  855. height: 35px;width: 65%;line-height: 35px;
  856. background: url("~@/assets/img/projectPresentation/2.png") no-repeat;
  857. }
  858. .projectSlot3{
  859. height: 35px;width: 65%;line-height: 35px;
  860. background: url("~@/assets/img/projectPresentation/3.png") no-repeat;
  861. }
  862. .projectSlot4{
  863. height: 35px;width: 65%;line-height: 35px;
  864. background: url("~@/assets/img/projectPresentation/project-front.png") no-repeat;
  865. }
  866. .projectSlot5{
  867. height: 35px;width: 65%;line-height: 35px;
  868. background: url("~@/assets/img/projectPresentation/project-behind.png") no-repeat;
  869. }
  870. .screen1 {
  871. /* color: rgb(0, 0, 0); */
  872. height: 35px;width: 100%;line-height: 35px;
  873. font-size: 14px;
  874. text-align: center;
  875. color: #979292;
  876. /*background: #ced7e3;*/
  877. }
  878. .screen2 {
  879. height: 35px;width: 100%;line-height: 35px;
  880. text-align: center;
  881. color: rgb(0, 0, 0);
  882. font-size: 14px;
  883. /*background: #eceff3;*/
  884. }
  885. .projectList{
  886. margin: 20px 50px 0 50px;
  887. padding-bottom: 10px;
  888. /* margin-left:50px; */
  889. font-size:14px;
  890. color: #333;
  891. height: 200px;
  892. position: relative;
  893. border-bottom: 1px solid #bcbcbc;
  894. }
  895. .initListBox2{
  896. /* margin-top: 20px; */
  897. display: flex;
  898. justify-content: space-between;
  899. flex-wrap:wrap;
  900. margin: 0 20px;
  901. font-size:14px;
  902. color: #bcbcbc;
  903. position: relative;
  904. /* border-bottom: 1px solid #E4E4E4; */
  905. }
  906. li {
  907. display: inline-block;
  908. /* margin-right: 20px; */
  909. /* padding: 0 2px; */
  910. color: #1251a7;
  911. }
  912. .initData_label {
  913. color: #2c558a;
  914. font-weight: 700;
  915. font-size: 18px;
  916. line-height: 42px;
  917. max-width: 500px;
  918. overflow:hidden;
  919. white-space:nowrap;
  920. text-overflow:ellipsis;
  921. }
  922. .ul_initData_label {
  923. color: #2c558a;
  924. font-weight: 700;
  925. font-size: 18px;
  926. line-height: 42px;
  927. width: 88%;
  928. display: inline-block;
  929. overflow:hidden;
  930. white-space:nowrap;
  931. text-overflow:ellipsis;
  932. }
  933. .initData_label:hover {
  934. color: #2c558a;
  935. }
  936. .recommend {
  937. margin-top: 15px;
  938. /* margin-left: 100px; */
  939. }
  940. .recommend li {
  941. display: inline-block;
  942. width: 170px;
  943. /* height: 130px; */
  944. text-align: center;
  945. margin-right: 15px;
  946. }
  947. .enterprise_style_span {
  948. display: block;
  949. width: 85px;
  950. text-align: center;
  951. height: 50px;
  952. border-bottom: 2px solid #6699ff;
  953. margin-left: 10px;
  954. line-height: 50px;
  955. color:#6c819d;
  956. font-size: 18px;
  957. font-weight: 700;
  958. }
  959. .search >>> .el-button {
  960. background: #4f84ba;
  961. border: 1px solid #4f84ba;
  962. border-left: none;
  963. border-radius: 0;
  964. color: #fff;
  965. }
  966. .newTitle{
  967. float: right;
  968. color: red;
  969. width: 35px;
  970. border: 1px solid red;
  971. border-radius: 12px;
  972. margin-top: 10px;
  973. text-align: center;
  974. box-sizing: border-box;
  975. }
  976. .newTitle2{
  977. color: red;
  978. display: inline-block;
  979. width: 35px;
  980. border: 1px solid red;
  981. border-radius: 12px;
  982. margin-left: 20px;
  983. padding: 0 0 3px 0;
  984. text-align: center;
  985. box-sizing: border-box;
  986. }
  987. .continents2 ul {
  988. display: flex;
  989. flex-wrap: wrap;
  990. text-align: center;
  991. }
  992. .continents2 ul li {
  993. width: 24%;
  994. /* padding: 18px 30px; */
  995. background: #fff;
  996. margin-bottom: 20px;
  997. color: #999;
  998. /* height: 384px; */
  999. /* border-right: 1px solid #EAEAEA; */
  1000. border: 3px solid transparent;
  1001. box-shadow: 5px 5px 5px #fafafa;
  1002. }
  1003. .continents2 ul li:nth-of-type(5) {
  1004. border-right: none;
  1005. }
  1006. </style>