| | |
| | | <template #content> |
| | | <el-row> |
| | | <el-form :inline="true"> |
| | | <el-form-item label="走航融合"> |
| | | <!-- <el-form-item label="走航融合"> |
| | | <el-select |
| | | v-model="selectedfusionData" |
| | | multiple |
| | |
| | | :value="i" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | </el-form-item> --> |
| | | <!-- <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | |
| | | " |
| | | @click="handleFusionClick" |
| | | > |
| | | {{ '叠加融合' }} |
| | | {{ '叠加走航' }} |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form-item> --> |
| | | </el-form> |
| | | </el-row> |
| | | <el-row class="m-t-8" justify="space-between"> |
| | | <span>融合分析</span> |
| | | </el-row> |
| | | <el-form :inline="false"> |
| | | <el-form-item label="时段筛选"> |
| | | <el-select |
| | | v-model="selectedTimeSection" |
| | | multiple |
| | | clearable |
| | | placeholder="选择时段" |
| | | size="small" |
| | | style="width: 300px" |
| | | > |
| | | <el-option |
| | | v-for="(v, i) in timeSectionList" |
| | | :key="i" |
| | | :label="v" |
| | | :value="v" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="区域筛选"> |
| | | <el-select |
| | | v-model="selectedZone" |
| | | multiple |
| | | clearable |
| | | placeholder="选择区域" |
| | | size="small" |
| | | style="width: 300px" |
| | | > |
| | | <el-option |
| | | v-for="(v, i) in zoneList" |
| | | :key="i" |
| | | :label="v" |
| | | :value="v" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="背景筛选"> |
| | | <el-select |
| | | v-model="selectedPollutionDegree" |
| | | multiple |
| | | clearable |
| | | placeholder="选择背景" |
| | | size="small" |
| | | style="width: 300px" |
| | | > |
| | | <el-option |
| | | v-for="(v, i) in pollutionDegreeList" |
| | | :key="i" |
| | | :label="v" |
| | | :value="v" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div v-if="!gridCellList"> |
| | | <el-icon class="is-loading"><Loading /></el-icon> |
| | | 网格信息加载中... |
| | | </div> |
| | | <el-table |
| | | ref="tableRef" |
| | | :data="showFusionDataList" |
| | | table-layout="fixed" |
| | | size="default" |
| | | :show-overflow-tooltip="true" |
| | | border |
| | | height="50vh" |
| | | row-class-name="t-row-normal" |
| | | cell-class-name="t-cell" |
| | | header-row-class-name="t-header-row" |
| | | header-cell-class-name="t-header-cell" |
| | | :highlight-current-row="false" |
| | | @row-click="handleRowClick" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column width="40" v-if="!gridCellList"> |
| | | <template #default> |
| | | <el-icon class="is-loading"><Loading /></el-icon> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-else |
| | | type="selection" |
| | | :selectable="selectable" |
| | | width="40" |
| | | /> |
| | | <!-- <el-table-column |
| | | type="index" |
| | | label="序号" |
| | | width="30" |
| | | /> --> |
| | | <el-table-column |
| | | prop="dataTime" |
| | | label="时间" |
| | | align="center" |
| | | :formatter="timeFormatter" |
| | | width="120" |
| | | /> |
| | | <el-table-column |
| | | prop="missionCode" |
| | | label="任务编号" |
| | | align="center" |
| | | width="150" |
| | | /> |
| | | <el-table-column |
| | | prop="zone" |
| | | label="区域" |
| | | align="center" |
| | | width="50" |
| | | /> |
| | | <el-table-column |
| | | prop="pollutionDegree" |
| | | label="污染背景" |
| | | align="center" |
| | | width="70" |
| | | /> |
| | | </el-table> |
| | | |
| | | <div class="m-t-8">操作</div> |
| | | <el-row class="m-t-8"> |
| | | <el-space class="m-t-8 m-b-8"> |
| | | <!-- <el-button |
| | | type="primary" |
| | | class="el-button-custom" |
| | | size="small" |
| | | :disabled="!gridCellList || selectedfusionData.length == 0" |
| | | @click="handleFusionClick" |
| | | > |
| | | {{ '叠加走航' }} |
| | | </el-button> --> |
| | | <CheckButton |
| | | active-text="开启融合" |
| | | inactive-text="隐藏融合" |
| | | active-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> |
| | | </el-space> |
| | | </template> |
| | | <template #footer> </template> |
| | | </BaseCard> |
| | |
| | | </el-row> |
| | | </el-col> |
| | | </el-row> |
| | | <GridStyleTool :gridCtrls="gridCtrls"></GridStyleTool> |
| | | <GridStyleTool |
| | | :gridCtrls="gridCtrls" |
| | | @show-underway="handleUnderwayClick" |
| | | @on-delete="handleFusionDelete" |
| | | ></GridStyleTool> |
| | | </el-row> |
| | | <!-- </div> --> |
| | | </template> |
| | |
| | | import gridApi from '@/api/gridApi'; |
| | | import { SatelliteGrid } from '@/model/SatelliteGrid'; |
| | | import GridStyleTool from './component/GridStyleTool.vue'; |
| | | import { useGridStore } from '@/stores/grid-info'; |
| | | |
| | | const gridStore = useGridStore(); |
| | | |
| | | const satelliteGrid = new SatelliteGrid('走航融合'); |
| | | |
| | | const gridCtrls = ref([satelliteGrid]); |
| | | |
| | | // 借用卫星遥测模块中的100米网格 |
| | |
| | | const fusionLoading = ref(false); |
| | | const fusionDataList = ref([]); |
| | | const selectedfusionData = ref([]); |
| | | const tableRef = ref() |
| | | const selectable = (row) => gridCellList.value; |
| | | |
| | | const gridDataDetailMap = new Map(); |
| | | |
| | | const selectedTimeSection = ref([]); |
| | | const selectedZone = ref([]); |
| | | const selectedPollutionDegree = ref([]); |
| | | |
| | | const timeSectionList = computed(() => { |
| | | let res = []; |
| | | fusionDataList.value.forEach((e) => { |
| | | const hour = moment(e.dayTimePeriodStart).hour(); |
| | | const t = e.dayTimePeriod; |
| | | const option = { |
| | | value: t, |
| | | index: hour |
| | | }; |
| | | if (res.indexOf(option) == -1) { |
| | | res.push(option); |
| | | } |
| | | }); |
| | | res.sort((a, b) => { |
| | | return a.index - b.index; |
| | | }); |
| | | |
| | | const rMap = new Map(); |
| | | showFusionDataList.value.forEach((d) => { |
| | | if (!rMap.has(d.dayTimePeriod)) { |
| | | rMap.set(d.dayTimePeriod, 0); |
| | | } |
| | | rMap.set(d.dayTimePeriod, rMap.get(d.dayTimePeriod) + 1); |
| | | }); |
| | | |
| | | res = res.map((v) => { |
| | | const count = rMap.get(v.value); |
| | | return `${v.value} (${count})`; |
| | | }); |
| | | return res; |
| | | }); |
| | | |
| | | const zoneList = computed(() => { |
| | | let res = []; |
| | | fusionDataList.value.forEach((e) => { |
| | | const t = e.zone; |
| | | if (res.indexOf(t) == -1) { |
| | | res.push(t); |
| | | } |
| | | }); |
| | | const rMap = new Map(); |
| | | showFusionDataList.value.forEach((d) => { |
| | | if (!rMap.has(d.zone)) { |
| | | rMap.set(d.zone, 0); |
| | | } |
| | | rMap.set(d.zone, rMap.get(d.zone) + 1); |
| | | }); |
| | | |
| | | res = res.map((v) => { |
| | | const count = rMap.get(v); |
| | | return `${v} (${count})`; |
| | | }); |
| | | return res; |
| | | }); |
| | | |
| | | const pollutionDegreeList = computed(() => { |
| | | let res = []; |
| | | fusionDataList.value.forEach((e) => { |
| | | const t = e.pollutionDegree; |
| | | const option = { |
| | | value: t, |
| | | index: e.pollutionDegreeIndex |
| | | }; |
| | | if (res.indexOf(option) == -1) { |
| | | res.push(option); |
| | | } |
| | | }); |
| | | res.sort((a, b) => { |
| | | return a.index - b.index; |
| | | }); |
| | | const rMap = new Map(); |
| | | showFusionDataList.value.forEach((d) => { |
| | | if (!rMap.has(d.pollutionDegree)) { |
| | | rMap.set(d.pollutionDegree, 0); |
| | | } |
| | | rMap.set(d.pollutionDegree, rMap.get(d.pollutionDegree) + 1); |
| | | }); |
| | | |
| | | res = res.map((v) => { |
| | | const count = rMap.get(v.value); |
| | | return `${v.value} (${count})`; |
| | | }); |
| | | return res; |
| | | }); |
| | | |
| | | const showFusionDataList = computed(() => { |
| | | return fusionDataList.value.filter((v) => { |
| | | const b1 = |
| | | selectedTimeSection.value.length == 0 || |
| | | selectedTimeSection.value.indexOf(v.dayTimePeriod) != -1; |
| | | const b2 = |
| | | selectedZone.value.length == 0 || |
| | | selectedZone.value.indexOf(v.zone) != -1; |
| | | const b3 = |
| | | selectedPollutionDegree.value.length == 0 || |
| | | selectedPollutionDegree.value.indexOf(v.pollutionDegree) != -1; |
| | | |
| | | return b1 && b2 && b3; |
| | | }); |
| | | }); |
| | | // if ( |
| | | // selectedTimeSection.value.length == 0 && |
| | | // selectedZone.value.length == 0 && |
| | | // selectedPollutionDegree.value.length == 0 |
| | | // ) { |
| | | // return true; |
| | | // } else { |
| | | // const b1 = |
| | | // selectedTimeSection.value.indexOf( |
| | | // moment(v.dataTime).format('YYYY-MM-DD') |
| | | // ) != -1; |
| | | // const b2 = selectedZone.value.indexOf(v.zone) != -1; |
| | | // const b3 = selectedPollutionDegree.value.indexOf(v.pollutionDegree) != -1; |
| | | |
| | | // return b1 && b2 || b3; |
| | | // } |
| | | |
| | | const mixActive = ref(false); |
| | | const heatActive = ref(false); |
| | | const gridVisible = ref(true); |
| | | const underwayVisible = ref(false); |
| | | const rankVisible = ref(false); |
| | |
| | | const isStandardColor = ref(true); |
| | | const isOpacity = ref(false); |
| | | |
| | | function timeFormatter(value) { |
| | | return moment(value).format('YYYY-MM-DD'); |
| | | function timeFormatter(row, col, cellValue, index) { |
| | | return moment(cellValue).format('YYYY-MM-DD'); |
| | | } |
| | | |
| | | function fetchFusionData() { |
| | |
| | | // }); |
| | | // } |
| | | |
| | | function resetButton() { |
| | | gridVisible.value = true; |
| | | underwayVisible.value = false; |
| | | rankVisible.value = false; |
| | | dataVisible.value = false; |
| | | isStandardColor.value = true; |
| | | isOpacity.value = false; |
| | | } |
| | | |
| | | function prepareGrid(gridInfo) { |
| | | satelliteGrid.gridPrepare(gridInfo); |
| | | satelliteGrid.gridPrepare(gridInfo, (polygon) => { |
| | | //鼠标移入事件 |
| | | polygon.on('mouseover', () => { |
| | | polygon.setOptions({ |
| | | //修改多边形属性的方法 |
| | | strokeWeight: 2, |
| | | strokeColor: 'red' |
| | | }); |
| | | }); |
| | | //鼠标移出事件 |
| | | polygon.on('mouseout', () => { |
| | | polygon.setOptions({ |
| | | strokeWeight: 1, |
| | | strokeColor: 'white' |
| | | }); |
| | | }); |
| | | }); |
| | | // satelliteGrid.setGridEvent('click', (gridCell, gridDataDetail) => { |
| | | // // const polygon = e.target |
| | | // // const { gridCell } = polygon.getExtData(); |
| | | // // const cellIndex = gridCell.cellIndex; |
| | | // gridStore.selectedGridCellAndDataDetail = { |
| | | // gridCell, |
| | | // gridDataDetail |
| | | // }; |
| | | // }); |
| | | } |
| | | |
| | | // watch(mission, (nV, oV) => { |
| | |
| | | // resetButton(); |
| | | satelliteGrid.changeVisibility({ showGridViews: false }); |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | // const d = fusionDataList.value[i]; |
| | | const d = i; |
| | | if (gridDataDetailMap.has(d.id)) { |
| | | satelliteGrid.changeVisibility({ tags: [d.id], showGridViews: true }); |
| | | // gridCtrls.value = Array.from(satelliteGrid.mapViewsMap); |
| | |
| | | tag: d.id, |
| | | data: gdd, |
| | | extData: { |
| | | name: `走航网格 - ${d.mixDataId}` |
| | | name: `走航网格 - ${d.mixDataId}`, |
| | | type: 0 |
| | | } |
| | | }); |
| | | satelliteGrid.setGridEvent( |
| | | [d.id], |
| | | 'click', |
| | | (gridCell, gridDataDetail) => { |
| | | gridStore.selectedGridCellAndDataDetail = { |
| | | gridCell, |
| | | gridDataDetail |
| | | }; |
| | | } |
| | | ); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | // gridCtrls.value = Array.from(satelliteGrid.mapViewsMap); |
| | | // console.log(gridCtrls.value); |
| | |
| | | }); |
| | | } |
| | | |
| | | let mixTag; |
| | | function handleMixClick() { |
| | | mixActive.value = !mixActive.value; |
| | | const tags = fusionDataList.value |
| | | .filter((v, i) => selectedfusionData.value.indexOf(i) != -1) |
| | | .map((v) => v.id); |
| | | const tags = selectedfusionData.value.map((v) => v.id); |
| | | satelliteGrid.changeVisibility({ |
| | | showGridViews: false, |
| | | showDataTxt: false, |
| | | showRankTxt: false |
| | | }); |
| | | if (mixActive.value) { |
| | | satelliteGrid.mixGrid(tags); |
| | | mixTag = satelliteGrid.mixGrid(tags); |
| | | satelliteGrid.setGridEvent( |
| | | [mixTag], |
| | | 'click', |
| | | (gridCell, gridDataDetail) => { |
| | | gridStore.selectedGridCellAndDataDetail = { |
| | | gridCell, |
| | | gridDataDetail |
| | | }; |
| | | } |
| | | ); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | } else { |
| | | satelliteGrid.changeVisibility({ |
| | | tags, |
| | |
| | | } |
| | | } |
| | | |
| | | function handleGridClick() { |
| | | gridVisible.value = !gridVisible.value; |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | satelliteGrid.changeVisibility({ |
| | | tags: [d.id], |
| | | showGridViews: gridVisible.value |
| | | }); |
| | | let heatTag; |
| | | function handleHeatMapClick() { |
| | | heatActive.value = !heatActive.value; |
| | | satelliteGrid.changeVisibility({ |
| | | showGridViews: false, |
| | | showDataTxt: false, |
| | | showRankTxt: false |
| | | }); |
| | | if (heatActive.value) { |
| | | // heatTag = satelliteGrid.drawHeatGrid(mixTag); |
| | | // satelliteGrid.setGridEvent( |
| | | // [heatTag], |
| | | // 'click', |
| | | // (gridCell, gridDataDetail) => { |
| | | // gridStore.selectedGridCellAndDataDetail = { |
| | | // gridCell, |
| | | // gridDataDetail |
| | | // }; |
| | | // } |
| | | // ); |
| | | // gridCtrls.value = [satelliteGrid]; |
| | | |
| | | const data = satelliteGrid.gridDataDetailMap.get(mixTag); |
| | | gridApi.buildUnderwayHeatmap(3, data, 10).then((res) => { |
| | | heatTag = satelliteGrid.drawHeatGrid2(mixTag, res.data); |
| | | satelliteGrid.setGridEvent( |
| | | [heatTag], |
| | | 'click', |
| | | (gridCell, gridDataDetail) => { |
| | | gridStore.selectedGridCellAndDataDetail = { |
| | | gridCell, |
| | | gridDataDetail |
| | | }; |
| | | } |
| | | ); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | }); |
| | | } else { |
| | | satelliteGrid.changeVisibility({ |
| | | tags: [mixTag], |
| | | showGridViews: true |
| | | }); |
| | | } |
| | | } |
| | | |
| | | function handleUnderwayClick() { |
| | | function handleHeatMapSearchClick() { |
| | | const res = satelliteGrid.search( |
| | | { |
| | | groupId: 1, |
| | | cellId: 2893, |
| | | pm25: 50 |
| | | }, |
| | | 120, |
| | | 90, |
| | | 10, |
| | | 10, |
| | | 3 |
| | | ); |
| | | |
| | | console.log(res); |
| | | } |
| | | |
| | | function handleUnderwayClick({ isShow, dataId }) { |
| | | underwayVisible.value = !underwayVisible.value; |
| | | underwayVisible.value ? draw() : mapLine.hideLine(); |
| | | } |
| | | |
| | | function handleRankClick() { |
| | | rankVisible.value = !rankVisible.value; |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | satelliteGrid.changeVisibility({ |
| | | tags: [d.id], |
| | | showRankTxt: rankVisible.value |
| | | if (isShow) { |
| | | draw(dataId); |
| | | } else { |
| | | const d = fusionDataList.value.find((v) => v.id == dataId); |
| | | const mission = missionStore.missionList.find((v) => { |
| | | return v.missionCode == d.mixDataId; |
| | | }); |
| | | }); |
| | | mapLine.hideLine(mission.missionCode); |
| | | } |
| | | } |
| | | function handleFusionDelete(index, tag) { |
| | | const f = selectedfusionData.value.find((v) => v.id == tag); |
| | | if (f) { |
| | | // const i = selectedfusionData.value.indexOf(f); |
| | | // selectedfusionData.value.splice(i, 1); |
| | | tableRef.value.toggleRowSelection(f, false) |
| | | } |
| | | } |
| | | |
| | | function handleDataClick() { |
| | | dataVisible.value = !dataVisible.value; |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | satelliteGrid.changeVisibility({ |
| | | tags: [d.id], |
| | | showDataTxt: dataVisible.value |
| | | }); |
| | | function handleSelectionChange(val) { |
| | | const deleted = selectedfusionData.value.filter((v) => { |
| | | return val.indexOf(v) == -1; |
| | | }); |
| | | } |
| | | const deletedIdList = deleted.map((d) => d.id); |
| | | const added = val.filter((v) => { |
| | | return selectedfusionData.value.indexOf(v) == -1; |
| | | }); |
| | | // const addedIdList = added.map(d=>d.id) |
| | | |
| | | function handleColorClick() { |
| | | isStandardColor.value = !isStandardColor.value; |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | if (gridDataDetailMap.has(d.id)) { |
| | | satelliteGrid.changeGridColor({ |
| | | if (deletedIdList.length > 0) { |
| | | satelliteGrid.deleteTagGrid(deletedIdList); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | // satelliteGrid.changeVisibility({ tags: deletedIdList, showGridViews: false }); |
| | | } |
| | | |
| | | added.forEach((i) => { |
| | | const d = i; |
| | | gridApi.fetchGridDataDetail(d.id, d.groupId).then((res) => { |
| | | gridDataDetailMap.set(d.id, res.data); |
| | | const gdd = res.data; |
| | | satelliteGrid.drawTagGrid({ |
| | | tag: d.id, |
| | | useCustomColor: !isStandardColor.value, |
| | | opacity: 1, |
| | | zIndex: 11 |
| | | data: gdd, |
| | | extData: { |
| | | name: `走航网格 - ${d.mixDataId}`, |
| | | type: 0 |
| | | } |
| | | }); |
| | | } |
| | | satelliteGrid.setGridEvent( |
| | | [d.id], |
| | | 'click', |
| | | (gridCell, gridDataDetail) => { |
| | | gridStore.selectedGridCellAndDataDetail = { |
| | | gridCell, |
| | | gridDataDetail |
| | | }; |
| | | } |
| | | ); |
| | | gridCtrls.value = [satelliteGrid]; |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | function handleOpacityClick() { |
| | | isOpacity.value = !isOpacity.value; |
| | | satelliteGrid.changeGridOpacity({ opacityValue: isOpacity.value ? 0.1 : 1 }); |
| | | selectedfusionData.value = val; |
| | | } |
| | | |
| | | /**走航轨迹*******************************************************************/ |
| | |
| | | }); |
| | | } |
| | | |
| | | function draw() { |
| | | function draw(dataId) { |
| | | if (isUnmounted.value) return; |
| | | |
| | | selectedfusionData.value.forEach((i) => { |
| | | const d = fusionDataList.value[i]; |
| | | // selectedfusionData.value.forEach((i) => { |
| | | // const d = fusionDataList.value[i]; |
| | | |
| | | const mission = missionStore.missionList.find((v) => { |
| | | return v.missionCode == d.mixDataId; |
| | | }); |
| | | // const mission = missionStore.missionList.find((v) => { |
| | | // return v.missionCode == d.mixDataId; |
| | | // }); |
| | | |
| | | if (factorDataMap.has(mission.missionCode)) { |
| | | const fd = factorDataMap.get(mission.missionCode); |
| | | drawLine(mission.missionCode, fd); |
| | | } else { |
| | | search(mission).then((res) => { |
| | | const fd = new FactorDatas(); |
| | | fd.setData(res.data, drawMode.value, () => { |
| | | fd.refreshHeight(factorType.value); |
| | | factorDataMap.set(mission.missionCode, fd); |
| | | drawLine(mission.missionCode, fd); |
| | | }); |
| | | }); |
| | | } |
| | | // if (factorDataMap.has(mission.missionCode)) { |
| | | // const fd = factorDataMap.get(mission.missionCode); |
| | | // drawLine(mission.missionCode, fd); |
| | | // } else { |
| | | // search(mission).then((res) => { |
| | | // const fd = new FactorDatas(); |
| | | // fd.setData(res.data, drawMode.value, () => { |
| | | // fd.refreshHeight(factorType.value); |
| | | // factorDataMap.set(mission.missionCode, fd); |
| | | // drawLine(mission.missionCode, fd); |
| | | // }); |
| | | // }); |
| | | // } |
| | | // }); |
| | | |
| | | const d = fusionDataList.value.find((v) => v.id == dataId); |
| | | const mission = missionStore.missionList.find((v) => { |
| | | return v.missionCode == d.mixDataId; |
| | | }); |
| | | |
| | | if (factorDataMap.has(mission.missionCode)) { |
| | | const fd = factorDataMap.get(mission.missionCode); |
| | | drawLine(mission.missionCode, fd); |
| | | } else { |
| | | search(mission).then((res) => { |
| | | const fd = new FactorDatas(); |
| | | fd.setData(res.data, drawMode.value, () => { |
| | | fd.refreshHeight(factorType.value); |
| | | factorDataMap.set(mission.missionCode, fd); |
| | | drawLine(mission.missionCode, fd); |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | function drawLine(missionCode, fd) { |
| | |
| | | mapLine.drawTagLine(missionCode, fd, factor); |
| | | } |
| | | </script> |
| | | <style scoped></style> |
| | | <style scoped> |
| | | :deep(.el-table) { |
| | | --el-table-bg-color: transparent; |
| | | --el-table-row-hover-bg-color: var(--select_color); |
| | | --el-table-current-row-bg-color: var(--select_color); |
| | | /* --el-table-current-row-bg-color: #7dff5d96; */ |
| | | --el-table-text-color: var(--font-color); |
| | | } |
| | | |
| | | :deep(.t-row-normal) { |
| | | cursor: pointer; |
| | | background-color: transparent !important; |
| | | } |
| | | |
| | | :deep(.t-cell) { |
| | | /* background: red !important; */ |
| | | /* height: 40px; |
| | | border: 1px solid black; */ |
| | | } |
| | | |
| | | :deep(.t-header-row) { |
| | | } |
| | | |
| | | :deep(.t-header-cell) { |
| | | background-color: var(--bg-color-2) !important; |
| | | /* text-align: center !important; */ |
| | | color: white !important; |
| | | } |
| | | </style> |