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