1_2.vue 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  1. <template>
  2. <div class="listNewsBox">
  3. <div class="right_in_1" v-if="componentStyle == 1">
  4. <h4 class="ul_head">
  5. <span>服务单位</span>
  6. </h4>
  7. <div class="ul_box">
  8. <div class="ul_li" v-for="(item,index) in component_style1_News1Array">
  9. <NuxtLink
  10. :href="getLinkPathDetail(item)"
  11. :title="item.title"
  12. :target="item.islink == 1 ? '_blank' : '_self'"
  13. >
  14. <span class="ul_li_num">{{ index + 1 }}</span>
  15. <span class="ul_li_dot1">{{ item.title }}</span>
  16. </NuxtLink>
  17. </div>
  18. </div>
  19. </div>
  20. <div class="right_in_2" v-if="componentStyle == 2">
  21. <h4 class="ul_head">
  22. <span>服务单位</span>
  23. </h4>
  24. <div class="ul_box">
  25. <div class="ul_li" v-for="(item,index) in component_style1_News1Array">
  26. <NuxtLink
  27. :href="getLinkPathDetail(item)"
  28. :title="item.title"
  29. :target="item.islink == 1 ? '_blank' : '_self'"
  30. >
  31. <span class="ul_li_num">{{ index + 1 }}</span>
  32. <span class="ul_li_dot1">{{ item.title }}</span>
  33. </NuxtLink>
  34. </div>
  35. </div>
  36. </div>
  37. <div class="right_in_3" v-if="componentStyle == 3">
  38. <h4 class="ul_head">
  39. <span>服务单位</span>
  40. </h4>
  41. <div class="ul_box">
  42. <div class="ul_li" v-for="(item,index) in component_style1_News1Array">
  43. <NuxtLink
  44. :href="getLinkPathDetail(item)"
  45. :title="item.title"
  46. :target="item.islink == 1 ? '_blank' : '_self'"
  47. >
  48. <span class="ul_li_num">{{ index + 1 }}</span>
  49. <span class="ul_li_dot1">{{ item.title }}</span>
  50. </NuxtLink>
  51. </div>
  52. </div>
  53. </div>
  54. <div class="right_in_4" v-if="componentStyle == 4">
  55. <h4 class="ul_head">
  56. <span>服务单位</span>
  57. </h4>
  58. <div class="ul_box">
  59. <div class="ul_li" v-for="(item,index) in component_style1_News1Array">
  60. <NuxtLink
  61. :href="getLinkPathDetail(item)"
  62. :title="item.title"
  63. :target="item.islink == 1 ? '_blank' : '_self'"
  64. >
  65. <span class="ul_li_num">{{ index + 1 }}</span>
  66. <span class="ul_li_dot1">{{ item.title }}</span>
  67. </NuxtLink>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. </template>
  73. <script setup>
  74. //引入vue
  75. import { ref } from 'vue';
  76. //获得新闻数据
  77. const props = defineProps({
  78. componentStyle: Number,//样式编号
  79. });
  80. const component_style1_News1Array = ref([]);
  81. const component_style1_News1Array_1 = ref([]);
  82. const component_style1_News1Array_2 = ref([]);
  83. const component_style1_News2Array = ref([]);
  84. const component_style1_News2Array_1 = ref([]);
  85. const component_style1_News2Array_2 = ref([]);
  86. //最新资讯数据 start ---------------------------------------->
  87. async function getPageData() {
  88. const mkdata = await requestDataPromise('/web/getWebsiteArticlett', {
  89. method: 'GET',
  90. query: {
  91. 'imgnum': 4,
  92. 'textnum': 4,
  93. 'level': 4,
  94. 'id': 0,
  95. 'placeid': 0,
  96. },
  97. });
  98. if (mkdata.code == 200) {
  99. component_style1_News1Array.value = mkdata.data.img.slice(0, 2);
  100. component_style1_News1Array_1.value = mkdata.data.img.slice(0, 1);
  101. component_style1_News1Array_2.value = mkdata.data.img.slice(1, 2);
  102. component_style1_News2Array.value = mkdata.data.text.slice(0, 4);
  103. component_style1_News2Array_1.value = mkdata.data.text.slice(0, 2);
  104. component_style1_News2Array_2.value = mkdata.data.text.slice(2, 4);
  105. }
  106. }
  107. getPageData();
  108. //最新资讯数据 end ---------------------------------------->
  109. </script>
  110. <style lang="less" scoped>
  111. //基本样式
  112. .listNewsBox {
  113. position: relative;
  114. .listNewsTitle_skin2 {
  115. font-size: 22px;
  116. font-weight: bold;
  117. height: 40px;
  118. line-height: 40px;
  119. border-bottom: 2px solid #A91B33;
  120. color: #A91B33;
  121. margin-bottom: 20px;
  122. box-sizing: border-box;
  123. span {
  124. color: #A91B33;
  125. height: 30px;
  126. line-height: 30px;
  127. border-left: 3px solid #A91B33;
  128. padding-left: 12px;
  129. }
  130. }
  131. .listNewsContent {
  132. .listNewsContentItem {
  133. display: flex;
  134. background: #F9FAFB;
  135. align-items: flex-start;
  136. margin-bottom: 20px;
  137. &:last-child {
  138. margin-bottom: 0;
  139. }
  140. .listNewsContentItemLeft {
  141. width: 170px;
  142. height: 110px;
  143. position: relative;
  144. img {
  145. display: block;
  146. width: 170px;
  147. height: 110px;
  148. }
  149. .listNewsContentItemLeftTitle {
  150. position: absolute;
  151. bottom: 0;
  152. z-index: 1;
  153. width: 100%;
  154. color: #fff;
  155. height: 28px;
  156. background: linear-gradient(0deg, rgba(0, 0, 0, 0.5) 33%, rgba(0, 0, 0, 0) 100%);
  157. box-sizing: border-box;
  158. padding: 0 5px;
  159. overflow: hidden;
  160. text-overflow: ellipsis;
  161. white-space: nowrap;
  162. line-height: 28px;
  163. font-size: 14px;
  164. }
  165. }
  166. .listNewsContentItemRight {
  167. padding: 10px;
  168. box-sizing: border-box;
  169. flex: 1;
  170. height: 110px;
  171. overflow: hidden;
  172. div {
  173. box-sizing: border-box;
  174. height: 24px;
  175. line-height: 24px;
  176. padding-left: 16px;
  177. font-size: 18px;
  178. color: #333333;
  179. margin-bottom: 10px;
  180. background: url(http://img.bjzxtw.org.cn/pre/image/png/20250605/1749100871349444.png) no-repeat left center;
  181. &:last-child {
  182. margin-bottom: 0;
  183. }
  184. }
  185. }
  186. }
  187. }
  188. }
  189. //样式4
  190. .listNewsBox {
  191. .listNewsStyle4 {
  192. .listNewsContentItem {
  193. .listNewsContentItemRight {
  194. div {
  195. background: url(https://img.bjzxtw.org.cn/pre/image/png/20250909/1757379542529609.png) no-repeat left center;
  196. }
  197. }
  198. }
  199. }
  200. }
  201. //样式5
  202. .listNewsBox {
  203. .listNewsStyle5 {
  204. .listNewsContentItem {
  205. .listNewsContentItemRight {
  206. div {
  207. background: url(https://img.bjzxtw.org.cn/pre/image/png/20250909/1757386056889702.png) no-repeat left center;
  208. }
  209. }
  210. }
  211. }
  212. }
  213. //样式6
  214. .listNewsBox {
  215. .listNewsStyle6 {
  216. .listNewsContentItem {
  217. .listNewsContentItemRight {
  218. div {
  219. padding-left: 0px;
  220. background: none;
  221. }
  222. }
  223. }
  224. }
  225. }
  226. //样式9
  227. .listNewsBox {
  228. .listNewsStyle9 {
  229. .listNewsContentItem {
  230. .listNewsContentItemRight {
  231. div {
  232. &:first-child {
  233. font-weight: 400;
  234. }
  235. }
  236. }
  237. }
  238. }
  239. }
  240. .listNewsContent {
  241. display: none;
  242. }
  243. .right_in_1 {
  244. width: 100%;
  245. .ul_head {
  246. height: 47px;
  247. border-bottom: solid 1px #DCDDDF;
  248. border-top: solid 2px #A72213;
  249. margin: 0px;
  250. box-sizing: border-box;
  251. }
  252. .ul_head * {
  253. float: left;
  254. height: 100%;
  255. line-height: 47px;
  256. box-sizing: border-box;
  257. font-weight: bold;
  258. color: #A72213;
  259. font-size: 20px;
  260. }
  261. .ul_box {
  262. margin-top: 20px;
  263. }
  264. .ul_li {
  265. height: 40px;
  266. line-height: 40px;
  267. color: #333;
  268. font-size: 18px;
  269. margin-bottom: 16px;
  270. text-indent: 47px;
  271. position: relative;
  272. box-sizing: border-box;
  273. padding-right: 8px;
  274. background: linear-gradient(90deg, #F3F3F3 0%, rgba(243, 243, 243, 0) 100%);
  275. border-radius: 4px;
  276. width: 100%;
  277. word-break: keep-all;
  278. white-space: nowrap;
  279. overflow: hidden;
  280. text-overflow: ellipsis;
  281. a {
  282. color: #333;
  283. }
  284. }
  285. .ul_li_num {
  286. position: absolute;
  287. left: 15px;
  288. text-align: center;
  289. font-size: 12px;
  290. color: #fff;
  291. top: 9px;
  292. font-style: italic;
  293. text-indent: 0px;
  294. width: 22px;
  295. height: 22px;
  296. line-height: 22px;
  297. background: url(http://192.168.1.234:19000/pre/image/png/20251215/1765758182984957.png) no-repeat left 0px;
  298. background-size: 100% 100%;
  299. }
  300. .ul_li:nth-of-type(1) .ul_li_num {
  301. background-image: url(http://192.168.1.234:19000/pre/image/png/20251215/1765758074161458.png);
  302. }
  303. .ul_li:nth-of-type(2) .ul_li_num {
  304. background-image: url(http://192.168.1.234:19000/pre/image/png/20251215/1765758137778437.png);
  305. }
  306. .ul_li:nth-of-type(3) .ul_li_num {
  307. background-image: url(http://192.168.1.234:19000/pre/image/png/20251215/1765758159548506.png);
  308. }
  309. .ul_li:nth-last-of-type(1) {
  310. margin-bottom: 0px;
  311. }
  312. }
  313. .right_in_2 {
  314. width: 100%;
  315. .ul_head {
  316. height: 47px;
  317. border-bottom: solid 1px #DCDDDF;
  318. border-top: solid 2px #A72213;
  319. margin: 0px;
  320. box-sizing: border-box;
  321. }
  322. .ul_head * {
  323. float: left;
  324. height: 100%;
  325. line-height: 47px;
  326. box-sizing: border-box;
  327. font-weight: bold;
  328. color: #A72213;
  329. font-size: 20px;
  330. }
  331. .ul_box {
  332. margin-top: 20px;
  333. }
  334. .ul_li {
  335. height: 40px;
  336. line-height: 40px;
  337. color: #333;
  338. font-size: 18px;
  339. margin-bottom: 16px;
  340. text-indent: 47px;
  341. position: relative;
  342. box-sizing: border-box;
  343. padding-right: 8px;
  344. border-radius: 4px;
  345. width: 100%;
  346. word-break: keep-all;
  347. white-space: nowrap;
  348. overflow: hidden;
  349. text-overflow: ellipsis;
  350. a {
  351. color: #333;
  352. }
  353. }
  354. .ul_li_num {
  355. position: absolute;
  356. left: 15px;
  357. text-align: center;
  358. font-size: 12px;
  359. color: #fff;
  360. top: 9px;
  361. font-style: italic;
  362. text-indent: 0px;
  363. width: 22px;
  364. height: 22px;
  365. line-height: 22px;
  366. background: url(http://192.168.1.234:19000/pre/image/png/20251215/1765758182984957.png) no-repeat left 0px;
  367. background-size: 100% 100%;
  368. }
  369. .ul_li:nth-of-type(1) .ul_li_num {
  370. background-image: url(http://192.168.1.234:19000/pre/image/png/20251215/1765758074161458.png);
  371. }
  372. .ul_li:nth-of-type(2) .ul_li_num {
  373. background-image: url(http://192.168.1.234:19000/pre/image/png/20251215/1765758137778437.png);
  374. }
  375. .ul_li:nth-of-type(3) .ul_li_num {
  376. background-image: url(http://192.168.1.234:19000/pre/image/png/20251215/1765758159548506.png);
  377. }
  378. .ul_li:nth-last-of-type(1) {
  379. margin-bottom: 0px;
  380. }
  381. }
  382. .right_in_3 {
  383. width: 100%;
  384. .ul_head {
  385. height: 47px;
  386. border-bottom: solid 1px #DCDDDF;
  387. border-top: solid 2px #A72213;
  388. margin: 0px;
  389. box-sizing: border-box;
  390. }
  391. .ul_head * {
  392. float: left;
  393. height: 100%;
  394. line-height: 47px;
  395. box-sizing: border-box;
  396. font-weight: bold;
  397. color: #A72213;
  398. font-size: 20px;
  399. }
  400. .ul_box {
  401. margin-top: 20px;
  402. }
  403. .ul_li {
  404. height: 40px;
  405. line-height: 40px;
  406. color: #333;
  407. font-size: 18px;
  408. margin-bottom: 16px;
  409. text-indent: 47px;
  410. position: relative;
  411. box-sizing: border-box;
  412. padding-right: 8px;
  413. background: linear-gradient(90deg, #F3F3F3 0%, rgba(243, 243, 243, 0) 100%);
  414. border-radius: 4px;
  415. width: 100%;
  416. word-break: keep-all;
  417. white-space: nowrap;
  418. overflow: hidden;
  419. text-overflow: ellipsis;
  420. a {
  421. color: #333;
  422. }
  423. }
  424. .ul_li_num {
  425. position: absolute;
  426. left: 15px;
  427. text-align: center;
  428. font-size: 12px;
  429. color: #fff;
  430. top: 9px;
  431. font-style: italic;
  432. text-indent: 0px;
  433. width: 22px;
  434. border-radius: 11px;
  435. height: 22px;
  436. line-height: 22px;
  437. background: #BCBCBC;
  438. }
  439. .ul_li:nth-of-type(1) .ul_li_num {
  440. background: #FF4725;
  441. }
  442. .ul_li:nth-of-type(2) .ul_li_num {
  443. background: #FF7125;
  444. }
  445. .ul_li:nth-of-type(3) .ul_li_num {
  446. background: #FFAE25;
  447. }
  448. .ul_li:nth-last-of-type(1) {
  449. margin-bottom: 0px;
  450. }
  451. }
  452. .right_in_4 {
  453. width: 100%;
  454. .ul_head {
  455. height: 47px;
  456. border-bottom: solid 1px #DCDDDF;
  457. border-top: solid 2px #A72213;
  458. margin: 0px;
  459. box-sizing: border-box;
  460. }
  461. .ul_head * {
  462. float: left;
  463. height: 100%;
  464. line-height: 47px;
  465. box-sizing: border-box;
  466. font-weight: bold;
  467. color: #A72213;
  468. font-size: 20px;
  469. }
  470. .ul_box {
  471. margin-top: 20px;
  472. }
  473. .ul_li {
  474. height: 40px;
  475. line-height: 40px;
  476. color: #333;
  477. font-size: 18px;
  478. margin-bottom: 16px;
  479. text-indent: 47px;
  480. position: relative;
  481. box-sizing: border-box;
  482. padding-right: 8px;
  483. border-radius: 4px;
  484. width: 100%;
  485. word-break: keep-all;
  486. white-space: nowrap;
  487. overflow: hidden;
  488. text-overflow: ellipsis;
  489. a {
  490. color: #333;
  491. }
  492. }
  493. .ul_li_num {
  494. position: absolute;
  495. left: 15px;
  496. text-align: center;
  497. font-size: 12px;
  498. color: #fff;
  499. top: 9px;
  500. font-style: italic;
  501. text-indent: 0px;
  502. width: 22px;
  503. border-radius: 11px;
  504. height: 22px;
  505. line-height: 22px;
  506. background: #BCBCBC;
  507. }
  508. .ul_li:nth-of-type(1) .ul_li_num {
  509. background: #FF4725;
  510. }
  511. .ul_li:nth-of-type(2) .ul_li_num {
  512. background: #FF7125;
  513. }
  514. .ul_li:nth-of-type(3) .ul_li_num {
  515. background: #FFAE25;
  516. }
  517. .ul_li:nth-last-of-type(1) {
  518. margin-bottom: 0px;
  519. }
  520. }
  521. </style>