This commit is contained in:
caozehui
2024-12-31 14:27:36 +08:00
parent 65e54ee2b5
commit 081aeacff7
9 changed files with 325 additions and 228 deletions

View File

@@ -13,12 +13,14 @@ export namespace CheckData {
export interface CheckResult {
chnNum: string,
standardValue: number,
L1: number,
L1_errValue: number,
L2: number,
L2_errValue: number,
L3: number,
L3_errValue: number,
A?: number,
A_errValue?: number,
B?: number,
B_errValue?: number,
C?: number,
C_errValue?: number,
T?: number,
T_errValue?: number,
maxErrVaule: number,
result: string,
}
@@ -28,9 +30,10 @@ export namespace CheckData {
*/
export interface RawDataItem {
updateTime: string,
L1: number,
L2: number,
L3: number
A?: number,
B?: number,
C?: number
T?: number
}
export interface Device {
@@ -44,7 +47,6 @@ export namespace CheckData {
id: string,
code?: string,
scriptName: string,
pid?: string,
children?: ScriptItem[]
}

View File

@@ -9,7 +9,7 @@ export const getBigTestItem = (planId: string) => {
* 获取弹出框表单数据
* @param params 当为scriptType为null时表示查询所有脚本类型否则只查询指定脚本类型。当为chnNum为-1时表示查询所有通道否则只查询指定通道。
*/
export const getFormData = (params: { planId: string, deviceId: string, chnNum: number, scriptType?: string }) => {
export const getFormData = (params: { planId: string, deviceId: string, chnNum: string, scriptType: string|null }) => {
return http.post("/result/formContent/", params, {loading: false});
}
@@ -17,7 +17,7 @@ export const getFormData = (params: { planId: string, deviceId: string, chnNum:
* 获取树形结构数据
* @param params
*/
export const getTreeData = (params: { deviceId: string, chnNum: number, checkItemId: string }) => {
export const getTreeData = (params: { deviceId: string, chnNum: string, checkItemId: string }) => {
return http.post("/result/treeData/", params, {loading: false});
}
@@ -25,6 +25,6 @@ export const getTreeData = (params: { deviceId: string, chnNum: number, checkIte
* 获取检查数据
* @param params
*/
export const getCheckData = (params: { deviceId: string, chnNum: number, checkItemId: string }) => {
return http.post("/result/data/", params, {loading: false});
export const getTableData = (params: { deviceId: string, chnNum: string, checkItemId: string }) => {
return http.post("/result/tableData/", params, {loading: false});
}

View File

@@ -13,15 +13,15 @@ export const closePreTest = (params) => {
* 开始正式检测
* @param params
*/
export const startTest = (params: { deviceIds: string[] }) => {
return http.post(`/test/startTest`, params, {loading: false})
export const startTest = (params) => {
return http.post(`/prepare/startTest`, params, {loading: false})
}
/**
* 暂停正式检测
* @param params
*/
export const pauseTest = (params: { deviceIds: string[] }) => {
export const pauseTest = (params) => {
return http.post(`/test/pauseTest`, params, {loading: false})
}
@@ -29,6 +29,6 @@ export const pauseTest = (params: { deviceIds: string[] }) => {
* 继续正式检测
* @param params
*/
export const resumeTest = (params: { deviceIds: string[] }) => {
export const resumeTest = (params) => {
return http.post(`/test/resumeTest`, params, {loading: false})
}

View File

@@ -6,9 +6,14 @@
style="width: 100%;">
<el-table-column type="index" label="序号" width="70" fixed="left"/>
<el-table-column prop="updateTime" label="数据时间"/>
<el-table-column prop="L1" label="L1V"/>
<el-table-column prop="L2" label="L2V"/>
<el-table-column prop="L3" label="L3V"/>
<template v-if="phaseFlag === 0">
<el-table-column prop="A" :label="`A${unit}`"/>
<el-table-column prop="B" :label="`B${unit}`"/>
<el-table-column prop="C" :label="`C${unit}`"/>
</template>
<template v-if="phaseFlag === 1">
<el-table-column prop="T" :label="`T${unit}`"/>
</template>
</el-table>
</div>
@@ -23,6 +28,19 @@ const {tableData} = defineProps<{
}>()
const unit = computed(() => {
return "V"
})
const phaseFlag = computed(() => {
let result = 0;
if (tableData.length > 0) {
result = !tableData[0].T ? 0 : 1;
}
console.log(result);
return result;
})
</script>
<style scoped>

View File

@@ -3,45 +3,70 @@
<div class="table-main">
<el-table :data="tableData" height="335px" :header-cell-style="{ textAlign: 'center' } "
:cell-style="{ textAlign: 'center' }">
<el-table-column prop="chnNum" label="通道号" width="80">
<template #default="{row}">
{{ '通道' + row.chnNum }}
</template>
</el-table-column>
<el-table-column prop="standardValue" label="标准值V"/>
<el-table-column label="L1V">
<el-table-column prop="L1" width="75" label="被检值">
<!-- <el-table-column prop="chnNum" label="通道号" width="80">-->
<!-- <template #default="{row}">-->
<!-- {{ '通道' + row.chnNum }}-->
<!-- </template>-->
<!-- </el-table-column>-->
<template v-if="phaseFlag === 0">
<el-table-column :label="`A${unit}`">
<el-table-column prop="standardValue" width="74" label="标准值V"/>
<el-table-column prop="A" width="74" label="被检值">
</el-table-column>
<el-table-column prop="L1_errValue" width="75" label="误差值">
<el-table-column prop="A_errValue" width="74" label="误差值">
</el-table-column>
</el-table-column>
<el-table-column label="L2V">
<el-table-column prop="L2" width="75" label="被检值">
<el-table-column :label="`B${unit}`">
<el-table-column prop="standardValue" width="74" label="标准值V"/>
<el-table-column prop="B" width="74" label="被检值">
</el-table-column>
<el-table-column prop="L2_errValue" width="75" label="误差值">
<el-table-column prop="B_errValue" width="74" label="误差值">
</el-table-column>
</el-table-column>
<el-table-column label="L3V">
<el-table-column prop="L3" width="75" label="被检值">
<el-table-column :label="`C${unit}`">
<el-table-column prop="standardValue" width="74" label="标准值V"/>
<el-table-column prop="C" width="74" label="被检值">
</el-table-column>
<el-table-column prop="L3_errValue" width="75" label="误差值">
<el-table-column prop="C_errValue" width="74" label="误差值">
</el-table-column>
</el-table-column>
<el-table-column prop="maxErrVaule" width="110" label="最大误差V">
<el-table-column prop="maxErrVaule" label="最大误差V">
</el-table-column>
<el-table-column prop="result" label="检测结果" width="100">
<el-table-column prop="result" label="检测结果" width="70">
<template #default="scope">
<el-tag type="danger" v-if="scope.row.result === '不合格'">{{ scope.row.result }}</el-tag>
<span v-if="scope.row.result != '不合格'">{{ scope.row.result }}</span>
</template>
</el-table-column>
</template>
<template v-if="phaseFlag === 1">
<el-table-column :label="`T${unit}`">
<el-table-column prop="standardValue" label="标准值V"/>
<el-table-column prop="T" label="被检值">
</el-table-column>
<el-table-column prop="T_errValue" label="误差值">
</el-table-column>
</el-table-column>
<el-table-column prop="maxErrVaule" label="最大误差V">
</el-table-column>
<el-table-column prop="result" label="检测结果">
<template #default="scope">
<el-tag type="danger" v-if="scope.row.result === '不合格'">{{ scope.row.result }}</el-tag>
<span v-if="scope.row.result != '不合格'">{{ scope.row.result }}</span>
</template>
</el-table-column>
</template>
</el-table>
</div>
@@ -49,13 +74,25 @@
</template>
<script lang="tsx" setup>
import {defineProps, reactive} from 'vue';
import {defineProps} from 'vue';
import {CheckData} from "@/api/check/interface";
const {tableData} = defineProps<{
tableData: CheckData.CheckResult[],
}>();
const unit = computed(() => {
return "V"
})
const phaseFlag = computed(() => {
let result = 0;
if (tableData.length > 0) {
result = !tableData[0].T ? 0:1;
}
console.log(result);
return result;
})
</script>
@@ -66,18 +103,22 @@ display: flex;
flex-direction: row; /* 横向排列 */
flex-wrap: wrap; /* 允许换行 */
}
.form-grid .el-form-item {
flex: 1 1 30%; /* 控件宽度 */
margin-right: 20px; /* 控件间距 */
}
.form-grid .el-form-item:last-child {
margin-right: 0; /* 最后一个控件不需要右边距 */
}
.dialog-footer {
display: flex;
justify-content: flex-start;
margin-bottom: 10px; /* 调整这里的值以增加或减少间距 */
}
.el-tabs {
margin-bottom: 20px; /* 添加底部边距 */
}

View File

@@ -68,7 +68,7 @@ import {reactive, ref} from 'vue'
import DataCheckResultTable from './dataCheckResultTable.vue'
import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
import {CheckData} from "@/api/check/interface";
import {getFormData, getTreeData, getCheckData} from "@/api/check/test";
import {getFormData, getTreeData, getTableData} from "@/api/check/test";
import {useDictStore} from "@/stores/modules/dict";
import {useCheckStore} from "@/stores/modules/check";
@@ -95,7 +95,7 @@ const formContent = reactive<CheckData.DataCheck>({
monitorIdx: '',
})
let deviceId: string = ''
let scriptType: string = ''
let scriptType: string | null = null
// 通道下拉列表
let chnList: any[] = []
@@ -134,19 +134,9 @@ const handleChnChange = (data: any) => {
// treeDataUnQualified=[]
// treeDataAll=[]
switchItem.value = 0
}
// watch(() => formContent.monitorIdx, (newVal, oldVal) => {
// if (newVal) {
// console.log("通道号下拉框", newVal, oldVal);
//
// // 后端请求,查询该通道号下的测试项(可以只查询不合格测试项,也可以全部测试项、不合格测试项都查询)
// // const result = await getTreeData({deviceId, formContent.monitorIdx, scriptType})
// // treeDataUnQualified=[]
// // treeDataAll=[]
//
// }
// })
// 点击左侧树节点触发事件
const handleNodeClick = (data: any) => {
@@ -160,141 +150,234 @@ watch(checkedScriptId, (newVal, oldVal) => {
if (newVal) {
console.log("左侧树被选中的叶子节点id", newVal);
// 发起请求,查询该测试项的检测结果
// const result = await getCheckData({deviceId, formContent.monitorIdx, scriptType})
// const result = await getTableData({deviceId, formContent.monitorIdx, scriptType})
Object.assign(checkResultTableData, [{
chnNum: '1',
standardValue: 57.74,
L1: 57.73,
L1_errValue: 0.01,
L2: 57.73,
L2_errValue: 0.01,
L3: 57.73,
L3_errValue: 0.01,
A: 57.73,
A_errValue: 0.01,
B: 57.73,
B_errValue: 0.01,
C: 57.73,
C_errValue: 0.01,
maxErrVaule: 0.05774,
result: '合格',
}])
// Object.assign(checkResultTableData, [{
// chnNum: '1',
// standardValue: 57.74,
// T: 57.73,
// T_errValue: 0.01,
// maxErrVaule: 0.05774,
// result: '合格',
// }])
Object.assign(rawTableData, [
{
updateTime: "2024-10-10 09:30:00",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:03",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:06",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:09",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:12",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:15",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:18",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:21",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:24",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:27",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:30",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:33",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:36",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:39",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:42",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:45",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:48",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:51",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:54",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:57",
L1: 57.73,
L2: 57.73,
L3: 57.73,
A: 57.73,
B: 57.73,
C: 57.73,
}
])
// Object.assign(rawTableData, [
// {
// updateTime: "2024-10-10 09:30:00",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:03",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:06",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:09",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:12",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:15",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:18",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:21",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:24",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:27",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:30",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:33",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:36",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:39",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:42",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:45",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:48",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:51",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:54",
// T: 57.73,
// },
// {
// updateTime: "2024-10-10 09:30:57",
// T: 57.73,
// }
// ])
}
})
@@ -313,12 +396,13 @@ watch(switchItem, (newVal, oldVal) => {
defaultExpandedKeys = [node?.id]
})
const open = async (_deviceId: string, chnNum: number, _scriptType?: string) => {
const open = async (_deviceId: string, chnNum: string, _scriptType: string | null) => {
console.log(_deviceId, chnNum, _scriptType);
deviceId = _deviceId
scriptType = _scriptType
switchItem.value = 0
// 发起后端请求,查询详细信息 当chnNum为-1时查询所有通道号
//const resFormContent = await getFormData({checkStore.planId,deviceId, chnNum.toString(),scriptType})
//const resFormContent = await getFormData({checkStore.planId,deviceId, chnNum,scriptType})
// 数据处理
let resFormContent = {
@@ -345,61 +429,50 @@ const open = async (_deviceId: string, chnNum: number, _scriptType?: string) =>
// const result2 = await getTreeData({deviceId, formContent.monitorIdx, checkItemId})
treeDataAll = [{
"id": "1",
"pid": "0",
"scriptName": "频率准确度检测",
"children": [
{
"id": "1-1",
"pid": "1",
"scriptName": "额定工作条件下的检测",
"children": [
{
"id": "1-1-1",
"pid": "1-1",
"scriptName": "输入:频率 42.5Hz..."
},
{
"id": "1-1-2",
"pid": "1-1",
"scriptName": "输入:频率 50.0Hz..."
},
{
"id": "1-1-3",
"pid": "1-1",
"scriptName": "输入:频率 50.05Hz...."
}
]
},
{
"id": "1-2",
"pid": "1",
"scriptName": "电压对频率测量的影响",
"children": [
{
"id": "1-2-1",
"pid": "1-2",
"scriptName": "输入:频率 50.05Hz Ua =10%Un..."
},
{
"id": "1-2-1",
"pid": "1-2",
"scriptName": "输入:频率 51.05Hz Ua =10%Un..."
},
{
"id": "1-2-2",
"pid": "1-2",
"scriptName": "输入:频率 52.05Hz Ua =10%Un..."
}
]
},
{
"id": "1-3",
"pid": "1",
"scriptName": "谐波对频率测量的影响",
"children": [
{
"id": "1-3-1",
"pid": "1-3",
"scriptName": "输入:频率 50.05Hz Ua =100%Un..."
}
]
@@ -408,27 +481,22 @@ const open = async (_deviceId: string, chnNum: number, _scriptType?: string) =>
}]
treeDataUnQualified = [{
"id": "1",
"pid": "0",
"scriptName": "频率准确度检测",
"children": [
{
"id": "1-2",
"pid": "1",
"scriptName": "电压对频率测量的影响",
"children": [
{
"id": "1-2-1",
"pid": "1-2",
"scriptName": "输入:频率 50.05Hz Ua =10%Un..."
},
{
"id": "1-2-1",
"pid": "1-2",
"scriptName": "输入:频率 51.05Hz Ua =10%Un..."
},
{
"id": "1-2-2",
"pid": "1-2",
"scriptName": "输入:频率 52.05Hz Ua =10%Un..."
}
]

View File

@@ -916,7 +916,7 @@ const openDrawer = (title: string, row: any) => {
if(title === '检测数据查询')
{
dataCheckPopupRef.value?.open(row.id,-1)
dataCheckPopupRef.value?.open(row.id,'-1',null)
}
if (title === '误差体系更换')
{

View File

@@ -54,10 +54,10 @@
:content="row.devices[index1].chnResult[index2].color===CheckData.ButtonColorEnum.INFO ? '暂无数据' : '点击查看详情'"
placement="top">
<el-button
:disabled="row.devices[index1].chnResult[index2].color==CheckData.ButtonColorEnum.INFO"
:disabled="row.devices[index1].chnResult[index2].color===CheckData.ButtonColorEnum.INFO || row.devices[index1].chnResult[index2].color===CheckData.ButtonColorEnum.LOADING"
:color="row.devices[index1].chnResult[index2].color"
size="small"
@click="handleClick(row.scriptId,item.deviceId,chnItem)"
@click="handleClick(item.deviceId,chnItem+'',row.scriptId)"
style="align-self: center;"
>
<el-icon v-if="row.devices[index1].chnResult[index2].icon==='Loading'" class="loading-box"
@@ -83,10 +83,10 @@
:content="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO ? '暂无数据' : '点击查看详情'"
placement="top">
<el-button
:disabled="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO"
:disabled="row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.INFO || row.devices[index1].chnResult[0].color===CheckData.ButtonColorEnum.LOADING"
:color="row.devices[index1].chnResult[0].color"
size="small"
@click="handleClick(row.scriptId,item.deviceId,-1)"
@click="handleClick(item.deviceId,'-1',row.scriptId)"
>
<el-icon v-if="row.devices[index1].chnResult[0].icon==='Loading'" class="loading-box"
style="color: #fff">
@@ -127,18 +127,7 @@
<dataCheckSingleChannelSingleTestPopup ref="dataCheckSingleChannelSingleTestPopupRef"/>
</template>
<script lang="tsx" setup name="test">
import {
Check,
InfoFilled,
Refresh,
VideoPause,
Minus,
Close,
CircleCheckFilled,
WarnTriangleFilled,
Loading,
Link
} from '@element-plus/icons-vue'
import {Check, InfoFilled, Loading, Refresh, VideoPause} from '@element-plus/icons-vue'
import resultPopup from './resultPopup.vue'
import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue'
import {reactive, ref, watch} from "vue";
@@ -290,7 +279,7 @@ const checkResultView = computed(() => {
watch(testStatus, function (newValue, oldValue) {
if (newValue == 'start') {
startTimer() // todo 可移除
//startTimer() // todo 可移除
emit('update:testStatus', 'process')
}
if (newValue == 'paused' && oldValue == 'process') {
@@ -305,6 +294,9 @@ watch(testStatus, function (newValue, oldValue) {
watch(webMsgSend, function (newValue, oldValue) {
if (activeIndex <= checkTotal) {
switch (newValue.requestId) {
case 'PreTest_Success':
ElMessage.success('预检成功!')
break;
case 'PreTest_Fail':
ElMessageBox.alert('预检测失败,请检查设备连接情况', '预检测失败', {
confirmButtonText: '确定',
@@ -786,35 +778,6 @@ const getCheckResult = (scriptId: string) => {
})
}
// devices = deviceList.map(item => {
//
// let tempChnResult: CheckData.ChnCheckResultEnum[] = []
// for (let i = 0; i < item.chnNum; i++) {
// tempChnResult.push(CheckData.ChnCheckResultEnum.SUCCESS)
// }
//
// let randomNum = getRandomInt(item.chnNum * 2)
// if (activeIndex >= 2 && activeIndex <= 8) {
// if (randomNum % 3 === 0) {
// let a = getRandomInt(2) === 1 ? CheckData.ChnCheckResultEnum.ERRORDATA : CheckData.ChnCheckResultEnum.UNCONNECTED
// tempChnResult.splice(tempChnResult.length - 1 - item.chnNum, item.chnNum, CheckData.ChnCheckResultEnum.ERRORDATA)
// }else{
// if (randomNum < item.chnNum) {
// tempChnResult[randomNum] = (randomNum % 2) + 1
//
// errorCheckItem.push(scriptId)
// }
// }
// }
//
// return {
// deviceId: item.deviceId,
// deviceName: item.deviceName,
// chnResult: tempChnResult,
// }
// })
let tempScriptChnItem: CheckData.ScriptChnItem = {
scriptId,
devices,
@@ -850,7 +813,7 @@ const handlePauseOrContinue = () => {
};
// 点击查看设备通道检测详情。参数1设备信息参数2通道号-1代表查看全部通道
const handleClick = (scriptType: string, deviceId: any, chnNum: number) => {
const handleClick = (deviceId: string, chnNum: string, scriptType: string) => {
dataCheckSingleChannelSingleTestPopupRef.value?.open(deviceId, chnNum, scriptType);
};

View File

@@ -248,15 +248,20 @@ const detectionOptions = ref([
// break;
case 2:
if (TestStatus.value == "waiting") {
// startTest({deviceIds}).then(res => {
// console.log(res)
startTest({
userPageId: "cdf",
devIds:deviceIds,
planId:planId,
operateType:'1' // '0'为预检测、1为正式检测
}).then(res => {
console.log(res)
// if (res.code === 20000) {
// TestStatus.value = 'start'
// webMsgSend.value = ''
// } else {
// ElMessage.error(res.message)
// }
// })
})
TestStatus.value = 'start'
} else if (TestStatus.value == 'process') {
// 发送暂停指令