diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/views/business/lab/environmental/environmentalList_interface.ts b/src/views/business/lab/environmental/environmentalList_interface.ts new file mode 100644 index 0000000..5f3a80f --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList_interface.ts @@ -0,0 +1,14 @@ +// 环境记录单list类型 +export interface ISupplier { + environmentCode: string + roomNumber: string + recorder: string + temperature: string + humidity: string + outputVoltage: string + zeroGroundVoltage: string + remark: string + recordTime: string + createUser: string + id: string +} diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/views/business/lab/environmental/environmentalList_interface.ts b/src/views/business/lab/environmental/environmentalList_interface.ts new file mode 100644 index 0000000..5f3a80f --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList_interface.ts @@ -0,0 +1,14 @@ +// 环境记录单list类型 +export interface ISupplier { + environmentCode: string + roomNumber: string + recorder: string + temperature: string + humidity: string + outputVoltage: string + zeroGroundVoltage: string + remark: string + recordTime: string + createUser: string + id: string +} diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index a598765..928cafd 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -1,13 +1,364 @@ - - - diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/views/business/lab/environmental/environmentalList_interface.ts b/src/views/business/lab/environmental/environmentalList_interface.ts new file mode 100644 index 0000000..5f3a80f --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList_interface.ts @@ -0,0 +1,14 @@ +// 环境记录单list类型 +export interface ISupplier { + environmentCode: string + roomNumber: string + recorder: string + temperature: string + humidity: string + outputVoltage: string + zeroGroundVoltage: string + remark: string + recordTime: string + createUser: string + id: string +} diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index a598765..928cafd 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -1,13 +1,364 @@ - - - diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue new file mode 100644 index 0000000..b3c8cce --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -0,0 +1,1078 @@ + + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/views/business/lab/environmental/environmentalList_interface.ts b/src/views/business/lab/environmental/environmentalList_interface.ts new file mode 100644 index 0000000..5f3a80f --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList_interface.ts @@ -0,0 +1,14 @@ +// 环境记录单list类型 +export interface ISupplier { + environmentCode: string + roomNumber: string + recorder: string + temperature: string + humidity: string + outputVoltage: string + zeroGroundVoltage: string + remark: string + recordTime: string + createUser: string + id: string +} diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index a598765..928cafd 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -1,13 +1,364 @@ - - - diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue new file mode 100644 index 0000000..b3c8cce --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -0,0 +1,1078 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index da533b7..23bc74f 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,4 +1,4 @@ - + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/views/business/lab/environmental/environmentalList_interface.ts b/src/views/business/lab/environmental/environmentalList_interface.ts new file mode 100644 index 0000000..5f3a80f --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList_interface.ts @@ -0,0 +1,14 @@ +// 环境记录单list类型 +export interface ISupplier { + environmentCode: string + roomNumber: string + recorder: string + temperature: string + humidity: string + outputVoltage: string + zeroGroundVoltage: string + remark: string + recordTime: string + createUser: string + id: string +} diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index a598765..928cafd 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -1,13 +1,364 @@ - - - diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue new file mode 100644 index 0000000..b3c8cce --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -0,0 +1,1078 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index da533b7..23bc74f 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,4 +1,4 @@ - + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/views/business/lab/environmental/environmentalList_interface.ts b/src/views/business/lab/environmental/environmentalList_interface.ts new file mode 100644 index 0000000..5f3a80f --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList_interface.ts @@ -0,0 +1,14 @@ +// 环境记录单list类型 +export interface ISupplier { + environmentCode: string + roomNumber: string + recorder: string + temperature: string + humidity: string + outputVoltage: string + zeroGroundVoltage: string + remark: string + recordTime: string + createUser: string + id: string +} diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index a598765..928cafd 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -1,13 +1,364 @@ - - - diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue new file mode 100644 index 0000000..b3c8cce --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -0,0 +1,1078 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index da533b7..23bc74f 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,4 +1,4 @@ - + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/views/business/lab/environmental/environmentalList_interface.ts b/src/views/business/lab/environmental/environmentalList_interface.ts new file mode 100644 index 0000000..5f3a80f --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList_interface.ts @@ -0,0 +1,14 @@ +// 环境记录单list类型 +export interface ISupplier { + environmentCode: string + roomNumber: string + recorder: string + temperature: string + humidity: string + outputVoltage: string + zeroGroundVoltage: string + remark: string + recordTime: string + createUser: string + id: string +} diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index a598765..928cafd 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -1,13 +1,364 @@ - - - diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue new file mode 100644 index 0000000..b3c8cce --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -0,0 +1,1078 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index da533b7..23bc74f 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,4 +1,4 @@ - + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/views/business/lab/environmental/environmentalList_interface.ts b/src/views/business/lab/environmental/environmentalList_interface.ts new file mode 100644 index 0000000..5f3a80f --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList_interface.ts @@ -0,0 +1,14 @@ +// 环境记录单list类型 +export interface ISupplier { + environmentCode: string + roomNumber: string + recorder: string + temperature: string + humidity: string + outputVoltage: string + zeroGroundVoltage: string + remark: string + recordTime: string + createUser: string + id: string +} diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index a598765..928cafd 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -1,13 +1,364 @@ - - - diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue new file mode 100644 index 0000000..b3c8cce --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -0,0 +1,1078 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index da533b7..23bc74f 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,4 +1,4 @@ - + + + + diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue new file mode 100644 index 0000000..c6e9db4 --- /dev/null +++ b/src/views/business/schedule/certPrint/certList.vue @@ -0,0 +1,316 @@ + + + + + diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/views/business/lab/environmental/environmentalList_interface.ts b/src/views/business/lab/environmental/environmentalList_interface.ts new file mode 100644 index 0000000..5f3a80f --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList_interface.ts @@ -0,0 +1,14 @@ +// 环境记录单list类型 +export interface ISupplier { + environmentCode: string + roomNumber: string + recorder: string + temperature: string + humidity: string + outputVoltage: string + zeroGroundVoltage: string + remark: string + recordTime: string + createUser: string + id: string +} diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index a598765..928cafd 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -1,13 +1,364 @@ - - - diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue new file mode 100644 index 0000000..b3c8cce --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -0,0 +1,1078 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index da533b7..23bc74f 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,4 +1,4 @@ - + + + + diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue new file mode 100644 index 0000000..c6e9db4 --- /dev/null +++ b/src/views/business/schedule/certPrint/certList.vue @@ -0,0 +1,316 @@ + + + + + diff --git a/src/views/device/borrow/components/applyList.vue b/src/views/device/borrow/components/applyList.vue index 6e8f81a..e43c46a 100644 --- a/src/views/device/borrow/components/applyList.vue +++ b/src/views/device/borrow/components/applyList.vue @@ -424,6 +424,7 @@ ([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/views/business/lab/environmental/environmentalList_interface.ts b/src/views/business/lab/environmental/environmentalList_interface.ts new file mode 100644 index 0000000..5f3a80f --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList_interface.ts @@ -0,0 +1,14 @@ +// 环境记录单list类型 +export interface ISupplier { + environmentCode: string + roomNumber: string + recorder: string + temperature: string + humidity: string + outputVoltage: string + zeroGroundVoltage: string + remark: string + recordTime: string + createUser: string + id: string +} diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index a598765..928cafd 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -1,13 +1,364 @@ - - - diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue new file mode 100644 index 0000000..b3c8cce --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -0,0 +1,1078 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index da533b7..23bc74f 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,4 +1,4 @@ - + + + + diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue new file mode 100644 index 0000000..c6e9db4 --- /dev/null +++ b/src/views/business/schedule/certPrint/certList.vue @@ -0,0 +1,316 @@ + + + + + diff --git a/src/views/device/borrow/components/applyList.vue b/src/views/device/borrow/components/applyList.vue index 6e8f81a..e43c46a 100644 --- a/src/views/device/borrow/components/applyList.vue +++ b/src/views/device/borrow/components/applyList.vue @@ -424,6 +424,7 @@ { diff --git a/src/api/approval.ts b/src/api/approval.ts index cb8a9af..88ff0a5 100644 --- a/src/api/approval.ts +++ b/src/api/approval.ts @@ -4,16 +4,24 @@ agree: '/approval/operate/agree', refuse: '/approval/operate/refuse', reject: '/approval/operate/reject', - revoke: '/approval/operate/revoke', } // 审批操作接口 -export function submitApproval(type: string, data: { taskId: string; comments: string }) { +export function submitApproval(type: string, data: { processId?: string; taskId?: string; comments: string }) { return request({ url: approvalType[type], method: 'post', data, }) } + +// 取消审批 +export function cancelApproval(data: { processId?: string; comments: string }) { + return request({ + url: '/approval/operate/revoke', + method: 'post', + data, + }) +} // 查询审批记录 export function fetchApproval(processId: string) { return request({ diff --git a/src/api/business/environmentRecord/environmentRecord.ts b/src/api/business/environmentRecord/environmentRecord.ts new file mode 100644 index 0000000..1a575eb --- /dev/null +++ b/src/api/business/environmentRecord/environmentRecord.ts @@ -0,0 +1,46 @@ +import request from '../../index' + +// 环境记录单列表查询-分页 +export function getenvironmentRecordList(data: { offset: number; limit: number }) { + return request({ + url: `/business/environmentRecord/listPage?offset=${data.offset}&limit=${data.limit}`, + method: 'post', + data, + }) +} + +// 环境记录单删除 +export function getenvironmentRecordDelete(data: object) { + return request({ + url: '/business/environmentRecord/delete', + method: 'post', + data, + }) +} + +// 新增环境记录单 +export function getenvironmentRecordAdd(data: object) { + return request({ + url: '/business/environmentRecord/add', + method: 'post', + data, + }) +} + +// 环境监测记录单-详情 +export function getenvironmentRecordDetail(data: object) { + return request({ + url: '/business/environmentRecord/detail', + method: 'post', + data, + }) +} + +// 环境监测记录单-编辑 +export function getenvironmentRecordUpdate(data: object) { + return request({ + url: '/business/environmentRecord/update', + method: 'post', + data, + }) +} diff --git a/src/api/device/standard.ts b/src/api/device/standard.ts index 064780f..1892791 100644 --- a/src/api/device/standard.ts +++ b/src/api/device/standard.ts @@ -1,5 +1,5 @@ /** - * 溯源供方请求接口 + * 标准装置请求接口 */ import request from '../index' const prefix = '/meter' diff --git a/src/api/measure/source.ts b/src/api/measure/source.ts index 8b646b1..1c3ae09 100644 --- a/src/api/measure/source.ts +++ b/src/api/measure/source.ts @@ -63,10 +63,10 @@ data, }) } -// 更新数据 -export function getSoucreLisUpdate(data: object) { +// 驳回后编辑接口 +export function updateSourceApproval(data: object) { return request({ - url: `${prefix}/supplier/update`, + url: '/meter/supplier/failUpdate', method: 'post', data, }) diff --git a/src/components/Sample/certificationRecords.vue b/src/components/Sample/certificationRecords.vue index a694ce6..05e8d9d 100644 --- a/src/components/Sample/certificationRecords.vue +++ b/src/components/Sample/certificationRecords.vue @@ -10,7 +10,7 @@ }, }) -// 检定记录 +// 证书列表 interface SimpleCertification { certificationCode: string // 证书编号 certificationName: string // 证书形成 @@ -34,10 +34,6 @@ { text: '证书有效期', value: 'expirationDate' }, ]) -// 应出具证书数 -const requireCertifications = ref(0) -// 当前证书数 -const currentCertifications = ref(0) // 证书列表 const list = ref([]) const total = ref(0) diff --git a/src/router/modules/business.ts b/src/router/modules/business.ts index 6a14d78..08409b5 100644 --- a/src/router/modules/business.ts +++ b/src/router/modules/business.ts @@ -128,17 +128,39 @@ }, }, { - path: 'task/:type/:id?', + path: 'task/:role/:id?', name: 'taskDetail', component: () => import('@/views/business/schedule/task/taskEdit.vue'), meta: { - title: '任务分发详情', + title: '样品详情', icon: 'ep:key', sidebar: false, breadcrumb: true, activeMenu: '/schedule/taskList', }, }, + { + path: 'certPrintList', + name: 'CerPrintList', + component: () => import('@/views/business/schedule/certPrint/certList.vue'), + meta: { + title: '证书打印', + icon: 'ep:key', + auth: '/schedule/certPrint', + }, + }, + { + path: 'cert/detail/:id?', + name: 'taskDetail', + component: () => import('@/views/business/schedule/certPrint/certDetail.vue'), + meta: { + title: '证书详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/schedule/certPrintList', + }, + }, ], }, { @@ -163,18 +185,6 @@ }, }, { - path: '/myMesure/:type/:id?', - name: 'MyMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/myMeasureList', - }, - }, - { path: 'deptMeasureList', name: 'DeptMeasureList', component: () => import('@/views/business/lab/deptMeasure/deptMeasureList.vue'), @@ -185,18 +195,6 @@ }, }, { - path: 'deptMeasure/:type/:id?', - name: 'DeptMeasureDetail', - component: () => import('@/views/business/lab/myMeasure/labMeasureEdit.vue'), - meta: { - title: '检测详情', - icon: 'ep:key', - sidebar: false, - breadcrumb: true, - activeMenu: '/lab/deptMeasureList', - }, - }, - { path: 'reportOnCredentialsApproval', name: 'ReportOnCredentialsApproval', component: () => import('@/views/business/lab/reportOnCredentials/reportOnCredentialsApproval.vue'), @@ -229,6 +227,18 @@ }, }, { + path: 'primitiveLogList/:type/:id?', + name: 'PrimitiveLogAdd', + component: () => import('@/views/business/lab/primitiveLog/primitveLogAdd.vue'), + meta: { + title: '原始记录详情', + icon: 'ep:key', + sidebar: false, + breadcrumb: true, + activeMenu: '/lab/primitiveLogList', + }, + }, + { path: 'environmentalList', name: 'EnvironmentalList', component: () => import('@/views/business/lab/environmental/environmentalList.vue'), diff --git a/src/views/business/bench/bench.vue b/src/views/business/bench/bench.vue index fad9269..2e90deb 100644 --- a/src/views/business/bench/bench.vue +++ b/src/views/business/bench/bench.vue @@ -1,12 +1,8 @@ + + + + diff --git a/src/views/business/lab/components/orderDialog.vue b/src/views/business/lab/components/orderDialog.vue new file mode 100644 index 0000000..de922fa --- /dev/null +++ b/src/views/business/lab/components/orderDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/primitiveLogDialog.vue b/src/views/business/lab/components/primitiveLogDialog.vue new file mode 100644 index 0000000..25f7336 --- /dev/null +++ b/src/views/business/lab/components/primitiveLogDialog.vue @@ -0,0 +1,158 @@ + + + + + + diff --git a/src/views/business/lab/components/sampleDialog.vue b/src/views/business/lab/components/sampleDialog.vue new file mode 100644 index 0000000..8f222d9 --- /dev/null +++ b/src/views/business/lab/components/sampleDialog.vue @@ -0,0 +1,160 @@ + + + + + + diff --git a/src/views/business/lab/environmental/environmentalAdd.vue b/src/views/business/lab/environmental/environmentalAdd.vue index e572d09..8214e2b 100644 --- a/src/views/business/lab/environmental/environmentalAdd.vue +++ b/src/views/business/lab/environmental/environmentalAdd.vue @@ -3,16 +3,10 @@ import { ElMessage, ElMessageBox } from 'element-plus' import dayjs from 'dayjs' import { SCHEDULE } from '@/utils/scheduleDict' +import { getenvironmentRecordAdd, getenvironmentRecordDetail, getenvironmentRecordUpdate } from '@/api/business/environmentRecord/environmentRecord' import useUserStore from '@/store/modules/user' -import { - getDeptTree, - getListDetail, - getListSave, - getListSubmit, - getListUpdate, -} from '@/api/system/plan' const infoId = ref('') // id -const { name } = useUserStore() +const { name, id } = useUserStore() const pageType = ref('add') // 页面类型: add,edit, detail const buttonLoading = ref(false) // 按钮加载状态 const textMap: { [key: string]: string } = { @@ -29,22 +23,16 @@ } } const formInline = ref({ - createTime: null, - deptId: '', - deptName: null, - director: '', - effectiveCompany: null, - id: '', - planName: '', - planNo: null, - remark: null, - trainAddress: null, - trainContent: null, - trainHour: null, - trainNumber: null, - trainPerson: name, - trainStaffList: [], - trainTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), + environmentCode: '', // 环境记录单编号 + roomNumber: '', // 房间编号 + recorder: name || '', // 用户名 + temperature: '', // 温度 + humidity: '', // 湿度 + outputVoltage: '', // 输出电压 + zeroGroundVoltage: '', // 零地电压 + remark: '', // 备注 + recordTime: dayjs(`${new Date()}`).format('YYYY.MM.DD h:m:s'), // 记录时间 + createUser: id || '', // 记录人id }) const addId = ref('') // 保存后的id const ruleFormRef = ref() @@ -57,22 +45,19 @@ ]) // 校验规则 const rules = ref({ - planName: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], - trainPerson: [ + roomNumber: [{ required: true, message: '房间号不能为空', trigger: 'blur' }], + recorder: [ { required: true, message: '记录人不能为空', trigger: 'blur' }, ], - trainNumber: [ - { required: true, message: '培训人数不能为空', trigger: 'blur' }, - ], - trainTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], - trainAddress: [ + recordTime: [{ required: true, message: '记录时间不能为空', trigger: 'blur' }], + humidity: [ { required: true, message: '湿度(%)不能为空', trigger: 'blur' }, ], - trainHour: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], - effectiveCompany: [ + temperature: [{ required: true, message: '温度(℃)不能为空', trigger: 'blur' }], + outputVoltage: [ { required: true, message: '输出电压(V)不能为空', trigger: 'blur' }, ], - trainContent: [ + zeroGroundVoltage: [ { required: true, message: '零地电压(V)不能为空', trigger: 'blur' }, ], }) // 表单验证规则 @@ -84,11 +69,11 @@ $router.back() } -if (infoId.value && infoId.value !== '') { - getListDetail({ id: infoId.value }).then((res) => { - formInline.value = res.data - }) -} +// if (infoId.value && infoId.value !== '') { +// getenvironmentRecordDetail({ id: infoId.value }).then((res) => { +// formInline.value = res.data +// }) +// } // 点击保存 const preserve = async (formEl: FormInstance | undefined) => { if (!formEl) { @@ -101,12 +86,22 @@ cancelButtonText: '取消', type: 'warning', }).then(() => { - // getListSave(formInline.value).then((res) => { + if (pageType.value === 'add') { + // getenvironmentRecordAdd(formInline.value).then((res) => { // if (res.code === 200) { // addId.value = res.data.id // ElMessage.success('保存成功!') // } // }) + } + else { + // getenvironmentRecordUpdate(formInline.value).then((res) => { + // if (res.code === 200) { + // addId.value = res.data.id + // ElMessage.success('保存成功!') + // } + // }) + } }) } }) @@ -155,16 +150,16 @@ - + - + - + - + - + - + - + ([]) const list = ref([]) @@ -35,14 +31,43 @@ const $router = useRouter() const fetchData = (isNowPage: boolean) => { - listQuery.value.trainStartTime = trainTime.value[0] || '' - listQuery.value.trainEndTime = trainTime.value[1] || '' + listQuery.value.beginTime = trainTime.value[0] || '' + listQuery.value.endTime = trainTime.value[1] || '' loadingTable.value = true if (!isNowPage) { // 是否显示当前页,否则跳转第一页 listQuery.value.offset = 1 } - list.value = [{ text: 'xxx' }] + // getenvironmentRecordList(listQuery.value).then((res) => { + + // }) + list.value = [{ + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '1', + }, + { + environmentCode: 'A001', + roomNumber: '1', + recorder: '张三', + temperature: '25', + humidity: '3', + outputVoltage: '220', + zeroGroundVoltage: '2', + remark: '备注', + recordTime: '2022-12-12 10:10:10', + createUser: '100000', + id: '2', + }, + ] loadingTable.value = false } fetchData(true) @@ -51,43 +76,43 @@ const columns = ref([ { text: '编号', - value: 'text', + value: 'environmentCode', align: 'center', }, { text: '房间号', - value: 'text', + value: 'roomNumber', align: 'center', }, { text: '记录人', - value: 'text', + value: 'recorder', align: 'center', }, { text: '记录时间', - value: 'text', + value: 'recordTime', align: 'center', }, { text: '温度(℃)', - value: 'text', + value: 'temperature', align: 'center', }, { text: '湿度(%)', - value: 'text', + value: 'humidity', width: '180', align: 'center', }, { text: '输出电压(V)', - value: 'text', + value: 'outputVoltage', align: 'center', }, { text: '零地电压(V)', - value: 'text', + value: 'zeroGroundVoltage', align: 'center', }, ]) @@ -99,19 +124,15 @@ // 重置 const clearList = () => { listQuery.value = { - createEndTime: '', - createStartTime: '', - deptId: '', - director: '', - effectiveCompany: '', - formId: SCHEDULE.TRAIN_APPROVAL, - ids: [], - trainEndTime: '', - trainStartTime: '', - offset: 1, - limit: 20, + environmentCode: '', // 记录单编号 + roomNumber: '', // 房间号 + beginTime: '', // 记录开始时间 + endTime: '', // 记录结束时间 + offset: 1, // 当前页 + limit: 20, // 多少条 } trainTime.value = '' + fetchData(true) } // 导出 const exportExcelBtn = () => { @@ -135,7 +156,7 @@ // 点击编辑id和删除row类型 interface rowReturn { id: string - text: string + roomNumber: string } // 点击编辑/详情 const handleEdit = (row: rowReturn, pageType: 'edit' | 'detail') => { @@ -144,7 +165,7 @@ // 点击删除 const handleDelete = (index: string, row: rowReturn) => { ElMessageBox.confirm( - `确认删除${row.text}吗?`, + `确认删除${row.roomNumber}吗?`, '提示', { confirmButtonText: '确认', @@ -153,7 +174,7 @@ }, ) .then(() => { - // getListDelete({ id: row.id as string }).then((res) => { + // getenvironmentRecordDelete({ id: row.id as string }).then((res) => { // if (res.code === 200) { // ElMessage({ // type: 'success', @@ -213,14 +234,14 @@ diff --git a/src/views/business/lab/environmental/environmentalList_interface.ts b/src/views/business/lab/environmental/environmentalList_interface.ts new file mode 100644 index 0000000..5f3a80f --- /dev/null +++ b/src/views/business/lab/environmental/environmentalList_interface.ts @@ -0,0 +1,14 @@ +// 环境记录单list类型 +export interface ISupplier { + environmentCode: string + roomNumber: string + recorder: string + temperature: string + humidity: string + outputVoltage: string + zeroGroundVoltage: string + remark: string + recordTime: string + createUser: string + id: string +} diff --git a/src/views/business/lab/primitiveLog/primitiveLogList.vue b/src/views/business/lab/primitiveLog/primitiveLogList.vue index a598765..928cafd 100644 --- a/src/views/business/lab/primitiveLog/primitiveLogList.vue +++ b/src/views/business/lab/primitiveLog/primitiveLogList.vue @@ -1,13 +1,364 @@ - - - diff --git a/src/views/business/lab/primitiveLog/primitveLogAdd.vue b/src/views/business/lab/primitiveLog/primitveLogAdd.vue new file mode 100644 index 0000000..b3c8cce --- /dev/null +++ b/src/views/business/lab/primitiveLog/primitveLogAdd.vue @@ -0,0 +1,1078 @@ + + + + + diff --git a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue index da533b7..23bc74f 100644 --- a/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue +++ b/src/views/business/lab/reportOnCredentials/components/reportOnCredentialsAdd.vue @@ -1,4 +1,4 @@ - + + + + diff --git a/src/views/business/schedule/certPrint/certList.vue b/src/views/business/schedule/certPrint/certList.vue new file mode 100644 index 0000000..c6e9db4 --- /dev/null +++ b/src/views/business/schedule/certPrint/certList.vue @@ -0,0 +1,316 @@ + + + + + diff --git a/src/views/device/borrow/components/applyList.vue b/src/views/device/borrow/components/applyList.vue index 6e8f81a..e43c46a 100644 --- a/src/views/device/borrow/components/applyList.vue +++ b/src/views/device/borrow/components/applyList.vue @@ -424,6 +424,7 @@ { diff --git a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue index 9c8bb99..28b6056 100644 --- a/src/views/device/deviceMaintenance/components/listApprovalAdd.vue +++ b/src/views/device/deviceMaintenance/components/listApprovalAdd.vue @@ -254,6 +254,8 @@ res.data[item] = res.data[item].toString() } }) + checkIdObject.value.applyNo = res.data.checkApplyNo + checkIdObject.value.applyName = res.data.checkApplyName formInline.value = res.data }) } @@ -473,10 +475,9 @@ :placeholder="pageType === 'detail' ? '无' : '请选择检修申请编号'" :disabled="pageType === 'detail'" > -