tdcr.html 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455
  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. <link rel="stylesheet" href="css/mapcon.css">
  8. <link rel="stylesheet" href="swiper/swiper-bundle.css">
  9. <!-- 引入 Vue -->
  10. <script src="js/vue.min.js"></script>
  11. <!-- 引入样式 -->
  12. <link rel="stylesheet" href="css/index.css">
  13. <!-- 引入组件库 -->
  14. <script src="js/index.js"></script>
  15. <script src="js/jquery-3.5.1.min.js"></script>
  16. <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=7XivTux4H2e1ifKLjvEhxfuayDYxAluq">
  17. </script>
  18. <script src="js/urljson.js"></script>
  19. <style>
  20. html,
  21. body {
  22. min-width: 1500px;
  23. }
  24. #tdcr>.top {
  25. display: flex;
  26. justify-content: space-between;
  27. align-items: center;
  28. border-bottom: 1px solid #B7C7DC;
  29. background: #FFFFFF;
  30. }
  31. .contentleft {
  32. width: 50%;
  33. min-width: 841px;
  34. background-color: #EDF5FF;
  35. font-size: 20px;
  36. color: #333;
  37. padding: 15px 30px;
  38. box-sizing: border-box;
  39. font-family: Microsoft YaHei;
  40. }
  41. .contentleft>.list .listitm {
  42. width: 32.5%;
  43. }
  44. .swiperimg {
  45. display: flex;
  46. justify-content: space-between;
  47. position: relative;
  48. }
  49. .swiper {
  50. width: 20%;
  51. min-width: 170px;
  52. height: 320px;
  53. margin: auto 0;
  54. }
  55. .swiper-slide {
  56. width: 100%;
  57. text-align: center;
  58. font-size: 18px;
  59. background: #fff;
  60. display: flex;
  61. justify-content: center;
  62. align-items: center;
  63. }
  64. .swiper-slide img {
  65. width: 100%;
  66. height: 104px;
  67. cursor: pointer;
  68. }
  69. .swiper-button-next,
  70. .swiper-button-prev {
  71. /* 移除所有样式 */
  72. all: unset;
  73. position: absolute;
  74. z-index: 20;
  75. color: #666;
  76. transform: translateY(-50%) rotate(270deg);
  77. width: 27px;
  78. height: 170px;
  79. background: #FFFFFF;
  80. right: 71px;
  81. display: flex;
  82. align-items: center;
  83. background-size: 100% 100%;
  84. background-position: center;
  85. display: flex;
  86. align-items: center;
  87. justify-content: center;
  88. opacity: 1;
  89. padding-top: 5px;
  90. box-sizing: border-box;
  91. }
  92. .swiper-button-next {
  93. top: 10px;
  94. }
  95. .swiper-button-next img {
  96. transform: translateY(-50%) rotate(270deg);
  97. }
  98. .swiper-button-prev {
  99. top: 382px;
  100. }
  101. .swiper-button-prev img {
  102. transform: translateY(-50%) rotate(270deg);
  103. }
  104. .swiper-button-prev:after,
  105. .swiper-rtl .swiper-button-next:after {
  106. content: '';
  107. }
  108. .swiper-button-next:after,
  109. .swiper-rtl .swiper-button-prev:after {
  110. content: '';
  111. }
  112. .swiper-button-prev.swiper-button-disabled,
  113. .swiper-button-next.swiper-button-disabled {
  114. display: flex;
  115. align-items: center;
  116. justify-content: center;
  117. /* opacity: 1; */
  118. padding-top: 5px;
  119. box-sizing: border-box;
  120. }
  121. @media screen and (min-width:1860px) and (max-width:1920px) {
  122. .swiper-button-next,
  123. .swiper-button-prev {
  124. height: 177px;
  125. right: 74px;
  126. }
  127. }
  128. @media screen and (min-width:1600px) and (max-width:1900px) {
  129. .swiper-button-next,
  130. .swiper-button-prev {
  131. height: 170px;
  132. right: 71px;
  133. }
  134. }
  135. @media screen and (max-width:1600px) {
  136. .swiper-button-next,
  137. .swiper-button-prev {
  138. height: 170px;
  139. right: 71px;
  140. }
  141. }
  142. .tablecon .cont {
  143. width: auto;
  144. min-width: 157px;
  145. background: #fff !important;
  146. }
  147. .contentleft .tablecon {
  148. background: transparent;
  149. padding: 0;
  150. margin-top: 30px;
  151. }
  152. .contentleft .tablecon td {
  153. width: auto;
  154. }
  155. .contentleft {
  156. height: 1000px;
  157. }
  158. .contentright {
  159. height: 1000px;
  160. }
  161. </style>
  162. </head>
  163. <body>
  164. <div style="width:100%;" class="header"></div>
  165. <div id="tdcr">
  166. <div class="top">
  167. <div class="toplogo">
  168. <img src="images/gyylogo.png" alt="">
  169. <span>土地供应</span>
  170. </div>
  171. <div class="backbutton" @click="window.history.go(-1)">
  172. <img src="images/back1.png" alt="">
  173. <span>返回</span>
  174. </div>
  175. </div>
  176. <div style="display: flex;">
  177. <div class="contentleft">
  178. <div class="itemname" style="display: flex;flex-direction: column;">
  179. <span>{{ tdcrDetail.landName }}</span>
  180. <!-- <span style="font-size: 26px;">(业主单位:{{
  181. tdcrDetail.ownerUnit }})</span> -->
  182. </div>
  183. <div class="swiperimg">
  184. <img :src="imgUrl" alt="" style="width: 75%;height: 394px;">
  185. <div class="swiper-button-prev"><img src="images/toparrow.png" alt=""></div>
  186. <div class="swiper mySwiper">
  187. <div class="swiper-wrapper">
  188. <div class="swiper-slide list" v-for="(item,index) in swiperList" @click="imgDetail(item)">
  189. <img :src="item" alt="">
  190. </div>
  191. </div>
  192. </div>
  193. <div class="swiper-button-next"><img src="images/bottomarrow.png" alt=""></div>
  194. </div>
  195. <!-- <div class="list">
  196. <div class="listitm" style="background-color: #4EB2AD;">
  197. <span>占地面积</span>
  198. <span>{{ tdcrDetail.landArea?tdcrDetail.landArea:'-' }}&nbsp;亩</span>
  199. </div>
  200. <div class="listitm" style="background-color: #4BB664;">
  201. <span>主导产业</span>
  202. <span>{{ tdcrDetail.businessIndustry?tdcrDetail.businessIndustry:'-' }}</span>
  203. </div>
  204. <div class="listitm" style="background-color: #DFC483;">
  205. <span>可用地情况</span>
  206. <span>{{ tdcrDetail.landState?tdcrDetail.landState:"不可用" }}</span>
  207. </div>
  208. </div>
  209. <div class="text">
  210. <div><span>详细地址:</span><span>{{ tdcrDetail.addr?tdcrDetail.addr:'-' }}</span></div>
  211. <div><span>联系方式:</span><span>{{ tdcrDetail.contactName?tdcrDetail.contactName:'-' }}&nbsp;&nbsp;{{ tdcrDetail.contactPhone
  212. }}</span></div>
  213. </div>
  214. <div class="title">
  215. <img src="images/gyy-title1.png" alt="">
  216. <span>概况</span>
  217. </div>
  218. <div class="gk">
  219. {{ tdcrDetail.introduce }}
  220. </div>
  221. <div class="title">
  222. <img src="images/hyy-yscb.png" alt="">
  223. <span>要素成本</span>
  224. </div>
  225. <div class="tablecon" v-html="tdcrDetail.cost" v-if="tdcrDetail.cost">
  226. </div>
  227. <div class="tablecon" style="font-size: 18px;" v-else>暂未公开</div> -->
  228. <div class="tablecon" style="font-size: 16px;">
  229. <table style="width: 100%" border="0" cellspacing="0">
  230. <tbody>
  231. <tr>
  232. <td class="tit">地块面积</td>
  233. <td class="cont">{{ tdcrDetail.landArea?tdcrDetail.landArea:'无' }}&nbsp;亩</td>
  234. <td class="tit">所属区域</td>
  235. <td class="cont">{{tdcrDetail.parkData?tdcrDetail.parkData.title:'南岸区'}}</td>
  236. <td class="tit">联系人</td>
  237. <td class="cont">{{ tdcrDetail.contactName?tdcrDetail.contactName:'无' }}</td>
  238. </tr>
  239. <tr>
  240. <td class="tit">拆迁情况</td>
  241. <td class="cont">{{ tdcrDetail.remove?tdcrDetail.remove:'无' }}</td>
  242. <td class="tit">土地用途</td>
  243. <td class="cont">{{ tdcrDetail.landFunction?tdcrDetail.landFunction:'无' }}</td>
  244. <td class="tit">联系电话</td>
  245. <td class="cont">{{ tdcrDetail.contactPhone?tdcrDetail.contactPhone:'无' }}</td>
  246. </tr>
  247. </tbody>
  248. </table>
  249. </div>
  250. </div>
  251. <div class="contentright" id="mapcontainer"></div>
  252. </div>
  253. </div>
  254. <div style="width:100%;" class="footer"></div>
  255. </body>
  256. <script>
  257. $(function () {
  258. /*公共部分
  259. * 导航栏
  260. * footer CopyRight
  261. */
  262. $(".header").load('top/top_style.html');
  263. $(".footer").load('footer/footer.html');
  264. });
  265. </script>
  266. <script src="swiper/swiper-bundle.js"></script>
  267. <script>
  268. new Vue({
  269. el: '#tdcr',
  270. data: function () {
  271. return {
  272. reqPtah: '',
  273. tdcrDetail: {},
  274. imgUrl: '',
  275. backgroundImage: 'images/indexsyyg.png',
  276. swiperList: []
  277. }
  278. },
  279. mounted() {
  280. const url = new URL(window.location.href);
  281. const id = url.searchParams.get('tdid');
  282. this.getLandDetail(id);
  283. this.$nextTick(() => {
  284. var swiper = new Swiper(".mySwiper", {
  285. observer: true,
  286. observeParents: true,
  287. direction: "vertical",
  288. slidesPerView: 3,
  289. navigation: {
  290. nextEl: '.swiper-button-next',
  291. prevEl: '.swiper-button-prev',
  292. },
  293. spaceBetween: 10
  294. });
  295. })
  296. if (id == 4) {
  297. this.backgroundImage = 'image/npxqcyy.jpg';
  298. } else if (id == 6) {
  299. this.backgroundImage = 'image/dxkjy.jpg';
  300. } else if (id == 5) {
  301. this.backgroundImage = 'image/ylcxg.jpg';
  302. } else if (id == 1) {
  303. this.backgroundImage = 'image/cycyy.jpg';
  304. } else if (id == 2) {
  305. this.backgroundImage = 'image/xjqcdzcyy.jpg';
  306. } else if (id == 3) {
  307. this.backgroundImage = 'image/cjlscxcyy.jpg';
  308. } else {
  309. this.backgroundImage = 'image/tdcy.webp';
  310. }
  311. },
  312. methods: {
  313. backIndex() {
  314. window.history.go(-1)
  315. },
  316. imgDetail(imgurl) {
  317. if (imgurl == "images/tdcr0.png") {
  318. return
  319. }
  320. this.imgUrl = imgurl;
  321. },
  322. loadMap(points, namePoint, centerPoint) {
  323. let map = new BMap.Map("mapcontainer");
  324. map.enableScrollWheelZoom();// 启用滚轮缩放
  325. map.enableDragging(); // 启用拖拽功能
  326. // 设定中心点和地图级别
  327. if (!centerPoint) { map.centerAndZoom(new BMap.Point(106.64100001869987, 29.479255312672327), 17); } else {
  328. let centerarr = centerPoint.split(',');
  329. map.centerAndZoom(new BMap.Point(centerarr[0], centerarr[1]), 17);
  330. }
  331. // map.centerAndZoom(new BMap.Point(106.76976451085417, 29.59703121330567), 17);
  332. map.setMapType(BMAP_NORMAL_MAP);
  333. if (!points) return;
  334. let pointList = points.split('@');
  335. let result = [];
  336. pointList.forEach(function (point) {
  337. let arr = point.split(',');
  338. result.push(new BMap.Point(arr[0], arr[1]));
  339. });
  340. // 创建多边形
  341. let polygon = new BMap.Polygon(result, {
  342. strokeColor: "#4BB664",
  343. strokeWeight: 4,
  344. strokeOpacity: 1,
  345. strokeStyle: "solid",
  346. fillColor: "transparent",
  347. fillOpacity: 0.3
  348. });
  349. setInterval(function () {
  350. var strColor = polygon.getStrokeColor();
  351. if (strColor == "#4BB664") {
  352. polygon.setStrokeColor('red');
  353. } else {
  354. polygon.setStrokeColor('#4BB664');
  355. }
  356. }, 500)
  357. // 将多边形添加到地图中
  358. map.addOverlay(polygon);
  359. // 创建文本标签
  360. if (!namePoint) return;
  361. let namearr = namePoint.split(',');
  362. var opts = {
  363. position: new BMap.Point(namearr[0], namearr[1]), // 指定文本标签所在的地理位置
  364. offset: new BMap.Size(10, 10) // 设置文本偏移量
  365. };
  366. // var opts = {
  367. // position: new BMap.Point(106.76806451085417, 29.60233121330567), // 指定文本标签所在的地理位置
  368. // offset: new BMap.Size(10, 10) // 设置文本偏移量
  369. // };
  370. // 创建文本标签对象,并添加到地图
  371. var label = new BMap.Label(this.tdcrDetail.landName, opts);
  372. // 自定义文本标签样式
  373. label.setStyle({
  374. color: "#186FF0",
  375. fontSize: "18px",
  376. height: "auto",
  377. lineHeight: "20px",
  378. fontFamily: "微软雅黑",
  379. fontWeight: 'bold',
  380. backgroundColor: 'transparent',
  381. border: 'none',
  382. textShadow: '0 0 4px #4B97F5',
  383. textStrokeColor: "#4B97F5", // 文本描边颜色
  384. textStrokeWidth: "4px", // 文本描边宽度
  385. });
  386. map.addOverlay(label);
  387. // // 添加选择地址
  388. // if (!currPoints) return;
  389. // let pList = currPoints.split('@');
  390. // pList.forEach(function (point) {
  391. // let arr = point.split(',');
  392. // let p = new BMap.Point(arr[0], arr[1]);
  393. // let marker = new BMap.Marker(p);
  394. // map.addOverlay(marker);
  395. // });
  396. },
  397. getLandDetail(id) {
  398. let that = this;
  399. $.ajax({
  400. url: conpath + "/sellLand/" + id,
  401. type: "get",
  402. async: false,
  403. dataType: "json",
  404. success: function (d) {
  405. let data = d.data;
  406. console.log(data)
  407. if (!data) return;
  408. that.tdcrDetail = data;
  409. that.swiperList = data.imgUrl ? data.imgUrl.split(",") : [];
  410. if (!that.swiperList.length) {
  411. that.swiperList.push(backgroundImage)
  412. }
  413. that.imgUrl = that.swiperList[0];
  414. let points = data.parkData.addr;
  415. that.loadMap(data.point, data.namePoint, data.centerPoint)
  416. // that.loadMap("106.644876,29.494949@106.635821,29.481304@106.638048,29.480675@106.645379,29.481744@106.648397,29.479921@106.65429,29.480675@106.66392,29.481367@106.663057,29.486209@106.662985,29.486901@106.666076,29.48885@106.666507,29.490233@106.665573,29.493817@106.66162,29.49564@106.661692,29.493503@106.659105,29.49344@106.658171,29.491868@106.654721,29.492874@106.65314,29.494383@106.651415,29.496143@106.649475,29.493251");
  417. }
  418. });
  419. }
  420. }
  421. })
  422. </script>
  423. </html>