tsfw.html 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>特色服务</title>
  7. <!-- 引入 Vue -->
  8. <script src="https://unpkg.com/vue@2.6.14/dist/vue.min.js"></script>
  9. <!-- 引入样式 -->
  10. <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  11. <!-- 引入组件库 -->
  12. <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  13. <!-- jquery-->
  14. <script src="js/jquery-3.5.1.min.js"></script>
  15. <style>
  16. * {
  17. padding: 0;
  18. margin: 0;
  19. }
  20. html,
  21. body {
  22. margin: 0;
  23. padding: 0;
  24. font-family: Microsoft YaHei;
  25. height: 100%;
  26. background: #EDF5FF;
  27. }
  28. @font-face {
  29. font-family: 'DOUYU';
  30. src: url('../fonts/DOUYUFONT-2.OTF');
  31. font-weight: normal;
  32. font-style: normal;
  33. }
  34. .tsfw>.top {
  35. display: flex;
  36. justify-content: space-between;
  37. align-items: center;
  38. border-bottom: 1px solid #B7C7DC;
  39. background: #FFFFFF;
  40. }
  41. .toplogo {
  42. display: flex;
  43. align-items: center;
  44. font-family: DOUYU;
  45. font-weight: normal;
  46. font-size: 30px;
  47. color: #186FF0;
  48. height: 66px;
  49. cursor: pointer;
  50. }
  51. .toplogo img {
  52. margin: 0 20px;
  53. margin-bottom: 17px;
  54. }
  55. .backbutton {
  56. width: 117px;
  57. height: 42px;
  58. background: #DEEDFF;
  59. border-radius: 10px;
  60. font-family: Microsoft YaHei;
  61. font-weight: 400;
  62. font-size: 16px;
  63. color: #2474F1;
  64. display: flex;
  65. align-items: center;
  66. justify-content: center;
  67. margin-right: 10px;
  68. cursor: pointer;
  69. }
  70. .backbutton img {
  71. margin-right: 10px;
  72. }
  73. .tsfw>.container {
  74. display: flex;
  75. padding: 10px;
  76. }
  77. .tsfw>.container .left {
  78. width: 74.5%;
  79. margin-right: 10px;
  80. }
  81. .tsfw>.container .right {
  82. width: 25%;
  83. background-image: url(images/bg-tsfwr.png);
  84. background-size: 100% 100%;
  85. margin-top: 10px;
  86. padding: 0 20px;
  87. box-sizing: border-box;
  88. display: flex;
  89. flex-direction: column;
  90. justify-content: center;
  91. min-width: 380px;
  92. }
  93. .tsfw .left .list {
  94. display: flex;
  95. margin-top: 10px;
  96. min-width: 820px;
  97. }
  98. .tsfw .left .title {
  99. position: relative;
  100. width: 30%;
  101. }
  102. .tsfw .left .content {
  103. width: 69.5%;
  104. background: #DEEDFF;
  105. border: 1px solid #4B98F6;
  106. font-size: 20px;
  107. color: #4B98F6;
  108. line-height: 36px;
  109. padding: 20px 30px;
  110. box-sizing: border-box;
  111. margin-left: 5px;
  112. display: flex;
  113. flex-direction: column;
  114. justify-content: center;
  115. }
  116. .tsfw .left .title p {
  117. white-space: nowrap;
  118. position: absolute;
  119. top: 50%;
  120. left: 50%;
  121. transform: translate(-50%, -50%);
  122. font-family: Microsoft YaHei;
  123. font-weight: bold;
  124. font-size: 40px;
  125. color: #FFFFFF;
  126. background: linear-gradient(0deg, rgba(172, 204, 243, 0.98) 0%, rgba(255, 255, 255, 0.98) 99.12109375%);
  127. -webkit-background-clip: text;
  128. -webkit-text-fill-color: transparent;
  129. }
  130. .tsfw .rlist {
  131. display: flex;
  132. flex-direction: column;
  133. font-size: 26px;
  134. color: #FFFFFF;
  135. margin-bottom: 50px;
  136. }
  137. .tsfw .rlist p:first-child {
  138. margin-bottom: 10px;
  139. }
  140. </style>
  141. </head>
  142. <body>
  143. <div class="tsfw" id="tsfw">
  144. <div class="top">
  145. <div class="toplogo">
  146. <img src="images/gyylogo.png" alt="">
  147. <span>茶园工业园区特色服务</span>
  148. </div>
  149. <div class="backbutton" @click="window.history.go(-1)">
  150. <img src="images/back1.png" alt="">
  151. <span>返回</span>
  152. </div>
  153. </div>
  154. <div class="container">
  155. <div class="left">
  156. <div class="list" v-for="(item, index) in leftList" :key="index">
  157. <div class="title">
  158. <img :src="'images/bg-tsfw'+(index+1)+'.png'" alt="" style="width: 100%;height: 100%;"
  159. v-if="index<6">
  160. <img src="images/bg-tsfw6.png" alt="" style="width: 100%;height: 100%;" v-else>
  161. <p>{{item.parkForm}}</p>
  162. </div>
  163. <div class="content">
  164. <div v-for="(tabl, indexl) in item.children" :key="indexl">
  165. {{indexl+1}}.{{tabl.information}}
  166. </div>
  167. </div>
  168. </div>
  169. <div class="list" v-if="!leftList.length">
  170. <div class="title">
  171. <img :src="'images/bg-tsfw1.png'" alt="" style="width: 100%;height: 100%;">
  172. <p>- </p>
  173. </div>
  174. <div class="content">
  175. </div>
  176. </div>
  177. </div>
  178. <div class="right">
  179. <div class="rlist">
  180. <p>联系人:</p>
  181. <p>{{person?person:'-'}}</p>
  182. </div>
  183. <div class="rlist">
  184. <p>电话:</p>
  185. <p>{{telphone?telphone:'-'}}</p>
  186. </div>
  187. <div class="rlist">
  188. <p>地址:</p>
  189. <p>{{address?address:'-'}}</p>
  190. </div>
  191. </div>
  192. </div>
  193. </div>
  194. </body>
  195. <script>
  196. // 初始化Vue实例
  197. new Vue({
  198. el: '#tsfw',
  199. data: function () {
  200. return {
  201. reqPtah: 'http://8.137.113.116:8082',
  202. // reqPtah: 'http://172.16.99.105:8082',
  203. leftList: [],
  204. person: '',
  205. telphone: '',
  206. address: ''
  207. };
  208. },
  209. methods: {
  210. getParkData(id) {
  211. let that = this;
  212. $.ajax({
  213. url: "specialService/list/" + id,
  214. type: "get",
  215. dataType: "json",
  216. success: function (data) {
  217. var parkData = data.data[0];
  218. that.person = parkData.contacts;
  219. that.telphone = parkData.contactsPhone;
  220. that.address = parkData.contactsAddr;
  221. let value = data.data;
  222. let newList = []
  223. value.forEach(item => {
  224. let status = newList.find(el => el.parkForm === item.parkForm) // 判断第一层级,用name属性来判断
  225. if (status) {
  226. status.children.push({ ...item }) // 将数据插入到第二层级中
  227. } else {
  228. let obj = { ...item, children: [{ ...item }] }
  229. newList.push(obj)
  230. }
  231. })
  232. that.leftList = newList;
  233. }
  234. })
  235. }
  236. },
  237. mounted() {
  238. const url = new URL(window.location.href);
  239. const id = url.searchParams.get('id');
  240. this.getParkData(id);
  241. }
  242. });
  243. </script>
  244. </html>