riku
2025-07-16 c23ac06446a9a1edc41cc13723e5d0b8eabdfd63
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,7 +102,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 }}</el-text>
        </div>
@@ -119,22 +123,6 @@
          </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,11 +168,11 @@
  }
}
function formatFactorName(name) {
  switch (name) {
function formatFactorName(statisticMap) {
  const mapName = (n) => {
    switch (n) {
    case 'PM25':
      return 'PM<sub>2.5</sub>';
    // return '<span>PM2.5</span>';
    case 'PM10':
      return 'PM<sub>10</sub>';
    case 'NO2':
@@ -197,10 +185,16 @@
      return 'O<sub>3</sub>';
    case 'VOC':
      return 'VOC<sub>s</sub>';
    default:
      break;
        return '';
  }
  };
  let name = [];
  for (const key in statisticMap) {
    const value = statisticMap[key];
    name.push(mapName(value.factorName));
  }
  return name.join('、');
}
function handleSetCenter(item, scene) {