From 914c18aa66a7fbde2d54a05cdf583138bf7f230b Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期日, 27 十月 2024 16:59:19 +0800 Subject: [PATCH] 计划任务更新 --- src/api/tigerapi/system.ts | 26 +++++++++++++++++++++----- 1 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/api/tigerapi/system.ts b/src/api/tigerapi/system.ts index 3dababe..069cfb2 100644 --- a/src/api/tigerapi/system.ts +++ b/src/api/tigerapi/system.ts @@ -31,9 +31,8 @@ pParams, } from './model/systemModel'; import { defHttp } from '/@/utils/http/axios'; -import { isArray, isNullOrEmpty, isNullOrUnDef, isTimeViaRegExp8601 } from '/@/utils/is'; +import { isArray, isNullOrEmpty, isTimeViaRegExp8601 } from '/@/utils/is'; import { isNumber } from 'xe-utils'; -import { dateUtil, formatToDateTime } from '/@/utils/dateUtil'; export enum Api { QueryUrl = '/Base/Query', @@ -66,6 +65,8 @@ StartJob = '/Tsk/StartJob', StopJob = '/Tsk/PauseJob', AddJob = '/Tsk/AddJob', + AddTskJob = '/Tsk/AddTskJob', + RemoveTskJob = '/Tsk/RemoveTskJob', UpdateJob = '/Tsk/UpdateJob', SaveTskJob = '/Tsk/SaveTskJob', urlQueryEnum = '/Base/QueryEnum', @@ -151,6 +152,21 @@ LocaleMsg: undefined, NeedInclude: isNullOrEmpty(NeedInclude) ? false : NeedInclude, }; + return params; +} + +/** + * @desc 鐢熸垚Action + */ +export function generateAction<T>( + datatype: string, + DataAssembly: string, + data: T, + option?: object, + NeedInclude?: boolean, +) { + const params = genAction(datatype, data, option, NeedInclude); + params.DataAssembly = DataAssembly; return params; } export function genActionjob<sting>( @@ -824,7 +840,7 @@ }, ); } else { - var check = await isExist(genAction(entityName, args[0])); + const check = await isExist(genAction(entityName, args[0])); if (check.Data) { check.IsSuccessed = false; check.Message = '璁板綍宸茬粡瀛樺湪锛屼笉鑳芥柊澧烇紒'; @@ -843,7 +859,7 @@ } export async function AddListEntity<T>(params: T, entityName: string) { - let data = await defHttp.post( + const data = await defHttp.post( { url: Api.AddListEntity, params: genAction(entityName, params) }, { errorMessageMode: 'none', @@ -872,7 +888,7 @@ * @return {*} */ export async function AddAfterDelete(entityName: string, items: [], where: string) { - let data = await defHttp.post( + const data = await defHttp.post( { url: Api.AddAfterDelete, params: genAction(entityName, { -- Gitblit v1.9.3