From c832bf2e80ac465e71b7a1c1f7a59d4252030989 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 05 Aug 2025 17:33:08 +0800
Subject: [PATCH] feat:事件工单滚动条

---
 src/views/job/components/TaskTop/TaskEvent.vue |   26 ++++++++++++--------------
 1 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/src/views/job/components/TaskTop/TaskEvent.vue b/src/views/job/components/TaskTop/TaskEvent.vue
index 3ea7c62..8de8062 100644
--- a/src/views/job/components/TaskTop/TaskEvent.vue
+++ b/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)
@@ -114,20 +119,13 @@
 	})
 }
 
+const changeKey = inject('changeKey')
 // 添加监听
 watch(
-	() => store.state.task.taskSearchParams,
-	newVal => {
-		if (newVal) {
-			getJobEventBar(newVal)
-		}
-	},
-	{ deep: true }
+  () => [store.state.task.taskSearchParams, changeKey.value],
+  () => getJobEventBar(store.state.task.taskSearchParams),
+  { deep: true }
 )
-
-onMounted(() => {
-	getJobEventBar({ date_enum: 'TODAY' })
-})
 </script>
 
 <style lang="scss" scoped>

--
Gitblit v1.9.3