重新计算
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<el-button type="primary" :icon="Postcard">报告生成</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="checkStore.showDetailType === 0">
|
||||
<el-button type="primary" :icon="Histogram">重新计算</el-button>
|
||||
<el-button type="primary" :icon="Histogram" @click="handleReCalculate">重新计算</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user