2024-11-19 19:34:00 +08:00
|
|
|
|
<template>
|
2024-12-05 18:14:43 +08:00
|
|
|
|
<el-dialog title="数据查询" :model-value='visible' @close="handleCancel" width="1065px" draggable>
|
2024-11-19 19:34:00 +08:00
|
|
|
|
<div class="data-check-dialog">
|
|
|
|
|
|
<div class="data-check-title">
|
2024-12-05 15:22:46 +08:00
|
|
|
|
<el-form :model='formContent' label-width="auto" class="form-three ">
|
2024-12-05 18:14:43 +08:00
|
|
|
|
<el-form-item label="检测脚本">
|
|
|
|
|
|
<el-input v-model='testScriptName' :disabled="true" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="误差体系">
|
|
|
|
|
|
<el-input v-model='errorSysName' :disabled="true" />
|
|
|
|
|
|
</el-form-item>
|
2024-12-06 09:21:55 +08:00
|
|
|
|
<el-form-item label="数据原则">
|
2024-12-05 18:14:43 +08:00
|
|
|
|
<el-input v-model='dataRule' :disabled="true" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="设备名称">
|
|
|
|
|
|
<el-input v-model='deviceName' :disabled="true" />
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- <el-col :span="8">
|
2024-11-25 21:11:10 +08:00
|
|
|
|
<el-form-item label='复检次数:'>
|
|
|
|
|
|
<el-select v-model="reCheckIdx">
|
|
|
|
|
|
<el-option
|
|
|
|
|
|
v-for="item in reCheckList"
|
|
|
|
|
|
:key="item.value"
|
|
|
|
|
|
:label="item.value"
|
|
|
|
|
|
:value="item.value"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-12-03 17:13:47 +08:00
|
|
|
|
</el-col> -->
|
2024-12-05 18:14:43 +08:00
|
|
|
|
<el-form-item label='通道号'>
|
|
|
|
|
|
<el-select v-model="monitorIdx">
|
|
|
|
|
|
<el-option v-for="item in monitorIdxList" :key="item.value" :label="item.value"
|
|
|
|
|
|
:value="item.value" />
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
</el-form-item>
|
2024-11-21 23:02:43 +08:00
|
|
|
|
</el-form>
|
2024-11-19 19:34:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="data-check-content">
|
|
|
|
|
|
<div class="content-left-tree">
|
|
|
|
|
|
<div class="content-left-tree-switch">
|
2024-12-05 18:14:43 +08:00
|
|
|
|
<!-- <el-switch
|
2024-11-19 19:34:00 +08:00
|
|
|
|
v-model="scriptSwitch"
|
|
|
|
|
|
class="ml-2"
|
|
|
|
|
|
inline-prompt
|
2025-03-17 15:55:30 +08:00
|
|
|
|
style="--el-switch-on-color: var(--el-color-primary); --el-switch-off-color: #5a79a9"
|
2024-11-22 10:46:10 +08:00
|
|
|
|
active-text="不合格测试项"
|
|
|
|
|
|
inactive-text="全部测试项"
|
2024-12-05 18:14:43 +08:00
|
|
|
|
/> -->
|
|
|
|
|
|
<el-radio-group v-model="scriptSwitch">
|
|
|
|
|
|
<el-radio-button label="不合格测试项" value="0" />
|
|
|
|
|
|
<el-radio-button label="全部测试项" value="1" />
|
|
|
|
|
|
|
|
|
|
|
|
</el-radio-group>
|
2024-11-19 19:34:00 +08:00
|
|
|
|
</div>
|
2024-12-05 18:14:43 +08:00
|
|
|
|
<div class="content-tree">
|
|
|
|
|
|
<el-tree :default-expanded-keys="['0', '0-1', '0-2', '0-3', '1']" node-key="id" :data="data"
|
|
|
|
|
|
:props="defaultProps" @node-click="handleNodeClick" />
|
2024-11-19 19:34:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="content-right">
|
|
|
|
|
|
<div class="content-right-title">
|
2024-12-05 18:14:43 +08:00
|
|
|
|
<!-- <el-divider>当前检测项目:</el-divider> -->
|
|
|
|
|
|
<div>
|
|
|
|
|
|
当前检测项目
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<span>{{ currentScriptDsc }}</span>
|
2024-11-19 19:34:00 +08:00
|
|
|
|
</div>
|
|
|
|
|
|
<div class="content-right-Tabs">
|
2024-11-21 23:02:43 +08:00
|
|
|
|
<el-tabs type="border-card" v-model="activeName">
|
|
|
|
|
|
<el-tab-pane label="检测结果" name="resultTab">
|
2024-11-19 19:34:00 +08:00
|
|
|
|
<DataCheckResultTable></DataCheckResultTable>
|
|
|
|
|
|
</el-tab-pane>
|
2024-11-21 23:02:43 +08:00
|
|
|
|
<el-tab-pane label="原始数据" name="rawDataTab">
|
2024-11-19 19:34:00 +08:00
|
|
|
|
<DataCheckRawDataTable></DataCheckRawDataTable>
|
|
|
|
|
|
</el-tab-pane>
|
|
|
|
|
|
</el-tabs>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
<script setup lang='ts'>
|
|
|
|
|
|
|
|
|
|
|
|
import IPAddress from '@/components/IpAddress/index.vue'
|
|
|
|
|
|
import { dialogBig } from '@/utils/elementBind'
|
|
|
|
|
|
import { type Device } from '@/api/device/interface/device'
|
|
|
|
|
|
import { ElMessage, type FormItemRule } from 'element-plus'
|
|
|
|
|
|
import { addPqDev, updatePqDev } from '@/api/device/device'
|
|
|
|
|
|
import { computed, reactive, type Ref, ref } from 'vue'
|
|
|
|
|
|
import { useDictStore } from '@/stores/modules/dict'
|
|
|
|
|
|
import { CirclePlus, Delete, EditPen } from '@element-plus/icons-vue'
|
|
|
|
|
|
// 使用 dayjs 库格式化
|
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
|
import { getPqMonList } from '@/api/device/monitor'
|
|
|
|
|
|
import { type ColumnProps } from '@/components/ProTable/interface'
|
|
|
|
|
|
import { type Monitor } from '@/api/device/interface/monitor'
|
|
|
|
|
|
import { data } from "@/api/plan/autoTest.json";
|
|
|
|
|
|
import DataCheckResultTable from './dataCheckResultTable.vue'
|
|
|
|
|
|
import DataCheckRawDataTable from './dataCheckRawDataTable.vue'
|
2024-12-05 18:14:43 +08:00
|
|
|
|
const formContent = ref({})
|
2024-11-21 23:02:43 +08:00
|
|
|
|
const activeName = ref('rawDataTab')
|
2024-12-06 09:21:55 +08:00
|
|
|
|
const deviceName = ref('240001');
|
2024-12-05 18:14:43 +08:00
|
|
|
|
const monitorIdx = ref('1');
|
|
|
|
|
|
const reCheckIdx = ref('3');
|
|
|
|
|
|
const testScriptName = ref('Q/GDW 10650.4-2021 模拟式');
|
|
|
|
|
|
const errorSysName = ref('Q/GDW 10650.2-2021');
|
|
|
|
|
|
const dataRule = ref('所有值');
|
|
|
|
|
|
const scriptSwitch = ref("0");
|
|
|
|
|
|
const currentScriptDsc = ref('电压准确度检测:频率:42.5Hz Ua=46.192V 0° Ub=46.192V -120° Uc=46.192V 120° Ia=1A 0° Ib=1A -120° Ic=1A 120°');
|
|
|
|
|
|
const defaultProps = {
|
|
|
|
|
|
children: "children",
|
|
|
|
|
|
label: "name",
|
|
|
|
|
|
pid: "pid",
|
2024-11-19 19:34:00 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2024-11-25 21:11:10 +08:00
|
|
|
|
const reCheckList = [
|
2024-12-05 18:14:43 +08:00
|
|
|
|
{
|
|
|
|
|
|
value: '0',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '1',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '2',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '3',
|
|
|
|
|
|
},
|
2024-11-25 21:11:10 +08:00
|
|
|
|
]
|
2024-11-19 19:34:00 +08:00
|
|
|
|
const monitorIdxList = [
|
2024-12-05 18:14:43 +08:00
|
|
|
|
{
|
|
|
|
|
|
value: '1',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '2 (不合格)',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '3',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '4 (不合格)',
|
|
|
|
|
|
},
|
2024-11-19 19:34:00 +08:00
|
|
|
|
]
|
|
|
|
|
|
const handleNodeClick = (data) => {
|
2025-01-13 22:42:14 +08:00
|
|
|
|
// console.log(data);
|
2024-11-19 19:34:00 +08:00
|
|
|
|
};
|
|
|
|
|
|
const MonIsShow = ref(false)
|
|
|
|
|
|
const DevIsShow = ref(false)
|
|
|
|
|
|
const IsPasswordShow = ref(false)
|
|
|
|
|
|
const dictStore = useDictStore()
|
|
|
|
|
|
// 定义弹出组件元信息
|
|
|
|
|
|
const dialogFormRef = ref()
|
|
|
|
|
|
const disabledDate = (time: Date) => {
|
2024-12-05 18:14:43 +08:00
|
|
|
|
return time.getTime() > Date.now()
|
2024-11-19 19:34:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
|
visible: boolean;
|
2024-12-05 18:14:43 +08:00
|
|
|
|
}>();
|
2024-11-19 19:34:00 +08:00
|
|
|
|
|
2024-12-05 18:14:43 +08:00
|
|
|
|
const emit = defineEmits<{
|
2024-11-19 19:34:00 +08:00
|
|
|
|
(e: 'update:visible', value: boolean): void;
|
|
|
|
|
|
(e: 'submit', data: any): void;
|
2024-12-05 18:14:43 +08:00
|
|
|
|
}>();
|
2024-11-19 19:34:00 +08:00
|
|
|
|
|
2024-12-05 18:14:43 +08:00
|
|
|
|
const handleCancel = () => {
|
2024-11-19 19:34:00 +08:00
|
|
|
|
emit('update:visible', false); // 关闭对话框
|
2024-12-05 18:14:43 +08:00
|
|
|
|
};
|
2024-11-19 19:34:00 +08:00
|
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
2024-12-05 18:14:43 +08:00
|
|
|
|
.data-check-dialog {
|
2024-11-19 19:34:00 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2024-11-25 21:11:10 +08:00
|
|
|
|
max-height: 580px;
|
2024-11-19 19:34:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-05 18:14:43 +08:00
|
|
|
|
.data-check-title {
|
2024-11-19 19:34:00 +08:00
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-05 18:14:43 +08:00
|
|
|
|
.data-check-content {
|
2024-11-19 19:34:00 +08:00
|
|
|
|
display: flex;
|
2024-12-05 18:14:43 +08:00
|
|
|
|
/* flex-direction: row; */
|
2024-11-19 19:34:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-12-05 18:14:43 +08:00
|
|
|
|
.content-left-tree {
|
|
|
|
|
|
width: 240px;
|
|
|
|
|
|
max-height: 445px;
|
|
|
|
|
|
/* overflow-y: auto; */
|
|
|
|
|
|
padding: 10px 0;
|
|
|
|
|
|
border: 1px solid #ccc;
|
2024-11-25 21:11:10 +08:00
|
|
|
|
/* background-color: gray; */
|
2024-11-19 19:34:00 +08:00
|
|
|
|
}
|
2024-12-05 18:14:43 +08:00
|
|
|
|
|
|
|
|
|
|
.content-tree {
|
|
|
|
|
|
max-height: 405px;
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.content-left-tree-switch {
|
2024-11-19 19:34:00 +08:00
|
|
|
|
text-align: right;
|
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
|
}
|
2024-12-05 18:14:43 +08:00
|
|
|
|
|
|
|
|
|
|
.content-right {
|
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
|
flex: 1;
|
2024-11-19 19:34:00 +08:00
|
|
|
|
}
|
2024-12-05 18:14:43 +08:00
|
|
|
|
|
|
|
|
|
|
.content-right-Tabs {
|
2024-11-19 19:34:00 +08:00
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
}
|
2024-12-05 18:14:43 +08:00
|
|
|
|
|
|
|
|
|
|
:deep(.el-divider--horizontal) {
|
|
|
|
|
|
margin: 15px 0;
|
|
|
|
|
|
}
|
|
|
|
|
|
.content-right-title{
|
|
|
|
|
|
div{
|
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2024-11-19 19:34:00 +08:00
|
|
|
|
</style>
|