fix:qm接口声明添加,route改动

This commit is contained in:
shijing 2024-07-24 13:44:36 +08:00
parent 55fb2b925c
commit 88aee21df9
2 changed files with 107 additions and 102 deletions

View File

@ -1,167 +1,152 @@
import config from "@/config" import config from "@/config";
import http from "@/utils/request" import http from "@/utils/request";
export default { export default {
//质量分析报告 //质量分析报告
getQuastat: { getQuastat: {
url: `${config.API_URL}/qm/quastat/`, url: `${config.API_URL}/qm/quastat/`,
name: "质量报告分析", name: "质量报告分析",
get: async function(data={}){ get: async function (data = {}) {
return await http.get(this.url, data); return await http.get(this.url, data);
} },
}, },
//质量分析报告更新 //质量分析报告更新
updateQuastat: { updateQuastat: {
name: "质量报告分析", name: "质量报告分析",
req: async function(id,data){ req: async function (id, data) {
return await http.put( return await http.put(`${config.API_URL}/qm/quastat/${id}/`, data);
`${config.API_URL}/qm/quastat/${id}/`, },
data
);
}
}, },
//班组记录添加质量分析 //班组记录添加质量分析
createQuastat: { createQuastat: {
url: `${config.API_URL}/qm/quastat/`, url: `${config.API_URL}/qm/quastat/`,
name: "质量报告分析", name: "质量报告分析",
post: async function(data={}){ post: async function (data = {}) {
return await http.post(this.url, data); return await http.post(this.url, data);
} },
}, },
//质检项目 //质检项目
getTestItem: { getTestItem: {
url: `${config.API_URL}/qm/testitem/`, url: `${config.API_URL}/qm/testitem/`,
name: "质检项目", name: "质检项目",
get: async function(data={}){ get: async function (data = {}) {
return await http.get(this.url, data); return await http.get(this.url, data);
} },
},
//获取不合格项
getNotOk: {
url: `${config.API_URL}/qm/notok_option/`,
name: "不合格项",
get: async function (data = {}) {
return await http.get(this.url, data);
},
}, },
ftest: { ftest: {
list: { list: {
name: "首件检验列表", name: "首件检验列表",
req: async function(data){ req: async function (data) {
return await http.get( return await http.get(`${config.API_URL}/qm/ftest/`, data);
`${config.API_URL}/qm/ftest/`, },
data
);
}
}, },
item: { item: {
name: "首件检验", name: "首件检验",
req: async function(id){ req: async function (id) {
return await http.get( return await http.get(`${config.API_URL}/qm/ftest/${id}/`);
`${config.API_URL}/qm/ftest/${id}/` },
);
}
}, },
update: { update: {
name: "更新首件检验", name: "更新首件检验",
req: async function(id, data){ req: async function (id, data) {
return await http.put( return await http.put(
`${config.API_URL}/qm/ftest/${id}/`, `${config.API_URL}/qm/ftest/${id}/`,
data); data
} );
},
}, },
create: { create: {
name: "创建首件检验", name: "创建首件检验",
req: async function(data){ req: async function (data) {
return await http.post( return await http.post(`${config.API_URL}/qm/ftest/`, data);
`${config.API_URL}/qm/ftest/`, },
data);
}
}, },
delete: { delete: {
name: "删除首件检验", name: "删除首件检验",
req: async function(id){ req: async function (id) {
return await http.delete( return await http.delete(`${config.API_URL}/qm/ftest/${id}/`);
`${config.API_URL}/qm/ftest/${id}/`); },
} },
}
}, },
ptest: { ptest: {
list: { list: {
name: "检验列表", name: "检验列表",
req: async function(data){ req: async function (data) {
return await http.get( return await http.get(`${config.API_URL}/qm/ptest/`, data);
`${config.API_URL}/qm/ptest/`, },
data
);
}
}, },
item: { item: {
name: "检验", name: "检验",
req: async function(id){ req: async function (id) {
return await http.get( return await http.get(`${config.API_URL}/qm/ptest/${id}/`);
`${config.API_URL}/qm/ptest/${id}/` },
);
}
}, },
update: { update: {
name: "更新检验", name: "更新检验",
req: async function(id, data){ req: async function (id, data) {
return await http.put( return await http.put(
`${config.API_URL}/qm/ptest/${id}/`, `${config.API_URL}/qm/ptest/${id}/`,
data); data
} );
},
}, },
create: { create: {
name: "创建检验", name: "创建检验",
req: async function(data){ req: async function (data) {
return await http.post( return await http.post(`${config.API_URL}/qm/ptest/`, data);
`${config.API_URL}/qm/ptest/`, },
data);
}
}, },
delete: { delete: {
name: "删除检验", name: "删除检验",
req: async function(id){ req: async function (id) {
return await http.delete( return await http.delete(`${config.API_URL}/qm/ptest/${id}/`);
`${config.API_URL}/qm/ptest/${id}/`); },
} },
}
}, },
ftestwork: { ftestwork: {
list: { list: {
name: "列表", name: "列表",
req: async function(data){ req: async function (data) {
return await http.get( return await http.get(`${config.API_URL}/qm/ftestwork/`, data);
`${config.API_URL}/qm/ftestwork/`, },
data
);
}
}, },
item: { item: {
name: "检验", name: "检验",
req: async function(id){ req: async function (id) {
return await http.get( return await http.get(`${config.API_URL}/qm/ftestwork/${id}/`);
`${config.API_URL}/qm/ftestwork/${id}/` },
);
}
}, },
update: { update: {
name: "更新", name: "更新",
req: async function(id, data){ req: async function (id, data) {
return await http.put( return await http.put(
`${config.API_URL}/qm/ftestwork/${id}/`, `${config.API_URL}/qm/ftestwork/${id}/`,
data); data
} );
},
}, },
create: { create: {
name: "创建", name: "创建",
req: async function(data){ req: async function (data) {
return await http.post( return await http.post(`${config.API_URL}/qm/ftestwork/`, data);
`${config.API_URL}/qm/ftestwork/`, },
data);
}
}, },
delete: { delete: {
name: "删除", name: "删除",
req: async function(id){ req: async function (id) {
return await http.delete( return await http.delete(
`${config.API_URL}/qm/ftestwork/${id}/`); `${config.API_URL}/qm/ftestwork/${id}/`
} );
} },
},
}, },
};
}

