factory_web/src/api/model/em.js

73 lines
1.4 KiB
JavaScript

import config from "@/config"
import http from "@/utils/request"
/*EM接口*/
export default {
// 测点集
mgroup: {
list: {
name: "测点集列表",
req: async function(data){
return await http.get(
`${config.API_URL}/em/equipment/`,
data
);
}
},
item: {
name: "获取测点集详情",
req: async function(id){
return await http.get(
`${config.API_URL}/em/equipment/${id}/`
);
}
},
update: {
name: "更新",
req: async function(id, data){
return await http.put(
`${config.API_URL}/em/equipment/${id}/`,
data);
}
},
create: {
name: "创建",
req: async function(data){
return await http.post(
`${config.API_URL}/em/equipment/`,
data);
}
},
delete: {
name: "删除",
req: async function(id){
return await http.delete(
`${config.API_URL}/em/equipment/${id}/`);
}
},
deletes: {
name: "批量删除",
req: async function(data){
return await http.post(
`${config.API_URL}/em/equipment/deletes/`,
data);
}
},
cquery: {
name: "复杂查询",
req: async function(data){
return await http.post(
`${config.API_URL}/em/equipment/cquery/`,
data);
}
},
deleteHard: {
name: "批量物理删除",
req: async function(data){
return await http.post(
`${config.API_URL}/em/equipment/deletes_hard/`,
data);
}
},
},
}