fix:qm接口声明添加,route改动
This commit is contained in:
parent
55fb2b925c
commit
88aee21df9
|
@ -1,167 +1,152 @@
|
|||
import config from "@/config"
|
||||
import http from "@/utils/request"
|
||||
import config from "@/config";
|
||||
import http from "@/utils/request";
|
||||
|
||||
export default {
|
||||
//质量分析报告
|
||||
getQuastat: {
|
||||
url: `${config.API_URL}/qm/quastat/`,
|
||||
name: "质量报告分析",
|
||||
get: async function(data={}){
|
||||
get: async function (data = {}) {
|
||||
return await http.get(this.url, data);
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
//质量分析报告更新
|
||||
updateQuastat: {
|
||||
name: "质量报告分析",
|
||||
req: async function(id,data){
|
||||
return await http.put(
|
||||
`${config.API_URL}/qm/quastat/${id}/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
req: async function (id, data) {
|
||||
return await http.put(`${config.API_URL}/qm/quastat/${id}/`, data);
|
||||
},
|
||||
},
|
||||
//班组记录添加质量分析
|
||||
createQuastat: {
|
||||
url: `${config.API_URL}/qm/quastat/`,
|
||||
name: "质量报告分析",
|
||||
post: async function(data={}){
|
||||
post: async function (data = {}) {
|
||||
return await http.post(this.url, data);
|
||||
}
|
||||
},
|
||||
},
|
||||
//质检项目
|
||||
getTestItem: {
|
||||
url: `${config.API_URL}/qm/testitem/`,
|
||||
name: "质检项目",
|
||||
get: async function(data={}){
|
||||
get: async function (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: {
|
||||
list: {
|
||||
name: "首件检验列表",
|
||||
req: async function(data){
|
||||
return await http.get(
|
||||
`${config.API_URL}/qm/ftest/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
req: async function (data) {
|
||||
return await http.get(`${config.API_URL}/qm/ftest/`, data);
|
||||
},
|
||||
},
|
||||
item: {
|
||||
name: "首件检验",
|
||||
req: async function(id){
|
||||
return await http.get(
|
||||
`${config.API_URL}/qm/ftest/${id}/`
|
||||
);
|
||||
}
|
||||
req: async function (id) {
|
||||
return await http.get(`${config.API_URL}/qm/ftest/${id}/`);
|
||||
},
|
||||
},
|
||||
update: {
|
||||
name: "更新首件检验",
|
||||
req: async function(id, data){
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/qm/ftest/${id}/`,
|
||||
data);
|
||||
}
|
||||
data
|
||||
);
|
||||
},
|
||||
},
|
||||
create: {
|
||||
create: {
|
||||
name: "创建首件检验",
|
||||
req: async function(data){
|
||||
return await http.post(
|
||||
`${config.API_URL}/qm/ftest/`,
|
||||
data);
|
||||
}
|
||||
req: async function (data) {
|
||||
return await http.post(`${config.API_URL}/qm/ftest/`, data);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
name: "删除首件检验",
|
||||
req: async function(id){
|
||||
return await http.delete(
|
||||
`${config.API_URL}/qm/ftest/${id}/`);
|
||||
}
|
||||
}
|
||||
req: async function (id) {
|
||||
return await http.delete(`${config.API_URL}/qm/ftest/${id}/`);
|
||||
},
|
||||
},
|
||||
},
|
||||
ptest: {
|
||||
list: {
|
||||
name: "检验列表",
|
||||
req: async function(data){
|
||||
return await http.get(
|
||||
`${config.API_URL}/qm/ptest/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
req: async function (data) {
|
||||
return await http.get(`${config.API_URL}/qm/ptest/`, data);
|
||||
},
|
||||
},
|
||||
item: {
|
||||
name: "检验",
|
||||
req: async function(id){
|
||||
return await http.get(
|
||||
`${config.API_URL}/qm/ptest/${id}/`
|
||||
);
|
||||
}
|
||||
req: async function (id) {
|
||||
return await http.get(`${config.API_URL}/qm/ptest/${id}/`);
|
||||
},
|
||||
},
|
||||
update: {
|
||||
name: "更新检验",
|
||||
req: async function(id, data){
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/qm/ptest/${id}/`,
|
||||
data);
|
||||
}
|
||||
data
|
||||
);
|
||||
},
|
||||
},
|
||||
create: {
|
||||
create: {
|
||||
name: "创建检验",
|
||||
req: async function(data){
|
||||
return await http.post(
|
||||
`${config.API_URL}/qm/ptest/`,
|
||||
data);
|
||||
}
|
||||
req: async function (data) {
|
||||
return await http.post(`${config.API_URL}/qm/ptest/`, data);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
name: "删除检验",
|
||||
req: async function(id){
|
||||
return await http.delete(
|
||||
`${config.API_URL}/qm/ptest/${id}/`);
|
||||
}
|
||||
}
|
||||
req: async function (id) {
|
||||
return await http.delete(`${config.API_URL}/qm/ptest/${id}/`);
|
||||
},
|
||||
},
|
||||
},
|
||||
ftestwork: {
|
||||
list: {
|
||||
name: "列表",
|
||||
req: async function(data){
|
||||
return await http.get(
|
||||
`${config.API_URL}/qm/ftestwork/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
req: async function (data) {
|
||||
return await http.get(`${config.API_URL}/qm/ftestwork/`, data);
|
||||
},
|
||||
},
|
||||
item: {
|
||||
name: "检验",
|
||||
req: async function(id){
|
||||
return await http.get(
|
||||
`${config.API_URL}/qm/ftestwork/${id}/`
|
||||
);
|
||||
}
|
||||
req: async function (id) {
|
||||
return await http.get(`${config.API_URL}/qm/ftestwork/${id}/`);
|
||||
},
|
||||
},
|
||||
update: {
|
||||
name: "更新",
|
||||
req: async function(id, data){
|
||||
req: async function (id, data) {
|
||||
return await http.put(
|
||||
`${config.API_URL}/qm/ftestwork/${id}/`,
|
||||
data);
|
||||
}
|
||||
data
|
||||
);
|
||||
},
|
||||
},
|
||||
create: {
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function(data){
|
||||
return await http.post(
|
||||
`${config.API_URL}/qm/ftestwork/`,
|
||||
data);
|
||||
}
|
||||
req: async function (data) {
|
||||
return await http.post(`${config.API_URL}/qm/ftestwork/`, data);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function(id){
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/qm/ftestwork/${id}/`);
|
||||
}
|
||||
}
|
||||
`${config.API_URL}/qm/ftestwork/${id}/`
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
}
|
||||
};
|
||||
|
|
|
@ -986,6 +986,16 @@ const routes = [
|
|||
},
|
||||
component: "mtm/materials",
|
||||
},
|
||||
{
|
||||
name: "process",
|
||||
path: "/mtm/process",
|
||||
meta: {
|
||||
title: "工序管理",
|
||||
icon: "el-icon-grid",
|
||||
perms: ["process"],
|
||||
},
|
||||
component: "mtm/process",
|
||||
},
|
||||
{
|
||||
name: "mgruops",
|
||||
path: "/mtm/mgruops",
|
||||
|
@ -1089,7 +1099,7 @@ const routes = [
|
|||
meta: {
|
||||
title: "车间任务",
|
||||
icon: "el-icon-cellphone",
|
||||
perms: ["pm_gx"],
|
||||
perms: ["utask_gx"],
|
||||
},
|
||||
component: "pm/utask",
|
||||
},
|
||||
|
@ -1224,16 +1234,26 @@ const routes = [
|
|||
perms: ["wpm_gx"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: "printTest",
|
||||
path: "/wpm_gx/print",
|
||||
meta: {
|
||||
title: "打印测试",
|
||||
icon: "el-icon-files",
|
||||
perms: ["wpm_gx"],
|
||||
},
|
||||
component: "wpm_gx/print",
|
||||
},
|
||||
// {
|
||||
// name: "chart",
|
||||
// path: "/wpm_gx/chart",
|
||||
// meta: {
|
||||
// title: "chart",
|
||||
// icon: "el-icon-files",
|
||||
// perms: ["wpm_gx"],
|
||||
// },
|
||||
// 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",
|
||||
path: "/wpm_gx/qiepian",
|
||||
|
|
Loading…
Reference in New Issue