riku
2025-06-13 b2f563e557d7b19334b6591a00001e3fb522da21
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
<template>
  <!-- <div class="border-r-small"> -->
  <BaseCard>
    <el-row justify="space-between">
      <div ref="titleRef" class="font-large">综合风险评估</div>
      <!-- <OptionTime v-model="time"></OptionTime> -->
    </el-row>
    <RiskCount></RiskCount>
    <RiskArea></RiskArea>
  </BaseCard>
  <!-- </div> -->
</template>
 
<script>
import { unCalc } from '@/utils/css-util'
import RiskCount from './component/RiskCount.vue'
import RiskArea from './component/RiskArea.vue'
/**
 * 对完成的任务进行评估风险,显示高风险场景,显示复核的场景的情况
 */
export default {
  components: { RiskCount, RiskArea },
  props: {
    height: {
      type: String,
      default: '200'
    }
  },
  data() {
    return {
      tableData: [],
      tableHeight: '200'
    }
  },
  watch: {
    height(nV, oV) {
      if (nV != oV) {
        this.tableHeight = this.calcTableHeight()
      }
    }
  },
  methods: {
    calcTableHeight() {
      const h1 = this.$refs.titleRef.offsetHeight
      // const h2 = this.$refs.statisticRef.$el.offsetHeight
      const h = h1
      const r = `calc(${unCalc(this.height)} - ${h}px)`
      return r
    }
  },
  mounted() {
    this.tableHeight = this.calcTableHeight()
  }
}
</script>
 
<style scoped></style>