From 6ef4e73842c0e8fc79592db099e8c6e887a5597e Mon Sep 17 00:00:00 2001 From: bunny <1319900154@qq.com> Date: Mon, 21 Oct 2024 16:45:04 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=9A=80=20=E5=AE=9A=E6=97=B6?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=9A=82=E5=81=9C=E5=92=8C=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-lock.yaml | 9 +++++ src/api/v1/schedulers.ts | 10 +++++ src/store/scheduler/schedulers.ts | 14 ++++++- .../monitor/schedulerExecuteLog/index.vue | 21 ++++++++-- .../schedule-execute-log.vue | 20 ++++++---- .../schedulerExecuteLog/utils/columns.ts | 15 +++++-- .../schedulerExecuteLog/utils/hooks.ts | 1 - .../schedulerExecuteLog/utils/types.ts | 2 - src/views/scheduler/schedulers/index.vue | 14 ++++++- .../scheduler/schedulers/utils/columns.ts | 8 ++-- src/views/scheduler/schedulers/utils/hooks.ts | 40 +++++++++++++++++-- 11 files changed, 128 insertions(+), 26 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 978f9e0..7e8e057 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1239,46 +1239,55 @@ packages: resolution: {integrity: sha512-sWWgdQ1fq+XKrlda8PsMCfut8caFwZBmhYeoehJ05FdI0YZXk6ZyUjWLrIgbR/VgiGycrFKMMgp7eJ69HOF2pQ==} cpu: [arm] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm-musleabihf@4.21.1': resolution: {integrity: sha512-9OIiSuj5EsYQlmwhmFRA0LRO0dRRjdCVZA3hnmZe1rEwRk11Jy3ECGGq3a7RrVEZ0/pCsYWx8jG3IvcrJ6RCew==} cpu: [arm] os: [linux] + libc: [musl] '@rollup/rollup-linux-arm64-gnu@4.21.1': resolution: {integrity: sha512-0kuAkRK4MeIUbzQYu63NrJmfoUVicajoRAL1bpwdYIYRcs57iyIV9NLcuyDyDXE2GiZCL4uhKSYAnyWpjZkWow==} cpu: [arm64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-arm64-musl@4.21.1': resolution: {integrity: sha512-/6dYC9fZtfEY0vozpc5bx1RP4VrtEOhNQGb0HwvYNwXD1BBbwQ5cKIbUVVU7G2d5WRE90NfB922elN8ASXAJEA==} cpu: [arm64] os: [linux] + libc: [musl] '@rollup/rollup-linux-powerpc64le-gnu@4.21.1': resolution: {integrity: sha512-ltUWy+sHeAh3YZ91NUsV4Xg3uBXAlscQe8ZOXRCVAKLsivGuJsrkawYPUEyCV3DYa9urgJugMLn8Z3Z/6CeyRQ==} cpu: [ppc64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-riscv64-gnu@4.21.1': resolution: {integrity: sha512-BggMndzI7Tlv4/abrgLwa/dxNEMn2gC61DCLrTzw8LkpSKel4o+O+gtjbnkevZ18SKkeN3ihRGPuBxjaetWzWg==} cpu: [riscv64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-s390x-gnu@4.21.1': resolution: {integrity: sha512-z/9rtlGd/OMv+gb1mNSjElasMf9yXusAxnRDrBaYB+eS1shFm6/4/xDH1SAISO5729fFKUkJ88TkGPRUh8WSAA==} cpu: [s390x] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-gnu@4.21.1': resolution: {integrity: sha512-kXQVcWqDcDKw0S2E0TmhlTLlUgAmMVqPrJZR+KpH/1ZaZhLSl23GZpQVmawBQGVhyP5WXIsIQ/zqbDBBYmxm5w==} cpu: [x64] os: [linux] + libc: [glibc] '@rollup/rollup-linux-x64-musl@4.21.1': resolution: {integrity: sha512-CbFv/WMQsSdl+bpX6rVbzR4kAjSSBuDgCqb1l4J68UYsQNalz5wOqLGYj4ZI0thGpyX5kc+LLZ9CL+kpqDovZA==} cpu: [x64] os: [linux] + libc: [musl] '@rollup/rollup-win32-arm64-msvc@4.21.1': resolution: {integrity: sha512-3Q3brDgA86gHXWHklrwdREKIrIbxC0ZgU8lwpj0eEKGBQH+31uPqr0P2v11pn0tSIxHvcdOWxa4j+YvLNx1i6g==} diff --git a/src/api/v1/schedulers.ts b/src/api/v1/schedulers.ts index bf7bd4e..20c69aa 100644 --- a/src/api/v1/schedulers.ts +++ b/src/api/v1/schedulers.ts @@ -21,6 +21,16 @@ export const fetchUpdateSchedulers = (data: any) => { return http.request>('put', 'schedulers/updateSchedulers', { data }); }; +/** Schedulers视图---暂停任务 */ +export const fetchPauseSchedulers = (data: any) => { + return http.request>('put', 'schedulers/pauseSchedulers', { data }); +}; + +/** Schedulers视图---恢复任务 */ +export const fetchResumeSchedulers = (data: any) => { + return http.request>('put', 'schedulers/resumeSchedulers', { data }); +}; + /** Schedulers视图---删除Schedulers视图 */ export const fetchDeleteSchedulers = (data: any) => { return http.request>('delete', 'schedulers/deleteSchedulers', { data }); diff --git a/src/store/scheduler/schedulers.ts b/src/store/scheduler/schedulers.ts index 1ed0ab5..6123e5e 100644 --- a/src/store/scheduler/schedulers.ts +++ b/src/store/scheduler/schedulers.ts @@ -1,5 +1,5 @@ import { defineStore } from 'pinia'; -import { fetchAddSchedulers, fetchDeleteSchedulers, fetchGetAllScheduleJobList, fetchGetSchedulersList, fetchUpdateSchedulers } from '@/api/v1/schedulers'; +import { fetchAddSchedulers, fetchDeleteSchedulers, fetchGetAllScheduleJobList, fetchGetSchedulersList, fetchPauseSchedulers, fetchResumeSchedulers, fetchUpdateSchedulers } from '@/api/v1/schedulers'; import { pageSizes } from '@/enums/baseConstant'; import { storeMessage } from '@/utils/message'; import { storePagination } from '@/store/useStorePagination'; @@ -84,5 +84,17 @@ export const useSchedulersStore = defineStore('schedulersStore', { const result = await fetchDeleteSchedulers(data); return storeMessage(result); }, + + /** 暂停任务 */ + async pauseSchedulers(data: any) { + const result = await fetchPauseSchedulers(data); + return storeMessage(result); + }, + + /** 恢复任务 */ + async resumeSchedulers(data: any) { + const result = await fetchResumeSchedulers(data); + return storeMessage(result); + }, }, }); diff --git a/src/views/monitor/schedulerExecuteLog/index.vue b/src/views/monitor/schedulerExecuteLog/index.vue index 6eae185..ccb3ba3 100644 --- a/src/views/monitor/schedulerExecuteLog/index.vue +++ b/src/views/monitor/schedulerExecuteLog/index.vue @@ -1,6 +1,6 @@