You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
152 lines
3.3 KiB
152 lines
3.3 KiB
import request from '@/utils/axios/index';
|
|
import { AxiosPromise } from 'axios';
|
|
|
|
export interface shareOrgInfo{
|
|
id:number
|
|
name:string
|
|
superior:number
|
|
level:number
|
|
status:boolean
|
|
child :shareOrgInfo[]
|
|
}
|
|
|
|
/**
|
|
* 搜索条件
|
|
*/
|
|
export interface parsArchList extends PageQuery{
|
|
page:number,
|
|
pagesize:number
|
|
adminorg?:number; //行政组织
|
|
keywords?:string;
|
|
}
|
|
|
|
export interface memberInfo{
|
|
id:number,
|
|
name:string,
|
|
icon:string,
|
|
company:number,
|
|
maindeparment:number,
|
|
sunmaindeparment:number,
|
|
adminorg:number,
|
|
state:number,
|
|
keystr:string,
|
|
positionname :string,
|
|
maindeparmentname:string
|
|
}
|
|
|
|
export type shareArchivesList = PageResult<memberInfo[]>
|
|
|
|
/**
|
|
* 获取行政组织树
|
|
*/
|
|
export function getOrgTreeList(data: {orgid?:number}): AxiosPromise<shareOrgInfo[]>{
|
|
return request({
|
|
url: '/hrapi/org/govnewthreeing',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 获取人员档案
|
|
*/
|
|
export function getArchivesListPage(data?: parsArchList): AxiosPromise<shareArchivesList> {
|
|
return request({
|
|
url: '/hrapi/staff/archiveslistcont',
|
|
method: 'post',
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 获取文档成员权限列表
|
|
*/
|
|
export function getPermitedList(uid:string,data:{uuid:string}): AxiosPromise<{permited:string[],infos:string[]}> {
|
|
return request({
|
|
url: '/hxpan/api/share/permits',
|
|
method: 'post',
|
|
headers: {
|
|
'Identifier':uid,
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
},
|
|
data: data
|
|
});
|
|
}
|
|
/**
|
|
* 获取空间成员列表
|
|
*/
|
|
export function getSpaceMemberList(uid:string,data:{space?:string,matter:string}): AxiosPromise<{
|
|
members:string[],
|
|
dprts:string[],
|
|
managers:string,
|
|
permits:Object,
|
|
}> {
|
|
return request({
|
|
url: '/hxpan/api/space/members',
|
|
method: 'post',
|
|
headers: {
|
|
'Identifier':uid,
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
},
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 添加空间管理员
|
|
*/
|
|
export function addSpaceManager(uid:string,data:{space:string,mangers:string}): AxiosPromise<{members:string[],dprts:string[]}> {
|
|
return request({
|
|
url: '/hxpan/api/space/addmanagers',
|
|
method: 'post',
|
|
headers: {
|
|
'Identifier':uid,
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
},
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 更新matter权限
|
|
*/
|
|
export function updateSpaceMetterPermit(uid:string,data:{space:string,matter:string,permits:Object}): AxiosPromise<{members:string[],dprts:string[]}> {
|
|
return request({
|
|
url: '/hxpan/api/space/permit/update',
|
|
method: 'post',
|
|
headers: {
|
|
'Identifier':uid,
|
|
},
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 重置matter特定权限
|
|
*/
|
|
export function resetSpaceMatterPermit(uid:string,data:{space:string,matter:string}): AxiosPromise<{members:string[],dprts:string[]}> {
|
|
return request({
|
|
url: '/hxpan/api/space/permit/reset',
|
|
method: 'post',
|
|
headers: {
|
|
'Identifier':uid,
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
},
|
|
data: data
|
|
});
|
|
}
|
|
|
|
/**
|
|
* 保存文档成员权限修改
|
|
*/
|
|
export function postPermitedList(uid:string,data?:{permitList:string,permitInfos:string, update:string,uid:string,uuid:string,len:number}){
|
|
return request({
|
|
url: '/hxpan/api/share/permits',
|
|
method: 'post',
|
|
headers: {
|
|
'Identifier':uid,
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
},
|
|
data: data
|
|
});
|
|
}
|
|
|