This commit is contained in:
caozehui
2025-03-08 16:01:41 +08:00
parent 70531a0729
commit 6cf5da5d48
5 changed files with 67 additions and 42 deletions

View File

@@ -75,7 +75,7 @@ const formContent = ref<TestScript.ResTestScript>({
state: 1
})
const connectDisabeld = ref(false)
const startDisabeld = ref(false)
const startDisabeld = ref(true)
const pauseDisabled = ref(true)
const controlContent = ref<controlSource.ResControl>({
@@ -179,9 +179,13 @@ watch(webMsgSend, function (newValue, oldValue) {
case 'INIT_GATHER':
if (newValue.code == 10200) {
ElMessage.success('源连接成功!')
startDisabeld.value = false
pauseDisabled.value = false
} else if(newValue.code !== 10201) {
ElMessage.error('源连接失败!')
console.log('错误信息:',webMsgSend)
startDisabeld.value = true
pauseDisabled.value = true
}
break;
}

View File

@@ -6,9 +6,9 @@
:pagination="false"
:toolButton="false"
:data="tableData"
:row-key="id"
row-key="id"
:style="{ height: '250px',maxHeight: '400px',overflow:'hidden'}"
:expand-row-keys="['0']"
>
<!-- 表格 header 按钮 -->
<template #tableHeader='scope'>
@@ -70,6 +70,28 @@ watch(() => props.parameterStr, (newData) => {
}
})
const defaultExpandRowKeys =computed(() => {
return '548c00d2e4744c38aee938cb08e2ff3b'
})
const getDefaultKey = (data: any[]) => {
if (!data || data.length === 0) {
return [];
}
const firstElement = data[0];
return findFirstLeafNode(firstElement);
}
const findFirstLeafNode = (node: any): any => {
if (!node.children || node.children.length === 0) {
return node.id;
}
return findFirstLeafNode(node.children[0]);
}
const getTableList = () => {
if (props.parameterStr) {
originalParameterArr = JSON.parse(props.parameterStr)