riku
2025-07-23 fe7fd6e4b1450c01faba724bb22b1d050e896c92
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<template>
  <div style="width: 68vw; height: 600px; background-color: aliceblue">
    <SceneMap :data="scenes">
      <template #left-top>
        <FYOptionSupervisionStatus
          label=""
          :allOption="true"
          v-model:value="supervisionStatus"
        ></FYOptionSupervisionStatus>
      </template>
    </SceneMap>
  </div>
</template>
<script setup>
import { ref, computed } from 'vue';
 
const props = defineProps({
  // 场景计划
  plans: {
    type: Array,
    default: () => []
  },
  dayTasks: {
    type: Array,
    default: () => []
  }
});
 
const supervisionStatus = ref();
 
const scenes = computed(() => {
  return props.plans
    .filter((v) => {
      // 按照监管状态筛选
      if (supervisionStatus.value) {
        switch (supervisionStatus.value.value) {
          case '0':
            return (
              v.extension1 == undefined ||
              v.extension1 == null ||
              v.extension1 == '0'
            );
          case '1':
            return v.extension1 == '1';
          case '2':
            return v.extension1 == '2';
          default:
            return true;
        }
      } else {
        return true
      }
      // if (supervisionStatus.value) {
      //   supervisionStatus.value;
      // } else {
      //   return true;
      // }
    })
    .map((p) => {
      return p.scene;
    });
});
</script>