1.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718
  1. <template>
  2. <div>
  3. <div class="ul_box_1" v-if="componentStyle == 1">
  4. <h4 class="ul_head">
  5. <NuxtLink v-if="titleLink.cid" :href="getLinkPath(titleLink)" :title="titleLink.alias">
  6. <span>{{ titleLink.alias }}</span>
  7. </NuxtLink>
  8. </h4>
  9. <div class="img_ul">
  10. <div class="img_ul_li" v-for="item in component_style1_News1Array">
  11. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  12. :target="item.islink == 1 ? '_blank' : '_self'">
  13. <img class="img_ul_li_img" :src="item.imgurl" alt="">
  14. <div class="img_ul_li_dot4">{{ item.title }}</div>
  15. </NuxtLink>
  16. </div>
  17. </div>
  18. <div class="ul_box">
  19. <div class="ul_li" v-for="item in component_style1_News2Array">
  20. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  21. :target="item.islink == 1 ? '_blank' : '_self'">
  22. {{ item.title }}
  23. </NuxtLink>
  24. </div>
  25. </div>
  26. <div class="img_ul">
  27. <div class="img_ul_li" v-for="item in component_style1_News1Array_1">
  28. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  29. :target="item.islink == 1 ? '_blank' : '_self'">
  30. <img class="img_ul_li_img" :src="item.imgurl" alt="">
  31. <div class="img_ul_li_dot4">{{ item.title }}</div>
  32. </NuxtLink>
  33. </div>
  34. </div>
  35. <div class="ul_box">
  36. <div class="ul_li" v-for="item in component_style1_News2Array_1">
  37. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  38. :target="item.islink == 1 ? '_blank' : '_self'">
  39. {{ item.title }}
  40. </NuxtLink>
  41. </div>
  42. </div>
  43. </div>
  44. <div class="ul_box_2" v-if="componentStyle == 2">
  45. <h4 class="ul_head">
  46. <NuxtLink v-if="titleLink.cid" :href="getLinkPath(titleLink)" :title="titleLink.alias">
  47. <span>{{ titleLink.alias }}</span>
  48. </NuxtLink>
  49. </h4>
  50. <div class="img_ul">
  51. <div class="img_ul_li" v-for="item in component_style1_News1Array_2">
  52. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  53. :target="item.islink == 1 ? '_blank' : '_self'">
  54. <img class="img_ul_li_img" :src="item.imgurl" alt="">
  55. <div class="img_ul_li_dot4">{{ item.title }}</div>
  56. </NuxtLink>
  57. </div>
  58. </div>
  59. <div class="ul_box">
  60. <div class="ul_li" v-for="item in component_style1_News2Array_2">
  61. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  62. :target="item.islink == 1 ? '_blank' : '_self'">
  63. {{ item.title }}
  64. </NuxtLink>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="ul_box_3" v-if="componentStyle == 3">
  69. <h4 class="ul_head">
  70. <NuxtLink v-if="titleLink.cid" :href="getLinkPath(titleLink)" :title="titleLink.alias">
  71. <span>{{ titleLink.alias }}</span>
  72. </NuxtLink>
  73. </h4>
  74. <div class="img_ul">
  75. <div class="img_ul_li" v-for="item in component_style1_News1Array">
  76. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  77. :target="item.islink == 1 ? '_blank' : '_self'">
  78. <img class="img_ul_li_img" :src="item.imgurl" alt="">
  79. <div class="img_ul_li_dot4">{{ item.title }}</div>
  80. </NuxtLink>
  81. </div>
  82. </div>
  83. <div class="ul_box">
  84. <div class="ul_li" v-for="item in component_style1_News2Array">
  85. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  86. :target="item.islink == 1 ? '_blank' : '_self'">
  87. {{ item.title }}
  88. </NuxtLink>
  89. </div>
  90. </div>
  91. <div class="img_ul">
  92. <div class="img_ul_li" v-for="item in component_style1_News1Array_1">
  93. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  94. :target="item.islink == 1 ? '_blank' : '_self'">
  95. <img class="img_ul_li_img" :src="item.imgurl" alt="">
  96. <div class="img_ul_li_dot4">{{ item.title }}</div>
  97. </NuxtLink>
  98. </div>
  99. </div>
  100. <div class="ul_box">
  101. <div class="ul_li" v-for="item in component_style1_News2Array_1">
  102. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  103. :target="item.islink == 1 ? '_blank' : '_self'">
  104. {{ item.title }}
  105. </NuxtLink>
  106. </div>
  107. </div>
  108. </div>
  109. <div class="ul_box_4" v-if="componentStyle == 4">
  110. <h4 class="ul_head">
  111. <NuxtLink v-if="titleLink.cid" :href="getLinkPath(titleLink)" :title="titleLink.alias">
  112. <span>{{ titleLink.alias }}</span>
  113. </NuxtLink>
  114. </h4>
  115. <div class="img_ul">
  116. <div class="img_ul_li" v-for="item in component_style1_News1Array_2">
  117. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  118. :target="item.islink == 1 ? '_blank' : '_self'">
  119. <img class="img_ul_li_img" :src="item.imgurl" alt="">
  120. <div class="img_ul_li_dot4">{{ item.title }}</div>
  121. </NuxtLink>
  122. </div>
  123. </div>
  124. <div class="ul_box">
  125. <div class="ul_li" v-for="item in component_style1_News2Array_2">
  126. <NuxtLink :href="getLinkPathDetail(item)" :title="item.title"
  127. :target="item.islink == 1 ? '_blank' : '_self'">
  128. {{ item.title }}
  129. </NuxtLink>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </template>
  135. <script setup>
  136. //引入vue
  137. import { ref } from 'vue';
  138. //获得新闻数据
  139. const props = defineProps({
  140. titleLink: Object,//标题
  141. componentStyle: Number,//样式编号
  142. });
  143. const component_style1_News1Array = ref([]);
  144. const component_style1_News1Array_1 = ref([]);
  145. const component_style1_News1Array_2 = ref([]);
  146. const component_style1_News2Array = ref([]);
  147. const component_style1_News2Array_1 = ref([]);
  148. const component_style1_News2Array_2 = ref([]);
  149. //最新资讯数据 start ---------------------------------------->
  150. async function getPageData() {
  151. const mkdata = await requestDataPromise('/web/getWebsiteArticlett', {
  152. method: 'GET',
  153. query: {
  154. 'imgnum': 4,
  155. 'textnum': 4,
  156. 'level': 4,
  157. 'id': 0,
  158. 'placeid': 0,
  159. },
  160. });
  161. if (mkdata.code == 200) {
  162. component_style1_News1Array.value = mkdata.data.img.slice(0, 2);
  163. component_style1_News1Array_1.value = mkdata.data.img.slice(2, 4);
  164. component_style1_News1Array_2.value = mkdata.data.img.slice(0, 4);
  165. component_style1_News2Array.value = mkdata.data.text.slice(0, 4);
  166. component_style1_News2Array_1.value = mkdata.data.text.slice(4, 8);
  167. component_style1_News2Array_2.value = mkdata.data.text.slice(0, 8);
  168. }
  169. }
  170. getPageData();
  171. //最新资讯数据 end ---------------------------------------->
  172. </script>
  173. <style lang="less" scoped>
  174. //基本样式
  175. .tabsNewsBox {
  176. .tabsNewsTitle {
  177. display: flex;
  178. align-items: flex-start;
  179. justify-content: flex-start;
  180. border-bottom: 1px solid #999999;
  181. height: 38px;
  182. margin-bottom: 15px;
  183. div {
  184. height: 35px;
  185. width: 138px;
  186. line-height: 32px;
  187. font-size: 22px;
  188. font-weight: bold;
  189. color: #333333;
  190. cursor: pointer;
  191. overflow: hidden;
  192. text-overflow: ellipsis;
  193. white-space: nowrap;
  194. color: #3848A0;
  195. background: url("https://img.bjzxtw.org.cn/pre/image/png/20251104/1762224944805589.png") bottom left no-repeat;
  196. }
  197. }
  198. .tabsNewsContent {
  199. width: 100%;
  200. height: 370px;
  201. display: flex;
  202. align-items: flex-start;
  203. justify-content: flex-start;
  204. .tabsNewsContentLeft {
  205. position: relative;
  206. width: 585px;
  207. height: 370px;
  208. margin-right: 30px;
  209. cursor: pointer;
  210. img {
  211. width: 585px;
  212. height: 370px;
  213. }
  214. div {
  215. position: absolute;
  216. bottom: 0;
  217. left: 0;
  218. width: 585px;
  219. height: 60px;
  220. line-height: 60px;
  221. color: #fff;
  222. font-size: 18px;
  223. font-weight: bold;
  224. padding-left: 20px;
  225. }
  226. }
  227. .tabsNewsContentRight {
  228. width: 585px;
  229. height: 370px;
  230. padding-top: 5px;
  231. div {
  232. width: 580px;
  233. color: #333333;
  234. font-size: 18px;
  235. margin-bottom: 22px;
  236. padding-left: 16px;
  237. cursor: pointer;
  238. overflow: hidden;
  239. text-overflow: ellipsis;
  240. white-space: nowrap;
  241. background: url("https://img.bjzxtw.org.cn/pre/image/jpeg/20251104/1762226432153586.jpg") no-repeat left center;
  242. &:nth-child(1),
  243. &:nth-child(4),
  244. &:nth-child(7) {
  245. font-weight: bold;
  246. }
  247. &:last-child {
  248. margin-bottom: 0;
  249. }
  250. }
  251. }
  252. }
  253. .style2 {
  254. .tabsNewsContentLeft {
  255. margin-right: 0;
  256. }
  257. .tabsNewsContentRight {
  258. margin-right: 30px;
  259. }
  260. }
  261. .style3 {
  262. .tabsNewsContentRight {
  263. div {
  264. padding-left: 16px;
  265. background: url("https://img.bjzxtw.org.cn/pre/image/png/20251104/1762226842166040.png") no-repeat left center;
  266. }
  267. }
  268. }
  269. .style4 {
  270. .tabsNewsContentLeft {
  271. margin-right: 0;
  272. }
  273. .tabsNewsContentRight {
  274. margin-right: 30px;
  275. div {
  276. padding-left: 16px;
  277. background: url("https://img.bjzxtw.org.cn/pre/image/png/20251104/1762226842166040.png") no-repeat left center;
  278. }
  279. }
  280. }
  281. .style6 {
  282. .tabsNewsContentLeft {
  283. margin-right: 0;
  284. }
  285. .tabsNewsContentRight {
  286. margin-right: 30px;
  287. }
  288. }
  289. .style7 {
  290. .tabsNewsContentRight {
  291. div {
  292. padding-left: 16px;
  293. background: url("https://img.bjzxtw.org.cn/pre/image/png/20251104/1762226842166040.png") no-repeat left center;
  294. }
  295. }
  296. }
  297. .style8 {
  298. .tabsNewsContentLeft {
  299. margin-right: 0;
  300. }
  301. .tabsNewsContentRight {
  302. margin-right: 30px;
  303. div {
  304. padding-left: 16px;
  305. background: url("https://img.bjzxtw.org.cn/pre/image/png/20251104/1762226842166040.png") no-repeat left center;
  306. }
  307. }
  308. }
  309. .dashed {
  310. border-bottom: dashed 1px #999999;
  311. }
  312. }
  313. .tabsNewsBox {
  314. display: none;
  315. }
  316. .ul_box_1 {
  317. width: 100%;
  318. .ul_head {
  319. height: 47px;
  320. border-bottom: solid 1px #93969A;
  321. border-top: solid 1px #DCDDDF;
  322. margin: 0px;
  323. box-sizing: border-box;
  324. }
  325. .ul_head * {
  326. float: left;
  327. height: 100%;
  328. line-height: 47px;
  329. box-sizing: border-box;
  330. font-weight: bold;
  331. color: #A72213;
  332. font-size: 20px;
  333. border-bottom: solid 2px #A72213;
  334. }
  335. .img_ul {
  336. margin-top: 20px;
  337. }
  338. .img_ul_li {
  339. margin-bottom: 23px;
  340. display: flex;
  341. overflow: hidden;
  342. width: 100%;
  343. a {
  344. display: flex;
  345. }
  346. }
  347. .img_ul_li_img {
  348. width: 185px;
  349. height: 130px;
  350. margin-right: 20px;
  351. }
  352. .img_ul_li_dot4 {
  353. height: 96px;
  354. line-height: 24px;
  355. color: #333;
  356. font-size: 18px;
  357. flex: 1;
  358. margin-top: 17px;
  359. overflow: hidden;
  360. display: -webkit-box !important;
  361. -webkit-box-orient: vertical;
  362. -webkit-line-clamp: 4;
  363. }
  364. .ul_box {
  365. margin-top: 23px;
  366. overflow: hidden;
  367. width: 100%;
  368. .ul_li {
  369. line-height: 24px;
  370. height: 24px;
  371. position: relative;
  372. color: #333;
  373. font-size: 18px;
  374. text-indent: 16px;
  375. margin-bottom: 24px;
  376. word-break: keep-all;
  377. white-space: nowrap;
  378. overflow: hidden;
  379. text-overflow: ellipsis;
  380. a {
  381. color: #333;
  382. }
  383. }
  384. .ul_li:nth-last-of-type(1) {
  385. margin-bottom: 0px;
  386. }
  387. .ul_li::before {
  388. content: '';
  389. position: absolute;
  390. left: 0px;
  391. top: 10px;
  392. width: 6px;
  393. height: 6px;
  394. background: #F2F2F2;
  395. }
  396. }
  397. }
  398. .ul_box_2 {
  399. width: 100%;
  400. .ul_head {
  401. height: 47px;
  402. border-bottom: solid 1px #93969A;
  403. border-top: solid 1px #DCDDDF;
  404. margin: 0px;
  405. box-sizing: border-box;
  406. }
  407. .ul_head * {
  408. float: left;
  409. height: 100%;
  410. line-height: 47px;
  411. box-sizing: border-box;
  412. font-weight: bold;
  413. color: #A72213;
  414. font-size: 20px;
  415. border-bottom: solid 2px #A72213;
  416. }
  417. .img_ul {
  418. margin-top: 20px;
  419. }
  420. .img_ul_li {
  421. margin-bottom: 23px;
  422. display: flex;
  423. overflow: hidden;
  424. width: 100%;
  425. a {
  426. display: flex;
  427. }
  428. }
  429. .img_ul_li_img {
  430. width: 185px;
  431. height: 130px;
  432. margin-right: 20px;
  433. }
  434. .img_ul_li_dot4 {
  435. height: 96px;
  436. line-height: 24px;
  437. color: #333;
  438. font-size: 18px;
  439. margin-top: 17px;
  440. flex: 1;
  441. overflow: hidden;
  442. display: -webkit-box !important;
  443. -webkit-box-orient: vertical;
  444. -webkit-line-clamp: 4;
  445. }
  446. .ul_box {
  447. margin-top: 23px;
  448. overflow: hidden;
  449. width: 100%;
  450. .ul_li {
  451. line-height: 24px;
  452. height: 24px;
  453. position: relative;
  454. color: #333;
  455. font-size: 18px;
  456. text-indent: 16px;
  457. margin-bottom: 24px;
  458. word-break: keep-all;
  459. white-space: nowrap;
  460. overflow: hidden;
  461. text-overflow: ellipsis;
  462. a {
  463. color: #333;
  464. }
  465. }
  466. .ul_li:nth-last-of-type(1) {
  467. margin-bottom: 0px;
  468. }
  469. .ul_li::before {
  470. content: '';
  471. position: absolute;
  472. left: 0px;
  473. top: 10px;
  474. width: 6px;
  475. height: 6px;
  476. background: #F2F2F2;
  477. }
  478. }
  479. }
  480. .ul_box_3 {
  481. width: 100%;
  482. .ul_head {
  483. height: 47px;
  484. border-bottom: solid 1px #93969A;
  485. border-top: solid 1px #DCDDDF;
  486. margin: 0px;
  487. box-sizing: border-box;
  488. }
  489. .ul_head * {
  490. float: left;
  491. height: 100%;
  492. line-height: 47px;
  493. box-sizing: border-box;
  494. font-weight: bold;
  495. color: #A72213;
  496. font-size: 20px;
  497. border-bottom: solid 2px #A72213;
  498. }
  499. .img_ul {
  500. margin-top: 20px;
  501. }
  502. .img_ul_li {
  503. margin-bottom: 23px;
  504. display: flex;
  505. overflow: hidden;
  506. width: 100%;
  507. a {
  508. display: flex;
  509. }
  510. }
  511. .img_ul_li_img {
  512. width: 185px;
  513. height: 130px;
  514. margin-right: 20px;
  515. }
  516. .img_ul_li_dot4 {
  517. height: 96px;
  518. line-height: 24px;
  519. color: #333;
  520. font-size: 18px;
  521. margin-top: 17px;
  522. flex: 1;
  523. overflow: hidden;
  524. display: -webkit-box !important;
  525. -webkit-box-orient: vertical;
  526. -webkit-line-clamp: 4;
  527. }
  528. .ul_box {
  529. margin-top: 23px;
  530. overflow: hidden;
  531. width: 100%;
  532. .ul_li {
  533. line-height: 24px;
  534. height: 24px;
  535. position: relative;
  536. color: #333;
  537. font-size: 18px;
  538. text-indent: 16px;
  539. margin-bottom: 24px;
  540. word-break: keep-all;
  541. white-space: nowrap;
  542. overflow: hidden;
  543. text-overflow: ellipsis;
  544. a {
  545. color: #333;
  546. }
  547. }
  548. .ul_li:nth-of-type(1) {
  549. font-weight: bold;
  550. }
  551. .ul_li:nth-last-of-type(1) {
  552. margin-bottom: 0px;
  553. }
  554. .ul_li::before {
  555. content: '';
  556. position: absolute;
  557. left: 0px;
  558. top: 10px;
  559. width: 6px;
  560. height: 6px;
  561. background: #F2F2F2;
  562. }
  563. }
  564. }
  565. .ul_box_4 {
  566. width: 100%;
  567. .ul_head {
  568. height: 47px;
  569. border-bottom: solid 1px #93969A;
  570. border-top: solid 1px #DCDDDF;
  571. margin: 0px;
  572. box-sizing: border-box;
  573. }
  574. .ul_head * {
  575. float: left;
  576. height: 100%;
  577. line-height: 47px;
  578. box-sizing: border-box;
  579. font-weight: bold;
  580. color: #A72213;
  581. font-size: 20px;
  582. border-bottom: solid 2px #A72213;
  583. }
  584. .img_ul {
  585. margin-top: 20px;
  586. }
  587. .img_ul_li {
  588. margin-bottom: 23px;
  589. display: flex;
  590. overflow: hidden;
  591. width: 100%;
  592. a {
  593. display: flex;
  594. }
  595. }
  596. .img_ul_li_img {
  597. width: 185px;
  598. height: 130px;
  599. margin-right: 20px;
  600. }
  601. .img_ul_li_dot4 {
  602. height: 96px;
  603. line-height: 24px;
  604. color: #333;
  605. font-size: 18px;
  606. margin-top: 17px;
  607. flex: 1;
  608. overflow: hidden;
  609. display: -webkit-box !important;
  610. -webkit-box-orient: vertical;
  611. -webkit-line-clamp: 4;
  612. }
  613. .ul_box {
  614. margin-top: 23px;
  615. overflow: hidden;
  616. width: 100%;
  617. .ul_li {
  618. line-height: 24px;
  619. height: 24px;
  620. position: relative;
  621. color: #333;
  622. font-size: 18px;
  623. text-indent: 16px;
  624. margin-bottom: 24px;
  625. word-break: keep-all;
  626. white-space: nowrap;
  627. overflow: hidden;
  628. text-overflow: ellipsis;
  629. a {
  630. color: #333;
  631. }
  632. }
  633. .ul_li:nth-last-of-type(1) {
  634. margin-bottom: 0px;
  635. }
  636. .ul_li:nth-of-type(4n-3) {
  637. font-weight: bold;
  638. }
  639. .ul_li::before {
  640. content: '';
  641. position: absolute;
  642. left: 0px;
  643. top: 10px;
  644. width: 6px;
  645. height: 6px;
  646. background: #F2F2F2;
  647. }
  648. }
  649. }
  650. </style>