diff --git a/src/api/eqpt/status/borrow.ts b/src/api/eqpt/status/borrow.ts new file mode 100644 index 0000000..9d8370e --- /dev/null +++ b/src/api/eqpt/status/borrow.ts @@ -0,0 +1,81 @@ +// 借用申请 +import request from '@/api/index' + +// 不同状态的列表 +export function getListPage(params: any, statusName: string) { + if (statusName === '全部') { + return request({ + url: `/status/allPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '已审批') { + return request({ + url: `/status/approval/approvedListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '待审批') { + return request({ + url: `/status/approval/toApprovalListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else { + return request({ + url: `/status/approval/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } +} +// 保存编辑 +export function editStatus(data: object) { + return request({ + url: '/status/approval/saveOrUpdate', + method: 'post', + data, + }) +} +// 提交 +export function submitStatus(data: object) { + return request({ + url: '/status/approval/submit', + method: 'post', + data, + }) +} +// 删除记录 +export function deleteStatus(id: string) { + return request({ + url: `/status/approval/delete?id=${id}`, + method: 'post', + }) +} +// 取消 +export function cancelStatus(data: object) { + return request({ + url: '/status/approval/cancel', + method: 'post', + data, + }) +} +// 详情 +export function detailStatus(params: object) { + return request({ + url: '/status/approval/detail', + method: 'get', + params, + }) +} +// 审批操作 +export function handlerApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { + return request({ + url: `/status/approval/${type}`, + method: 'post', + data, + }) +} diff --git a/src/api/eqpt/status/borrow.ts b/src/api/eqpt/status/borrow.ts new file mode 100644 index 0000000..9d8370e --- /dev/null +++ b/src/api/eqpt/status/borrow.ts @@ -0,0 +1,81 @@ +// 借用申请 +import request from '@/api/index' + +// 不同状态的列表 +export function getListPage(params: any, statusName: string) { + if (statusName === '全部') { + return request({ + url: `/status/allPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '已审批') { + return request({ + url: `/status/approval/approvedListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '待审批') { + return request({ + url: `/status/approval/toApprovalListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else { + return request({ + url: `/status/approval/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } +} +// 保存编辑 +export function editStatus(data: object) { + return request({ + url: '/status/approval/saveOrUpdate', + method: 'post', + data, + }) +} +// 提交 +export function submitStatus(data: object) { + return request({ + url: '/status/approval/submit', + method: 'post', + data, + }) +} +// 删除记录 +export function deleteStatus(id: string) { + return request({ + url: `/status/approval/delete?id=${id}`, + method: 'post', + }) +} +// 取消 +export function cancelStatus(data: object) { + return request({ + url: '/status/approval/cancel', + method: 'post', + data, + }) +} +// 详情 +export function detailStatus(params: object) { + return request({ + url: '/status/approval/detail', + method: 'get', + params, + }) +} +// 审批操作 +export function handlerApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { + return request({ + url: `/status/approval/${type}`, + method: 'post', + data, + }) +} diff --git a/src/api/eqpt/status/maintain.ts b/src/api/eqpt/status/maintain.ts new file mode 100644 index 0000000..a2c94a2 --- /dev/null +++ b/src/api/eqpt/status/maintain.ts @@ -0,0 +1,40 @@ +// 故障维修接口 +import request from '@/api/index' + +export function getMaintainListPage(params: any) { + return request({ + url: `/maintain/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) +} +// 编辑 +export function updateMaintain(data: object) { + return request({ + url: '/maintain/update', + method: 'post', + data, + }) +} +// 新建 +export function addMaintain(data: object) { + return request({ + url: '/maintain/add', + method: 'post', + data, + }) +} +// 详情 +export function detailMaintain(data: object) { + return request({ + url: `/maintain/detail?id=${data.id}`, + method: 'get', + }) +} +// 删除 +export function deleteMaintain(id: string) { + return request({ + url: `/maintain/delete?id=${id}`, + method: 'get', + }) +} diff --git a/src/api/eqpt/status/borrow.ts b/src/api/eqpt/status/borrow.ts new file mode 100644 index 0000000..9d8370e --- /dev/null +++ b/src/api/eqpt/status/borrow.ts @@ -0,0 +1,81 @@ +// 借用申请 +import request from '@/api/index' + +// 不同状态的列表 +export function getListPage(params: any, statusName: string) { + if (statusName === '全部') { + return request({ + url: `/status/allPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '已审批') { + return request({ + url: `/status/approval/approvedListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '待审批') { + return request({ + url: `/status/approval/toApprovalListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else { + return request({ + url: `/status/approval/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } +} +// 保存编辑 +export function editStatus(data: object) { + return request({ + url: '/status/approval/saveOrUpdate', + method: 'post', + data, + }) +} +// 提交 +export function submitStatus(data: object) { + return request({ + url: '/status/approval/submit', + method: 'post', + data, + }) +} +// 删除记录 +export function deleteStatus(id: string) { + return request({ + url: `/status/approval/delete?id=${id}`, + method: 'post', + }) +} +// 取消 +export function cancelStatus(data: object) { + return request({ + url: '/status/approval/cancel', + method: 'post', + data, + }) +} +// 详情 +export function detailStatus(params: object) { + return request({ + url: '/status/approval/detail', + method: 'get', + params, + }) +} +// 审批操作 +export function handlerApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { + return request({ + url: `/status/approval/${type}`, + method: 'post', + data, + }) +} diff --git a/src/api/eqpt/status/maintain.ts b/src/api/eqpt/status/maintain.ts new file mode 100644 index 0000000..a2c94a2 --- /dev/null +++ b/src/api/eqpt/status/maintain.ts @@ -0,0 +1,40 @@ +// 故障维修接口 +import request from '@/api/index' + +export function getMaintainListPage(params: any) { + return request({ + url: `/maintain/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) +} +// 编辑 +export function updateMaintain(data: object) { + return request({ + url: '/maintain/update', + method: 'post', + data, + }) +} +// 新建 +export function addMaintain(data: object) { + return request({ + url: '/maintain/add', + method: 'post', + data, + }) +} +// 详情 +export function detailMaintain(data: object) { + return request({ + url: `/maintain/detail?id=${data.id}`, + method: 'get', + }) +} +// 删除 +export function deleteMaintain(id: string) { + return request({ + url: `/maintain/delete?id=${id}`, + method: 'get', + }) +} diff --git a/src/router/modules/tested.ts b/src/router/modules/tested.ts index fe0b97b..281be40 100644 --- a/src/router/modules/tested.ts +++ b/src/router/modules/tested.ts @@ -811,6 +811,80 @@ }, ], }, + { + path: '/maintainlist', + component: Layout, + redirect: '/maintainpage', + name: 'MaintainList', + meta: { + title: '故障维修', + icon: 'ep:key', + auth: '/tested/status/maintain', + }, + children: [ + { + path: '/maintainpage', + name: 'MaintainPage', + component: () => import('@/views/tested/status/maintain/index.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + { + path: '/maintainpage/:type', + name: 'maintainEdit', + component: () => import('@/views/tested/status/maintain/components/edit.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + ], + }, + { + path: '/borrowlist', + component: Layout, + redirect: '/borrowpage', + name: 'BorrwoList', + meta: { + title: '借用申请', + icon: 'ep:key', + auth: '/tested/status/borrow', + }, + children: [ + { + path: '/borrowpage', + name: 'BorrowPage', + component: () => import('@/views/tested/status/borrow/index.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + { + path: '/borrowpage/:type', + name: 'borrowpageEdit', + component: () => import('@/views/tested/status/borrow/components/edit.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + ], + }, ], }, // 文档管理 diff --git a/src/api/eqpt/status/borrow.ts b/src/api/eqpt/status/borrow.ts new file mode 100644 index 0000000..9d8370e --- /dev/null +++ b/src/api/eqpt/status/borrow.ts @@ -0,0 +1,81 @@ +// 借用申请 +import request from '@/api/index' + +// 不同状态的列表 +export function getListPage(params: any, statusName: string) { + if (statusName === '全部') { + return request({ + url: `/status/allPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '已审批') { + return request({ + url: `/status/approval/approvedListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '待审批') { + return request({ + url: `/status/approval/toApprovalListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else { + return request({ + url: `/status/approval/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } +} +// 保存编辑 +export function editStatus(data: object) { + return request({ + url: '/status/approval/saveOrUpdate', + method: 'post', + data, + }) +} +// 提交 +export function submitStatus(data: object) { + return request({ + url: '/status/approval/submit', + method: 'post', + data, + }) +} +// 删除记录 +export function deleteStatus(id: string) { + return request({ + url: `/status/approval/delete?id=${id}`, + method: 'post', + }) +} +// 取消 +export function cancelStatus(data: object) { + return request({ + url: '/status/approval/cancel', + method: 'post', + data, + }) +} +// 详情 +export function detailStatus(params: object) { + return request({ + url: '/status/approval/detail', + method: 'get', + params, + }) +} +// 审批操作 +export function handlerApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { + return request({ + url: `/status/approval/${type}`, + method: 'post', + data, + }) +} diff --git a/src/api/eqpt/status/maintain.ts b/src/api/eqpt/status/maintain.ts new file mode 100644 index 0000000..a2c94a2 --- /dev/null +++ b/src/api/eqpt/status/maintain.ts @@ -0,0 +1,40 @@ +// 故障维修接口 +import request from '@/api/index' + +export function getMaintainListPage(params: any) { + return request({ + url: `/maintain/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) +} +// 编辑 +export function updateMaintain(data: object) { + return request({ + url: '/maintain/update', + method: 'post', + data, + }) +} +// 新建 +export function addMaintain(data: object) { + return request({ + url: '/maintain/add', + method: 'post', + data, + }) +} +// 详情 +export function detailMaintain(data: object) { + return request({ + url: `/maintain/detail?id=${data.id}`, + method: 'get', + }) +} +// 删除 +export function deleteMaintain(id: string) { + return request({ + url: `/maintain/delete?id=${id}`, + method: 'get', + }) +} diff --git a/src/router/modules/tested.ts b/src/router/modules/tested.ts index fe0b97b..281be40 100644 --- a/src/router/modules/tested.ts +++ b/src/router/modules/tested.ts @@ -811,6 +811,80 @@ }, ], }, + { + path: '/maintainlist', + component: Layout, + redirect: '/maintainpage', + name: 'MaintainList', + meta: { + title: '故障维修', + icon: 'ep:key', + auth: '/tested/status/maintain', + }, + children: [ + { + path: '/maintainpage', + name: 'MaintainPage', + component: () => import('@/views/tested/status/maintain/index.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + { + path: '/maintainpage/:type', + name: 'maintainEdit', + component: () => import('@/views/tested/status/maintain/components/edit.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + ], + }, + { + path: '/borrowlist', + component: Layout, + redirect: '/borrowpage', + name: 'BorrwoList', + meta: { + title: '借用申请', + icon: 'ep:key', + auth: '/tested/status/borrow', + }, + children: [ + { + path: '/borrowpage', + name: 'BorrowPage', + component: () => import('@/views/tested/status/borrow/index.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + { + path: '/borrowpage/:type', + name: 'borrowpageEdit', + component: () => import('@/views/tested/status/borrow/components/edit.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + ], + }, ], }, // 文档管理 diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 714cf00..afab766 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -80,6 +80,7 @@ customerId: [{ required: true, message: '委托方必选', trigger: ['blur', 'change'] }], }) // 表单验证规则 // 弹窗初始化 +const processId = ref() const isAdmin = ref(false) const companyList = ref([]) // 单位列表 const initDialog = () => { @@ -114,6 +115,7 @@ console.log(ruleForm.value, 'rule') ruleForm.value.isUrgent = String(res.data.data.isUrgent) ruleForm.value.isOnSiteCheck = String(res.data.data.isOnSiteCheck) + processId.value = ruleForm.value.processId }) } } @@ -348,6 +350,7 @@ }) }) } +const activeName = ref('基本信息') - - - - - - - - - - - - - - - - - - - - - + + + + 基本信息 + + + 审批详情 + + + + + diff --git a/src/api/eqpt/status/borrow.ts b/src/api/eqpt/status/borrow.ts new file mode 100644 index 0000000..9d8370e --- /dev/null +++ b/src/api/eqpt/status/borrow.ts @@ -0,0 +1,81 @@ +// 借用申请 +import request from '@/api/index' + +// 不同状态的列表 +export function getListPage(params: any, statusName: string) { + if (statusName === '全部') { + return request({ + url: `/status/allPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '已审批') { + return request({ + url: `/status/approval/approvedListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '待审批') { + return request({ + url: `/status/approval/toApprovalListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else { + return request({ + url: `/status/approval/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } +} +// 保存编辑 +export function editStatus(data: object) { + return request({ + url: '/status/approval/saveOrUpdate', + method: 'post', + data, + }) +} +// 提交 +export function submitStatus(data: object) { + return request({ + url: '/status/approval/submit', + method: 'post', + data, + }) +} +// 删除记录 +export function deleteStatus(id: string) { + return request({ + url: `/status/approval/delete?id=${id}`, + method: 'post', + }) +} +// 取消 +export function cancelStatus(data: object) { + return request({ + url: '/status/approval/cancel', + method: 'post', + data, + }) +} +// 详情 +export function detailStatus(params: object) { + return request({ + url: '/status/approval/detail', + method: 'get', + params, + }) +} +// 审批操作 +export function handlerApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { + return request({ + url: `/status/approval/${type}`, + method: 'post', + data, + }) +} diff --git a/src/api/eqpt/status/maintain.ts b/src/api/eqpt/status/maintain.ts new file mode 100644 index 0000000..a2c94a2 --- /dev/null +++ b/src/api/eqpt/status/maintain.ts @@ -0,0 +1,40 @@ +// 故障维修接口 +import request from '@/api/index' + +export function getMaintainListPage(params: any) { + return request({ + url: `/maintain/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) +} +// 编辑 +export function updateMaintain(data: object) { + return request({ + url: '/maintain/update', + method: 'post', + data, + }) +} +// 新建 +export function addMaintain(data: object) { + return request({ + url: '/maintain/add', + method: 'post', + data, + }) +} +// 详情 +export function detailMaintain(data: object) { + return request({ + url: `/maintain/detail?id=${data.id}`, + method: 'get', + }) +} +// 删除 +export function deleteMaintain(id: string) { + return request({ + url: `/maintain/delete?id=${id}`, + method: 'get', + }) +} diff --git a/src/router/modules/tested.ts b/src/router/modules/tested.ts index fe0b97b..281be40 100644 --- a/src/router/modules/tested.ts +++ b/src/router/modules/tested.ts @@ -811,6 +811,80 @@ }, ], }, + { + path: '/maintainlist', + component: Layout, + redirect: '/maintainpage', + name: 'MaintainList', + meta: { + title: '故障维修', + icon: 'ep:key', + auth: '/tested/status/maintain', + }, + children: [ + { + path: '/maintainpage', + name: 'MaintainPage', + component: () => import('@/views/tested/status/maintain/index.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + { + path: '/maintainpage/:type', + name: 'maintainEdit', + component: () => import('@/views/tested/status/maintain/components/edit.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + ], + }, + { + path: '/borrowlist', + component: Layout, + redirect: '/borrowpage', + name: 'BorrwoList', + meta: { + title: '借用申请', + icon: 'ep:key', + auth: '/tested/status/borrow', + }, + children: [ + { + path: '/borrowpage', + name: 'BorrowPage', + component: () => import('@/views/tested/status/borrow/index.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + { + path: '/borrowpage/:type', + name: 'borrowpageEdit', + component: () => import('@/views/tested/status/borrow/components/edit.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + ], + }, ], }, // 文档管理 diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 714cf00..afab766 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -80,6 +80,7 @@ customerId: [{ required: true, message: '委托方必选', trigger: ['blur', 'change'] }], }) // 表单验证规则 // 弹窗初始化 +const processId = ref() const isAdmin = ref(false) const companyList = ref([]) // 单位列表 const initDialog = () => { @@ -114,6 +115,7 @@ console.log(ruleForm.value, 'rule') ruleForm.value.isUrgent = String(res.data.data.isUrgent) ruleForm.value.isOnSiteCheck = String(res.data.data.isOnSiteCheck) + processId.value = ruleForm.value.processId }) } } @@ -348,6 +350,7 @@ }) }) } +const activeName = ref('基本信息') - - - - - - - - - - - - - - - - - - - - - + + + + 基本信息 + + + 审批详情 + + + + + diff --git a/src/views/tested/status/borrow/components/edit.vue b/src/views/tested/status/borrow/components/edit.vue new file mode 100644 index 0000000..1085613 --- /dev/null +++ b/src/views/tested/status/borrow/components/edit.vue @@ -0,0 +1,3 @@ + diff --git a/src/api/eqpt/status/borrow.ts b/src/api/eqpt/status/borrow.ts new file mode 100644 index 0000000..9d8370e --- /dev/null +++ b/src/api/eqpt/status/borrow.ts @@ -0,0 +1,81 @@ +// 借用申请 +import request from '@/api/index' + +// 不同状态的列表 +export function getListPage(params: any, statusName: string) { + if (statusName === '全部') { + return request({ + url: `/status/allPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '已审批') { + return request({ + url: `/status/approval/approvedListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '待审批') { + return request({ + url: `/status/approval/toApprovalListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else { + return request({ + url: `/status/approval/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } +} +// 保存编辑 +export function editStatus(data: object) { + return request({ + url: '/status/approval/saveOrUpdate', + method: 'post', + data, + }) +} +// 提交 +export function submitStatus(data: object) { + return request({ + url: '/status/approval/submit', + method: 'post', + data, + }) +} +// 删除记录 +export function deleteStatus(id: string) { + return request({ + url: `/status/approval/delete?id=${id}`, + method: 'post', + }) +} +// 取消 +export function cancelStatus(data: object) { + return request({ + url: '/status/approval/cancel', + method: 'post', + data, + }) +} +// 详情 +export function detailStatus(params: object) { + return request({ + url: '/status/approval/detail', + method: 'get', + params, + }) +} +// 审批操作 +export function handlerApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { + return request({ + url: `/status/approval/${type}`, + method: 'post', + data, + }) +} diff --git a/src/api/eqpt/status/maintain.ts b/src/api/eqpt/status/maintain.ts new file mode 100644 index 0000000..a2c94a2 --- /dev/null +++ b/src/api/eqpt/status/maintain.ts @@ -0,0 +1,40 @@ +// 故障维修接口 +import request from '@/api/index' + +export function getMaintainListPage(params: any) { + return request({ + url: `/maintain/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) +} +// 编辑 +export function updateMaintain(data: object) { + return request({ + url: '/maintain/update', + method: 'post', + data, + }) +} +// 新建 +export function addMaintain(data: object) { + return request({ + url: '/maintain/add', + method: 'post', + data, + }) +} +// 详情 +export function detailMaintain(data: object) { + return request({ + url: `/maintain/detail?id=${data.id}`, + method: 'get', + }) +} +// 删除 +export function deleteMaintain(id: string) { + return request({ + url: `/maintain/delete?id=${id}`, + method: 'get', + }) +} diff --git a/src/router/modules/tested.ts b/src/router/modules/tested.ts index fe0b97b..281be40 100644 --- a/src/router/modules/tested.ts +++ b/src/router/modules/tested.ts @@ -811,6 +811,80 @@ }, ], }, + { + path: '/maintainlist', + component: Layout, + redirect: '/maintainpage', + name: 'MaintainList', + meta: { + title: '故障维修', + icon: 'ep:key', + auth: '/tested/status/maintain', + }, + children: [ + { + path: '/maintainpage', + name: 'MaintainPage', + component: () => import('@/views/tested/status/maintain/index.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + { + path: '/maintainpage/:type', + name: 'maintainEdit', + component: () => import('@/views/tested/status/maintain/components/edit.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + ], + }, + { + path: '/borrowlist', + component: Layout, + redirect: '/borrowpage', + name: 'BorrwoList', + meta: { + title: '借用申请', + icon: 'ep:key', + auth: '/tested/status/borrow', + }, + children: [ + { + path: '/borrowpage', + name: 'BorrowPage', + component: () => import('@/views/tested/status/borrow/index.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + { + path: '/borrowpage/:type', + name: 'borrowpageEdit', + component: () => import('@/views/tested/status/borrow/components/edit.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + ], + }, ], }, // 文档管理 diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 714cf00..afab766 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -80,6 +80,7 @@ customerId: [{ required: true, message: '委托方必选', trigger: ['blur', 'change'] }], }) // 表单验证规则 // 弹窗初始化 +const processId = ref() const isAdmin = ref(false) const companyList = ref([]) // 单位列表 const initDialog = () => { @@ -114,6 +115,7 @@ console.log(ruleForm.value, 'rule') ruleForm.value.isUrgent = String(res.data.data.isUrgent) ruleForm.value.isOnSiteCheck = String(res.data.data.isOnSiteCheck) + processId.value = ruleForm.value.processId }) } } @@ -348,6 +350,7 @@ }) }) } +const activeName = ref('基本信息') - - - - - - - - - - - - - - - - - - - - - + + + + 基本信息 + + + 审批详情 + + + + + diff --git a/src/views/tested/status/borrow/components/edit.vue b/src/views/tested/status/borrow/components/edit.vue new file mode 100644 index 0000000..1085613 --- /dev/null +++ b/src/views/tested/status/borrow/components/edit.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/tested/status/borrow/index.vue b/src/views/tested/status/borrow/index.vue new file mode 100644 index 0000000..1085613 --- /dev/null +++ b/src/views/tested/status/borrow/index.vue @@ -0,0 +1,3 @@ + diff --git a/src/api/eqpt/status/borrow.ts b/src/api/eqpt/status/borrow.ts new file mode 100644 index 0000000..9d8370e --- /dev/null +++ b/src/api/eqpt/status/borrow.ts @@ -0,0 +1,81 @@ +// 借用申请 +import request from '@/api/index' + +// 不同状态的列表 +export function getListPage(params: any, statusName: string) { + if (statusName === '全部') { + return request({ + url: `/status/allPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '已审批') { + return request({ + url: `/status/approval/approvedListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '待审批') { + return request({ + url: `/status/approval/toApprovalListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else { + return request({ + url: `/status/approval/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } +} +// 保存编辑 +export function editStatus(data: object) { + return request({ + url: '/status/approval/saveOrUpdate', + method: 'post', + data, + }) +} +// 提交 +export function submitStatus(data: object) { + return request({ + url: '/status/approval/submit', + method: 'post', + data, + }) +} +// 删除记录 +export function deleteStatus(id: string) { + return request({ + url: `/status/approval/delete?id=${id}`, + method: 'post', + }) +} +// 取消 +export function cancelStatus(data: object) { + return request({ + url: '/status/approval/cancel', + method: 'post', + data, + }) +} +// 详情 +export function detailStatus(params: object) { + return request({ + url: '/status/approval/detail', + method: 'get', + params, + }) +} +// 审批操作 +export function handlerApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { + return request({ + url: `/status/approval/${type}`, + method: 'post', + data, + }) +} diff --git a/src/api/eqpt/status/maintain.ts b/src/api/eqpt/status/maintain.ts new file mode 100644 index 0000000..a2c94a2 --- /dev/null +++ b/src/api/eqpt/status/maintain.ts @@ -0,0 +1,40 @@ +// 故障维修接口 +import request from '@/api/index' + +export function getMaintainListPage(params: any) { + return request({ + url: `/maintain/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) +} +// 编辑 +export function updateMaintain(data: object) { + return request({ + url: '/maintain/update', + method: 'post', + data, + }) +} +// 新建 +export function addMaintain(data: object) { + return request({ + url: '/maintain/add', + method: 'post', + data, + }) +} +// 详情 +export function detailMaintain(data: object) { + return request({ + url: `/maintain/detail?id=${data.id}`, + method: 'get', + }) +} +// 删除 +export function deleteMaintain(id: string) { + return request({ + url: `/maintain/delete?id=${id}`, + method: 'get', + }) +} diff --git a/src/router/modules/tested.ts b/src/router/modules/tested.ts index fe0b97b..281be40 100644 --- a/src/router/modules/tested.ts +++ b/src/router/modules/tested.ts @@ -811,6 +811,80 @@ }, ], }, + { + path: '/maintainlist', + component: Layout, + redirect: '/maintainpage', + name: 'MaintainList', + meta: { + title: '故障维修', + icon: 'ep:key', + auth: '/tested/status/maintain', + }, + children: [ + { + path: '/maintainpage', + name: 'MaintainPage', + component: () => import('@/views/tested/status/maintain/index.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + { + path: '/maintainpage/:type', + name: 'maintainEdit', + component: () => import('@/views/tested/status/maintain/components/edit.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + ], + }, + { + path: '/borrowlist', + component: Layout, + redirect: '/borrowpage', + name: 'BorrwoList', + meta: { + title: '借用申请', + icon: 'ep:key', + auth: '/tested/status/borrow', + }, + children: [ + { + path: '/borrowpage', + name: 'BorrowPage', + component: () => import('@/views/tested/status/borrow/index.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + { + path: '/borrowpage/:type', + name: 'borrowpageEdit', + component: () => import('@/views/tested/status/borrow/components/edit.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + ], + }, ], }, // 文档管理 diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 714cf00..afab766 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -80,6 +80,7 @@ customerId: [{ required: true, message: '委托方必选', trigger: ['blur', 'change'] }], }) // 表单验证规则 // 弹窗初始化 +const processId = ref() const isAdmin = ref(false) const companyList = ref([]) // 单位列表 const initDialog = () => { @@ -114,6 +115,7 @@ console.log(ruleForm.value, 'rule') ruleForm.value.isUrgent = String(res.data.data.isUrgent) ruleForm.value.isOnSiteCheck = String(res.data.data.isOnSiteCheck) + processId.value = ruleForm.value.processId }) } } @@ -348,6 +350,7 @@ }) }) } +const activeName = ref('基本信息') - - - - - - - - - - - - - - - - - - - - - + + + + 基本信息 + + + 审批详情 + + + + + diff --git a/src/views/tested/status/borrow/components/edit.vue b/src/views/tested/status/borrow/components/edit.vue new file mode 100644 index 0000000..1085613 --- /dev/null +++ b/src/views/tested/status/borrow/components/edit.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/tested/status/borrow/index.vue b/src/views/tested/status/borrow/index.vue new file mode 100644 index 0000000..1085613 --- /dev/null +++ b/src/views/tested/status/borrow/index.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/tested/status/maintain/components/edit.vue b/src/views/tested/status/maintain/components/edit.vue new file mode 100644 index 0000000..0dce97f --- /dev/null +++ b/src/views/tested/status/maintain/components/edit.vue @@ -0,0 +1,227 @@ + + + + diff --git a/src/api/eqpt/status/borrow.ts b/src/api/eqpt/status/borrow.ts new file mode 100644 index 0000000..9d8370e --- /dev/null +++ b/src/api/eqpt/status/borrow.ts @@ -0,0 +1,81 @@ +// 借用申请 +import request from '@/api/index' + +// 不同状态的列表 +export function getListPage(params: any, statusName: string) { + if (statusName === '全部') { + return request({ + url: `/status/allPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '已审批') { + return request({ + url: `/status/approval/approvedListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else if (statusName === '待审批') { + return request({ + url: `/status/approval/toApprovalListPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } + else { + return request({ + url: `/status/approval/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) + } +} +// 保存编辑 +export function editStatus(data: object) { + return request({ + url: '/status/approval/saveOrUpdate', + method: 'post', + data, + }) +} +// 提交 +export function submitStatus(data: object) { + return request({ + url: '/status/approval/submit', + method: 'post', + data, + }) +} +// 删除记录 +export function deleteStatus(id: string) { + return request({ + url: `/status/approval/delete?id=${id}`, + method: 'post', + }) +} +// 取消 +export function cancelStatus(data: object) { + return request({ + url: '/status/approval/cancel', + method: 'post', + data, + }) +} +// 详情 +export function detailStatus(params: object) { + return request({ + url: '/status/approval/detail', + method: 'get', + params, + }) +} +// 审批操作 +export function handlerApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { + return request({ + url: `/status/approval/${type}`, + method: 'post', + data, + }) +} diff --git a/src/api/eqpt/status/maintain.ts b/src/api/eqpt/status/maintain.ts new file mode 100644 index 0000000..a2c94a2 --- /dev/null +++ b/src/api/eqpt/status/maintain.ts @@ -0,0 +1,40 @@ +// 故障维修接口 +import request from '@/api/index' + +export function getMaintainListPage(params: any) { + return request({ + url: `/maintain/listPage?limit=${params.limit}&offset=${params.offset}`, + method: 'post', + data: params, + }) +} +// 编辑 +export function updateMaintain(data: object) { + return request({ + url: '/maintain/update', + method: 'post', + data, + }) +} +// 新建 +export function addMaintain(data: object) { + return request({ + url: '/maintain/add', + method: 'post', + data, + }) +} +// 详情 +export function detailMaintain(data: object) { + return request({ + url: `/maintain/detail?id=${data.id}`, + method: 'get', + }) +} +// 删除 +export function deleteMaintain(id: string) { + return request({ + url: `/maintain/delete?id=${id}`, + method: 'get', + }) +} diff --git a/src/router/modules/tested.ts b/src/router/modules/tested.ts index fe0b97b..281be40 100644 --- a/src/router/modules/tested.ts +++ b/src/router/modules/tested.ts @@ -811,6 +811,80 @@ }, ], }, + { + path: '/maintainlist', + component: Layout, + redirect: '/maintainpage', + name: 'MaintainList', + meta: { + title: '故障维修', + icon: 'ep:key', + auth: '/tested/status/maintain', + }, + children: [ + { + path: '/maintainpage', + name: 'MaintainPage', + component: () => import('@/views/tested/status/maintain/index.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + { + path: '/maintainpage/:type', + name: 'maintainEdit', + component: () => import('@/views/tested/status/maintain/components/edit.vue'), + meta: { + title: '故障维修', + auth: '/tested/status/maintain', + sidebar: false, + breadcrumb: false, + activeMenu: '/maintainlist', + }, + }, + ], + }, + { + path: '/borrowlist', + component: Layout, + redirect: '/borrowpage', + name: 'BorrwoList', + meta: { + title: '借用申请', + icon: 'ep:key', + auth: '/tested/status/borrow', + }, + children: [ + { + path: '/borrowpage', + name: 'BorrowPage', + component: () => import('@/views/tested/status/borrow/index.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + { + path: '/borrowpage/:type', + name: 'borrowpageEdit', + component: () => import('@/views/tested/status/borrow/components/edit.vue'), + meta: { + title: '借用申请', + auth: '/tested/status/borrow', + sidebar: false, + breadcrumb: false, + activeMenu: '/borrowlist', + }, + }, + ], + }, ], }, // 文档管理 diff --git a/src/views/tested/MeasurementPlan/task/components/edit.vue b/src/views/tested/MeasurementPlan/task/components/edit.vue index 714cf00..afab766 100644 --- a/src/views/tested/MeasurementPlan/task/components/edit.vue +++ b/src/views/tested/MeasurementPlan/task/components/edit.vue @@ -80,6 +80,7 @@ customerId: [{ required: true, message: '委托方必选', trigger: ['blur', 'change'] }], }) // 表单验证规则 // 弹窗初始化 +const processId = ref() const isAdmin = ref(false) const companyList = ref([]) // 单位列表 const initDialog = () => { @@ -114,6 +115,7 @@ console.log(ruleForm.value, 'rule') ruleForm.value.isUrgent = String(res.data.data.isUrgent) ruleForm.value.isOnSiteCheck = String(res.data.data.isOnSiteCheck) + processId.value = ruleForm.value.processId }) } } @@ -348,6 +350,7 @@ }) }) } +const activeName = ref('基本信息') - - - - - - - - - - - - - - - - - - - - - + + + + 基本信息 + + + 审批详情 + + + + + diff --git a/src/views/tested/status/borrow/components/edit.vue b/src/views/tested/status/borrow/components/edit.vue new file mode 100644 index 0000000..1085613 --- /dev/null +++ b/src/views/tested/status/borrow/components/edit.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/tested/status/borrow/index.vue b/src/views/tested/status/borrow/index.vue new file mode 100644 index 0000000..1085613 --- /dev/null +++ b/src/views/tested/status/borrow/index.vue @@ -0,0 +1,3 @@ + diff --git a/src/views/tested/status/maintain/components/edit.vue b/src/views/tested/status/maintain/components/edit.vue new file mode 100644 index 0000000..0dce97f --- /dev/null +++ b/src/views/tested/status/maintain/components/edit.vue @@ -0,0 +1,227 @@ + + + + diff --git a/src/views/tested/status/maintain/index.vue b/src/views/tested/status/maintain/index.vue new file mode 100644 index 0000000..a0378c7 --- /dev/null +++ b/src/views/tested/status/maintain/index.vue @@ -0,0 +1,311 @@ + + + + +