<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>
|