riku
2024-08-23 1788c96aea9247cc36ef8b82734997f1a6a92fb4
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
<template>
  <el-row class="wrap">
    <el-col span="" class="flex-col">
      <el-row justify="end">
        <CardButton
          name="实时趋势"
          direction="left"
          @click="() => (show = !show)"
        ></CardButton>
      </el-row>
      <FactorCheckbox
        v-show="show"
        direction="right"
        vertical
        borderless-direction="r"
        v-model="selectFactorType"
        :device-type="deviceType"
      ></FactorCheckbox>
    </el-col>
    <el-col v-show="show" span="">
      <el-row align="bottom">
        <FactorTrend
          :factor-datas="factorDatas"
          :device-type="deviceType"
          :select-factor-type="selectFactorType"
        ></FactorTrend>
      </el-row>
    </el-col>
  </el-row>
</template>
<script>
import { TYPE0 } from '@/constant/device-type';
import { defaultFactorTypes } from '@/constant/checkbox-options';
import { FactorDatas } from '@/model/FactorDatas';
 
export default {
  props: {
    loading: Boolean,
    factorDatas: FactorDatas,
    deviceType: {
      type: String,
      // type0: 车载或无人机; type1:无人船
      default: TYPE0
    }
  },
  data() {
    return {
      selectFactorType: defaultFactorTypes(this.deviceType),
      show: true
    };
  }
};
</script>
<style scoped>
.flex-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
</style>