| | |
| | | ElTable: typeof import('element-plus/es')['ElTable'] |
| | | ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] |
| | | ElText: typeof import('element-plus/es')['ElText'] |
| | | ElUpload: typeof import('element-plus/es')['ElUpload'] |
| | | FactorCheckbox: typeof import('./components/monitor/FactorCheckbox.vue')['default'] |
| | | FactorLegend: typeof import('./components/monitor/FactorLegend.vue')['default'] |
| | | FactorRadio: typeof import('./components/monitor/FactorRadio.vue')['default'] |
| | |
| | | |
| | | // 卫星遥测网格 |
| | | export const usesatelliteGridStore = defineStore('satelliteGrid', () => { |
| | | const gridGropiList = ref([]); |
| | | const { loading, fetchData } = useFetchData(); |
| | | // 网格信息 |
| | | const gridInfo = ref([]); |
| | | // 网格数据组 |
| | | const gridDataList = ref([]); |
| | | |
| | | function fetchGridGroup(area) { |
| | | return fetchData((page, pageSize) => { |
| | | return gridApi.fetchGridGroup(area, page, pageSize).then((res) => { |
| | | return res; |
| | | }); |
| | | // 获取网格信息 |
| | | function fetchGridCell(groupId) { |
| | | return gridApi.fetchGridCell(groupId).then((res) => { |
| | | gridInfo.value = res.data; |
| | | }); |
| | | } |
| | | |
| | | // 获取遥测单日数据信息 |
| | | function fetchGridData(groupId) { |
| | | return gridApi.fetchGridData(groupId).then((res) => { |
| | | gridDataList.value = res.data; |
| | | }); |
| | | } |
| | | |
| | | // 获取遥测单日具体网格监测数据 |
| | | function fetchGridDataDetail(gridData) { |
| | | return gridApi |
| | | .fetchGridDataDetail(gridData.id, gridData.groupId) |
| | | .then((res) => { |
| | | gridData.dataDetail = res.data; |
| | | }); |
| | | } |
| | | |
| | | return { |
| | | gridInfo, |
| | | gridDataList, |
| | | fetchGridCell, |
| | | fetchGridData, |
| | | fetchGridDataDetail |
| | | }; |
| | | }); |
| | |
| | | function GridAnimation() { |
| | | // 帧动画控制工具 |
| | | this.frameAnimation = new FrameAnimation(); |
| | | this.frameAnimation.fps = 6; |
| | | this.frameAnimation.fps = 4; |
| | | this.frameAnimation.timeout = 1000; |
| | | // 地图绘制图形缓存 |
| | | this.mapViews = {}; |
| | | // 两天之间的卫星遥测动画播放时间 |
| | |
| | | }, |
| | | |
| | | drawGridColor(gridViews, texts, factorName) { |
| | | // new Promise((resolve, reject) => { |
| | | // 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 |
| | | // ); |
| | | // resolve({ g, _color, color }); |
| | | // }); |
| | | // }).then((res) => { |
| | | // const { g, _color, color } = res; |
| | | // g.setOptions({ |
| | | // fillColor: _color, |
| | | // fillOpacity: color[3] |
| | | // }); |
| | | // }); |
| | | gridViews.forEach((g, i) => { |
| | | const data = parseFloat(texts[i]); |
| | | const { color, nextColor, range, nextRange } = |