比对系数下发全局配置
This commit is contained in:
@@ -14,7 +14,8 @@ export const getScriptList = (params: {
|
|||||||
devId:string,
|
devId:string,
|
||||||
chnNum:number,
|
chnNum:number,
|
||||||
num:number,
|
num:number,
|
||||||
planId:string
|
planId:string,
|
||||||
|
code:string
|
||||||
}) => {
|
}) => {
|
||||||
return http.post('/result/getCheckItem', params, {loading: false})
|
return http.post('/result/getCheckItem', params, {loading: false})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ export namespace Base {
|
|||||||
createTime?: string| null; //创建时间
|
createTime?: string| null; //创建时间
|
||||||
updateBy?: string| null; //更新用户
|
updateBy?: string| null; //更新用户
|
||||||
updateTime?: string| null; //更新时间
|
updateTime?: string| null; //更新时间
|
||||||
|
coefficient:number //比对监测后,当电压、电流不符合时,是否对标准设备进行系数校准
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -198,8 +198,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx" name="useProTable">
|
<script setup lang="tsx" name="useProTable">
|
||||||
import { onBeforeMount, onMounted, type PropType, reactive, ref, watch } from 'vue'
|
import {onBeforeMount, onMounted, type PropType, reactive, ref, watch} from 'vue'
|
||||||
import { type Action, ElMessage, ElMessageBox } from 'element-plus'
|
import {type Action, ElMessage, ElMessageBox} from 'element-plus'
|
||||||
import TestPopup from './testPopup.vue'
|
import TestPopup from './testPopup.vue'
|
||||||
import dataCheckPopup from './dataCheckSingleChannelSingleTestPopup.vue'
|
import dataCheckPopup from './dataCheckSingleChannelSingleTestPopup.vue'
|
||||||
import CompareDataCheckSingleChannelSingleTestPopup from '@/views/home/components/compareDataCheckSingleChannelSingleTestPopup.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 SelectTestItemPopup from '@/views/home/components/selectTestItemPopup.vue'
|
||||||
import WriteTHPopup from '@/views/home/components/writeTHPopup.vue'
|
import WriteTHPopup from '@/views/home/components/writeTHPopup.vue'
|
||||||
import DeviceConnectionPopup from '@/views/home/components/deviceConnectionPopup.vue'
|
import DeviceConnectionPopup from '@/views/home/components/deviceConnectionPopup.vue'
|
||||||
import { type Device } from '@/api/device/interface/device'
|
import {type Device} from '@/api/device/interface/device'
|
||||||
import { type ColumnProps, type ProTableInstance } from '@/components/ProTable/interface'
|
import {type ColumnProps, type ProTableInstance} from '@/components/ProTable/interface'
|
||||||
import { type Plan } from '@/api/plan/interface'
|
import {type Plan} from '@/api/plan/interface'
|
||||||
import { type StandardDevice } from '@/api/device/interface/standardDevice'
|
import {type StandardDevice} from '@/api/device/interface/standardDevice'
|
||||||
import { downloadDevData, generateDevReport, getBoundPqDevList } from '@/api/plan/plan'
|
import {downloadDevData, generateDevReport, getBoundPqDevList} from '@/api/plan/plan'
|
||||||
import { getPqDev } from '@/api/device/device'
|
import {getPqDev} from '@/api/device/device'
|
||||||
import { useAppSceneStore, useModeStore } from '@/stores/modules/mode' // 引入模式 store
|
import {useAppSceneStore, useModeStore} from '@/stores/modules/mode' // 引入模式 store
|
||||||
import { useCheckStore } from '@/stores/modules/check'
|
import {useCheckStore} from '@/stores/modules/check'
|
||||||
import { CheckData } from '@/api/check/interface'
|
import {CheckData} from '@/api/check/interface'
|
||||||
import { useAuthStore } from '@/stores/modules/auth'
|
import {useAuthStore} from '@/stores/modules/auth'
|
||||||
import { useDownload } from '@/hooks/useDownload'
|
import {useDownload} from '@/hooks/useDownload'
|
||||||
import { documentedPqDev } from '@/api/device/report'
|
import {documentedPqDev} from '@/api/device/report'
|
||||||
import { ResultEnum } from '@/enums/httpEnum'
|
import {ResultEnum} from '@/enums/httpEnum'
|
||||||
import { getPqMonList } from '@/api/device/monitor/index'
|
import {getPqMonList} from '@/api/device/monitor/index'
|
||||||
import ReportResultPopup from '@/views/home/components/reportResultPopup.vue'
|
import ReportResultPopup from '@/views/home/components/reportResultPopup.vue'
|
||||||
|
|
||||||
const checkStore = useCheckStore()
|
const checkStore = useCheckStore()
|
||||||
@@ -539,6 +539,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
{ prop: 'operation', label: '操作', fixed: 'right', minWidth :200,isShow: operationShow }
|
{ prop: 'operation', label: '操作', fixed: 'right', minWidth :200,isShow: operationShow }
|
||||||
])
|
])
|
||||||
let testType = 'test' // 检测类型:'test'-检测 'reTest'-复检
|
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) {
|
if (result.length > 0) {
|
||||||
testType = 'test'
|
testType = 'test'
|
||||||
} else {
|
} else {
|
||||||
testType = 'reTest'
|
testType = 'reTest'
|
||||||
}
|
}
|
||||||
|
qualifiedCount=selection.filter(item => item.checkResult == 1).length
|
||||||
|
|
||||||
let devices: CheckData.Device[] = selection.map((item: any) => {
|
let devices: CheckData.Device[] = selection.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
deviceId: item.id,
|
deviceId: item.id,
|
||||||
@@ -925,6 +928,7 @@ const handleTest = async (val: string) => {
|
|||||||
distinguishCancelAndClose: true,
|
distinguishCancelAndClose: true,
|
||||||
confirmButtonText: '不合格项复检',
|
confirmButtonText: '不合格项复检',
|
||||||
cancelButtonText: '全部复检',
|
cancelButtonText: '全部复检',
|
||||||
|
showConfirmButton:qualifiedCount<=0,
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|||||||
@@ -25,6 +25,11 @@
|
|||||||
<el-input number v-model.number='TestConfigForm.scale' placeholder="请输入误差保留小数位" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"/>
|
<el-input number v-model.number='TestConfigForm.scale' placeholder="请输入误差保留小数位" onkeypress="return (/[\d]/.test(String.fromCharCode(event.keyCode)))"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</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-col :span="8">-->
|
||||||
<!-- <el-form-item label='数据处理原则' prop='dataRule' :label-width="140">-->
|
<!-- <el-form-item label='数据处理原则' prop='dataRule' :label-width="140">-->
|
||||||
<!-- <el-select v-model="TestConfigForm.dataRule" clearable placeholder="请选择数据处理原则">-->
|
<!-- <el-select v-model="TestConfigForm.dataRule" clearable placeholder="请选择数据处理原则">-->
|
||||||
@@ -235,6 +240,7 @@ const TestConfigForm = ref<Base.ResTestConfig>({
|
|||||||
maxTime: 3,
|
maxTime: 3,
|
||||||
state: 1, //状态
|
state: 1, //状态
|
||||||
scale:4,
|
scale:4,
|
||||||
|
coefficient:0,
|
||||||
})
|
})
|
||||||
|
|
||||||
const RegResForm = ref<VersionRegister.ResSys_Reg_Res>({
|
const RegResForm = ref<VersionRegister.ResSys_Reg_Res>({
|
||||||
|
|||||||
Reference in New Issue
Block a user