From d8493132db77994fe0fbb37dc18bc129f6618fc1 Mon Sep 17 00:00:00 2001 From: xialiang <1818147@qq.com> Date: Wed, 16 Feb 2022 17:08:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=B9=E8=AE=AD=E7=AE=A1=E7=90=86-=E6=A0=A1?= =?UTF-8?q?=E9=AA=8C=E3=80=81=E9=94=99=E8=AF=AF=E6=8F=90=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- admin/src/pages/training/option/index.tsx | 36 +++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/admin/src/pages/training/option/index.tsx b/admin/src/pages/training/option/index.tsx index c826f68..f38c5fe 100644 --- a/admin/src/pages/training/option/index.tsx +++ b/admin/src/pages/training/option/index.tsx @@ -155,6 +155,14 @@ const TableList: React.FC = () => { dataIndex: 'train_name', valueType: 'text', hideInSearch: true, + formItemProps: { + rules: [ + { + required: true, + message: '请输入培训名称', + }, + ] + }, }, { title: '培训对象', @@ -163,6 +171,14 @@ const TableList: React.FC = () => { fieldProps: { mode: "multiple" }, + formItemProps: { + rules: [ + { + required: true, + message: '请选择培训对象', + }, + ] + }, dataIndex: 'org_names', request: async () => { const Value = await queryValueByKey({}); @@ -188,6 +204,14 @@ const TableList: React.FC = () => { hideInTable: true, hideInForm: false, hideInSearch: false, + formItemProps: { + rules: [ + { + required: true, + message: '请选择主题', + }, + ] + }, request: async () => { const { data: Items } = await querySubjectList({ page_size: 1000 }); // console.log(Items, ')))'); @@ -227,6 +251,14 @@ const TableList: React.FC = () => { hideInTable: true, hideInSearch: false, renderText: (val: string) => `${val}`, + formItemProps: { + rules: [ + { + required: true, + message: '请选择培训时间', + }, + ] + }, }, { title: '学时安排', @@ -419,6 +451,8 @@ const TableList: React.FC = () => { if (res.code === 2000) { handleModalVisible(false); actionRef.current?.reloadAndRest?.(); + } else { + message.error(res.msg); } }} @@ -536,6 +570,8 @@ const TableList: React.FC = () => { if (res.code === 2000) { handleUpdateModalVisible(false); actionRef.current?.reloadAndRest?.(); + } else { + message.error(res.msg); } }}