diff --git a/src/pages/matter/List.tsx b/src/pages/matter/List.tsx index eb0a55a..9bcbdac 100644 --- a/src/pages/matter/List.tsx +++ b/src/pages/matter/List.tsx @@ -157,7 +157,13 @@ export default class List extends TankComponent { }; toggleMoveBatch = () => { - MoveBatchModal.open(() => {}); + MoveBatchModal.open((targetUuid) => { + const uuids = this.selectedMatters.map(i => i.uuid).join(','); + this.matter.httpMove(uuids, targetUuid, () => { + MessageBoxUtil.success('操作成功'); + this.refresh(); + }) + }); }; triggerUpload = (fileObj: any) => { diff --git a/src/pages/matter/widget/MoveBatchModal.less b/src/pages/matter/widget/MoveBatchModal.less new file mode 100644 index 0000000..2e930fa --- /dev/null +++ b/src/pages/matter/widget/MoveBatchModal.less @@ -0,0 +1,4 @@ +.tree-wrapper { + max-height: 80vh; + overflow: auto; +} diff --git a/src/pages/matter/widget/MoveBatchModal.tsx b/src/pages/matter/widget/MoveBatchModal.tsx index bbd7ef7..a10614d 100644 --- a/src/pages/matter/widget/MoveBatchModal.tsx +++ b/src/pages/matter/widget/MoveBatchModal.tsx @@ -1,11 +1,12 @@ import React from "react"; import TankComponent from "../../../common/component/TankComponent"; -import { Modal, Tree } from "antd"; +import { Modal, Tree, Button } from "antd"; import Pager from "../../../common/model/base/Pager"; import Matter from "../../../common/model/matter/Matter"; +import "./MoveBatchModal.less"; interface IProps { - onSuccess: () => any; + onSuccess: (uuid: string) => any; onClose: () => any; } @@ -31,15 +32,19 @@ export default class MoveBatchModal extends TankComponent { this.pager.setFilterValue("dir", true); } - static open(onSuccess: () => void) { + static open(onSuccess: (uuid: string) => void) { let modal = Modal.confirm({ title: "移动到", width: "50vw", + okCancel: false, + okButtonProps: { + className: "display-none" + }, content: ( { + onSuccess={(uuid: string) => { modal.destroy(); - onSuccess(); + onSuccess(uuid); }} onClose={() => { modal.destroy(); @@ -92,7 +97,13 @@ export default class MoveBatchModal extends TankComponent { render() { return ( - +
+ +
+ + +
+
); } } diff --git a/src/pages/matter/widget/MoveBatchPanel.less b/src/pages/matter/widget/MoveBatchPanel.less deleted file mode 100644 index e69de29..0000000