riku
2025-11-05 08ffcf9d7ffafaa82d8de7f9b5fcfdb49e9c3688
src/views/sourcetrace/SourceTrace.vue
@@ -232,15 +232,44 @@
    type3: 0
  };
  streams.value.forEach((v) => {
    let b2, b3;
    // 判断监测因子类型是否选中
    for (const key in v.pollutedData.statisticMap) {
      const value = v.pollutedData.statisticMap[key];
      b2 = b2 || selectedFactorTypes.value.indexOf(value.factorId) != -1;
    }
    // 判断场景类型是否选中
    if (
      v.pollutedSource == undefined ||
      v.pollutedSource.sceneList.length == 0
    ) {
      b3 = selectedSceneTypes.value.indexOf(NO_SCENE) != -1;
    } else {
      b3 =
        v.pollutedSource.sceneList.findIndex(
          (v) => selectedSceneTypes.value.indexOf(v.typeId) != -1
        ) != -1;
    }
    switch (v._type) {
      case '1':
        count.type1++;
        if (b2 && b3) {
          count.type1++;
        }
        break;
      case '2':
        count.type2++;
        b3 =
          v.sortedSceneList.findIndex(
            (v) => selectedSceneTypes.value.indexOf(v.first.typeId) != -1
          ) != -1;
        if (b3) {
          count.type2++;
        }
        break;
      case '3':
        count.type3++;
        if (b2 && b3) {
          count.type3++;
        }
        break;
    }
  });