From 02409bfbe15f22fc3b5dccadabfd860a660a49d9 Mon Sep 17 00:00:00 2001
From: 罗广辉 <guanghui.luo@foxmail.com>
Date: Sat, 11 Oct 2025 10:37:14 +0800
Subject: [PATCH] feat: 名称修改
---
src/views/job/components/TaskTop/TaskEvent.vue | 35 ++++++++++++++++++-----------------
1 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/src/views/job/components/TaskTop/TaskEvent.vue b/src/views/job/components/TaskTop/TaskEvent.vue
index aa3895d..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,29 +119,24 @@
})
}
+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>
.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 +147,12 @@
color: #363636;
line-height: 18px;
}
+
.chart {
padding: 6px 0px;
width: 100%;
height: 166px;
-
+
}
}
</style>
--
Gitblit v1.9.3