View File

@ -986,6 +986,16 @@ const routes = [
}, },
component: "mtm/materials", component: "mtm/materials",
}, },
{
name: "process",
path: "/mtm/process",
meta: {
title: "工序管理",
icon: "el-icon-grid",
perms: ["process"],
},
component: "mtm/process",
},
{ {
name: "mgruops", name: "mgruops",
path: "/mtm/mgruops", path: "/mtm/mgruops",
@ -1089,7 +1099,7 @@ const routes = [
meta: { meta: {
title: "车间任务", title: "车间任务",
icon: "el-icon-cellphone", icon: "el-icon-cellphone",
perms: ["pm_gx"], perms: ["utask_gx"],
}, },
component: "pm/utask", component: "pm/utask",
}, },
@ -1224,16 +1234,26 @@ const routes = [
perms: ["wpm_gx"], perms: ["wpm_gx"],
}, },
children: [ children: [
{ // {
name: "printTest", // name: "chart",
path: "/wpm_gx/print", // path: "/wpm_gx/chart",
meta: { // meta: {
title: "打印测试", // title: "chart",
icon: "el-icon-files", // icon: "el-icon-files",
perms: ["wpm_gx"], // perms: ["wpm_gx"],
}, // },
component: "wpm_gx/print", // component: "wpm_gx/chart",
}, // },
// {
// name: "printTest",
// path: "/wpm_gx/print",
// meta: {
// title: "打印测试",
// icon: "el-icon-files",
// perms: ["wpm_gx"],
// },
// component: "wpm_gx/print",
// },
{ {
name: "qiepian", name: "qiepian",
path: "/wpm_gx/qiepian", path: "/wpm_gx/qiepian",