KDYJS.vue 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274
  1. <template>
  2. <div class="kdyjs" v-if="show">
  3. <div class="container">
  4. <div class="top">
  5. <div class="switchContainer">
  6. <div :class="{ 'switchItem': true, active: switchValue }" @click="changeModel">查询开店限制</div>
  7. <div :class="{ 'switchItem': true, active: !switchValue }" @click="changeModel">开店选址</div>
  8. </div>
  9. </div>
  10. <div class="left">
  11. <div :class="content_css">
  12. <el-input v-model="searchHZSKeyWord" placeholder="请输入您想开店的地址" class="input-with-select">
  13. <template #prepend>
  14. <el-button>
  15. <el-icon>
  16. <Search />
  17. </el-icon>
  18. </el-button>
  19. </template>
  20. <template #append>
  21. <el-button @click="searchAddress">搜索</el-button>
  22. </template>
  23. </el-input>
  24. <div class="addressPanel" v-show="addressPanelShow">
  25. <el-scrollbar>
  26. <ul>
  27. <li v-for="(item, index) in searchResultList" :key="index" @click="judgeHandle(item)">
  28. <!-- <div class="name">{{ item.name }}</div> -->
  29. <div class="name" v-if="isMobile">{{ index + 1 }}.&nbsp; &nbsp;{{ item.address }}</div>
  30. <el-tooltip :content="item.address" placement="right-start" :hide-after="5" v-if="!isMobile">
  31. <div class="name">{{ index + 1 }}.&nbsp; &nbsp;{{ item.address }}</div>
  32. </el-tooltip>
  33. </li>
  34. </ul>
  35. </el-scrollbar>
  36. </div>
  37. <!-- v-show="resultPanelShow" -->
  38. <div class="resultPanel1" v-show="resultPanelShow">
  39. <el-scrollbar>
  40. <!-- <div class="JZItem" v-show="!analysisResult['餐饮服务项目']">
  41. <div class="detail">{{ JZText.cy }}</div>
  42. <div class="checkZC" @click="zcIndex = 0; dialogVisible = true">查看相关政策</div>
  43. </div>
  44. <div class="JZItem" v-show="!analysisResult['互联网上网服务营业场所']">
  45. <div class="detail">{{ JZText.hlw }}</div>
  46. <div class="checkZC" @click="zcIndex = 1; dialogVisible = true">查看相关政策</div>
  47. </div>
  48. <div class="JZItem" v-show="!analysisResult['娱乐场所']">
  49. <div class="detail">{{ JZText.ylcs }}</div>
  50. <div class="checkZC" @click="zcIndex = 2; dialogVisible = true">查看相关政策</div>
  51. </div>
  52. <div class="JZItem" v-show="!analysisResult['烟草制品零售点']">
  53. <div class="detail">{{ JZText.yc }}</div>
  54. <div class="checkZC" @click="zcIndex = 3; dialogVisible = true">查看相关政策</div>
  55. </div>
  56. <div class="JZItem" v-show="!analysisResult['噪声污染']">
  57. <div class="detail">{{ JZText.zy }}</div>
  58. <div class="checkZC" @click="zcIndex = 4; dialogVisible = true">查看相关政策</div>
  59. </div> -->
  60. <!-- #FFB400 -->
  61. <div class="JZItem">
  62. <!-- style="color:#00FF00" -->
  63. <div class="detail" style="color:#FFB400">{{ JZText.cy }}</div>
  64. <div class="checkZC" @click="zcIndex = 0; dialogVisible = true">查看相关政策
  65. </div>
  66. </div>
  67. <div class="JZItem">
  68. <div class="detail" v-if="analysisResult['互联网上网服务营业场所']" style="color:#00FF00">{{ allowText.hlw }}</div>
  69. <div class="detail" v-if="!analysisResult['互联网上网服务营业场所']" style="color:#FF0000">{{ JZText.hlw }}</div>
  70. <div class="checkZC" @click="zcIndex = 1; dialogVisible = true">查看相关政策</div>
  71. </div>
  72. <div class="JZItem">
  73. <div class="detail" v-if="analysisResult['娱乐场所']" style="color:#00FF00">{{ allowText.ylcs }}</div>
  74. <div class="detail" v-if="!analysisResult['娱乐场所']" style="color:#FF0000">{{ JZText.ylcs }}</div>
  75. <div class="checkZC" @click="zcIndex = 2; dialogVisible = true">查看相关政策</div>
  76. </div>
  77. <div class="JZItem">
  78. <div class="detail" v-show="analysisResult['烟草制品零售点']" style="color:#00FF00">{{ allowText.yc }}</div>
  79. <div class="detail" v-show="!analysisResult['烟草制品零售点']" style="color:#FF0000">{{ JZText.yc }}</div>
  80. <div class="checkZC" @click="zcIndex = 3; dialogVisible = true">查看相关政策</div>
  81. </div>
  82. <div class="JZItem">
  83. <div class="detail" v-if="analysisResult['噪声污染']" style="color:#00FF00">{{ allowText.zy }}</div>
  84. <div class="detail" v-if="!analysisResult['噪声污染']" style="color:#FF0000">{{ JZText.zy }}</div>
  85. <div class="checkZC" @click="zcIndex = 4; dialogVisible = true">查看相关政策</div>
  86. </div>
  87. </el-scrollbar>
  88. </div>
  89. <div class="resultPanel2" v-show="resultPanelShow">
  90. <div class="title">该地址周边500m内</div>
  91. <div class="resultPanel2content">
  92. <el-scrollbar>
  93. <ul v-if="nearShopResult.length > 0">
  94. <li v-for="(item, index) in nearShopResult" :key="index">
  95. <div class="name" v-if="item.name == '周边市民投诉次数'">{{ item.name }}:{{ item.num }}次</div>
  96. <div class="name" v-else>{{ item.name }}:{{ item.num }}家</div>
  97. </li>
  98. </ul>
  99. <div v-else>暂无周边信息</div>
  100. </el-scrollbar>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. <div style="position: relative;">
  107. <el-drawer
  108. v-model="resultPanelShow_mb"
  109. :title= drawer_title
  110. style="z-index: 9999;color: #fff;
  111. pointer-events: auto;
  112. width: 100%;
  113. height: 400px;
  114. background: #01346f99;
  115. padding: 10px 10px;
  116. box-sizing: border-box;
  117. position: fixed;
  118. overflow: hidden;"
  119. :direction="direction"
  120. :before-close="handleDrawerClose"
  121. :modal="false"
  122. >
  123. <el-tabs
  124. v-model="drawerActiveName"
  125. class="demo-tabs"
  126. @tab-click="handleDrawerClick"
  127. >
  128. <el-tab-pane label="政策" name="1">
  129. <div class="resultPanel1-mb">
  130. <div class="JZItem">
  131. <!-- style="color:#00FF00" -->
  132. <div class="detail" style="color:#FFB400">{{ JZText.cy }}</div>
  133. <div class="checkZC" @click="zcIndex = 0; dialogVisible = true">查看相关政策
  134. </div>
  135. </div>
  136. <div class="JZItem">
  137. <div class="detail" v-if="analysisResult['互联网上网服务营业场所']" style="color:#00FF00">{{ allowText.hlw }}</div>
  138. <div class="detail" v-if="!analysisResult['互联网上网服务营业场所']" style="color:#FF0000">{{ JZText.hlw }}</div>
  139. <div class="checkZC" @click="zcIndex = 1; dialogVisible = true">查看相关政策</div>
  140. </div>
  141. <div class="JZItem">
  142. <div class="detail" v-if="analysisResult['娱乐场所']" style="color:#00FF00">{{ allowText.ylcs }}</div>
  143. <div class="detail" v-if="!analysisResult['娱乐场所']" style="color:#FF0000">{{ JZText.ylcs }}</div>
  144. <div class="checkZC" @click="zcIndex = 2; dialogVisible = true">查看相关政策</div>
  145. </div>
  146. <div class="JZItem">
  147. <div class="detail" v-show="analysisResult['烟草制品零售点']" style="color:#00FF00">{{ allowText.yc }}</div>
  148. <div class="detail" v-show="!analysisResult['烟草制品零售点']" style="color:#FF0000">{{ JZText.yc }}</div>
  149. <div class="checkZC" @click="zcIndex = 3; dialogVisible = true">查看相关政策</div>
  150. </div>
  151. <div class="JZItem">
  152. <div class="detail" v-if="analysisResult['噪声污染']" style="color:#00FF00">{{ allowText.zy }}</div>
  153. <div class="detail" v-if="!analysisResult['噪声污染']" style="color:#FF0000">{{ JZText.zy }}</div>
  154. <div class="checkZC" @click="zcIndex = 4; dialogVisible = true">查看相关政策</div>
  155. </div>
  156. </div>
  157. </el-tab-pane>
  158. <el-tab-pane label="周边500m内" name="2">
  159. <div class="resultPanel2-mb">
  160. <div class="resultPanel2content">
  161. <ul v-if="nearShopResult.length > 0">
  162. <li v-for="(item, index) in nearShopResult" :key="index">
  163. <div class="name" v-if="item.name == '周边市民投诉次数'">{{ item.name }}:{{ item.num }}次</div>
  164. <div class="name" v-else>{{ item.name }}:{{ item.num }}家</div>
  165. </li>
  166. </ul>
  167. <div v-else>暂无周边信息</div>
  168. </div>
  169. </div>
  170. </el-tab-pane>
  171. </el-tabs>
  172. </el-drawer>
  173. </div>
  174. <div class="kdyjs-overlay" v-if="dialogVisible">
  175. <div :class="isMobile == true ? 'kdyjs-dialog-mb' : 'kdyjs-dialog'">
  176. <div class="kdyjs-header">
  177. <div class="close" @click="handleClose">×</div>
  178. </div>
  179. <div class="kdyjs-body">
  180. {{ zcText[zcIndex] }}
  181. </div>
  182. </div>
  183. </div>
  184. </div>
  185. </template>
  186. <script>
  187. import { toRaw } from "vue";
  188. import { ElMessage } from 'element-plus';
  189. import UTIL from '@/utils/util'
  190. export default {
  191. props:{
  192. message: {
  193. type: Object
  194. }
  195. },
  196. // 监听 ref
  197. watch: {
  198. // 监听 message 属性
  199. message(newVal) {
  200. this.drawer_title = newVal.properties['店铺名称'];
  201. }
  202. },
  203. data() {
  204. return {
  205. show: false,
  206. dialogVisible: false,
  207. mapData: {},
  208. switchValue: true,
  209. searchHZSKeyWord: "",
  210. searchResultList: [],
  211. isMobile:false,
  212. content_css:'content-mb',
  213. drawer: true,
  214. direction:'btt',
  215. drawer_title: '',
  216. resultPanelShow_mb: false,
  217. drawerActiveName: '1',
  218. addressPanelShow: false,
  219. resultPanelShow: false,
  220. mapPoints: [],
  221. nearShopResult: [],
  222. // http://121.43.55.7:8889/geoserver/kdyjs/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=kdyjs%3AScientificResearch_buffer&outputFormat=application%2Fjson&CQL_FILTER=contains(the_geom%2Cpoint(121.13540649414062%2031.1539363861084))
  223. // http://121.43.55.7:8889/geoserver/kdyjs/wfs?service=WFS&version=1.0.0&request=GetFeature&typeName=kdyjs%3AScientificResearch_buffer&outputFormat=application%2Fjson&CQL_FILTER=contains(the_geom%2Cpoint(11.13540649414062%201.1539363861084))
  224. allowText: {
  225. cy: webConfig.allowText.cy,
  226. hlw: webConfig.allowText.hlw,
  227. ylcs: webConfig.allowText.ylcs,
  228. yc: webConfig.allowText.yc,
  229. zy: webConfig.allowText.zy,
  230. },
  231. JZText: {
  232. cy: webConfig.JZText.cy,
  233. hlw: webConfig.JZText.hlw,
  234. ylcs: webConfig.JZText.ylcs,
  235. yc: webConfig.JZText.yc,
  236. zy: webConfig.JZText.zy,
  237. },
  238. condition: {
  239. "餐饮服务项目": [], // 仅接口
  240. "互联网上网服务营业场所": [3], // 接口+图层
  241. "娱乐场所": [1, 3, 4, 5, 7, 8],// 接口+图层
  242. "烟草制品零售点": [3],// 仅图层
  243. "噪声污染": [1, 2, 3, 4, 5, 6],// 仅图层
  244. },
  245. // searchWFSLayerRoot: "http://121.43.55.7:8889/geoserver/kdyjs/wfs",
  246. searchWFSLayerRoot: webConfig.GEOSERVER_URL_WFS,
  247. searchWFSLayer: {
  248. 1: {
  249. name: "院落面",
  250. layers: "kdyjs:CourtyardFace"
  251. },
  252. 2: {
  253. name: "公园",
  254. layers: "kdyjs:park"
  255. },
  256. 3: {
  257. name: "学校-缓冲区",
  258. layers: "kdyjs:school_buffer"
  259. },
  260. 4: {
  261. name: "医疗-缓冲区",
  262. layers: "kdyjs:medical_buffer"
  263. },
  264. 5: {
  265. name: "机关单位-缓冲区",
  266. layers: "kdyjs:GovernmentUnit_buffer"
  267. },
  268. 6: {
  269. name: "科研单位-缓冲区",
  270. layers: "kdyjs:ScientificResearch_buffer"
  271. },
  272. 7: {
  273. name: "机场车站",
  274. layers: "kdyjs:AirportStation"
  275. },
  276. 8: {
  277. name: "文保单位-缓冲区",
  278. layers: "kdyjs:BunpArchitecture_buffer"
  279. }
  280. },
  281. analysisResult: {
  282. "餐饮服务项目": false,
  283. "互联网上网服务营业场所": false,
  284. "娱乐场所": false,
  285. "烟草制品零售点": false,
  286. "噪声污染": false
  287. },
  288. zcIndex: 0,
  289. zcText: [
  290. "根据《中华人民共和国大气污染防治法》规定,禁止在居民住宅楼、未配套设立专用烟道的商住综合楼以及商住综合楼内与居住层相邻的商业楼层内新建、改建、扩建产生油烟、异味、废气的餐饮服务项目。",
  291. "根据《互联网上网服务营业场所管理条例》规定中学、小学校园周围 200米范围内和居民楼住宅楼(院)内不得设立互联网上网服务营业场所。",
  292. "根据《娱乐场所管理办法》规定,娱乐场所不得设在下列地点:居民楼、博物馆、图书馆和被核定为文物保护单位的建筑物内,居民住宅区和学校、医院、机关周围,车站、机场等人群密集的场所,建筑物地下一层以下,与危险化学品仓库毗连的区域。",
  293. "根据《上海市烟草制品零售点合理布局规定》有下列情形之一的,不予设置烟草制品零售点:(一)无固定经营场所的;(二)经营场所与住所不相独立的;(三)一个经营场所内已经办理了烟草专卖零售许可证的;(四)利用自动售货机(柜)经营烟草制品的;(五)利用信息网络经营烟草制品的;(六)经营场所位于中小学、幼儿园师生出入口依法可步行最短距离50米范围内的;(七)经营场所基于安全因素等不适宜经营卷烟的。",
  294. "根据《上海市社会生活噪声污染防治办法》规定不得在噪声敏感建筑物集中区域(居民住宅周边、公园内外医疗区附近、写字楼办公区、文教科研区和以机关办公点为主的区域)内从事金属切割、石材和木材加工等易产生噪声污染的商业经营活动。",
  295. ]
  296. };
  297. },
  298. mounted() {
  299. let that = this;
  300. that.isMobile = UTIL.terminalType()
  301. document.onkeydown = function (event) {
  302. let keycode = event.keyCode;
  303. if (keycode == 13) {
  304. that.searchAddress();
  305. }
  306. };
  307. },
  308. methods: {
  309. open() {
  310. this.show = true;
  311. this.judgeLoadedMap();
  312. },
  313. close() {
  314. this.show = false;
  315. this.reset();
  316. },
  317. reset() {
  318. },
  319. judgeLoadedMap() {
  320. let that = this;
  321. // returnMapLoadStatus在Map组件中定义
  322. if (!returnMapLoadStatus()) {
  323. setTimeout(() => {
  324. that.judgeLoadedMap();
  325. }, 100);
  326. } else {
  327. registerModule("kdyjsyzt");
  328. }
  329. },
  330. handleDrawerClick(param){
  331. debugger
  332. console.log('[ ] >', param)
  333. this.drawerActiveName=param;
  334. },
  335. handleClose() {
  336. this.dialogVisible = false;
  337. },
  338. searchAddress() {
  339. let that = this;
  340. if (this.searchHZSKeyWord != "") {
  341. $.ajax({
  342. type: "post",
  343. dataType: 'json',
  344. url: webConfig.PROXY_URL + "/proxy/searchByNameV3",
  345. data: {
  346. address: toRaw(this.searchHZSKeyWord)
  347. },
  348. success: function (result) {
  349. that.clearPoints();
  350. that.nearShopResult = []
  351. if (result.code == 200) {
  352. that.addressPanelShow = true;
  353. that.resultPanelShow_mb = false;
  354. that.resultPanelShow = false;
  355. let obj = {}
  356. result.content.pois.map(function (item) {
  357. if (obj[item.address] == undefined) {
  358. obj[item.address] = item
  359. }
  360. })
  361. that.searchResultList = Object.values(obj).slice(0, 10)
  362. // 地图加点
  363. that.addPoints();
  364. } else {
  365. that.addressPanelShow = true;
  366. that.resultPanelShow_mb = false;
  367. that.resultPanelShow = false;
  368. ElMessage({
  369. message: '未查到该地址或地址输入不准确!',
  370. type: 'warning',
  371. offset: 100
  372. })
  373. }
  374. },
  375. error: function (error) {
  376. that.clearPoints();
  377. that.nearShopResult = []
  378. // 提示未查到或地址输入不准确
  379. ElMessage({
  380. message: '未查到该地址或地址输入不准确!',
  381. type: 'warning',
  382. offset: 100
  383. })
  384. // console.log(error)
  385. }
  386. });
  387. } else {
  388. this.clearPoints();
  389. this.nearShopResult = []
  390. this.addressPanelShow = false;
  391. this.resultPanelShow = false;
  392. this.resultPanelShow_mb = false;
  393. }
  394. },
  395. // 添加地图点
  396. addPoints() {
  397. this.mapPoints = this.searchResultList.map(function (item, index) {
  398. return viewer.entities.add({
  399. position: SkyScenery.Cartesian3.fromDegrees(item.lon, item.lat),
  400. billboard: {
  401. image: "./static/image/point" + (index + 1) + ".png",
  402. width: 48, // default: undefined
  403. height: 48, // default: undefined
  404. scale: 1.0, // default: 1.0
  405. show: true, // default
  406. horizontalOrigin: SkyScenery.HorizontalOrigin.CENTER, // default
  407. verticalOrigin: SkyScenery.VerticalOrigin.BOTTOM, // default: CENTER
  408. },
  409. // label: {
  410. // text: (index + 1) + '', // 标签文本
  411. // font: '18px', // 字体样式
  412. // style: SkyScenery.LabelStyle.FILL_AND_OUTLINE, // 标签样式
  413. // outlineColor: SkyScenery.Color.BLACK, // 轮廓颜色
  414. // outlineWidth: 1, // 轮廓宽度
  415. // // showBackground: true, // 是否显示背景
  416. // backgroundColor: new SkyScenery.Color(0.165, 0.165, 0.165, 0), // 背景颜色及透明度
  417. // pixelOffset: new SkyScenery.Cartesian2(0, -30), // 标签相对于位置的偏移量
  418. // eyeOffset: new SkyScenery.Cartesian3(0.0, 0, -1.0)
  419. // }
  420. });
  421. })
  422. },
  423. // 清除地图点
  424. clearPoints() {
  425. this.mapPoints.map(function (eitity) {
  426. viewer.entities.remove(eitity)
  427. })
  428. this.mapPoints = []
  429. },
  430. // 点位触发监管调理展示 用在homeview.vue中
  431. clickPointJGTL(item) {
  432. this.searchHZSKeyWord = ""
  433. this.searchAddress();// 为清空地名地址而执行
  434. this.judgeHandle(item)
  435. },
  436. judgeHandle(item) {
  437. let that = this;
  438. item = toRaw(item);
  439. viewer.camera.flyTo({
  440. destination: SkyScenery.Cartesian3.fromDegrees(
  441. item.lon,
  442. item.lat,
  443. 1200
  444. ), // 设置位置
  445. orientation: {
  446. heading: SkyScenery.Math.toRadians(0), // 方向
  447. pitch: SkyScenery.Math.toRadians(-90), // 倾斜角度
  448. roll: SkyScenery.Math.toRadians(0) // 倾斜角度
  449. }
  450. });
  451. // 餐饮服务项目
  452. // 互联网上网服务营业场所
  453. // 学校-缓冲区
  454. // 娱乐场所
  455. // 院落面 机场车站
  456. // 学校-缓冲区 医疗-缓冲区 机关单位-缓冲区 文保单位-缓冲区
  457. // 烟草制品零售点
  458. // 学校-缓冲区
  459. // 噪声污染
  460. // 院落面 公园
  461. // 学校-缓冲区 医疗-缓冲区 科研单位-缓冲区 机关单位-缓冲区
  462. // filter = "contains(the_geom,point(" + item.lon + "," + item.lat + "))"
  463. // 接口部分仅判断 0 1 2 项
  464. this.searchHZSKeyWord = item.address
  465. this.drawer_title = item.address
  466. let interfaceUrl = webConfig.KDYJS_URL + "/kdyjs/shop/bannedThings?address=" + item.address + "&lon=" + item.lon + "&lat=" + item.lat + "&distance=200"
  467. let interfacePro = fetch(interfaceUrl).then(response => response.json())
  468. let arr = this.judgeWMSLayer(item)
  469. arr.push(interfacePro);
  470. let listKeysArr = Object.keys(toRaw(this.searchWFSLayer));
  471. let wmsReObj = {}
  472. Promise.all(arr).then(responses => {
  473. // index 0 1 2 3 4 5 6 7
  474. // num 1 2 3 4 5 6 7 8
  475. listKeysArr.map(function (num, index) {
  476. wmsReObj[num] = that.returnWMSTF(responses[index])
  477. })
  478. // {
  479. // "code": 200,
  480. // "message": "成功查找禁止事项;已查找临近商铺;",
  481. // "content": {
  482. // "nearShops": {
  483. // "日用百货": [
  484. // {
  485. // "address": "浦仓路431号一层三层",
  486. // "daolu": "浦仓路",
  487. // "distance": 5.3541856061937,
  488. // "fuzeren": "汪天明",
  489. // "juwei": "汪天明",
  490. // "lat": 31.151888159569506,
  491. // "lon": 121.11629585158316,
  492. // "name": "古峰茶业",
  493. // "note": "",
  494. // "phone": "1.3501728776E10",
  495. // "resultAddress": "浦仓路431号",
  496. // "select": "日用百货"
  497. // }
  498. // ],
  499. // "棋牌室": [
  500. // {
  501. // "address": "浦仓路431号二层",
  502. // "daolu": "浦仓路",
  503. // "distance": 17.861235684391577,
  504. // "fuzeren": "凌致健",
  505. // "juwei": "凌致健",
  506. // "lat": 31.152094038499538,
  507. // "lon": 121.11628182127089,
  508. // "name": "茶馆",
  509. // "note": "",
  510. // "phone": "1.5000227E10",
  511. // "resultAddress": "浦仓路433号1104室",
  512. // "select": "棋牌室"
  513. // }
  514. // ],
  515. // "超市": [
  516. // {
  517. // "address": "浦仓路427号底层",
  518. // "daolu": "浦仓路",
  519. // "distance": 0.0,
  520. // "fuzeren": "周克香",
  521. // "juwei": "周克香",
  522. // "lat": 31.15193514579631,
  523. // "lon": 121.11630785830405,
  524. // "name": "来伊份",
  525. // "note": "",
  526. // "phone": "1.8901780259E10",
  527. // "resultAddress": "浦仓路427号",
  528. // "select": "超市"
  529. // }
  530. // ],
  531. // "餐饮": [
  532. // {
  533. // "address": "浦仓路433号",
  534. // "daolu": "浦仓路",
  535. // "distance": 17.861235684391577,
  536. // "fuzeren": "苏昌佃",
  537. // "juwei": "苏昌佃",
  538. // "lat": 31.152094038499538,
  539. // "lon": 121.11628182127089,
  540. // "name": "沙县小吃",
  541. // "note": "",
  542. // "phone": "1.7705985514E10",
  543. // "resultAddress": "浦仓路433号1104室",
  544. // "select": "餐饮"
  545. // },
  546. // {
  547. // "address": "浦仓路421弄18号三层",
  548. // "daolu": "浦仓路",
  549. // "distance": 6.932930592886758,
  550. // "fuzeren": "钟瑞成",
  551. // "juwei": "钟瑞成",
  552. // "lat": 31.151883136689268,
  553. // "lon": 121.1162678269042,
  554. // "name": "肋排屋",
  555. // "note": "",
  556. // "phone": "1.7750396739E10",
  557. // "resultAddress": "浦仓路421弄10-14号",
  558. // "select": "餐饮"
  559. // },
  560. // {
  561. // "address": "浦仓路421弄22号二层",
  562. // "daolu": "浦仓路",
  563. // "distance": 6.932930592886758,
  564. // "fuzeren": "冯善飞",
  565. // "juwei": "冯善飞",
  566. // "lat": 31.151883136689268,
  567. // "lon": 121.1162678269042,
  568. // "name": "两王一炸",
  569. // "note": "",
  570. // "phone": "1.500063716E10",
  571. // "resultAddress": "浦仓路421弄10-14号",
  572. // "select": "餐饮"
  573. // }
  574. // ]
  575. // },
  576. // "foundPlace": {
  577. // "address": "浦仓路771号",
  578. // "banned": "0,2",
  579. // "latitude": 31.155799865722656,
  580. // "longitude": 121.12115478515625
  581. // },
  582. // "bannedThings": [
  583. // "RESTAURANT",
  584. // "RECREATION_SITE"
  585. // ]
  586. // }
  587. // }
  588. let interfaceResult = responses[responses.length - 1];
  589. // that.analysisResult["餐饮服务项目"]
  590. // that.analysisResult["互联网上网服务营业场所"]
  591. // that.analysisResult["娱乐场所"]
  592. // that.analysisResult["烟草制品零售点"]
  593. // that.analysisResult["噪声污染"]
  594. if (interfaceResult.content.foundPlace != undefined) {
  595. let arr = interfaceResult.content.foundPlace.banned.split(",").map(num => Number(num))
  596. // 餐饮
  597. if (arr.indexOf(0) > -1) that.analysisResult["餐饮服务项目"] = false;
  598. // 互联网
  599. if (arr.indexOf(1) > -1) {
  600. that.analysisResult["互联网上网服务营业场所"] = false
  601. } else {
  602. if (wmsReObj[3]) {
  603. that.analysisResult["互联网上网服务营业场所"] = false
  604. } else {
  605. that.analysisResult["互联网上网服务营业场所"] = true
  606. }
  607. }
  608. // 娱乐
  609. if (arr.indexOf(2) > -1) {
  610. that.analysisResult["娱乐场所"] = false;
  611. } else {
  612. if (wmsReObj[1] || wmsReObj[3] || wmsReObj[4] || wmsReObj[5] || wmsReObj[7] || wmsReObj[8]) {
  613. that.analysisResult["娱乐场所"] = false
  614. } else {
  615. that.analysisResult["娱乐场所"] = true
  616. }
  617. }
  618. } else {
  619. // 餐饮
  620. that.analysisResult["餐饮服务项目"] = true;
  621. // 互联网
  622. if (wmsReObj[3]) {
  623. that.analysisResult["互联网上网服务营业场所"] = false
  624. } else {
  625. that.analysisResult["互联网上网服务营业场所"] = true
  626. }
  627. // 娱乐
  628. if (wmsReObj[1] || wmsReObj[3] || wmsReObj[4] || wmsReObj[5] || wmsReObj[7] || wmsReObj[8]) {
  629. that.analysisResult["娱乐场所"] = false
  630. } else {
  631. that.analysisResult["娱乐场所"] = true
  632. }
  633. }
  634. // 烟草
  635. if (wmsReObj[3]) {
  636. that.analysisResult["烟草制品零售点"] = false
  637. } else {
  638. that.analysisResult["烟草制品零售点"] = true
  639. }
  640. // 噪声
  641. if (wmsReObj[1] || wmsReObj[2] || wmsReObj[3] || wmsReObj[4] || wmsReObj[5] || wmsReObj[6]) {
  642. that.analysisResult["娱乐场所"] = false
  643. } else {
  644. that.analysisResult["娱乐场所"] = true
  645. }
  646. // 周边商铺
  647. let arr1 = Object.keys(interfaceResult.content.nearShops);
  648. let nearShopResult = arr1.map(function (field, index) {
  649. return {
  650. name: field,
  651. num: interfaceResult.content.nearShops[field].length
  652. }
  653. })
  654. if (interfaceResult.content.report) {
  655. nearShopResult.unshift({
  656. name: "周边市民投诉次数",
  657. num: interfaceResult.content.report
  658. })
  659. } else {
  660. nearShopResult.unshift({
  661. name: "周边市民投诉次数",
  662. num: 0
  663. })
  664. }
  665. that.nearShopResult = nearShopResult
  666. if(that.isMobile){
  667. that.addressPanelShow = false
  668. if(that.resultPanelShow_mb != true){
  669. that.resultPanelShow_mb = true;
  670. }
  671. }else{
  672. that.resultPanelShow = true
  673. }
  674. }).catch(error => console.log("error", error));
  675. },
  676. returnWMSTF(result) {
  677. if (result.features.length == 0) {
  678. return false; // 无交集
  679. } else {
  680. return true // 有交集
  681. }
  682. },
  683. judgeWMSLayer(item) {
  684. let that = this;
  685. let listValuesArr = Object.values(toRaw(this.searchWFSLayer));
  686. return listValuesArr.map(function (values) {
  687. let endUrl = that.searchWFSLayerRoot + "?typeName=" + values.layers + "&service=WFS&version=1.0.0&request=GetFeature&outputFormat=application/json"
  688. endUrl = endUrl + "&CQL_FILTER=" + encodeURI("contains(the_geom,point(" + item.lon + " " + item.lat + "))");
  689. return fetch(endUrl).then(response => response.json())
  690. })
  691. },
  692. changeModel(type) {
  693. let judge = toRaw(this.switchValue);
  694. if (type != "init") this.switchValue = !judge
  695. if (this.switchValue) {
  696. // 文旅资源
  697. console.log("文旅资源")
  698. } else {
  699. // 旅游路线
  700. console.log("旅游路线")
  701. }
  702. },
  703. handleDrawerClose(){
  704. console.log('[ eeee ] >')
  705. let that = this;
  706. that.resultPanelShow = false
  707. that.resultPanelShow_mb = false;
  708. }
  709. }
  710. };
  711. </script>
  712. <style lang="less" scoped>
  713. /deep/ .el-drawer__header{
  714. color: #fff;
  715. margin: 0;
  716. padding: 0;
  717. }
  718. /deep/ .el-tabs__item{
  719. color: #ffffff;
  720. }
  721. /deep/ .el-tabs__content{
  722. flex-grow: 1;
  723. overflow: auto;
  724. position: relative;
  725. height: 160px;
  726. }
  727. /deep/ .el-drawer__body{
  728. flex: 1;
  729. padding: 0;
  730. overflow: hidden;
  731. }
  732. /deep/ .el-drawer__title{
  733. text-align: center;
  734. font-weight: bold;
  735. }
  736. .kdyjs {
  737. position: absolute;
  738. top: 0px;
  739. left: 0px;
  740. width: 100%;
  741. height: 100%;
  742. pointer-events: none;
  743. z-index: 9;
  744. .container {
  745. width: 100%;
  746. height: 100%;
  747. pointer-events: none;
  748. position: relative;
  749. .top {
  750. display: none;
  751. width: 240px;
  752. position: absolute;
  753. top: 90px;
  754. left: calc(50% - 120px);
  755. color: #ffffff;
  756. text-align: center;
  757. pointer-events: auto;
  758. .switchContainer {
  759. background: #082e67;
  760. border-radius: 20px;
  761. height: 40px;
  762. line-height: 40px;
  763. overflow: hidden;
  764. .switchItem {
  765. width: 120px;
  766. font-size: 16px;
  767. text-align: center;
  768. display: inline-block;
  769. cursor: pointer;
  770. user-select: none;
  771. &.active {
  772. background: #0b4daf;
  773. }
  774. }
  775. }
  776. }
  777. .left {
  778. pointer-events: none;
  779. position: absolute;
  780. top: 0px;
  781. left: 0px;
  782. width: 480px;
  783. height: 100%;
  784. padding: 0px 40px 20px 0px;
  785. margin-top: 68px;
  786. box-sizing: border-box;
  787. .content {
  788. pointer-events: none;
  789. width: 100%;
  790. height: 100%;
  791. position: relative;
  792. padding-left: 30px;
  793. padding-top: 20px;
  794. box-sizing: border-box;
  795. color: #ffffff;
  796. .el-input {
  797. pointer-events: auto;
  798. border: 2px solid #01346f99;
  799. border-radius: 5px;
  800. }
  801. .addressPanel {
  802. pointer-events: auto;
  803. margin-top: 10px;
  804. width: 100%;
  805. height: 200px;
  806. background: #01346f99;
  807. padding: 10px 10px;
  808. box-sizing: border-box;
  809. overflow: hidden;
  810. overflow-y: auto;
  811. ul {
  812. margin: 0 0;
  813. padding: 0 0;
  814. li {
  815. list-style: none;
  816. cursor: pointer;
  817. border-bottom: 1px solid #eeeeee;
  818. padding-bottom: 10px;
  819. margin-bottom: 10px;
  820. .name {
  821. font-size: 18px;
  822. width: 100%;
  823. overflow: hidden;
  824. text-overflow: ellipsis;
  825. white-space: nowrap;
  826. }
  827. .address {
  828. font-size: 14px;
  829. }
  830. }
  831. }
  832. }
  833. .resultPanel1 {
  834. pointer-events: auto;
  835. margin-top: 10px;
  836. width: 100%;
  837. height: 220px;
  838. background: #01346f99;
  839. padding: 10px 10px;
  840. padding-right: 0px;
  841. box-sizing: border-box;
  842. .JZItem {
  843. width: 100%;
  844. margin-bottom: 15px;
  845. cursor: pointer;
  846. position: relative;
  847. padding-right: 10px;
  848. box-sizing: border-box;
  849. .detail {
  850. width: calc(100% - 110px);
  851. min-height: 36px;
  852. // text-shadow: 0.5px 0.5px 2px #ffffff;
  853. }
  854. .checkZC {
  855. position: absolute;
  856. top: 0px;
  857. right: 10px;
  858. border: 1px solid #ffffff;
  859. padding: 0px 5px;
  860. border-radius: 5px;
  861. font-size: 16px;
  862. &:hover {
  863. background: #01346f99;
  864. }
  865. }
  866. }
  867. }
  868. .resultPanel2 {
  869. pointer-events: auto;
  870. margin-top: 10px;
  871. width: 100%;
  872. height: 260px;
  873. background: #01346f99;
  874. padding: 10px 10px;
  875. box-sizing: border-box;
  876. .title {
  877. height: 24px;
  878. line-height: 24px;
  879. font-size: 20px;
  880. margin-bottom: 20px;
  881. }
  882. .resultPanel2content {
  883. height: 200px;
  884. overflow: hidden;
  885. overflow-y: auto;
  886. ul {
  887. margin: 0 0;
  888. padding: 0 0;
  889. li {
  890. list-style: none;
  891. cursor: pointer;
  892. border-bottom: 1px solid #eeeeee;
  893. padding-bottom: 10px;
  894. margin-bottom: 10px;
  895. .name {
  896. font-size: 16px;
  897. }
  898. }
  899. }
  900. }
  901. }
  902. }
  903. }
  904. }
  905. .resultPanel1-mb {
  906. pointer-events: auto;
  907. margin-top: 10px;
  908. width: 100%;
  909. padding: 5px;
  910. padding-right: 0px;
  911. box-sizing: border-box;
  912. overflow-y: auto;
  913. .JZItem {
  914. width: 100%;
  915. margin-bottom: 15px;
  916. cursor: pointer;
  917. position: relative;
  918. padding-right: 10px;
  919. box-sizing: border-box;
  920. .detail {
  921. width: calc(100% - 110px);
  922. min-height: 36px;
  923. // text-shadow: 0.5px 0.5px 2px #ffffff;
  924. }
  925. .checkZC {
  926. position: absolute;
  927. top: 0px;
  928. right: 10px;
  929. border: 1px solid #ffffff;
  930. padding: 0px 5px;
  931. border-radius: 5px;
  932. font-size: 16px;
  933. &:hover {
  934. background: #01346f99;
  935. }
  936. }
  937. }
  938. }
  939. .resultPanel2-mb {
  940. pointer-events: auto;
  941. width: 100%;
  942. padding: 5px;
  943. box-sizing: border-box;
  944. overflow-y: auto;
  945. .title {
  946. height: 24px;
  947. line-height: 24px;
  948. font-size: 20px;
  949. margin-bottom: 20px;
  950. }
  951. .resultPanel2content {
  952. height: 200px;
  953. overflow: hidden;
  954. overflow-y: auto;
  955. ul {
  956. margin: 0 0;
  957. padding: 0 0;
  958. li {
  959. list-style: none;
  960. cursor: pointer;
  961. border-bottom: 1px solid #ebebeb2e;
  962. padding-bottom: 10px;
  963. margin-bottom: 10px;
  964. .name {
  965. font-size: 16px;
  966. }
  967. }
  968. }
  969. }
  970. }
  971. .content-mb {
  972. pointer-events: none;
  973. width: 100%;
  974. // height: 100%;
  975. position: relative;
  976. padding-left: 10px;
  977. padding-right: 60px;
  978. padding-top: 20px;
  979. box-sizing: border-box;
  980. color: #ffffff;
  981. .el-input {
  982. pointer-events: auto;
  983. border: 2px solid #01346f99;
  984. border-radius: 5px;
  985. }
  986. .addressPanel {
  987. pointer-events: auto;
  988. margin-top: 10px;
  989. width: 100%;
  990. height: 200px;
  991. background: #01346f99;
  992. padding: 10px 10px;
  993. box-sizing: border-box;
  994. overflow: hidden;
  995. overflow-y: auto;
  996. ul {
  997. margin: 0 0;
  998. padding: 0 0;
  999. li {
  1000. list-style: none;
  1001. cursor: pointer;
  1002. border-bottom: 1px solid #eeeeee;
  1003. padding-bottom: 10px;
  1004. margin-bottom: 10px;
  1005. .name {
  1006. font-size: 18px;
  1007. width: 100%;
  1008. overflow: hidden;
  1009. text-overflow: ellipsis;
  1010. white-space: nowrap;
  1011. }
  1012. .address {
  1013. font-size: 14px;
  1014. }
  1015. }
  1016. }
  1017. }
  1018. .resultPanel1 {
  1019. pointer-events: auto;
  1020. margin-top: 10px;
  1021. width: 100%;
  1022. height: 220px;
  1023. background: #01346f99;
  1024. padding: 10px 10px;
  1025. padding-right: 0px;
  1026. box-sizing: border-box;
  1027. .JZItem {
  1028. width: 100%;
  1029. margin-bottom: 15px;
  1030. cursor: pointer;
  1031. position: relative;
  1032. padding-right: 10px;
  1033. box-sizing: border-box;
  1034. .detail {
  1035. width: calc(100% - 110px);
  1036. min-height: 36px;
  1037. // text-shadow: 0.5px 0.5px 2px #ffffff;
  1038. }
  1039. .checkZC {
  1040. position: absolute;
  1041. top: 0px;
  1042. right: 10px;
  1043. border: 1px solid #ffffff;
  1044. padding: 0px 5px;
  1045. border-radius: 5px;
  1046. font-size: 16px;
  1047. &:hover {
  1048. background: #01346f99;
  1049. }
  1050. }
  1051. }
  1052. }
  1053. .resultPanel2 {
  1054. pointer-events: auto;
  1055. margin-top: 10px;
  1056. width: 100%;
  1057. height: 260px;
  1058. background: #01346f99;
  1059. padding: 10px 10px;
  1060. box-sizing: border-box;
  1061. .title {
  1062. height: 24px;
  1063. line-height: 24px;
  1064. font-size: 20px;
  1065. margin-bottom: 20px;
  1066. }
  1067. .resultPanel2content {
  1068. height: 200px;
  1069. overflow: hidden;
  1070. overflow-y: auto;
  1071. ul {
  1072. margin: 0 0;
  1073. padding: 0 0;
  1074. li {
  1075. list-style: none;
  1076. cursor: pointer;
  1077. border-bottom: 1px solid #eeeeee;
  1078. padding-bottom: 10px;
  1079. margin-bottom: 10px;
  1080. .name {
  1081. font-size: 16px;
  1082. }
  1083. }
  1084. }
  1085. }
  1086. }
  1087. }
  1088. .kdyjs-overlay {
  1089. pointer-events: auto;
  1090. width: 100%;
  1091. height: 100%;
  1092. position: absolute;
  1093. top: 0px;
  1094. left: 0px;
  1095. z-index: 6;
  1096. background: #00000080;
  1097. user-select: none;
  1098. .kdyjs-dialog {
  1099. position: relative;
  1100. top: calc(50% - 222px);
  1101. left: calc(50% - 211px);
  1102. width: 422px;
  1103. height: 444px;
  1104. background: url(~@/assets/images/u133.png) no-repeat center center/100% 100%;
  1105. overflow: hidden;
  1106. .kdyjs-header {
  1107. width: 100%;
  1108. height: 60px;
  1109. line-height: 40px;
  1110. color: #ffffff;
  1111. text-align: center;
  1112. font-size: 20px;
  1113. font-weight: bold;
  1114. .close {
  1115. position: absolute;
  1116. top: 0px;
  1117. right: 0px;
  1118. float: right;
  1119. width: 40px;
  1120. height: 40px;
  1121. line-height: 40px;
  1122. text-align: center;
  1123. color: #00dbff;
  1124. font-weight: bold;
  1125. font-size: 20px;
  1126. cursor: pointer;
  1127. }
  1128. }
  1129. .kdyjs-body {
  1130. width: 100%;
  1131. height: calc(100% - 60px);
  1132. padding: 10px 26px 36px 26px;
  1133. box-sizing: border-box;
  1134. color: #ffffff;
  1135. text-indent: 20px;
  1136. }
  1137. }
  1138. .kdyjs-dialog-mb {
  1139. position: relative;
  1140. top: calc(50% - 222px);
  1141. height: 300px;
  1142. background: url(http://localhost:2118/kdyjs/img/u133.e1a3de44.png) no-repeat center center / 100% 100%;
  1143. overflow: hidden;
  1144. .kdyjs-header {
  1145. width: 100%;
  1146. height: 60px;
  1147. line-height: 40px;
  1148. color: #ffffff;
  1149. text-align: center;
  1150. font-size: 20px;
  1151. font-weight: bold;
  1152. .close {
  1153. position: absolute;
  1154. top: 0px;
  1155. right: 0px;
  1156. float: right;
  1157. width: 40px;
  1158. height: 40px;
  1159. line-height: 40px;
  1160. text-align: center;
  1161. color: #00dbff;
  1162. font-weight: bold;
  1163. font-size: 20px;
  1164. cursor: pointer;
  1165. }
  1166. }
  1167. .kdyjs-body {
  1168. width: 100%;
  1169. height: calc(100% - 60px);
  1170. padding: 10px 26px 36px 26px;
  1171. box-sizing: border-box;
  1172. color: #ffffff;
  1173. text-indent: 20px;
  1174. }
  1175. }
  1176. }
  1177. }
  1178. </style>