微调
This commit is contained in:
@@ -43,21 +43,22 @@ export namespace CheckData {
|
||||
}
|
||||
|
||||
// 用来描述检测脚本类型
|
||||
export interface ScriptItem{
|
||||
export interface ScriptItem {
|
||||
id: string,
|
||||
code: string,
|
||||
scriptName: string,
|
||||
}
|
||||
|
||||
// 用来描述 检测数据-左侧树结构
|
||||
export interface TreeItem{
|
||||
scriptTypeName: string|null,
|
||||
sourceDesc: string|null,
|
||||
harmNum: number|null,
|
||||
index:number|null,
|
||||
fly:number|null,
|
||||
children?: TreeItem[]
|
||||
export interface TreeItem {
|
||||
scriptTypeName: string | null,
|
||||
sourceDesc: string | null,
|
||||
harmNum: number | null,
|
||||
index: number | null,
|
||||
fly: number | null,
|
||||
children: TreeItem[] | null,
|
||||
}
|
||||
|
||||
// 用来描述 通道检测结果
|
||||
export enum ChnCheckResultEnum {
|
||||
UNKNOWN = -1,
|
||||
|
||||
@@ -53,7 +53,9 @@
|
||||
<div class="content-right">
|
||||
<div class="content-right-title">
|
||||
<el-divider>当前检测项目</el-divider>
|
||||
<span>{{ currentDesc }}</span>
|
||||
<div>
|
||||
{{ currentDesc ? currentDesc : "无" }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-right-Tabs">
|
||||
<el-tabs type="border-card" v-model="activeTab">
|
||||
@@ -178,13 +180,15 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
|
||||
harmNum: null,
|
||||
index: 11,
|
||||
fly: 1,
|
||||
children: null
|
||||
},
|
||||
{
|
||||
scriptTypeName: "频率=50Hz",
|
||||
sourceDesc: "频率=50Hz",
|
||||
harmNum: null,
|
||||
index: 12,
|
||||
fly: 2,
|
||||
fly: 1,
|
||||
children: null
|
||||
},
|
||||
{
|
||||
scriptTypeName: "频率=50.05Hz",
|
||||
@@ -192,13 +196,15 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
|
||||
harmNum: null,
|
||||
index: 13,
|
||||
fly: 1,
|
||||
children: null
|
||||
},
|
||||
{
|
||||
scriptTypeName: "频率=57.5Hz",
|
||||
sourceDesc: "频率=57.5Hz",
|
||||
harmNum: null,
|
||||
index: 14,
|
||||
fly: 2,
|
||||
fly: 1,
|
||||
children: null
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -222,6 +228,7 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: 1,
|
||||
children: null
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -237,7 +244,194 @@ watch(() => formContent.chnNum, async (newVal, oldVal) => {
|
||||
sourceDesc: "叠加多次谐波对频率=50.05Hz的影响",
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: 2,
|
||||
fly: 1,
|
||||
children: null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
scriptTypeName: "频率准确度检测",
|
||||
sourceDesc: null,
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: null,
|
||||
children: [
|
||||
{
|
||||
scriptTypeName: "额定条件下频率准确度测试",
|
||||
sourceDesc: null,
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: null,
|
||||
children: [
|
||||
{
|
||||
scriptTypeName: "频率=42.5Hz",
|
||||
sourceDesc: "频率=42.5Hz",
|
||||
harmNum: null,
|
||||
index: 11,
|
||||
fly: 1,
|
||||
children: null
|
||||
},
|
||||
{
|
||||
scriptTypeName: "频率=50Hz",
|
||||
sourceDesc: "频率=50Hz",
|
||||
harmNum: null,
|
||||
index: 12,
|
||||
fly: 1,
|
||||
children: null
|
||||
},
|
||||
{
|
||||
scriptTypeName: "频率=50.05Hz",
|
||||
sourceDesc: "频率=50.05Hz",
|
||||
harmNum: null,
|
||||
index: 13,
|
||||
fly: 1,
|
||||
children: null
|
||||
},
|
||||
{
|
||||
scriptTypeName: "频率=57.5Hz",
|
||||
sourceDesc: "频率=57.5Hz",
|
||||
harmNum: null,
|
||||
index: 14,
|
||||
fly: 1,
|
||||
children: null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
scriptTypeName: "单影响量下频率准确度测试",
|
||||
sourceDesc: null,
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: null,
|
||||
children: [
|
||||
{
|
||||
scriptTypeName: "电压幅值对频率测量的影响",
|
||||
sourceDesc: null,
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: null,
|
||||
children: [
|
||||
{
|
||||
scriptTypeName: "10%Un对频率=50.05Hz的影响",
|
||||
sourceDesc: "10%Un对频率=50.05Hz的影响",
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: 1,
|
||||
children: null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
scriptTypeName: "谐波对频率测量的影响",
|
||||
sourceDesc: null,
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: null,
|
||||
children: [
|
||||
{
|
||||
scriptTypeName: "叠加多次谐波对频率=50.05Hz的影响",
|
||||
sourceDesc: "叠加多次谐波对频率=50.05Hz的影响",
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: 1,
|
||||
children: null
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
scriptTypeName: "频率准确度检测",
|
||||
sourceDesc: null,
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: null,
|
||||
children: [
|
||||
{
|
||||
scriptTypeName: "额定条件下频率准确度测试",
|
||||
sourceDesc: null,
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: null,
|
||||
children: [
|
||||
{
|
||||
scriptTypeName: "频率=42.5Hz",
|
||||
sourceDesc: "频率=42.5Hz",
|
||||
harmNum: null,
|
||||
index: 11,
|
||||
fly: 1,
|
||||
children: null
|
||||
},
|
||||
{
|
||||
scriptTypeName: "频率=50Hz",
|
||||
sourceDesc: "频率=50Hz",
|
||||
harmNum: null,
|
||||
index: 12,
|
||||
fly: 1,
|
||||
children: null
|
||||
},
|
||||
{
|
||||
scriptTypeName: "频率=50.05Hz",
|
||||
sourceDesc: "频率=50.05Hz",
|
||||
harmNum: null,
|
||||
index: 13,
|
||||
fly: 1,
|
||||
children: null
|
||||
},
|
||||
{
|
||||
scriptTypeName: "频率=57.5Hz",
|
||||
sourceDesc: "频率=57.5Hz",
|
||||
harmNum: null,
|
||||
index: 14,
|
||||
fly: 1,
|
||||
children: null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
scriptTypeName: "单影响量下频率准确度测试",
|
||||
sourceDesc: null,
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: null,
|
||||
children: [
|
||||
{
|
||||
scriptTypeName: "电压幅值对频率测量的影响",
|
||||
sourceDesc: null,
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: null,
|
||||
children: [
|
||||
{
|
||||
scriptTypeName: "10%Un对频率=50.05Hz的影响",
|
||||
sourceDesc: "10%Un对频率=50.05Hz的影响",
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: 1,
|
||||
children: null
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
scriptTypeName: "谐波对频率测量的影响",
|
||||
sourceDesc: null,
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: null,
|
||||
children: [
|
||||
{
|
||||
scriptTypeName: "叠加多次谐波对频率=50.05Hz的影响",
|
||||
sourceDesc: "叠加多次谐波对频率=50.05Hz的影响",
|
||||
harmNum: null,
|
||||
index: null,
|
||||
fly: 1,
|
||||
children: null
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -285,6 +479,7 @@ const defaultOperate = () => {
|
||||
const updateTableData = async () => {
|
||||
console.log("左侧树被选中的叶子节点checkIndex", checkIndex.value);
|
||||
if (checkIndex.value) {
|
||||
console.log("更新表格数据");
|
||||
// 发起请求,查询该测试项的检测结果
|
||||
// const result = await getTableData({checkStore.scriptId,deviceId, formContent.chnNum, scriptType,checkIndex})
|
||||
|
||||
@@ -560,9 +755,9 @@ const filterTree = (treeData: any[], fly: number): any[] => {
|
||||
}
|
||||
|
||||
const filter = (treeData: any[], fly: number) => {
|
||||
for (let i = 0; i < treeData.length; i++) {
|
||||
for (let i = treeData.length - 1; i >= 0; i--) {
|
||||
let node = treeData[i]
|
||||
if (node && node.fly !== fly) {
|
||||
if (node.fly !== fly) {
|
||||
if (node.children && node.children.length > 0) {
|
||||
filter(node.children, fly)
|
||||
// 检查 children 是否被全部移除
|
||||
@@ -601,6 +796,7 @@ defineExpose({
|
||||
}
|
||||
|
||||
.data-check-body {
|
||||
height:500px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -636,10 +832,13 @@ defineExpose({
|
||||
flex: 1;
|
||||
|
||||
.content-right-title {
|
||||
/*margin-bottom: 10px;*/
|
||||
.el-divider--horizontal{
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
div {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -253,22 +253,22 @@ const detectionOptions = ref([
|
||||
// break;
|
||||
case 2:
|
||||
if (TestStatus.value == "waiting") {
|
||||
startPreTest({
|
||||
userPageId: "cdf",
|
||||
devIds:deviceIds,
|
||||
planId:planId,
|
||||
errorSysId:'cb407009f9894a8a8933b5d9b1e2f71d',
|
||||
scriptId:"a303b2224845fcc6f60198b8ca23dca9",
|
||||
operateType:'1' // '0'为预检测、‘1‘为正式检测
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
// startPreTest({
|
||||
// userPageId: "cdf",
|
||||
// devIds:deviceIds,
|
||||
// planId:planId,
|
||||
// errorSysId:'cb407009f9894a8a8933b5d9b1e2f71d',
|
||||
// scriptId:"a303b2224845fcc6f60198b8ca23dca9",
|
||||
// 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') {
|
||||
// 发送暂停指令
|
||||
|
||||
Reference in New Issue
Block a user