diff --git a/src/components/system/syncModel/AddAHostDrawer.jsx b/src/components/system/syncModel/AddAHostDrawer.jsx index c594fa149a9500049849e70d868065e366c32e1e..edcc7f7dc2a8367aeb485413cd136399989cf867 100644 --- a/src/components/system/syncModel/AddAHostDrawer.jsx +++ b/src/components/system/syncModel/AddAHostDrawer.jsx @@ -20,7 +20,9 @@ function AddAHostDrawer(props) { const [isSync, setIsSync] = useState(false); useEffect(() => { - fetchAddHostTableData(); + if (activeKey && id) { + fetchAddHostTableData(); + } }, [drawerVisible]); function fetchAddHostTableData() { request diff --git a/src/pages/system/syncProcess/MonitorDetails.jsx b/src/pages/system/syncProcess/MonitorDetails.jsx index 5e57027911441042da9b6f7495ff8038efa8e8a3..7d60723c26c0bae0a39a1717f95263a07ab75864 100644 --- a/src/pages/system/syncProcess/MonitorDetails.jsx +++ b/src/pages/system/syncProcess/MonitorDetails.jsx @@ -135,7 +135,7 @@ function MonitorDetails(props) { render: (text) => <span className="text-green-6">{text}</span>, }; const todaySync = { - title: '浠婃棩鍚屾', + title: '鍚屾鎴愬姛', width: 80, align: 'center', dataIndex: 'alreadySynchronized', diff --git a/src/pages/system/syncProcess/SyncHostManage.jsx b/src/pages/system/syncProcess/SyncHostManage.jsx index 05fa08f649b3ee54f31b164622c28f7004e9cf44..5b4ebea0783e8e3e7c9cc949fb5daa58f7199b15 100644 --- a/src/pages/system/syncProcess/SyncHostManage.jsx +++ b/src/pages/system/syncProcess/SyncHostManage.jsx @@ -5,10 +5,9 @@ import React, { useEffect, useState } from 'react'; import { useBoolean } from 'ahooks'; import AddAHostDrawer from '@/components/system/syncModel/AddAHostDrawer'; import HostManageTable from '@/components/system/syncModel/HostManageTable'; -import { useParams } from 'react-router-dom'; -function SyncHostManage() { - const { id } = useParams(); +function SyncHostManage(props) { + const { recordId: id } = props; const [drawerVisible, { setTrue, setFalse }] = useBoolean(false); const [items, setItems] = useState([]); const [dataSource, setDataSource] = useState([]); diff --git a/src/pages/system/syncProcess/SyncProcessManage.jsx b/src/pages/system/syncProcess/SyncProcessManage.jsx index 9db2c0351b608903dae2bf7f1fd82aaf2ec8ee42..50cc336bacdd9545599243aff06cee8d6827531d 100644 --- a/src/pages/system/syncProcess/SyncProcessManage.jsx +++ b/src/pages/system/syncProcess/SyncProcessManage.jsx @@ -185,7 +185,7 @@ function SyncProcessManage() { )} {currentStep === 1 && ( <Col span={24}> - <SyncHostManage /> + <SyncHostManage recordId={recordId} /> </Col> )} </Row> diff --git a/src/pages/system/syncProcess/SyncTaskList.jsx b/src/pages/system/syncProcess/SyncTaskList.jsx index 21912c8d04f39bd9cbf97cc5278b1c19bab6e015..9f6898286495cde96bd0203810abbb0d15b35a07 100644 --- a/src/pages/system/syncProcess/SyncTaskList.jsx +++ b/src/pages/system/syncProcess/SyncTaskList.jsx @@ -1,5 +1,5 @@ import { ManagePage, withManagePage } from '@/components/hoc/ManagePage'; -import { Button, Card, Modal, Select, Space, Tag } from 'antd'; +import { Button, Card, Modal, Popconfirm, Select, Space, Tag } from 'antd'; import request from '@/utils/request'; import RemoteSelect from '@/components/forms/RemoteSelect'; import { TenantUserTypeColor } from '@/const/TenantType'; @@ -122,6 +122,9 @@ function SyncTaskList({ refreshTableData }) { > 鐩戝惉璇︽儏 </Button> + <Popconfirm title="纭畾鍒犻櫎鍚楋紵" onConfirm={() => handleDelete(record.id)}> + <Button type="link">鍒犻櫎</Button> + </Popconfirm> </Space> ); }, @@ -171,6 +174,11 @@ function SyncTaskList({ refreshTableData }) { }, }, ]; + function handleDelete(deleteId) { + request + .deleteWMessage('/syndata/syncTask/deleteSyncTask', { id: deleteId }) + .then(() => refreshTableData()); + } function handleStop(record) { confirm({ title: '鍋滄鍚屾浠诲姟鍚庨噸鏂板惎鍔ㄥ皢娓呴櫎鍏ㄩ儴缁撴瀯鍙婃暟鎹�!',