projectPresentationDetails2.vue 30 KB

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