| | |
| | | <!-- 任务算法统计 --> |
| | | <template> |
| | | <div class="task-industry"> |
| | | <div class="title">机巢事件前五数量占比</div> |
| | | <div class="title">机巢事件数量占比</div> |
| | | <div class="chart" ref="chartRef"></div> |
| | | </div> |
| | | </template> |
| | |
| | | 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', |
| | | }, |
| | | }, |
| | | }, |
| | |
| | | }) |
| | | } |
| | | |
| | | 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' }) |
| | | }) |