public/assets/images/map/solidwaste/gf_green.png | 补丁 | 查看 | 原始文档 | blame | 历史 | |
public/assets/images/map/solidwaste/voc.png | 补丁 | 查看 | 原始文档 | blame | 历史 | |
public/static/WasteWater.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/mapApi.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/mapUrl.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/BaseNav/PublicBounced/PublicBounced.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/LayerController/logic/SolidWaste.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/conf/MapConfig.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
public/assets/images/map/solidwaste/gf_green.pngpublic/assets/images/map/solidwaste/voc.pngpublic/static/WasteWater.json
File was deleted src/api/mapApi.js
@@ -4,11 +4,15 @@ // 测试环境IP:http://10.238.221.113 import axios from '@utils/axios' import * as mapUrl from './mapUrl' /** * 该方法配置 */ export default { getUser (data) { return axios.get(mapUrl.GetUser, data) }, getSolidWaste (data) { return axios.get(mapUrl.getSolidWaste, data) } } src/api/mapUrl.js
@@ -4,3 +4,5 @@ import { $HOST } from './host' export const GetUser = $HOST + '/user/getUser' export const getSolidWaste = $HOST + '/wasteSolid/getSolidWaste' src/components/BaseNav/PublicBounced/PublicBounced.vue
@@ -7,7 +7,8 @@ <div class="public-bounced-content"> <div class="public-bounced-content-left"> <GasTab :displayContent="displayContent"></GasTab> <!-- <PublicTable v-if="value === 'gufei'" :requestSolidWasteData="displayContent.StoragePlaceId"></PublicTable>--> <!-- <PublicTable v-if="value === 'gufei'" :requestSolidWasteData="displayContent.StoragePlaceId"></PublicTable>--> <PublicTable></PublicTable> <!-- <GasECharts v-else></GasECharts>--> </div> <div class="public-bounced-content-right"> @@ -21,7 +22,7 @@ import '@/components/BaseNav/SolidWaste/directive/dir' import GasTab from '@components/BaseNav/PublicBounced/GasComponents/GasTab' // import PublicTable from '@components/BaseNav/PublicBounced/GasComponents/PublicTable' import PublicTable from '@components/BaseNav/PublicBounced/GasComponents/PublicTable' // import GasECharts from '@components/BaseNav/PublicBounced/GasComponents/GasECharts' import GasVideo from '@components/BaseNav/PublicBounced/GasComponents/GasVideo' @@ -29,7 +30,7 @@ name: 'PublicBounced', components: { GasTab, // PublicTable, PublicTable, // GasECharts, GasVideo }, src/components/LayerController/logic/SolidWaste.js
@@ -1,37 +1,46 @@ /** * 固废 */ // 区分不同类型 使用不同img const defaultImg = '/assets/images/map/solidwaste/voc.png' const setting = '/assets/images/map/solidwaste/gf_green.png' const mapApi = require('../../../api/mapApi').default const AnimalService = require('../service/AnimalService').default const AjaxUtils = require('../../../utils/AjaxUtils').default module.exports = function () { /** * 返回marker对象数组 * @param L leaflet对象 */ this.init = (layer, L) => { this.init = async (layer, L) => { // const SolidWasteIcon = this.SolidWasteIcon() this.animalService = new AnimalService({ L: L, layer: layer, LayerPopup: null layer: layer }) // AjaxUtils.get4JsonDataByUrl('http://10.246.162.140:8080/EPInterface/DataService/EPMapService.asmx/QueryStoragePlaceListByCompanyAndName', { // AjaxUtils.get4JsonDataByUrl('http://xearth.cn:3000/wasteSolid/getSolidWaste', { AjaxUtils.get4JsonDataByUrl('http://localhost:8888/static/SolidWaste.json', { companyId: 3900100145, userCode: 'wenchun.deng', name: '', marginWarr: '', longDayWarr: '' }, function (res) { const data = res.data.Result.DataInfo for (let i = 0; i < data.length; i++) { // 经纬度 位置 const positionX = data[i].Latitude const positionY = data[i].Longitude layer.addLayer(L.marker([positionX, positionY], {})) } }) const res = await mapApi.getSolidWaste() // console.log(res) const data = res.Result.DataInfo || {} for (let i = 0; i < data.length; i++) { // 经纬度 位置 const positionX = data[i].Latitude const positionY = data[i].Longitude // 定义类型 用来区分数据的不同 const judgeValue = data[i].StorageQty var iconUrl = this.differentTypes(judgeValue) const marker = L.marker.magic([positionX, positionY], { icon: L.icon({ iconUrl: iconUrl, iconSize: [50, 50], iconAnchor: [25, 25] }) }) layer.addLayer(marker) } } this.bindTooltip = (layer) => { @@ -41,8 +50,18 @@ this.clickListener = (e) => { this.animalService.pulseEffect(e.latlng) console.log(e) console.log(this.PublicBounced) // return this.PublicBounced.$el return this.PublicBounced.$el } // 不同类型图片封装 this.differentTypes = (judgeValue) => { var effectOfChange if (judgeValue === 1) { effectOfChange = defaultImg } else { effectOfChange = setting } return effectOfChange } // 固废点击进行的 内容的设置 // SetSolidWasteContent (config, containerPopup) { src/conf/MapConfig.js
@@ -25,7 +25,8 @@ minZoom: 3, maxZoom: 18, // center: [26, 104], center: [38.828558921813965, 117.41676807403564], // center: [38.828558921813965, 117.41676807403564], center: [29.769515991210938, 107.03567504882812], zoom: 14, worldCopyJump: true, inertia: true,