mirror of
https://github.com/eyebluecn/tank-front
synced 2024-04-21 12:31:55 +00:00
change share matter page
This commit is contained in:
@@ -22,6 +22,7 @@ export default class Share extends BaseEntity {
|
||||
dirMatter: Matter = new Matter();
|
||||
//当前share对应的matters
|
||||
matters: Matter[] = [];
|
||||
spaceUuid: string | null = null;
|
||||
|
||||
//当前分享正在查看的根目录matter的uuid。前端辅助字段。
|
||||
rootUuid: string = Matter.MATTER_ROOT;
|
||||
@@ -33,6 +34,7 @@ export default class Share extends BaseEntity {
|
||||
static URL_BROWSE = '/api/share/browse';
|
||||
static URL_DELETE_BATCH = '/api/share/delete/batch';
|
||||
static URL_ZIP = '/api/share/zip';
|
||||
static URL_MATTER_PAGE = '/api/share/matter/page';
|
||||
|
||||
constructor(reactComponent?: React.Component) {
|
||||
super(reactComponent);
|
||||
@@ -112,7 +114,8 @@ export default class Share extends BaseEntity {
|
||||
let that = this;
|
||||
|
||||
const form = {
|
||||
matterUuids: matterUuids,
|
||||
matterUuids,
|
||||
spaceUuid: this.spaceUuid,
|
||||
expireInfinity: this.expireOption === ShareExpireOption.INFINITY,
|
||||
expireTime: DateUtil.simpleDateTime(this.getExpireTime()),
|
||||
};
|
||||
|
||||
@@ -414,6 +414,7 @@ export default class List extends TankComponent<IProps, IState> {
|
||||
shareBatch() {
|
||||
const uuids = this.selectedMatters.map((i) => i.uuid).join(',');
|
||||
ShareOperationModal.open((share: Share) => {
|
||||
share.spaceUuid = this.getSpaceUuid();
|
||||
share.httpCreate(uuids, () => {
|
||||
ShareDialogModal.open(share);
|
||||
});
|
||||
|
||||
@@ -58,7 +58,7 @@ export default class Detail extends TankComponent<IProps, IState> {
|
||||
//如果query中有rootUuid那么就更新.
|
||||
this.share.rootUuid =
|
||||
BrowserUtil.getQueryByName('shareRootUuid') || this.share.rootUuid;
|
||||
|
||||
this.pager.urlPage = Share.URL_MATTER_PAGE;
|
||||
this.pager.enableHistory();
|
||||
this.refresh();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user