微调
This commit is contained in:
@@ -62,6 +62,20 @@ export const exportRawData = (params: {
|
||||
return http.download("/result/exportRawData", params, {loading: false});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新计算
|
||||
* @param params
|
||||
*/
|
||||
export const reCalculate = (params: {
|
||||
planId: string,
|
||||
scriptId: string,
|
||||
errorSysId: string,
|
||||
deviceId: string,
|
||||
code: string
|
||||
}) => {
|
||||
return http.post("/result/reCalculate", params, {loading: true});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更换误差体系
|
||||
* @param params
|
||||
|
||||
@@ -28,8 +28,11 @@
|
||||
<el-option v-for="item in chnList" :key="item.value" :label="item.label" :value="item.value"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label=" ">
|
||||
<el-button type="primary" :icon="Postcard" v-if="checkStore.showDetailType===1" @click="handleGenerateReport">报告生成</el-button>
|
||||
<el-form-item v-if="checkStore.showDetailType===1">
|
||||
<el-button type="primary" :icon="Postcard" @click="handleGenerateReport">报告生成</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="checkStore.showDetailType===0">
|
||||
<el-button type="primary" :icon="Histogram" @click="handleReCalculate">重新计算</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@@ -108,10 +111,10 @@ import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
|
||||
import {CheckData} from "@/api/check/interface";
|
||||
import {useDictStore} from "@/stores/modules/dict";
|
||||
import {useCheckStore} from "@/stores/modules/check";
|
||||
import {deleteTempTable, exportRawData, getFormData, getTableData, getTreeData} from "@/api/check/test";
|
||||
import {changeErrorSystem, deleteTempTable, exportRawData, getFormData, getTableData, getTreeData, reCalculate} from "@/api/check/test";
|
||||
import {getPqErrSysList} from '@/api/plan/plan'
|
||||
import {useDownload} from "@/hooks/useDownload";
|
||||
import {Postcard} from "@element-plus/icons-vue";
|
||||
import {Histogram, Postcard} from "@element-plus/icons-vue";
|
||||
|
||||
const {appendToBody} = withDefaults(defineProps<{
|
||||
appendToBody: boolean
|
||||
@@ -216,13 +219,13 @@ const handleNodeClick = async (data: any) => {
|
||||
|
||||
const handleErrorSysChange = async () => {
|
||||
console.log("切换误差体系", formContent.errorSysId);
|
||||
// await changeErrorSystem({
|
||||
// planId: checkStore.plan.id,
|
||||
// scriptId: checkStore.plan.scriptId,
|
||||
// errorSysId: formContent.errorSysId,
|
||||
// deviceId: deviceId,
|
||||
// code: parseInt(checkStore.plan.code),
|
||||
// })
|
||||
await changeErrorSystem({
|
||||
planId: checkStore.plan.id,
|
||||
scriptId: checkStore.plan.scriptId,
|
||||
errorSysId: formContent.errorSysId,
|
||||
deviceId: deviceId,
|
||||
code: checkStore.plan.code + '',
|
||||
})
|
||||
if (originErrorSysId != formContent.errorSysId) {
|
||||
planCode = checkStore.plan.code + "_temp"
|
||||
} else {
|
||||
@@ -451,6 +454,17 @@ const handleGenerateReport = () => {
|
||||
console.log("生成报告", checkStore.plan.id, deviceId)
|
||||
}
|
||||
|
||||
const handleReCalculate = async () => {
|
||||
await reCalculate({
|
||||
planId: checkStore.plan.id,
|
||||
scriptId: checkStore.plan.scriptId,
|
||||
errorSysId: formContent.errorSysId,
|
||||
deviceId: deviceId,
|
||||
code: checkStore.plan.code + ''
|
||||
})
|
||||
ElMessage.success('重新计算成功!')
|
||||
}
|
||||
|
||||
const close = async () => {
|
||||
//数据清空
|
||||
Object.assign(formContent, {
|
||||
|
||||
Reference in New Issue
Block a user