|
|
|
|
@@ -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(() => {
|
|
|
|
|
|