Commit fa784245 authored by LiXuyang's avatar LiXuyang

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

parent c26f9af0
......@@ -119,6 +119,7 @@ export const infoFormSchema: FormSchema[] = [
{
label: '调度周期',
field: 'cycle',
required: true,
labelWidth: 150,
show: ({ model }) => {
return model.dispatch;
......@@ -145,10 +146,11 @@ export const infoFormSchema: FormSchema[] = [
{
label: '调度时间',
labelWidth: 150,
required: true,
field: 'time',
slot: 'time',
show: ({ model }) => {
return model.dispatch;
return model.dispatch && model.cycle;
},
colProps: { lg: 24, md: 24 },
},
......
......@@ -397,7 +397,7 @@
}
}
//初始化表单
const [infoForm, { resetFields: infoReset, validate }] = useForm({
const [infoForm, { resetFields: infoReset, validate, getFieldsValue: getInfoValue }] = useForm({
labelWidth: 100,
baseColProps: { lg: 12, md: 24 },
schemas: infoFormSchema,
......@@ -688,7 +688,10 @@
/**确定按钮*/
async function handleSubmit() {
await validate();
const model = getInfoValue();
if (model.dispatch) {
await validate();
}
closeModal();
}
</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