ComprehensiveDisplay.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388
  1. <template>
  2. <!-- 综合展示 -->
  3. <div class="ComprehensiveDisplayMain">
  4. <!-- 第一层:新闻中心、平台介绍 -->
  5. <div class="ComprehensiveDisplayMain_IntroductionOfNewsCenterAndPlatform">
  6. <!-- 新闻中心 -->
  7. <el-card class="Newscenter">
  8. <!-- 新闻中心标题 -->
  9. <div slot="header" class="clearfix userSelect_None">
  10. <span class="clearfix_title"><i class="elIcon el-icon-message-solid"></i>新闻中心</span>
  11. <span class="clearfix_titleEn" type="text">News Center</span>
  12. </div>
  13. <!-- 新闻中心主题 -->
  14. <div class="Newscenter_main">
  15. <!-- 图片轮播区域 -->
  16. <el-carousel class="Newscenter_main_byArea" height="200px">
  17. <el-carousel-item v-for="(item, index) in NewscenterAreas" :key="index">
  18. <el-image style="cursor: pointer" :src="item.imageUrl" @click="Jump(item.jumpUrl)"></el-image>
  19. </el-carousel-item>
  20. </el-carousel>
  21. <!-- 新闻中心内容 -->
  22. <div class="Newscenter_main_content">
  23. <!-- 标题 -->
  24. <el-tooltip class="item" effect="dark" :content="NewscenterData.NewscenterTitle" :open-delay="1000">
  25. <div class="title" @click="Jump(NewscenterData.NewscenterUrl)">{{ NewscenterData.NewscenterTitle }}</div>
  26. </el-tooltip>
  27. <!-- 内容 -->
  28. <el-tooltip class="item" effect="dark" :content="NewscenterData.NewscenterContent" :open-delay="1000">
  29. <div class="content userSelect_None">
  30. {{ NewscenterData.NewscenterContent }}
  31. </div>
  32. </el-tooltip>
  33. <!-- 小标题 -->
  34. <div v-if="NewscenterData.NewscenterTitles.length > 0">
  35. <el-carousel height="70px" direction="vertical">
  36. <el-carousel-item v-for="index in Math.ceil(NewscenterData.NewscenterTitles.length / 2)" :key="index">
  37. <el-tooltip
  38. class="item"
  39. effect="dark"
  40. :content="NewscenterData.NewscenterTitles[2 * index - 2].title"
  41. :open-delay="1000"
  42. >
  43. <div class="titles" @click="Jump(NewscenterData.NewscenterTitles[2 * index - 2].url)">
  44. {{ NewscenterData.NewscenterTitles[2 * index - 2].title }}
  45. </div>
  46. </el-tooltip>
  47. <div v-if="NewscenterData.NewscenterTitles[2 * index - 1]">
  48. <el-tooltip
  49. class="item"
  50. effect="dark"
  51. :content="NewscenterData.NewscenterTitles[2 * index - 1].title"
  52. :open-delay="1000"
  53. >
  54. <div class="titles" @click="Jump(NewscenterData.NewscenterTitles[2 * index - 1].url)">
  55. {{ NewscenterData.NewscenterTitles[2 * index - 1].title }}
  56. </div>
  57. </el-tooltip>
  58. </div>
  59. </el-carousel-item>
  60. </el-carousel>
  61. </div>
  62. <div v-else>暂无数据</div>
  63. </div>
  64. </div>
  65. </el-card>
  66. <!-- 平台介绍 -->
  67. <el-card class="PlatformIsIntroduced">
  68. <!-- 平台介绍标题 -->
  69. <div slot="header" class="clearfix userSelect_None">
  70. <span class="clearfix_title"><i class="elIcon el-icon-s-flag"></i>平台介绍</span>
  71. <span class="clearfix_titleEn" type="text">Platform Introduction</span>
  72. </div>
  73. <!-- 平台介绍主题 -->
  74. <div class="PlatformIsIntroduced_main" v-html="PlatformIsIntroducedContent"></div>
  75. </el-card>
  76. </div>
  77. <!-- 第二层:中国地理信息平台 -->
  78. <el-card
  79. class="ComprehensiveDisplayMain_ChinaGeographicInformationCenter"
  80. :style="ChinaGeographicInformationCenterBackgroundIamge()"
  81. >
  82. <!-- 平台介绍内容 -->
  83. <span class="ChinaGeographicInformationCenterTitle userSelect_None" @click="undefindFunction()">中国地理信息平台</span>
  84. </el-card>
  85. <!-- 第三层:服务中心 -->
  86. <el-card class="ComprehensiveDisplayMain_ServiceCenter">
  87. <!-- 服务中心标题 -->
  88. <div slot="header" class="clearfix userSelect_None">
  89. <span class="clearfix_title"><i class="elIcon el-icon-s-cooperation"></i>服务中心</span>
  90. <span class="clearfix_titleEn" type="text">Service Centre</span>
  91. </div>
  92. <!-- 服务中心主题 -->
  93. <div class="ServiceCenter_main userSelect_None">
  94. <div @click="undefindFunction()"><i class="el-icon-s-operation" style="margin-right: 47px"></i>数据管理</div>
  95. <div @click="undefindFunction()"><i class="el-icon-s-promotion" style="margin-right: 47px"></i>专题发布</div>
  96. <div @click="undefindFunction()"><i class="el-icon-data-line" style="margin-right: 47px"></i>数据可视化</div>
  97. </div>
  98. </el-card>
  99. </div>
  100. </template>
  101. <script>
  102. export default {
  103. name: "ComprehensiveDisplay",
  104. components: {},
  105. data() {
  106. // 后续可调用后端接口动态显示
  107. return {
  108. // 新闻中心轮播
  109. NewscenterAreas: [
  110. {
  111. imageUrl: "http://zfcxjst.hebei.gov.cn/dtlsj/202205/W020220518322335295754.jpg",
  112. jumpUrl: "http://zfcxjst.hebei.gov.cn/dtlsj/202205/t20220517_316299.html"
  113. },
  114. {
  115. imageUrl: "http://zfcxjst.hebei.gov.cn/dtlsj/202205/W020220520541128729525.jpg",
  116. jumpUrl: "http://zfcxjst.hebei.gov.cn/dtlsj/202205/t20220520_316317.html"
  117. },
  118. {
  119. imageUrl: "http://zfcxjst.hebei.gov.cn/sylbt/202205/W020220517418513508357.jpg",
  120. jumpUrl: "http://zfcxjst.hebei.gov.cn/sylbt/202205/t20220517_316294.html"
  121. },
  122. {
  123. imageUrl: "http://zfcxjst.hebei.gov.cn/sylbt/202205/W020220527577333537379.jpg",
  124. jumpUrl: "http://zfcxjst.hebei.gov.cn/sylbt/202205/t20220527_316375.html"
  125. },
  126. {
  127. imageUrl: "http://zfcxjst.hebei.gov.cn/sylbt/202205/W020220523637616449653.jpg",
  128. jumpUrl: "http://zfcxjst.hebei.gov.cn/sylbt/202205/t20220523_316327.html"
  129. }
  130. ],
  131. // 新闻中心右侧
  132. NewscenterData: {
  133. NewscenterTitle: "河北省住房和城乡建设厅举办扣好廉洁从政“第一粒扣子”青年干部主题演讲比赛",
  134. NewscenterUrl: "http://zfcxjst.hebei.gov.cn/sylbt/202205/t20220527_316375.html",
  135. NewscenterContent:
  136. "为教育引导青年干部坚定理想信念,牢记初心使命,正确对待权力,时刻自重自省,严守纪法规矩,按照省直机关纪检监察工作安排,5月26日,河北省住房和城乡建设厅举办扣好廉洁从政“第一粒扣子”青年干部演讲比赛。厅党组成员、总规划师吴铁,党组成员、副厅长赵春旺,二级巡视员翟佳麟及总经济师李景会到场观看比赛并为获奖人员颁奖。",
  137. NewscenterTitles: [
  138. {
  139. title: "1、河北省住房和城乡建设厅举办扣好廉洁从政“第一粒扣子”青年干部主题演讲比赛",
  140. url: "http://zfcxjst.hebei.gov.cn/xinwenzhongxin/gongzuodongtai/202205/t20220527_316375.html"
  141. },
  142. {
  143. title: "2、163个项目列入2022年河北省建设科技研究项目指导性计划",
  144. url: "http://zfcxjst.hebei.gov.cn/xinwenzhongxin/gongzuodongtai/202205/t20220524_316332.html"
  145. },
  146. {
  147. title: "3、河北省住房和城乡建设厅举办扣好廉洁从政“第一粒扣子”青年干部主题演讲比赛",
  148. url: "http://zfcxjst.hebei.gov.cn/xinwenzhongxin/gongzuodongtai/202205/t20220527_316375.html"
  149. },
  150. {
  151. title: "4、163个项目列入2022年河北省建设科技研究项目指导性计划",
  152. url: "http://zfcxjst.hebei.gov.cn/xinwenzhongxin/gongzuodongtai/202205/t20220524_316332.html"
  153. }
  154. ]
  155. },
  156. // 平台介绍,纯文本或者html文本都可以
  157. PlatformIsIntroducedContent: `<p>“河北省住房和城乡建设厅”网站由河北省住房和城乡建设厅主办,河北省住房和城乡建设厅信息中心承办。本法律声明阐述之条款和条件适用于所有登陆“河北省住房和城乡建设厅”网站的用户,以及其他网站或单位与该网站的法律关系。</p><p>
  158. 河北省住房和城乡建设厅是“河北省住房和城乡建设厅”网站的所有者。“河北省住房和城乡建设厅”网站上刊载的所有内容,包括文字、图片、声音、图表、色彩的组合,版面设计,专题专栏目录与名称、内容分类等的版权均属河北省住房和城乡建设厅所有,受《中华人民共和国著作权法》及其它相关法律的保护。</p><p>
  159. 他人将“河北省住房和城乡建设厅”网站提供的内容与服务用于商业、盈利、广告性目的时,需征得河北省住房和城乡建设厅或相关权利人许可,注明作者及文章出处,并依法向权利人支付报酬。</p><p>
  160. 使用者将“河北省住房和城乡建设厅”网站提供的内容与服务用于非商业用途时,应遵守著作权法以及其他相关法律的规定,不得侵犯“河北省住房和城乡建设厅”网站及相关权利人的权益。</p><p>
  161. 凡作者或权利人声明不得转载的文章或图片,任何单位及个人不得转载。</p><p>
  162. 未经河北省住房和城乡建设厅授权,任何人不得建立该网站的镜像。</p>`,
  163. ChinaGeographicInformationCenterTitleImageUrl:
  164. "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic4.zhimg.com%2Fv2-2240dce589ef3df6b21fe8792135e5bf_1200x500.jpg&refer=http%3A%2F%2Fpic4.zhimg.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1656253614&t=9478020c9c8c6a715fbdd8f49ef26288"
  165. };
  166. },
  167. computed: {},
  168. mounted() {},
  169. methods: {
  170. Jump(jumpUrl) {
  171. window.open(jumpUrl);
  172. },
  173. ChinaGeographicInformationCenterBackgroundIamge() {
  174. return "background-image: url(" + this.ChinaGeographicInformationCenterTitleImageUrl + ");";
  175. },
  176. undefindFunction() {
  177. this.$message.info("敬请期待!");
  178. }
  179. }
  180. };
  181. </script>
  182. <style lang="less" scoped>
  183. // 主题
  184. .ComprehensiveDisplayMain {
  185. display: flex;
  186. flex-direction: column;
  187. align-items: center;
  188. // 第一层:新闻中心、平台介绍
  189. &_IntroductionOfNewsCenterAndPlatform {
  190. width: 100%;
  191. display: flex;
  192. justify-content: space-between;
  193. align-items: center;
  194. align-content: center;
  195. flex-wrap: wrap;
  196. margin-bottom: 15px;
  197. // 新闻中心
  198. .Newscenter {
  199. width: calc(50% - 15px);
  200. height: 300px;
  201. &_main {
  202. display: flex;
  203. justify-content: space-between;
  204. align-items: center;
  205. align-content: center;
  206. &_byArea {
  207. width: 360px;
  208. height: 200px;
  209. // 轮播组件指示器样式
  210. /deep/ .el-carousel__button {
  211. width: 15px;
  212. }
  213. /deep/ .el-carousel__arrow {
  214. background: rgba(0, 0, 0, 0.75);
  215. box-shadow: 0px 0px 5px 1px #ffffff, 0px 0px 10px 2px #000000;
  216. }
  217. }
  218. &_content {
  219. width: 321px;
  220. height: 200px;
  221. overflow: hidden;
  222. text-overflow: ellipsis;
  223. .title {
  224. font-size: 22px;
  225. font-family: Microsoft YaHei;
  226. font-weight: 400;
  227. color: #409eff;
  228. line-height: 24px;
  229. overflow: hidden;
  230. text-overflow: ellipsis;
  231. white-space: nowrap;
  232. &:hover {
  233. cursor: pointer;
  234. color: #409eff;
  235. text-decoration: underline #409eff;
  236. }
  237. }
  238. .content {
  239. margin: 18px 0 27px 0;
  240. font-size: 18px;
  241. font-family: Microsoft YaHei;
  242. font-weight: 400;
  243. color: #808080;
  244. line-height: 24px;
  245. overflow: hidden;
  246. text-overflow: ellipsis;
  247. display: -webkit-box;
  248. -webkit-box-orient: vertical;
  249. -webkit-line-clamp: 2;
  250. }
  251. /deep/ .el-carousel__button {
  252. height: 15px;
  253. background-color: #303133;
  254. }
  255. .titles {
  256. width: 300px;
  257. margin-bottom: 22px;
  258. font-size: 18px;
  259. font-family: Microsoft YaHei;
  260. font-weight: 400;
  261. color: #409eff;
  262. line-height: 24px;
  263. overflow: hidden;
  264. text-overflow: ellipsis;
  265. white-space: nowrap;
  266. &:hover {
  267. cursor: pointer;
  268. color: #409eff;
  269. text-decoration: underline #409eff;
  270. }
  271. }
  272. }
  273. }
  274. }
  275. // 平台介绍
  276. .PlatformIsIntroduced {
  277. width: calc(50% - 15px);
  278. height: 300px;
  279. &_main {
  280. height: 190px;
  281. text-indent: 36px;
  282. font-size: 18px;
  283. font-family: Microsoft YaHei;
  284. font-weight: 400;
  285. color: #808080;
  286. line-height: 32px;
  287. overflow-y: scroll;
  288. }
  289. }
  290. }
  291. // 第二层:中国地理信息平台
  292. &_ChinaGeographicInformationCenter {
  293. width: 100%;
  294. height: 90px;
  295. display: flex;
  296. align-content: center;
  297. flex-direction: row-reverse;
  298. align-items: center;
  299. // margin: 15px 0px;
  300. .ChinaGeographicInformationCenterTitle {
  301. font-size: 30px;
  302. font-family: Microsoft YaHei;
  303. font-weight: bold;
  304. color: #FFFFFF;
  305. line-height: 40px;
  306. text-shadow: 2px 2px 5px #000, 2px 2px 10px white;
  307. transition: all 0.3s;
  308. &:hover {
  309. cursor: pointer;
  310. text-shadow: 2px 2px 5px #000, 1px 1px 15px white;
  311. }
  312. }
  313. }
  314. // 第三层:服务中心
  315. &_ServiceCenter {
  316. width: 100%;
  317. margin: 15px 0px;
  318. .ServiceCenter_main {
  319. display: flex;
  320. justify-content: space-around;
  321. align-items: center;
  322. align-content: center;
  323. flex-wrap: nowrap;
  324. div {
  325. display: flex;
  326. justify-content: center;
  327. align-items: center;
  328. align-content: center;
  329. flex-wrap: nowrap;
  330. width: calc(33% - 40px);
  331. height: 80px;
  332. background: #0589ff;
  333. border-radius: 3px;
  334. font-size: 40px;
  335. font-family: YouSheBiaoTiHei;
  336. font-weight: 400;
  337. color: #d9f1ff;
  338. line-height: 40px;
  339. transition: all 0.3s;
  340. &:hover {
  341. cursor: pointer;
  342. color: #ffffff;
  343. background: #05a3ff;
  344. text-shadow: 1px 1px 2px #0589ff, 1px 1px 4px white;
  345. box-shadow: 1px 1px 5px 0px #ffffff, 1px 1px 10px 0px #0589ff;
  346. }
  347. }
  348. }
  349. }
  350. // 公共属性
  351. // icon公用样式
  352. .elIcon {
  353. margin-right: 19px;
  354. }
  355. // 卡片头部样式
  356. /deep/ .el-card__header{
  357. padding: 15px 20px !important;
  358. }
  359. .clearfix {
  360. height: 30px;
  361. &_title {
  362. font-size: 30px;
  363. font-family: Microsoft YaHei;
  364. font-weight: bold;
  365. color: #258df5;
  366. line-height: 40px;
  367. }
  368. &_titleEn {
  369. float: right;
  370. padding-right: 19px;
  371. font-size: 20px;
  372. font-family: YouSheBiaoTiHei;
  373. font-weight: 400;
  374. color: #258df5;
  375. line-height: 40px;
  376. }
  377. }
  378. // 文字禁止选中
  379. .userSelect_None {
  380. -webkit-user-select: none;
  381. -moz-user-select: none;
  382. -ms-user-select: none;
  383. user-select: none;
  384. }
  385. }
  386. </style>