master
xialiang 4 years ago
parent 7b13fecca0
commit 281fe6b5bd

@ -23,7 +23,7 @@ import ProFormRichEdit from '../components/ProFormRichEdit';
import type { ActionType, ProColumns } from '@ant-design/pro-table';
import ProTable from '@ant-design/pro-table';
import type { TableListItem, TableListPagination } from '../../option/data';
import { queryCourseList } from '../../option/service';
import { queryCourseList, saveSubject } from '../../option/service';
/** 列表项定义 */
const columns: ProColumns<TableListItem>[] = [
@ -213,9 +213,23 @@ export default () => {
stepProps={{
description: false,
}}
onFinish={async () => {
console.log(formRef.current?.getFieldsValue());
onFinish={async (fileds) => {
if (params.id) {
fileds = { ...fileds, id: params.id }
}
console.log(fileds, 'fileds', params);
// return false
await saveRules({
...fileds,
b_use: 0,
rules_type: 1,
start_time: fileds.dateRange[0],
end_time: fileds.dateRange[1]
});
// await waitTime(2000);
return true;
}}
>
<div style={{ margin: '0' }}>
@ -255,7 +269,11 @@ export default () => {
</Button>,
]}
request={async (value) => {
const _data = await queryCourseList(value);
const _data = await saveSubject({
...value,
attachment_json: `{ "url": "${value.upload[0].response.url}"}`
});
return {
current: _data?.page_number,
data: _data?.data?.list,

Loading…
Cancel
Save