| | |
| | | ElFormItem: typeof import('element-plus/es')['ElFormItem'] |
| | | ElIcon: typeof import('element-plus/es')['ElIcon'] |
| | | ElInput: typeof import('element-plus/es')['ElInput'] |
| | | ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] |
| | | 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'] |
| | | ElSpace: typeof import('element-plus/es')['ElSpace'] |
| | | ElSwitch: typeof import('element-plus/es')['ElSwitch'] |
| | | ElTable: typeof import('element-plus/es')['ElTable'] |
| | | ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] |
| | |
| | | constructor(name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | // å°å¾ç½æ ¼ç¸å
³å¯¹è±¡ |
| | | // é»è®¤å°å¾ç½æ ¼ç¸å
³å¯¹è±¡ |
| | | mapViews; |
| | | |
| | | mapViewsList = []; |
| | | gridDataDetail; |
| | | |
| | | infoMap = new Map(); |
| | | |
| | | // å°å¾ç½æ ¼å¯¹è±¡Mapç»æï¼åå¨å¯¹åºkeyä¸çç½æ ¼å¯¹è±¡ãç½æ ¼åæ ä¿¡æ¯ |
| | | mapViewsMap = new Map(); |
| | | |
| | | // ç½æ ¼æ°æ®Mapç»æï¼åå¨å¯¹åºkeyä¸çç½æ ¼çæµæ°æ®ä¿¡æ¯ |
| | | gridDataDetailMap = new Map(); |
| | | |
| | | districtPolygon; |
| | | |
| | | firstEvent; |
| | | |
| | | events = new Map(); |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | firstEvent; |
| | | |
| | | // ç»å¶ç½æ ¼çº¿ |
| | | drawPolyline(gridInfo, event) { |
| | |
| | | points, |
| | | gridDataDetail, |
| | | lastGridViews, |
| | | opacity, |
| | | zIndex, |
| | | customColor |
| | | customColor, |
| | | style |
| | | }) { |
| | | // æ ¹æ®æ°æ®çéææ°æ®çç½æ ¼ |
| | | const res = []; |
| | | // 以å对åºçä¸å¿ç¹åæ |
| | | const pointsRes = []; |
| | | // ç½æ ¼æç
§å
¶ç¼å·ååºæåï¼ç¶å计ç®ç¼å·åä¸è¡¨çåå·®å¼ |
| | | const offset = gridViews[0].getExtData().gridCell.cellIndex - 0; |
| | | |
| | | gridDataDetail.forEach((d) => { |
| | | // æ ¹æ®æ°æ®å
³èçç½æ ¼ç¼å·ï¼æ¾å°å¯¹åºç½æ ¼ |
| | | const cellId = d.cellId; |
| | |
| | | '饿µæ°æ®çç½æ ¼ç´¢å¼ç¼å·è¶
åºç½æ ¼ç»èå´ï¼æ°æ®åç½æ ¼ç»å¯è½ä¸å¯¹åº' |
| | | ); |
| | | } |
| | | res.push(gridViews[cellId - 1]); |
| | | pointsRes.push(points[cellId - 1]); |
| | | res.push(gridViews[cellId - offset]); |
| | | pointsRes.push(points[cellId - offset]); |
| | | }); |
| | | |
| | | // æ ¹æ®ç»å¶é¢è²æ¹å¼ç»å¶ç½æ ¼ |
| | |
| | | resGridViews = gridMapUtil.drawGridColorCustom( |
| | | res, |
| | | gridDataDetail, |
| | | opacity, |
| | | zIndex |
| | | style.opacity |
| | | ); |
| | | } else { |
| | | resGridViews = gridMapUtil.drawGridColor( |
| | | res, |
| | | gridDataDetail, |
| | | 'PM25', |
| | | opacity, |
| | | zIndex |
| | | style |
| | | ); |
| | | } |
| | | |
| | |
| | | |
| | | // ç»å¶ç½æ ¼é¥ææ°æ®å¼åç½æ ¼é¢è² |
| | | drawGrid({ |
| | | gridDataDetail, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt, |
| | | useDataTxtColor, |
| | | mapViews |
| | | mapViews, |
| | | data, |
| | | grid = { useCustomColor: false, style: { opacity: 1, zIndex: 11 } }, |
| | | dataTxt = { isShow: false, useCustomColor: false, useColor: false }, |
| | | rankTxt = { isShow: false } |
| | | }) { |
| | | const _mapViews = mapViews ? mapViews : this.mapViews; |
| | | // SatelliteProxy.clearText(mapViews); |
| | | this.gridDataDetail = data; |
| | | const { resGridViews, pointsRes } = this.drawColor({ |
| | | gridViews: _mapViews.gridViews, |
| | | points: _mapViews.points, |
| | | gridDataDetail: gridDataDetail, |
| | | gridDataDetail: data, |
| | | lastGridViews: _mapViews.lastGridViews, |
| | | customColor: useCustomColor, |
| | | opacity: opacity, |
| | | zIndex: zIndex |
| | | customColor: grid.useCustomColor, |
| | | style: grid.style |
| | | }); |
| | | _mapViews.lastGridViews = resGridViews; |
| | | _mapViews.lastPoints = pointsRes; |
| | | |
| | | // æ°æ®æ è®° |
| | | const { textViews: dataTxt, labelsLayer: dataLayer } = this.drawDataText( |
| | | const { textViews: dtv } = this.drawDataText( |
| | | _mapViews.lastPoints, |
| | | gridDataDetail, |
| | | data, |
| | | _mapViews.dataTxt, |
| | | useCustomColor, |
| | | useDataTxtColor |
| | | dataTxt.useCustomColor, |
| | | dataTxt.useColor |
| | | ); |
| | | _mapViews.dataTxt = dataTxt; |
| | | _mapViews.dataLayer = dataLayer; |
| | | _mapViews.dataTxt = dtv; |
| | | |
| | | const { textViews: rankTxt, labelsLayer: rankLayer } = this.drawRankText( |
| | | const { textViews: rtv } = this.drawRankText( |
| | | _mapViews.lastPoints, |
| | | gridDataDetail, |
| | | data, |
| | | _mapViews.rankTxt, |
| | | _mapViews.rankLayer |
| | | ); |
| | | _mapViews.rankTxt = rankTxt; |
| | | _mapViews.rankLayer = rankLayer; |
| | | _mapViews.rankTxt = rtv; |
| | | |
| | | if (showDataTxt) { |
| | | if (dataTxt.isShow) { |
| | | map.add(_mapViews.dataTxt); |
| | | } |
| | | |
| | | if (showRankTxt) { |
| | | if (rankTxt.isShow) { |
| | | map.add(_mapViews.rankTxt); |
| | | } |
| | | } |
| | | |
| | | // |
| | | drawGrids({ |
| | | gridDataDetailList, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt |
| | | }) { |
| | | if (this.mapViewsList.length < gridDataDetailList.length) { |
| | | let index = this.mapViewsList.length; |
| | | while (index < gridDataDetailList.length) { |
| | | const newMapViews = { |
| | | gridViews: gridMapUtil.drawPolylines({ |
| | | points: this.mapViews.gridPoints, |
| | | event: this.firstEvent |
| | | }), |
| | | gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)), |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)) |
| | | }; |
| | | this.mapViewsList.push(newMapViews); |
| | | } |
| | | } |
| | | |
| | | this.mapViewsList.forEach((m, i) => { |
| | | this.drawGrid({ |
| | | gridDataDetail: gridDataDetailList[i], |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt, |
| | | mapViews: m |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | drawNewGrid({ |
| | | gridDataDetail, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt |
| | | }) { |
| | | const newMapViews = { |
| | | gridViews: gridMapUtil.drawPolylines({ |
| | | points: this.mapViews.gridPoints, |
| | | event: this.firstEvent |
| | | }), |
| | | gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)), |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)) |
| | | }; |
| | | this.mapViewsList.push(newMapViews); |
| | | this.drawGrid({ |
| | | gridDataDetail, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt, |
| | | mapViews: newMapViews |
| | | }); |
| | | } |
| | | drawTagGrid({ |
| | | tag, |
| | | gridDataDetail, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt |
| | | }) { |
| | | /** |
| | | * æ ¹æ®tagæ ç¾ï¼å±ç¤ºå·²æçç½æ ¼æç»å¶ä¸ç»æ°çç½æ ¼ |
| | | * @param {Object} param0 { |
| | | * tag, æ ç¾ |
| | | * gridDataDetail, ç½æ ¼æ°æ®æ°ç» |
| | | * useCustomColor, æ¯å¦ä½¿ç¨å¯¹æ¯è² |
| | | * opacity, éæåº¦ï¼åå¼[0, 1] |
| | | * zIndex, å°å¾æ¾ç¤ºå±çº§ |
| | | * showDataTxt, æ¯å¦æ¾ç¤ºæ°æ®ææ¬ |
| | | * showRankTxt, æ¯å¦æ¾ç¤ºæåææ¬ |
| | | * extData, èªå®ä¹é¢å¤ä¿¡æ¯å¯¹è±¡ |
| | | * } |
| | | */ |
| | | drawTagGrid({ tag, data, grid, dataTxt, rankTxt, extData }) { |
| | | if (!this.mapViewsMap.has(tag)) { |
| | | const newMapViews = { |
| | | gridViews: gridMapUtil.drawPolylines({ |
| | | points: this.mapViews.gridPoints, |
| | | event: this.firstEvent |
| | | }), |
| | | gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)), |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)) |
| | | }; |
| | | const newMapViews = this._createNewMapViews({ extData }); |
| | | this.infoMap.set(tag, extData); |
| | | this.mapViewsMap.set(tag, newMapViews); |
| | | this.gridDataDetailMap.set(tag, data); |
| | | } |
| | | const _mapViews = this.mapViewsMap.get(tag); |
| | | this.drawGrid({ |
| | | gridDataDetail, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | showDataTxt, |
| | | showRankTxt, |
| | | mapViews: _mapViews |
| | | mapViews: _mapViews, |
| | | data, |
| | | grid, |
| | | dataTxt, |
| | | rankTxt |
| | | }); |
| | | } |
| | | |
| | | // è°æ´åç±»å°å¾è¦çç©çå¯è§æ§ |
| | | changeVisibility({ tag, showGridViews, showDataTxt, showRankTxt }) { |
| | | let _mapViewsList = []; |
| | | if (this.mapViews) { |
| | | _mapViewsList.push(this.mapViews); |
| | | } |
| | | if (tag && this.mapViewsMap.has(tag)) { |
| | | _mapViewsList.push(this.mapViewsMap.get(tag)); |
| | | } else { |
| | | this.mapViewsMap.forEach((v) => { |
| | | _mapViewsList.push(v); |
| | | }); |
| | | } |
| | | changeVisibility({ tags = [], showGridViews, showDataTxt, showRankTxt }) { |
| | | let { _mapViewsList } = this._getMapViews(...tags); |
| | | |
| | | if (showGridViews != undefined) { |
| | | if (showGridViews) { |
| | | // map.add(this.mapViews.lastGridViews); |
| | |
| | | } |
| | | |
| | | changeGridOpacity({ tag, isOpacity, opacityValue }) { |
| | | let _mapViewsList = []; |
| | | if (this.mapViews) { |
| | | _mapViewsList.push(this.mapViews); |
| | | } |
| | | if (tag && this.mapViewsMap.has(tag)) { |
| | | _mapViewsList.push(this.mapViewsMap.get(tag)); |
| | | } else { |
| | | this.mapViewsMap.forEach((v) => { |
| | | _mapViewsList.push(v); |
| | | }); |
| | | } |
| | | let { _mapViewsList } = tag ? this._getMapViews(tag) : this._getMapViews(); |
| | | |
| | | _mapViewsList.forEach((v) => { |
| | | if (v.lastGridViews) { |
| | | v.lastGridViews.forEach((e) => { |
| | |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | changeGridColor({ |
| | | tag, |
| | | useCustomColor, |
| | | opacity, |
| | | zIndex, |
| | | isMixGridHighlight |
| | | }) { |
| | | let { _mapViewsList, _gridDataDetailList } = this._getMapViews(tag); |
| | | if (_mapViewsList.length == _gridDataDetailList.length) { |
| | | _mapViewsList.forEach((v, i) => { |
| | | if (v.lastGridViews) { |
| | | const lastGridDataDetail = _gridDataDetailList[i]; |
| | | if (useCustomColor) { |
| | | gridMapUtil.drawGridColorCustom( |
| | | v.lastGridViews, |
| | | lastGridDataDetail, |
| | | { opacity, zIndex } |
| | | ); |
| | | } else { |
| | | gridMapUtil.drawGridColor( |
| | | v.lastGridViews, |
| | | lastGridDataDetail, |
| | | 'PM25', |
| | | { opacity, zIndex, isMixGridHighlight } |
| | | ); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | setGridEvent(name, event) { |
| | |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * å°å¤ç»ç½æ ¼è¿è¡èå |
| | | * éå çç½æ ¼è¿è¡çæµæ°æ®åå¼è®¡ç®å¹¶éæ°è®¡ç®å¯¹åºé¢è²ï¼å½¢ææ°çä¸ç»èåç½æ ¼ |
| | | * @param {...String} tags éè¦èåçç½æ ¼æ ç¾ï¼å½ä¸ºç©ºæ¶ï¼é»è®¤èåææç½æ ¼ |
| | | */ |
| | | mixGrid(tags) { |
| | | tags.sort((a, b) => { |
| | | return a < b ? -1 : 1; |
| | | }); |
| | | const mixTag = tags.join('-'); |
| | | if (this.mapViewsMap.has(mixTag)) { |
| | | this.changeVisibility({ |
| | | tag: mixTag, |
| | | showGridViews: true |
| | | }); |
| | | } else { |
| | | // const mixMapViews = this._createNewMapViews(); |
| | | // æ ¹æ®æ ç¾tagï¼è·å对åºå¤ç»ç½æ ¼æ°æ® |
| | | let { _gridDataDetailList } = this._getMapViews(...tags); |
| | | const _dataMap = new Map(); |
| | | // å°æ¯ç»æ¯ä¸ªç½æ ¼æ°æ®æç
§ç½æ ¼ç¼å·è¿è¡åç±»ï¼ç¸åç½æ ¼çæ°ç»å½éè³ä¸èµ· |
| | | _gridDataDetailList.forEach((list) => { |
| | | list.forEach((gdd) => { |
| | | if (!_dataMap.has(gdd.cellId)) { |
| | | _dataMap.set(gdd.cellId, { |
| | | source: [], |
| | | res: {} |
| | | }); |
| | | } |
| | | _dataMap.get(gdd.cellId).source.push(gdd); |
| | | }); |
| | | }); |
| | | // è®¡ç®æ¯ä¸ªç½æ ¼ä¸çæ°æ®åå¼ |
| | | const resGridDataDetail = []; |
| | | _dataMap.forEach((v, k) => { |
| | | let total = 0, |
| | | count = v.source.length; |
| | | v.source.forEach((s) => { |
| | | total += s.pm25; |
| | | }); |
| | | v.res = { |
| | | isMixData: true, |
| | | groupId: v.source[0].groupId, |
| | | cellId: v.source[0].cellId, |
| | | pm25: count == 0 ? null : Math.round((total / count) * 10) / 10, |
| | | originData: v.source |
| | | }; |
| | | // æ°æ®éè¶
è¿1个æ¶ï¼è¡¨æè¯¥ç½æ ¼æ°æ®æ¯èåçï¼å±ç¤ºé«äº®çæ ·å¼ |
| | | if (count > 1) { |
| | | v.res.gridStyle = { |
| | | strokeWeight: 2, |
| | | strokeColor: 'blue' |
| | | }; |
| | | } |
| | | resGridDataDetail.push(v.res); |
| | | }); |
| | | // éæ°æç
§çæµæ°æ®æåºå¹¶æ è®°æå |
| | | resGridDataDetail.sort((a, b) => { |
| | | return b.pm25 - a.pm25; |
| | | }); |
| | | resGridDataDetail.forEach((gdd, i) => { |
| | | gdd.rank = i + 1; |
| | | }); |
| | | |
| | | this.drawTagGrid({ |
| | | tag: mixTag, |
| | | data: resGridDataDetail, |
| | | grid: { |
| | | style: { |
| | | isMixGridHighlight: true |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | return mixTag; |
| | | } |
| | | |
| | | _getMapViews(...tags) { |
| | | let _mapViewsList = [], |
| | | _gridDataDetailList = []; |
| | | if (tags.length > 0) { |
| | | tags.forEach((tag) => { |
| | | if (this.mapViewsMap.has(tag) && this.gridDataDetailMap.has(tag)) { |
| | | _mapViewsList.push(this.mapViewsMap.get(tag)); |
| | | _gridDataDetailList.push(this.gridDataDetailMap.get(tag)); |
| | | } |
| | | }); |
| | | } else { |
| | | this.mapViewsMap.forEach((v) => { |
| | | _mapViewsList.push(v); |
| | | }); |
| | | this.gridDataDetailMap.forEach((v) => { |
| | | _gridDataDetailList.push(v); |
| | | }); |
| | | if (this.mapViews && this.gridDataDetail) { |
| | | _mapViewsList.push(this.mapViews); |
| | | _gridDataDetailList.push(this.gridDataDetail); |
| | | } |
| | | } |
| | | |
| | | return { _mapViewsList, _gridDataDetailList }; |
| | | } |
| | | |
| | | _createNewMapViews({ extData }) { |
| | | return { |
| | | gridViews: gridMapUtil.drawPolylines({ |
| | | points: this.mapViews.gridPoints, |
| | | event: this.firstEvent |
| | | }), |
| | | gridPoints: JSON.parse(JSON.stringify(this.mapViews.gridPoints)), |
| | | points: JSON.parse(JSON.stringify(this.mapViews.points)), |
| | | extData |
| | | }; |
| | | } |
| | | } |
| | |
| | | * @param {string} factorName çæµå ååç§° |
| | | * @param {number} opacity éæåº¦ |
| | | */ |
| | | drawGridColor(gridViews, gridDataDetail, factorName, opacity, zIndex) { |
| | | drawGridColor(gridViews, gridDataDetail, factorName, style) { |
| | | let { strokeWeight, strokeColor, opacity, zIndex } = style; |
| | | const res = []; |
| | | // éå嫿饿µæ°æ®æ°ç» |
| | | gridDataDetail.forEach((d, i) => { |
| | |
| | | nextColor.map((v) => v * 255), |
| | | ratio |
| | | ); |
| | | |
| | | const _extData = grid.getExtData(); |
| | | grid.setOptions({ |
| | | zIndex: zIndex ? zIndex : 10, |
| | | fillColor: _color, |
| | | fillOpacity: opacity ? opacity : color[3] == 0 ? 0 : 0.7 |
| | | ...style, |
| | | fillColor: _color, //å¤è¾¹å½¢å¡«å
é¢è² |
| | | fillOpacity: style.opacity ? style.opacity : color[3] == 0 ? 0 : 1, |
| | | extData: { |
| | | ..._extData, |
| | | gridData: d |
| | | } |
| | | }); |
| | | if (d.gridStyle && style.isMixGridHighlight) { |
| | | const _strokeWeight = d.gridStyle.strokeWeight; |
| | | const _strokeColor = d.gridStyle.strokeColor; |
| | | grid.setOptions({ |
| | | strokeWeight: _strokeWeight, //线æ¡å®½åº¦ï¼é»è®¤ä¸º 1 |
| | | strokeColor: _strokeColor //线æ¡é¢è² |
| | | }); |
| | | } |
| | | |
| | | res.push(grid); |
| | | } |
| | |
| | | return res; |
| | | }, |
| | | |
| | | drawGridColorCustom(gridViews, gridDataDetail, opacity) { |
| | | drawGridColorCustom(gridViews, gridDataDetail, style) { |
| | | const { strokeWeight, strokeColor, opacity, zIndex } = style; |
| | | |
| | | var max, min; |
| | | gridDataDetail.forEach((t) => { |
| | | if (!t.pm25) return; |
| | |
| | | ratio |
| | | ); |
| | | grid.setOptions({ |
| | | fillColor: _color, |
| | | fillOpacity: opacity ? opacity : color[3] == 0 ? 0 : 0.7 |
| | | ...style, |
| | | fillColor: _color, //å¤è¾¹å½¢å¡«å
é¢è² |
| | | fillOpacity: style.opacity ? style.opacity : color[3] == 0 ? 0 : 0.7 |
| | | }); |
| | | |
| | | res.push(grid); |
| | |
| | | <template> |
| | | <div class="p-events-none m-t-2"> |
| | | <el-row justify="space-between"> |
| | | <el-row class="wrap"> |
| | | <el-col span="2"> |
| | | <el-row> |
| | | <BaseCard v-show="show" size="medium" direction="left"> |
| | | <template #content> |
| | | <el-row> |
| | | <el-form :inline="true"> |
| | | <el-form-item label="èµ°èªèå"> |
| | | <el-select |
| | | v-model="selectedfusionData" |
| | | multiple |
| | | clearable |
| | | @change="handleChange" |
| | | placeholder="鿩任å¡" |
| | | size="small" |
| | | style="width: 160px" |
| | | :loading="fusionLoading" |
| | | > |
| | | <el-option |
| | | v-for="(s, i) in fusionDataList" |
| | | :key="i" |
| | | :label="s.mixDataId" |
| | | :value="i" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | :disabled=" |
| | | !gridCellList || selectedfusionData.length == 0 |
| | | " |
| | | @click="handleFusionClick" |
| | | > |
| | | {{ 'å å èå' }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-row> |
| | | <div class="m-t-8">æä½</div> |
| | | <el-row class="m-t-8"> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleRankClick" |
| | | > |
| | | {{ mixActive ? 'åæ¶' : 'æ¾ç¤ºæå' }} |
| | | </el-button> |
| | | <CheckButton |
| | | active-text="åæ¶èå" |
| | | inactive-text="éèèå" |
| | | :default-value="false" |
| | | @change="handleMixClick" |
| | | > |
| | | </CheckButton> |
| | | </el-row> |
| | | <div class="m-t-8">ç½æ ¼è¦ç´ </div> |
| | | <el-row class="m-t-8"> |
| | | <CheckButton |
| | | active-text="æ¾ç¤ºç½æ ¼" |
| | | inactive-text="éèç½æ ¼" |
| | | :default-value="true" |
| | | @change="handleGridClick" |
| | | > |
| | | </CheckButton> |
| | | <!-- <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" |
| | | @click="handleRankClick" |
| | | > |
| | | {{ rankVisible ? 'éèæå' : 'æ¾ç¤ºæå' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleDataClick" |
| | | > |
| | | {{ dataVisible ? 'éèæ°æ®' : 'æ¾ç¤ºæ°æ®' }} |
| | | </el-button> |
| | | </el-row> |
| | | <div class="m-t-8">ç½æ ¼æ ·å¼</div> |
| | | <el-row class="m-t-8"> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleOpacityClick" |
| | | > |
| | | {{ !isOpacity ? 'éæå' : 'åæ¶éæå' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleColorClick" |
| | | > |
| | | {{ isStandardColor ? 'ç»å¶å¯¹æ¯è²' : 'ç»å¶æ åè²' }} |
| | | </el-button> |
| | | </el-row> |
| | | <div class="m-t-8">èµ°èªè¦ç´ </div> |
| | | <el-row class="m-t-8"> |
| | | <!-- <el-divider content-position="left"></el-divider> --> |
| | | <!-- <div class="p-events-none m-t-2"> --> |
| | | <el-row justify="space-between"> |
| | | <el-row class="wrap"> |
| | | <el-col span="2"> |
| | | <el-row> |
| | | <BaseCard v-show="show" size="medium" direction="left"> |
| | | <template #content> |
| | | <el-row> |
| | | <el-form :inline="true"> |
| | | <el-form-item label="èµ°èªèå"> |
| | | <el-select |
| | | v-model="selectedfusionData" |
| | | multiple |
| | | clearable |
| | | @change="handleChange" |
| | | placeholder="鿩任å¡" |
| | | size="small" |
| | | style="width: 160px" |
| | | :loading="fusionLoading" |
| | | > |
| | | <el-option |
| | | v-for="(s, i) in fusionDataList" |
| | | :key="i" |
| | | :label="s.mixDataId" |
| | | :value="i" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | :disabled=" |
| | | !gridCellList || selectedfusionData.length == 0 |
| | | " |
| | | @click="handleFusionClick" |
| | | > |
| | | {{ 'å å èå' }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-row> |
| | | <div class="m-t-8">æä½</div> |
| | | <el-row class="m-t-8"> |
| | | <CheckButton |
| | | active-text="å¼å¯èå" |
| | | inactive-text="éèèå" |
| | | :default-value="false" |
| | | @change="handleMixClick" |
| | | > |
| | | </CheckButton> |
| | | </el-row> |
| | | <div class="m-t-8">ç½æ ¼è¦ç´ </div> |
| | | <el-row class="m-t-8"> |
| | | <CheckButton |
| | | active-text="æ¾ç¤ºç½æ ¼" |
| | | inactive-text="éèç½æ ¼" |
| | | :default-value="true" |
| | | @change="handleGridClick" |
| | | > |
| | | </CheckButton> |
| | | <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-row> |
| | | <div class="m-t-8">ç½æ ¼æ ·å¼</div> |
| | | <el-row class="m-t-8"> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleOpacityClick" |
| | | > |
| | | {{ !isOpacity ? 'éæå' : 'åæ¶éæå' }} |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | @click="handleColorClick" |
| | | > |
| | | {{ isStandardColor ? 'ç»å¶å¯¹æ¯è²' : 'ç»å¶æ åè²' }} |
| | | </el-button> |
| | | </el-row> |
| | | <div class="m-t-8">èµ°èªè¦ç´ </div> |
| | | <el-row class="m-t-8"> |
| | | <!-- <el-divider content-position="left"></el-divider> --> |
| | | |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | :loading="missionLoading || loading" |
| | | @click="handleUnderwayClick" |
| | | > |
| | | {{ underwayVisible ? 'éèèµ°èªè·¯çº¿' : 'æ¾ç¤ºèµ°èªè·¯çº¿' }} |
| | | </el-button> |
| | | </el-row> |
| | | </template> |
| | | <template #footer> </template> |
| | | </BaseCard> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col span="2"> |
| | | <el-row> |
| | | <CardButton |
| | | name="èµ°èªèå" |
| | | direction="right" |
| | | @click="() => (show = !show)" |
| | | ></CardButton> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | :loading="missionLoading || loading" |
| | | @click="handleUnderwayClick" |
| | | > |
| | | {{ underwayVisible ? 'éèèµ°èªè·¯çº¿' : 'æ¾ç¤ºèµ°èªè·¯çº¿' }} |
| | | </el-button> |
| | | </el-row> |
| | | </template> |
| | | <template #footer> </template> |
| | | </BaseCard> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col span="2"> |
| | | <el-row> |
| | | <CardButton |
| | | name="èµ°èªèå" |
| | | direction="right" |
| | | @click="() => (show = !show)" |
| | | ></CardButton> |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <GridStyleTool :gridCtrls="gridCtrls"></GridStyleTool> |
| | | </el-row> |
| | | <!-- </div> --> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, onMounted, onUnmounted, watch } from 'vue'; |
| | | import { ref, onMounted, onUnmounted, watch, computed } from 'vue'; |
| | | import moment from 'moment'; |
| | | import gridApi from '@/api/gridApi'; |
| | | import { SatelliteGrid } from '@/model/SatelliteGrid'; |
| | | import GridStyleTool from './component/GridStyleTool.vue'; |
| | | |
| | | const satelliteGrid = new SatelliteGrid(); |
| | | const satelliteGrid = new SatelliteGrid('èµ°èªèå'); |
| | | |
| | | const gridCtrls = ref([satelliteGrid]); |
| | | |
| | | // åç¨å«æé¥æµæ¨¡åä¸ç100ç±³ç½æ ¼ |
| | | const props = defineProps({ |
| | |
| | | |
| | | const gridDataDetailMap = new Map(); |
| | | |
| | | const mixActive = ref(false); |
| | | const gridVisible = ref(true); |
| | | const underwayVisible = ref(false); |
| | | const rankVisible = ref(false); |
| | |
| | | satelliteGrid.gridPrepare(gridInfo); |
| | | } |
| | | |
| | | // ç»å¶ç½æ ¼é¥ææ°æ®å¼åç½æ ¼é¢è² |
| | | function drawGrid(gridDataDetail) { |
| | | satelliteGrid.drawGrid({ gridDataDetail, opacity: 1, zIndex: 11 }); |
| | | } |
| | | |
| | | // watch(mission, (nV, oV) => { |
| | | // if (nV != oV) { |
| | | // checkUnderwayFusionResult(); |
| | |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | if (gridDataDetailMap.has(d.id)) { |
| | | // const gdd = gridDataDetailMap.get(d.id); |
| | | // satelliteGrid.drawTagGrid({ |
| | | // tag: d.id, |
| | | // gridDataDetail: gdd, |
| | | // opacity: 1, |
| | | // zIndex: 11 |
| | | // }); |
| | | satelliteGrid.changeVisibility({ tag: d.id, showGridViews: true }); |
| | | satelliteGrid.changeVisibility({ tags: [d.id], showGridViews: true }); |
| | | // gridCtrls.value = Array.from(satelliteGrid.mapViewsMap); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | } else { |
| | | gridApi.fetchGridDataDetail(d.id, d.groupId).then((res) => { |
| | | gridDataDetailMap.set(d.id, res.data); |
| | | const gdd = res.data; |
| | | satelliteGrid.drawTagGrid({ |
| | | tag: d.id, |
| | | gridDataDetail: gdd, |
| | | opacity: 1, |
| | | zIndex: 11 |
| | | data: gdd, |
| | | extData: { |
| | | name: `èµ°èªç½æ ¼ - ${d.mixDataId}` |
| | | } |
| | | }); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | // gridCtrls.value = Array.from(satelliteGrid.mapViewsMap); |
| | | // console.log(gridCtrls.value); |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function handleMixClick(params) {} |
| | | function handleMixClick() { |
| | | mixActive.value = !mixActive.value; |
| | | const tags = fusionDataList.value |
| | | .filter((v, i) => selectedfusionData.value.indexOf(i) != -1) |
| | | .map((v) => v.id); |
| | | satelliteGrid.changeVisibility({ |
| | | showGridViews: false, |
| | | showDataTxt: false, |
| | | showRankTxt: false |
| | | }); |
| | | if (mixActive.value) { |
| | | satelliteGrid.mixGrid(tags); |
| | | } else { |
| | | satelliteGrid.changeVisibility({ |
| | | tags, |
| | | showGridViews: true |
| | | }); |
| | | } |
| | | } |
| | | |
| | | function handleGridClick() { |
| | | gridVisible.value = !gridVisible.value; |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | satelliteGrid.changeVisibility({ |
| | | tag: d.id, |
| | | tags: [d.id], |
| | | showGridViews: gridVisible.value |
| | | }); |
| | | }); |
| | |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | satelliteGrid.changeVisibility({ |
| | | tag: d.id, |
| | | tags: [d.id], |
| | | showRankTxt: rankVisible.value |
| | | }); |
| | | }); |
| | |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | satelliteGrid.changeVisibility({ |
| | | tag: d.id, |
| | | tags: [d.id], |
| | | showDataTxt: dataVisible.value |
| | | }); |
| | | }); |
| | |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | if (gridDataDetailMap.has(d.id)) { |
| | | const gdd = gridDataDetailMap.get(d.id); |
| | | satelliteGrid.drawTagGrid({ |
| | | satelliteGrid.changeGridColor({ |
| | | tag: d.id, |
| | | gridDataDetail: gdd, |
| | | useCustomColor: !isStandardColor.value, |
| | | opacity: 1, |
| | | zIndex: 11 |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-row class="wrap"> |
| | | <el-col span="2"> |
| | | <el-row> |
| | | <CardButton |
| | | name="ç½æ ¼æ ·å¼" |
| | | direction="left" |
| | | @click="() => (show = !show)" |
| | | ></CardButton> |
| | | </el-row> |
| | | </el-col> |
| | | <el-col span="2"> |
| | | <BaseCard v-show="show" direction="right" borderless="r"> |
| | | <template #content> |
| | | <div class="content-wrap"> |
| | | <div v-for="(g, i) in gridCtrlList" :key="i"> |
| | | {{ g.name }} |
| | | <div v-for="(value, t) in g.views" :key="t"> |
| | | <!-- {{ value[0] }} --> |
| | | {{ value[1].extData.name }} |
| | | <!-- {{ key }} --> |
| | | <!-- <el-text>{{ g.name }}</el-text> --> |
| | | <!-- <div class="m-t-8">ç½æ ¼è¦ç´ </div> --> |
| | | <el-row class="m-t-8"> |
| | | <CheckButton |
| | | active-text="æ¾ç¤ºç½æ ¼" |
| | | inactive-text="éèç½æ ¼" |
| | | :default-value="true" |
| | | @change="handleGridClick" |
| | | > |
| | | </CheckButton> |
| | | <CheckButton |
| | | active-text="æ¾ç¤ºæå" |
| | | inactive-text="éèæå" |
| | | :default-value="false" |
| | | @change="handleGridClick" |
| | | > |
| | | </CheckButton> |
| | | <CheckButton |
| | | active-text="æ¾ç¤ºæ°æ®" |
| | | inactive-text="éèæ°æ®" |
| | | :default-value="false" |
| | | @change="handleGridClick" |
| | | > |
| | | </CheckButton> |
| | | </el-row> |
| | | <el-row class="m-b-8" gap="2"> |
| | | <div class="m-t-8">ç½æ ¼éæåº¦</div> |
| | | <el-slider |
| | | v-model="opacityValue" |
| | | :min="0" |
| | | :max="1" |
| | | :step="0.1" |
| | | show-stops |
| | | @change="handleOpacityChange" |
| | | style="width: 200px" |
| | | /> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </BaseCard> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | <script setup> |
| | | /** |
| | | * ç½æ ¼æ ·å¼æ§å¶å·¥å
· |
| | | */ |
| | | import { ref, watch, computed } from 'vue'; |
| | | |
| | | const props = defineProps({ |
| | | // ç½æ ¼ç®¡ç对象[SatelliteGrid]æ°ç» |
| | | gridCtrls: { |
| | | type: Array, |
| | | default: () => [] |
| | | } |
| | | }); |
| | | |
| | | const gridCtrlList = computed(() => { |
| | | return props.gridCtrls.map((g) => { |
| | | return { |
| | | name: g.name, |
| | | views: Array.from(g.mapViewsMap) |
| | | }; |
| | | }); |
| | | }); |
| | | |
| | | // watch( |
| | | // () => props.gridCtrls, |
| | | // (nV, oV) => { |
| | | // gridCtrlList.value = nV.map((v) => { |
| | | // return Array.from(v.infoMap); |
| | | // }); |
| | | // }, |
| | | // { deep: true } |
| | | // ); |
| | | |
| | | const show = ref(true); |
| | | |
| | | const gridVisible = ref(false); |
| | | const rankVisible = ref(false); |
| | | const dataVisible = ref(false); |
| | | const isStandardColor = ref(true); |
| | | const isOpacity = ref(false); |
| | | const opacityValue = ref(0.7); |
| | | |
| | | const emits = defineEmits([ |
| | | 'showRank', |
| | | 'showData', |
| | | 'changeColor', |
| | | 'changeOpacity' |
| | | ]); |
| | | |
| | | function handleRankClick() { |
| | | rankVisible.value = !rankVisible.value; |
| | | emits('showRank', rankVisible.value); |
| | | } |
| | | |
| | | function handleDataClick() { |
| | | dataVisible.value = !dataVisible.value; |
| | | emits('showData', dataVisible.value); |
| | | } |
| | | |
| | | function handleColorClick() { |
| | | isStandardColor.value = !isStandardColor.value; |
| | | emits('changeColor', isStandardColor.value); |
| | | } |
| | | |
| | | function handleOpacityClick() { |
| | | // isOpacity.value = !isOpacity.value; |
| | | // emits('changeOpacity', isOpacity.value); |
| | | } |
| | | |
| | | function handleOpacityChange(value) { |
| | | emits('changeOpacity', value); |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .content-wrap { |
| | | min-width: 300px; |
| | | min-height: 600px; |
| | | } |
| | | </style> |