countryResources.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. <template>
  2. <div>
  3. <div style="margin: 0 30px;" v-for="(item,index) in initData">
  4. <div class="enterprise_style">
  5. <span class="enterprise_style_span" style="padding: 10px;text-align: center;height: 100%;color: #2C558A;border-bottom: 2px solid #6699ff;">
  6. <span style="display: inline-block;width: 10px;height: 10px;background: #0B82FF;border-radius: 50%;"></span>
  7. {{item.title}}
  8. </span>
  9. </div>
  10. <p style="margin-top: 15px;color: #666;margin-left: 35px;min-height: 300px;margin-right: 35px;">
  11. <!-- <img :src="'api/file/pub/' + item.pictureUrl" alt="" class="right" style="width:300px;">-->
  12. <span style="color: #666666;" v-html='item.contentHtml'></span>
  13. <span style="color: #02558a;margin-left: 25px;margin-right: 25px;" class="cursor"
  14. @click="toView('countryInformationDetails','')">
  15. <!-- 详情 -->
  16. </span>
  17. </p>
  18. </div>
  19. </div>
  20. </template>
  21. <script>
  22. import {
  23. gateGetProjectViewInfo,
  24. getBannerPath,
  25. getBaseProjectViews,
  26. } from '@/api/project/baseProjectView'
  27. import {getCountry,getInformationList} from '@/api/country/countryList'
  28. import { getDicts } from '@/api/dict'
  29. export default {
  30. name: 'countryResources',
  31. props:['id'],
  32. data () {
  33. return {
  34. enterpriseDetails:'',
  35. informationsClass:'1',
  36. img:[{
  37. src:'u6668.png',
  38. },{
  39. src:'u6676.png',
  40. },{
  41. src:'u6720.png',
  42. },{
  43. src:'u6763.png',
  44. },{
  45. src:'u6668.png',
  46. },{
  47. src:'u6720.png',
  48. }],
  49. initData:[],
  50. params: {
  51. pageNo: 1,
  52. pageSize: 3,
  53. language: '',
  54. phaseType: '',
  55. unitCountry: '',
  56. //0为默认排序,1为关注排序
  57. descStatus: 0,
  58. technicalCategories:'',
  59. status: 1,
  60. },
  61. num: 0,
  62. enterprise: [],
  63. screen1s: {
  64. value: 'common.Category',
  65. item: [],
  66. },
  67. screen2s: {
  68. value: 'common.phaseType',
  69. item: [],
  70. },
  71. initData2: [],
  72. }
  73. },
  74. created(){
  75. this.enterpriseDetails=this.$route.params.key
  76. },
  77. mounted(){
  78. this.getCountryData(); // 获取国家分类信息
  79. },
  80. watch:{
  81. '$i18n.locale'(){
  82. this.getCountryData();
  83. }
  84. },
  85. methods:{
  86. getCountryData(){
  87. let list={
  88. pageSize:5,
  89. pageNo:1,
  90. businessType:'countryShow',
  91. businessId:this.id,
  92. typeDict:2,
  93. language:this.$i18n.locale.toUpperCase(),
  94. }
  95. getInformationList(list).then(res=>{
  96. this.initData=res.data.allDataList;
  97. })
  98. },
  99. getInfoList(){
  100. this.params.language = this.$i18n.locale.toUpperCase();
  101. this.params.unitCountry=this.country;
  102. getBaseProjectViews(this.params).then((result) => {
  103. // console.log(this.params);
  104. var data = result.data
  105. // console.log(data.baseProjectViews,'----------------------------------------------')
  106. if (data.baseProjectViews) {
  107. this.num = data.page.totalCount
  108. this.initData2 = data.baseProjectViews
  109. data.baseProjectViews.forEach((i) => {
  110. i.setDownDate = this.formatDate(i.setDownDate, 'YYYY-MM-DD')
  111. i.setUpDate = this.formatDate(i.setUpDate, 'YYYY-MM-DD')
  112. })
  113. data.baseProjectViews.forEach((item, index) => {
  114. item.projectLabel = item.projectLabel?item.projectLabel.split(','):''
  115. })
  116. } else {
  117. this.initData2 = []
  118. this.num = ''
  119. }
  120. })
  121. },
  122. toViewDetail(router,json){
  123. this.$store.commit('modify', router);
  124. window.localStorage.setItem('router', router);
  125. const { href } = this.$router.resolve({
  126. name: router,
  127. query: {
  128. key: json
  129. }
  130. });
  131. window.open(href, '_blank');
  132. },
  133. getIconUrl(url){
  134. return require("@/assets/img/realTimeInfo/"+url);
  135. },
  136. toView(router,json){
  137. // this.$router.push({name:c,query:{key:json}})
  138. this.$store.commit('modify', router);
  139. window.localStorage.setItem('router', router);
  140. const { href } = this.$router.resolve({
  141. name: router,
  142. query: {
  143. key: json
  144. }
  145. });
  146. window.open(href, '_blank');
  147. },
  148. screenBack(data){
  149. console.log(data,'screenBackscreenBackscreenBackscreenBack')
  150. },
  151. screen(i){
  152. this.index=i
  153. },
  154. getInformation(num){
  155. this.informationsClass=num
  156. },
  157. }
  158. }
  159. </script>
  160. <!-- Add "scoped" attribute to limit CSS to this component only -->
  161. <style scoped>
  162. .box {
  163. margin-top: 10px;
  164. background: #fff;
  165. /* height: 500px; */
  166. padding: 20px 0;
  167. }
  168. .crumbs {
  169. margin-left: 20px;
  170. }
  171. body {
  172. margin: 0;
  173. }
  174. .swipers {
  175. position: absolute;
  176. top: 30px;
  177. left: 100px;
  178. width: 460px;
  179. height: 390px;
  180. }
  181. .details {
  182. position: absolute;
  183. top: 30px;
  184. left: 600px;
  185. width: 460px;
  186. height: 390px;
  187. }
  188. .swiper-container {
  189. width: 100%;
  190. height: 300px;
  191. margin-left: auto;
  192. margin-right: auto;
  193. }
  194. .swiper-slide {
  195. background-size: cover;
  196. background-position: center;
  197. }
  198. .gallery-top {
  199. height: 80%;
  200. width: 100%;
  201. }
  202. .gallery-thumbs {
  203. height: 20%;
  204. box-sizing: border-box;
  205. padding: 10px 0;
  206. }
  207. .gallery-thumbs .swiper-slide {
  208. width: 25%;
  209. height: 100%;
  210. opacity: 0.4;
  211. }
  212. .gallery-thumbs .swiper-slide-thumb-active {
  213. opacity: 1;
  214. }
  215. .initData_label {
  216. color: #6c8c9d;
  217. font-weight: 700;
  218. font-size: 18px;
  219. line-height: 42px;
  220. }
  221. .enterprise_style{
  222. line-height: 40px;
  223. color: #6C819D;
  224. /* padding-left: 100px; */
  225. font-size: 18px;
  226. /* font-weight: 700; */
  227. margin-top: 5px;
  228. margin-left: 20px;
  229. /* border-bottom: 1px solid #95d13e; */
  230. }
  231. .enterprise_style_span {
  232. /* padding: 10px; */
  233. text-align: center;
  234. height: 100%;
  235. /* background: #95d13e; */
  236. color: #2C558A;
  237. /* border-bottom: 2px solid #6699ff; */
  238. }
  239. .enterprise_style_product tr {
  240. line-height: 30px;
  241. width: 100%;
  242. display: inline-block;
  243. border-bottom: 1px dashed #ccc;
  244. font-size: 14px;
  245. color: #6C819D;
  246. margin-bottom: 5px;
  247. }
  248. .recommend {
  249. margin-top:15px;
  250. margin-left: 100px;
  251. }
  252. .recommend li{
  253. display: inline-block;
  254. width: 170px;
  255. /* height: 130px; */
  256. text-align: center;
  257. margin-right: 15px;
  258. }
  259. .information1 {
  260. display: inline-block;
  261. width: 123px;
  262. height: 100%;
  263. border:1px solid rgba(228, 228, 228, 1);
  264. text-align: center;
  265. background: #f9f9f9;
  266. color: #999;
  267. }
  268. .information2 {
  269. display: inline-block;
  270. width: 123px;
  271. height: 100%;
  272. border-top:3px solid #2c5589;
  273. text-align: center;
  274. color: #2c5589;
  275. }
  276. .information1:hover {
  277. color: #FF0036;
  278. }
  279. img.right {
  280. float: right;
  281. }
  282. </style>