This commit is contained in:
sjl
2025-01-02 09:02:54 +08:00
11 changed files with 603 additions and 551 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[]
}
@@ -75,7 +77,7 @@ export namespace CheckData {
INFO = '#909399',
LOADING = '#607eab',
SUCCESS = '#67c23a',
WARNING ='#e6a23c',
WARNING = '#e6a23c',
DANGER = '#f56c6c',
}

View File

@@ -1,13 +1,45 @@
import http from "@/api";
export const getFormData = (params: { deviceId: string, chnNum: number}) => {
return http.post<any>("/check/detail/", params, {loading: false});
export const getBigTestItem = (planId: string) => {
return http.get(`/adPlan/getBigTestItem?planId=${planId}`, {loading: false});
}
export const getTreeData = (params: { deviceId: string, chnNum: number, checkItemId: string }) => {
return http.post<any>("/check/treeData/", params, {loading: false});
/**
* 获取弹出框表单数据
* @param params 当为scriptType为null时表示查询所有脚本类型否则只查询指定脚本类型。当为chnNum为-1时表示查询所有通道否则只查询指定通道。
*/
export const getFormData = (params: {
scriptId: string,
deviceId: string,
chnNum: string,
scriptType: string | null
}) => {
return http.post("/result/formContent/", params, {loading: false});
}
export const getCheckData = (params: { deviceId: string, chnNum: number, checkItemId: string }) => {
return http.post<any>("/check/data/", params, {loading: false});
/**
* 获取树形结构数据
* @param params
*/
export const getTreeData = (params: {
scriptId: string,
deviceId: string,
chnNum: string,
scriptType: string | null,
flag: number
}) => {
return http.post("/result/treeData/", params, {loading: false});
}
/**
* 获取检查数据
* @param params
*/
export const getTableData = (params: {
scriptId: string,
deviceId: string,
chnNum: string,
scriptType: string | null
}) => {
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

@@ -9,6 +9,7 @@ export const useCheckStore = defineStore("check", {
state: () => ({
devices: Array<CheckData.Device>(),
planId: String(""),
scriptId: String(""),
}),
getters: {},
@@ -24,6 +25,10 @@ export const useCheckStore = defineStore("check", {
setPlanId(planId: string) {
this.planId = planId
},
setScriptId(scriptId: string) {
this.scriptId = scriptId
}
}
});

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>
@@ -16,13 +21,25 @@
<script lang="tsx" setup>
import{CheckData} from "@/api/check/interface";
import {CheckData} from "@/api/check/interface";
const {tableData} = defineProps<{
tableData: CheckData.RawDataItem[]
}>()
const unit = computed(() => {
return "V"
})
const phaseFlag = computed(() => {
let result = 0;
if (tableData.length > 0) {
result = !tableData[0].T ? 0 : 1;
}
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,41 +74,56 @@
</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 {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;
}
return result;
})
</script>
<style scoped>
.form-grid {
display: flex;
flex-direction: row; /* 横向排列 */
flex-wrap: wrap; /* 允许换行 */
display: flex;
flex-direction: row; /* 横向排列 */
flex-wrap: wrap; /* 允许换行 */
}
.form-grid .el-form-item {
flex: 1 1 30%; /* 控件宽度 */
margin-right: 20px; /* 控件间距 */
flex: 1 1 30%; /* 控件宽度 */
margin-right: 20px; /* 控件间距 */
}
.form-grid .el-form-item:last-child {
margin-right: 0; /* 最后一个控件不需要右边距 */
margin-right: 0; /* 最后一个控件不需要右边距 */
}
.dialog-footer {
display: flex;
justify-content: flex-start;
margin-bottom: 10px; /* 调整这里的值以增加或减少间距 */
display: flex;
justify-content: flex-start;
margin-bottom: 10px; /* 调整这里的值以增加或减少间距 */
}
.el-tabs {
margin-bottom: 20px; /* 添加底部边距 */
margin-bottom: 20px; /* 添加底部边距 */
}
.el-table th, .el-table td {
text-align: center; /* 所有单元格文字居中 */
text-align: center; /* 所有单元格文字居中 */
}
</style>

View File

@@ -17,7 +17,7 @@
<el-input v-model='formContent.deviceName' :disabled="true"/>
</el-form-item>
<el-form-item label='通道号'>
<el-select v-model="formContent.monitorIdx" @change="handleChnChange">
<el-select v-model="formContent.chnNum">
<el-option v-for="item in chnList" :key="item.value" :label="item.label"
:value="item.value"/>
</el-select>
@@ -28,16 +28,25 @@
<div class="data-check-body">
<div class="content-left-tree">
<div>
<el-radio-group v-model="switchItem">
<el-radio-group v-model="switchItem" @change="handleSwitchChange">
<el-radio-button label="不符合测试项" :value="0"/>
<el-radio-button label="全部测试项" :value="1"/>
</el-radio-group>
</div>
<div class="content-tree">
<el-tree v-if="switchItem === 0" :default-expanded-keys="defaultExpandedKeys" node-key="id"
:data="treeDataUnQualified" :props="defaultProps" @node-click="handleNodeClick"/>
:data="treeDataUnqualified" :props="defaultProps" @node-click="handleNodeClick"
class="custom-tree">
<template #default="{ node, data }">
<span class="custom-tree-node">{{ data.scriptName }}</span>
</template>
</el-tree>
<el-tree v-if="switchItem === 1" :default-expanded-keys="defaultExpandedKeys" node-key="id"
:data="treeDataAll" :props="defaultProps" @node-click="handleNodeClick"/>
:data="treeDataAll" :props="defaultProps" @node-click="handleNodeClick" class="custom-tree">
<template #default="{ node, data }">
<span class="custom-tree-node">{{ data.scriptName }}</span>
</template>
</el-tree>
</div>
</div>
@@ -68,8 +77,8 @@ 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 {useDictStore} from "@/stores/modules/dict";
import {useCheckStore} from "@/stores/modules/check";
const {appendToBody} = withDefaults(defineProps<{
appendToBody: boolean
@@ -81,6 +90,7 @@ const defaultProps = {
};
const dictStore = useDictStore()
const checkStore = useCheckStore()
const visible = ref(false)
@@ -90,31 +100,30 @@ const formContent = reactive<CheckData.DataCheck>({
errorSysName: '',
dataRule: '',
deviceName: '',
monitorIdx: '',
chnNum: '',
})
let deviceId: string = ''
let scriptType: string = ''
let scriptType: string | null = null
// 通道下拉列表
let chnList: any[] = []
// 不符合测试项、全部测试项切换
const switchItem = ref<number>(-1)
// 左侧树数据-不符合测试项
let treeDataUnQualified: CheckData.ScriptItem[] = []
// 左侧树数据-全部测试项
const switchItem = ref<number>(0)
// 左侧树数据
let treeDataUnqualified: CheckData.ScriptItem[] = []
let treeDataAll: CheckData.ScriptItem[] = []
// 左侧树被选中的叶子节点id
const checkedScriptId = ref<string>('')
const currentScriptDsc = ref('');
// 右侧Tab选中项
const activeTab = ref<string>('resultTab')
// 检测结果表格数据
const checkResultTableData = reactive<CheckData.CheckResult[]>([])
let checkResultTableData: CheckData.CheckResult = []
// 原始数据表格数据
const rawTableData = reactive<CheckData.RawDataItem[]>([])
let rawTableData: CheckData.RawDataItem[] = []
const resultTableRef = ref()
const rawDataTableRef = ref()
@@ -122,202 +131,291 @@ const rawDataTableRef = ref()
// 左侧树默认展开节点id
let defaultExpandedKeys: string[] = []
// 监控通道号下拉框
const handleChnChange = (data: any) => {
console.log("通道号下拉框", data);
// 后端请求,查询该通道号下的测试项(可以只查询不合格测试项,也可以全部测试项、不合格测试项都查询)
// const result = await getTreeData({deviceId, formContent.monitorIdx, scriptType})
// treeDataUnQualified=[]
// treeDataAll=[]
}
// 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) => {
const handleNodeClick = async (data: any) => {
if (!data.children) {
checkedScriptId.value = data.id
currentScriptDsc.value = data.scriptName
if (checkedScriptId.value) {
await updateTableData()
}
}
};
watch(checkedScriptId, (newVal, oldVal) => {
if (newVal) {
console.log("左侧树被选中的叶子节点id", newVal);
// 发起请求,查询该测试项的检测结果
// const result = await getCheckData({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,
maxErrVaule: 0.05774,
result: '合格',
}])
Object.assign(rawTableData, [
{
updateTime: "2024-10-10 09:30:00",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:03",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:06",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:09",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:12",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:15",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:18",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:21",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:24",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:27",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:30",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:33",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:36",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:39",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:42",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:45",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:48",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:51",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:54",
L1: 57.73,
L2: 57.73,
L3: 57.73,
},
{
updateTime: "2024-10-10 09:30:57",
L1: 57.73,
L2: 57.73,
L3: 57.73,
}
])
}
watch(() => formContent.chnNum, async (newVal, oldVal) => {
console.log("通道号", newVal);
switchItem.value = 0
await handleSwitchChange(0)
})
// 切换不合格测试项、全部测试项 触发事件
watch(switchItem, (newVal, oldVal) => {
let node = null
if (newVal === 0) {
node = getDefaultNode(treeDataUnQualified)
const handleSwitchChange = async (data: any) => {
console.log("切换不合格测试项、全部测试项", data);
if (data === 0) {
// 发起请求,查询该测试项的检测结果
// const result = await getTreeData({checkStore.scriptId,deviceId, formContent.chnNum+'', scriptType,0})
treeDataUnqualified = [{
"id": "1",
"scriptName": "频率准确度检测",
"children": [
{
"id": "1-2",
"scriptName": "电压对频率测量的影响",
"children": [
{
"id": "1-2-1",
"scriptName": "输入:频率 50.05Hz Ua =10%Un..."
},
{
"id": "1-2-2",
"scriptName": "输入:频率 51.05Hz Ua =10%Un..."
},
{
"id": "1-2-3",
"scriptName": "输入:频率 52.05Hz Ua =10%Un..."
}
if (newVal === 1) {
node = getDefaultNode(treeDataAll)
]
},
{
"id": "1-3",
"scriptName": "谐波对频率测量的影响",
"children": [
{
"id": "1-3-1",
"scriptName": "输入:频率 50.05Hz Ua =100%Un..."
}
]
}
]
}]
} else {
// 发起请求,查询该测试项的检测结果
// const result = await getTreeData({checkStore.scriptId,deviceId, formContent.chnNum+'', scriptType,1})
treeDataAll = [
{
"id": "1",
"scriptName": "频率准确度检测",
"children": [
{
"id": "1-1",
"scriptName": "额定工作条件下的检测",
"children": [
{
"id": "1-1-1",
"scriptName": "输入:频率 42.5Hz..."
},
{
"id": "1-1-2",
"scriptName": "输入:频率 50.0Hz..."
},
{
"id": "1-1-3",
"scriptName": "输入:频率 50.05Hz...."
}
]
},
{
"id": "1-2",
"scriptName": "电压对频率测量的影响",
"children": [
{
"id": "1-2-1",
"scriptName": "输入:频率 50.05Hz Ua =10%Un..."
},
{
"id": "1-2-2",
"scriptName": "输入:频率 51.05Hz Ua =10%Un..."
},
{
"id": "1-2-3",
"scriptName": "输入:频率 52.05Hz Ua =10%Un..."
}
]
},
{
"id": "1-3",
"scriptName": "谐波对频率测量的影响",
"children": [
{
"id": "1-3-1",
"scriptName": "输入:频率 50.05Hz Ua =100%Un..."
}
]
}
]
},
]
}
defaultOperate()
await updateTableData()
}
// 默认操作
const defaultOperate = () => {
let node = null
if (switchItem.value === 0) {
node = getDefaultNode(treeDataUnqualified)
} else {
node = getDefaultNode(treeDataAll)
}
currentScriptDsc.value = node?.scriptName
checkedScriptId.value = node?.id
defaultExpandedKeys = [node?.id]
})
}
const open = async (_deviceId: string, chnNum: number, _scriptType?: string) => {
console.log(_deviceId, chnNum, _scriptType);
const updateTableData = async () => {
console.log("左侧树被选中的叶子节点id", checkedScriptId.value);
// 发起请求,查询该测试项的检测结果
// const result = await getTableData({checkStore.scriptId,deviceId, formContent.chnNum, scriptType})
checkResultTableData = [{
chnNum: '1',
standardValue: 57.74,
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: '合格',
}]
rawTableData = [
{
updateTime: "2024-10-10 09:30:00",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:03",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:06",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:09",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:12",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:15",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:18",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:21",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:24",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:27",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:30",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:33",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:36",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:39",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:42",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:45",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:48",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:51",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:54",
A: 57.73,
B: 57.73,
C: 57.73,
},
{
updateTime: "2024-10-10 09:30:57",
A: 57.73,
B: 57.73,
C: 57.73,
}
]
}
const open = (_deviceId: string, chnNum: string, _scriptType: string | null) => {
console.log(checkStore.scriptId, _deviceId, chnNum, _scriptType);
deviceId = _deviceId
scriptType = _scriptType ?? ''
switchItem.value = 0
scriptType = _scriptType
// 发起后端请求,查询详细信息 当chnNum为-1时查询所有通道号
//const result1 = await getFormData({deviceId, chnNum})
//const resFormContent = await getFormData({checkStore.scriptId,deviceId, chnNum,scriptType})
// 数据处理
let resFormContent = {
@@ -325,7 +423,7 @@ const open = async (_deviceId: string, chnNum: number, _scriptType?: string) =>
errorSysName: 'Q/GDW 10650.2-2021',
dataRule: '505f063f9f91ab108d895a9fe96b5dce',
deviceName: '被检设备1',
chnList:[
chnList: [
{value: '1', label: '1'},
{value: '2', label: '0'},
{value: '3', label: '1'},
@@ -336,105 +434,11 @@ const open = async (_deviceId: string, chnNum: number, _scriptType?: string) =>
label: item.label == '1' ? `${item.value}` : `${item.value}(不符合)`
}))
let dataRuleName = dictStore.getDictData('Data_Rule').find(item=>item.id==resFormContent.dataRule)?.name
let dataRuleName = dictStore.getDictData('Data_Rule').find(item => item.id == resFormContent.dataRule)?.name
Object.assign(formContent, {...resFormContent,dataRule:dataRuleName,monitorIdx: chnList[0].value})
Object.assign(formContent, {...resFormContent, dataRule: dataRuleName, chnNum: chnList[0].value})
// 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..."
}
]
}
]
}]
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..."
}
]
}
]
}]
visible.value = true;
}
@@ -445,14 +449,14 @@ const close = () => {
errorSysName: '',
dataRule: '',
deviceName: '',
monitorIdx: '',
chnNum: '',
})
treeDataUnqualified = []
treeDataAll = []
treeDataUnQualified = []
checkedScriptId.value = ''
activeTab.value = 'rawDataTab'
currentScriptDsc.value = ''
switchItem.value = -1
switchItem.value = 0
visible.value = false;
};
@@ -512,13 +516,19 @@ defineExpose({
padding: 10px 0;
border: 1px solid #ccc;
overflow: auto;
overflow-y: auto;
.content-tree {
min-width: 100%;
width: 100%;
height: 100%;
max-height: 100%;
margin-top: 10px;
.custom-tree-node {
overflow-x: hidden !important; // 溢出部分隐藏
white-space: nowrap !important; //禁止自动换行
text-overflow: ellipsis !important; // 使溢出部分以省略号显示
}
}
}

View File

@@ -918,7 +918,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

@@ -41,7 +41,7 @@
<el-table :data="checkResultView" row-key="scriptId" height="450px"
:header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%"
border>
<el-table-column fixed prop="scriptName" label="检测项目" width="140px" align="center">
<el-table-column fixed prop="scriptName" label="检测项目" width="150px" align="center">
</el-table-column>
<template v-if="chnSum<=MAX_CHN_SUM">
@@ -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 {computed, reactive, ref, toRef, watch} from "vue";
@@ -146,6 +135,7 @@ import {dialogBig} from "@/utils/elementBind";
import {CheckData} from "@/api/check/interface"
import {useCheckStore} from "@/stores/modules/check";
import {ElMessage, ElMessageBox} from "element-plus";
import {getBigTestItem} from "@/api/check/test";
const checkStore = useCheckStore()
@@ -166,14 +156,14 @@ const props = defineProps({
}
})
const emit = defineEmits(['update:testStatus', 'update:webMsgSend','sendPause','sendResume']);
const emit = defineEmits(['update:testStatus', 'update:webMsgSend', 'sendPause', 'sendResume']);
// 用来保存测试项进度抽屉是否打开
const drawer = ref(false)
// 进度条颜色
const customColors = [{color: "#5cb87a", percentage: 100}]
// 检测脚本数据
const scriptData = reactive<CheckData.ScriptItem[]>([])
let scriptData: CheckData.ScriptItem[] = []
// 用来保存被检设备
const deviceList = reactive<CheckData.Device[]>([])
// 当前进行的测试项索引
@@ -289,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') {
@@ -304,7 +294,10 @@ watch(testStatus, function (newValue, oldValue) {
watch(webMsgSend, function (newValue, oldValue) {
if (activeIndex <= checkTotal) {
switch (newValue.requestId) {
case 'Test_PreTest_Fail':
case 'PreTest_Success':
ElMessage.success('预检成功!')
break;
case 'PreTest_Fail':
ElMessageBox.alert('预检测失败,请检查设备连接情况', '预检测失败', {
confirmButtonText: '确定',
type: 'error',
@@ -312,26 +305,39 @@ watch(webMsgSend, function (newValue, oldValue) {
emit('update:testStatus', 'success')
})
break;
case 'Test_Pause_Success':
case 'Pause_Success':
ElMessage.success('暂停成功')
emit('update:testStatus','paused')
emit('update:testStatus', 'paused')
break;
case 'Test_Pause_Fail':
case 'Pause_Fail':
ElMessage.error('暂停失败')
break;
case 'Test_Resume_Success':
case 'Resume_Success':
ElMessage.success('开始继续检测')
emit('update:testStatus','process')
emit('update:testStatus', 'process')
break;
case 'Test_Resume_Fail':
case 'Resume_Fail':
ElMessage.error('无法继续检测')
break;
case 'Test_VOL_Start':
updateCheckResultView("VOL", true)
case 'FREQ_Start':
updateCheckResultView("FREQ", true)
updateLog(true)
break;
case 'Test_VOL_End':
updateCheckResultView("VOL", false)
case 'FREQ_End':
updateCheckResultView("FREQ", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
activeIndex++;
startTimer()
}
break;
case 'VOL_Start':
updateCheckResultView("V", true)
updateLog(true)
break;
case 'VOL_End':
updateCheckResultView("V", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
@@ -339,12 +345,12 @@ watch(webMsgSend, function (newValue, oldValue) {
startTimer()
}
break;
case 'Test_Freq_Start':
updateCheckResultView("Freq", true)
case 'Harm_V_Start':
updateCheckResultView("HV", true)
updateLog(true)
break;
case 'Test_Freq_End':
updateCheckResultView("Freq", false)
case 'Harm_V_End':
updateCheckResultView("HV", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
@@ -352,12 +358,12 @@ watch(webMsgSend, function (newValue, oldValue) {
startTimer()
}
break;
case 'Test_Harm_V_Start':
updateCheckResultView("Harm_V", true)
case 'Harm_I_Start':
updateCheckResultView("HI", true)
updateLog(true)
break;
case 'Test_Harm_V_End':
updateCheckResultView("Harm_V", false)
case 'Harm_I_End':
updateCheckResultView("HI", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
@@ -365,12 +371,12 @@ watch(webMsgSend, function (newValue, oldValue) {
startTimer()
}
break;
case 'Test_Harm_I_Start':
updateCheckResultView("Harm_I", true)
case 'Harm_P_Start':
updateCheckResultView("HP", true)
updateLog(true)
break;
case 'Test_Harm_I_End':
updateCheckResultView("Harm_I", false)
case 'Harm_P_End':
updateCheckResultView("HP", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
@@ -378,12 +384,12 @@ watch(webMsgSend, function (newValue, oldValue) {
startTimer()
}
break;
case 'Test_Harm_P_Start':
updateCheckResultView("Harm_P", true)
case 'InHarm_V_Start':
updateCheckResultView("HSV", true)
updateLog(true)
break;
case 'Test_Harm_P_End':
updateCheckResultView("Harm_P", false)
case 'InHarm_V_End':
updateCheckResultView("HSV", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
@@ -391,12 +397,12 @@ watch(webMsgSend, function (newValue, oldValue) {
startTimer()
}
break;
case 'Test_InHarm_V_Start':
updateCheckResultView("InHarm_V", true)
case 'InHarm_I_Start':
updateCheckResultView("HSI", true)
updateLog(true)
break;
case 'Test_InHarm_V_End':
updateCheckResultView("InHarm_V", false)
case 'InHarm_I_End':
updateCheckResultView("HSI", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
@@ -404,12 +410,12 @@ watch(webMsgSend, function (newValue, oldValue) {
startTimer()
}
break;
case 'Test_InHarm_I_Start':
updateCheckResultView("InHarm_I", true)
case 'Dip_Start':
updateCheckResultView("VOLTAGE", true)
updateLog(true)
break;
case 'Test_InHarm_I_End':
updateCheckResultView("InHarm_I", false)
case 'Dip_End':
updateCheckResultView("VOLTAGE", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
@@ -417,12 +423,12 @@ watch(webMsgSend, function (newValue, oldValue) {
startTimer()
}
break;
case 'Test_Dip_Start':
updateCheckResultView("Dip", true)
case 'CUR_Start':
updateCheckResultView("I", true)
updateLog(true)
break;
case 'Test_Dip_End':
updateCheckResultView("Dip", false)
case 'CUR_End':
updateCheckResultView("I", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
@@ -430,12 +436,12 @@ watch(webMsgSend, function (newValue, oldValue) {
startTimer()
}
break;
case 'Test_CUR_Start':
updateCheckResultView("CUR", true)
case 'MSQI_U_Start':
updateCheckResultView("IMBV", true)
updateLog(true)
break;
case 'Test_CUR_End':
updateCheckResultView("CUR", false)
case 'MSQI_U_End':
updateCheckResultView("IMBV", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
@@ -443,12 +449,12 @@ watch(webMsgSend, function (newValue, oldValue) {
startTimer()
}
break;
case 'Test_MSQI_U_Start':
updateCheckResultView("MSQI_U", true)
case 'MSQI_I_Start':
updateCheckResultView("IMBA", true)
updateLog(true)
break;
case 'Test_MSQI_U_End':
updateCheckResultView("MSQI_U", false)
case 'MSQI_I_End':
updateCheckResultView("IMBA", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
@@ -456,12 +462,12 @@ watch(webMsgSend, function (newValue, oldValue) {
startTimer()
}
break;
case 'Test_MSQI_I_Start':
updateCheckResultView("MSQI_I", true)
case 'Flicker_Start':
updateCheckResultView("F", true)
updateLog(true)
break;
case 'Test_MSQI_I_End':
updateCheckResultView("MSQI_I", false)
case 'Flicker_End':
updateCheckResultView("F", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
@@ -469,20 +475,7 @@ watch(webMsgSend, function (newValue, oldValue) {
startTimer()
}
break;
case 'Test_Flicker_Start':
updateCheckResultView("Flicker", true)
updateLog(true)
break;
case 'Test_Flicker_End':
updateCheckResultView("Flicker", false)
updateLog(false)
updatePercentage()
if (testStatus.value != 'paused') {
activeIndex++;
startTimer()
}
break;
case 'Test_Quit':
case 'Quit':
updateLog(false)
updatePercentage()
console.log('检测结束')
@@ -514,8 +507,8 @@ let randomUnConnectedDeviceId = -1
let randomErrorDataRaw = -1
// todo 可移除end
onBeforeMount(() => {
initScriptData()
onBeforeMount(async () => {
await initScriptData()
initDeviceList()
initCheckResult()
@@ -536,40 +529,14 @@ const showTestLog = () => {
}
// 初始化检测脚本数据
const initScriptData = () => {
let map = new Map<string, string>()
map.set('VOL', '电压')
.set('Freq', '频率')
.set('Harm_V', '谐波电压')
.set('Harm_I', '谐波电流')
.set('Harm_P', '谐波有功功率')
.set('InHarm_V', '间谐波电压')
.set('InHarm_I', '间谐波电流')
.set('Dip', '暂态')
.set('CUR', '电流')
.set('MSQI_U', '电压不平衡度')
.set('MSQI_I', '电流不平衡度')
.set('Flicker', '短时闪变')
const initScriptData = async () => {
let response: CheckData.ScriptItem[] = [
{id: '1', code: 'VOL', scriptName: '电压准确度检测'},
{id: '2', code: 'Freq', scriptName: '频率准确度检测'},
{id: '3', code: 'Harm_V', scriptName: '谐波电压准确度检测'},
{id: '4', code: 'Harm_I', scriptName: '谐波电流准确度检测'},
{id: '5', code: 'Harm_P', scriptName: '谐波有功功率准确度检测'},
{id: '6', code: 'InHarm_V', scriptName: '间谐波电压准确度检测'},
{id: '7', code: 'InHarm_I', scriptName: '间谐波电流准确度检测'},
{id: '8', code: 'Dip', scriptName: '暂态准确度检测'},
{id: '9', code: 'CUR', scriptName: '电流准确度检测'},
{id: '10', code: 'MSQI_U', scriptName: '三相电压不平衡度检测'},
{id: '11', code: 'MSQI_I', scriptName: '三相电流不平衡度检测'},
{id: '12', code: 'Flicker', scriptName: '闪变准确度检测'}
]
let response: any = await getBigTestItem(checkStore.planId)
let temp = response.map(item => {
let temp = response.data.map(item => {
return {
...item,
scriptName: map.get(item.code) || item.scriptName
scriptName: item.scriptName
}
})
@@ -811,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,
@@ -875,8 +813,8 @@ const handlePauseOrContinue = () => {
};
// 点击查看设备通道检测详情。参数1设备信息参数2通道号-1代表查看全部通道
const handleClick = (scriptId: string, deviceId: any, chnNum: number) => {
dataCheckSingleChannelSingleTestPopupRef.value?.open(deviceId, chnNum, scriptId);
const handleClick = (deviceId: string, chnNum: string, scriptType: string) => {
dataCheckSingleChannelSingleTestPopupRef.value?.open(deviceId, chnNum, scriptType);
};
// todo 可移除
@@ -885,152 +823,151 @@ const startTimer = () => {
switch (activeIndex) {
case 1:
emit('update:webMsgSend', {
requestId: 'Test_VOL_Start',
requestId: 'FREQ_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_VOL_End',
requestId: 'FREQ_End',
params: {}
})
}, 2000);
break;
case 2:
emit('update:webMsgSend', {
requestId: 'Test_Freq_Start',
requestId: 'VOL_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_Freq_End',
requestId: 'VOL_End',
params: {}
})
}, 2000);
break;
case 3:
emit('update:webMsgSend', {
requestId: 'Test_Harm_V_Start',
requestId: 'Harm_V_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_Harm_V_End',
requestId: 'Harm_V_End',
params: {}
})
}, 2000)
break;
case 4:
emit('update:webMsgSend', {
requestId: 'Test_Harm_I_Start',
requestId: 'Harm_I_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_Harm_I_End',
requestId: 'Harm_I_End',
params: {}
})
}, 2000)
break;
case 5:
emit('update:webMsgSend', {
requestId: 'Test_Harm_P_Start',
requestId: 'Harm_P_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_Harm_P_End',
requestId: 'Harm_P_End',
params: {}
})
}, 2000)
break;
case 6:
emit('update:webMsgSend', {
requestId: 'Test_InHarm_V_Start',
requestId: 'InHarm_V_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_InHarm_V_End',
requestId: 'InHarm_V_End',
params: {}
})
}, 2000)
break;
case 7:
emit('update:webMsgSend', {
requestId: 'Test_InHarm_I_Start',
requestId: 'InHarm_I_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_InHarm_I_End',
requestId: 'InHarm_I_End',
params: {}
})
}, 2000)
break;
case 8:
emit('update:webMsgSend', {
requestId: 'Test_Dip_Start',
requestId: 'Dip_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_Dip_End',
requestId: 'Dip_End',
params: {}
})
}, 2000)
break;
case 9:
emit('update:webMsgSend', {
requestId: 'Test_CUR_Start',
requestId: 'CUR_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_CUR_End',
requestId: 'CUR_End',
params: {}
})
}, 2000)
break;
case 10:
emit('update:webMsgSend', {
requestId: 'Test_MSQI_U_Start',
requestId: 'MSQI_U_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_MSQI_U_End',
requestId: 'MSQI_U_End',
params: {}
})
}, 2000)
break;
case 11:
emit('update:webMsgSend', {
requestId: 'Test_MSQI_I_Start',
requestId: 'MSQI_I_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_MSQI_I_End',
requestId: 'MSQI_I_End',
params: {}
}, 2000)
})
break;
case 12:
emit('update:webMsgSend', {
requestId: 'Test_Flicker_Start',
requestId: 'Flicker_Start',
params: {}
})
setTimeout(() => {
emit('update:webMsgSend', {
requestId: 'Test_Flicker_End',
requestId: 'Flicker_End',
params: {}
})
}, 2000)
break;
case 13:
emit('update:webMsgSend', {
requestId: 'Test_Quit',
requestId: 'Quit',
params: {}
})
break;

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') {
// 发送暂停指令

View File

@@ -37,8 +37,11 @@ import { type Plan } from '@/api/plan/interface';
import { Menu, Platform, CircleCheck,Loading } from '@element-plus/icons-vue'
import { onMounted, ref, watch } from 'vue';
import { useRouter } from 'vue-router'
import {useCheckStore} from "@/stores/modules/check";
const router = useRouter()
const checkStore = useCheckStore()
const data: any = ref([])
const defaultProps = {
children: 'children',
@@ -71,6 +74,7 @@ watch(
},
)
const handleNodeClick = (data: Plan.ResPlan) => {
checkStore.setScriptId(data.scriptId)
updateSelectedTreeNode(data.id)
}
const filterNode = (value: string, data: any) => {