|
|
|
|
/**
|
|
|
|
|
* @ 作者: han2015
|
|
|
|
|
* @ 时间: 2025-05-12 15:39:13
|
|
|
|
|
* @ 备注: 文档管理API
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
import request from '@/utils/request';
|
|
|
|
|
import { AxiosPromise } from 'axios';
|
|
|
|
|
import { matterPage,matterResutList,createDir,createShare,respCreateShare,matterTreeList} from './type';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取分享列表
|
|
|
|
|
*/
|
|
|
|
|
export function getShareList( uid:string,data?: matterPage): AxiosPromise<matterResutList> {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/hxpan/api/share/page',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
'Identifier':uid,
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* share browse
|
|
|
|
|
*/
|
|
|
|
|
export function getShareBrowse( uid:string,data?: matterPage): AxiosPromise<respCreateShare> {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/hxpan/api/share/browse',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
'Identifier':uid,
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* share delete
|
|
|
|
|
*/
|
|
|
|
|
export function postShareDelete( uid:string,data?: matterPage): AxiosPromise<respCreateShare> {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/hxpan/api/share/delete',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
'Identifier':uid,
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取目录文件
|
|
|
|
|
*/
|
|
|
|
|
//export function getMatterList( uid:string,data?: matterPage): AxiosPromise<matterResutList> {
|
|
|
|
|
export function getMatterList( uid:string,data?: matterPage): AxiosPromise<matterTreeList> {
|
|
|
|
|
return request({
|
|
|
|
|
url: '/hxpan/api/matter/page',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
'Identifier':uid,
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 新建目录
|
|
|
|
|
*/
|
|
|
|
|
export function postCreateDir(uid:string,data?: createDir){
|
|
|
|
|
return request({
|
|
|
|
|
url: '/hxpan/api/matter/create/directory',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
'Identifier':uid,
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 删除文件或目录
|
|
|
|
|
*/
|
|
|
|
|
export function postDelMatter(uid:string,data?: any){
|
|
|
|
|
return request({
|
|
|
|
|
url: '/hxpan/api/matter/delete',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
'Identifier':uid,
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 批量删除文件或目录
|
|
|
|
|
*/
|
|
|
|
|
export function postDelMatBatch(uid:string,data?: any){
|
|
|
|
|
return request({
|
|
|
|
|
url: '/hxpan/api/matter/delete/batch',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
'Identifier':uid,
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 分享单个文件
|
|
|
|
|
*/
|
|
|
|
|
export function postCreateShare(uid:string,data?: createShare): AxiosPromise<respCreateShare>{
|
|
|
|
|
return request({
|
|
|
|
|
url: '/hxpan/api/share/create',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
'Identifier':uid,
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更改文件名
|
|
|
|
|
*/
|
|
|
|
|
export function postMatterRename(uid:string,data?: {uuid:string;name:string}){
|
|
|
|
|
return request({
|
|
|
|
|
url: '/hxpan/api/matter/rename',
|
|
|
|
|
method: 'post',
|
|
|
|
|
headers: {
|
|
|
|
|
'Identifier':uid,
|
|
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
|
|
},
|
|
|
|
|
data: data
|
|
|
|
|
});
|
|
|
|
|
}
|