riku
2025-10-16 87e19b5a396ac8fed6a551828b87d263f6425c31
src/views/sourcetrace/component/PollutedExceptionItem.vue
@@ -38,7 +38,7 @@
        <div>
          <el-text type="info">
            <el-icon><MapLocation /></el-icon>
            {{ '风险区域:' + item.pollutedArea.address }}
            {{ '风险区域:' + riskRegion }}
          </el-text>
        </div>
        <!-- <div>
@@ -52,7 +52,7 @@
            异常类型:{{ item.pollutedData.exception }}
          </el-text>
        </div>
        <div v-for="s in item.pollutedData.statisticMap" :key="s">
        <div v-for="s in item.pollutedData.statisticMap" :key="s.factorId">
          <el-row style="border-top: 1px solid white">
            <el-col :span="6">
              <el-statistic title="突变因子" :value="s.factorName" />
@@ -77,10 +77,19 @@
              <el-statistic
                title="平均风速"
                :value="item.pollutedData.windSpeed"
                :precision="1"
                suffix="m/s"
              />
            </el-col>
          </el-row>
          <RealTimeLineChart
            v-for="(item1, index1) in s._chartOptions"
            :key="index1"
            :model-value="item1"
            chart-height="80px"
            :y-min-interval="20"
            :exception-index-arr="exceptionIndexArr"
          ></RealTimeLineChart>
        </div>
        <el-row justify="space-between">
          <!-- <el-link
@@ -97,13 +106,6 @@
                  </el-link> -->
        </el-row>
        <!-- <div style="width: 320px; height: 80px"> -->
        <RealTimeLineChart
          v-for="(item1, index1) in item._chartOptions"
          :key="index1"
          :model-value="item1"
          chart-height="80px"
          :y-min-interval="20"
        ></RealTimeLineChart>
        <!-- </div> -->
        <div class="border-dashed">
          <el-icon color="#ffbc58" size="20"><WarningFilled /></el-icon>
@@ -122,13 +124,38 @@
  </CardDialog> -->
</template>
<script setup>
import { ref } from 'vue';
import { ref, computed } from 'vue';
const props = defineProps({
  modelValue: Boolean,
  item: Object
});
const exceptionIndexArr = computed(() => {
  const indexArr = [];
  props.item.pollutedData.dataVoList.forEach((e) => {
    const i = props.item.pollutedData.historyDataList.findIndex(
      (v) => v.time == e.time
    );
    indexArr.push([i - 1 < 0 ? 0 : i - 1, i]);
  });
  return indexArr;
});
const riskRegion = computed(() => {
  const _riskRegion = [];
  if (props.item.pollutedArea.address) {
    _riskRegion.push(props.item.pollutedArea.address);
  }
  if (props.item.pollutedArea.streetNumber) {
    _riskRegion.push(props.item.pollutedArea.streetNumber);
  }
  if (props.item.pollutedArea.roadinter) {
    _riskRegion.push(props.item.pollutedArea.roadinter);
  }
  return _riskRegion.join(',');
});
const emits = defineEmits(['showMarksAndPolygon', 'update:modelValue']);
function showMarksAndPolygon(item) {