diff --git a/frontend/src/api/device/device/index.ts b/frontend/src/api/device/device/index.ts index f9cf8d9..c5109c6 100644 --- a/frontend/src/api/device/device/index.ts +++ b/frontend/src/api/device/device/index.ts @@ -25,24 +25,16 @@ export const deletePqDev = (params: string[]) => { return http.post(`/pqDev/delete`, params) } -//导出被检设备 -export const exportPqDev=(params: Device.ReqPqDevParams)=>{ - return http.download(`/pqDev/export`, params) -} export const downloadTemplate = () => { return http.download(`/pqDev/downloadTemplate`) } -//导入被检设备(比对) -export const importPqDev=(params: Device.ReqPqDevParams)=>{ - return http.upload(`/pqDev/import`, params) -} + //根据设备类型决定(电源、icd、模板、通道数、额定电压、额定电流); export const getPqDev = () => { return http.post(`/devType/list`) } - //被检设备归档 export const documentedPqDev=(ids:string[])=>{ return http.post(`/pqDev/documented`, ids) diff --git a/frontend/src/api/device/interface/device.ts b/frontend/src/api/device/interface/device.ts index c8c5952..cbc53aa 100644 --- a/frontend/src/api/device/interface/device.ts +++ b/frontend/src/api/device/interface/device.ts @@ -14,6 +14,14 @@ export namespace Device { pattern:string; } + /** + * 被检设备表格分页查询参数 + */ + export interface ReqDevReportParams extends ReqPage{ + planId?:string; // 计划id + devId?:string; // 装置id + } + /** * 被检设备新增、修改、根据id查询返回的对象 */ diff --git a/frontend/src/api/plan/plan.ts b/frontend/src/api/plan/plan.ts index cfc612a..03901a5 100644 --- a/frontend/src/api/plan/plan.ts +++ b/frontend/src/api/plan/plan.ts @@ -2,17 +2,18 @@ import type { Plan } from './interface' import http from '@/api' import type { ErrorSystem } from '../device/interface/error' import type { Device } from '../device/interface/device' +import { ReqDevReportParams } from '@/api/device/interface/device' /** * @name 检测计划管理模块 */ // 获取检测计划列表 export const getPlanList = (params: Plan.ReqPlanParams) => { - return http.post(`/adPlan/list`, params) + return http.post(`/adPlan/list`, params) } // 新增检测计划 -export const addPlan = (params:any) => { +export const addPlan = (params: any) => { return http.post(`/adPlan/add`, params) } @@ -48,7 +49,7 @@ export const getUnboundPqDevList = (params: Plan.ReqPlan) => { //根据检测计划id查询出所有已绑定的设备 export const getBoundPqDevList = (params: any) => { - return http.post(`/pqDev/listByPlanId`,params) + return http.post(`/pqDev/listByPlanId`, params) } //检测计划绑定设备 @@ -57,12 +58,12 @@ export const getBoundPqDevList = (params: any) => { // } // 按照模式查询检测计划(用于首页展示) -export const getPlanListByPattern = (params:Plan.ReqPlan) => { +export const getPlanListByPattern = (params: Plan.ReqPlan) => { return http.get(`/adPlan/listByPattern?pattern=${params.pattern}`) } // 导出检测计划 -export const exportPlan=(params: Device.ReqPqDevParams)=>{ +export const exportPlan = (params: Device.ReqPqDevParams) => { return http.download(`/adPlan/export`, params) } @@ -71,11 +72,16 @@ export const downloadTemplate = () => { return http.download(`/adPlan/downloadTemplate`) } // 导入检测计划 -export const importPlan=(params: Device.ReqPqDevParams)=>{ +export const importPlan = (params: Device.ReqPqDevParams) => { return http.upload(`/adPlan/import`, params) } -//导出被检设备 -export const downloadDevData=(params: Device.ReqPqDevParams)=>{ - return http.download(`/report/generateReport`, params) +// 装置检测报告生成 +export const generateDevReport = (params: Device.ReqDevReportParams) => { + return http.post(`/report/generateReport`, params) +} + +// 装置检测报告下载 +export const downloadDevData = (params: Device.ReqDevReportParams) => { + return http.download(`/report/downloadReport`, params) } \ No newline at end of file diff --git a/frontend/src/views/home/components/preTest.vue b/frontend/src/views/home/components/preTest.vue index 0a3e8ec..2ca9879 100644 --- a/frontend/src/views/home/components/preTest.vue +++ b/frontend/src/views/home/components/preTest.vue @@ -51,7 +51,11 @@

- {{ item.log }}
+ {{ item.log.split('&&')[0] }} +
+ {{ item.log.split('&&')[1] }} +
+

@@ -441,14 +445,14 @@ watch(webMsgSend, function (newValue, oldValue) { if (newValue.code == 10200) { step4InitLog.value.push({ type: 'info', - log: '源已接通!', + log: '源参数下发成功,等待校验中.....', }) } else if (newValue.code == 10201) { step4.value = 'process' step4InitLog.value = [{ type: 'wait', - log: '正在接通源.....', + log: '源参数下发中.....', }]; } else if (newValue.code == 10552) { ElMessage.error("存在已经初始化步骤,已经自动关闭,请重新发起检测!") @@ -470,9 +474,11 @@ watch(webMsgSend, function (newValue, oldValue) { if (newValue.data.includes('不合格')) { type = 'error' } + + newValue.data.split('
') step4InitLog.value.push({ type: type, - log: '相序校验:' + newValue.data, + log:newValue.data, }) } else if (newValue.code == 10201) { @@ -488,7 +494,7 @@ watch(webMsgSend, function (newValue, oldValue) { log: '相序校验未通过!', }) ts.value = 'error' - }else if (newValue.code == 25001) { + } else if (newValue.code == 25001) { step4.value = 'success' step5.value = 'success' step4InitLog.value.push({ diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue index b96f4a3..203d886 100644 --- a/frontend/src/views/home/components/table.vue +++ b/frontend/src/views/home/components/table.vue @@ -1,89 +1,95 @@