diff --git a/frontend/src/api/check/test/index.ts b/frontend/src/api/check/test/index.ts
index 2afc16a..f22943c 100644
--- a/frontend/src/api/check/test/index.ts
+++ b/frontend/src/api/check/test/index.ts
@@ -72,7 +72,7 @@ export const exportRawData = (params: {
}
/**
- * 重新计算
+ * 数模式重新计算
* @param params
*/
export const reCalculate = (params: {
@@ -86,6 +86,22 @@ export const reCalculate = (params: {
}) => {
return http.post('/result/reCalculate', params, {loading: true})
}
+
+/**
+ * 比对式重新计算
+ * @param params
+ */
+export const reCalculate2 = (params: {
+ planId: string
+ deviceId: string
+ errorSysId: string
+ code: string
+ patternId: string
+
+}) => {
+ return http.post('/result/reCalculate', params, {loading: true})
+}
+
/**
* 获取数据获取基本信息
* @param params
diff --git a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue
index 07daabb..5523c93 100644
--- a/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue
+++ b/frontend/src/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue
@@ -52,7 +52,7 @@
报告生成
- 重新计算
+ 重新计算
@@ -156,7 +156,8 @@ import { Histogram, Postcard } from '@element-plus/icons-vue'
import { getPqErrSysList } from '@/api/plan/plan'
import { useModeStore } from '@/stores/modules/mode' // 引入模式 store
import { useDictStore } from '@/stores/modules/dict'
-import { getContrastFormContent, getContrastResult, getScriptList } from '@/api/check/test'
+import { getContrastFormContent, getContrastResult, getScriptList,reCalculate2 } from '@/api/check/test'
+import { ElMessage } from 'element-plus'
const { appendToBody } = withDefaults(
defineProps<{
@@ -483,7 +484,6 @@ const handleNodeClick = (data: any) => {
}
// 获取结果
const getResults = async (code: any) => {
- console.log('getResults', code)
checkResultData.value = []
rawTableData.value = []
@@ -538,6 +538,21 @@ const close = () => {
// 可以在这里添加其他清理逻辑
}
+
+const handleReCalculate = async () => {
+ reCalculate2({
+ planId: checkStore.plan.id,
+ errorSysId: formContent.errorSysId,
+ deviceId: formContent.deviceId,
+ code: checkStore.plan.code + '',
+ patternId: dictStore.getDictData('Pattern').find(item => item.name === modeStore.currentMode)?.id ?? '',
+ }).then((res) => {
+ ElMessage.success('重新计算成功!')
+ handleChnNumChange(formContent.chnNum)
+
+ })
+}
+
defineExpose({
open
})