This commit is contained in:
2025-11-13 11:04:40 +08:00
parent e55a52f20b
commit 2982d53800
8 changed files with 45 additions and 31 deletions

View File

@@ -117,7 +117,7 @@ export const crontabApi = {
* @returns Promise<ResultDomain<CrontabTask>>
*/
async executeTaskOnce(taskId: string): Promise<ResultDomain<CrontabTask>> {
const response = await api.post<CrontabTask>(`${this.baseUrl}/task/execute/${taskId}`);
const response = await api.post<CrontabTask>(`${this.baseUrl}/task/execute/${taskId}`,{},{showLoading: false});
return response.data;
},

View File

@@ -157,6 +157,7 @@ export interface CrontabParam {
type: string;
/** 默认值 */
value: any;
required: boolean;
}
/**

View File

@@ -632,11 +632,11 @@ async function handleSubmit() {
for (const param of selectedMethod.value.params) {
const value = dynamicParams.value[param.name];
if (param.type === 'String' && (!value || value.trim() === '')) {
if (param.required && param.type === 'String' && (!value || value.trim() === '')) {
ElMessage.warning(`请输入${param.description}`);
return;
}
if (param.type === 'Integer' && (value === undefined || value === null || value === '')) {
if (param.required && param.type === 'Integer' && (value === undefined || value === null || value === '')) {
ElMessage.warning(`请输入${param.description}`);
return;
}