提交 2babbbeb 作者: 龚洪江

修复:机构介绍必填

上级 88312de1
......@@ -70,7 +70,7 @@ const RichText: React.FC<PropsType> = ({
//富文本修改
const richTextChange = (editor: IDomEditor) => {
if (onChange) {
onChange(editor.getHtml() || '');
onChange(editor.isEmpty() ? '' : editor.getHtml());
}
};
useEffect(() => {
......
......@@ -43,6 +43,9 @@ const AddOrEditInstitution = () => {
skuRef.current.getForm().validateFields(),
])
.then((value) => {
if (!introduceInfo) {
return message.warning('机构介绍不能为空');
}
const skuReqData = skuRef.current.getTableData().map((v: tableDataType) => {
return Object.getOwnPropertyNames(v).reduce((pre: any, cur: string) => {
if (Object.getOwnPropertyNames(value[1]).includes(cur + v.id)) {
......
......@@ -36,18 +36,11 @@ const InstitutionsList = () => {
const search: searchColumns[] = [
{ label: '机构名称', name: 'name', placeholder: '请输入机构名称', type: 'input' },
{
label: '培训类型',
name: 'typeId',
placeholder: '请选择培训类型',
type: 'select',
options: gradeList,
},
{
label: '培训等级',
name: 'gradeId',
placeholder: '请选择培训等级',
type: 'select',
options: typeList,
options: gradeList,
},
{
label: '培训机型',
......@@ -57,6 +50,13 @@ const InstitutionsList = () => {
options: modelsList,
},
{
label: '培训类型',
name: 'typeId',
placeholder: '请选择培训类型',
type: 'select',
options: typeList,
},
{
label: '选择日期',
name: 'time',
placeholder: '请选择日期',
......@@ -178,10 +178,19 @@ const InstitutionsList = () => {
};
//筛选
const searchSuccess = (value: any) => {
setQuery(filterObjAttr(value, ['time']));
console.log('时间-->', filterObjAttr(value, ['time']).statTime);
setQuery({
...filterObjAttr(value, ['time']),
statTime: filterObjAttr(value, ['time']).statTime.split(' ')[0],
endTime: filterObjAttr(value, ['time']).endTime.split(' ')[0],
});
pagination.pageNo = 1;
pagination.pageSize = 10;
getListOrgPage(filterObjAttr(value, ['time']));
getListOrgPage({
...filterObjAttr(value, ['time']),
statTime: filterObjAttr(value, ['time']).statTime.split(' ')[0],
endTime: filterObjAttr(value, ['time']).endTime.split(' ')[0],
});
};
useEffect(() => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论