123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562 |
- <!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">
- <!-- 引入 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>
- ul {
- padding: 0;
- margin: 0;
- }
- input {
- background: none;
- border: none;
- outline: none;
- padding: 0;
- margin: 0;
- font-size: 16px;
- /* 根据需要调整 */
- color: inherit;
- /* 继承父元素的文字颜色 */
- }
- .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;
- padding: 10px;
- box-sizing: border-box;
- }
- .contentleft>.content {
- width: 100%;
- height: 100%;
- background: #fff;
- padding: 5px;
- box-sizing: border-box;
- }
- .contentright {
- width: 50vw;
- height: 1384px;
- }
- #ztcr>.top {
- display: flex;
- justify-content: space-between;
- align-items: center;
- border-bottom: 1px solid #B7C7DC;
- background: #FFFFFF;
- }
- .tjdz {
- display: flex;
- margin-top: 20px;
- flex-wrap: wrap;
- font-size: 18px;
- }
- .tjdz li {
- /* width: 165px; */
- width: auto;
- padding: 0 20px;
- height: 48px;
- line-height: 48px;
- background: #FFFFFF;
- border-radius: 10px;
- border: 1px solid #DADADA;
- text-align: center;
- margin-right: 5px;
- cursor: pointer;
- margin-bottom: 10px;
- }
- .tjdz li:hover {
- background: #DEEDFF;
- border: 1px solid #4B98F6;
- color: #4B98F6;
- }
- .tjdz li.active {
- background: #4B98F6;
- color: #FFFFFF;
- border: 1px solid #4B98F6;
- }
- .contentleft>.content {
- background: transparent;
- }
- .content .search {
- display: flex;
- margin: 10px;
- }
- .content .search>.input {
- width: calc(100% - 175px);
- height: 66px;
- background: #DEEDFF;
- border-radius: 10px;
- border: 1px solid #4B98F6;
- color: #4B98F6;
- font-size: 20px;
- padding-left: 30px;
- }
- .content .search>.input::placeholder {
- color: #4B98F6;
- font-size: 20px;
- }
- .content .search>.btn {
- width: 165px;
- height: 66px;
- background: #4B98F6;
- border-radius: 10px;
- font-size: 22px;
- color: #FFFFFF;
- text-align: center;
- line-height: 66px;
- letter-spacing: 10px;
- margin-left: 10px;
- }
- .content .con {
- display: flex;
- flex-wrap: wrap;
- margin-top: 15px;
- height: calc(100% - 273px);
- overflow-y: scroll;
- align-content: flex-start;
- background: #fff;
- padding: 10px;
- }
- .content .con::-webkit-scrollbar {
- width: 0px;
- height: 0px;
- }
- .con .list {
- cursor: pointer;
- width: 49%;
- margin-right: 1%;
- margin-bottom: 30px;
- }
- .con .list:nth-child(2n) {
- margin-right: 0;
- }
- .con .list .bg {
- width: 100%;
- height: 270px;
- position: relative;
- }
- .con .list .bg img {
- width: 100%;
- height: 100%;
- }
- .con .list .number {
- width: 100%;
- height: 51px;
- line-height: 51px;
- background: #000000;
- opacity: 0.51;
- font-size: 34px;
- color: #FC6F03;
- position: absolute;
- bottom: 0;
- padding-left: 10px;
- box-sizing: border-box;
- }
- .con .list .title {
- font-size: 20px;
- color: #333333;
- margin-top: 20px;
- margin-bottom: 5px;
- word-break: break-all;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- display: block;
- }
- .con .list .content {
- font-size: 16px;
- color: #333333;
- opacity: 0.6;
- word-break: break-all;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- display: flex;
- }
- .con .list .content img {
- margin-right: 10px;
- }
- @media screen and (max-width:1800px) {
- .con .list .bg {
- height: 142px;
- }
- .con .list .number {
- height: 41px;
- line-height: 41px;
- font-size: 30px;
- }
- }
- .zwsj {
- width: 100%;
- height: 100%;
- display: flex;
- align-items: center;
- font-size: 20px;
- color: #999999;
- flex-direction: column;
- }
- </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="content">
- <div style="background: #fff;padding:10px;">
- <div class="tjdz">
- <li v-for="(item,index) in pqList" :class="{ active: currentPq == item.id }" :key="index"
- @click="handleParkChange(item)">{{item.title}}</li>
- </div>
- <div class="search">
- <input v-model="inputValue" class="input" placeholder="请输入关键字进行搜索"></input>
- <div class="btn" @click="searchData">搜索</div>
- </div>
- </div>
- <div class="con">
- <div class="zwsj" v-if="!this.contentList.length"><img src="images/zwsj.png"
- alt=""><span>暂无数据</span></div>
- <div class="list" v-for="(item,index) in contentList"
- @click="goToLink('tdcr.html?tdid=' + item.id)">
- <div class="bg">
- <img :src="item.imgUrl?item.imgUrl:backgroundImage" alt="">
- <div class="number">{{item.landArea}} 亩</div>
- </div>
- <div class="title">{{item.landName}}</div>
- </div>
- </div>
- </div>
- </div>
- <div class="contentright" id="mapcontainer"></div>
- </div>
- </div>
- </div>
- <div style="width:100%;" class="footer"></div>
- </body>
- <script>
- $(function () {
-
- $(".header").load('top/top_style.html');
- $(".footer").load('footer/footer.html');
- });
- </script>
- <script>
- function isMobileUserAgent() {
- return /iphone|ipod|android.*mobile|windows.*phone|blackberry.*mobile/i.test(
- window.parent.navigator.userAgent.toLowerCase("")
- );
- }
- if (isMobileUserAgent()) {
- window.location = 'https://www.cqna.gov.cn/syygapi/naxsb/mobile/indexbmhqMobile.html'
- }
- </script>
- <script>
- new Vue({
- el: '#ztcr',
- data: function () {
- return {
- reqPtah: '',
- contentList: [],
- pageSize: 10000,
- pointList: [],
- currentPq: -1,
- inputValue: '',
- backgroundImage: 'https://www.cqna.gov.cn/syygapi/naxsb/image/cycyy.jpg',
- pqList: [
- ],
- yqMapAddr: '',
- allpointList: '',
- titleList: []
- }
- },
- mounted() {
- const url = new URL(window.location.href);
- const id = url.searchParams.get('id');
- this.currentPq = id;
- this.getParkDetail();
- this.getParkData();
- this.getSellLand(id);
- },
- methods: {
- goDeteil(id) {
- if (id) {
- window.location.href = "https://www.cqna.gov.cn/syygapi/naxsb/ztcrdetail.html?ztid=" + id;
- }
- },
- handleParkChange(data) {
- this.currentPq = data.id;
- this.inputValue = '';
- this.getParkDetail();
- this.getSellLand(data.id);
- },
- searchData() {
- const url = new URL(window.location.href);
- const id = url.searchParams.get('id');
- this.getSellLand(id);
- },
- goToLink(url) {
- const addr = new URL(window.location.href);
- const id = addr.searchParams.get('id');
- if (url) {
- window.location.href = url + '?id=' + id;
- }
- },
- getParkData() {
- let that = this;
- that.pqList = [];
- that.pqList.push({
- id: -1,
- title: "全部"
- });
- $.ajax({
- url: conpath + "/parkData",
- type: "get",
- dataType: "json",
- success: function (data) {
- data.forEach(function (d) {
- that.pqList.push(d);
- });
- that.titleList = data;
- }
- });
- },
- getSellLand(id) {
- let that = this;
- $.ajax({
- url: conpath + "/sellLand",
- type: "post",
- contentType: 'application/json',
- data: JSON.stringify({
- "currentPage": 1,
- "pageSize": that.pageSize,
- "parkId": that.currentPq == -1 ? null : that.currentPq,
- "keyword": that.inputValue ? that.inputValue : ''
- }),
- dataType: "json",
- success: function (data) {
- let dataList = data.list;
- that.contentList = dataList;
- that.loadMap(dataList);
- }
- });
- },
- getParkDetail() {
- let that = this;
- $.ajax({
- url: conpath + "/parkData/" + that.currentPq,
- type: "get",
- dataType: "json",
- success: function (data) {
- if (that.currentPq == '-1') {
- that.allpointList = data.addrs;
- that.yqMapAddr = ""
- } else {
- that.yqMapAddr = data;
- that.allpointList = ''
- }
- that.maptitle = data.title;
- }
- });
- },
- loadMap(datalist) {
- let that = this;
- fetch('https://www.cqna.gov.cn/syygapi/naxsb/js/najson.json')
- .then(response => response.json())
- .then(data => {
- let map = new BMap.Map("mapcontainer");
- map.enableScrollWheelZoom();
- map.enableDragging();
- map.centerAndZoom(new BMap.Point(106.651444, 29.51982), 13);
- map.setMapType(BMAP_NORMAL_MAP);
- 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
- });
-
- map.addOverlay(polygon);
-
- if (that.yqMapAddr.addr) {
- var points = that.yqMapAddr.addr;
- let pointList = points.split('@');
- let result = [];
- pointList.forEach(function (point) {
- let arr = point.split(',');
- result.push(new BMap.Point(arr[0], arr[1]));
- });
-
- let polygon = new BMap.Polygon(result, {
- strokeColor: "transparent",
- strokeWeight: 0,
- strokeOpacity: 1,
- strokeStyle: "solid",
- fillColor: that.yqMapAddr.color,
- fillOpacity: 0.5
- });
-
- map.addOverlay(polygon);
- }
-
- var allpoints = that.allpointList;
- if (allpoints) {
- var allpointList = that.titleList;
- allpointList.forEach(function (polygonData) {
- let pointList = polygonData.addr.split('@');
- let result = [];
- pointList.forEach(function (point) {
- let arr = point.split(',');
- result.push(new BMap.Point(arr[0], arr[1]));
- });
- var color = polygonData.color;
-
- let polygon = new BMap.Polygon(result, {
- strokeColor: "transparent",
- strokeWeight: 0,
- strokeOpacity: 1,
- strokeStyle: "solid",
- fillColor: color,
- fillOpacity: 0.85
- });
- map.addOverlay(polygon);
- });
- }
-
- if (datalist.length) {
- datalist.forEach(function (polygonData) {
- let pointList = polygonData.point.split('@');
- let result = [];
- pointList.forEach(function (point) {
- let arr = point.split(',');
- result.push(new BMap.Point(arr[0], arr[1]));
- });
-
- let polygon = new BMap.Polygon(result, {
- strokeColor: "red",
- strokeWeight: 2,
- strokeOpacity: 1,
- strokeStyle: "solid",
- fillColor: "transparent",
- fillOpacity: 0.3
- });
- map.addOverlay(polygon);
- var id = polygonData.id;
-
- var label = new BMap.Label(polygonData.landName, {
- position: polygon.getBounds().getCenter(),
- offset: new BMap.Size(0, 0)
- });
- 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",
- });
- polygon.addEventListener("mouseover", function () {
- map.addOverlay(label);
- label.setStyle({ display: "block" });
- });
-
- polygon.addEventListener("mouseout", function () {
-
- label.setStyle({ display: "none" });
- });
-
- polygon.addEventListener("click", function () {
- window.location.href = 'tdcr.html?tdid=' + id;
- });
- });
- }
- })
- .catch(error => console.error('Error fetching JSON:', error));
- }
- }
- })
- </script>
- </html>
|