|
@@ -2,9 +2,10 @@ import React from 'react';
|
2
|
2
|
import Page from '@/components/Page';
|
3
|
3
|
import { useNavigate, Link } from 'react-router-dom';
|
4
|
4
|
import { queryTable } from "@/utils/request";
|
5
|
|
-import { ProTable } from "@ant-design/pro-components";
|
6
|
|
-import { Button, message, Popconfirm, Input, Modal } from "antd";
|
|
5
|
+import { ProTable, ModalForm, ProFormText } from "@ant-design/pro-components";
|
|
6
|
+import { Button, message, Popconfirm, Form } from "antd";
|
7
|
7
|
import { getTaCheck, deleteTaCheck, putTaCheck, calcScoreTaCheck } from '@/service/tacheck';
|
|
8
|
+import CopyCheck from './components/CopyCheck';
|
8
|
9
|
|
9
|
10
|
const queryList = queryTable(getTaCheck);
|
10
|
11
|
|
|
@@ -14,7 +15,7 @@ export default (props) => {
|
14
|
15
|
const actionRef = React.useRef();
|
15
|
16
|
const [messageApi, contextHolder] = message.useMessage();
|
16
|
17
|
const [open, setOpen] = React.useState(false);
|
17
|
|
- const [check, setCheck] = React.useState({});
|
|
18
|
+ const [check, setCheck] = React.useState(false);
|
18
|
19
|
|
19
|
20
|
const onDelete = (item) => {
|
20
|
21
|
deleteTaCheck(item.checkId).then(() => {
|
|
@@ -44,7 +45,11 @@ export default (props) => {
|
44
|
45
|
|
45
|
46
|
const onOpen = (record) => {
|
46
|
47
|
setCheck(record);
|
47
|
|
- setOpen(true)
|
|
48
|
+ setOpen(true);
|
|
49
|
+ }
|
|
50
|
+
|
|
51
|
+ const onCopyFinish = () => {
|
|
52
|
+ actionRef.current.reload();
|
48
|
53
|
}
|
49
|
54
|
|
50
|
55
|
const columns = [
|
|
@@ -159,14 +164,12 @@ export default (props) => {
|
159
|
164
|
return (
|
160
|
165
|
<Page>
|
161
|
166
|
{contextHolder}
|
162
|
|
- <Modal
|
163
|
|
- title="复制"
|
|
167
|
+ <CopyCheck
|
164
|
168
|
open={open}
|
165
|
|
- onCancel={() => setOpen(false)}
|
166
|
|
- >
|
167
|
|
- 测评名称:
|
168
|
|
- <Input placeholder="请输入" value={check.title + '-复制'} />
|
169
|
|
- </Modal>
|
|
169
|
+ check={check}
|
|
170
|
+ onOpenChange={setOpen}
|
|
171
|
+ onFinish={onCopyFinish}
|
|
172
|
+ />
|
170
|
173
|
<ProTable
|
171
|
174
|
actionRef={actionRef}
|
172
|
175
|
rowKey="checkId"
|