index.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. <template>
  2. <div class="application-center">
  3. <!-- 顶部横幅区域 -->
  4. <div class="banner">
  5. <div class="banner-content">
  6. <h1 class="banner-title">应用中心</h1>
  7. <p class="banner-description">
  8. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;收集、管理区级应用的访问地址、使用单位、使用情况等。区委办局、街镇、居村应基于区级节点开展区级时空应用建设。
  9. </p>
  10. <!-- <div>
  11. <el-button type="primary" class="enter-button" @click="handleEnterClick">立即体验</el-button>
  12. </div> -->
  13. </div>
  14. </div>
  15. <!-- 示范应用区域 -->
  16. <div class="demo-applications">
  17. <!-- <div class="section-title">
  18. <h2>示范应用</h2>
  19. <div class="title-line"></div>
  20. </div> -->
  21. <!-- <div class="applications-grid" >
  22. <div v-for="item in applications" :key="item.id">
  23. <div class="application-card">
  24. <div class="card-image">
  25. <img :src="curUrl + item.c_picture" :alt="item.title" />
  26. </div>
  27. <h3 class="card-title"> {{ item.title }}</h3>
  28. <div class="card-info">
  29. <p><strong>访问类型:</strong> {{ item.type }}</p>
  30. <p><strong>建设单位:</strong> {{ item.jsdw }}</p>
  31. <p><strong>建设时间:</strong> {{ item.createTime }}</p>
  32. </div>
  33. </div>
  34. </div>
  35. </div> -->
  36. <div v-for="useCaseItem in appCenterlications" :key="useCaseItem.title">
  37. <div class="title " v-if="useCaseItem.title != '基础能力'" style="margin: 50px 0px;display: flex;justify-content: space-between;align-items: baseline;">
  38. <div></div>
  39. <div style="font-size: 24px;margin-top: 10px;text-align: center;font-weight: bold;">{{useCaseItem.title}}</div>
  40. <div style="color: #ADE8FE;cursor: pointer;" @click="handleEnterClick(useCaseItem.title)">查看更多></div>
  41. </div>
  42. <div class="warp-container" v-if="useCaseItem.title != '基础能力'" >
  43. <el-carousel :interval="40000" type="card" height="600px">
  44. <el-carousel-item v-for="item in useCaseItem.data" :key="item.title" @click="handleTabsOpenPage(item)">
  45. <div class="warp-page-card" >
  46. <div class="warp-page-img" :style="`background-image: url(${curUrl}${item.picture});`"></div>
  47. <div class="warp-page-text">
  48. <div class="warp-page-text-title">{{ item.title }}</div>
  49. <div class="warp-page-text-desc">{{ item.text }}</div>
  50. </div>
  51. </div>
  52. </el-carousel-item>
  53. </el-carousel>
  54. </div>
  55. </div>
  56. <!-- <div v-for="useCaseItem in examplelist" :key="useCaseItem.title" :id="useCaseItem.title === '统建应用' ? 'tjyy' : useCaseItem.title === '应用支撑' ? 'yyzc' : ''">
  57. <div class="title " v-if="useCaseItem.title != '基础能力'" style="margin: 50px 0px;display: flex;justify-content: space-between;align-items: baseline;">
  58. <div></div>
  59. <div style="font-size: 24px;margin-top: 10px;text-align: center;font-weight: bold;">{{useCaseItem.title}}</div>
  60. <div style="color: #ADE8FE;cursor: pointer;" @click="handleEnterClick">查看更多></div>
  61. </div>
  62. <div class="warp-container" v-if="useCaseItem.title != '基础能力'" >
  63. <div class="warp-page-card" v-for="item in useCaseItem.data" :key="item.title" @click="handleTabsOpenPage(item)">
  64. <div class="warp-page-img" :style="`background-image: url(${item.picture});`"></div>
  65. <div class="warp-page-text">
  66. <div class="warp-page-text-title">{{ item.title }}</div>
  67. <div class="warp-page-text-desc">{{ item.text }}</div>
  68. </div>
  69. </div>
  70. </div>
  71. </div> -->
  72. </div>
  73. </div>
  74. </template>
  75. <script>
  76. import appCenter from "@/api/appCenter";
  77. import moment from 'moment';
  78. export default {
  79. name: "ApplicationCenter",
  80. data() {
  81. return {
  82. applications:[],
  83. appCenterlications:[],
  84. itemAppCenterlications:[],
  85. tagOptions: [],
  86. curUrl:systemConfig.dmsDataProxy,
  87. examplelist:systemConfig.examplelist,
  88. }
  89. },
  90. mounted() {
  91. this.initData()
  92. },
  93. methods: {
  94. handleEnterClick(val) {
  95. let tag = this.tagOptions.find((info)=>info.value == val).label;
  96. sessionStorage.setItem('activeTag', parseInt(tag));
  97. this.$router.push('appCenter');
  98. },
  99. initData() {
  100. this.getDmsTagSName();
  101. },
  102. getDmsTagSName() {
  103. let requestParams = {
  104. sName: "tag",
  105. };
  106. appCenter.getDmsSName(requestParams).then((res) => {
  107. if (res.code === 200) {
  108. this.tagOptions = res.content.map((item) => ({
  109. label: item.index,
  110. value: item.name,
  111. }));
  112. this.appCenterlications = res.content.map((item) => ({
  113. title: item.name,
  114. data: [],
  115. }));
  116. this.getDmsDataList();
  117. }
  118. });
  119. },
  120. //示范数据
  121. getDmsSFDataList(){
  122. let requestParams = {
  123. columnId: systemConfig.columnIds[0], // 应用中心栏目id(示范应用)
  124. states: 0,
  125. pageSize: 999,
  126. page: 0
  127. };
  128. appCenter.getDmsDataList(requestParams).then(res => {
  129. if (res.code === 200) {
  130. this.applications = res.content.data.map(item => ({
  131. ...item,
  132. type: item.c_fwlx === 0 ? '禁用' : '公开',
  133. createTime: moment(item.create_time).format('YYYY-MM-DD')
  134. }))
  135. // console.log(this.applications);
  136. }else{
  137. this.applications = [];
  138. }
  139. })
  140. },
  141. // 应用中心数据
  142. getDmsDataList() {
  143. let requestParams = {
  144. columnId: systemConfig.columnIds[1], // 应用中心栏目id
  145. states: 0,
  146. orderBy: JSON.stringify([{"field":"frame_time","orderByType":2}]),
  147. pageSize: 9999,
  148. page: 0
  149. };
  150. appCenter.getDmsDataList(requestParams).then((res) => {
  151. if (res.code === 200) {
  152. let arr = res.content.data.map((item) => ({
  153. ...item,
  154. tags: item.apptags.split(',').map(tag => this.tagOptions.find(info => info.label == tag.trim())?.value || ''),
  155. createTime: moment(item.create_time).format('YYYY-MM-DD HH:mm:ss')
  156. }))
  157. this.appCenterlications.forEach(item => {
  158. arr.forEach(info => {
  159. if(info.tags.includes(item.title) == true && info.issf != '0'){
  160. let str = {
  161. id:info.id,
  162. tags: ["盈浦街道", "夏阳街道"],
  163. title: info.title,
  164. text: info.content,
  165. picture: info.c_picture,
  166. url:info.c_url
  167. }
  168. item.data.push(str);
  169. }
  170. })
  171. })
  172. console.log(this.appCenterlications);
  173. } else {
  174. this.appCenterlications = [];
  175. }
  176. });
  177. },
  178. handleTabsOpenPage(item){
  179. // if(item.url){
  180. // window.open(item.url);
  181. // }
  182. }
  183. }
  184. }
  185. </script>
  186. <style lang="less" scoped>
  187. :deep(.el-carousel__arrow--left) {
  188. background: #18a6ff; /* 左箭头背景色 */
  189. opacity: 0.8;
  190. }
  191. :deep(.el-carousel__arrow--right) {
  192. background: #18a6ff; /* 右箭头背景色 */
  193. opacity: 0.8;
  194. }
  195. .application-center {
  196. width: 100%;
  197. min-height: 100vh;
  198. background-color: #01012f;
  199. color: #ffffff;
  200. overflow-x: hidden;
  201. }
  202. /* 顶部横幅样式 */
  203. .banner {
  204. width: 100%;
  205. // height: calc(100vh - 120px);
  206. height: 552px;
  207. background: url('@static/images/yyzx/bg.png');
  208. background-size: cover;
  209. display: flex;
  210. justify-content: right;
  211. align-items: center;
  212. position: relative;
  213. overflow: hidden;
  214. // &::before {
  215. // content: '';
  216. // position: absolute;
  217. // top: 0;
  218. // left: 0;
  219. // width: 100%;
  220. // height: 100%;
  221. // background: rgba(8, 34, 74, 0.7);
  222. // z-index: 1;
  223. // }
  224. .banner-content {
  225. position: relative;
  226. z-index: 2;
  227. text-align: right;
  228. max-width: 500px;
  229. padding: 0 10%;
  230. justify-content: right;
  231. display: grid;
  232. }
  233. .banner-title {
  234. font-size: 56px;
  235. font-weight: bold;
  236. letter-spacing: 0.5rem;
  237. // margin-bottom: 20px;
  238. color: #ffffff;
  239. text-align: right;
  240. text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  241. }
  242. .banner-description {
  243. font-size: 16px;
  244. line-height: 1.8;
  245. margin: 40px 0px;
  246. text-align: left;
  247. color: rgba(255, 255, 255, 0.9);
  248. }
  249. .enter-button {
  250. padding: 12px 36px;
  251. font-size: 18px;
  252. border-radius: 10px;
  253. background-color: #1890ff;
  254. border: none;
  255. transition: all 0.3s ease;
  256. &:hover {
  257. background-color: #40a9ff;
  258. transform: translateY(-2px);
  259. box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
  260. }
  261. }
  262. }
  263. /* 示范应用区域样式 */
  264. .demo-applications {
  265. // padding: 60px 20px;
  266. // max-width: 1400px;
  267. // width: 80%;
  268. margin: 0 auto;
  269. padding-left: 120px;
  270. padding-right: 120px;
  271. padding-bottom: 120px;
  272. .section-title {
  273. text-align: center;
  274. margin-bottom: 60px;
  275. h2 {
  276. font-size: 36px;
  277. font-weight: bold;
  278. margin-bottom: 15px;
  279. color: #ffffff;
  280. }
  281. .title-line {
  282. width: 80px;
  283. height: 3px;
  284. background-color: #1890ff;
  285. margin: 0 auto;
  286. }
  287. }
  288. .applications-grid {
  289. display: grid;
  290. grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
  291. gap: 30px;
  292. margin: 60px 0 60px 0px;
  293. .application-card {
  294. background: rgba(24, 144, 255, 0.1);
  295. border: 1px solid rgba(24, 144, 255, 0.3);
  296. border-radius: 8px;
  297. overflow: hidden;
  298. transition: all 0.3s ease;
  299. &:hover {
  300. transform: translateY(-5px);
  301. box-shadow: 0 10px 30px rgba(24, 144, 255, 0.3);
  302. border-color: rgba(24, 144, 255, 0.6);
  303. }
  304. .card-image {
  305. width: 100%;
  306. height: 200px;
  307. overflow: hidden;
  308. img {
  309. width: 100%;
  310. height: 100%;
  311. object-fit: cover;
  312. transition: transform 0.3s ease;
  313. }
  314. &:hover img {
  315. transform: scale(1.05);
  316. }
  317. }
  318. .card-title {
  319. font-size: 18px;
  320. font-weight: bold;
  321. padding: 20px 20px 15px;
  322. margin: 0;
  323. color: #ffffff;
  324. border-bottom: 1px solid rgba(24, 144, 255, 0.3);
  325. }
  326. .card-info {
  327. padding: 15px 20px 20px;
  328. font-size: 14px;
  329. // color: rgba(255, 255, 255, 0.8);
  330. color: #ffffff;
  331. p {
  332. margin: 8px 0;
  333. line-height: 1.6;
  334. strong {
  335. // color: rgba(24, 144, 255, 0.9);
  336. color: #ffffff;
  337. }
  338. }
  339. }
  340. }
  341. }
  342. }
  343. /* 响应式设计 */
  344. @media (max-width: 768px) {
  345. .banner {
  346. height: 400px;
  347. .banner-title {
  348. font-size: 36px;
  349. }
  350. .banner-description {
  351. font-size: 14px;
  352. }
  353. .enter-button {
  354. padding: 10px 28px;
  355. font-size: 16px;
  356. }
  357. }
  358. .demo-applications {
  359. padding: 40px 15px;
  360. .section-title h2 {
  361. font-size: 28px;
  362. }
  363. .applications-grid {
  364. grid-template-columns: 1fr;
  365. gap: 20px;
  366. }
  367. }
  368. }
  369. .el-carousel__item:nth-child(2n) {
  370. background-color: #01012f;
  371. border-radius: 20px;
  372. }
  373. .el-carousel__item:nth-child(2n + 1) {
  374. background-color: #01012f;
  375. border-radius: 20px;
  376. }
  377. .warp-container{
  378. display: grid;
  379. justify-content: flex-start;
  380. align-items: center;
  381. grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  382. gap: 30px;
  383. .warp-page-card{
  384. cursor: pointer;
  385. justify-content: flex-start;
  386. width: 100%;
  387. height: 600px;
  388. // display: grid;
  389. border: 1px solid transparent;
  390. border-radius: 16px;
  391. background-clip: padding-box, border-box;
  392. background-origin: padding-box, border-box;
  393. background-image: linear-gradient(345deg, #08113e, #2220), linear-gradient(345deg, #fffdfd6b, #00000000, #00000000, #00000000);
  394. .warp-page-img{
  395. cursor: pointer;
  396. height: 400px;
  397. background-size: cover;
  398. border-radius: 16px 16px 0px 0px;
  399. }
  400. .warp-page-text{
  401. padding: 0px 20px 20px 20px;
  402. // height: 200px;
  403. // font-size: 24px;
  404. color: #c7c2c2;
  405. .warp-page-text-title{
  406. font-weight: bold;
  407. margin: 10px 0px;
  408. color: #ffffff;
  409. }
  410. .warp-page-text-desc{
  411. display: -webkit-box;
  412. -webkit-box-orient: vertical;
  413. -webkit-line-clamp: 5; /* 限制显示4行 */
  414. line-clamp: 5; /* 标准属性 */
  415. overflow: hidden;
  416. text-overflow: ellipsis;
  417. }
  418. }
  419. transition: all 0.3s ease;
  420. // &:hover {
  421. // background-color: #152736;
  422. // transform: translateY(-5px);
  423. // box-shadow: 0 4px 12px rgba(24, 144, 255, 0.4);
  424. // }
  425. }
  426. }
  427. </style>