比对系数下发全局配置
This commit is contained in:
@@ -344,7 +344,8 @@ const initScriptData = async () => {
|
||||
devId: formContent.deviceId,
|
||||
chnNum: formContent.chnNum,
|
||||
num: formContent.num,
|
||||
planId: checkStore.plan.id
|
||||
planId: checkStore.plan.id,
|
||||
code: checkStore.plan.code + (formContent.errorSysId!=checkStore.plan.errorSysId || formContent.dataRule!=checkStore.plan.dataRule? '_temp':'')
|
||||
})
|
||||
|
||||
// 格式化脚本数据
|
||||
|
||||
@@ -198,8 +198,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="tsx" name="useProTable">
|
||||
import { onBeforeMount, onMounted, type PropType, reactive, ref, watch } from 'vue'
|
||||
import { type Action, ElMessage, ElMessageBox } from 'element-plus'
|
||||
import {onBeforeMount, onMounted, type PropType, reactive, ref, watch} from 'vue'
|
||||
import {type Action, ElMessage, ElMessageBox} from 'element-plus'
|
||||
import TestPopup from './testPopup.vue'
|
||||
import dataCheckPopup from './dataCheckSingleChannelSingleTestPopup.vue'
|
||||
import CompareDataCheckSingleChannelSingleTestPopup from '@/views/home/components/compareDataCheckSingleChannelSingleTestPopup.vue'
|
||||
@@ -207,20 +207,20 @@ import ProTable from '@/components/ProTable/index.vue'
|
||||
import SelectTestItemPopup from '@/views/home/components/selectTestItemPopup.vue'
|
||||
import WriteTHPopup from '@/views/home/components/writeTHPopup.vue'
|
||||
import DeviceConnectionPopup from '@/views/home/components/deviceConnectionPopup.vue'
|
||||
import { type Device } from '@/api/device/interface/device'
|
||||
import { type ColumnProps, type ProTableInstance } from '@/components/ProTable/interface'
|
||||
import { type Plan } from '@/api/plan/interface'
|
||||
import { type StandardDevice } from '@/api/device/interface/standardDevice'
|
||||
import { downloadDevData, generateDevReport, getBoundPqDevList } from '@/api/plan/plan'
|
||||
import { getPqDev } from '@/api/device/device'
|
||||
import { useAppSceneStore, useModeStore } from '@/stores/modules/mode' // 引入模式 store
|
||||
import { useCheckStore } from '@/stores/modules/check'
|
||||
import { CheckData } from '@/api/check/interface'
|
||||
import { useAuthStore } from '@/stores/modules/auth'
|
||||
import { useDownload } from '@/hooks/useDownload'
|
||||
import { documentedPqDev } from '@/api/device/report'
|
||||
import { ResultEnum } from '@/enums/httpEnum'
|
||||
import { getPqMonList } from '@/api/device/monitor/index'
|
||||
import {type Device} from '@/api/device/interface/device'
|
||||
import {type ColumnProps, type ProTableInstance} from '@/components/ProTable/interface'
|
||||
import {type Plan} from '@/api/plan/interface'
|
||||
import {type StandardDevice} from '@/api/device/interface/standardDevice'
|
||||
import {downloadDevData, generateDevReport, getBoundPqDevList} from '@/api/plan/plan'
|
||||
import {getPqDev} from '@/api/device/device'
|
||||
import {useAppSceneStore, useModeStore} from '@/stores/modules/mode' // 引入模式 store
|
||||
import {useCheckStore} from '@/stores/modules/check'
|
||||
import {CheckData} from '@/api/check/interface'
|
||||
import {useAuthStore} from '@/stores/modules/auth'
|
||||
import {useDownload} from '@/hooks/useDownload'
|
||||
import {documentedPqDev} from '@/api/device/report'
|
||||
import {ResultEnum} from '@/enums/httpEnum'
|
||||
import {getPqMonList} from '@/api/device/monitor/index'
|
||||
import ReportResultPopup from '@/views/home/components/reportResultPopup.vue'
|
||||
|
||||
const checkStore = useCheckStore()
|
||||
@@ -539,6 +539,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
{ prop: 'operation', label: '操作', fixed: 'right', minWidth :200,isShow: operationShow }
|
||||
])
|
||||
let testType = 'test' // 检测类型:'test'-检测 'reTest'-复检
|
||||
let qualifiedCount = 0 //合格数量
|
||||
|
||||
|
||||
//比对单个报告生成
|
||||
@@ -568,12 +569,14 @@ const handleSelectionChange = (selection: any[]) => {
|
||||
}
|
||||
|
||||
// 统计已完成检测的设备数量
|
||||
const result = selection.filter(item => item.checkResult != 0)
|
||||
let result = selection.filter(item => item.checkState == 0)
|
||||
if (result.length > 0) {
|
||||
testType = 'test'
|
||||
} else {
|
||||
testType = 'reTest'
|
||||
}
|
||||
qualifiedCount=selection.filter(item => item.checkResult == 1).length
|
||||
|
||||
let devices: CheckData.Device[] = selection.map((item: any) => {
|
||||
return {
|
||||
deviceId: item.id,
|
||||
@@ -925,6 +928,7 @@ const handleTest = async (val: string) => {
|
||||
distinguishCancelAndClose: true,
|
||||
confirmButtonText: '不合格项复检',
|
||||
cancelButtonText: '全部复检',
|
||||
showConfirmButton:qualifiedCount<=0,
|
||||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
|
||||
@@ -25,6 +25,11 @@
|
||||
<el-input number v-model.number='TestConfigForm.scale' placeholder="请输入误差保留小数位" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" v-if="modeStore.currentMode=='比对式'">
|
||||
<el-form-item label='是否进行系数校准' prop='coefficient' :label-width="140">
|
||||
<el-switch v-model="TestConfigForm.coefficient" :active-value="1" :inactive-value="0" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">-->
|
||||
<!-- <el-form-item label='数据处理原则' prop='dataRule' :label-width="140">-->
|
||||
<!-- <el-select v-model="TestConfigForm.dataRule" clearable placeholder="请选择数据处理原则">-->
|
||||
@@ -235,6 +240,7 @@ const TestConfigForm = ref<Base.ResTestConfig>({
|
||||
maxTime: 3,
|
||||
state: 1, //状态
|
||||
scale:4,
|
||||
coefficient:0,
|
||||
})
|
||||
|
||||
const RegResForm = ref<VersionRegister.ResSys_Reg_Res>({
|
||||
|
||||
Reference in New Issue
Block a user