This commit is contained in:
caozehui
2024-12-18 20:26:18 +08:00
parent 4fd2f10ec6
commit ebc2ac1a41
2 changed files with 66 additions and 42 deletions

View File

@@ -1,5 +1,6 @@
<template> <template>
<el-dialog title="数据查询" :model-value='visible' @close="close" v-bind="dialogBig" draggable style="height: 100%;"> <el-dialog :append-to-body="appendToBody" class="dialog" title="数据查询" :model-value='visible' @close="close"
v-bind="dialogBig" :draggable="false" style="margin-left: 20%;">
<div class="data-check-dialog"> <div class="data-check-dialog">
<div class="data-check-head"> <div class="data-check-head">
<el-form :model='formContent' label-width="auto" class="form-three "> <el-form :model='formContent' label-width="auto" class="form-three ">
@@ -26,7 +27,7 @@
<div class="data-check-body"> <div class="data-check-body">
<div class="content-left-tree"> <div class="content-left-tree">
<div class="content-left-tree-switch"> <div>
<el-radio-group v-model="scriptSwitch"> <el-radio-group v-model="scriptSwitch">
<el-radio-button label="不合格测试项" value="0"/> <el-radio-button label="不合格测试项" value="0"/>
<el-radio-button label="全部测试项" value="1"/> <el-radio-button label="全部测试项" value="1"/>
@@ -67,6 +68,11 @@ import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
import type {CheckResult, DataCheck, RawData} from "@/api/check/interface"; import type {CheckResult, DataCheck, RawData} from "@/api/check/interface";
import {data as treeData} from "@/api/plan/autoTest.json"; import {data as treeData} from "@/api/plan/autoTest.json";
const {appendToBody} = defineProps<{
appendToBody:boolean
}>()
const formContent = reactive<DataCheck>({ const formContent = reactive<DataCheck>({
testScriptName: 'Q/GDW 10650.4-2021 模拟式', testScriptName: 'Q/GDW 10650.4-2021 模拟式',
errorSysName: 'Q/GDW 10650.2-2021', errorSysName: 'Q/GDW 10650.2-2021',
@@ -104,7 +110,7 @@ const monitorIdxList = [
// 点击左侧树节点触发事件 // 点击左侧树节点触发事件
const handleNodeClick = (data) => { const handleNodeClick = (data: any) => {
console.log(data); console.log(data);
}; };
@@ -545,15 +551,21 @@ defineExpose({
<style lang="scss" scoped> <style lang="scss" scoped>
.data-check-dialog { .dialog {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow-y: hidden;
overflow-x: hidden;
width: 100%; width: 100%;
.data-check-dialog {
display: flex;
flex-direction: column;
.data-check-head { .data-check-head {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
margin-top: 10px; width: 100%;
} }
.data-check-body { .data-check-body {
@@ -562,14 +574,21 @@ defineExpose({
width: 100%; width: 100%;
.content-left-tree { .content-left-tree {
width: 240px; display: flex;
max-height: 445px; flex-direction: column;
align-items: center;
padding: 10px 0; padding: 10px 0;
border: 1px solid #ccc; border: 1px solid #ccc;
.content-left-tree-switch { .content-tree {
text-align: right; width: 250px;
margin-right: 10px; max-width: 250px;
height: 450px;
max-height: 450px;
overflow-x: auto;
overflow-y: auto;
margin-top: 10px;
} }
} }
@@ -594,5 +613,6 @@ defineExpose({
} }
} }
}
} }
</style> </style>

View File

@@ -1,5 +1,5 @@
<template> <template>
<div class="dialog"> <div class="dialog" v-bind="dialogBig">
<div class="dialog-title"> <div class="dialog-title">
<el-progress <el-progress
style="width: 90%" style="width: 90%"
@@ -39,7 +39,7 @@
<!-- v-on:cell-click="handleClick" --> <!-- v-on:cell-click="handleClick" -->
<!-- <el-table :key="tableKey" :data="tableData" :row-class-name="tableRowClassName" row-key="id" height="545px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border> --> <!-- <el-table :key="tableKey" :data="tableData" :row-class-name="tableRowClassName" row-key="id" height="545px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border> -->
<!-- <el-table :data="tableData" :row-class-name="tableRowClassName" row-key="id" height="545px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%" border> --> <!-- <el-table :data="tableData" :row-class-name="tableRowClassName" row-key="id" height="545px" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%" border> -->
<div class="dialog-content "> <div class="dialog-content">
<el-table :data="tableData" :cell-class-name="tableCell" row-key="id" height="450px" <el-table :data="tableData" :cell-class-name="tableCell" row-key="id" height="450px"
:header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%" :header-cell-style="{ background: '#003078', color: '#eee', textAlign: 'center' } " style="width: 100%"
border> border>
@@ -123,7 +123,7 @@
:visible="resultDialogVisible" :visible="resultDialogVisible"
@update:visible="resultDialogVisible = $event" @update:visible="resultDialogVisible = $event"
></resultPopup> ></resultPopup>
<dataCheckSingleChannelSingleTestPopup ref="dialogRef1"/> <dataCheckSingleChannelSingleTestPopup :append-to-body="true" ref="dialogRef1"/>
</template> </template>
<script lang="tsx" setup name="test"> <script lang="tsx" setup name="test">
@@ -131,6 +131,7 @@ import {Check, Refresh, VideoPause} from '@element-plus/icons-vue'
import resultPopup from './resultPopup.vue' import resultPopup from './resultPopup.vue'
import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue' import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue'
import {reactive} from "vue"; import {reactive} from "vue";
import {dialogBig} from "@/utils/elementBind";
const minwidth = ref(110) const minwidth = ref(110)
const activeIndex = ref(0) const activeIndex = ref(0)
@@ -2047,6 +2048,8 @@ watch(ts, function (newValue, oldValue) {
.dialog { .dialog {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow-y: hidden;
overflow-x: hidden;
} }
.dialog-title { .dialog-title {
@@ -2059,7 +2062,7 @@ watch(ts, function (newValue, oldValue) {
.dialog-content { .dialog-content {
max-height: 450px; max-height: 450px;
overflow-y: auto; overflow-y: hidden;
} }
:deep(.el-collapse-item__header) { :deep(.el-collapse-item__header) {
@@ -2068,7 +2071,7 @@ watch(ts, function (newValue, oldValue) {
.dialog-log { .dialog-log {
height: 50px; height: 50px;
overflow-y: auto; overflow-y: hidden;
// flex-grow: 1; // flex-grow: 1;
// display: flex; // display: flex;
// flex-direction: column-reverse; // flex-direction: column-reverse;
@@ -2080,6 +2083,7 @@ watch(ts, function (newValue, oldValue) {
} }
</style> </style>
<style lang="scss" scoped> <style lang="scss" scoped>
:deep(.el-button--small) { :deep(.el-button--small) {
height: 20px !important; height: 20px !important;