无人机管理后台前端(已迁走)
罗广辉
2025-10-11 02409bfbe15f22fc3b5dccadabfd860a660a49d9
src/views/job/components/TaskTop/TaskIndustry.vue
@@ -1,7 +1,7 @@
<!-- 任务算法统计 -->
<template>
   <div class="task-industry">
      <div class="title">机巢事件前五数量占比</div>
      <div class="title">机巢事件数量占比</div>
      <div class="chart" ref="chartRef"></div>
   </div>
</template>
@@ -39,24 +39,24 @@
         name: '机巢事件统计',
         type: 'pie',
         // roseType: 'radius',
         radius: ['40%', '70%'],
         radius: ['36%', '60%'],
         // center: ['50%', '45%'],
         // radius: '70%', // 设置饼图的半径
         center: ['50%', '50%'], // 调整饼图位置
         center: ['50%', '36%'], // 调整饼图位置
         data: [],
         label: {
            show: true,
            position: 'outside',
            formatter: '{c}',
            fontSize: 12,
            color: '#fff',
            color: '#000',
         },
         labelLine: {
            show: true,
            length: 5,
            length2: 8,
            length: 10,
            length2: 10,
            lineStyle: {
               color: '#fff',
               color: '#000',
            },
         },
      },
@@ -78,17 +78,15 @@
   })
}
const changeKey = inject('changeKey')
// 添加监听
watch(
   () => store.state.task.taskSearchParams,
   newVal => {
      if (newVal) {
         getIndustryJobNumPieChart(newVal)
      }
   },
   { deep: true }
  () => [store.state.task.taskSearchParams,changeKey.value],
  () => getIndustryJobNumPieChart(store.state.task.taskSearchParams),
  { deep: true }
)
onMounted(() => {
   getIndustryJobNumPieChart({ date_enum: 'TODAY' })
})