feat: 优化任务执行逻辑
This commit is contained in:
@@ -8,7 +8,6 @@ import Test from './pages/Test.tsx'
|
||||
import StockList from './pages/stock/StockList.tsx'
|
||||
import StockDetail from './pages/stock/StockDetail.tsx'
|
||||
import TaskList from './pages/task/TaskList.tsx'
|
||||
import TaskAdd from './pages/task/TaskAdd.tsx'
|
||||
import TaskTemplateList from './pages/task/TaskTemplateList.tsx'
|
||||
import TaskTemplateSave from './pages/task/TaskTemplateSave.tsx'
|
||||
import TaskScheduleList from './pages/task/TaskScheduleList.tsx'
|
||||
@@ -51,10 +50,6 @@ const routes: RouteObject[] = [
|
||||
path: 'list',
|
||||
Component: TaskList,
|
||||
},
|
||||
{
|
||||
path: 'add',
|
||||
Component: TaskAdd,
|
||||
},
|
||||
{
|
||||
path: 'template',
|
||||
children: [
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
import React from 'react'
|
||||
import {amisRender, commonInfo} from '../../util/amis.tsx'
|
||||
|
||||
function TaskAdd() {
|
||||
return (
|
||||
<div className="task-add">
|
||||
{amisRender(
|
||||
{
|
||||
type: 'page',
|
||||
title: '任务添加',
|
||||
body: [
|
||||
{
|
||||
debug: commonInfo.debug,
|
||||
type: 'form',
|
||||
wrapWithPanel: false,
|
||||
mode: 'horizontal',
|
||||
labelAlign: 'left',
|
||||
body: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default React.memo(TaskAdd)
|
||||
@@ -24,32 +24,7 @@ function TaskList() {
|
||||
},
|
||||
},
|
||||
...crudCommonOptions(),
|
||||
...paginationTemplate(
|
||||
15,
|
||||
undefined,
|
||||
[
|
||||
{
|
||||
type: 'action',
|
||||
label: '',
|
||||
icon: 'fa fa-plus',
|
||||
tooltip: '添加任务',
|
||||
tooltipPlacement: 'top',
|
||||
onEvent: {
|
||||
click: {
|
||||
actions: [
|
||||
{
|
||||
actionType: 'custom',
|
||||
// @ts-ignore
|
||||
script: (context, action, event) => {
|
||||
navigate('/task/add')
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
),
|
||||
...paginationTemplate(15),
|
||||
columns: [
|
||||
{
|
||||
name: 'name',
|
||||
|
||||
@@ -60,6 +60,23 @@ function TaskScheduleSave() {
|
||||
label: '重置',
|
||||
actionType: 'reset',
|
||||
},
|
||||
{
|
||||
type: 'action',
|
||||
label: '返回',
|
||||
onEvent: {
|
||||
click: {
|
||||
actions: [
|
||||
{
|
||||
actionType: 'custom',
|
||||
// @ts-ignore
|
||||
script: (context, action, event) => {
|
||||
navigate(-1)
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
}
|
||||
],
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user