2024-11-19 19:34:00 +08:00
|
|
|
|
<template>
|
2024-11-25 21:11:10 +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-11-21 23:02: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>
|
|
|
|
|
|
<el-form-item label="数据处理原则:" >
|
|
|
|
|
|
<el-input v-model='dataRule' :disabled="true"/>
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="设备名称:" >
|
|
|
|
|
|
<el-input v-model='deviceName' :disabled="true"/>
|
|
|
|
|
|
</el-form-item>
|
2024-12-05 15:22:46 +08:00
|
|
|
|
|
2024-12-03 17:13:47 +08:00
|
|
|
|
<!-- <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-11-21 23:02:43 +08:00
|
|
|
|
<el-form-item label='通道号:'>
|
2024-11-25 21:11:10 +08:00
|
|
|
|
<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">
|
|
|
|
|
|
<el-switch
|
|
|
|
|
|
v-model="scriptSwitch"
|
|
|
|
|
|
class="ml-2"
|
|
|
|
|
|
inline-prompt
|
2024-11-21 23:02:43 +08:00
|
|
|
|
style="--el-switch-on-color: #003078; --el-switch-off-color: #5a79a9"
|
2024-11-22 10:46:10 +08:00
|
|
|
|
active-text="不合格测试项"
|
|
|
|
|
|
inactive-text="全部测试项"
|
2024-11-19 19:34:00 +08:00
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div>
|
|
|
|
|
|
<el-tree
|
2024-11-22 10:46:10 +08:00
|
|
|
|
:default-expanded-keys="['0','0-1','0-2','0-3','1']"
|
2024-11-21 23:02:43 +08:00
|
|
|
|
node-key="id"
|
2024-11-19 19:34:00 +08:00
|
|
|
|
:data="data"
|
|
|
|
|
|
:props="defaultProps"
|
|
|
|
|
|
@node-click="handleNodeClick"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="content-right">
|
|
|
|
|
|
<div class="content-right-title">
|
|
|
|
|
|
<el-divider >当前检测项目:</el-divider>
|
|
|
|
|
|
<span>{{currentScriptDsc}}</span>
|
|
|
|
|
|
</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-11-21 23:02:43 +08:00
|
|
|
|
|
|
|
|
|
|
const activeName = ref('rawDataTab')
|
2024-11-19 19:34:00 +08:00
|
|
|
|
const deviceName = ref('被检设备1');
|
|
|
|
|
|
const monitorIdx = ref('1');
|
2024-11-25 21:11:10 +08:00
|
|
|
|
const reCheckIdx = ref('3');
|
2024-11-19 19:34:00 +08:00
|
|
|
|
const testScriptName = ref('Q/GDW 10650.4-2021 模拟式');
|
|
|
|
|
|
const errorSysName = ref('Q/GDW 10650.2-2021');
|
|
|
|
|
|
const dataRule = ref('所有值');
|
|
|
|
|
|
const scriptSwitch = ref(true);
|
2024-12-03 17:13:47 +08:00
|
|
|
|
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°');
|
2024-11-19 19:34:00 +08:00
|
|
|
|
const defaultProps = {
|
|
|
|
|
|
children: "children",
|
|
|
|
|
|
label: "name",
|
|
|
|
|
|
pid: "pid",
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2024-11-25 21:11:10 +08:00
|
|
|
|
const reCheckList = [
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '0',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '1',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '2',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '3',
|
|
|
|
|
|
},
|
|
|
|
|
|
]
|
2024-11-19 19:34:00 +08:00
|
|
|
|
const monitorIdxList = [
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '1',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2024-11-22 11:45:33 +08:00
|
|
|
|
value: '2 (不合格)',
|
2024-11-19 19:34:00 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
value: '3',
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2024-11-22 11:45:33 +08:00
|
|
|
|
value: '4 (不合格)',
|
2024-11-19 19:34:00 +08:00
|
|
|
|
},
|
|
|
|
|
|
]
|
|
|
|
|
|
const handleNodeClick = (data) => {
|
|
|
|
|
|
console.log(data);
|
|
|
|
|
|
};
|
|
|
|
|
|
const MonIsShow = ref(false)
|
|
|
|
|
|
const DevIsShow = ref(false)
|
|
|
|
|
|
const IsPasswordShow = ref(false)
|
|
|
|
|
|
const dictStore = useDictStore()
|
|
|
|
|
|
// 定义弹出组件元信息
|
|
|
|
|
|
const dialogFormRef = ref()
|
|
|
|
|
|
const disabledDate = (time: Date) => {
|
|
|
|
|
|
return time.getTime() > Date.now()
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
|
visible: boolean;
|
|
|
|
|
|
}>();
|
|
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits<{
|
|
|
|
|
|
(e: 'update:visible', value: boolean): void;
|
|
|
|
|
|
(e: 'submit', data: any): void;
|
|
|
|
|
|
}>();
|
|
|
|
|
|
|
|
|
|
|
|
const handleCancel = () => {
|
|
|
|
|
|
emit('update:visible', false); // 关闭对话框
|
|
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
|
|
|
|
|
|
.data-check-dialog{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
2024-11-25 21:11:10 +08:00
|
|
|
|
max-height: 580px;
|
2024-11-19 19:34:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.data-check-title{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
margin-top: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.data-check-content{
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.content-left-tree{
|
|
|
|
|
|
width: 20%;
|
2024-11-25 21:11:10 +08:00
|
|
|
|
max-height: 475px;
|
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
|
/* background-color: gray; */
|
2024-11-19 19:34:00 +08:00
|
|
|
|
}
|
|
|
|
|
|
.content-left-tree-switch{
|
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.content-right{
|
|
|
|
|
|
margin-left: 20px;
|
|
|
|
|
|
}
|
|
|
|
|
|
.content-right-Tabs{
|
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|