riku
2025-07-18 306ef09707d6bcf9ffa67de55f86ab6f4362deee
src/views/sourcetrace/component/ClueRecordItem.vue
@@ -30,7 +30,9 @@
            round
            class="m-r-4"
          >
            <div v-html="formatFactorName(item.pollutedData.factorName)"></div>
            <div
              v-html="formatFactorName(item.pollutedData.statisticMap)"
            ></div>
          </el-tag>
          <el-text type="info">
            {{ item.pollutedData.exception + ',' }}
@@ -100,11 +102,13 @@
            round
            class="m-r-4"
          >
            <div v-html="formatFactorName(item.pollutedData.factorName)"></div>
            <div
              v-html="formatFactorName(item.pollutedData.statisticMap)"
            ></div>
          </el-tag>
          <el-text type="info">{{ item.pollutedData.exception }}</el-text>
        </div>
        <div v-if="item.pollutedSource.sceneList.length > 0">
        <!-- <div v-if="item.pollutedSource.sceneList.length > 0">
          <div v-for="s in item.pollutedSource.sceneList" :key="s.guid">
            <img style="width: 24px" :src="sceneIcon(s.typeId)" :alt="s.type" />
            <el-text
@@ -117,24 +121,8 @@
              {{ s.name }}
            </el-text>
          </div>
        </div>
        </div> -->
      </el-col>
      <!-- <el-row justify="space-between">
        <el-space>
          <el-tag type="info" effect="dark" size="small">提醒</el-tag>
          <el-text type="info">{{
            item.pollutedData.startTime + ' - ' + item.pollutedData.endTime
          }}</el-text>
        </el-space>
        <el-link type="info" @click="emits('open', item)"> 详情 </el-link>
      </el-row>
      <el-col :span="24">
        <el-tag effect="plain" type="info" size="small" hit round class="m-r-4">
          <div v-html="formatFactorName(item.pollutedData.factorName)"></div>
        </el-tag>
        <el-text type="info">{{ item.pollutedData.exception }}</el-text>
      </el-col> -->
    </el-row>
  </div>
</template>
@@ -180,27 +168,33 @@
  }
}
function formatFactorName(name) {
  switch (name) {
    case 'PM25':
      return 'PM<sub>2.5</sub>';
    // return '<span>PM2.5</span>';
    case 'PM10':
      return 'PM<sub>10</sub>';
    case 'NO2':
      return 'NO<sub>2</sub>';
    case 'H2S':
      return 'H<sub>2</sub>S';
    case 'SO2':
      return 'SO<sub>2</sub>';
    case 'O3':
      return 'O<sub>3</sub>';
    case 'VOC':
      return 'VOC<sub>s</sub>';
    default:
      break;
function formatFactorName(statisticMap) {
  const mapName = (n) => {
    switch (n) {
      case 'PM25':
        return 'PM<sub>2.5</sub>';
      case 'PM10':
        return 'PM<sub>10</sub>';
      case 'NO2':
        return 'NO<sub>2</sub>';
      case 'H2S':
        return 'H<sub>2</sub>S';
      case 'SO2':
        return 'SO<sub>2</sub>';
      case 'O3':
        return 'O<sub>3</sub>';
      case 'VOC':
        return 'VOC<sub>s</sub>';
      default:
        return '';
    }
  };
  let name = [];
  for (const key in statisticMap) {
    const value = statisticMap[key];
    name.push(mapName(value.factorName));
  }
  return name.join('、');
}
function handleSetCenter(item, scene) {