<template>
  <el-card shadow="hover" v-loading="loading">
    <template #header>
      <span>已完成流程效率</span>
      <span class="sub-title">按平均耗时（分钟）</span>
    </template>
    <v-chart v-if="option" :option="option" autoresize style="height: 320px" />
    <el-empty v-else description="暂无数据" />
  </el-card>
</template>

<script setup lang="ts">
import VChart from 'vue-echarts'

defineProps<{
  option: any
  loading: boolean
}>()
</script>

<style scoped>
.sub-title {
  margin-left: 8px;
  font-size: 12px;
  color: #909399;
  font-weight: normal;
}
</style>
