diff --git a/src/components/MapComponets/ParkingViewMarkers/index.jsx b/src/components/MapComponets/ParkingViewMarkers/index.jsx index 16fd2de..268db19 100644 --- a/src/components/MapComponets/ParkingViewMarkers/index.jsx +++ b/src/components/MapComponets/ParkingViewMarkers/index.jsx @@ -75,7 +75,7 @@ function Markers(props) { if (map && !massLayer) { let _massLayer = new AMap.MassMarks([], { zIndex: 5, // 海量点图层叠加的顺序 - cursor: "pointer", + // cursor: "pointer", style: style, // 该层内标注是否避让 // allowCollision: true, }); // 创建海量点图层 @@ -126,99 +126,10 @@ function Markers(props) { const addMarker = (markerArr, _massLayer) => { _massLayer.setData(markerArr); _massLayer.on("click", function (e) { - console.log(e.data.option); clickCb(e.data.option); - // Mapmove.setPosition(e.data.lnglat); }); setMassLayer(_massLayer); _massLayer.setMap(map); - - // for (let [key, value] of Object.entries(markerArr)) { - // if (!value.hasOwnProperty("massMarkers")) { - // value.massMarkers = []; - // value.nodes.forEach((elem) => { - // console.log(elem); - // // let marker = new AMap.LabelMarker({ - // // position: [elem.lnglat[1], elem.lnglat[0]], - // // // zIndex: 1006, - // // icon: icon(elem.type), - // // // text: text(elem[tooltipKey]), - // // // content: markerContent(elem.type), - // // // offset: new AMap.Pixel(-13, -30), - // // }); - - // // marker.data = elem; - // // value.massMarkers.push(marker); - // // // marker.bindTooltip(`${elem[tooltipKey]}`, { - // // // offset: [20, -5], - // // // direction: "right", - // // // }); - // // marker.on("mouseover", function (e) { - // // console.log(e.data); - // // var position = e.data.data && e.data.data.position; - // // if (position) { - // // Mapmove.setLabel( - // // '
' + - // // position + - // // '
' + - // // "
" - // // ); - // // Mapmove.setPosition(position); - // // map.add(Mapmove); - // // } - // // }); - // // marker.on("mouseout", function () { - // // map.remove(Mapmove); - // // }); - // }); - // _massLayer.add(value.massMarkers); - // } else { - // _massLayer.add(value.massMarkers); - // } - // } - // _massLayer.setData(markerArr); - // massMarks.setMap(map); - // if (clickCb) { - // _massLayer.on("click", (e) => { - // console.log(e); - // // if (data.length == "1") { - // // let elem = data[0].data.data.data; - // // clickCb(elem); - // // } else { - // // map.openPopup(renderMarkerList(data), e.latlng, { - // // className: "markers-list-box", - // // }); - // // let dom = document.querySelectorAll(".marker-list-item"); - // // dom.forEach((elem) => { - // // elem.addEventListener("click", function (e) { - // // map.closePopup(); - // // let type = e.target.dataset.type, - // // id = e.target.dataset.id; - // // let marker = massObjRef.current["type_" + type].nodes.filter( - // // (i) => i.locationId == id - // // )[0]; - // // let elem = marker.data; - // // clickCb(elem); - // // }); - // // }); - // // } - // }); - // } - }; - - const renderMarkerList = (data) => { - let template = `
-
请选择点位
-
- `; - data.forEach((elem) => { - let _data = elem.data.data; - if (_data.name && _data.locationId) { - template += `
${_data.name}
`; - } - }); - template += `
`; - return template; }; return null; diff --git a/src/pages/DataAnalysisPrediction/MemberStat/ParkingAly/loadable.jsx b/src/pages/DataAnalysisPrediction/MemberStat/ParkingAly/loadable.jsx index d123da7..5fafbe7 100644 --- a/src/pages/DataAnalysisPrediction/MemberStat/ParkingAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/MemberStat/ParkingAly/loadable.jsx @@ -229,6 +229,7 @@ function ParkingAly() { const ReportPaySummaryReport = () => { ajax.ElectInvoice.exportParking({ ...FormDatas, + ...DateFormt(FormDatas.date_type), }).then( (res) => { if (parseInt(res?.status) === 20000) { diff --git a/src/pages/DataAnalysisPrediction/MemberStat/PayAly/loadable.jsx b/src/pages/DataAnalysisPrediction/MemberStat/PayAly/loadable.jsx index 38c0bc1..fcde1d9 100644 --- a/src/pages/DataAnalysisPrediction/MemberStat/PayAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/MemberStat/PayAly/loadable.jsx @@ -242,7 +242,7 @@ function PayAly() { const ReportPaySummaryReport = () => { ajax.ElectInvoice.exportPayFx({ ...FormDatas, - is_excel: 1, + ...DateFormt(FormDatas.date_type), }).then( (res) => { if (parseInt(res?.status) === 20000) { diff --git a/src/pages/DataAnalysisPrediction/MemberStat/RegisterAly/loadable.jsx b/src/pages/DataAnalysisPrediction/MemberStat/RegisterAly/loadable.jsx index a8ad728..5bb41a8 100644 --- a/src/pages/DataAnalysisPrediction/MemberStat/RegisterAly/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/MemberStat/RegisterAly/loadable.jsx @@ -232,6 +232,7 @@ function RegisterAly() { const ReportPaySummaryReport = () => { ajax.ElectInvoice.exportRegister({ ...FormDatas, + ...DateFormt(FormDatas.date_type), }).then( (res) => { if (parseInt(res?.status) === 20000) { diff --git a/src/pages/DataAnalysisPrediction/ParkingOverview/Map.jsx b/src/pages/DataAnalysisPrediction/ParkingOverview/Map.jsx index 8bdc018..ac5cba4 100644 --- a/src/pages/DataAnalysisPrediction/ParkingOverview/Map.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingOverview/Map.jsx @@ -76,22 +76,22 @@ function BaseMap(props) { }; }, []); - useEffect(() => { - if (map) { - if (scrollZoom) { - map.scrollWheelZoom.enable(); - } else { - map.scrollWheelZoom.disable(); - } - } - }, [scrollZoom]); + // useEffect(() => { + // if (map) { + // if (scrollZoom) { + // map.scrollWheelZoom.enable(); + // } else { + // map.scrollWheelZoom.disable(); + // } + // } + // }, [scrollZoom]); useEffect(() => { if (map && Option) { AMap.plugin(["AMap.PlaceSearch"], function () { const placeSearch = new AMap.PlaceSearch({ pageSize: 5, // 单页显示结果条数 pageIndex: 1, // 页码 - city: "010", // 兴趣点城市 + city: "0532", // 兴趣点城市 citylimit: true, //是否强制限制在设置的城市内搜索 // map: map, // 展现结果的地图实例 // panel: "panel", // 结果列表将在此容器中进行展示。 diff --git a/src/services/ParkingOverview/index.js b/src/services/ParkingOverview/index.js index 085fc59..9d51308 100644 --- a/src/services/ParkingOverview/index.js +++ b/src/services/ParkingOverview/index.js @@ -44,7 +44,7 @@ export default { //获取位置模糊检索 searchGeocode: (params) => { return ajax({ - url: "https://restapi.amap.com/v3/geocode/geo", + url: "/api/ana/overview/geocode", type: "get", data: params, });