countryProjectStatus.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. <template>
  2. <div>
  3. <div style="margin: 0 30px;"
  4. class="coutryProject">
  5. <div class="enterprise_style">
  6. <span class="enterprise_style_span" style="padding: 10px;text-align: center;height: 100%;color: #2C558A;border-bottom: 2px solid #6699ff;">
  7. <span style="display: inline-block;width: 10px;height: 10px;background: #0B82FF;border-radius: 50%;"></span>
  8. {{$i18n.locale=='zh'?countryItem.zhName:countryItem.enName}}-{{$t('common.ProjectSources')}}
  9. </span>
  10. </div>
  11. <div style="margin: 0 20px; margin-top: 20px;" class="continents2">
  12. <ul>
  13. <li v-for="(item,index) in initData2" :key="index"
  14. @click="toView('ToprojectPresentationDetails',item.unitId)" class="LiActive cursor">
  15. <div style="position: relative;margin: 0 22px;" class="border">
  16. <div style="width: 100%;text-align: center;padding-top: 30px;">
  17. <div>
  18. <img :src="'/api/file/pub/' + item.bannerList[0]" alt="" style="width: 120px;height: 80px;">
  19. </div>
  20. <div style="color: rgba(51,51,51,1);font-weight: 700;">{{item.projectName}}</div>
  21. </div>
  22. </div>
  23. </li>
  24. </ul>
  25. </div>
  26. <div class="enterprise_style">
  27. <span class="enterprise_style_span">
  28. <span style="display: inline-block;width: 10px;height: 10px;background: #0B82FF;border-radius: 50%;"></span>
  29. {{$t('common.Projectprogress')}}
  30. </span>
  31. </div>
  32. <div style="margin-left: 0px;">
  33. <div style="margin-top: 15px;margin-left: 20px;"
  34. class="enterprise_style_product">
  35. <tr v-for="(item,index) in enterprise" class="cursor" @click="toViewDetail('realTimeInfoItemdetails',item.baseEntityId)" >
  36. <td style="float: left;">{{item.title}}</td>
  37. <td style="float: right;margin-right: 100px;">{{formatDate(item.createDate)}}</td>
  38. </tr>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </template>
  44. <script>
  45. import Base from '@/views/base/Base'
  46. import { getDicts } from '@/api/dict'
  47. import {
  48. gateGetProjectViewInfo,
  49. getBannerPath,
  50. getBaseProjectViews,
  51. } from '@/api/project/baseProjectView'
  52. import Screen from '@/components/screen'
  53. import { getCountry, getInformationList } from '@/api/country/countryList'
  54. export default {
  55. name: 'countryProjectStatus',
  56. props: ['id',"country","countryItem"],
  57. components: { Screen },
  58. extends: Base,
  59. data() {
  60. return {
  61. num: 0,
  62. enterpriseDetails: '',
  63. informationsClass: '1',
  64. enterprise: [],
  65. params: {
  66. pageNo: 1,
  67. pageSize: 3,
  68. language: '',
  69. phaseType: '',
  70. unitCountry: '',
  71. //0为默认排序,1为关注排序
  72. descStatus: 0,
  73. technicalCategories:'',
  74. status: 1,
  75. },
  76. screen1s: {
  77. value: 'common.Category',
  78. item: [],
  79. },
  80. screen2s: {
  81. value: 'common.phaseType',
  82. item: [],
  83. },
  84. initData2: [],
  85. recommend: [
  86. {
  87. img: 'u6029.png',
  88. num: '2934',
  89. },
  90. {
  91. img: 'u6029.png',
  92. num: '2934',
  93. },
  94. {
  95. img: 'u6029.png',
  96. num: '2934',
  97. },
  98. {
  99. img: 'u6029.png',
  100. num: '2934',
  101. },
  102. {
  103. img: 'u6029.png',
  104. num: '2934',
  105. },
  106. ],
  107. }
  108. },
  109. created() {
  110. this.enterpriseDetails = this.$route.params.key
  111. },
  112. watch: {
  113. '$i18n.locale'() {
  114. this.getCountryData()
  115. },
  116. },
  117. mounted() {
  118. this.getCountryData() // 获取项目状况
  119. },
  120. methods: {
  121. toViewDetail(router,json){
  122. this.$store.commit('modify', router);
  123. window.localStorage.setItem('router', router);
  124. const { href } = this.$router.resolve({
  125. name: router,
  126. query: {
  127. key: json
  128. }
  129. });
  130. window.open(href, '_blank');
  131. },
  132. getCountryData() {
  133. let list = {
  134. pageSize: 5,
  135. pageNo: 1,
  136. businessType: 'countryShow',
  137. businessId: this.id,
  138. typeDict: 4,
  139. language: this.$i18n.locale.toUpperCase(),
  140. }
  141. this.getInfoList();
  142. getInformationList(list).then((res) => {
  143. this.enterprise = res.data ? res.data.allDataList : []
  144. })
  145. if (this.$i18n.locale == 'en') {
  146. getDicts('PHASE_TYPE_DICT_EN,TECHNICAL_CATEGORIES_DICT_EN').then(
  147. (result) => {
  148. var data = result.data
  149. if (data) {
  150. this.screen2s.item = result.data[0] || []
  151. let both = {
  152. label: 'all',
  153. value: null,
  154. }
  155. this.screen2s.item.unshift(both)
  156. this.screen1s.item = result.data[1] || []
  157. this.screen1s.item.unshift(both)
  158. }
  159. }
  160. )
  161. } else {
  162. getDicts('PHASE_TYPE_DICT,TECHNICAL_CATEGORIES_DICT').then((result) => {
  163. var data = result.data
  164. if (data) {
  165. var data = result.data
  166. if (data) {
  167. this.screen2s.item = result.data[0] || []
  168. let both = {
  169. label: '全部',
  170. value: null,
  171. }
  172. this.screen2s.item.unshift(both)
  173. this.screen1s.item = result.data[1] || []
  174. this.screen1s.item.unshift(both)
  175. }
  176. }
  177. })
  178. }
  179. },
  180. getInfoList(){
  181. this.params.language = this.$i18n.locale.toUpperCase();
  182. this.params.unitCountry=this.country;
  183. getBaseProjectViews(this.params).then((result) => {
  184. // console.log(this.params);
  185. var data = result.data
  186. // console.log(data.baseProjectViews,'----------------------------------------------')
  187. if (data.baseProjectViews) {
  188. this.num = data.page.totalCount
  189. this.initData2 = data.baseProjectViews
  190. data.baseProjectViews.forEach((i) => {
  191. i.setDownDate = this.formatDate(i.setDownDate, 'YYYY-MM-DD')
  192. i.setUpDate = this.formatDate(i.setUpDate, 'YYYY-MM-DD')
  193. })
  194. data.baseProjectViews.forEach((item, index) => {
  195. item.projectLabel = item.projectLabel.split(',')
  196. })
  197. } else {
  198. this.initData2 = []
  199. this.num = ''
  200. }
  201. })
  202. },
  203. screenBack(data){
  204. console.log(data);
  205. let phaseType=data.click1?data.click1:'';
  206. let technicalCategories=data.click2?data.click2:''
  207. this.params.technicalCategories=technicalCategories;
  208. this.params.phaseType=phaseType;
  209. this.getInfoList();
  210. },
  211. getIconUrl(url) {
  212. return require('@/assets/img/realTimeInfo/' + url)
  213. },
  214. toView(router, json) {
  215. this.$router.push({ name: router, params: json })
  216. },
  217. screen(i) {
  218. this.index = i
  219. },
  220. getInformation(num) {
  221. this.informationsClass = num
  222. },
  223. ToprojectPresentationDetails() {
  224. this.$store.commit('modify', 'projectPresentationDetails')
  225. this.$router.push({ name: 'projectPresentationDetails', params: '' })
  226. },
  227. },
  228. }
  229. </script>
  230. <!-- Add "scoped" attribute to limit CSS to this component only -->
  231. <style scoped>
  232. .box {
  233. margin-top: 10px;
  234. background: #fff;
  235. /* height: 500px; */
  236. padding: 20px 0;
  237. }
  238. .crumbs {
  239. margin-left: 20px;
  240. }
  241. body {
  242. margin: 0;
  243. }
  244. .swipers {
  245. position: absolute;
  246. top: 30px;
  247. left: 100px;
  248. width: 460px;
  249. height: 390px;
  250. }
  251. .details {
  252. position: absolute;
  253. top: 30px;
  254. left: 600px;
  255. width: 460px;
  256. height: 390px;
  257. }
  258. .swiper-container {
  259. width: 100%;
  260. height: 300px;
  261. margin-left: auto;
  262. margin-right: auto;
  263. }
  264. .swiper-slide {
  265. background-size: cover;
  266. background-position: center;
  267. }
  268. .gallery-top {
  269. height: 80%;
  270. width: 100%;
  271. }
  272. .gallery-thumbs {
  273. height: 20%;
  274. box-sizing: border-box;
  275. padding: 10px 0;
  276. }
  277. .gallery-thumbs .swiper-slide {
  278. width: 25%;
  279. height: 100%;
  280. opacity: 0.4;
  281. }
  282. .gallery-thumbs .swiper-slide-thumb-active {
  283. opacity: 1;
  284. }
  285. .initData_label {
  286. color: #6c8c9d;
  287. font-weight: 700;
  288. font-size: 18px;
  289. line-height: 42px;
  290. }
  291. .enterprise_style {
  292. line-height: 40px;
  293. color: #6c819d;
  294. /* padding-left: 100px; */
  295. font-size: 18px;
  296. /* font-weight: 700; */
  297. margin-top: 5px;
  298. margin-left: 20px;
  299. /* border-bottom: 1px solid #95d13e; */
  300. }
  301. .enterprise_style_span {
  302. padding: 10px;
  303. text-align: center;
  304. height: 100%;
  305. /* background: #95d13e; */
  306. color: #2c558a;
  307. /* border-bottom: 2px solid #6699ff; */
  308. }
  309. .enterprise_style_product tr {
  310. line-height: 30px;
  311. width: 100%;
  312. display: inline-block;
  313. /* border-bottom: 1px dashed #ccc; */
  314. font-size: 14px;
  315. color: #6c819d;
  316. margin-bottom: 5px;
  317. }
  318. .recommend {
  319. margin-top: 15px;
  320. margin-left: 100px;
  321. }
  322. .recommend li {
  323. display: inline-block;
  324. width: 170px;
  325. /* height: 130px; */
  326. text-align: center;
  327. margin-right: 15px;
  328. }
  329. .information1 {
  330. display: inline-block;
  331. width: 123px;
  332. height: 100%;
  333. border: 1px solid rgba(228, 228, 228, 1);
  334. text-align: center;
  335. background: #f9f9f9;
  336. color: #999;
  337. }
  338. .information2 {
  339. display: inline-block;
  340. width: 123px;
  341. height: 100%;
  342. border-top: 3px solid #2c5589;
  343. text-align: center;
  344. color: #2c5589;
  345. }
  346. .information1:hover,
  347. .getBoth:hover {
  348. color: #ff0036;
  349. }
  350. img.right {
  351. float: right;
  352. }
  353. .initData {
  354. margin-top: 20px;
  355. margin-left: 100px;
  356. font-size: 14px;
  357. color: #bcbcbc;
  358. height: 200px;
  359. width: 1000px;
  360. /* box-shadow: rgba(242, 242, 242, 1); */
  361. box-shadow: 10px 10px 10px -5px rgba(242, 242, 242, 1);
  362. position: relative;
  363. border: 1px solid rgba(242, 242, 242, 1);
  364. }
  365. .LiActive:hover {
  366. border: 3px solid #ececec;
  367. }
  368. .continents ul,
  369. .continents2 ul {
  370. display: flex;
  371. flex-wrap: wrap;
  372. text-align: center;
  373. }
  374. .continents2 ul li {
  375. width: 210px;
  376. padding: 18px 30px;
  377. background: #fff;
  378. margin-bottom: 20px;
  379. color: #999;
  380. /* height: 384px; */
  381. /* border-right: 1px solid #EAEAEA; */
  382. border: 3px solid transparent;
  383. box-shadow: 5px 5px 5px #fafafa;
  384. }
  385. .continents2 ul li:nth-of-type(5) {
  386. border-right: none;
  387. }
  388. </style>