166 lines
3.7 KiB
JavaScript
166 lines
3.7 KiB
JavaScript
import config from "@/config"
|
|
import http from "@/utils/request"
|
|
|
|
export default {
|
|
patentinfo: {
|
|
list: {
|
|
url: `${config.API_URL}/srm/patentinfo/`,
|
|
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}/srm/patentinfo/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/srm/patentinfo/`,
|
|
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}/srm/patentinfo/${id}/`,
|
|
data
|
|
);
|
|
}
|
|
},
|
|
delete: {
|
|
name: "专利删除",
|
|
req: async function(id){
|
|
return await http.delete(`${config.API_URL}/srm/patentinfo/${id}/`);
|
|
}
|
|
},
|
|
},
|
|
papersecret: {
|
|
list: {
|
|
url: `${config.API_URL}/srm/paperse/`,
|
|
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}/srm/paperse/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/srm/paperse/`,
|
|
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}/srm/paperse/${id}/`,
|
|
data
|
|
);
|
|
}
|
|
},
|
|
delete: {
|
|
name: "删除论文",
|
|
req: async function(id){
|
|
return await http.delete(`${config.API_URL}/srm/paperse/${id}/`);
|
|
}
|
|
}
|
|
},
|
|
patentrecord: {
|
|
list: {
|
|
url: `${config.API_URL}/srm/patentrecord/`,
|
|
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}/srm/patentrecord/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/srm/patentrecord/`,
|
|
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}/srm/patentrecord/${id}/`,
|
|
data
|
|
);
|
|
}
|
|
},
|
|
delete: {
|
|
name: "删除专利台账",
|
|
req: async function(id){
|
|
return await http.delete(`${config.API_URL}/srm/patentrecord/${id}/`);
|
|
}
|
|
},
|
|
get_name: {
|
|
name: "获取专利名称列表",
|
|
req: async function(search=''){
|
|
return await http.get(`${config.API_URL}/srm/patentrecord/patent_name/`,{params: { search }});
|
|
}
|
|
},
|
|
},
|
|
paperrecord: {
|
|
list: {
|
|
url: `${config.API_URL}/srm/paperrecord/`,
|
|
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}/srm/paperrecord/${id}/`);
|
|
}
|
|
},
|
|
create: {
|
|
url: `${config.API_URL}/srm/paperrecord/`,
|
|
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}/srm/paperrecord/${id}/`,
|
|
data
|
|
);
|
|
}
|
|
},
|
|
delete: {
|
|
name: "删除论文台账",
|
|
req: async function(id){
|
|
return await http.delete(`${config.API_URL}/srm/paperrecord/${id}/`);
|
|
}
|
|
},
|
|
get_name: {
|
|
name: "获取论文名称列表",
|
|
req: async function(search=''){
|
|
return await http.get(`${config.API_URL}/srm/paperrecord/paper_name/`,{params: { search }});
|
|
}
|
|
},
|
|
},
|
|
}
|