|
@@ -12,6 +12,7 @@ export default (props) => {
|
12
|
12
|
|
13
|
13
|
const navigate = useNavigate();
|
14
|
14
|
const actionRef = React.useRef();
|
|
15
|
+ const [messageApi, contextHolder] = message.useMessage();
|
15
|
16
|
|
16
|
17
|
const onDelete = (item) => {
|
17
|
18
|
deleteTaCheck(item.checkId).then(() => {
|
|
@@ -26,8 +27,16 @@ export default (props) => {
|
26
|
27
|
}
|
27
|
28
|
|
28
|
29
|
const onCalc = (row) => {
|
|
30
|
+ messageApi.open({
|
|
31
|
+ type: 'loading',
|
|
32
|
+ content: '正在计算, 请稍候...',
|
|
33
|
+ duration: 0,
|
|
34
|
+ });
|
29
|
35
|
calcScoreTaCheck(row.checkId).then(() => {
|
|
36
|
+ messageApi.destroy();
|
30
|
37
|
actionRef.current.reload();
|
|
38
|
+ }).catch(() => {
|
|
39
|
+ messageApi.destroy();
|
31
|
40
|
});
|
32
|
41
|
}
|
33
|
42
|
|
|
@@ -126,6 +135,7 @@ export default (props) => {
|
126
|
135
|
|
127
|
136
|
return (
|
128
|
137
|
<Page>
|
|
138
|
+ {contextHolder}
|
129
|
139
|
<ProTable
|
130
|
140
|
actionRef={actionRef}
|
131
|
141
|
rowKey="checkId"
|