| | |
| | | } |
| | | |
| | | if (debug) { |
| | | ip1 = 'http://192.168.0.138:8084/'; |
| | | ip1 = 'http://192.168.0.110:8084/'; |
| | | } |
| | | |
| | | const $http = axios.create({ |
| | |
| | | ElIcon: typeof import('element-plus/es')['ElIcon'] |
| | | ElInput: typeof import('element-plus/es')['ElInput'] |
| | | ElOption: typeof import('element-plus/es')['ElOption'] |
| | | ElPagination: typeof import('element-plus/es')['ElPagination'] |
| | | ElPopover: typeof import('element-plus/es')['ElPopover'] |
| | | ElRadio: typeof import('element-plus/es')['ElRadio'] |
| | | ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] |
| | | ElRow: typeof import('element-plus/es')['ElRow'] |
| | | ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] |
| | | ElSelect: typeof import('element-plus/es')['ElSelect'] |
| | | ElSlider: typeof import('element-plus/es')['ElSlider'] |
| | | ElTable: typeof import('element-plus/es')['ElTable'] |
| | | ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] |
| | | ElText: typeof import('element-plus/es')['ElText'] |
| | |
| | | that.mapViews.textViews = textViews; |
| | | // eslint-disable-next-line vue/no-mutating-props |
| | | that.mapViews.labelsLayer = labelsLayer; |
| | | SatelliteProxy.drawColor(that.mapViews.gridViews, d); |
| | | SatelliteProxy.drawColor({ |
| | | gridViews: that.mapViews.gridViews, |
| | | gridDataDetail: d |
| | | }); |
| | | } |
| | | ); |
| | | }, |
| | |
| | | // èµ°èªä»»å¡ |
| | | export const useMissionStore = defineStore('mission', () => { |
| | | const missionList = ref([]); |
| | | const { loading, fetchData } = useFetchData(); |
| | | const { loading, fetchData } = useFetchData(1000); |
| | | |
| | | function fetchMission(type) { |
| | | return fetchData((page, pageSize) => { |
| | |
| | | const allGridDataList = ref([]); |
| | | // åå§ç½æ ¼æ°æ®ç» |
| | | const gridDataList = computed(() => { |
| | | return allGridDataList.value.filter((v) => { |
| | | return v.type == 0; |
| | | }); |
| | | // return allGridDataList.value.filter((v) => { |
| | | // return v.type == 0; |
| | | // }); |
| | | return allGridDataList.value; |
| | | }); |
| | | // èåç½æ ¼æ°æ®ç» |
| | | const mixGridDataList = computed(() => { |
| | |
| | | |
| | | /** |
| | | * ç»å¶ä¸ç»å¤è¾¹å½¢ |
| | | * @param {*} points |
| | | * @param {Array} points ç½æ ¼åæ ç¹æ°ç» |
| | | * @param {Boolean} draw æ¯å¦åå»ºå®æååæ¶ç»å¶ |
| | | */ |
| | | drawPolylines(points) { |
| | | drawPolylines({ points, draw, event }) { |
| | | const gridViews = []; |
| | | points.forEach((p) => { |
| | | let path = p.map((v) => { |
| | | // eslint-disable-next-line no-undef |
| | | return new AMap.LngLat(v[0], v[1]); |
| | | }); |
| | | //å建å¤è¾¹å½¢ Polygon å®ä¾ |
| | | // eslint-disable-next-line no-undef |
| | | var polygon = new AMap.Polygon({ |
| | | path: path, //è·¯å¾ |
| | | path: p.path, //è·¯å¾ |
| | | fillColor: '#fff', //å¤è¾¹å½¢å¡«å
é¢è² |
| | | strokeWeight: 1, //线æ¡å®½åº¦ï¼é»è®¤ä¸º 2 |
| | | strokeColor: 'white', //线æ¡é¢è² |
| | | fillOpacity: 0 |
| | | fillOpacity: 0, |
| | | extData: p.extData |
| | | }); |
| | | |
| | | if (typeof event === 'function') { |
| | | event(polygon); |
| | | } |
| | | gridViews.push(polygon); |
| | | }); |
| | | map.add(gridViews); |
| | | map.setFitView(gridViews); |
| | | if (draw) { |
| | | map.add(gridViews); |
| | | map.setFitView(gridViews); |
| | | } |
| | | return gridViews; |
| | | }, |
| | | |
| | | drawGridText(points, textViews, anchor, type) { |
| | | // if (textViews) { |
| | | // points.forEach((p, i) => { |
| | | // textViews[i].setPosition(p.lnglat_GD); |
| | | // textViews[i].setText(p.data); |
| | | // }); |
| | | // return textViews; |
| | | // } else { |
| | | // const _textViews = []; |
| | | // points.forEach((p) => { |
| | | // const m = textMaker(p.lnglat_GD, p.data, anchor, type); |
| | | // _textViews.push(m); |
| | | // }); |
| | | // map.add(_textViews); |
| | | // return { textViews: _textViews }; |
| | | // } |
| | | if (textViews) { |
| | | points.forEach((p, i) => { |
| | | textViews[i].setPosition(p.lnglat_GD); |
| | | textViews[i].setText(p.data); |
| | | }); |
| | | return textViews; |
| | | } else { |
| | | const _textViews = []; |
| | | points.forEach((p) => { |
| | | const m = textMaker(p.lnglat_GD, p.data, anchor, type); |
| | | _textViews.push(m); |
| | | }); |
| | | map.add(_textViews); |
| | | return { textViews: _textViews }; |
| | | map.remove(textViews); |
| | | } |
| | | const _textViews = []; |
| | | points.forEach((p) => { |
| | | const m = textMaker(p.lnglat_GD, p.data, anchor, type); |
| | | _textViews.push(m); |
| | | }); |
| | | // map.add(_textViews); |
| | | return { textViews: _textViews }; |
| | | }, |
| | | |
| | | drawGridTextLabel(points, textViews, labelsLayer, direction) { |
| | |
| | | } |
| | | }, |
| | | |
| | | drawGridColor(gridViews, texts, factorName) { |
| | | gridViews.forEach((g, i) => { |
| | | const data = parseFloat(texts[i]); |
| | | const { color, nextColor, range, nextRange } = |
| | | Legend.getStandardColorAndNext(factorName, data); |
| | | const ratio = (data - range) / (nextRange - range); |
| | | const _color = getColorBetweenTwoColors( |
| | | color.map((v) => v * 255), |
| | | nextColor.map((v) => v * 255), |
| | | ratio |
| | | ); |
| | | g.setOptions({ |
| | | fillColor: _color, |
| | | fillOpacity: color[3] == 0 ? 0 : 0.7 |
| | | }); |
| | | /** |
| | | * æ ¹æ®é¥æµæ°æ®ï¼è®¾ç½®å¯¹åºç½æ ¼çæ åè²ï¼è¿åææ°æ®çç½æ ¼ |
| | | * @param {Array} gridViews ç½æ ¼å¤è¾¹å½¢å¯¹è±¡æ°ç» |
| | | * @param {Array} gridDataDetail 嫿饿µæ°æ®æ°ç» |
| | | * @param {string} factorName çæµå ååç§° |
| | | * @param {number} opacity éæåº¦ |
| | | */ |
| | | drawGridColor(gridViews, gridDataDetail, factorName, opacity, zIndex) { |
| | | const res = []; |
| | | // éå嫿饿µæ°æ®æ°ç» |
| | | gridDataDetail.forEach((d, i) => { |
| | | if (d.pm25) { |
| | | const grid = gridViews[i]; |
| | | |
| | | // æ ¹æ®é¥æµæ°æ®è®¡ç®ç½æ ¼é¢è² |
| | | const data = d.pm25; |
| | | const { color, nextColor, range, nextRange } = |
| | | Legend.getStandardColorAndNext(factorName, data); |
| | | const ratio = (data - range) / (nextRange - range); |
| | | const _color = getColorBetweenTwoColors( |
| | | color.map((v) => v * 255), |
| | | nextColor.map((v) => v * 255), |
| | | ratio |
| | | ); |
| | | grid.setOptions({ |
| | | zIndex: zIndex ? zIndex : 10, |
| | | fillColor: _color, |
| | | fillOpacity: opacity ? opacity : color[3] == 0 ? 0 : 0.7 |
| | | }); |
| | | |
| | | res.push(grid); |
| | | } |
| | | }); |
| | | |
| | | return res; |
| | | // gridViews.forEach((g, i) => { |
| | | // const data = parseFloat(gridDataDetail[i]); |
| | | // const { color, nextColor, range, nextRange } = |
| | | // Legend.getStandardColorAndNext(factorName, data); |
| | | // const ratio = (data - range) / (nextRange - range); |
| | | // const _color = getColorBetweenTwoColors( |
| | | // color.map((v) => v * 255), |
| | | // nextColor.map((v) => v * 255), |
| | | // ratio |
| | | // ); |
| | | // g.setOptions({ |
| | | // fillColor: _color, |
| | | // fillOpacity: color[3] == 0 ? 0 : 0.7 |
| | | // }); |
| | | // }); |
| | | }, |
| | | |
| | | drawGridColorCustom(gridViews, texts) { |
| | | drawGridColorCustom(gridViews, gridDataDetail, opacity) { |
| | | var max, min; |
| | | texts.forEach((t) => { |
| | | if (!t) return; |
| | | if (!max || t > max) { |
| | | max = t; |
| | | gridDataDetail.forEach((t) => { |
| | | if (!t.pm25) return; |
| | | if (!max || t.pm25 > max) { |
| | | max = t.pm25; |
| | | } |
| | | if (!min || t < min) { |
| | | min = t; |
| | | if (!min || t.pm25 < min) { |
| | | min = t.pm25; |
| | | } |
| | | }); |
| | | gridViews.forEach((g, i) => { |
| | | const data = parseFloat(texts[i]); |
| | | const { color, nextColor, range, nextRange } = |
| | | Legend.getCustomColorAndNext(data, min, max); |
| | | const ratio = (data - range) / (nextRange - range); |
| | | const res = []; |
| | | // éå嫿饿µæ°æ®æ°ç» |
| | | gridDataDetail.forEach((d, i) => { |
| | | if (d.pm25) { |
| | | const grid = gridViews[i]; |
| | | |
| | | const _color = getColorBetweenTwoColors( |
| | | color.map((v) => v * 255), |
| | | nextColor.map((v) => v * 255), |
| | | ratio |
| | | ); |
| | | g.setOptions({ |
| | | fillColor: _color, |
| | | // fillOpacity: color[3] |
| | | fillOpacity: color[3] == 0 ? 0 : 0.7 |
| | | }); |
| | | // æ ¹æ®é¥æµæ°æ®è®¡ç®ç½æ ¼é¢è² |
| | | const data = d.pm25; |
| | | const { color, nextColor, range, nextRange } = |
| | | Legend.getCustomColorAndNext(data, min, max); |
| | | const ratio = (data - range) / (nextRange - range); |
| | | |
| | | const _color = getColorBetweenTwoColors( |
| | | color.map((v) => v * 255), |
| | | nextColor.map((v) => v * 255), |
| | | ratio |
| | | ); |
| | | grid.setOptions({ |
| | | fillColor: _color, |
| | | fillOpacity: opacity ? opacity : color[3] == 0 ? 0 : 0.7 |
| | | }); |
| | | |
| | | res.push(grid); |
| | | } |
| | | }); |
| | | |
| | | return res; |
| | | // gridViews.forEach((g, i) => { |
| | | // const data = parseFloat(gridDataDetail[i]); |
| | | // const { color, nextColor, range, nextRange } = |
| | | // Legend.getCustomColorAndNext(data, min, max); |
| | | // const ratio = (data - range) / (nextRange - range); |
| | | |
| | | // const _color = getColorBetweenTwoColors( |
| | | // color.map((v) => v * 255), |
| | | // nextColor.map((v) => v * 255), |
| | | // ratio |
| | | // ); |
| | | // g.setOptions({ |
| | | // fillColor: _color, |
| | | // fillOpacity: color[3] == 0 ? 0 : 0.7 |
| | | // }); |
| | | // }); |
| | | } |
| | | }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { map } from './index_old'; |
| | | import calculate from './calculate'; |
| | | import { getHexColor } from '../color'; |
| | | |
| | | var _polylineArr = []; |
| | | |
| | | function newPolyline(path, color) { |
| | | // eslint-disable-next-line no-undef |
| | | return new AMap.Polyline({ |
| | | path: path, |
| | | strokeStyle: 'solid', |
| | | isOutline: true, |
| | | borderWeight: 1, |
| | | outlineColor: 'white', |
| | | strokeWeight: 4, // 线æ¡å®½åº¦ï¼é»è®¤ä¸º 1 |
| | | strokeColor: color, // 线æ¡é¢è² |
| | | lineJoin: 'round', // æçº¿æç¹è¿æ¥å¤æ ·å¼ |
| | | showDir: true |
| | | }); |
| | | } |
| | | |
| | | export default { |
| | | drawLine(fDatas, factor) { |
| | | const lnglats_GD = fDatas.lnglats_GD; |
| | | const colors = factor.colors; |
| | | |
| | | this.hideLine(); |
| | | |
| | | var path = calculate.parse2LngLat(lnglats_GD); |
| | | |
| | | let sIndex = 0; |
| | | for (let i = 1; i < path.length; i++) { |
| | | var r = lnglats_GD[i]; |
| | | var lastP = lnglats_GD[i - 1]; |
| | | // eslint-disable-next-line no-undef |
| | | var distance = AMap.GeometryUtil.distance(r, lastP); |
| | | const c = colors[i]; |
| | | const lastC = colors[i - 1]; |
| | | if (distance > 500 || c != lastC) { |
| | | let _path, _color; |
| | | // å½ä¸¤ç¹è·ç¦»è¶
è¿500æ¶ï¼è®¤ä¸ºä¸¤ç¹ä¸è¿ç»ï¼ä¸ç»å¶è¿çº¿ |
| | | if (distance > 500) { |
| | | _path = path.slice(sIndex, i); |
| | | _color = getHexColor( |
| | | lastC.map((v, index) => { |
| | | if (index < lastC.length - 1) { |
| | | return v * 255; |
| | | } else { |
| | | return v; |
| | | } |
| | | }) |
| | | ); |
| | | } else { |
| | | _path = path.slice(sIndex, i + 1); |
| | | _color = getHexColor( |
| | | c.map((v, index) => { |
| | | if (index < c.length - 1) { |
| | | return v * 255; |
| | | } else { |
| | | return v; |
| | | } |
| | | }) |
| | | ); |
| | | } |
| | | |
| | | // å建æçº¿å®ä¾ |
| | | const polyline = newPolyline(_path, _color); |
| | | _polylineArr.push(polyline); |
| | | |
| | | sIndex = i; |
| | | } |
| | | } |
| | | if (sIndex == 0) { |
| | | const c = colors[sIndex]; |
| | | const _color = getHexColor( |
| | | c.map((v, index) => { |
| | | if (index < c.length - 1) { |
| | | return v * 255; |
| | | } else { |
| | | return v; |
| | | } |
| | | }) |
| | | ); |
| | | const polyline = newPolyline(path, _color); |
| | | _polylineArr.push(polyline); |
| | | } |
| | | // å°æçº¿æ·»å è³å°å¾å®ä¾ |
| | | map.add(_polylineArr); |
| | | return _polylineArr; |
| | | }, |
| | | |
| | | hideLine() { |
| | | if (_polylineArr) { |
| | | map.remove(_polylineArr); |
| | | _polylineArr = []; |
| | | } |
| | | } |
| | | }; |
| | |
| | | <!-- <MapLocation></MapLocation> --> |
| | | <SceneSearch></SceneSearch> |
| | | <MapScene></MapScene> |
| | | <el-button @click="satelliteImportVisible = !satelliteImportVisible" type="primary" class="el-button-custom satellite-right-top p-events-auto">çæµæ°æ®å¯¼å
¥</el-button> |
| | | <el-button @click="aodImportVisible = !aodImportVisible" type="primary" class="el-button-custom aod-right-top p-events-auto">AODæ°æ®å¯¼å
¥</el-button> |
| | | <el-button |
| | | @click="satelliteImportVisible = !satelliteImportVisible" |
| | | type="primary" |
| | | class="el-button-custom satellite-right-top p-events-auto" |
| | | >çæµæ°æ®å¯¼å
¥</el-button |
| | | > |
| | | <el-button |
| | | @click="aodImportVisible = !aodImportVisible" |
| | | type="primary" |
| | | class="el-button-custom aod-right-top p-events-auto" |
| | | >AODæ°æ®å¯¼å
¥</el-button |
| | | > |
| | | </el-row> |
| | | <!-- <CoreMenu></CoreMenu> --> |
| | | <router-view></router-view> |
| | |
| | | import { ref } from 'vue'; |
| | | import SatelliteImport from './satellitetelemetry/component/SatelliteImport.vue'; |
| | | import AODImport from './satellitetelemetry/component/AODImport.vue'; |
| | | const satelliteImportVisible = ref(false) |
| | | const aodImportVisible = ref(false) |
| | | const satelliteImportVisible = ref(false); |
| | | const aodImportVisible = ref(false); |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | import calculate from '@/utils/map/calculate'; |
| | | import gridMapUtil from '@/utils/map/grid'; |
| | | import { map } from '@/utils/map/index_old'; |
| | | import { map, onMapMounted } from '@/utils/map/index_old'; |
| | | |
| | | let districtPolygon; |
| | | // ç»å¶åºå¿è¾¹ç |
| | | function drawDistrict(districtName, isNew) { |
| | | onMapMounted(() => { |
| | | if (districtPolygon && !isNew) { |
| | | map.remove(districtPolygon); |
| | | map.add(districtPolygon); |
| | | } else { |
| | | // eslint-disable-next-line no-undef |
| | | var district = new AMap.DistrictSearch({ |
| | | extensions: 'all', //è¿åè¡æ¿åºè¾¹çåæ çå
·ä½ä¿¡æ¯ |
| | | level: 'district' //设置æ¥è¯¢è¡æ¿åºçº§å«ä¸ºåº |
| | | }); |
| | | district.search(districtName, function (status, result) { |
| | | var bounds = result.districtList[0].boundaries; //è·åæé³åºçè¾¹çä¿¡æ¯ |
| | | if (bounds) { |
| | | for (var i = 0; i < bounds.length; i++) { |
| | | //çæè¡æ¿åºå polygon |
| | | // eslint-disable-next-line no-undef |
| | | districtPolygon = new AMap.Polygon({ |
| | | map: map, //æ¾ç¤ºè¯¥è¦çç©çå°å¾å¯¹è±¡ |
| | | strokeWeight: 2, //è½®å»çº¿å®½åº¦ |
| | | path: bounds[i], //å¤è¾¹å½¢è½®å»çº¿çèç¹åæ æ°ç» |
| | | fillOpacity: 0, //å¤è¾¹å½¢å¡«å
éæåº¦ |
| | | fillColor: '#CCF3FF', //å¤è¾¹å½¢å¡«å
é¢è² |
| | | // strokeColor: '#ffffff' //线æ¡é¢è² |
| | | strokeColor: '#0552f7', //线æ¡é¢è² |
| | | zIndex: 9 |
| | | }); |
| | | } |
| | | map.setFitView(); //å°è¦çç©è°æ´å°åéè§é |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function clearAll(mapViews) { |
| | | if (mapViews) { |
| | |
| | | } |
| | | |
| | | // ç»å¶ç½æ ¼çº¿ |
| | | function drawPolyline(gridInfo) { |
| | | function drawPolyline(gridInfo, event) { |
| | | // ç»å¶ç½æ ¼ |
| | | const points = gridInfo.map((v) => { |
| | | // return calculate.wgs84_To_Gcj02(v.longitude, v.latitude); |
| | | return [v.longitude, v.latitude]; |
| | | return calculate.wgs84_To_Gcj02(v.longitude, v.latitude); |
| | | // return [v.longitude, v.latitude]; |
| | | }); |
| | | // const gridPoints = gridMapUtil.parseGridPoint(points); |
| | | // console.log('gridPoints:', gridPoints); |
| | | |
| | | const gridPoints = gridInfo.map((v) => { |
| | | return [ |
| | | calculate.wgs84_To_Gcj02(v.point1Lon, v.point1Lat), |
| | | calculate.wgs84_To_Gcj02(v.point2Lon, v.point2Lat), |
| | | calculate.wgs84_To_Gcj02(v.point3Lon, v.point3Lat), |
| | | calculate.wgs84_To_Gcj02(v.point4Lon, v.point4Lat) |
| | | // [v.point1Lon, v.point1Lat], |
| | | // [v.point2Lon, v.point2Lat], |
| | | // [v.point3Lon, v.point3Lat], |
| | | // [v.point4Lon, v.point4Lat] |
| | | ]; |
| | | const gridPoints = gridInfo.map((v, i) => { |
| | | return { |
| | | path: [ |
| | | calculate.wgs84_To_Gcj02(v.point1Lon, v.point1Lat), |
| | | calculate.wgs84_To_Gcj02(v.point2Lon, v.point2Lat), |
| | | calculate.wgs84_To_Gcj02(v.point3Lon, v.point3Lat), |
| | | calculate.wgs84_To_Gcj02(v.point4Lon, v.point4Lat) |
| | | // [v.point1Lon, v.point1Lat], |
| | | // [v.point2Lon, v.point2Lat], |
| | | // [v.point3Lon, v.point3Lat], |
| | | // [v.point4Lon, v.point4Lat] |
| | | ] |
| | | // eslint-disable-next-line no-undef |
| | | .map((d) => new AMap.LngLat(d[0], d[1])), |
| | | extData: points[i] |
| | | }; |
| | | }); |
| | | const gridViews = gridMapUtil.drawPolylines(gridPoints); |
| | | const gridViews = gridMapUtil.drawPolylines({ points: gridPoints, event }); |
| | | return { gridViews, gridPoints, points }; |
| | | } |
| | | |
| | | // ç»å¶çæµæ°æ®å¼ |
| | | function drawDataText(points, gridData, textViews, labelsLayer) { |
| | | const data = gridData.map((v, i) => { |
| | | function drawDataText(points, gridDataDetail, textViews, labelsLayer) { |
| | | const data = gridDataDetail.map((v, i) => { |
| | | return { |
| | | lnglat_GD: points[i], |
| | | // data: v.pm25 ? (v.pm25 + 'μg/m³') : '' |
| | |
| | | } |
| | | |
| | | // ç»å¶çæµæ°æ®æåææ¬ |
| | | function drawRankText(points, gridData, textViews, labelsLayer) { |
| | | const data = gridData.map((v, i) => { |
| | | function drawRankText(points, gridDataDetail, textViews, labelsLayer) { |
| | | const data = gridDataDetail.map((v, i) => { |
| | | return { |
| | | lnglat_GD: points[i], |
| | | // data: v.pm25 ? ('æå: ' + v.rank) : '' |
| | |
| | | } |
| | | |
| | | // ç»å¶çæµæ°æ®å¼å¯¹åºç½æ ¼é¢è² |
| | | function drawColor(gridViews, gridData, customColor) { |
| | | const pm25Data = gridData.map((v) => { |
| | | return v.pm25; |
| | | function drawColor({ |
| | | gridViews, |
| | | points, |
| | | gridDataDetail, |
| | | lastGridViews, |
| | | opacity, |
| | | zIndex, |
| | | customColor |
| | | }) { |
| | | // æ ¹æ®æ°æ®çéææ°æ®çç½æ ¼ |
| | | const res = []; |
| | | // 以å对åºçä¸å¿ç¹åæ |
| | | const pointsRes = []; |
| | | gridDataDetail.forEach((d) => { |
| | | // æ ¹æ®æ°æ®å
³èçç½æ ¼ç¼å·ï¼æ¾å°å¯¹åºç½æ ¼ |
| | | const cellId = d.cellId; |
| | | if (cellId > gridViews.length) { |
| | | throw Error( |
| | | '饿µæ°æ®çç½æ ¼ç´¢å¼ç¼å·è¶
åºç½æ ¼ç»èå´ï¼æ°æ®åç½æ ¼ç»å¯è½ä¸å¯¹åº' |
| | | ); |
| | | } |
| | | res.push(gridViews[cellId - 1]); |
| | | pointsRes.push(points[cellId - 1]); |
| | | }); |
| | | |
| | | // æ ¹æ®ç»å¶é¢è²æ¹å¼ç»å¶ç½æ ¼ |
| | | let resGridViews; |
| | | if (customColor) { |
| | | gridMapUtil.drawGridColorCustom(gridViews, pm25Data); |
| | | resGridViews = gridMapUtil.drawGridColorCustom( |
| | | res, |
| | | gridDataDetail, |
| | | opacity, |
| | | zIndex |
| | | ); |
| | | } else { |
| | | gridMapUtil.drawGridColor(gridViews, pm25Data, 'PM25'); |
| | | resGridViews = gridMapUtil.drawGridColor( |
| | | res, |
| | | gridDataDetail, |
| | | 'PM25', |
| | | opacity, |
| | | zIndex |
| | | ); |
| | | } |
| | | |
| | | if (lastGridViews) { |
| | | map.remove(lastGridViews); |
| | | } |
| | | map.add(resGridViews); |
| | | map.setFitView(resGridViews); |
| | | |
| | | return { resGridViews, pointsRes }; |
| | | } |
| | | |
| | | export default { |
| | | drawDistrict, |
| | | drawPolyline, |
| | | drawDataText, |
| | | drawRankText, |
| | |
| | | ); |
| | | mapViews.textViews = textViews; |
| | | mapViews.labelsLayer = labelsLayer; |
| | | SatelliteProxy.drawColor(mapViews.gridViews, gridData); |
| | | SatelliteProxy.drawColor({ |
| | | gridViews: mapViews.gridViews, |
| | | gridDataDetail: gridData |
| | | }); |
| | | } |
| | | |
| | | function handleRowClick(row) { |
| | |
| | | @show-rank="handleRankClick" |
| | | @show-data="handleDataClick" |
| | | @change-color="handleColorClick" |
| | | @change-opacity="handleOpacityClick" |
| | | ></SatelliteManage> |
| | | </el-row> |
| | | </el-col> |
| | |
| | | </el-row> |
| | | <SatelliteDataMix class="data-mix" @mix-data="handleMixDataClick"> |
| | | </SatelliteDataMix> |
| | | <SatelliteMixTool :group-id="3"></SatelliteMixTool> |
| | | |
| | | <!-- <el-row class="historical" justify="center"> |
| | | <SatelliteAnimation |
| | | :loading="animaLoading" |
| | |
| | | import gridApi from '@/api/gridApi'; |
| | | import SatelliteManage from './component/SatelliteManage.vue'; |
| | | import SatelliteDataMix from './component/SatelliteDataMix.vue'; |
| | | import SatelliteMixTool from './component/SatelliteMixTool.vue'; |
| | | import SatelliteProxy from './SatelliteProxy'; |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | import { useSatelliteGridStore } from '@/stores/satellite-grid'; |
| | | |
| | | // æ¥è¯¢é¿å®åºè¡æ¿åºå |
| | | function initDistrict() { |
| | | onMapMounted(() => { |
| | | // eslint-disable-next-line no-undef |
| | | var district = new AMap.DistrictSearch({ |
| | | extensions: 'all', //è¿åè¡æ¿åºè¾¹çåæ çå
·ä½ä¿¡æ¯ |
| | | level: 'district' //设置æ¥è¯¢è¡æ¿åºçº§å«ä¸ºåº |
| | | }); |
| | | district.search('é¿å®åº', function (status, result) { |
| | | var bounds = result.districtList[0].boundaries; //è·åæé³åºçè¾¹çä¿¡æ¯ |
| | | if (bounds) { |
| | | for (var i = 0; i < bounds.length; i++) { |
| | | //çæè¡æ¿åºå polygon |
| | | // eslint-disable-next-line no-undef |
| | | var polygon = new AMap.Polygon({ |
| | | map: map, //æ¾ç¤ºè¯¥è¦çç©çå°å¾å¯¹è±¡ |
| | | strokeWeight: 3, //è½®å»çº¿å®½åº¦ |
| | | path: bounds[i], //å¤è¾¹å½¢è½®å»çº¿çèç¹åæ æ°ç» |
| | | fillOpacity: 0.1, //å¤è¾¹å½¢å¡«å
éæåº¦ |
| | | fillColor: '#CCF3FF', //å¤è¾¹å½¢å¡«å
é¢è² |
| | | // strokeColor: '#ffffff' //线æ¡é¢è² |
| | | strokeColor: '#0077ff' //线æ¡é¢è² |
| | | }); |
| | | } |
| | | map.setFitView(); //å°è¦çç©è°æ´å°åéè§é |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | import { useSceneStore } from '@/stores/scene'; |
| | | |
| | | const satelliteGridStore = useSatelliteGridStore(); |
| | | const { loading, fetchData } = useFetchData(10000); |
| | | const sceneStore = useSceneStore(); |
| | | const animaLoading = ref(true); |
| | | const show = ref(true); |
| | | |
| | |
| | | function onSearch(options) { |
| | | satelliteGridStore.fetchGridCell(options.id).then(() => { |
| | | drawGrid(satelliteGridStore.gridInfo); |
| | | initDistrict(); |
| | | // initDistrict(); |
| | | SatelliteProxy.drawDistrict('é¿å®åº'); |
| | | }); |
| | | satelliteGridStore.fetchGridData(options.id).then(() => { |
| | | max = satelliteGridStore.gridDataList.length; |
| | |
| | | |
| | | function drawGrid(gridInfo) { |
| | | SatelliteProxy.clearAll(mapViews); |
| | | mapViews = SatelliteProxy.drawPolyline(gridInfo); |
| | | mapViews = SatelliteProxy.drawPolyline(gridInfo, (polygon) => { |
| | | //é¼ æ ç§»å
¥äºä»¶ |
| | | polygon.on('mouseover', () => { |
| | | polygon.setOptions({ |
| | | //ä¿®æ¹å¤è¾¹å½¢å±æ§çæ¹æ³ |
| | | strokeWeight: 2, |
| | | strokeColor: 'red' |
| | | }); |
| | | }); |
| | | //é¼ æ ç§»åºäºä»¶ |
| | | polygon.on('mouseout', () => { |
| | | polygon.setOptions({ |
| | | strokeWeight: 1, |
| | | strokeColor: 'white' |
| | | }); |
| | | }); |
| | | //é¼ æ ç¹å»äºä»¶ |
| | | polygon.on('click', () => { |
| | | const [lng, lat] = polygon.getExtData(); |
| | | sceneStore.radius = 0.5; |
| | | sceneStore.searchScene(lng, lat); |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | // ç»å¶ç½æ ¼é¥ææ°æ®å¼åç½æ ¼é¢è² |
| | | function drawTextAndColor(gridData) { |
| | | // SatelliteProxy.clearText(mapViews); |
| | | const { resGridViews, pointsRes } = SatelliteProxy.drawColor({ |
| | | gridViews: mapViews.gridViews, |
| | | points: mapViews.points, |
| | | gridDataDetail: gridData, |
| | | lastGridViews: mapViews.lastGridViews |
| | | }); |
| | | mapViews.lastGridViews = resGridViews; |
| | | mapViews.lastPoints = pointsRes; |
| | | // ææ¬æ è®° |
| | | const { textViews: dataTxt, labelsLayer: dataLayer } = |
| | | SatelliteProxy.drawDataText( |
| | | mapViews.points, |
| | | mapViews.lastPoints, |
| | | gridData, |
| | | mapViews.dataTxt, |
| | | mapViews.dataLayer |
| | |
| | | mapViews.dataLayer = dataLayer; |
| | | const { textViews: rankTxt, labelsLayer: rankLayer } = |
| | | SatelliteProxy.drawRankText( |
| | | mapViews.points, |
| | | mapViews.lastPoints, |
| | | gridData, |
| | | mapViews.rankTxt, |
| | | mapViews.rankLayer |
| | | ); |
| | | mapViews.rankTxt = rankTxt; |
| | | mapViews.rankLayer = rankLayer; |
| | | SatelliteProxy.drawColor(mapViews.gridViews, gridData); |
| | | } |
| | | |
| | | let selectedGridData; |
| | |
| | | } |
| | | |
| | | function handleColorClick(isStandardColor) { |
| | | SatelliteProxy.drawColor( |
| | | mapViews.gridViews, |
| | | selectedGridData, |
| | | !isStandardColor |
| | | ); |
| | | const { resGridViews, pointsRes } = SatelliteProxy.drawColor({ |
| | | gridViews: mapViews.gridViews, |
| | | points: mapViews.points, |
| | | gridDataDetail: selectedGridData, |
| | | lastGridViews: mapViews.lastGridViews, |
| | | customColor: !isStandardColor |
| | | }); |
| | | mapViews.lastGridViews = resGridViews; |
| | | mapViews.lastPoints = pointsRes; |
| | | } |
| | | |
| | | function handleOpacityClick(isOpacity) { |
| | | mapViews.lastGridViews.forEach((e) => { |
| | | e.setOptions({ |
| | | fillOpacity: isOpacity ? 0.1 : 0.7 |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | function handleMixDataClick(gridData) { |
| | |
| | | position: absolute; |
| | | right: 0; |
| | | top: 60px; |
| | | /* color: #0552f7; */ |
| | | } |
| | | </style> |
| | |
| | | <el-col span="2"> |
| | | <el-row> |
| | | <CardButton |
| | | name="æ°æ®èå" |
| | | name="ç½æ ¼æº¯æº" |
| | | direction="left" |
| | | @click="() => (show = !show)" |
| | | ></CardButton> |
| | |
| | | :loading="loading" |
| | | @search="onSearch" |
| | | ></SatelliteSearchBar> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleRankClick" |
| | | > |
| | | {{ rankVisible ? 'éèæå' : 'æ¾ç¤ºæå' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleDataClick" |
| | | > |
| | | {{ dataVisible ? 'éèæ°æ®' : 'æ¾ç¤ºæ°æ®' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleColorClick" |
| | | > |
| | | {{ isStandardColor ? 'ç»å¶å¯¹æ¯è²' : 'ç»å¶æ åè²' }} |
| | | </el-button> |
| | | <el-row class="m-b-8"> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleRankClick" |
| | | > |
| | | {{ rankVisible ? 'éèæå' : 'æ¾ç¤ºæå' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleDataClick" |
| | | > |
| | | {{ dataVisible ? 'éèæ°æ®' : 'æ¾ç¤ºæ°æ®' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleColorClick" |
| | | > |
| | | {{ isStandardColor ? 'ç»å¶å¯¹æ¯è²' : 'ç»å¶æ åè²' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleOpacityClick" |
| | | > |
| | | {{ !isOpacity ? 'éæå' : 'åæ¶éæå' }} |
| | | </el-button> |
| | | </el-row> |
| | | <el-table |
| | | :data="gridDataList" |
| | | table-layout="fixed" |
| | |
| | | } |
| | | }); |
| | | |
| | | const rankVisible = ref(true); |
| | | const dataVisible = ref(true); |
| | | const isStandardColor = ref(true) |
| | | const rankVisible = ref(false); |
| | | const dataVisible = ref(false); |
| | | const isStandardColor = ref(true); |
| | | const isOpacity = ref(false); |
| | | |
| | | const emits = defineEmits(['search', 'rowClick', 'showRank', 'showData', 'changeColor']); |
| | | const emits = defineEmits([ |
| | | 'search', |
| | | 'rowClick', |
| | | 'showRank', |
| | | 'showData', |
| | | 'changeColor' |
| | | ]); |
| | | |
| | | // æ¥è¯¢ç½æ ¼ä¿¡æ¯åé¥ææ°æ®ç» |
| | | function onSearch(options) { |
| | |
| | | } |
| | | |
| | | function handleRankClick() { |
| | | rankVisible.value = !rankVisible.value |
| | | rankVisible.value = !rankVisible.value; |
| | | emits('showRank', rankVisible.value); |
| | | } |
| | | |
| | | function handleDataClick() { |
| | | dataVisible.value = !dataVisible.value |
| | | dataVisible.value = !dataVisible.value; |
| | | emits('showData', dataVisible.value); |
| | | } |
| | | |
| | | function handleColorClick() { |
| | | isStandardColor.value = !isStandardColor.value |
| | | isStandardColor.value = !isStandardColor.value; |
| | | emits('changeColor', isStandardColor.value); |
| | | } |
| | | |
| | | function handleOpacityClick() { |
| | | isOpacity.value = !isOpacity.value; |
| | | emits('changeOpacity', isOpacity.value); |
| | | } |
| | | |
| | | function handleRowClick(row, col, event) { |
| | | emits('rowClick', row); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <CardDialog |
| | | v-model="dialogVisible" |
| | | title="èµ°èªèå" |
| | | draggable |
| | | :modal="false" |
| | | width="400px" |
| | | > |
| | | <template #default> |
| | | <el-row> |
| | | <OptionMission v-model="mission"></OptionMission> |
| | | <el-text size="small" :type="fusionData ? 'success' : 'warning'">{{ |
| | | fusionData ? 'èµ°èªæ°æ®å·²èå' : 'èµ°èªæ°æ®æªèå' |
| | | }}</el-text> |
| | | </el-row> |
| | | <el-row> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | :disabled="!gridCellList || !fusionData" |
| | | @click="handleFusionClick" |
| | | > |
| | | {{ 'å å èå' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleGridClick" |
| | | > |
| | | {{ gridVisible ? 'éèèå' : 'æ¾ç¤ºèå' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | :loading="loading" |
| | | @click="handleUnderwayClick" |
| | | > |
| | | {{ underwayVisible ? 'éèèµ°èªè·¯çº¿' : 'æ¾ç¤ºèµ°èªè·¯çº¿' }} |
| | | </el-button> |
| | | </el-row> |
| | | <el-row class="m-t-8"> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleRankClick" |
| | | > |
| | | {{ rankVisible ? 'éèæå' : 'æ¾ç¤ºæå' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleDataClick" |
| | | > |
| | | {{ dataVisible ? 'éèæ°æ®' : 'æ¾ç¤ºæ°æ®' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleColorClick" |
| | | > |
| | | {{ isStandardColor ? 'ç»å¶å¯¹æ¯è²' : 'ç»å¶æ åè²' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleOpacityClick" |
| | | > |
| | | {{ !isOpacity ? 'éæå' : 'åæ¶éæå' }} |
| | | </el-button> |
| | | </el-row> |
| | | </template> |
| | | <template #footer> |
| | | <el-row justify="start" align="middle" class="p-b-2 one-row"> |
| | | <!-- <el-text size="small" type="warning">æç´¢èå´</el-text> --> |
| | | </el-row> |
| | | </template> |
| | | </CardDialog> |
| | | </template> |
| | | <script setup> |
| | | import { ref, onMounted, onUnmounted, watch } from 'vue'; |
| | | import moment from 'moment'; |
| | | import { map, onMapMounted } from '@/utils/map/index_old'; |
| | | import gridApi from '@/api/gridApi'; |
| | | import SatelliteProxy from '../SatelliteProxy'; |
| | | |
| | | const props = defineProps({ |
| | | groupId: { |
| | | type: Number, |
| | | default: 3 |
| | | } |
| | | }); |
| | | |
| | | const dialogVisible = ref(true); |
| | | const mission = ref(undefined); |
| | | |
| | | const gridCellList = ref(undefined); |
| | | const fusionData = ref(undefined); |
| | | const gridDataDetailMap = new Map(); |
| | | |
| | | const gridVisible = ref(true); |
| | | const underwayVisible = ref(false); |
| | | const rankVisible = ref(false); |
| | | const dataVisible = ref(false); |
| | | const isStandardColor = ref(true); |
| | | const isOpacity = ref(false); |
| | | |
| | | // å°å¾ç½æ ¼ç¸å
³å¯¹è±¡ |
| | | let mapViews; |
| | | |
| | | // æ£æ¥èµ°èªæ°æ®æ¯å¦å100ç±³ç½æ ¼å·²èå |
| | | function checkUnderwayFusionResult() { |
| | | const time = moment(mission.value.startTime).format('YYYY-MM-DD HH:mm:ss'); |
| | | gridApi.fetchGridData(props.groupId, time, 3).then((res) => { |
| | | if (res.data.length > 0) { |
| | | fusionData.value = res.data[0]; |
| | | } else { |
| | | fusionData.value = undefined; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function drawGrid(gridInfo) { |
| | | SatelliteProxy.clearAll(mapViews); |
| | | mapViews = SatelliteProxy.drawPolyline(gridInfo); |
| | | } |
| | | |
| | | // ç»å¶ç½æ ¼é¥ææ°æ®å¼åç½æ ¼é¢è² |
| | | function drawTextAndColor(gridData) { |
| | | const { resGridViews, pointsRes } = SatelliteProxy.drawColor({ |
| | | gridViews: mapViews.gridViews, |
| | | points: mapViews.points, |
| | | gridDataDetail: gridData, |
| | | lastGridViews: mapViews.lastGridViews, |
| | | opacity: 1, |
| | | zIndex: 11 |
| | | }); |
| | | mapViews.lastGridViews = resGridViews; |
| | | mapViews.lastPoints = pointsRes; |
| | | // ææ¬æ è®° |
| | | const { textViews: dataTxt, labelsLayer: dataLayer } = |
| | | SatelliteProxy.drawDataText( |
| | | mapViews.lastPoints, |
| | | gridData, |
| | | mapViews.dataTxt, |
| | | mapViews.dataLayer |
| | | ); |
| | | mapViews.dataTxt = dataTxt; |
| | | mapViews.dataLayer = dataLayer; |
| | | const { textViews: rankTxt, labelsLayer: rankLayer } = |
| | | SatelliteProxy.drawRankText( |
| | | mapViews.lastPoints, |
| | | gridData, |
| | | mapViews.rankTxt, |
| | | mapViews.rankLayer |
| | | ); |
| | | mapViews.rankTxt = rankTxt; |
| | | mapViews.rankLayer = rankLayer; |
| | | } |
| | | |
| | | watch(mission, (nV, oV) => { |
| | | if (nV != oV) { |
| | | checkUnderwayFusionResult(); |
| | | search(nV); |
| | | } |
| | | }); |
| | | |
| | | watch( |
| | | () => props.groupId, |
| | | (nV, oV) => { |
| | | if (nV != oV) { |
| | | gridApi.fetchGridCell(nV).then((res) => { |
| | | gridCellList.value = res.data; |
| | | drawGrid(gridCellList.value); |
| | | }); |
| | | } |
| | | }, |
| | | { |
| | | immediate: true |
| | | } |
| | | ); |
| | | |
| | | let selectedGridData; |
| | | // å å èå |
| | | function handleFusionClick() { |
| | | const d = fusionData.value; |
| | | if (gridDataDetailMap.has(d.id)) { |
| | | const gridData = gridDataDetailMap.get(d.id); |
| | | selectedGridData = gridData; |
| | | drawTextAndColor(gridData); |
| | | } else { |
| | | gridApi.fetchGridDataDetail(d.id, d.groupId).then((res) => { |
| | | gridDataDetailMap.set(d.id, res.data); |
| | | const gridData = res.data; |
| | | selectedGridData = gridData; |
| | | drawTextAndColor(gridData); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | function handleGridClick() { |
| | | gridVisible.value = !gridVisible.value; |
| | | gridVisible.value |
| | | ? map.add(mapViews.lastGridViews) |
| | | : map.remove(mapViews.lastGridViews); |
| | | } |
| | | |
| | | function handleUnderwayClick() { |
| | | underwayVisible.value = !underwayVisible.value; |
| | | underwayVisible.value ? draw() : mapLine.hideLine(); |
| | | } |
| | | |
| | | function handleRankClick() { |
| | | rankVisible.value = !rankVisible.value; |
| | | rankVisible.value ? map.add(mapViews.rankTxt) : map.remove(mapViews.rankTxt); |
| | | } |
| | | |
| | | function handleDataClick() { |
| | | dataVisible.value = !dataVisible.value; |
| | | dataVisible.value ? map.add(mapViews.dataTxt) : map.remove(mapViews.dataTxt); |
| | | } |
| | | |
| | | function handleColorClick() { |
| | | isStandardColor.value = !isStandardColor.value; |
| | | const { resGridViews, pointsRes } = SatelliteProxy.drawColor({ |
| | | gridViews: mapViews.gridViews, |
| | | points: mapViews.points, |
| | | gridDataDetail: selectedGridData, |
| | | lastGridViews: mapViews.lastGridViews, |
| | | customColor: !isStandardColor.value, |
| | | opacity: 1, |
| | | zIndex: 11 |
| | | }); |
| | | mapViews.lastGridViews = resGridViews; |
| | | mapViews.lastPoints = pointsRes; |
| | | } |
| | | |
| | | function handleOpacityClick() { |
| | | isOpacity.value = !isOpacity.value; |
| | | mapViews.lastGridViews.forEach((e) => { |
| | | e.setOptions({ |
| | | fillOpacity: isOpacity.value ? 0.1 : 1 |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | /**èµ°èªè½¨è¿¹*******************************************************************/ |
| | | import { FactorDatas } from '@/model/FactorDatas'; |
| | | import sector from '@/utils/map/sector'; |
| | | import mapLine from '@/utils/map/line'; |
| | | import mapUtil from '@/utils/map/util'; |
| | | import { fetchHistoryData } from '@/utils/factor/data'; |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | |
| | | onMounted(() => (isUnmounted.value = false)); |
| | | onUnmounted(() => { |
| | | mapUtil.clearMap(); |
| | | isUnmounted.value = true; |
| | | }); |
| | | |
| | | const { loading, fetchData } = useFetchData(10000); |
| | | |
| | | const isUnmounted = ref(false); |
| | | const deviceType = ref(undefined); |
| | | const drawMode = ref(0); |
| | | // çæµæ°æ® |
| | | const factorDatas = ref(new FactorDatas()); |
| | | // pm2.5 |
| | | const factorType = 6; |
| | | |
| | | function onFetchData(dType, data) { |
| | | if (isUnmounted.value) return; |
| | | // todo æ ¹æ®è®¾å¤ç±»å忢å°å¾çæµå åå±ç¤ºåéæ¡ãæçº¿å¾å¤éæ¡ãæ°æ®è¡¨æ ¼å¤éæ¡çå åç±»å |
| | | deviceType.value = dType; |
| | | factorDatas.value.setData(data, drawMode.value, () => { |
| | | factorDatas.value.refreshHeight(factorType.value); |
| | | }); |
| | | } |
| | | |
| | | function search(option) { |
| | | const { deviceType, deviceCode, startTime, endTime } = option; |
| | | // deviceType.value = deviceType; |
| | | // deviceCode.value = deviceCode; |
| | | const _startTime = moment(startTime).format('YYYY-MM-DD HH:mm:ss'); |
| | | const _endTime = moment(endTime).format('YYYY-MM-DD HH:mm:ss'); |
| | | fetchData((page, pageSize) => { |
| | | return fetchHistoryData({ |
| | | deviceType, |
| | | deviceCode, |
| | | startTime: _startTime, |
| | | endTime: _endTime, |
| | | page, |
| | | perPage: pageSize |
| | | }).then((res) => onFetchData(deviceType, res.data)); |
| | | }); |
| | | } |
| | | |
| | | function draw() { |
| | | // å·æ°å¾ä¾ |
| | | const factor = factorDatas.value.factor[factorType]; |
| | | sector.clearSector(); |
| | | factorDatas.value.refreshHeight(factorType); |
| | | mapLine.drawLine(factorDatas.value, factor); |
| | | } |
| | | </script> |