|
@@ -1,8 +1,12 @@
|
1
|
|
-import React from "react";
|
|
1
|
+import React, { useRef } from "react";
|
2
|
2
|
import { Link } from "react-router-dom";
|
3
|
3
|
import useBool from "@/utils/hooks/useBool";
|
4
|
4
|
import { Table, Space, Button, Row, Col, Card } from "antd";
|
5
|
|
-import { getTaCheckItem, exportTaCheckItem } from "@/service/tacheckitem";
|
|
5
|
+import {
|
|
6
|
+ getTaCheckItem,
|
|
7
|
+ exportTaCheckItem,
|
|
8
|
+ putSync,
|
|
9
|
+} from "@/service/tacheckitem";
|
6
|
10
|
import QuList from "./QuList";
|
7
|
11
|
import LocForm from "./LocForm";
|
8
|
12
|
import styles from "./style.module.less";
|
|
@@ -15,6 +19,7 @@ export default (props) => {
|
15
|
19
|
const [loading, startLoading, stopLoading] = useBool();
|
16
|
20
|
const [open, setOpen] = React.useState(false);
|
17
|
21
|
const [expLoading, startExpLoading, stopExpLoading] = useBool();
|
|
22
|
+ const cardRef = useRef();
|
18
|
23
|
|
19
|
24
|
const columns = [
|
20
|
25
|
{
|
|
@@ -151,9 +156,11 @@ export default (props) => {
|
151
|
156
|
}, [queryList]);
|
152
|
157
|
|
153
|
158
|
const onSync = () => {
|
154
|
|
- // getTaCheckItem({ pageSize: 500, checkId, itemType: "loc" }).then((res) => {
|
155
|
|
- // setList(res.records || []);
|
156
|
|
- // });
|
|
159
|
+ putSync(checkId).then((res) => {
|
|
160
|
+ if (res == "success") {
|
|
161
|
+ queryList()
|
|
162
|
+ }
|
|
163
|
+ });
|
157
|
164
|
};
|
158
|
165
|
return (
|
159
|
166
|
<Row gutter={24}>
|
|
@@ -180,6 +187,7 @@ export default (props) => {
|
180
|
187
|
}
|
181
|
188
|
>
|
182
|
189
|
<Table
|
|
190
|
+ ref={cardRef}
|
183
|
191
|
sticky
|
184
|
192
|
summary={() => (
|
185
|
193
|
<Table.Summary fixed="top">
|