无人机管理后台前端(已迁走)
张含笑
2025-07-21 3be2e099bbc05e902dfcfabc403ade0a2aba8ef4
src/views/job/components/TaskTop/TaskEvent.vue
@@ -81,7 +81,7 @@
      {
         name: '任务',
         type: 'bar',
         barWidth: 8,
         barWidth: 6,
         itemStyle: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
               { offset: 0, color: '#FF8902' },
@@ -92,7 +92,7 @@
      {
         name: '事件',
         type: 'bar',
         barWidth: 8,
         barWidth: 6,
         itemStyle: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
               { offset: 0, color: '#4363FF' },
@@ -105,7 +105,12 @@
// 获取行业统计数据
const getJobEventBar = value => {
   jobEventBar(value).then(res => {
  const params = {
    ...value,
    status_list:value.status,
    status:undefined
  }
   jobEventBar(params).then(res => {
      if (res.data.code !== 0) return
      option.xAxis.data = res.data.data.map(item => item.name)
      option.series[0].data = res.data?.data.map(item => item.data[0].value)
@@ -132,11 +137,13 @@
<style lang="scss" scoped>
.task-event {
width: 529px;
   width: 0;
   flex: 1;
   height: 100%;
   margin-left: 9px;
   margin-left: 10px;
   background: #FFFFFF;
   border-radius: 8px 8px 8px 8px;
   .title {
      padding: 10px 0 10px 16px;
      width: 144px;
@@ -147,11 +154,12 @@
      color: #363636;
      line-height: 18px;
   }
   .chart {
      padding: 6px 0px;
      width: 100%;
      height: 166px;
   }
}
</style>