znxzchoice.html 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  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. <!-- 引入 Vue -->
  9. <script src="js/vue.min.js"></script>
  10. <!-- 引入样式 -->
  11. <link rel="stylesheet" href="css/index.css">
  12. <!-- 引入组件库 -->
  13. <script src="js/index.js"></script>
  14. <script type="text/javascript"
  15. src="https://api.map.baidu.com/api?v=2.0&ak=7XivTux4H2e1ifKLjvEhxfuayDYxAluq"></script>
  16. <!-- jquery-->
  17. <script src="js/jquery-3.5.1.min.js"></script>
  18. <script src="js/urljson.js"></script>
  19. <style>
  20. .contentleft {
  21. width: 50%;
  22. min-width: 841px;
  23. background-color: #EDF5FF;
  24. font-size: 20px;
  25. color: #333;
  26. padding: 15px 30px;
  27. box-sizing: border-box;
  28. }
  29. .choseButton {
  30. width: 223px;
  31. height: 69px;
  32. background: #4B98F6;
  33. border-radius: 10px;
  34. text-align: center;
  35. line-height: 69px;
  36. color: #FFFFFF;
  37. cursor: pointer;
  38. margin-right: 20px;
  39. }
  40. .content {
  41. width: 100%;
  42. margin: auto;
  43. background: #FFFFFF;
  44. padding: 10px 20px;
  45. box-sizing: border-box;
  46. margin-top: 25px;
  47. }
  48. .contentleft>.content {
  49. width: 100%;
  50. height: 1000px;
  51. overflow-y: scroll;
  52. }
  53. .contentleft>.content::-webkit-scrollbar {
  54. width: 0px;
  55. height: 0px;
  56. }
  57. #znxz>.top {
  58. display: flex;
  59. justify-content: space-between;
  60. align-items: center;
  61. border-bottom: 1px solid #B7C7DC;
  62. background: #FFFFFF;
  63. }
  64. .typetitle {
  65. margin: 10px auto;
  66. }
  67. .fwhy {
  68. display: flex;
  69. flex-wrap: wrap;
  70. }
  71. .fwhy .list {
  72. width: 199px;
  73. height: 52px;
  74. line-height: 52px;
  75. text-align: center;
  76. background: #DEEDFF;
  77. border-radius: 10px;
  78. border: 1px solid #4B98F6;
  79. font-size: 20px;
  80. color: #4B98F6;
  81. margin-left: 10px;
  82. margin-bottom: 19px;
  83. cursor: pointer;
  84. word-break: break-all;
  85. overflow: hidden;
  86. white-space: nowrap;
  87. text-overflow: ellipsis;
  88. }
  89. .fwhy .list.active {
  90. background: #4B98F6;
  91. color: #FFFFFF;
  92. }
  93. </style>
  94. </head>
  95. <body>
  96. <div style="width:100%;height:570px" class="header"></div>
  97. <div id="znxz">
  98. <div class="top">
  99. <div class="toplogo">
  100. <img src="images/gyylogo.png" alt="">
  101. <span>智能选址</span>
  102. </div>
  103. <div class="backbutton" @click="window.history.go(-1)">
  104. <img src="images/back1.png" alt="">
  105. <span>返回</span>
  106. </div>
  107. </div>
  108. <div style="display: flex;">
  109. <div class="contentleft" id="">
  110. <div style="color: #4B98F6;">我们将根据您的条件为您推荐最合适的企业选址</div>
  111. <div class="content" style="position: relative;">
  112. <div v-show="currtype==1">
  113. <div class="typetitle">1.请选择您的服务行业</div>
  114. <div class="fwhy" id="fwhy">
  115. <div class="list" :class="getClassfwhy(item.name)" :key="index"
  116. v-for="(item,index) in fwhyList" :data-tab-target="item.name">{{item.name}}</div>
  117. <div class="list fwhybx" data-tab-target="不限">不限</div>
  118. </div>
  119. </div>
  120. <div v-show="currtype==2">
  121. <div class="typetitle">2.请选择您的载体类型</div>
  122. <div class="fwhy" id="ztlx">
  123. <div class="list" :class="getClassztlx(item)" :key="index" v-for="(item,index) in ztlxList"
  124. :data-tab-target="item">{{item}}</div>
  125. <div class="list ztlxbx" data-tab-target="不限">不限</div>
  126. </div>
  127. </div>
  128. <div v-show="currtype==3">
  129. <div class="typetitle">3.请选择您的租赁情况</div>
  130. <div class="fwhy" id="zlqk">
  131. <div class="list" :class="getClasszlqk(item.name)" :key="index"
  132. v-for="(item,index) in zlqklist" :data-tab-target="item.name">{{item.name}}</div>
  133. <div class="list zlqkbx" data-tab-target="不限">不限</div>
  134. </div>
  135. </div>
  136. <div v-show="currtype==4">
  137. <div class="typetitle">4.请选择您的所属园区</div>
  138. <div class="fwhy" id="ssyq">
  139. <div class="list" :class="getClassssyq(item.title)" :key="index"
  140. v-for="(item,index) in titleList" :data-tab-target="item.id" :data-title="item.title"
  141. :title="item.title">
  142. {{item.title}}</div>
  143. <div class="list ssyqbx" data-tab-target="不限" data-title="不限">不限</div>
  144. </div>
  145. </div>
  146. <div style="display: flex;margin-top: 100px;position: absolute;top: 300px;left: 25px;">
  147. <div class="choseButton" style="color: #4B98F6;background: #FFFFFF;border: 2px solid #4B98F6;"
  148. @click="newChoice">
  149. 重新选择</div>
  150. <div class="choseButton" style="
  151. box-shadow: 0px 13px 9px 0px rgba(24,111,240,0.31);" @click="currtype=currtype-1"
  152. v-if="currtype!=1">上一步</div>
  153. <div class="choseButton" style="
  154. box-shadow: 0px 13px 9px 0px rgba(24,111,240,0.31);" @click="nextChoice">下一步
  155. </div>
  156. </div>
  157. </div>
  158. </div>
  159. <div class="contentright" id="mapcontainer"></div>
  160. </div>
  161. </div>
  162. <div style="width:100%;" class="footer"></div>
  163. </body>
  164. <script>
  165. $(function () {
  166. /*公共部分
  167. * 导航栏
  168. * footer CopyRight
  169. */
  170. $(".header").load('https://www.cqna.gov.cn/ggbf_search/top/top_style.html');
  171. $(".footer").load('https://www.cqna.gov.cn/ggbf_search/ggyr/2022foot/bottomBlack.html');
  172. });
  173. </script>
  174. <script>
  175. var nowDiv = new Vue({
  176. el: '#znxz',
  177. data: function () {
  178. return {
  179. reqPtah: '',
  180. currtype: 1,
  181. currfwhy: '',
  182. currztlx: '',
  183. currzlqk: '',
  184. currssyq: '',
  185. currssyqtitle: '',
  186. fwhyList: [
  187. {
  188. id: 1,
  189. name: "软信服务业"
  190. },
  191. {
  192. id: 2,
  193. name: "工业用地"
  194. },
  195. {
  196. id: 3,
  197. name: "制造业"
  198. },
  199. {
  200. id: 4,
  201. name: "商业"
  202. },
  203. {
  204. id: 5,
  205. name: "商贸流通业"
  206. },
  207. {
  208. id: 6,
  209. name: "医药流通"
  210. },
  211. {
  212. id: 7,
  213. name: "电子信息"
  214. },
  215. {
  216. id: 8,
  217. name: "医疗器械"
  218. }
  219. ],
  220. ztlxList: [],
  221. zlqklist: [
  222. {
  223. id: 1,
  224. name: '租赁'
  225. },
  226. {
  227. id: 2,
  228. name: '出让'
  229. }
  230. ],
  231. titleList: [
  232. ],
  233. }
  234. },
  235. computed: {
  236. getClasses() {
  237. return this.getClassfwhy();
  238. return this.getClassztlx();
  239. return this.getClasszlqk();
  240. return this.getClassssyq();
  241. }
  242. },
  243. methods: {
  244. backIndex() {
  245. window.history.go(-1)
  246. },
  247. getParkData() {
  248. let that = this;
  249. $.ajax({
  250. url: conpath + "/parkData/",
  251. type: "get",
  252. dataType: "json",
  253. async: false,
  254. success: function (data) {
  255. that.titleList = data;
  256. }
  257. })
  258. },
  259. newChoice() {
  260. this.currtype = 1;
  261. },
  262. nextChoice() {
  263. var znxz = {
  264. "productModule": this.currfwhy,
  265. "application": this.currztlx,
  266. "rent": this.currzlqk,
  267. "belong": this.currssyq,
  268. "currentPage": 1,
  269. "pageSize": 100000
  270. }
  271. if (this.currtype == 4) {
  272. var selectTabs = '';
  273. if (this.currfwhy && this.currfwhy != "不限") {
  274. selectTabs = this.currfwhy
  275. }
  276. if (this.currztlx && this.currztlx != "不限") {
  277. if (selectTabs) {
  278. selectTabs = selectTabs + ',' + this.currztlx
  279. } else {
  280. selectTabs = this.currztlx;
  281. }
  282. }
  283. if (this.currzlqk && this.currzlqk != "不限") {
  284. if (selectTabs) {
  285. selectTabs = selectTabs + ',' + this.currzlqk
  286. } else {
  287. selectTabs = this.currzlqk;
  288. }
  289. }
  290. if (this.currssyq && this.currssyq != "不限") {
  291. if (selectTabs) {
  292. selectTabs = selectTabs + ',' + this.currssyqtitle
  293. } else {
  294. selectTabs = this.currssyqtitle;
  295. }
  296. }
  297. const znxzString = JSON.stringify(znxz);
  298. sessionStorage.setItem('znxztabs', selectTabs);
  299. sessionStorage.setItem('znxz', znxzString);
  300. window.location.href = "znxz.html"
  301. } else {
  302. var znxz = {
  303. "productModule": this.currfwhy,
  304. "application": this.currztlx,
  305. "rent": this.currzlqk,
  306. "belong": this.currssyq
  307. }
  308. this.getListData(znxz);
  309. this.currtype = this.currtype + 1;
  310. }
  311. },
  312. getListData(json) {
  313. let that = this;
  314. let dataList;
  315. that.getParkData();
  316. $.ajax({
  317. url: conpath + "/sellBuild/newQueryOne",
  318. type: "post",
  319. contentType: 'application/json',
  320. data: JSON.stringify(json),
  321. dataType: "json",
  322. async: false,
  323. success: function (data) {
  324. that.ztlxList = data.data.applications;
  325. var alltitle = that.titleList;
  326. var parkdata = data.data.parkId;
  327. var nowtitle = [];
  328. for (var i = 0; i < alltitle.length; i++) {
  329. for (var j = 0; j < parkdata.length; j++) {
  330. if (alltitle[i].id == parkdata[j]) {
  331. nowtitle.push(alltitle[i]);
  332. }
  333. }
  334. }
  335. that.titleList = nowtitle;
  336. }
  337. });
  338. return dataList;
  339. },
  340. getClassfwhy(name) {
  341. var flag = false;
  342. if (this.currfwhy) {
  343. var currfwhy = this.currfwhy.split(',');
  344. for (var i = 0; i < currfwhy; i++) {
  345. if (currfwhy[i] == name) {
  346. flag = true;
  347. }
  348. }
  349. }
  350. return flag ? 'active' : '';
  351. },
  352. getClassztlx(name) {
  353. var flag = false;
  354. if (this.currztlx) {
  355. var currztlx = this.currztlx.split(',');
  356. for (var i = 0; i < currztlx; i++) {
  357. if (currztlx[i] == name) {
  358. flag = true;
  359. }
  360. }
  361. }
  362. return flag ? 'active' : '';
  363. },
  364. getClassssyq(name) {
  365. var flag = false;
  366. if (this.currssyqtitle) {
  367. var currssyqtitle = this.currssyqtitle.split(',');
  368. for (var i = 0; i < currssyqtitle; i++) {
  369. if (currssyqtitle[i] == name) {
  370. flag = true;
  371. }
  372. }
  373. }
  374. return flag ? 'active' : '';
  375. },
  376. getClasszlqk(name) {
  377. var flag = false;
  378. if (this.currzlqk) {
  379. var currzlqk = this.currzlqk.split(',');
  380. for (var i = 0; i < currzlqk; i++) {
  381. if (currzlqk[i] == name) {
  382. flag = true;
  383. }
  384. }
  385. }
  386. return flag ? 'active' : '';
  387. },
  388. loadMap(points) {
  389. let that = this;
  390. that.parkMap = new BMap.Map("mapcontainer");
  391. that.parkMap.enableScrollWheelZoom();// 启用滚轮缩放
  392. that.parkMap.enableDragging(); // 启用拖拽功能
  393. const addr = new URL(window.location.href);
  394. const id = addr.searchParams.get('id');
  395. // 设定中心点和地图级别
  396. if (id == 1) {
  397. that.parkMap.centerAndZoom(new BMap.Point(106.651444, 29.45682), 14);
  398. } else if (id == 2) {
  399. that.parkMap.centerAndZoom(new BMap.Point(106.76723874457288, 29.573276880811712), 14);
  400. } else if (id == 3) {
  401. that.parkMap.centerAndZoom(new BMap.Point(106.69517131217539, 29.51577313312822), 15);
  402. } else if (id == 4) {
  403. that.parkMap.centerAndZoom(new BMap.Point(106.559829995157, 29.501581648208534), 15);
  404. } else if (id == 5) {
  405. that.parkMap.centerAndZoom(new BMap.Point(106.72194027111843, 29.513690776940248), 16);
  406. } else if (id == 6) {
  407. that.parkMap.centerAndZoom(new BMap.Point(106.70580793222035, 29.514020426917684), 16);
  408. } else {
  409. that.parkMap.centerAndZoom(new BMap.Point(106.651444, 29.48682), 14);
  410. }
  411. that.parkMap.setMapType(BMAP_NORMAL_MAP);
  412. if (!points) return;
  413. let pointList = points.split('@');
  414. let result = [];
  415. pointList.forEach(function (point) {
  416. let arr = point.split(',');
  417. result.push(new BMap.Point(arr[0], arr[1]));
  418. });
  419. // 创建多边形
  420. let polygon = new BMap.Polygon(result, {
  421. strokeColor: "blue",
  422. strokeWeight: 4,
  423. strokeOpacity: 0.5,
  424. strokeStyle: "solid",
  425. fillColor: "#4B98F6",
  426. fillOpacity: 0.3
  427. });
  428. // 将多边形添加到地图中
  429. that.parkMap.addOverlay(polygon);
  430. // pointList.forEach(function (point) {
  431. // let arr = point.split(',');
  432. // let p = new BMap.Point(arr[0], arr[1]);
  433. // let marker = new BMap.Marker(p);
  434. // that.parkMap.addOverlay(marker);
  435. // });
  436. }
  437. },
  438. mounted() {
  439. }
  440. })
  441. </script>
  442. <script type="text/javascript" src="js/rightmap.js"></script>
  443. <script>
  444. var that = this;
  445. document.addEventListener('DOMContentLoaded', function () {
  446. //获取服务类型tab
  447. var tabsContainer = document.getElementById('fwhy');
  448. var fwhyselectedTabs = []; // 用于存储选中的Tab
  449. tabsContainer.addEventListener('click', function (event) {
  450. if (event.target.matches('.list')) {
  451. var tabTarget = event.target.getAttribute('data-tab-target');
  452. if (fwhyselectedTabs.includes(tabTarget) && tabTarget != "不限") {
  453. // 移除已选中的Tab
  454. fwhyselectedTabs = fwhyselectedTabs.filter(function (selectedTab) {
  455. return selectedTab !== tabTarget;
  456. });
  457. event.target.classList.remove('active');
  458. }
  459. else {
  460. // 添加新选中的Tab
  461. fwhyselectedTabs.push(tabTarget);
  462. if (tabTarget != "不限") {
  463. event.target.classList.add('active');
  464. $('#fwhy .fwhybx').removeClass('active');
  465. } else {
  466. $('#fwhy .list').removeClass('active')
  467. event.target.classList.add('active');
  468. fwhyselectedTabs = ['不限']
  469. }
  470. }
  471. // 更新界面以反映当前选中的Tab
  472. // 输出选中的Tab数组
  473. if (fwhyselectedTabs[0] == "不限") {
  474. fwhyselectedTabs = [];
  475. that.nowDiv.currfwhy = '';
  476. } else {
  477. that.nowDiv.currfwhy = fwhyselectedTabs.join(',');
  478. }
  479. }
  480. });
  481. //获取载体类型tab
  482. var tabsContainerztlx = document.getElementById('ztlx');
  483. var ztlxselectedTabs = [];
  484. tabsContainerztlx.addEventListener('click', function (event) {
  485. if (event.target.matches('.list')) {
  486. var tabTarget = event.target.getAttribute('data-tab-target');
  487. if (ztlxselectedTabs.includes(tabTarget) && tabTarget != "不限") {
  488. ztlxselectedTabs = ztlxselectedTabs.filter(function (selectedTab) {
  489. return selectedTab !== tabTarget;
  490. });
  491. event.target.classList.remove('active');
  492. } else {
  493. ztlxselectedTabs.push(tabTarget);
  494. if (tabTarget != "不限") {
  495. event.target.classList.add('active');
  496. $('#ztlx .ztlxbx').removeClass('active');
  497. } else {
  498. $('#ztlx .list').removeClass('active')
  499. event.target.classList.add('active');
  500. ztlxselectedTabs = ['不限']
  501. }
  502. }
  503. if (ztlxselectedTabs[0] == "不限") {
  504. ztlxselectedTabs = [];
  505. that.nowDiv.currztlx = '';
  506. } else {
  507. that.nowDiv.currztlx = ztlxselectedTabs.join(',');
  508. }
  509. }
  510. });
  511. //获取租赁类型tab
  512. var tabsContainerzlqk = document.getElementById('zlqk');
  513. var zlqkselectedTabs = [];
  514. tabsContainerzlqk.addEventListener('click', function (event) {
  515. if (event.target.matches('.list')) {
  516. var tabTarget = event.target.getAttribute('data-tab-target');
  517. if (zlqkselectedTabs.includes(tabTarget) && tabTarget != "不限") {
  518. zlqkselectedTabs = zlqkselectedTabs.filter(function (selectedTab) {
  519. return selectedTab !== tabTarget;
  520. });
  521. event.target.classList.remove('active');
  522. } else {
  523. zlqkselectedTabs.push(tabTarget);
  524. if (tabTarget != "不限") {
  525. event.target.classList.add('active');
  526. $('#zlqk .zlqkbx').removeClass('active');
  527. } else {
  528. $('#zlqk .list').removeClass('active')
  529. event.target.classList.add('active');
  530. zlqkselectedTabs = ['不限']
  531. }
  532. }
  533. if (zlqkselectedTabs[0] == "不限") {
  534. zlqkselectedTabs = [];
  535. that.nowDiv.currzlqk = '';
  536. } else {
  537. that.nowDiv.currzlqk = zlqkselectedTabs.join(',');
  538. }
  539. }
  540. });
  541. //获取所属园区tab
  542. var tabsContainerssyq = document.getElementById('ssyq');
  543. var ssyqselectedTabs = [];
  544. var ssyqtitle = [];
  545. tabsContainerssyq.addEventListener('click', function (event) {
  546. if (event.target.matches('.list')) {
  547. var tabTarget = event.target.getAttribute('data-tab-target');
  548. var titleTarget = event.target.getAttribute('data-title');
  549. if (ssyqselectedTabs.includes(tabTarget) && tabTarget != "不限") {
  550. ssyqselectedTabs = ssyqselectedTabs.filter(function (selectedTab) {
  551. return selectedTab !== tabTarget;
  552. });
  553. event.target.classList.remove('active');
  554. } else {
  555. ssyqselectedTabs.push(tabTarget);
  556. ssyqtitle.push(titleTarget);
  557. if (tabTarget != "不限") {
  558. event.target.classList.add('active');
  559. $('#ssyq .ssyqbx').removeClass('active');
  560. } else {
  561. $('#ssyq .list').removeClass('active')
  562. event.target.classList.add('active');
  563. ssyqselectedTabs = ['不限']
  564. ssyqtitle = ['不限'];
  565. }
  566. }
  567. if (ssyqselectedTabs[0] == "不限") {
  568. ssyqselectedTabs = [];
  569. that.nowDiv.currssyq = '';
  570. that.nowDiv.currssyqtitle = '';
  571. } else {
  572. that.nowDiv.currssyq = ssyqselectedTabs.join(',');
  573. that.nowDiv.currssyqtitle = ssyqtitle.join(',');
  574. }
  575. }
  576. });
  577. });
  578. </script>
  579. </html>