Files
pqs-9100_client/frontend/src/views/home/components/dataCheckPopup.vue

173 lines
5.5 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<el-dialog title="数据查询" :model-value='visible' @close="handleCancel" v-bind="dialogBig">
<div class="data-check-dialog">
<div class="data-check-title">
<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>
<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>
</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
style="--el-switch-on-color: #13ce66; --el-switch-off-color: #ff4949"
active-text="仅显示不合格测试项"
inactive-text="显示全部测试项"
/>
</div>
<div>
<el-tree
default-expand-all
: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">
<el-tabs type="border-card">
<el-tab-pane label="检测结果">
<DataCheckResultTable></DataCheckResultTable>
</el-tab-pane>
<el-tab-pane label="原始数据">
<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'
const deviceName = ref('被检设备1');
const monitorIdx = ref('1');
const testScriptName = ref('Q/GDW 10650.4-2021 模拟式');
const errorSysName = ref('Q/GDW 10650.2-2021');
const dataRule = ref('所有值');
const scriptSwitch = ref(true);
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",
};
const monitorIdxList = [
{
value: '1',
},
{
value: '2',
},
{
value: '3',
},
{
value: '4',
},
]
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;
}
.data-check-title{
display: flex;
flex-direction: row;
margin-top: 10px;
}
.data-check-content{
display: flex;
flex-direction: row;
}
.content-left-tree{
width: 20%;
}
.content-left-tree-switch{
text-align: right;
margin-right: 10px;
}
.content-right{
margin-left: 20px;
}
.content-right-Tabs{
margin-top: 15px;
}
</style>