From 53bcb7e5dffa071d2c6593f5db7f0b6e4e2f8dfe Mon Sep 17 00:00:00 2001
From: guoshilong <123456>
Date: Wed, 18 Oct 2023 16:17:02 +0800
Subject: [PATCH] 隐藏重复定时和连续执行
---
src/components/task/TaskPanel.vue | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/components/task/TaskPanel.vue b/src/components/task/TaskPanel.vue
index 7c5f05e..d3e4bc6 100644
--- a/src/components/task/TaskPanel.vue
+++ b/src/components/task/TaskPanel.vue
@@ -166,6 +166,7 @@
import { getErrorMessage } from '/@/utils/error-code/index'
import { commonColor } from '/@/utils/color'
import { ExclamationCircleOutlined, UploadOutlined } from '@ant-design/icons-vue'
+import { timestampToTime } from '/@/utils/time'
const store = useMyStore()
const workspaceId = localStorage.getItem(ELocalStorageKey.WorkspaceId)!
@@ -193,9 +194,17 @@
const searchQuery = reactive<TaskQueryParam>({
taskType: ''
})
+
+function getSearchTime (n:number) {
+ const nowStamp = new Date().getTime()
+ const timestamp = nowStamp + (n * 60 * 60 * 1000 * 24)
+ const time = timestampToTime(timestamp)
+ return time
+}
+
const statusArr = reactive([])
const timeRangeArr = reactive({
- data: [] as string[]
+ data: [getSearchTime(-3), getSearchTime(3)] as string[]
})
const body: IPage = {
@@ -222,13 +231,14 @@
{
title: '执行状态',
key: 'status',
- width: 150,
+ width: 80,
slots: { customRender: 'status' }
},
{
title: '计划名称',
dataIndex: 'job_name',
- width: 100,
+ ellipsis: true,
+ width: 170,
},
{
title: '设备名称',
@@ -343,6 +353,9 @@
}
function getPlans () {
+ searchQuery.startTime = timeRangeArr.data[0]
+ searchQuery.endTime = timeRangeArr.data[1]
+
console.log('计划查询请求参数', searchQuery)
tableLoading.value = true
getWaylineJobs(workspaceId, body, searchQuery).then(res => {
--
Gitblit v1.9.3