|
|
|
|
@ -3,7 +3,7 @@ import styles from './style/engineering.module.less';
|
|
|
|
|
import { Input, Grid, Card, Result, Pagination, Message } from '@arco-design/web-react';
|
|
|
|
|
import { IconPlus, IconApps } from '@arco-design/web-react/icon';
|
|
|
|
|
import { openWindow, OpenWindowOptions } from '@/utils/common';
|
|
|
|
|
import { getPublicSceneList, getMySceneList } from '@/api/scene';
|
|
|
|
|
import { getPublicSceneList, getMySceneList, deleteScene } from '@/api/scene';
|
|
|
|
|
import CardWrap from '@/pages/scene/cardWrap';
|
|
|
|
|
import OperationModal from '@/pages/scene/operationModal';
|
|
|
|
|
|
|
|
|
|
@ -61,10 +61,13 @@ const Engineering: React.FC<EngineeringProps> = ({ dataType, showAdd = true }) =
|
|
|
|
|
openModalHandle('EDIT', item);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handleDelete = (item, e) => {
|
|
|
|
|
const handleDelete = async (item, e) => {
|
|
|
|
|
e.stopPropagation();
|
|
|
|
|
// TODO 在这里添加删除逻辑
|
|
|
|
|
console.log('删除');
|
|
|
|
|
const { code }: any = await deleteScene(item.id);
|
|
|
|
|
if (code === 200) {
|
|
|
|
|
Message.success('删除成功');
|
|
|
|
|
fetchData(1, pageSize);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const handlePageChange = (page: number) => {
|
|
|
|
|
@ -186,7 +189,7 @@ const Engineering: React.FC<EngineeringProps> = ({ dataType, showAdd = true }) =
|
|
|
|
|
type={operationType}
|
|
|
|
|
item={currentItem}
|
|
|
|
|
onClose={(status) => setShowModal(status)}
|
|
|
|
|
onRefresh={() => fetchData(1, 11)}
|
|
|
|
|
onRefresh={() => fetchData(1, pageSize)}
|
|
|
|
|
/>
|
|
|
|
|
</>
|
|
|
|
|
);
|
|
|
|
|
|