292 lines
6.4 KiB
JavaScript
292 lines
6.4 KiB
JavaScript
import config from "@/config"
|
|
import http from "@/utils/request"
|
|
|
|
export default {
|
|
lendingseal: {
|
|
list: {
|
|
url: `${config.API_URL}/ofm/lendingseal/`,
|
|
name: "印章列表",
|
|
req: async function(data){
|
|
return await http.get(this.url, data);
|
|
}
|
|
},
|
|
item: {
|
|
name: "印章详情",
|
|
req: async function(id){
|
|
return await http.get( `${config.API_URL}/ofm/lendingseal/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/ofm/lendingseal/`,
|
|
name: "新增印章使用记录",
|
|
req: async function(data){
|
|
return await http.post(this.url, data);
|
|
}
|
|
},
|
|
update: {
|
|
name: "更新印章使用记录",
|
|
req: async function(id, data){
|
|
return await http.put(
|
|
`${config.API_URL}/ofm/lendingseal/${id}/`,
|
|
data
|
|
);
|
|
}
|
|
},
|
|
delete: {
|
|
name: "删除印章管理",
|
|
req: async function(id){
|
|
return await http.delete(`${config.API_URL}/ofm/lendingseal/${id}/`);
|
|
}
|
|
},
|
|
},
|
|
mroom: {
|
|
list: {
|
|
url: `${config.API_URL}/ofm/mroom/`,
|
|
name: "会议室列表",
|
|
req: async function(data){
|
|
return await http.get(this.url, data);
|
|
}
|
|
},
|
|
item: {
|
|
name: "会议室详情",
|
|
req: async function(id){
|
|
return await http.get(`${config.API_URL}/ofm/mroom/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/ofm/mroom/`,
|
|
name: "新增会议室",
|
|
req: async function(data){
|
|
return await http.post(this.url, data);
|
|
}
|
|
},
|
|
update: {
|
|
name: "更新",
|
|
req: async function(id, data){
|
|
return await http.put(
|
|
`${config.API_URL}/ofm/mroom/${id}/`,data
|
|
);
|
|
}
|
|
},
|
|
delete: {
|
|
name: "删除",
|
|
req: async function (id) {
|
|
return await http.delete(`${config.API_URL}/ofm/mroom/${id}/`);
|
|
},
|
|
},
|
|
},
|
|
mroombooking: {
|
|
list: {
|
|
url: `${config.API_URL}/ofm/mroombooking/`,
|
|
name: "会议室预订列表",
|
|
req: async function(data){
|
|
return await http.get(this.url, data);
|
|
}
|
|
},
|
|
item: {
|
|
name: "会议室预订详情",
|
|
req: async function(id){
|
|
return await http.get(`${config.API_URL}/ofm/mroombooking/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/ofm/mroombooking/`,
|
|
name: "新增会议室预订",
|
|
req: async function(data){
|
|
return await http.post(this.url, data);
|
|
}
|
|
},
|
|
update: {
|
|
name: "更新",
|
|
req: async function(id, data){
|
|
return await http.put(
|
|
`${config.API_URL}/ofm/mroombooking/${id}/`,data
|
|
);
|
|
}
|
|
},
|
|
delete: {
|
|
name: "删除",
|
|
req: async function (id) {
|
|
return await http.delete(`${config.API_URL}/ofm/mroombooking/${id}/`);
|
|
},
|
|
},
|
|
},
|
|
mroomslot: {
|
|
list: {
|
|
url: `${config.API_URL}/ofm/mroomslot/`,
|
|
name: "会议室预订时段列表",
|
|
req: async function(data){
|
|
return await http.get(this.url, data);
|
|
}
|
|
},
|
|
item: {
|
|
name: "会议室预订时段详情",
|
|
req: async function(id){
|
|
return await http.get(`${config.API_URL}/ofm/mroomslot/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/ofm/mroomslot/`,
|
|
name: "新增会议室预订时段",
|
|
req: async function(data){
|
|
return await http.post(this.url, data);
|
|
}
|
|
},
|
|
delete: {
|
|
url: `${config.API_URL}/ofm/mroomslot/delete/`,
|
|
name: "批量物理删除",
|
|
req: async function(data){
|
|
return await http.post(this.url, data);
|
|
}
|
|
},
|
|
},
|
|
vehicle:{
|
|
list: {
|
|
url: `${config.API_URL}/ofm/vehicle/`,
|
|
name: "字段列表",
|
|
req: async function(data){
|
|
return await http.get(this.url, data);
|
|
}
|
|
},
|
|
item: {
|
|
name: "字段详情",
|
|
req: async function(id){
|
|
return await http.get( `${config.API_URL}/ofm/vehicle/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/ofm/vehicle/`,
|
|
name: "新增字段",
|
|
req: async function(data){
|
|
return await http.post(this.url, data);
|
|
}
|
|
},
|
|
update: {
|
|
name: "更新字段",
|
|
req: async function(id, data){
|
|
return await http.put(
|
|
`${config.API_URL}/ofm/vehicle/${id}/`,
|
|
data
|
|
);
|
|
}
|
|
},
|
|
delete: {
|
|
name: "删除字段",
|
|
req: async function(id){
|
|
return await http.delete(`${config.API_URL}/ofm/vehicle/${id}/`);
|
|
}
|
|
}
|
|
},
|
|
filerecord:{
|
|
list: {
|
|
url: `${config.API_URL}/ofm/filerecord/`,
|
|
name: "档案列表",
|
|
req: async function(data){
|
|
return await http.get(this.url, data);
|
|
}
|
|
},
|
|
item: {
|
|
name: "档案详情",
|
|
req: async function(id){
|
|
return await http.get( `${config.API_URL}/ofm/filerecord/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/ofm/filerecord/`,
|
|
name: "新增档案",
|
|
req: async function(data){
|
|
return await http.post(this.url, data);
|
|
}
|
|
},
|
|
update: {
|
|
name: "更新档案",
|
|
req: async function(id, data){
|
|
return await http.put(
|
|
`${config.API_URL}/ofm/filerecord/${id}/`,
|
|
data
|
|
);
|
|
}
|
|
},
|
|
delete: {
|
|
name: "删除档案",
|
|
req: async function(id){
|
|
return await http.delete(`${config.API_URL}/ofm/filerecord/${id}/`);
|
|
}
|
|
}
|
|
},
|
|
borrow:{
|
|
list: {
|
|
url: `${config.API_URL}/ofm/fileborrow/`,
|
|
name: "流转列表",
|
|
req: async function(data){
|
|
return await http.get(this.url, data);
|
|
}
|
|
},
|
|
item: {
|
|
name: "流转详情",
|
|
req: async function(id){
|
|
return await http.get( `${config.API_URL}/ofm/fileborrow/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/ofm/fileborrow/`,
|
|
name: "新增流转",
|
|
req: async function(data){
|
|
return await http.post(this.url, data);
|
|
}
|
|
},
|
|
update: {
|
|
name: "更新流转",
|
|
req: async function(id, data){
|
|
return await http.put(
|
|
`${config.API_URL}/ofm/fileborrow/${id}/`,
|
|
data
|
|
);
|
|
}
|
|
},
|
|
delete: {
|
|
name: "删除流转",
|
|
req: async function(id){
|
|
return await http.delete(`${config.API_URL}/ofm/fileborrow/${id}/`);
|
|
}
|
|
}
|
|
},
|
|
publicity: {
|
|
list: {
|
|
url: `${config.API_URL}/ofm/publicity/`,
|
|
name: "宣传报道列表",
|
|
req: async function(data){
|
|
return await http.get(this.url, data);
|
|
}
|
|
},
|
|
item: {
|
|
name: "宣传报道详情",
|
|
req: async function(id){
|
|
return await http.get( `${config.API_URL}/ofm/publicity/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/ofm/publicity/`,
|
|
name: "创建宣传报道",
|
|
req: async function(data){
|
|
return await http.post(this.url, data);
|
|
}
|
|
},
|
|
update: {
|
|
name: "删除宣传报道",
|
|
req: async function(id, data){
|
|
return await http.put(
|
|
`${config.API_URL}/ofm/publicity/${id}/`,
|
|
data
|
|
);
|
|
}
|
|
},
|
|
delete: {
|
|
name: "删除宣传报道",
|
|
req: async function(id){
|
|
return await http.delete(`${config.API_URL}/ofm/publicity/${id}/`);
|
|
}
|
|
}
|
|
},
|
|
}
|