数据查询、报告生成流程界面框架绘制
This commit is contained in:
@@ -0,0 +1,160 @@
|
||||
<template>
|
||||
<el-dialog title="数据查询" :model-value='visible' @close="handleCancel" v-bind="dialogBig">
|
||||
<div class="change-errsys-dialog">
|
||||
<div class="change-errsys-title">
|
||||
<el-form-item label="设备名称:" >
|
||||
<el-input v-model='deviceName' :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检测脚本:" >
|
||||
<el-input v-model='testScriptName' :disabled="true"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据处理原则" >
|
||||
<el-input v-model='dataRule' :disabled="true"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="误差体系">
|
||||
<el-select v-model="error_Sys_Id" autocomplete="off">
|
||||
<el-option
|
||||
v-for="plan in testErrSystDataList"
|
||||
:key="plan.id"
|
||||
:label="plan.label"
|
||||
:value="plan.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-button type="primary" :icon="VideoPlay">数据计算</el-button>
|
||||
<el-button type="primary" :icon="Postcard" @click="openReportDlg">报告生成</el-button>
|
||||
</div>
|
||||
<div class="change-errsys-content">
|
||||
<div class="tabs-title"><el-button type="primary" loading >合格92项/共103项</el-button> </div>
|
||||
<el-table :data="testData" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border>
|
||||
<el-table-column fixed prop="deviceName" label="检测项目" />
|
||||
<el-table-column prop="updataTime" label="被检通道1" />
|
||||
<el-table-column prop="ErrorValue" label="被检通道2" />
|
||||
<el-table-column prop="Result" label="被检通道3" />
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
<ReportPopup :visible="reportDialogVisible" @update:visible="reportDialogVisible = $event"></ReportPopup>
|
||||
</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,Postcard, VideoPlay} 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'
|
||||
import {dictPattern,dictTestState,dictReportState,dictResult,testPlanDataList,sourceDataList,deviceDataList,testSoureDataList,testScriptDataList,testErrSystDataList,planData,testFatherPlanList} from '@/api/plan/planData'
|
||||
import ReportPopup from './reportPopup.vue'
|
||||
|
||||
const reportDialogVisible = ref(false)
|
||||
const deviceName = ref('被检设备1');
|
||||
const error_Sys_Id = ref('2');
|
||||
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 testData = ref([
|
||||
{
|
||||
deviceName: '额定条件下频率检测42.5Hz',
|
||||
updataTime: '√',
|
||||
ErrorValue:'×',
|
||||
Result: '/',
|
||||
},
|
||||
{
|
||||
deviceName: '额定条件下频率检测50Hz',
|
||||
updataTime: '/',
|
||||
ErrorValue:'√',
|
||||
Result: '×',
|
||||
},
|
||||
{
|
||||
deviceName: '额定条件下频率检测50.05Hz',
|
||||
updataTime: '—',
|
||||
ErrorValue:'—',
|
||||
Result: '—',
|
||||
},
|
||||
{
|
||||
deviceName: '额定条件下频率检测57.5Hz',
|
||||
updataTime: '—',
|
||||
ErrorValue:'—',
|
||||
Result: '—',
|
||||
},
|
||||
])
|
||||
|
||||
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); // 关闭对话框
|
||||
};
|
||||
|
||||
const openReportDlg = () => {
|
||||
reportDialogVisible.value = true
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
|
||||
.change-errsys-dialog{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.change-errsys-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.change-errsys-content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.tabs-title{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
</style>
|
||||
173
frontend/src/views/home/components/dataCheckPopup.vue
Normal file
173
frontend/src/views/home/components/dataCheckPopup.vue
Normal file
@@ -0,0 +1,173 @@
|
||||
<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>
|
||||
133
frontend/src/views/home/components/dataCheckRawDataTable.vue
Normal file
133
frontend/src/views/home/components/dataCheckRawDataTable.vue
Normal file
@@ -0,0 +1,133 @@
|
||||
<template>
|
||||
|
||||
<div class="table-container">
|
||||
<el-table :data="tableData" stripe height="300" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" >
|
||||
|
||||
<el-table-column prop="id" label="序号" width="70" />
|
||||
<el-table-column prop="updateTime" label="数据时间" />
|
||||
<el-table-column prop="L1" label="L1" />
|
||||
<el-table-column prop="L2" label="L2" />
|
||||
<el-table-column prop="L3" label="L3" />
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="tsx" setup>
|
||||
import{ElMessage, FormInstance,FormItemRule}from'element-plus'
|
||||
import { defineProps, defineEmits, reactive,watch,ref, Ref } from 'vue';
|
||||
import { dialogBig,dialogMiddle} from '@/utils/elementBind'
|
||||
//import IndicatorTypeDialog from "@/views/machine/errorSystem/components/IndicatorTypeDialog.vue"; // 导入子组件
|
||||
import {CirclePlus, Delete, EditPen,FolderOpened,CopyDocument} from '@element-plus/icons-vue'
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
const tableData = ref([
|
||||
{
|
||||
id: 1,
|
||||
updateTime: "2024-10-10 09:30:00",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
updateTime: "2024-10-10 09:30:03",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
updateTime: "2024-10-10 09:30:06",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
updateTime: "2024-10-10 09:30:09",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
updateTime: "2024-10-10 09:30:12",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
updateTime: "2024-10-10 09:30:15",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 7,
|
||||
updateTime: "2024-10-10 09:30:18",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 8,
|
||||
updateTime: "2024-10-10 09:30:21",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 9,
|
||||
updateTime: "2024-10-10 09:30:24",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
{
|
||||
id: 10,
|
||||
updateTime: "2024-10-10 09:30:27",
|
||||
L1:57.73,
|
||||
L2:57.73,
|
||||
L3:57.73,
|
||||
},
|
||||
])
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.form-grid {
|
||||
display: flex;
|
||||
flex-direction: row; /* 横向排列 */
|
||||
flex-wrap: wrap; /* 允许换行 */
|
||||
}
|
||||
.form-grid .el-form-item {
|
||||
flex: 1 1 30%; /* 控件宽度 */
|
||||
margin-right: 20px; /* 控件间距 */
|
||||
}
|
||||
.form-grid .el-form-item:last-child {
|
||||
margin-right: 0; /* 最后一个控件不需要右边距 */
|
||||
}
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin-bottom: 10px; /* 调整这里的值以增加或减少间距 */
|
||||
}
|
||||
.el-tabs {
|
||||
margin-bottom: 20px; /* 添加底部边距 */
|
||||
}
|
||||
|
||||
.el-table th, .el-table td {
|
||||
text-align: center; /* 所有单元格文字居中 */
|
||||
}
|
||||
|
||||
.table-container {
|
||||
max-height: 400px; /* 根据需要调整高度 */
|
||||
overflow-y: auto; /* 允许垂直滚动 */
|
||||
overflow-x: hidden; /* 隐藏水平滚动条 */
|
||||
}
|
||||
</style>
|
||||
102
frontend/src/views/home/components/dataCheckResultTable.vue
Normal file
102
frontend/src/views/home/components/dataCheckResultTable.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<template>
|
||||
|
||||
<div class="table-container">
|
||||
<el-table :data="tableData" max-height="300" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" >
|
||||
|
||||
<el-table-column prop="id" label="序号" width="70" />
|
||||
<el-table-column prop="standardValue" label="标准值" />
|
||||
|
||||
<el-table-column label="L1" >
|
||||
<el-table-column prop="L1" label="被检值">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="L1_errValue" label="误差值">
|
||||
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="L2" >
|
||||
<el-table-column prop="L2" label="被检值">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="L2_errValue" label="误差值">
|
||||
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="L3" >
|
||||
<el-table-column prop="L3" label="被检值">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column prop="L3_errValue" label="误差值">
|
||||
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column prop="Result" label="检测结果">
|
||||
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="tsx" setup>
|
||||
import{ElMessage, FormInstance,FormItemRule}from'element-plus'
|
||||
import { defineProps, defineEmits, reactive,watch,ref, Ref } from 'vue';
|
||||
import { dialogBig,dialogMiddle} from '@/utils/elementBind'
|
||||
//import IndicatorTypeDialog from "@/views/machine/errorSystem/components/IndicatorTypeDialog.vue"; // 导入子组件
|
||||
import {CirclePlus, Delete, EditPen,FolderOpened,CopyDocument} from '@element-plus/icons-vue'
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
|
||||
const tableData = ref([
|
||||
{
|
||||
id: '1',
|
||||
standardValue: 57.74,
|
||||
L1:57.73,
|
||||
L1_errValue: 0.01,
|
||||
L2:57.73,
|
||||
L2_errValue: 0.01,
|
||||
L3:57.73,
|
||||
L3_errValue: 0.01,
|
||||
Result: '合格',
|
||||
},
|
||||
|
||||
])
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.form-grid {
|
||||
display: flex;
|
||||
flex-direction: row; /* 横向排列 */
|
||||
flex-wrap: wrap; /* 允许换行 */
|
||||
}
|
||||
.form-grid .el-form-item {
|
||||
flex: 1 1 30%; /* 控件宽度 */
|
||||
margin-right: 20px; /* 控件间距 */
|
||||
}
|
||||
.form-grid .el-form-item:last-child {
|
||||
margin-right: 0; /* 最后一个控件不需要右边距 */
|
||||
}
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
margin-bottom: 10px; /* 调整这里的值以增加或减少间距 */
|
||||
}
|
||||
.el-tabs {
|
||||
margin-bottom: 20px; /* 添加底部边距 */
|
||||
}
|
||||
|
||||
.el-table th, .el-table td {
|
||||
text-align: center; /* 所有单元格文字居中 */
|
||||
}
|
||||
|
||||
.table-container {
|
||||
max-height: 400px; /* 根据需要调整高度 */
|
||||
overflow-y: auto; /* 允许垂直滚动 */
|
||||
overflow-x: hidden; /* 隐藏水平滚动条 */
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,156 @@
|
||||
<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-input v-model='monitorIdx' :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-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>
|
||||
@@ -1,64 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="预检测项目:">
|
||||
<div class="form-grid">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in detectionOptions"
|
||||
v-model="item.selected"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
></el-checkbox
|
||||
>
|
||||
<!-- <el-form :model="formData" ref='formRuleRef' :rules='rules'>
|
||||
<el-row :gutter="120" >
|
||||
<el-col :span="9">
|
||||
<el-form-item label="误差体系名称" prop="name">
|
||||
<el-input v-model='formData.name' placeholder="标准号+年份+设备等级"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="参照标准名称" prop="standard_Name">
|
||||
<el-input v-model='formData.standard_Name'/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="7">
|
||||
<el-form-item label="发布时间" prop="standard_Time">
|
||||
<el-input v-model="formData.standard_Time" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="120" >
|
||||
<el-col :span="9">
|
||||
<el-form-item label="适用设备等级" prop="dev_Level">
|
||||
<el-select v-model='formData.dev_Level' placeholder="请选择设备等级">
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData('errorLevel')"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="8">
|
||||
<el-form-item label="状态" prop="enable">
|
||||
<el-select v-model='formData.enable' placeholder="请选择状态">
|
||||
<el-option
|
||||
v-for="item in dictStore.getDictData('status')"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.code"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form> -->
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-tab-pane label="预检测项目:">
|
||||
<div class="form-grid">
|
||||
<el-checkbox
|
||||
v-for="(item, index) in detectionOptions"
|
||||
v-model="item.selected"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
></el-checkbox
|
||||
>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<div class = "test-dialog">
|
||||
<div class="dialog-left">
|
||||
@@ -71,7 +25,7 @@
|
||||
</el-steps>
|
||||
</div>
|
||||
<div class="dialog-right">
|
||||
<el-collapse :v-model="1" accordion>
|
||||
<el-collapse :v-model="activeIndex" accordion>
|
||||
<el-collapse-item title="源通讯校验" name="1">
|
||||
<div>
|
||||
暂无数据,等待检测开始
|
||||
@@ -79,39 +33,20 @@
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="设备通讯校验" name="2">
|
||||
<div>
|
||||
Operation feedback: enable the users to clearly perceive their
|
||||
operations by style updates and interactive effects;
|
||||
</div>
|
||||
<div>
|
||||
Visual feedback: reflect current state by updating or rearranging
|
||||
elements of the page.
|
||||
暂无数据,等待检测开始
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="协议校验" name="3">
|
||||
<div>
|
||||
Simplify the process: keep operating process simple and intuitive;
|
||||
</div>
|
||||
<div>
|
||||
Definite and clear: enunciate your intentions clearly so that the
|
||||
users can quickly understand and make decisions;
|
||||
</div>
|
||||
<div>
|
||||
Easy to identify: the interface should be straightforward, which helps
|
||||
the users to identify and frees them from memorizing and recalling.
|
||||
暂无数据,等待检测开始
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
<el-collapse-item title="相序校验" name="4">
|
||||
<div>
|
||||
Decision making: giving advices about operations is acceptable, but do
|
||||
not make decisions for the users;
|
||||
</div>
|
||||
<div>
|
||||
Controlled consequences: users should be granted the freedom to
|
||||
operate, including canceling, aborting or terminating current
|
||||
operation.
|
||||
暂无数据,等待检测开始
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
</el-collapse>
|
||||
</el-collapse>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
137
frontend/src/views/home/components/reportPopup.vue
Normal file
137
frontend/src/views/home/components/reportPopup.vue
Normal file
@@ -0,0 +1,137 @@
|
||||
<template>
|
||||
<el-dialog title="报告生成" :model-value='visible' @close="handleCancel" v-bind="dialogBig">
|
||||
<div class="report-dialog">
|
||||
<div class="report-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='reportTemplate' :disabled="true"/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<div class="report-content">
|
||||
<div>
|
||||
<el-tabs type="border-card">
|
||||
<el-tab-pane label="报告生成状态表:">
|
||||
<div class="form-grid">
|
||||
<div class="tabs-title"><el-button type="primary" loading >已生成2台/共4台</el-button> </div>
|
||||
<el-table :data="reportData" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border class="custom-table">
|
||||
<el-table-column prop="id" label="序号" />
|
||||
<el-table-column prop="deviceName" label="设备名称" />
|
||||
<el-table-column label="生成进度">
|
||||
<template #default="scope">
|
||||
<el-progress :color="customColors" :percentage="scope.row.processValue" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="action" label="操作" >
|
||||
<template #default="scope">
|
||||
<el-button type='primary' link :icon='View'> 查看</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</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,View } from '@element-plus/icons-vue'
|
||||
|
||||
|
||||
|
||||
const reportTemplate = ref('国网检测模板V1.0');
|
||||
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 reportData = ref([
|
||||
{ id: '1', deviceName: '被检设备1', processValue: '100' , action:'查看' },
|
||||
{ id: '2', deviceName: '被检设备2', processValue: '100' , action:'查看' },
|
||||
{ id: '3', deviceName: '被检设备3', processValue: '10', action:'查看' },
|
||||
])
|
||||
const customColors = [
|
||||
{ color: "red", percentage: 0 },
|
||||
{ color: "red", percentage: 10 },
|
||||
{ color: "red", percentage: 20 },
|
||||
{ color: "red", percentage: 30 }, //红
|
||||
{ color: "red", percentage: 40 },
|
||||
{ color: "#e6a23c", percentage: 50 },
|
||||
{ color: "#e6a23c", percentage: 60 },
|
||||
{ color: "#e6a23c", percentage: 70 }, //黄
|
||||
{ color: "#e6a23c", percentage: 80 }, //1989fa
|
||||
{ color: "#e6a23c", percentage: 90 }, //1989fa
|
||||
{ color: "#5cb87a", percentage: 100 }, //绿
|
||||
];
|
||||
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>
|
||||
|
||||
.report-dialog{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.report-title{
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
.report-content{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.tabs-title{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.el-tabs__content{
|
||||
padding-top: 5px !important;
|
||||
}
|
||||
</style>
|
||||
114
frontend/src/views/home/components/resultPopup.vue
Normal file
114
frontend/src/views/home/components/resultPopup.vue
Normal file
@@ -0,0 +1,114 @@
|
||||
<template>
|
||||
<el-dialog title="检测结果" :model-value="visible" @close="handleCancel" v-bind="dialogBig" width="895px">
|
||||
<div class="result-dialog">
|
||||
<div class="result-title">
|
||||
<el-row>
|
||||
<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-row>
|
||||
</div>
|
||||
<div class="result-content">
|
||||
<el-table :data="resultData" stripe max-height="350" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border v-on:cell-click="handleClick">
|
||||
<el-table-column prop="deviceName" label="被检设备" />
|
||||
<el-table-column prop="result_1" label="通道1" />
|
||||
<el-table-column prop="result_2" label="通道2" />
|
||||
<el-table-column prop="result_3" label="通道3" />
|
||||
<el-table-column prop="result_4" label="通道4" />
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="result-footer">
|
||||
你可以停留在本页查看数据,或返回首页进行复检、报告生成和归档
|
||||
</div>
|
||||
</div>
|
||||
<DataCheckPopup
|
||||
:visible="DataCheckDialogVisible"
|
||||
@update:visible="DataCheckDialogVisible = $event"
|
||||
></DataCheckPopup>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="testPopup">
|
||||
import{ElMessage, ElSelectV2, FormInstance,FormItemRule}from'element-plus'
|
||||
import { defineProps, defineEmits, reactive,watch,ref, Ref } from 'vue';
|
||||
import { dialogBig,dialogMiddle} from '@/utils/elementBind'
|
||||
//import IndicatorTypeDialog from "@/views/machine/errorSystem/components/IndicatorTypeDialog.vue"; // 导入子组件
|
||||
import {CirclePlus, Delete, EditPen,FolderOpened,CopyDocument,Edit, Picture, UploadFilled, SuccessFilled,VideoPlay,Right,Refresh,Close} from '@element-plus/icons-vue'
|
||||
import { useDictStore } from '@/stores/modules/dict'
|
||||
import preTest from './preTest.vue'
|
||||
import timeTest from './timeTest.vue'
|
||||
import channelsTest from './channelsTest.vue'
|
||||
import DataCheckPopup from './dataCheckPopup.vue';
|
||||
import { log } from 'console';
|
||||
|
||||
const props = defineProps<{
|
||||
visible: boolean;
|
||||
}>();
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:visible', value: boolean): void;
|
||||
(e: 'submit', data: any): void;
|
||||
}>();
|
||||
|
||||
const testScriptName = ref('Q/GDW 10650.4-2021 模拟式');
|
||||
const errorSysName = ref('Q/GDW 10650.2-2021');
|
||||
const dataRule = ref('所有值');
|
||||
const DataCheckDialogVisible = ref(false);
|
||||
|
||||
const resultData = ref([
|
||||
{
|
||||
deviceName: "被检设备1",
|
||||
result_1: "合格",
|
||||
result_2: "合格",
|
||||
result_3: "合格",
|
||||
result_4: "合格",
|
||||
},
|
||||
{
|
||||
deviceName: "被检设备2",
|
||||
result_1: "合格",
|
||||
result_2: "合格",
|
||||
result_3: "—",
|
||||
result_4: "—",
|
||||
},
|
||||
{
|
||||
deviceName: "被检设备3",
|
||||
result_1: "不合格",
|
||||
result_2: "合格",
|
||||
result_3: "—",
|
||||
result_4: "—",
|
||||
},
|
||||
]);
|
||||
|
||||
const handleClick = (row:any) => {
|
||||
console.log(111)
|
||||
DataCheckDialogVisible.value = true;
|
||||
};
|
||||
|
||||
const handleCancel = () => {
|
||||
emit('update:visible', false); // 关闭对话框
|
||||
};
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.result-dialog{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.result-title{
|
||||
/* display: flex;
|
||||
flex-direction: row; */
|
||||
}
|
||||
.result-footer{
|
||||
text-align: right;
|
||||
margin-top: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -134,10 +134,18 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:icon="EditPen"
|
||||
@click="openDrawer('误差体系编辑', scope.row)"
|
||||
:icon="PieChart"
|
||||
@click="openDrawer('检测数据查询', scope.row)"
|
||||
v-if="form.activeTabs === 5"
|
||||
>误差体系编辑</el-button
|
||||
>检测数据查询</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
link
|
||||
:icon="Switch"
|
||||
@click="openDrawer('误差体系更换', scope.row)"
|
||||
v-if="form.activeTabs === 5"
|
||||
>误差体系更换</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
dictType="primary"
|
||||
@@ -156,6 +164,21 @@
|
||||
:dialogTitle="dialogTitle"
|
||||
@update:visible="dialogFormVisible = $event"
|
||||
/>
|
||||
|
||||
<reportPopup
|
||||
:visible="reportDialogVisible"
|
||||
@update:visible="reportDialogVisible = $event"
|
||||
></reportPopup>
|
||||
|
||||
<dataCheckPopup
|
||||
:visible="dataCheckDialogVisible"
|
||||
@update:visible="dataCheckDialogVisible = $event"
|
||||
></dataCheckPopup>
|
||||
|
||||
<dataCheckChangeErrSysPopup
|
||||
:visible="dataCheckChangeErrSysDialogVisible"
|
||||
@update:visible="dataCheckChangeErrSysDialogVisible = $event"
|
||||
></dataCheckChangeErrSysPopup>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -167,11 +190,15 @@ import { ElMessage, ElMessageBox, ElLoading} from "element-plus";
|
||||
import ProTable from "@/components/ProTable/index.vue";
|
||||
import { type ProTableInstance, type ColumnProps } from '@/components/ProTable/interface'
|
||||
import {
|
||||
Search,View,EditPen,Clock,ChatLineRound,ChatLineSquare,ChatDotSquare,Postcard,Notebook
|
||||
Search,View,EditPen,Clock,ChatLineRound,ChatLineSquare,ChatDotSquare,Postcard,Notebook,Switch,PieChart
|
||||
} from "@element-plus/icons-vue";
|
||||
import { getPlanList } from "@/api/plan/planList";
|
||||
import deviceDataList from '@/api/device/device/deviceData'
|
||||
import testPopup from "./testPopup.vue";
|
||||
import reportPopup from "./reportPopup.vue";
|
||||
import dataCheckPopup from "./dataCheckPopup.vue";
|
||||
import dataCheckChangeErrSysPopup from "./dataCheckChangeErrSysPopup.vue";
|
||||
|
||||
import { log } from "console";
|
||||
import { isVisible } from "element-plus/es/utils";
|
||||
import { reactive, ref } from "vue";
|
||||
@@ -180,6 +207,9 @@ const value1 = ref("");
|
||||
const value2 = ref("");
|
||||
const tableHeight = ref(0);
|
||||
const dialogFormVisible = ref(false)
|
||||
const reportDialogVisible = ref(false)
|
||||
const dataCheckDialogVisible = ref(false)
|
||||
const dataCheckChangeErrSysDialogVisible = ref(false)
|
||||
const dialogTitle = ref('手动检测')
|
||||
const dialogForm = ref<any>({
|
||||
id: '',
|
||||
@@ -354,12 +384,12 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
||||
{ type: 'selection', fixed: 'left', width: 70 },
|
||||
{
|
||||
prop: 'name',
|
||||
label: '名称',
|
||||
label: '设备名称',
|
||||
minWidth: 120,
|
||||
},
|
||||
{
|
||||
prop: 'dev_Type',
|
||||
label: '类型',
|
||||
label: '设备类型',
|
||||
minWidth: 100,
|
||||
},
|
||||
{
|
||||
@@ -735,19 +765,31 @@ const handleTest = () => {
|
||||
|
||||
// 打开 drawer(新增、查看、编辑)
|
||||
const openDrawer = (title: string, row: any) => {
|
||||
if (title === '查看')
|
||||
{
|
||||
console.log(title);
|
||||
const link = document.createElement('a');
|
||||
const fileUrl = 'G:/南网数研院非结构化数据生成程序MMS_JSON修改记录.docx'; // 文件路径
|
||||
link.href = fileUrl;
|
||||
link.target = '_blank'; // 在新标签页中打开
|
||||
link.download = 'file.docx'; // 设置下载文件的名称
|
||||
link.click();
|
||||
}
|
||||
if (title === '查看')
|
||||
{
|
||||
console.log(title);
|
||||
const link = document.createElement('a');
|
||||
const fileUrl = 'G:/南网数研院非结构化数据生成程序MMS_JSON修改记录.docx'; // 文件路径
|
||||
link.href = fileUrl;
|
||||
link.target = '_blank'; // 在新标签页中打开
|
||||
link.download = 'file.docx'; // 设置下载文件的名称
|
||||
link.click();
|
||||
}
|
||||
|
||||
if(title === '生成')
|
||||
{
|
||||
reportDialogVisible.value = true;
|
||||
}
|
||||
|
||||
else if (title === '误差体系编辑')
|
||||
console.log(title);
|
||||
if(title === '检测数据查询')
|
||||
{
|
||||
dataCheckDialogVisible.value = true;
|
||||
}
|
||||
if (title === '误差体系更换')
|
||||
{
|
||||
dataCheckChangeErrSysDialogVisible.value = true;
|
||||
}
|
||||
|
||||
|
||||
if (title === '归档')
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
|
||||
<div class = "test-dialog">
|
||||
<div class = "dialog">
|
||||
<div class="dialog-title">
|
||||
<el-progress
|
||||
style="width: 80%"
|
||||
@@ -28,8 +28,8 @@
|
||||
|
||||
</div>
|
||||
<div class="dialog-content">
|
||||
<el-table :data="errorData" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border>
|
||||
<el-table-column prop="deviceName" label="检测项目" />
|
||||
<el-table :data="errorData" :header-cell-style="{ textAlign: 'center' } " :cell-style="{ textAlign: 'center' }" style="width: 100%" border v-on:cell-click="handleClick">
|
||||
<el-table-column fixed prop="deviceName" label="检测项目" />
|
||||
<el-table-column prop="updataTime" label="被检通道1" />
|
||||
<el-table-column prop="ErrorValue" label="被检通道2" />
|
||||
<el-table-column prop="Result" label="被检通道3" />
|
||||
@@ -45,11 +45,19 @@
|
||||
</el-collapse>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<resultPopup
|
||||
:visible="resultDialogVisible"
|
||||
@update:visible="resultDialogVisible = $event"
|
||||
></resultPopup>
|
||||
<dataCheckSingleChannelSingleTestPopup
|
||||
:visible="dataCheckSingleChannelSingleTestDialogVisable"
|
||||
@update:visible="dataCheckSingleChannelSingleTestDialogVisable = $event"
|
||||
></dataCheckSingleChannelSingleTestPopup>
|
||||
</template>
|
||||
<script lang="tsx" setup name="test">
|
||||
import { VideoPause,Refresh,Close } from '@element-plus/icons-vue'
|
||||
import resultPopup from './resultPopup.vue'
|
||||
import dataCheckSingleChannelSingleTestPopup from './dataCheckSingleChannelSingleTestPopup.vue'
|
||||
|
||||
const percentage = ref(0);
|
||||
const customColors = [
|
||||
@@ -57,7 +65,8 @@ const customColors = [
|
||||
];
|
||||
//暂停检测
|
||||
const isPause = ref<boolean>(false);
|
||||
|
||||
const resultDialogVisible = ref(false)
|
||||
const dataCheckSingleChannelSingleTestDialogVisable = ref(false);
|
||||
const handlePauseTest = () => {
|
||||
if (!isPause.value) {
|
||||
|
||||
@@ -68,9 +77,14 @@ const handlePauseTest = () => {
|
||||
};
|
||||
//完成检测
|
||||
const handleFinishTest = () => {
|
||||
resultDialogVisible.value = true
|
||||
ElMessage.success("完成检测");
|
||||
};
|
||||
|
||||
const handleClick = (row:any) => {
|
||||
console.log(111)
|
||||
dataCheckSingleChannelSingleTestDialogVisable.value = true;
|
||||
};
|
||||
|
||||
const errorData = ref([
|
||||
{
|
||||
@@ -143,7 +157,7 @@ watch(ts, function (newValue, oldValue) {
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
.test-dialog{
|
||||
.dialog{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user