123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta name=”SiteName” content=”重庆市南岸区人民政府”>
- <meta name="SiteDomain" content="http://www.cqna.gov.cn" />
- <meta name="SiteIDCode" content="5001080014">
- <meta name="ColumnName" content="载体服务">
- <meta name="ColumnDescription" content="载体服务" />
- <meta name="ColumnKeywords" content="载体服务" />
- <meta name="ColumnType" content="载体服务" />
- <title>载体服务-重庆市南岸区人民政府网</title>
- <link rel="stylesheet" href="css/mapcon.css">
- <link rel="stylesheet" href="swiper/swiper-bundle.css">
- <!-- 引入 Vue -->
- <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/vue.min.js"></script>
- <!-- 引入样式 -->
- <link rel="stylesheet" href="https://www.cqna.gov.cn/syygapi/naxsb/css/index.css">
- <!-- 引入组件库 -->
- <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/index.js"></script>
- <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/jquery-3.5.1.min.js"></script>
- <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=7XivTux4H2e1ifKLjvEhxfuayDYxAluq">
- </script>
- <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/jquery-3.5.1.min.js"></script>
- <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/urljson.js"></script>
- <style>
- .contentleft {
- width: 50%;
- min-width: 841px;
- background-color: #EDF5FF;
- font-size: 20px;
- color: #333;
- padding: 15px 30px;
- box-sizing: border-box;
- font-family: Microsoft YaHei;
- height: auto;
- }
- .itemname .topicon {
- width: 134px;
- height: 37px;
- line-height: 37px;
- background: #D8E9FE;
- border-radius: 10px;
- font-size: 20px;
- color: #4B98F6;
- text-align: center;
- margin-left: 10px;
- margin-top: 10px;
- }
- .swiperimg {
- display: flex;
- justify-content: space-between;
- position: relative;
- }
- .swiper {
- width: 20%;
- min-width: 170px;
- height: 320px;
- margin: auto 0;
- }
- .swiper-slide {
- width: 100%;
- text-align: center;
- font-size: 18px;
- background: #fff;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .swiper-slide img {
- width: 100%;
- height: 104px;
- cursor: pointer;
- }
- .swiper-button-next,
- .swiper-button-prev {
- /* 移除所有样式 */
- all: unset;
- position: absolute;
- z-index: 20;
- color: #666;
- transform: translateY(-50%) rotate(270deg);
- width: 27px;
- height: 187px;
- right: 82px;
- background: #FFFFFF;
- display: flex;
- align-items: center;
- background-size: 100% 100%;
- background-position: center;
- display: flex;
- align-items: center;
- justify-content: center;
- opacity: 1;
- padding-top: 5px;
- box-sizing: border-box;
- }
- .swiper-button-next {
- top: 10px;
- }
- .swiper-button-next img {
- transform: translateY(-50%) rotate(270deg);
- }
- .swiper-button-prev {
- top: 382px;
- }
- .swiper-button-prev img {
- transform: translateY(-50%) rotate(270deg);
- }
- .swiper-button-prev:after,
- .swiper-rtl .swiper-button-next:after {
- content: '';
- }
- .swiper-button-next:after,
- .swiper-rtl .swiper-button-prev:after {
- content: '';
- }
- .swiper-button-prev.swiper-button-disabled,
- .swiper-button-next.swiper-button-disabled {
- display: flex;
- align-items: center;
- justify-content: center;
- /* opacity: 1; */
- padding-top: 5px;
- box-sizing: border-box;
- }
- .contentleft {
- height: 1000px;
- }
- .contentright {
- width: 50vw;
- height: 1000px;
- }
- #ztcr>.top {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid #B7C7DC;
- background: #FFFFFF;
- }
- .iconzb {
- width: 100px;
- height: 37px;
- line-height: 37px;
- background: #E3F5E7;
- border-radius: 4px;
- border: 1px solid #4BB664;
- font-size: 20px;
- color: #4BB664;
- text-align: center;
- margin-right: 9px;
- cursor: pointer;
- margin-bottom: 5px;
- }
- .iconzbxq {
- width: 145px;
- height: 37px;
- line-height: 37px;
- background: transparent;
- border-radius: 4px;
- border: 1px solid #618ecf;
- font-size: 17px;
- color: #618ecf;
- text-align: center;
- margin-right: 9px;
- cursor: pointer;
- padding: 0 10px;
- overflow: hidden;
- word-break: break-all;
- white-space: nowrap;
- text-overflow: ellipsis;
- margin-top: 10px;
- }
- .zbptdiv {
- flex-wrap: wrap;
- max-height: 162px;
- overflow-y: scroll;
- }
- .zbptdiv::-webkit-scrollbar {
- display: none;
- /* Chrome, Safari 和 Opera */
- -ms-overflow-style: none;
- /* IE 和 Edge */
- scrollbar-width: none;
- /* Firefox */
- }
- @media screen and (min-width:1860px) and (max-width:1920px) {
- .swiper-button-next,
- .swiper-button-prev {
- height: 177px;
- right: 74px;
- }
- }
- @media screen and (min-width:1600px) and (max-width:1900px) {
- .swiper-button-next,
- .swiper-button-prev {
- height: 170px;
- right: 71px;
- }
- }
- @media screen and (max-width:1600px) {
- .swiper-button-next,
- .swiper-button-prev {
- height: 170px;
- right: 71px;
- }
- }
- .contentleft>.list {
- justify-content: flex-start;
- }
- .contentleft>.list .listitm {
- margin-right: 20px;
- }
- </style>
- </head>
- <body>
- <div style="width:100%;" class="header"></div>
- <div id="ztcr">
- <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 style="display: flex;">
- <div class="contentleft">
- <div class="itemname">
- <div>{{ztcrDetail.carrierName}}</div>
- <div style="display: flex;">
- <div class="topicon" v-for="(item,index) in (ztcrDetail.tag?ztcrDetail.tag.split(','):[])">
- {{item}}</div>
- </div>
- </div>
- <div class="swiperimg">
- <img :src="imgUrl" alt="" style="width: 75%;height: 394px;">
- <div class="swiper-button-prev"><img src="images/toparrow.png" alt=""></div>
- <div class="swiper mySwiper">
- <div class="swiper-wrapper">
- <div class="swiper-slide list" v-for="(item,index) in swiperList" @click="imgDetail(item)">
- <img :src="item" alt="">
- </div>
- </div>
- </div>
- <div class="swiper-button-next"><img src="images/bottomarrow.png" alt=""></div>
- </div>
- <div class="list">
- <div class="listitm" style="background-color: #4EB2AD;">
- <span>招商面积</span>
- <span>{{ztcrDetail.space?ztcrDetail.space:'-'}}㎡</span>
- </div>
- <!-- <div class="listitm" style="background-color: #4BB664;">
- <span>出售价格</span>
- <span>{{ztcrDetail.sellingPrice?ztcrDetail.sellingPrice:'-'}}</span>
- </div> -->
- <div class="listitm"
- style="background-color: #DFC483;width: auto;min-width: 23.5%;padding: 0 10px;">
- <span>载体类型</span>
- <span>{{ztcrDetail.application?ztcrDetail.application:'-'}}</span>
- </div>
- </div>
- <div class="text">
- <div style="" v-if="ztcrDetail.productModule">
- <span>主导产业:</span>
- <div class="icon"
- v-for="(item,index) in (ztcrDetail.productModule?ztcrDetail.productModule.split('、'):[])">
- {{item}}</div>
- </div>
- <div style="" v-if="ztcrDetail.typeName&&ztcrDetail.typeName.length">
- <span style="white-space: nowrap;">周边配套:</span>
- <div style="display: flex;flex-wrap: wrap;margin-top: 5px;">
- <div class="iconzb" v-for="(item,index) in ztcrDetail.typeName" @click="showZblist(item)">
- {{item}}</div>
- </div>
- </div>
- <div class="zbptdiv">
- <div class="iconzbxq" v-for="(item,index) in zbptlist"
- @click="showPoint(item.complementPoint.split(',')[0],item.complementPoint.split(',')[1],item.complementName)"
- v-if="item.complementPoint" :title="item.complementName">
- {{item.complementName}}</div>
- </div>
- <div v-if="ztcrDetail.addr"><span>详细地址:</span><span>{{ztcrDetail.addr?ztcrDetail.addr:'-'}}</span>
- </div>
- <div v-if="ztcrDetail.contactName">
- <span>联系方式:</span>
- <span v-show="ztcrDetail.contactNameList">
- <span
- v-for="(item,index) in ztcrDetail.contactNameList">{{item}} {{ztcrDetail.contactPhoneList[index]}} </span>
- </span>
- <span v-show="!ztcrDetail.contactNameList">
- <span>{{ztcrDetail.contactName?ztcrDetail.contactName:'-'}} {{ztcrDetail.contactPhone}}</span></span>
- </div>
- </div>
- </div>
- <div class="contentright" id="mapcontainer"></div>
- </div>
- </div>
- <div style="width:100%;" class="footer"></div>
- </body>
- <script>
- $(function () {
- /*公共部分
- * 导航栏
- * footer CopyRight
- */
- $(".header").load('https://www.cqna.gov.cn/syygapi/naxsb/top/top_style.html');
- $(".footer").load('https://www.cqna.gov.cn/syygapi/naxsb/footer/footer.html');
- });
- </script>
- <script src="https://www.cqna.gov.cn/syygapi/naxsb/swiper/swiper-bundle.js"></script>
- <script>
- </script>
- <script>
- new Vue({
- el: '#ztcr',
- data: function () {
- return {
- reqPtah: '',
- ztcrDetail: {},
- imgUrl: '',
- swiperList: [],
- backgroundImage: '',
- znptList: '学校,轻轨,公交车站',
- zbptlist: [
- ],
- map: {},
- complementDetailId: [],
- allZbList: []
- }
- },
- mounted() {
- const url = new URL(window.location.href);
- const id = url.searchParams.get('ztid');
- this.getBuildDetail(id);
- this.$nextTick(() => {
- var swiper = new Swiper(".mySwiper", {
- observer: true,
- observeParents: true,
- direction: "vertical",
- slidesPerView: 3,
- navigation: {
- nextEl: '.swiper-button-next',
- prevEl: '.swiper-button-prev',
- },
- spaceBetween: 10
- });
- })
- },
- methods: {
- backIndex() {
- window.history.go(-1)
- },
- imgDetail(imgurl) {
- if (imgurl == "https://www.cqna.gov.cn/syygapi/naxsb/images/tdcr0.png") {
- return
- }
- this.imgUrl = imgurl;
- },
- showallZblist() {
- var that = this;
- if (!that.allZbList.length) return
- that.allZbList.forEach(function (item) {
- if (item.complementPoint) {
- let arr = item.complementPoint.split(',');
- let p = new BMap.Point(arr[0], arr[1]);
- var myIcon = new BMap.Icon("images/addrzb.png", new BMap.Size(23, 25), {
- offset: new BMap.Size(10, 25), // 指定定位位置
- });
- let marker = new BMap.Marker(p, { icon: myIcon });
- marker.id = "zbId";
- that.map.addOverlay(marker);
- var opts = {
- position: new BMap.Point(arr[0], arr[1]), // 指定文本标签所在的地理位置
- offset: new BMap.Size(10, 10) // 设置文本偏移量
- };
- // 创建文本标签对象,并添加到地图
- var label = new BMap.Label(item.complementName, opts);
- // 自定义文本标签样式
- label.setStyle({
- color: "#186FF0",
- fontSize: "16px",
- height: "auto",
- lineHeight: "20px",
- fontFamily: "微软雅黑",
- fontWeight: 'bold',
- backgroundColor: 'transparent',
- border: 'none',
- // textShadow: '0 0 4px #4B97F5',
- // textStrokeColor: "#4B97F5", // 文本描边颜色
- // textStrokeWidth: "4px", // 文本描边宽度
- });
- marker.setLabel(label);
- label.setStyle({ display: "none" });
- marker.addEventListener("mouseover", function (e) {
- var label = this.getLabel()
- label.setStyle({ display: "block" });
- });
- marker.addEventListener("mouseout", function (e) {
- var label = this.getLabel()
- label.setStyle({ display: "none" });
- });
- }
- });
- },
- showZblist(name) {
- var complementDetailId = this.complementDetailId;
- var that = this;
- var formData = {
- "complementDetailId": complementDetailId,
- "typeName": name
- }
- var allOverlay = this.map.getOverlays();
- for (var i = 0; i < allOverlay.length; i++) {
- if (allOverlay[i].id == "zbId") {
- this.map.removeOverlay(allOverlay[i]);
- }
- }
- $.ajax({
- url: conpath + "/complement/findByBuild",
- type: 'POST',
- contentType: 'application/json; charset=utf-8',
- data: JSON.stringify(formData), // 传递表单数据
- dataType: 'json',
- success: function (data) {
- let mdata = data.data;
- that.zbptlist = mdata;
- that.zbptlist.forEach(function (item) {
- let arr = item.complementPoint.split(',');
- let p = new BMap.Point(arr[0], arr[1]);
- var myIcon = new BMap.Icon("images/addrzb.png", new BMap.Size(23, 25), {
- offset: new BMap.Size(10, 25), // 指定定位位置
- });
- let marker = new BMap.Marker(p, { icon: myIcon });
- marker.id = "zbId";
- that.map.addOverlay(marker);
- var opts = {
- position: new BMap.Point(arr[0], arr[1]), // 指定文本标签所在的地理位置
- offset: new BMap.Size(10, 10) // 设置文本偏移量
- };
- // 创建文本标签对象,并添加到地图
- var label = new BMap.Label(item.complementName, opts);
- // 自定义文本标签样式
- label.setStyle({
- color: "#186FF0",
- fontSize: "16px",
- height: "auto",
- lineHeight: "20px",
- fontFamily: "微软雅黑",
- fontWeight: 'bold',
- backgroundColor: 'transparent',
- border: 'none',
- // textShadow: '0 0 4px #4B97F5',
- // textStrokeColor: "#4B97F5", // 文本描边颜色
- // textStrokeWidth: "4px", // 文本描边宽度
- });
- marker.setLabel(label);
- label.setStyle({ display: "none" });
- marker.addEventListener("mouseover", function (e) {
- var label = this.getLabel()
- label.setStyle({ display: "block" });
- });
- marker.addEventListener("mouseout", function (e) {
- var label = this.getLabel()
- label.setStyle({ display: "none" });
- });
- });
- }
- });
- },
- showPoint(point1, point2, name) {
- var allOverlay = this.map.getOverlays();
- for (var i = 0; i < allOverlay.length; i++) {
- if (allOverlay[i].id == "zbId") {
- this.map.removeOverlay(allOverlay[i]);
- }
- }
- let p = new BMap.Point(point1, point2);
- var myIcon = new BMap.Icon("images/addrchose.png", new BMap.Size(23, 25), {
- offset: new BMap.Size(10, 25), // 指定定位位置
- });
- let marker = new BMap.Marker(p, { icon: myIcon });
- marker.id = "zbId";
- this.map.addOverlay(marker);
- var opts = {
- position: new BMap.Point(point1, point2), // 指定文本标签所在的地理位置
- offset: new BMap.Size(10, 10) // 设置文本偏移量
- };
- // 创建文本标签对象,并添加到地图
- var label = new BMap.Label(name, opts);
- // 自定义文本标签样式
- label.setStyle({
- color: "#186FF0",
- fontSize: "18px",
- height: "auto",
- lineHeight: "20px",
- fontFamily: "微软雅黑",
- fontWeight: 'bold',
- backgroundColor: 'transparent',
- border: 'none',
- textShadow: '0 0 4px #4B97F5',
- textStrokeColor: "#4B97F5", // 文本描边颜色
- textStrokeWidth: "4px", // 文本描边宽度
- });
- marker.setLabel(label);
- },
- getBuildDetail(id) {
- let that = this;
- $.ajax({
- url: conpath + "/sellBuild/" + id,
- type: "get",
- dataType: "json",
- success: function (data) {
- let mdata = data.data.sellBuild;
- mdata.typeName = data.data.typeName ? data.data.typeName : []
- that.complementDetailId = data.data.complement;
- that.ztcrDetail = mdata;
- that.allZbList = data.data.complementDetails;
- if (that.ztcrDetail.contactName && that.ztcrDetail.contactName.split(',').length > 1) {
- that.ztcrDetail.contactNameList = that.ztcrDetail.contactName.split(',')
- that.ztcrDetail.contactPhoneList = that.ztcrDetail.contactPhone.split(',')
- }
- var yqid = mdata.parkData.id;
- if (yqid == 4) {
- that.backgroundImage =
- 'https://www.cqna.gov.cn/syygapi/naxsb/image/npxq.webp';
- } else if (yqid == 6) {
- that.backgroundImage =
- 'https://www.cqna.gov.cn/syygapi/naxsb/image/dxkjy.webp';
- } else if (yqid == 5) {
- that.backgroundImage =
- 'https://www.cqna.gov.cn/syygapi/naxsb/image/ylcxg.png';
- } else if (yqid == 3) {
- that.backgroundImage =
- 'https://www.cqna.gov.cn/syygapi/naxsb/image/cjls.webp';
- } else if (yqid == 2) {
- that.backgroundImage =
- 'https://www.cqna.gov.cn/syygapi/naxsb/image/xjcy.webp';
- } else if (yqid == 1) {
- that.backgroundImage =
- 'https://www.cqna.gov.cn/syygapi/naxsb/image/cygyy.webp';
- } else {
- that.backgroundImage =
- 'https://www.cqna.gov.cn/syygapi/naxsb/image/cygyy.webp';
- }
- that.swiperList = mdata.imgUrl ? mdata.imgUrl.split(",") : [];
- if (!that.swiperList.length) {
- that.swiperList.push(that.backgroundImage)
- }
- that.imgUrl = that.swiperList[0];
- let points = mdata.parkData.addr;
- that.loadMap(points, mdata.point, mdata.namePoint, mdata.centerPoint);
- that.showallZblist();
- }
- });
- },
- loadMap(points, currPoints, namePoint, centerPoint) {
- let map = new BMap.Map("mapcontainer");
- this.map = map;
- map.enableScrollWheelZoom(); // 启用滚轮缩放
- map.enableDragging(); // 启用拖拽功能
- //设定中心点和地图级别
- if (!currPoints) {
- map.centerAndZoom(new BMap.Point(106.6438551, 29.480752), 17);
- } else {
- let pList = currPoints.split('@');
- pList.forEach(function (point) {
- let arr = point.split(',');
- map.centerAndZoom(new BMap.Point(arr[0], arr[1]), 17);
- });
- }
- var that = this;
- fetch('https://www.cqna.gov.cn/syygapi/naxsb/js/najson.json')
- .then(response => response.json())
- .then(data => {
- var pointList = data.features[0].geometry.coordinates[0][0];
- let result = [];
- pointList.forEach(function (point) {
- result.push(new BMap.Point(point[0], point[1]));
- });
- // 创建多边形
- let polygon = new BMap.Polygon(result, {
- strokeColor: "#226cfb",
- strokeWeight: 1.5,
- strokeOpacity: 1,
- strokeStyle: "solid",
- fillColor: "#4B98F6",
- fillOpacity: 0.2
- });
- // 将多边形添加到地图中
- that.map.addOverlay(polygon);
- })
- .catch(error => console.error('Error fetching JSON:', error));
- map.setMapType(BMAP_NORMAL_MAP);
- // var startPoint = new BMap.Point(106.656815, 29.512621);
- // var endPoint = new BMap.Point(106.659483, 29.48807);
- // var driving = new BMap.DrivingRoute(map, {
- // renderOptions: { map: map, autoViewport: true }
- // });
- // driving.search(startPoint, endPoint);
- // var transit = new BMap.TransitRoute(map, {
- // renderOptions: { map: map, autoViewport: true }
- // });
- // transit.search(startPoint, endPoint);
- // driving.addEventListener('onPolylinesSet', function (e) {
- // var polyline = e.getPolyline();
- // polyline.setStrokeColor("#38CA69"); // 设置路线颜色
- // polyline.setStrokeWeight(5); // 设置路线宽度
- // polyline.setStrokeOpacity(1); // 设置路线透明度
- // });
- // 添加选择地址
- if (!currPoints) return;
- let pList = currPoints.split('@');
- pList.forEach(function (point) {
- let arr = point.split(',');
- let p = new BMap.Point(arr[0], arr[1]);
- var myIcon = new BMap.Icon("images/addrzt.png", new BMap.Size(40, 40), {
- offset: new BMap.Size(10, 25), // 指定定位位置
- });
- let marker = new BMap.Marker(p, { icon: myIcon });
- map.addOverlay(marker);
- var opts = {
- position: new BMap.Point(arr[0], arr[1]), // 指定文本标签所在的地理位置
- offset: new BMap.Size(10, 10) // 设置文本偏移量
- };
- // 创建文本标签对象,并添加到地图
- var label = new BMap.Label(that.ztcrDetail.carrierName, opts);
- // 自定义文本标签样式
- label.setStyle({
- color: "#186FF0",
- fontSize: "18px",
- height: "auto",
- lineHeight: "20px",
- fontFamily: "微软雅黑",
- fontWeight: 'bold',
- backgroundColor: 'transparent',
- border: 'none',
- textShadow: '0 0 4px #4B97F5',
- textStrokeColor: "#4B97F5", // 文本描边颜色
- textStrokeWidth: "4px", // 文本描边宽度
- });
- map.addOverlay(label);
- });
- },
- }
- })
- </script>
- </html>
|