import config from "@/config";
import http from "@/utils/request";

export default {
	manager:{
		upload: {
			url: `${config.API_URL}/document.upload`,
			name: "上传文档",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		add: {
			url: `${config.API_URL}/document.folder.add`,
			name: "新建文件夹",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		rename:{
			url: `${config.API_URL}/document.file.rename`,
			name: "修改文件名",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		list: {
			url: `${config.API_URL}/document.folder.list`,
			name: "文件、文件夹列表",
			get: async function (params) {
				return await http.post(this.url, params);
			},
		},
		deleteFolder: {
			url: `${config.API_URL}/document.folder.delete`,
			name: "删除文件夹",
			post: async function (params) {
				return await http.post(this.url,params);
			},
		},
		deleteFile: {
			url: `${config.API_URL}/document.file.delete`,
			name: "删除文件",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		export:{
			url: `${config.API_URL}/document.download`,
			name: "多任务下载",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		user:{
			url: `${config.API_URL}/document.user.list.active`,
			name: "用户列表下拉",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		dept:{
			url: `${config.API_URL}/document.dept.list.active`,
			name: "部门列表下拉",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		folderSelect:{
			url: `${config.API_URL}/document.folder.select.list`,
			name: "部门列表下拉",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		move:{
			url: `${config.API_URL}/document.file.move`,
			name: "移动文件｜文件夹",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		}
	},
	share:{
		add: {
			url: `${config.API_URL}/document.share.add`,
			name: "共享文件、文件夹",
			post: async function (params) {
				return await http.post(this.url, params);
			},
		},
		list: {
			url: `${config.API_URL}/document.share.list`,
			name: "共享文件、文件夹列表",
			get: async function (params) {
				return await http.post(this.url, params);
			},
		},
	}
};
