Yansen hace 2 años
padre
commit
7f983d7897

+ 14
- 3
src/pages/check/Edit.jsx Ver fichero

@@ -6,11 +6,13 @@ import CheckForm from './components/CheckForm';
6 6
 import { useSearchParams } from 'react-router-dom';
7 7
 import { getTaCheckById } from '@/service/tacheck';
8 8
 import LocForm from './components/LocForm';
9
+import LocTable from './components/LocTable';
9 10
 
10 11
 export default (props) => {
11 12
   const [searchParams] = useSearchParams();
12 13
 
13 14
   const [checkInfo, setCheckInfo] = React.useState();
15
+  const [tab, setTab] = React.useState('1');
14 16
   const locRef = React.useRef();
15 17
 
16 18
   const id = searchParams.get('id');
@@ -23,8 +25,17 @@ export default (props) => {
23 25
 
24 26
   return (
25 27
     <Page>
26
-      <CheckForm checkInfo={checkInfo} onChange={setCheckInfo} />
27
-      <Row gutter={24} style={{marginTop: '24px'}}>
28
+      <CheckForm
29
+        checkInfo={checkInfo}
30
+        onChange={setCheckInfo}
31
+        onTabChange={setTab}
32
+      />
33
+      <div style={{marginTop: '24px'}}>
34
+      {
35
+        tab == '1' && <LocTable checkId={checkInfo?.checkId} />
36
+      }
37
+      </div>
38
+      {/* <Row gutter={24} style={{marginTop: '24px'}}>
28 39
         <Col span={12}>
29 40
           <Card title="实例调查" extra={<Button icon={<PlusOutlined />} onClick={() => locRef.current.newQu()}>问题</Button>}>
30 41
             <LocForm ref={locRef} checkId={id} />
@@ -34,7 +45,7 @@ export default (props) => {
34 45
           <Card title="问卷调查">
35 46
           </Card>
36 47
         </Col>
37
-      </Row>
48
+      </Row> */}
38 49
     </Page>
39 50
   )
40 51
 }

+ 30
- 14
src/pages/check/components/CheckForm.jsx Ver fichero

@@ -1,16 +1,21 @@
1 1
 import React from 'react';
2 2
 import dayjs from 'dayjs';
3
-import { Row, Col, Button, Form, Input, DatePicker } from 'antd';
3
+import { EditOutlined } from '@ant-design/icons';
4
+import { Card, Tabs, Button, Form, Input, DatePicker } from 'antd';
4 5
 import { ModalForm } from '@ant-design/pro-components';
5 6
 import { postTaCheck, putTaCheck } from '@/service/tacheck';
6 7
 
7 8
 export default (props) => {
8
-  const { checkInfo, onChange } = props;
9
+  const { checkInfo, onChange, onTabChange } = props;
9 10
 
10 11
   const [open, setOpen] = React.useState(false);
11 12
   const [form] = Form.useForm();
12 13
 
13
-  const title = checkInfo ? checkInfo.title : '点击编辑创建';
14
+  const onEdit = () => {
15
+    setOpen(true);
16
+  }
17
+
18
+  const title = checkInfo ? checkInfo.title : <div onClick={onEdit}>点击编辑创建</div>;
14 19
   const dateStr = checkInfo ? `${checkInfo.startDate} ~ ${checkInfo.endDate}` : '';
15 20
 
16 21
   const onFinish = async (values) => {
@@ -42,16 +47,27 @@ export default (props) => {
42 47
   }, [checkInfo]);
43 48
 
44 49
   return (
45
-    <Row gutter={48}>
46
-      <Col span={18}>
47
-        <h2 style={{ textAlign: 'center' }} >{title}</h2>
48
-        <Row>
49
-          <Col span={8} offset={16}>{dateStr}</Col>
50
-        </Row>
51
-      </Col>
52
-      <Col span={4}>
53
-        <Button onClick={() => setOpen(true)}>编辑</Button>
54
-      </Col>
50
+    <Card bodyStyle={{padding: 0}}>
51
+      <div style={{display: 'flex', padding: '1em', alignItems: 'center'}}>
52
+        <div style={{flex: 'none'}}><Button type="link" onClick={onEdit} icon={<EditOutlined />} /></div>
53
+        <div style={{flex: 'none', margin: '0 1em'}}>{dateStr}</div>
54
+        <div style={{flex: '1', fontSize: '1.6em'}}>{title}</div>
55
+      </div>
56
+      <Tabs
57
+        defaultActiveKey='1'
58
+        onChange={onTabChange}
59
+        tabBarStyle={{margin: '0 2em'}}
60
+        items={[
61
+          {
62
+            label: '实地测评',
63
+            key: '1',
64
+          },
65
+          {
66
+            label: '问卷调查',
67
+            key: '2',
68
+          }
69
+        ]}
70
+      />
55 71
       <ModalForm title="测评维护" open={open} width={480} form={form} onFinish={onFinish} onOpenChange={setOpen}>
56 72
           <Form.Item name="title" label="测评名称" required>
57 73
             <Input placeholder="请输入测评名称" />
@@ -63,6 +79,6 @@ export default (props) => {
63 79
             <DatePicker placeholder="请选择" style={{ width: '100%' }} />
64 80
           </Form.Item>
65 81
       </ModalForm>
66
-    </Row>
82
+    </Card>
67 83
   )
68 84
 }

+ 29
- 101
src/pages/check/components/LocForm.jsx Ver fichero

@@ -1,123 +1,51 @@
1 1
 import React from 'react';
2 2
 import { Button, Tabs, Form, Row, Col, InputNumber, message } from 'antd';
3
-import useBool from '@/utils/hooks/useBool';
4
-import { getTdLocType } from '@/service/tdloctype';
5
-import { getByCheckId, postTaCheckItem } from '@/service/tacheckitem';
6
-import QuManage from './QuManage';
3
+import { ModalForm, ProFormDigit, ProFormDependency } from '@ant-design/pro-components';
4
+import { postTaCheckItem } from '@/service/tacheckitem';
7 5
 
8
-const ItemForm = (props) => {
9
-  const {checkId, typeId, onChange} = props;
6
+const LocForm = (props) => {
7
+  const {checkItem, open, onOpenChange, onChange} = props;
10 8
 
11 9
   const [form] = Form.useForm();
12
-  const [loading, startLoading, stopLoading] = useBool();
13 10
 
14
-  const onFinish = (values) => {
15
-    const data = {...values, checkId, typeId, itemType: 'loc'}
16
-
17
-    startLoading();
18
-    postTaCheckItem(data).then(res => {
19
-      onChange(res);
20
-      form.setFieldsValue(res);
21
-      stopLoading();
22
-    }).catch(() => {
23
-      stopLoading();
24
-    });
11
+  const onFinish = async (values) => {
12
+    const data = { ...(checkItem || {}), ...values, itemType: 'loc'}
13
+    const res = await postTaCheckItem(data);
14
+    onChange(res);
15
+    return true;
25 16
   }
26 17
 
27 18
   const reset = () => {
28 19
     form.resetFields();
29 20
     form.setFieldsValue({ num: 1 });
30
-    onChange();
31 21
   }
32 22
 
33 23
   React.useEffect(() => {
34
-    if (checkId && typeId) {
35
-      startLoading();
36
-      getByCheckId(checkId, typeId).then(res => {
37
-        if (res) {
38
-          onChange(res);
39
-          form.setFieldsValue(res);
40
-        } else {
41
-          reset();
42
-        }
43
-        stopLoading();
44
-      }).catch(() => {
45
-        stopLoading();
46
-        reset();
47
-      });
24
+    if (checkItem) {
25
+      form.setFieldsValue(checkItem);
48 26
     } else {
49 27
       reset();
50 28
     }
51
-  }, [checkId, typeId]);
29
+  }, [checkItem]);
52 30
 
53 31
   return (
54
-    <Form layout="inline" form={form} onFinish={onFinish}>
55
-      <Form.Item label="数量" name="num">
56
-        <InputNumber min={1} />
57
-      </Form.Item>
58
-      <Form.Item label="总分" name="fullScore">
59
-        <InputNumber min={0.00} precision={2} />
60
-      </Form.Item>
61
-      <Form.Item>
62
-        <Button disabled={!checkId || !typeId} loading={loading} type="primary" htmlType="submit">
63
-          确定
64
-        </Button>
65
-      </Form.Item>
66
-    </Form>
32
+    <ModalForm
33
+      title={`${checkItem?.name} 维护`}
34
+      width={600}
35
+      open={open}
36
+      form={form}
37
+      onFinish={onFinish}
38
+      onOpenChange={onOpenChange}
39
+    >
40
+      <ProFormDigit label="计分" name="fullScore" min={0.00} fieldProps={{precision: 2}} />
41
+      <ProFormDigit label="数量" name="num" min={1} fieldProps={{precision: 0}} />
42
+      <ProFormDependency name={['fullScore' , 'num']}>
43
+        {
44
+          ({fullScore, num}) => <ProFormDigit readonly label="分值" value={fullScore / num} fieldProps={{precision: 2}} />
45
+        }        
46
+      </ProFormDependency>
47
+    </ModalForm>
67 48
   )
68 49
 }
69 50
 
70
-export default React.forwardRef((props, ref) => {
71
-  const {checkId} = props;
72
-  const [locList, setLocList] = React.useState([]);
73
-  const quRef = React.useRef();
74
-  const [checkItem, setCheckItem] = React.useState();
75
-  const [typeId, setTypeId] = React.useState();
76
-
77
-  const tabItems = React.useMemo(() => {
78
-    return locList.map(x => ({
79
-      label: x.name,
80
-      key: x.typeId,
81
-    }));
82
-  }, [locList]);
83
-
84
-  React.useEffect(() => {
85
-    getTdLocType({ pageSize: 500 }).then(res => {
86
-      const list = res.records;
87
-      setLocList(list);
88
-      // 默认第一个
89
-      setTypeId(list[0]?.typeId);
90
-    });
91
-  }, []);
92
-
93
-  
94
-  React.useImperativeHandle(ref, () => ({
95
-    newQu: () => {
96
-      if (!checkItem) {
97
-        message.warning('请先设置数量, 总分等');
98
-        return;
99
-      }
100
-      quRef.current.add();
101
-    },
102
-  }), [checkItem]);
103
-
104
-  return (
105
-    <div style={{display: 'flex'}}>
106
-      <div style={{flex: 'none'}}>
107
-        <Tabs
108
-          tabPosition="left"
109
-          activeKey={typeId}
110
-          items={tabItems}
111
-          onChange={(activeKey) => {
112
-            setTypeId(activeKey)
113
-            setCheckItem()
114
-          }}
115
-        />
116
-      </div>
117
-      <div style={{flex: 1}}>
118
-        <ItemForm checkId={checkId} typeId={typeId} onChange={setCheckItem} />
119
-        <QuManage ref={quRef} itemId={checkItem?.itemId} />
120
-      </div>
121
-    </div>
122
-  )
123
-})
51
+export default LocForm;

+ 103
- 0
src/pages/check/components/LocTable.jsx Ver fichero

@@ -0,0 +1,103 @@
1
+import React from 'react';
2
+import useBool from '@/utils/hooks/useBool';
3
+import { Table, Space, Button, Row, Col, Card } from 'antd';
4
+import { getTaCheckItem } from '@/service/tacheckitem';
5
+import QuList from './QuList';
6
+import LocForm from './LocForm';
7
+
8
+export default (props) => {
9
+  const { checkId } = props;
10
+
11
+  const [list, setList] = React.useState([]);
12
+  const [curItem, setCurItem] = React.useState();
13
+  const [loading, startLoading, stopLoading] = useBool();
14
+  const [open, setOpen] = React.useState(false);
15
+
16
+  const onEdit = (row) => {
17
+    setCurItem(row);
18
+    setOpen(true);
19
+  }
20
+
21
+  const columns = [
22
+    {
23
+      title: '点位名称',
24
+      dataIndex: 'name',
25
+      key: 'name',
26
+    },
27
+    {
28
+      title: '分值',
29
+      key: 'avgScore',
30
+      render: (_, row) => row.fullScore ? Number(row.fullScore / (row.num || 1)).toFixed(2) : '-',
31
+    },
32
+    {
33
+      title: '数量',
34
+      dataIndex: 'num',
35
+      key: 'num',
36
+    },
37
+    {
38
+      title: '小计',
39
+      dataIndex: 'fullScore',
40
+      key: 'fullScore',
41
+    },
42
+    {
43
+      title: '测评得分',
44
+      dataIndex: 'score',
45
+      key: 'score',
46
+    },
47
+    {
48
+      title: '操作',
49
+      key: 'options',
50
+      width: 100,
51
+      render: (_, row) => {
52
+        return (
53
+          <Space>
54
+            <Button type="link" onClick={() => onEdit(row)}>编辑</Button>
55
+            <Button type="link" onClick={() => setCurItem(row)}>试题</Button>
56
+          </Space>
57
+        )
58
+      }
59
+    },
60
+  ]
61
+
62
+  const onChange = (item) => {
63
+    const newList = list.map(x => x.itemId === item.itemId ? item : x);
64
+    setList(newList);
65
+  }
66
+
67
+  React.useEffect(() => {
68
+    if (checkId) {
69
+      startLoading();
70
+      getTaCheckItem({pageSize: 500, checkId, itemType: "loc"}).then(res => {
71
+        setList(res.records || []);
72
+        stopLoading();
73
+      }).catch(() => {
74
+        stopLoading();
75
+      });
76
+    }
77
+  }, [checkId]);
78
+  
79
+  return (
80
+    <Row gutter={24}>
81
+      <Col span={12}>
82
+        <Card>
83
+          <Table
84
+            rowKey="typeId"
85
+            loading={loading}
86
+            columns={columns}
87
+            dataSource={list}
88
+            pagination={false}
89
+          />
90
+          <LocForm
91
+            open={open}
92
+            checkItem={curItem}
93
+            onOpenChange={setOpen}
94
+            onChange={onChange}
95
+          />
96
+        </Card>
97
+      </Col>
98
+      <Col span={12}>
99
+        <QuList itemId={curItem?.itemId} />
100
+      </Col>
101
+    </Row>
102
+  )
103
+}

+ 2
- 2
src/pages/check/components/QuForm.jsx Ver fichero

@@ -21,8 +21,8 @@ export default (props) => {
21 21
       itemId,
22 22
     }
23 23
 
24
-    const res = await postTaCheckItemQu(data).then(x => x);
25
-
24
+    const res = await postTaCheckItemQu(data);
25
+    console.log(res)
26 26
     onChange(res);
27 27
     return true;
28 28
   }

+ 122
- 0
src/pages/check/components/QuList.jsx Ver fichero

@@ -0,0 +1,122 @@
1
+import React from 'react';
2
+import { Button, Card, Table, Space, Popconfirm } from 'antd';
3
+import useBool from '@/utils/hooks/useBool';
4
+import { getTaCheckItemQu } from '@/service/tdlocquestion';
5
+import { deleteTaCheckItemQu } from '@/service/tacheckitemqu';
6
+import QuForm from './QuForm';
7
+
8
+export default (props) => {
9
+  const { itemId } = props;
10
+
11
+  const [open, setOpen] = React.useState(false);
12
+  const [list, setList] = React.useState([]);
13
+  const [curItem, setCurItem] = React.useState();
14
+  const [loading, startLoading, stopLoading] = useBool();
15
+
16
+  const columns = [
17
+    {
18
+      title: '序号',
19
+      dataIndex: 'sortNo',
20
+      key: 'sortNo',
21
+      width: 100,
22
+    },
23
+    {
24
+      title: '题干',
25
+      dataIndex: 'title',
26
+      key: 'title',
27
+    },
28
+    {
29
+      title: '分值',
30
+      dataIndex: 'anScore',
31
+      key: 'anScore',
32
+      width: 100,
33
+    },
34
+    {
35
+      title: '操作',
36
+      key: 'options',
37
+      width: 100,
38
+      render: (_, row) => {
39
+        return (
40
+          <Space>
41
+            <Button type="link" onClick={() => onEdit(row)}>编辑</Button>
42
+            <Popconfirm
43
+              title="确认进行删除操作?"
44
+              onConfirm={() => onDelete(row)}
45
+            >
46
+              <Button type='link' danger >删除</Button>
47
+            </Popconfirm>
48
+          </Space>
49
+        )
50
+      }
51
+    },
52
+  ]
53
+
54
+  const onAdd = () => {
55
+    setCurItem();
56
+    setOpen(true);
57
+  }
58
+  
59
+  const onEdit = (qu) => {
60
+    setCurItem(qu);
61
+    setOpen(true);
62
+  }
63
+
64
+  const onDelete = (qu) => {
65
+    if (qu?.quId) {
66
+      deleteTaCheckItemQu(qu.quId).then(() => {
67
+        setList(list.filter(x => x.quId !== qu.quId));
68
+      })
69
+    } else {
70
+      setList(list.filter(x => x.quId !== qu.quId));
71
+    }
72
+  }
73
+  
74
+  const onFinish = (res) => {
75
+    let found = false;
76
+    const newList = list.map(item => {
77
+      if (item.quId === res.quId) {
78
+        found = true;
79
+        return res;
80
+      } else {
81
+        return item
82
+      }
83
+    });
84
+
85
+    if (!found) {
86
+      newList.push(res);
87
+    }
88
+
89
+    setList(list);
90
+  }
91
+
92
+  React.useEffect(() => {
93
+    if (itemId) {
94
+      startLoading();
95
+      getTaCheckItemQu({pageSize: 500, itemId}).then((res) => {
96
+        stopLoading();
97
+        setList(res.records);
98
+      }).catch(() => {
99
+        stopLoading();
100
+      });
101
+    }
102
+  }, [itemId]);
103
+
104
+  return (
105
+    <Card title="试题列表" extra={<Button type="link" disabled={!itemId} onClick={onAdd}>新增</Button>}>
106
+      <Table
107
+        rowKey="quId"
108
+        loading={loading}
109
+        columns={columns}
110
+        dataSource={list}
111
+        pagination={false}
112
+      />
113
+      <QuForm
114
+        open={open}
115
+        itemId={itemId}
116
+        quInfo={curItem}
117
+        onOpenChange={setOpen}
118
+        onChange={onFinish}
119
+      />
120
+    </Card>
121
+  )
122
+}

+ 0
- 131
src/pages/check/components/QuManage.jsx Ver fichero

@@ -1,131 +0,0 @@
1
-import React from 'react';
2
-import { Button, Form, Row, Col, Card, List, Popconfirm } from 'antd';
3
-import QuForm from './QuForm';
4
-import { postTaCheckItemQu, getTaCheckItemQu } from '@/service/tdlocquestion';
5
-import { deleteTaCheckItemQu } from '@/service/tacheckitemqu';
6
-import { message } from 'antd';
7
-
8
-const QuItem = (props) => {
9
-  const { qu, onEdit, onDelete } = props;
10
-
11
-  const quTitle = `${qu?.sortNo}. [${qu?.quType == 'fill' ? '填空' : '选择'}] ${qu?.title} (分值: ${qu?.computeType} ${qu?.anScore}/${qu?.maxScore})`
12
-
13
-  return (
14
-    <Card
15
-      title={quTitle} 
16
-      style={{marginTop: '24px'}}
17
-      extra={(
18
-        <>
19
-          <Button type='link' onClick={onEdit}>修改</Button>
20
-          <Popconfirm
21
-            title="确认进行删除操作?"
22
-            onConfirm={onDelete}
23
-          >
24
-            <Button type='link' danger >删除</Button>
25
-          </Popconfirm>
26
-        </>
27
-      )} 
28
-    >
29
-      <Card.Meta
30
-        title={
31
-          qu?.quType != 'fill' ?
32
-          (
33
-            <Row gutter={24}>
34
-              {
35
-                (qu?.answerList||[]).map((item) => {
36
-                  const anStr = `${item.answerCode}. (${item.score || 0}分) ${item.answer}`;
37
-
38
-                  return (
39
-                    <Col span={12} key={item.answerId} style={{ height: '32px', lineHeight: '32px', fontWeight: 400 }}>
40
-                    {anStr}
41
-                    </Col>
42
-                  );
43
-                })
44
-              }
45
-            </Row>
46
-          ) : null
47
-        }
48
-        description={(
49
-          <>
50
-            <h3>验收标准</h3>
51
-            <div dangerouslySetInnerHTML={{ __html: qu?.stand }} />
52
-          </>
53
-        )}
54
-      />
55
-    </Card>
56
-  );
57
-}
58
-
59
-export default React.forwardRef((props, ref) => {
60
-
61
-  const { itemId, onChange } = props;
62
-  
63
-  const [open, setOpen] = React.useState(false);
64
-  const [quInfo, setQuInfo] = React.useState(false);
65
-  const [list, setList] = React.useState([]);
66
-
67
-  const onFinish = (res) => {
68
-    let found = false;
69
-    const newList = list.map(item => {
70
-      if (item.quId === res.quId) {
71
-        found = true;
72
-        return res;
73
-      } else {
74
-        return item
75
-      }
76
-    });
77
-
78
-    if (!found) {
79
-      newList.push(res);
80
-    }
81
-
82
-    setList(list);
83
-  }
84
-
85
-  const onEditQu = (qu) => {
86
-    setQuInfo(qu);
87
-    setOpen(true);
88
-  }
89
-
90
-  const onDeleteQu = (qu) => {
91
-    if (qu?.quId) {
92
-      deleteTaCheckItemQu(qu.quId).then(() => {
93
-        setList(list.filter(x => x.quId !== qu.quId));
94
-      })
95
-    } else {
96
-      setList(list.filter(x => x.quId !== qu.quId));
97
-    }
98
-  }
99
-
100
-  React.useEffect(() => {
101
-    if (itemId) {
102
-      getTaCheckItemQu({pageSize: 500, itemId}).then((res) => {
103
-        setList(res.records);
104
-      });
105
-    }
106
-  }, [itemId]);
107
-
108
-  React.useImperativeHandle(ref, () => ({
109
-    add: () => {
110
-      setQuInfo();
111
-      setOpen(true);
112
-    },
113
-  }), []);
114
-
115
-  return (
116
-    <>
117
-      <QuForm itemId={itemId} quInfo={quInfo} open={open} onOpenChange={setOpen} onChange={onFinish} />
118
-      <List
119
-        itemLayout="horizontal"
120
-        dataSource={list}
121
-        renderItem={(item) => (
122
-          <QuItem
123
-            qu={item}
124
-            onEdit={() => onEditQu(item)}
125
-            onDelete={() => onDeleteQu(item)}
126
-          />
127
-        )}
128
-      />
129
-    </>
130
-  )
131
-});

+ 26
- 4
src/pages/check/index.jsx Ver fichero

@@ -4,7 +4,7 @@ import { useNavigate } from 'react-router-dom';
4 4
 import { queryTable } from "@/utils/request";
5 5
 import { ProTable } from "@ant-design/pro-components";
6 6
 import { Button, message, Popconfirm } from "antd";
7
-import { getTaCheck } from '@/service/tacheck';
7
+import { getTaCheck, deleteTaCheck, putTaCheck } from '@/service/tacheck';
8 8
 
9 9
 const queryList = queryTable(getTaCheck);
10 10
 
@@ -13,18 +13,41 @@ export default (props) => {
13 13
   const navigate = useNavigate();
14 14
   const actionRef = React.useRef();
15 15
 
16
+  const onDelete = (item) => {
17
+    deleteTaCheck(item.checkId).then(() => {
18
+      actionRef.current.reload();
19
+    })
20
+  }
21
+
22
+  const onUpdateStatus = (item) => {
23
+    putTaCheck(item.checkId, {...item, status: Math.abs(item.status - 1)}).then(() => {
24
+      actionRef.current.reload();
25
+    })
26
+  }
27
+
16 28
   const columns = [
17 29
     {
18 30
       title: "测评名称",
19 31
       dataIndex: "title",
20 32
     },
33
+    {
34
+      title: "测评日期",
35
+      hideInTable: true,
36
+      dataIndex: "dateRange",
37
+      valueType: 'dateRange',
38
+      search: {
39
+        transform: value => ({ startDate: value[0], endDate: value[1] }),
40
+      },
41
+    },
21 42
     {
22 43
       title: "开始日期",
23 44
       dataIndex: "startDate",
45
+      hideInSearch: true,
24 46
     },
25 47
     {
26 48
       title: "结束日期",
27 49
       dataIndex: "endDate",
50
+      hideInSearch: true,
28 51
     },
29 52
     {
30 53
       title: "状态",
@@ -51,7 +74,7 @@ export default (props) => {
51 74
           style={{ padding: 0 }}
52 75
           type="link"
53 76
           onClick={() => {
54
-            updateStatus(record);
77
+            onUpdateStatus(record);
55 78
           }}
56 79
         >
57 80
           {record.status === 1 ? "禁用" : "启用"}
@@ -61,7 +84,6 @@ export default (props) => {
61 84
           style={{ padding: 0 }}
62 85
           type="link"
63 86
           onClick={() => {
64
-            console.log(record, "]]");
65 87
             navigate(`/check/edit?id=${record.checkId}`);
66 88
           }}
67 89
         >
@@ -70,7 +92,7 @@ export default (props) => {
70 92
         <Popconfirm
71 93
           key={3}
72 94
           title="您是否确认删除 ?"
73
-          onConfirm={() => handleDelete(record.checkId)}
95
+          onConfirm={() => onDelete(record)}
74 96
           okText="确定"
75 97
           cancelText="取消"
76 98
         >