123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>特色服务</title>
- <!-- 引入 Vue -->
- <script src="https://unpkg.com/vue@2.6.14/dist/vue.min.js"></script>
- <!-- 引入样式 -->
- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
- <!-- 引入组件库 -->
- <script src="https://unpkg.com/element-ui/lib/index.js"></script>
- <!-- jquery-->
- <script src="js/jquery-3.5.1.min.js"></script>
- <style>
- * {
- padding: 0;
- margin: 0;
- }
- html,
- body {
- margin: 0;
- padding: 0;
- font-family: Microsoft YaHei;
- height: 100%;
- background: #EDF5FF;
- }
- @font-face {
- font-family: 'DOUYU';
- src: url('../fonts/DOUYUFONT-2.OTF');
- font-weight: normal;
- font-style: normal;
- }
- .tsfw>.top {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid #B7C7DC;
- background: #FFFFFF;
- }
- .toplogo {
- display: flex;
- align-items: center;
- font-family: DOUYU;
- font-weight: normal;
- font-size: 30px;
- color: #186FF0;
- height: 66px;
- cursor: pointer;
- }
- .toplogo img {
- margin: 0 20px;
- margin-bottom: 17px;
- }
- .backbutton {
- width: 117px;
- height: 42px;
- background: #DEEDFF;
- border-radius: 10px;
- font-family: Microsoft YaHei;
- font-weight: 400;
- font-size: 16px;
- color: #2474F1;
- display: flex;
- align-items: center;
- justify-content: center;
- margin-right: 10px;
- cursor: pointer;
- }
- .backbutton img {
- margin-right: 10px;
- }
- .tsfw>.container {
- display: flex;
- padding: 10px;
- }
- .tsfw>.container .left {
- width: 74.5%;
- margin-right: 10px;
- }
- .tsfw>.container .right {
- width: 25%;
- background-image: url(images/bg-tsfwr.png);
- background-size: 100% 100%;
- margin-top: 10px;
- padding: 0 20px;
- box-sizing: border-box;
- display: flex;
- flex-direction: column;
- justify-content: center;
- min-width: 380px;
- }
- .tsfw .left .list {
- display: flex;
- margin-top: 10px;
- min-width: 820px;
- }
- .tsfw .left .title {
- position: relative;
- width: 30%;
- }
- .tsfw .left .content {
- width: 69.5%;
- background: #DEEDFF;
- border: 1px solid #4B98F6;
- font-size: 20px;
- color: #4B98F6;
- line-height: 36px;
- padding: 20px 30px;
- box-sizing: border-box;
- margin-left: 5px;
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- .tsfw .left .title p {
- white-space: nowrap;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- font-family: Microsoft YaHei;
- font-weight: bold;
- font-size: 40px;
- color: #FFFFFF;
- background: linear-gradient(0deg, rgba(172, 204, 243, 0.98) 0%, rgba(255, 255, 255, 0.98) 99.12109375%);
- -webkit-background-clip: text;
- -webkit-text-fill-color: transparent;
- }
- .tsfw .rlist {
- display: flex;
- flex-direction: column;
- font-size: 26px;
- color: #FFFFFF;
- margin-bottom: 50px;
- }
- .tsfw .rlist p:first-child {
- margin-bottom: 10px;
- }
- </style>
- </head>
- <body>
- <div class="tsfw" id="tsfw">
- <div class="top">
- <div class="toplogo">
- <img src="images/gyylogo.png" alt="">
- <span>茶园工业园区特色服务</span>
- </div>
- <div class="backbutton" @click="window.history.go(-1)">
- <img src="images/back1.png" alt="">
- <span>返回</span>
- </div>
- </div>
- <div class="container">
- <div class="left">
- <div class="list" v-for="(item, index) in leftList" :key="index">
- <div class="title">
- <img :src="'images/bg-tsfw'+(index+1)+'.png'" alt="" style="width: 100%;height: 100%;"
- v-if="index<6">
- <img src="images/bg-tsfw6.png" alt="" style="width: 100%;height: 100%;" v-else>
- <p>{{item.parkForm}}</p>
- </div>
- <div class="content">
- <div v-for="(tabl, indexl) in item.children" :key="indexl">
- {{indexl+1}}.{{tabl.information}}
- </div>
- </div>
- </div>
- <div class="list" v-if="!leftList.length">
- <div class="title">
- <img :src="'images/bg-tsfw1.png'" alt="" style="width: 100%;height: 100%;">
- <p>- </p>
- </div>
- <div class="content">
- </div>
- </div>
- </div>
- <div class="right">
- <div class="rlist">
- <p>联系人:</p>
- <p>{{person?person:'-'}}</p>
- </div>
- <div class="rlist">
- <p>电话:</p>
- <p>{{telphone?telphone:'-'}}</p>
- </div>
- <div class="rlist">
- <p>地址:</p>
- <p>{{address?address:'-'}}</p>
- </div>
- </div>
- </div>
- </div>
- </body>
- <script>
- // 初始化Vue实例
- new Vue({
- el: '#tsfw',
- data: function () {
- return {
- reqPtah: 'http://8.137.113.116:8082',
- // reqPtah: 'http://172.16.99.105:8082',
- leftList: [],
- person: '',
- telphone: '',
- address: ''
- };
- },
- methods: {
- getParkData(id) {
- let that = this;
- $.ajax({
- url: "specialService/list/" + id,
- type: "get",
- dataType: "json",
- success: function (data) {
- var parkData = data.data[0];
- that.person = parkData.contacts;
- that.telphone = parkData.contactsPhone;
- that.address = parkData.contactsAddr;
- let value = data.data;
- let newList = []
- value.forEach(item => {
- let status = newList.find(el => el.parkForm === item.parkForm) // 判断第一层级,用name属性来判断
- if (status) {
- status.children.push({ ...item }) // 将数据插入到第二层级中
- } else {
- let obj = { ...item, children: [{ ...item }] }
- newList.push(obj)
- }
- })
- that.leftList = newList;
- }
- })
- }
- },
- mounted() {
- const url = new URL(window.location.href);
- const id = url.searchParams.get('id');
- this.getParkData(id);
- }
- });
- </script>
- </html>
|