This commit is contained in:
caozehui
2024-12-23 13:23:28 +08:00
parent 0a4385f29b
commit fd21d32f4a
6 changed files with 50 additions and 43 deletions

View File

@@ -34,7 +34,7 @@
</el-radio-group>
</div>
<div class="content-tree">
<el-tree :default-expanded-keys="['0', '0-1', '0-2', '0-3', '1']" node-key="id" :data="treeData"
<el-tree :default-expanded-keys="['0', '0-2']" node-key="id" :data="treeData"
:props="defaultProps" @node-click="handleNodeClick"/>
</div>
</div>
@@ -65,7 +65,7 @@ import {dialogBig} from '@/utils/elementBind'
import {reactive, ref} from 'vue'
import DataCheckResultTable from './dataCheckResultTable.vue'
import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
import type {CheckResult, DataCheck, RawDataItem} from "@/api/check/interface";
import {CheckData} from "@/api/check/interface";
import {data as treeData} from "@/api/plan/autoTest.json";
const {appendToBody} = withDefaults(defineProps<{
@@ -73,7 +73,7 @@ const {appendToBody} = withDefaults(defineProps<{
}>(), {appendToBody: false})
const formContent = reactive<DataCheck>({
const formContent = reactive<CheckData.DataCheck>({
testScriptName: 'Q/GDW 10650.4-2021 模拟式',
errorSysName: 'Q/GDW 10650.2-2021',
dataRule: '所有值',
@@ -128,7 +128,7 @@ const handleNodeClick = (data: any) => {
console.log(data);
};
const checkResultTableData = reactive<CheckResult[]>([
const checkResultTableData = reactive<CheckData.CheckResult[]>([
{
chnNum: '1',
standardValue: 57.74,
@@ -143,7 +143,7 @@ const checkResultTableData = reactive<CheckResult[]>([
}
])
const rawTableData = reactive<RawDataItem[]>([
const rawTableData = reactive<CheckData.RawDataItem[]>([
{
updateTime: "2024-10-10 09:30:00",
L1: 57.73,
@@ -279,9 +279,10 @@ const close = () => {
visible.value = false;
};
const open = (deviceItem: any, chnNum?: number) => {
const open = (checkItemId: string, deviceId: string, chnNum?: number) => {
console.log(checkItemId, deviceId, chnNum);
// 发起后端请求,查询详细信息
// const deviceItem = await getDetail(planId,checkItemId,deviceItem.id, chnNum)
//const result = await getCheckItemDetail({checkItemId,deviceId, chnNum})
// 数据处理
// checkResultTableData=[];
@@ -302,7 +303,7 @@ defineExpose({
flex-direction: column;
overflow-y: hidden;
overflow-x: hidden;
width: 100%;
.data-check-dialog {
display: flex;
@@ -315,30 +316,30 @@ defineExpose({
}
.data-check-body {
width: 100%;
display: flex;
flex-direction: row;
width: 100%;
.content-left-tree {
width: 25%;
display: flex;
flex-direction: column;
align-items: center;
max-height: 473px;
padding: 10px 0;
border: 1px solid #ccc;
overflow: auto;
.content-tree {
width: 250px;
max-width: 250px;
height: 450px;
max-height: 450px;
overflow-x: auto;
overflow-y: auto;
min-width: 100%;
height: 100%;
max-height: 100%;
margin-top: 10px;
}
}
.content-right {
width: 75%;
margin-left: 10px;
flex: 1;
@@ -360,4 +361,5 @@ defineExpose({
}
}
}
</style>