Commit fa784245 authored by LiXuyang's avatar LiXuyang

任务流设计-任务配置-改

parent c26f9af0
...@@ -119,6 +119,7 @@ export const infoFormSchema: FormSchema[] = [ ...@@ -119,6 +119,7 @@ export const infoFormSchema: FormSchema[] = [
{ {
label: '调度周期', label: '调度周期',
field: 'cycle', field: 'cycle',
required: true,
labelWidth: 150, labelWidth: 150,
show: ({ model }) => { show: ({ model }) => {
return model.dispatch; return model.dispatch;
...@@ -145,10 +146,11 @@ export const infoFormSchema: FormSchema[] = [ ...@@ -145,10 +146,11 @@ export const infoFormSchema: FormSchema[] = [
{ {
label: '调度时间', label: '调度时间',
labelWidth: 150, labelWidth: 150,
required: true,
field: 'time', field: 'time',
slot: 'time', slot: 'time',
show: ({ model }) => { show: ({ model }) => {
return model.dispatch; return model.dispatch && model.cycle;
}, },
colProps: { lg: 24, md: 24 }, colProps: { lg: 24, md: 24 },
}, },
......
...@@ -397,7 +397,7 @@ ...@@ -397,7 +397,7 @@
} }
} }
//初始化表单 //初始化表单
const [infoForm, { resetFields: infoReset, validate }] = useForm({ const [infoForm, { resetFields: infoReset, validate, getFieldsValue: getInfoValue }] = useForm({
labelWidth: 100, labelWidth: 100,
baseColProps: { lg: 12, md: 24 }, baseColProps: { lg: 12, md: 24 },
schemas: infoFormSchema, schemas: infoFormSchema,
...@@ -688,7 +688,10 @@ ...@@ -688,7 +688,10 @@
/**确定按钮*/ /**确定按钮*/
async function handleSubmit() { async function handleSubmit() {
await validate(); const model = getInfoValue();
if (model.dispatch) {
await validate();
}
closeModal(); closeModal();
} }
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment