tdcrlist.html 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  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. <meta name=”SiteName” content=”重庆市南岸区人民政府”>
  7. <meta name="SiteDomain" content="http://www.cqna.gov.cn" />
  8. <meta name="SiteIDCode" content="5001080014">
  9. <meta name="ColumnName" content="土地供应">
  10. <meta name="ColumnDescription" content="土地供应" />
  11. <meta name="ColumnKeywords" content="土地供应" />
  12. <meta name="ColumnType" content="土地供应" />
  13. <title>土地供应-重庆市南岸区人民政府网</title>
  14. <link rel="stylesheet" href="css/mapcon.css">
  15. <!-- 引入 Vue -->
  16. <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/vue.min.js"></script>
  17. <!-- 引入样式 -->
  18. <link rel="stylesheet" href="https://www.cqna.gov.cn/syygapi/naxsb/css/index.css">
  19. <!-- 引入组件库 -->
  20. <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/index.js"></script>
  21. <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/jquery-3.5.1.min.js"></script>
  22. <script type="text/javascript" src="https://api.map.baidu.com/api?v=2.0&ak=7XivTux4H2e1ifKLjvEhxfuayDYxAluq">
  23. </script>
  24. <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/jquery-3.5.1.min.js"></script>
  25. <script src="https://www.cqna.gov.cn/syygapi/naxsb/js/urljson.js"></script>
  26. <style>
  27. ul {
  28. padding: 0;
  29. margin: 0;
  30. }
  31. input {
  32. background: none;
  33. border: none;
  34. outline: none;
  35. padding: 0;
  36. margin: 0;
  37. font-size: 16px;
  38. /* 根据需要调整 */
  39. color: inherit;
  40. /* 继承父元素的文字颜色 */
  41. }
  42. .contentleft {
  43. width: 50%;
  44. min-width: 841px;
  45. background-color: #EDF5FF;
  46. font-size: 20px;
  47. color: #333;
  48. padding: 15px 30px;
  49. box-sizing: border-box;
  50. font-family: Microsoft YaHei;
  51. padding: 10px;
  52. box-sizing: border-box;
  53. }
  54. .contentleft>.content {
  55. width: 100%;
  56. height: 100%;
  57. background: #fff;
  58. padding: 5px;
  59. box-sizing: border-box;
  60. }
  61. .contentright {
  62. width: 50vw;
  63. height: 1384px;
  64. }
  65. #ztcr>.top {
  66. display: flex;
  67. justify-content: space-between;
  68. align-items: center;
  69. border-bottom: 1px solid #B7C7DC;
  70. background: #FFFFFF;
  71. }
  72. .tjdz {
  73. display: flex;
  74. margin-top: 20px;
  75. flex-wrap: wrap;
  76. font-size: 18px;
  77. }
  78. .tjdz li {
  79. /* width: 165px; */
  80. width: auto;
  81. padding: 0 20px;
  82. height: 48px;
  83. line-height: 48px;
  84. background: #FFFFFF;
  85. border-radius: 10px;
  86. border: 1px solid #DADADA;
  87. text-align: center;
  88. margin-right: 5px;
  89. cursor: pointer;
  90. margin-bottom: 10px;
  91. }
  92. .tjdz li:hover {
  93. background: #DEEDFF;
  94. border: 1px solid #4B98F6;
  95. color: #4B98F6;
  96. }
  97. .tjdz li.active {
  98. background: #4B98F6;
  99. color: #FFFFFF;
  100. border: 1px solid #4B98F6;
  101. }
  102. .contentleft>.content {
  103. background: transparent;
  104. }
  105. .content .search {
  106. display: flex;
  107. margin: 10px;
  108. }
  109. .content .search>.input {
  110. width: calc(100% - 175px);
  111. height: 66px;
  112. background: #DEEDFF;
  113. border-radius: 10px;
  114. border: 1px solid #4B98F6;
  115. color: #4B98F6;
  116. font-size: 20px;
  117. padding-left: 30px;
  118. }
  119. .content .search>.input::placeholder {
  120. color: #4B98F6;
  121. font-size: 20px;
  122. }
  123. .content .search>.btn {
  124. width: 165px;
  125. height: 66px;
  126. background: #4B98F6;
  127. border-radius: 10px;
  128. font-size: 22px;
  129. color: #FFFFFF;
  130. text-align: center;
  131. line-height: 66px;
  132. letter-spacing: 10px;
  133. margin-left: 10px;
  134. }
  135. .content .con {
  136. display: flex;
  137. flex-wrap: wrap;
  138. margin-top: 15px;
  139. height: calc(100% - 273px);
  140. overflow-y: scroll;
  141. align-content: flex-start;
  142. background: #fff;
  143. padding: 10px;
  144. }
  145. .content .con::-webkit-scrollbar {
  146. width: 0px;
  147. height: 0px;
  148. }
  149. .con .list {
  150. cursor: pointer;
  151. width: 49%;
  152. margin-right: 1%;
  153. margin-bottom: 30px;
  154. }
  155. .con .list:nth-child(2n) {
  156. margin-right: 0;
  157. }
  158. .con .list .bg {
  159. width: 100%;
  160. height: 270px;
  161. position: relative;
  162. }
  163. .con .list .bg img {
  164. width: 100%;
  165. height: 100%;
  166. }
  167. .con .list .number {
  168. width: 100%;
  169. height: 51px;
  170. line-height: 51px;
  171. background: #000000;
  172. opacity: 0.51;
  173. font-size: 34px;
  174. color: #FC6F03;
  175. position: absolute;
  176. bottom: 0;
  177. padding-left: 10px;
  178. box-sizing: border-box;
  179. }
  180. .con .list .title {
  181. font-size: 20px;
  182. color: #333333;
  183. margin-top: 20px;
  184. margin-bottom: 5px;
  185. word-break: break-all;
  186. overflow: hidden;
  187. white-space: nowrap;
  188. text-overflow: ellipsis;
  189. display: block;
  190. }
  191. .con .list .content {
  192. font-size: 16px;
  193. color: #333333;
  194. opacity: 0.6;
  195. word-break: break-all;
  196. overflow: hidden;
  197. white-space: nowrap;
  198. text-overflow: ellipsis;
  199. display: flex;
  200. }
  201. .con .list .content img {
  202. margin-right: 10px;
  203. }
  204. @media screen and (max-width:1800px) {
  205. .con .list .bg {
  206. height: 142px;
  207. }
  208. .con .list .number {
  209. height: 41px;
  210. line-height: 41px;
  211. font-size: 30px;
  212. }
  213. }
  214. .zwsj {
  215. width: 100%;
  216. height: 100%;
  217. display: flex;
  218. align-items: center;
  219. font-size: 20px;
  220. color: #999999;
  221. flex-direction: column;
  222. }
  223. </style>
  224. </head>
  225. <body>
  226. <div style="width:100%;" class="header"></div>
  227. <div id="ztcr">
  228. <div class="top">
  229. <div class="toplogo">
  230. <img src="images/gyylogo.png" alt="">
  231. <span>土地供应</span>
  232. </div>
  233. <div class="backbutton" @click="window.history.go(-1)">
  234. <img src="images/back1.png" alt="">
  235. <span>返回</span>
  236. </div>
  237. </div>
  238. <div style="display: flex;">
  239. <div class="contentleft">
  240. <div class="content">
  241. <div style="background: #fff;padding:10px;">
  242. <div class="tjdz">
  243. <li v-for="(item,index) in pqList" :class="{ active: currentPq == item.id }" :key="index"
  244. @click="handleParkChange(item)">{{item.title}}</li>
  245. </div>
  246. <div class="search">
  247. <input v-model="inputValue" class="input" placeholder="请输入关键字进行搜索"></input>
  248. <div class="btn" @click="searchData">搜索</div>
  249. </div>
  250. </div>
  251. <div class="con">
  252. <div class="zwsj" v-if="!this.contentList.length"><img src="images/zwsj.png"
  253. alt=""><span>暂无数据</span></div>
  254. <div class="list" v-for="(item,index) in contentList"
  255. @click="goToLink('tdcr.html?tdid=' + item.id)">
  256. <div class="bg">
  257. <img :src="item.imgUrl?item.imgUrl:backgroundImage" alt="">
  258. <div class="number">{{item.landArea}}&nbsp;亩</div>
  259. </div>
  260. <div class="title">{{item.landName}}</div>
  261. </div>
  262. </div>
  263. </div>
  264. </div>
  265. <div class="contentright" id="mapcontainer"></div>
  266. </div>
  267. </div>
  268. </div>
  269. <div style="width:100%;" class="footer"></div>
  270. </body>
  271. <script>
  272. $(function () {
  273. $(".header").load('top/top_style.html');
  274. $(".footer").load('footer/footer.html');
  275. });
  276. </script>
  277. <script>
  278. function isMobileUserAgent() {
  279. return /iphone|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(
  280. window.parent.navigator.userAgent.toLowerCase("")
  281. );
  282. }
  283. if (isMobileUserAgent()) {
  284. window.location = 'https://www.cqna.gov.cn/syygapi/naxsb/mobile/indexbmhqMobile.html'
  285. }
  286. </script>
  287. <script>
  288. new Vue({
  289. el: '#ztcr',
  290. data: function () {
  291. return {
  292. reqPtah: '',
  293. contentList: [],
  294. pageSize: 10000,
  295. pointList: [],
  296. currentPq: -1,
  297. inputValue: '',
  298. backgroundImage: 'https://www.cqna.gov.cn/syygapi/naxsb/image/cycyy.jpg',
  299. pqList: [
  300. ],
  301. yqMapAddr: '',
  302. allpointList: '',
  303. titleList: []
  304. }
  305. },
  306. mounted() {
  307. const url = new URL(window.location.href);
  308. const id = url.searchParams.get('id');
  309. this.currentPq = id;
  310. this.getParkDetail();
  311. this.getParkData();
  312. this.getSellLand(id);
  313. },
  314. methods: {
  315. goDeteil(id) {
  316. if (id) {
  317. window.location.href = "https://www.cqna.gov.cn/syygapi/naxsb/ztcrdetail.html?ztid=" + id;
  318. }
  319. },
  320. handleParkChange(data) {
  321. this.currentPq = data.id;
  322. this.inputValue = '';
  323. this.getParkDetail();
  324. this.getSellLand(data.id);
  325. },
  326. searchData() {
  327. const url = new URL(window.location.href);
  328. const id = url.searchParams.get('id');
  329. this.getSellLand(id);
  330. },
  331. goToLink(url) {
  332. const addr = new URL(window.location.href);
  333. const id = addr.searchParams.get('id');
  334. if (url) {
  335. window.location.href = url + '?id=' + id;
  336. }
  337. },
  338. getParkData() {
  339. let that = this;
  340. that.pqList = [];
  341. that.pqList.push({
  342. id: -1,
  343. title: "全部"
  344. });
  345. $.ajax({
  346. url: conpath + "/parkData",
  347. type: "get",
  348. dataType: "json",
  349. success: function (data) {
  350. data.forEach(function (d) {
  351. that.pqList.push(d);
  352. });
  353. that.titleList = data;
  354. }
  355. });
  356. },
  357. getSellLand(id) {
  358. let that = this;
  359. $.ajax({
  360. url: conpath + "/sellLand",
  361. type: "post",
  362. contentType: 'application/json',
  363. data: JSON.stringify({
  364. "currentPage": 1,
  365. "pageSize": that.pageSize,
  366. "parkId": that.currentPq == -1 ? null : that.currentPq,
  367. "keyword": that.inputValue ? that.inputValue : ''
  368. }),
  369. dataType: "json",
  370. success: function (data) {
  371. let dataList = data.list;
  372. that.contentList = dataList;
  373. that.loadMap(dataList);
  374. }
  375. });
  376. },
  377. getParkDetail() {
  378. let that = this;
  379. $.ajax({
  380. url: conpath + "/parkData/" + that.currentPq,
  381. type: "get",
  382. dataType: "json",
  383. success: function (data) {
  384. if (that.currentPq == '-1') {
  385. that.allpointList = data.addrs;
  386. that.yqMapAddr = ""
  387. } else {
  388. that.yqMapAddr = data;
  389. that.allpointList = ''
  390. }
  391. that.maptitle = data.title;
  392. }
  393. });
  394. },
  395. loadMap(datalist) {
  396. let that = this;
  397. fetch('https://www.cqna.gov.cn/syygapi/naxsb/js/najson.json')
  398. .then(response => response.json())
  399. .then(data => {
  400. let map = new BMap.Map("mapcontainer");
  401. map.enableScrollWheelZoom();
  402. map.enableDragging();
  403. map.centerAndZoom(new BMap.Point(106.651444, 29.51982), 13);
  404. map.setMapType(BMAP_NORMAL_MAP);
  405. var pointList = data.features[0].geometry.coordinates[0][0];
  406. let result = [];
  407. pointList.forEach(function (point) {
  408. result.push(new BMap.Point(point[0], point[1]));
  409. });
  410. let polygon = new BMap.Polygon(result, {
  411. strokeColor: "#226cfb",
  412. strokeWeight: 1.5,
  413. strokeOpacity: 1,
  414. strokeStyle: "solid",
  415. fillColor: "#4B98F6",
  416. fillOpacity: 0.2
  417. });
  418. map.addOverlay(polygon);
  419. if (that.yqMapAddr.addr) {
  420. var points = that.yqMapAddr.addr;
  421. let pointList = points.split('@');
  422. let result = [];
  423. pointList.forEach(function (point) {
  424. let arr = point.split(',');
  425. result.push(new BMap.Point(arr[0], arr[1]));
  426. });
  427. let polygon = new BMap.Polygon(result, {
  428. strokeColor: "transparent",
  429. strokeWeight: 0,
  430. strokeOpacity: 1,
  431. strokeStyle: "solid",
  432. fillColor: that.yqMapAddr.color,
  433. fillOpacity: 0.5
  434. });
  435. map.addOverlay(polygon);
  436. }
  437. var allpoints = that.allpointList;
  438. if (allpoints) {
  439. var allpointList = that.titleList;
  440. allpointList.forEach(function (polygonData) {
  441. let pointList = polygonData.addr.split('@');
  442. let result = [];
  443. pointList.forEach(function (point) {
  444. let arr = point.split(',');
  445. result.push(new BMap.Point(arr[0], arr[1]));
  446. });
  447. var color = polygonData.color;
  448. let polygon = new BMap.Polygon(result, {
  449. strokeColor: "transparent",
  450. strokeWeight: 0,
  451. strokeOpacity: 1,
  452. strokeStyle: "solid",
  453. fillColor: color,
  454. fillOpacity: 0.85
  455. });
  456. map.addOverlay(polygon);
  457. });
  458. }
  459. if (datalist.length) {
  460. datalist.forEach(function (polygonData) {
  461. let pointList = polygonData.point.split('@');
  462. let result = [];
  463. pointList.forEach(function (point) {
  464. let arr = point.split(',');
  465. result.push(new BMap.Point(arr[0], arr[1]));
  466. });
  467. let polygon = new BMap.Polygon(result, {
  468. strokeColor: "red",
  469. strokeWeight: 2,
  470. strokeOpacity: 1,
  471. strokeStyle: "solid",
  472. fillColor: "transparent",
  473. fillOpacity: 0.3
  474. });
  475. map.addOverlay(polygon);
  476. var id = polygonData.id;
  477. var label = new BMap.Label(polygonData.landName, {
  478. position: polygon.getBounds().getCenter(),
  479. offset: new BMap.Size(0, 0)
  480. });
  481. label.setStyle({
  482. color: "#186FF0",
  483. fontSize: "18px",
  484. height: "auto",
  485. lineHeight: "20px",
  486. fontFamily: "微软雅黑",
  487. fontWeight: 'bold',
  488. backgroundColor: 'transparent',
  489. border: 'none',
  490. textShadow: '0 0 4px #4B97F5',
  491. textStrokeColor: "#4B97F5",
  492. textStrokeWidth: "4px",
  493. });
  494. polygon.addEventListener("mouseover", function () {
  495. map.addOverlay(label);
  496. label.setStyle({ display: "block" });
  497. });
  498. polygon.addEventListener("mouseout", function () {
  499. label.setStyle({ display: "none" });
  500. });
  501. polygon.addEventListener("click", function () {
  502. window.location.href = 'tdcr.html?tdid=' + id;
  503. });
  504. });
  505. }
  506. })
  507. .catch(error => console.error('Error fetching JSON:', error));
  508. }
  509. }
  510. })
  511. </script>
  512. </html>