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 @@
-
+
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
+
+
-
-
+
+
- 查询查询
+
重置
手动检测手动检测
+
自动检测自动检测
+
- 不合格项复检不合格项复检
+
- 全部复检全部复检
+
@@ -96,33 +102,30 @@
> -->
- 归档
+ 归档
+
- 系数校准
+ 系数校准
+
-
+
查看
+ v-if='form.activeTabs === 3 && form.activeChildTabs === 1'
+ >查看
+
-
报告生成
+ :icon='Download'
+ @click="openDrawer('报告下载', scope.row)"
+ v-if='form.activeTabs === 3 && form.activeChildTabs === 0 && scope.row.reportState === 1'
+ >报告下载
+
+
+ 报告生成
+
归档
+ link
+ :icon='Notebook'
+ @click="openDrawer('归档', scope.row)"
+ v-if='form.activeTabs === 4'
+ :disabled='scope.row.reportState != 1'
+ >归档
+
检测数据查询
+ v-if='form.activeTabs === 5'
+ >检测数据查询
+
误差体系更换
+ v-if='form.activeTabs === 5'
+ >误差体系更换
+
-
+
-
+
+ :visible='dataCheckChangeErrSysDialogVisible'
+ @update:visible='dataCheckChangeErrSysDialogVisible = $event'
+ >
-
+
-
-
+
+
-
-
diff --git a/frontend/src/views/machine/device/index.vue b/frontend/src/views/machine/device/index.vue
index ea95e6cf..52a3d91 100644
--- a/frontend/src/views/machine/device/index.vue
+++ b/frontend/src/views/machine/device/index.vue
@@ -10,8 +10,12 @@
新增
导出
+<<<<<<< HEAD
导入
导入
+=======
+ 导入
+>>>>>>> ab02f8f1b34e2ceeee7cb83be9f6fc79b71116ad
删除
@@ -40,10 +44,10 @@ import { type ProTableInstance, type ColumnProps } from '@/components/ProTable/i
import DevicePopup from '@/views/machine/device/components/devicePopup.vue'
import { CirclePlus, Delete, EditPen, Download, Upload } from '@element-plus/icons-vue'
import { useDictStore } from '@/stores/modules/dict'
-import { getPqDevList, deletePqDev, exportPqDev, downloadTemplate, importPqDev,getPqDev } from '@/api/device/device/index.ts'
+import {getPqDevList, deletePqDev, getPqDev, exportCNDev, downloadCNDevTemplate, importCNDev} from '@/api/device/device/index.ts'
import { ElMessageBox } from 'element-plus'
import { computed, onBeforeMount, onMounted, reactive, ref } from 'vue'
-import { useModeStore , useAppSceneStore} from '@/stores/modules/mode'; // 引入模式 store
+import { useModeStore , useAppSceneStore} from '@/stores/modules/mode';
defineOptions({
name: 'device'
})
@@ -197,7 +201,7 @@ const downloadFile = async () => {
ElMessageBox.confirm('确认导出被检设备?', '温馨提示', { type: 'warning' }).then(() =>{
const patternId = dictStore.getDictData('Pattern').find(item=>item.name=== modeStore.currentMode)?.id//获取数据字典中对应的id
- useDownload(exportPqDev,'被检设备导出数据', {...proTable.value?.searchParam,pattern:patternId}, false,'.xlsx')
+ useDownload(exportCNDev,'被检设备导出数据', {...proTable.value?.searchParam,pattern:patternId}, false,'.xlsx')
})
}
@@ -217,11 +221,12 @@ const importFile = async (pattern:string) => {
deviceImportExcel.value?.acceptParams(params)
}else{
const params = {
- title: '被检设备',
- showCover: false,
- tempApi: downloadTemplate,
-
- getTableList: proTable.value?.getTableList,
+ title: '被检设备',
+ showCover: false,
+ tempApi: downloadCNDevTemplate,
+ importApi: importCNDev,
+ // importApi: modeStore.currentMode === "比对式"? importContrastPqDev: importCNDev,
+ getTableList: proTable.value?.getTableList,
}
deviceImportExcel.value?.acceptParams(params)
}