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