主界面,系数校准界面调整
This commit is contained in:
@@ -44,7 +44,6 @@ export namespace Device {
|
|||||||
checkState?: number| null; //检测状态
|
checkState?: number| null; //检测状态
|
||||||
checkResult?: number| null; //检测结果
|
checkResult?: number| null; //检测结果
|
||||||
reportState?: number| null; //报告状态
|
reportState?: number| null; //报告状态
|
||||||
documentState?: number| null; //归档状态
|
|
||||||
reportPath?: string| null; //报告路径
|
reportPath?: string| null; //报告路径
|
||||||
qRCode?: string| null; //设备关键信息二维码
|
qRCode?: string| null; //设备关键信息二维码
|
||||||
reCheckNum: number; //复检次数
|
reCheckNum: number; //复检次数
|
||||||
|
|||||||
6
frontend/src/api/home/channelsTest/index.ts
Normal file
6
frontend/src/api/home/channelsTest/index.ts
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import http from "@/api";
|
||||||
|
import {ChannelsTest} from "@/api/home/interface/channelsTest";
|
||||||
|
|
||||||
|
export const getBigTestItem = () => {
|
||||||
|
return http.get('');
|
||||||
|
}
|
||||||
22
frontend/src/api/home/interface/channelsTest.ts
Normal file
22
frontend/src/api/home/interface/channelsTest.ts
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// 系数校准模块
|
||||||
|
export namespace ChannelsTest {
|
||||||
|
|
||||||
|
// 系数校准列表
|
||||||
|
export interface CoefficientVO {
|
||||||
|
monitorNum: string;//监测点序号
|
||||||
|
desc: string;//描述
|
||||||
|
aVuData:string;//电压通道A数据
|
||||||
|
aVuXi:string;//电压通道A系数
|
||||||
|
bVuData:string;//电压通道B数据
|
||||||
|
bVuXi:number;//电压通道B系数
|
||||||
|
cVuData:number;//电压通道C数据
|
||||||
|
cVuXi?:string;//电压通道C系数
|
||||||
|
aIeData?:string;//电流通道A数据
|
||||||
|
aIeXi?:string;//电流通道A系数
|
||||||
|
bIeData?:string;//电流通道B数据
|
||||||
|
bIeXi?:string;//电流通道B系数
|
||||||
|
cIeData?:string;//电流通道C数据
|
||||||
|
cIeXi?:string;//电流通道C系数
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -35,6 +35,7 @@ const init = () => {
|
|||||||
isRadius: false, //是否圆角
|
isRadius: false, //是否圆角
|
||||||
isSpace: false, //是否显示间隔
|
isSpace: false, //是否显示间隔
|
||||||
isLabelLine: true, //是否显示引导线
|
isLabelLine: true, //是否显示引导线
|
||||||
|
titleFontSize: '18px', //标题字体大小
|
||||||
...props.customData,
|
...props.customData,
|
||||||
};
|
};
|
||||||
legendData.value = {
|
legendData.value = {
|
||||||
@@ -49,6 +50,9 @@ const init = () => {
|
|||||||
title: {
|
title: {
|
||||||
text: customData.value.title,
|
text: customData.value.title,
|
||||||
left: customData.value.textAlign,
|
left: customData.value.textAlign,
|
||||||
|
textStyle: {
|
||||||
|
fontSize: customData.value.titleFontSize, // 使用 titleFontSize 属性
|
||||||
|
},
|
||||||
},
|
},
|
||||||
legend:legendData.value,
|
legend:legendData.value,
|
||||||
// legend: {
|
// legend: {
|
||||||
|
|||||||
@@ -22,33 +22,33 @@
|
|||||||
<el-step>
|
<el-step>
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>大电压/电流系数下装</span><br/>
|
<span>大电压/电流系数下装</span><br/>
|
||||||
<span>源输出为:</span><br/>
|
<span class="spanStyle">源输出为:</span><br/>
|
||||||
<span v-if="active > 0">Ua=Ub=Uc=57.74V</span><br/>
|
<span class="spanStyle" v-if="active > 0">Ua=Ub=Uc=57.74V</span><br/>
|
||||||
<span v-if="active > 0">Ia=Ib=Ic=10A</span>
|
<span class="spanStyle" v-if="active > 0">Ia=Ib=Ic=10A</span>
|
||||||
</template>
|
</template>
|
||||||
</el-step>
|
</el-step>
|
||||||
<el-step>
|
<el-step>
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>小电压/电流系数下装</span><br/>
|
<span>小电压/电流系数下装</span><br/>
|
||||||
<span>源输出为:</span><br/>
|
<span class="spanStyle">源输出为:</span><br/>
|
||||||
<span v-if="active > 1">Ua=Ub=Uc=5.774V</span><br/>
|
<span class="spanStyle" v-if="active > 1">Ua=Ub=Uc=5.774V</span><br/>
|
||||||
<span v-if="active > 1">Ia=Ib=Ic=1A</span>
|
<span class="spanStyle" v-if="active > 1">Ia=Ib=Ic=1A</span>
|
||||||
</template>
|
</template>
|
||||||
</el-step>
|
</el-step>
|
||||||
<el-step>
|
<el-step>
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>大电压/电流校准</span><br/>
|
<span>大电压/电流校准</span><br/>
|
||||||
<span>源输出为:</span><br/>
|
<span class="spanStyle">源输出为:</span><br/>
|
||||||
<span v-if="active > 2">Ua=Ub=Uc=57.74V</span><br/>
|
<span class="spanStyle" v-if="active > 2">Ua=Ub=Uc=57.74V</span><br/>
|
||||||
<span v-if="active > 2">Ia=Ib=Ic=10A</span>
|
<span class="spanStyle" v-if="active > 2">Ia=Ib=Ic=10A</span>
|
||||||
</template>
|
</template>
|
||||||
</el-step>
|
</el-step>
|
||||||
<el-step>
|
<el-step>
|
||||||
<template #title>
|
<template #title>
|
||||||
<span>小电压/电流校准</span><br/>
|
<span>小电压/电流校准</span><br/>
|
||||||
<span>源输出为:</span><br/>
|
<span class="spanStyle">源输出为:</span><br/>
|
||||||
<span v-if="active > 3">Ua=Ub=Uc=5.774V</span><br/>
|
<span class="spanStyle" v-if="active > 3">Ua=Ub=Uc=5.774V</span><br/>
|
||||||
<span v-if="active > 3">Ia=Ib=Ic=1A</span>
|
<span class="spanStyle" v-if="active > 3">Ia=Ib=Ic=1A</span>
|
||||||
</template>
|
</template>
|
||||||
</el-step>
|
</el-step>
|
||||||
<el-step title="结束"/>
|
<el-step title="结束"/>
|
||||||
@@ -146,12 +146,11 @@ const webMsgSend = toRef(props, 'webMsgSend');
|
|||||||
|
|
||||||
watch(webMsgSend,function (newValue,oldValue){
|
watch(webMsgSend,function (newValue,oldValue){
|
||||||
switch (newValue.requestId){
|
switch (newValue.requestId){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 定义 TableDataItem 接口
|
// 定义 TableDataItem 接口
|
||||||
interface TableDataItem {
|
interface TableDataItem {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -169,8 +168,6 @@ interface TableDataItem {
|
|||||||
IbChannel?: number | string;
|
IbChannel?: number | string;
|
||||||
IcData?: number | string;
|
IcData?: number | string;
|
||||||
IcChannel?: number | string;
|
IcChannel?: number | string;
|
||||||
Result?: string | string;
|
|
||||||
updateTime?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const dataTemplates3 = [
|
const dataTemplates3 = [
|
||||||
@@ -542,6 +539,7 @@ const activities = [
|
|||||||
qualified.value = 0
|
qualified.value = 0
|
||||||
active.value = 0
|
active.value = 0
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
editableTabsValue.value = '0'
|
||||||
}
|
}
|
||||||
|
|
||||||
const getTableDataForChannel = (index: number): any[] => {
|
const getTableDataForChannel = (index: number): any[] => {
|
||||||
@@ -616,6 +614,7 @@ const checkForErrors = (data: TableDataItem[]): boolean => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleSubmit = async () => {
|
const handleSubmit = async () => {
|
||||||
|
debugger
|
||||||
// 初始化 currentTableData
|
// 初始化 currentTableData
|
||||||
let isTimer2Completed = false;
|
let isTimer2Completed = false;
|
||||||
// 初始化 loadingStates 为 true
|
// 初始化 loadingStates 为 true
|
||||||
@@ -843,6 +842,10 @@ const initializeTableData = (templates: TableDataItem[], index: number): Ref<Tab
|
|||||||
}
|
}
|
||||||
|
|
||||||
.right-content {
|
.right-content {
|
||||||
flex: 5;
|
flex: 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.spanStyle{
|
||||||
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
max-height="400px"
|
max-height="400px"
|
||||||
:span-method="objectSpanMethod">
|
:span-method="objectSpanMethod">
|
||||||
<el-table-column prop="MonitorIdx" label="监测点序号" width="80"/>
|
<el-table-column prop="MonitorIdx" label="监测点序号" width="80"/>
|
||||||
<!-- <el-table-column prop="updateTime" label="上送时刻" width="180"/> -->
|
|
||||||
<el-table-column prop="deviceName" label="描述" width="90"/>
|
<el-table-column prop="deviceName" label="描述" width="90"/>
|
||||||
<el-table-column label="电压通道" >
|
<el-table-column label="电压通道" >
|
||||||
<el-table-column prop="Ua" label="L1">
|
<el-table-column prop="Ua" label="L1">
|
||||||
@@ -21,7 +20,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="UaChannel" label="系数">
|
<el-table-column prop="UaChannel" label="结果">
|
||||||
|
<template #header >
|
||||||
|
<span>结果</span>
|
||||||
|
<el-tooltip class="item" effect="light" placement="top-start" content="电压L1系数校准不合格原因">
|
||||||
|
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="danger" v-if="scope.row.UaChannel === '不合格'">
|
<el-tag type="danger" v-if="scope.row.UaChannel === '不合格'">
|
||||||
{{ scope.row.UaChannel }}
|
{{ scope.row.UaChannel }}
|
||||||
@@ -32,7 +37,6 @@
|
|||||||
<span v-else>
|
<span v-else>
|
||||||
{{ scope.row.UaChannel }}
|
{{ scope.row.UaChannel }}
|
||||||
</span>
|
</span>
|
||||||
<!-- <el-tag type="danger" v-if="scope.row.UaChannel === '不合格'">{{ scope.row.UaChannel }}</el-tag> -->
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -47,7 +51,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="UbChannel" label="系数">
|
<el-table-column prop="UbChannel" label="结果">
|
||||||
|
<template #header >
|
||||||
|
<span>结果</span>
|
||||||
|
<el-tooltip class="item" effect="light" placement="top-start" content="电压L2系数校准不合格原因">
|
||||||
|
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="danger" v-if="scope.row.UbChannel === '不合格'">
|
<el-tag type="danger" v-if="scope.row.UbChannel === '不合格'">
|
||||||
{{ scope.row.UbChannel }}
|
{{ scope.row.UbChannel }}
|
||||||
@@ -72,7 +82,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="UcChannel" label="系数">
|
<el-table-column prop="UcChannel" label="结果">
|
||||||
|
<template #header >
|
||||||
|
<span>结果</span>
|
||||||
|
<el-tooltip class="item" effect="light" placement="top-start" content="电压L3系数校准不合格原因">
|
||||||
|
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="danger" v-if="scope.row.UcChannel === '不合格'">
|
<el-tag type="danger" v-if="scope.row.UcChannel === '不合格'">
|
||||||
{{ scope.row.UcChannel }}
|
{{ scope.row.UcChannel }}
|
||||||
@@ -99,7 +115,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="IaChannel" label="系数">
|
<el-table-column prop="IaChannel" label="结果">
|
||||||
|
<template #header >
|
||||||
|
<span>结果</span>
|
||||||
|
<el-tooltip class="item" effect="light" placement="top-start" content="电流L1系数校准不合格原因">
|
||||||
|
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="danger" v-if="scope.row.IaChannel === '不合格'">
|
<el-tag type="danger" v-if="scope.row.IaChannel === '不合格'">
|
||||||
{{ scope.row.IaChannel }}
|
{{ scope.row.IaChannel }}
|
||||||
@@ -124,7 +146,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="IbChannel" label="系数">
|
<el-table-column prop="IbChannel" label="结果">
|
||||||
|
<template #header >
|
||||||
|
<span>结果</span>
|
||||||
|
<el-tooltip class="item" effect="light" placement="top-start" content="电流L2系数校准不合格原因">
|
||||||
|
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="danger" v-if="scope.row.IbChannel === '不合格'">
|
<el-tag type="danger" v-if="scope.row.IbChannel === '不合格'">
|
||||||
{{ scope.row.IbChannel }}
|
{{ scope.row.IbChannel }}
|
||||||
@@ -149,7 +177,13 @@
|
|||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="IcChannel" label="系数">
|
<el-table-column prop="IcChannel" label="结果">
|
||||||
|
<template #header >
|
||||||
|
<span>结果</span>
|
||||||
|
<el-tooltip class="item" effect="light" placement="top-start" content="电流L3系数准不合格原因">
|
||||||
|
<el-icon style="margin-left:2px;vertical-align:-2px;"><QuestionFilled /></el-icon>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-tag type="danger" v-if="scope.row.IcChannel === '不合格'">
|
<el-tag type="danger" v-if="scope.row.IcChannel === '不合格'">
|
||||||
{{ scope.row.IcChannel }}
|
{{ scope.row.IcChannel }}
|
||||||
@@ -164,13 +198,6 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- <el-table-column label="校准结果">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-tag type="danger" v-if="scope.row.Result === '不合格'">{{ scope.row.Result }}</el-tag>
|
|
||||||
<span v-if="scope.row.Result != '不合格'">{{ scope.row.Result }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column> -->
|
|
||||||
|
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<template #tableHeader="">
|
<template #tableHeader="">
|
||||||
<el-form :model="form" :inline="true">
|
<el-form :model="form" :inline="true">
|
||||||
<el-form-item label="关键字">
|
<el-form-item label="关键字">
|
||||||
<el-input v-model="form.search" placeholder="请输入设备名称"></el-input>
|
<el-input v-model="form.search" placeholder="请输入设备名称" clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="检测状态" v-if="form.activeTabs != 3 && form.activeTabs != 4 && form.activeTabs != 5">
|
<el-form-item label="检测状态" v-if="form.activeTabs != 3 && form.activeTabs != 4 && form.activeTabs != 5">
|
||||||
<el-select v-model="form.checkStatus" clearable>
|
<el-select v-model="form.checkStatus" clearable>
|
||||||
@@ -26,7 +26,6 @@
|
|||||||
v-for="(item, index) in checkStatus"
|
v-for="(item, index) in checkStatus"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
|
|
||||||
:key="index"
|
:key="index"
|
||||||
v-show="shouldShowOption(item)"
|
v-show="shouldShowOption(item)"
|
||||||
></el-option>
|
></el-option>
|
||||||
@@ -177,10 +176,10 @@
|
|||||||
link
|
link
|
||||||
:icon="Switch"
|
:icon="Switch"
|
||||||
@click="openDrawer('误差体系更换', scope.row)"
|
@click="openDrawer('误差体系更换', scope.row)"
|
||||||
v-if="form.activeTabs === 5 && scope.row.documentState === 1"
|
v-if="form.activeTabs === 5"
|
||||||
>误差体系更换</el-button>
|
>误差体系更换</el-button>
|
||||||
|
|
||||||
<div class='cn-render-buttons' v-if="form.activeTabs === 5 && scope.row.documentState === 1">
|
<div class='cn-render-buttons' v-if="form.activeTabs === 5 ">
|
||||||
<el-dropdown trigger='click'>
|
<el-dropdown trigger='click'>
|
||||||
<el-button link type='primary' :icon="Download" class='table-operate'>
|
<el-button link type='primary' :icon="Download" class='table-operate'>
|
||||||
<div class='table-operate-text'>报告下载</div>
|
<div class='table-operate-text'>报告下载</div>
|
||||||
@@ -290,8 +289,14 @@ const dialogForm = ref<any>({
|
|||||||
});
|
});
|
||||||
const modeStore = useModeStore();
|
const modeStore = useModeStore();
|
||||||
const shouldShowOption = (item) => {
|
const shouldShowOption = (item) => {
|
||||||
//return !item.disabled;
|
// 检查 weiJianTab 是否不等于 0
|
||||||
return item;
|
if (weiJianTab.value !== 0) {
|
||||||
|
// 排除 label 为“归档”和“未检”的项
|
||||||
|
return item.label !== '归档' && item.label !== '未检';
|
||||||
|
} else {
|
||||||
|
// 只排除 label 为“归档”的项
|
||||||
|
return item.label !== '归档';
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
tableHeight.value = window.innerHeight - 600;
|
tableHeight.value = window.innerHeight - 600;
|
||||||
@@ -303,7 +308,7 @@ const operationMinWidth = ref(200);
|
|||||||
const selectionShow = ref(true);
|
const selectionShow = ref(true);
|
||||||
const channelsTest = ref()
|
const channelsTest = ref()
|
||||||
const testPopup = ref()
|
const testPopup = ref()
|
||||||
|
const weiJianTab = ref(0)//除设备检测外,检测结果不显示'未检'
|
||||||
const channelsSelection = ref<Device.ResPqDev[]>([])
|
const channelsSelection = ref<Device.ResPqDev[]>([])
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
id: {
|
id: {
|
||||||
@@ -506,18 +511,6 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
prop: 'documentState',
|
|
||||||
label: '归档状态',
|
|
||||||
minWidth: 100,
|
|
||||||
sortable:true,
|
|
||||||
isShow: documentStateShow,
|
|
||||||
render: scope => {
|
|
||||||
return (
|
|
||||||
scope.row.documentState === 0 ? '未归档' : '已归档'
|
|
||||||
)
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 200 ,isShow: operationShow},
|
{ prop: 'operation', label: '操作', fixed: 'right', minWidth: 200 ,isShow: operationShow},
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -606,6 +599,7 @@ const sortTable = ({
|
|||||||
|
|
||||||
//顶部功能切换时修改activeTabs
|
//顶部功能切换时修改activeTabs
|
||||||
const changeActiveTabs = (val: number,val2: number,tabledata:any[]) => {
|
const changeActiveTabs = (val: number,val2: number,tabledata:any[]) => {
|
||||||
|
|
||||||
form.value.activeTabs = val;
|
form.value.activeTabs = val;
|
||||||
form.value.activeChildTabs= val2;
|
form.value.activeChildTabs= val2;
|
||||||
deviceData.value = tabledata;
|
deviceData.value = tabledata;
|
||||||
@@ -615,6 +609,7 @@ const changeActiveTabs = (val: number,val2: number,tabledata:any[]) => {
|
|||||||
//根据当前功能,初始化表头下拉框中的默认值和禁用值
|
//根据当前功能,初始化表头下拉框中的默认值和禁用值
|
||||||
function tableHeaderInit(val: number) {
|
function tableHeaderInit(val: number) {
|
||||||
refreshStatusList()
|
refreshStatusList()
|
||||||
|
weiJianTab.value = val;
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 0://设备检测
|
case 0://设备检测
|
||||||
case 1://手动检测
|
case 1://手动检测
|
||||||
|
|||||||
@@ -3,6 +3,7 @@
|
|||||||
<div class='search_view'>
|
<div class='search_view'>
|
||||||
<el-input
|
<el-input
|
||||||
placeholder='请输入计划名称'
|
placeholder='请输入计划名称'
|
||||||
|
clearable
|
||||||
v-model='searchForm.planName'
|
v-model='searchForm.planName'
|
||||||
></el-input>
|
></el-input>
|
||||||
<Menu style='width: 26px;height: 26px; margin-left: 8px;cursor: pointer;color:var(--el-color-primary)'
|
<Menu style='width: 26px;height: 26px; margin-left: 8px;cursor: pointer;color:var(--el-color-primary)'
|
||||||
@@ -16,6 +17,7 @@
|
|||||||
:props='defaultProps'
|
:props='defaultProps'
|
||||||
node-key='id'
|
node-key='id'
|
||||||
class="filter-tree"
|
class="filter-tree"
|
||||||
|
:highlight-current="true"
|
||||||
default-expand-all
|
default-expand-all
|
||||||
:default-checked-keys='defaultChecked'
|
:default-checked-keys='defaultChecked'
|
||||||
@node-click='handleNodeClick'
|
@node-click='handleNodeClick'
|
||||||
@@ -35,13 +37,14 @@
|
|||||||
<script lang='ts' setup>
|
<script lang='ts' setup>
|
||||||
import { type Plan } from '@/api/plan/interface';
|
import { type Plan } from '@/api/plan/interface';
|
||||||
import { Menu, Platform, CircleCheck,Loading } from '@element-plus/icons-vue'
|
import { Menu, Platform, CircleCheck,Loading } from '@element-plus/icons-vue'
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { nextTick, onMounted, ref, watch } from 'vue';
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import {useCheckStore} from "@/stores/modules/check";
|
import {useCheckStore} from "@/stores/modules/check";
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const checkStore = useCheckStore()
|
const checkStore = useCheckStore()
|
||||||
|
const filterText = ref('')
|
||||||
|
const treeRef = ref()
|
||||||
const data: any = ref([])
|
const data: any = ref([])
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
@@ -62,12 +65,16 @@ const getTreeData = (val: any) => {
|
|||||||
checkStore.setPlanCode(node.code)
|
checkStore.setPlanCode(node.code)
|
||||||
checkStore.setScriptId(node.scriptId)
|
checkStore.setScriptId(node.scriptId)
|
||||||
checkStore.setErrorSysId(node.errorSysId)
|
checkStore.setErrorSysId(node.errorSysId)
|
||||||
console.log(checkStore.planId,checkStore.planCode,checkStore.scriptId,checkStore.errorSysId)
|
// 高亮显示第一个节点
|
||||||
|
// 使用 nextTick 确保在 DOM 更新后调用 setCurrentKey
|
||||||
|
nextTick(() => {
|
||||||
|
treeRef.value?.setCurrentKey(node.id);
|
||||||
|
});
|
||||||
|
//console.log(checkStore.planId,checkStore.planCode,checkStore.scriptId,checkStore.errorSysId)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
const filterText = ref('')
|
|
||||||
const treeRef = ref()
|
|
||||||
const {updateSelectedTreeNode} = defineProps<{
|
const {updateSelectedTreeNode} = defineProps<{
|
||||||
updateSelectedTreeNode:Function;
|
updateSelectedTreeNode:Function;
|
||||||
}>();
|
}>();
|
||||||
@@ -91,6 +98,8 @@ const filterNode = (value: string, data: any) => {
|
|||||||
if (!value) return true
|
if (!value) return true
|
||||||
return data.name.includes(value)
|
return data.name.includes(value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 点击详情
|
// 点击详情
|
||||||
const detail = () => {
|
const detail = () => {
|
||||||
router.push('/plan')
|
router.push('/plan')
|
||||||
@@ -99,6 +108,8 @@ onMounted(() => {
|
|||||||
// console.log()
|
// console.log()
|
||||||
})
|
})
|
||||||
defineExpose({ getTreeData })
|
defineExpose({ getTreeData })
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
.plan_tree {
|
.plan_tree {
|
||||||
@@ -108,7 +119,7 @@ defineExpose({ getTreeData })
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
// height: calc(100% - 70px);
|
// height: calc(100% - 70px);
|
||||||
background-color: #fff;
|
background-color: #ffffff;
|
||||||
|
|
||||||
.search_view {
|
.search_view {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -142,6 +153,8 @@ defineExpose({ getTreeData })
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.filter-tree {
|
.filter-tree {
|
||||||
// border: 1px solid #dcdfe6;
|
// border: 1px solid #dcdfe6;
|
||||||
min-width: 100%;
|
min-width: 100%;
|
||||||
@@ -149,6 +162,7 @@ defineExpose({ getTreeData })
|
|||||||
display: inline-block;
|
display: inline-block;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//.filter-tree span {
|
//.filter-tree span {
|
||||||
@@ -160,7 +174,6 @@ defineExpose({ getTreeData })
|
|||||||
// text-overflow:ellipsis;
|
// text-overflow:ellipsis;
|
||||||
// padding-right: 12px;
|
// padding-right: 12px;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
.leftBox {
|
.leftBox {
|
||||||
// float: left;
|
// float: left;
|
||||||
// width: 20%;
|
// width: 20%;
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
:customData="{
|
:customData="{
|
||||||
title: '设备检测状态',
|
title: '设备检测状态',
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
|
|
||||||
}"
|
}"
|
||||||
:legendData="{
|
:legendData="{
|
||||||
icon: 'circle',
|
icon: 'circle',
|
||||||
@@ -723,7 +724,7 @@ onUnmounted(() => {
|
|||||||
|
|
||||||
:deep(.el-collapse-item__header) {
|
:deep(.el-collapse-item__header) {
|
||||||
color: var(--el-color-primary);
|
color: var(--el-color-primary);
|
||||||
font-size: 14px;
|
font-size: 18px;
|
||||||
font-family: "Microsoft YaHei", "微软雅黑", "Arial", sans-serif;
|
font-family: "Microsoft YaHei", "微软雅黑", "Arial", sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -35,8 +35,11 @@
|
|||||||
<el-tab-pane label="全局设置菜单">
|
<el-tab-pane label="全局设置菜单">
|
||||||
<!-- 全局设置菜单内容 -->
|
<!-- 全局设置菜单内容 -->
|
||||||
<div class="form-item-container">
|
<div class="form-item-container">
|
||||||
<el-form-item label="频率(Hz)" prop='name'>
|
<el-form-item label="频率:" prop='name'>
|
||||||
<el-input />
|
<div class="input-label-container">
|
||||||
|
<el-input style="width: 100px;" />
|
||||||
|
<label>Hz</label>
|
||||||
|
</div>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="button-label-container">
|
<div class="button-label-container">
|
||||||
@@ -214,6 +217,13 @@ defineExpose({ open })
|
|||||||
.button-label-container label {
|
.button-label-container label {
|
||||||
margin-right: 10px; /* 按钮和文字之间的距离 */
|
margin-right: 10px; /* 按钮和文字之间的距离 */
|
||||||
}
|
}
|
||||||
|
.input-label-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center; /* 垂直居中对齐 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-label-container label {
|
||||||
|
margin-left: 5px; /* 添加标签与输入框之间的间距 */
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
<div class="editor-container">
|
<div class="editor-container">
|
||||||
<div class="left-editor">
|
<div class="left-editor">
|
||||||
<!-- 左侧编辑区域内容 -->
|
<!-- 左侧编辑区域内容 -->
|
||||||
<canvas ref="canvas" width="600" height="165"></canvas>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="right-editor">
|
<div class="right-editor">
|
||||||
<!-- 右侧编辑区域内容 -->
|
<!-- 右侧编辑区域内容 -->
|
||||||
@@ -30,12 +30,14 @@ canvas {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.left-editor {
|
.left-editor {
|
||||||
flex: 3; /* 左侧区域占据 3/4 的宽度 */
|
flex: 3; /* 左侧区域占据 3/4 的宽度 */
|
||||||
margin-right: 10px; /* 可选:添加间距 */
|
margin-left: 150px; /* 可选:添加间距 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-editor {
|
.right-editor {
|
||||||
flex: 1; /* 右侧区域占据 1/4 的宽度 */
|
flex: 1; /* 右侧区域占据 1/4 的宽度 */
|
||||||
|
margin-right: 250px; /* 向左侧移动一点 */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -13,7 +13,10 @@
|
|||||||
<el-input />
|
<el-input />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="波动类型" prop='name'>
|
<el-form-item label="波动类型" prop='name'>
|
||||||
<el-input />
|
<el-select placeholder="请选择波动类型" style="width: 150px;">
|
||||||
|
<el-option label="Hz" :value="1"></el-option>
|
||||||
|
<el-option label="CPM" :value="0"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
@@ -23,7 +26,11 @@
|
|||||||
<!-- 全局设置菜单内容 -->
|
<!-- 全局设置菜单内容 -->
|
||||||
<div >
|
<div >
|
||||||
<el-form-item label="波类型" prop='name'>
|
<el-form-item label="波类型" prop='name'>
|
||||||
<el-input />
|
<el-select placeholder="请选择波类型">
|
||||||
|
<el-option label="RECT" :value="2"></el-option>
|
||||||
|
<el-option label="SIN" :value="1"></el-option>
|
||||||
|
<el-option label="SQU" :value="0"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div >
|
<div >
|
||||||
|
|||||||
@@ -6,27 +6,39 @@
|
|||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<el-table :data="tableData1" border class="half-width-table">
|
<el-table :data="tableData1" border class="half-width-table">
|
||||||
<el-table-column prop="date" label="次数" width="60"/>
|
<el-table-column prop="date" label="次数" width="60"/>
|
||||||
<el-table-column prop="date" label="谐波含有率" width="125">
|
<el-table-column prop="date" label="谐波含有率" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<div class="input-label-container">
|
||||||
<el-input />
|
<el-input />
|
||||||
|
<label>%</label>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="谐波相角" width="125">
|
<el-table-column prop="name" label="谐波相角" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<div class="input-label-container">
|
||||||
<el-input />
|
<el-input />
|
||||||
|
<label>°</label>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-table :data="tableData2" border class="half-width-table">
|
<el-table :data="tableData2" border class="half-width-table">
|
||||||
<el-table-column prop="date" label="次数" width="60"/>
|
<el-table-column prop="date" label="次数" width="60"/>
|
||||||
<el-table-column prop="date" label="谐波含有率" width="125">
|
<el-table-column prop="date" label="谐波含有率" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<div class="input-label-container">
|
||||||
<el-input />
|
<el-input />
|
||||||
|
<label>%</label>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="谐波相角" width="125">
|
<el-table-column prop="name" label="谐波相角" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<div class="input-label-container">
|
||||||
<el-input />
|
<el-input />
|
||||||
|
<label>°</label>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -39,28 +51,39 @@
|
|||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
<el-table :data="tableData1" border class="half-width-table">
|
<el-table :data="tableData1" border class="half-width-table">
|
||||||
<el-table-column prop="date" label="次数" width="60"/>
|
<el-table-column prop="date" label="次数" width="60"/>
|
||||||
<el-table-column prop="date" label="谐波含有率" width="125">
|
<el-table-column prop="date" label="谐波含有率" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<div class="input-label-container">
|
||||||
<el-input />
|
<el-input />
|
||||||
<label>123%</label>
|
<label>%</label>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="谐波相角" width="125">
|
<el-table-column prop="name" label="谐波相角" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<div class="input-label-container">
|
||||||
<el-input />
|
<el-input />
|
||||||
|
<label>°</label>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<el-table :data="tableData2" border class="half-width-table">
|
<el-table :data="tableData2" border class="half-width-table">
|
||||||
<el-table-column prop="date" label="次数" width="60"/>
|
<el-table-column prop="date" label="次数" width="60"/>
|
||||||
<el-table-column prop="date" label="谐波含有率" width="125">
|
<el-table-column prop="date" label="谐波含有率" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<div class="input-label-container">
|
||||||
<el-input />
|
<el-input />
|
||||||
|
<label>%</label>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="name" label="谐波相角" width="125">
|
<el-table-column prop="name" label="谐波相角" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<div class="input-label-container">
|
||||||
<el-input />
|
<el-input />
|
||||||
|
<label>°</label>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@@ -132,4 +155,12 @@ for (let i = 26; i <= 50; i++) {
|
|||||||
margin-right: 0; /* 最后一个表格不需要右侧间距 */
|
margin-right: 0; /* 最后一个表格不需要右侧间距 */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input-label-container {
|
||||||
|
display: flex;
|
||||||
|
align-items: center; /* 垂直居中对齐 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.input-label-container label {
|
||||||
|
margin-left: 5px; /* 添加标签与输入框之间的间距 */
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -20,7 +20,82 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import { onMounted, ref } from "vue";
|
||||||
|
|
||||||
|
const canvas = ref<HTMLCanvasElement | null>(null);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (canvas.value) {
|
||||||
|
const ctx = canvas.value.getContext('2d');
|
||||||
|
if (ctx) {
|
||||||
|
drawSineWave(ctx);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function drawSineWave(ctx: CanvasRenderingContext2D) {
|
||||||
|
const width = canvas.value!.width;
|
||||||
|
const height = canvas.value!.height;
|
||||||
|
const amplitude = 50; // 振幅
|
||||||
|
const frequency = 0.02; // 频率
|
||||||
|
const offset = height / 2; // 偏移量
|
||||||
|
|
||||||
|
// 绘制横轴
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.moveTo(0, offset);
|
||||||
|
ctx.lineTo(width, offset);
|
||||||
|
ctx.strokeStyle = 'black';
|
||||||
|
ctx.stroke();
|
||||||
|
|
||||||
|
// 绘制纵轴
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.moveTo(0, 0);
|
||||||
|
ctx.lineTo(0, height);
|
||||||
|
ctx.stroke();
|
||||||
|
|
||||||
|
// 绘制横轴刻度
|
||||||
|
const xStep = width / 10;
|
||||||
|
for (let x = 0; x <= width; x += xStep) {
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.moveTo(x, offset - 5);
|
||||||
|
ctx.lineTo(x, offset + 5);
|
||||||
|
ctx.stroke();
|
||||||
|
|
||||||
|
// 添加横轴刻度标签
|
||||||
|
ctx.font = '12px Arial';
|
||||||
|
ctx.fillStyle = 'black';
|
||||||
|
ctx.textAlign = 'center';
|
||||||
|
ctx.fillText((x / xStep).toFixed(0), x, offset + 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绘制纵轴刻度
|
||||||
|
const yStep = height / 10;
|
||||||
|
for (let y = 0; y <= height; y += yStep) {
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.moveTo(-5, y);
|
||||||
|
ctx.lineTo(5, y);
|
||||||
|
ctx.stroke();
|
||||||
|
|
||||||
|
// 添加纵轴刻度标签
|
||||||
|
ctx.font = '12px Arial';
|
||||||
|
ctx.fillStyle = 'black';
|
||||||
|
ctx.textAlign = 'right';
|
||||||
|
ctx.fillText(((offset - y) / yStep - 5).toFixed(1), -10, y + 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绘制正弦波
|
||||||
|
ctx.beginPath();
|
||||||
|
ctx.moveTo(0, offset);
|
||||||
|
|
||||||
|
for (let x = 0; x < width; x++) {
|
||||||
|
const y = offset + amplitude * Math.sin(frequency * x);
|
||||||
|
ctx.lineTo(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx.strokeStyle = 'red';
|
||||||
|
ctx.lineWidth = 2;
|
||||||
|
ctx.stroke();
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@@ -35,10 +110,11 @@ canvas {
|
|||||||
|
|
||||||
.left-editor {
|
.left-editor {
|
||||||
flex: 3; /* 左侧区域占据 3/4 的宽度 */
|
flex: 3; /* 左侧区域占据 3/4 的宽度 */
|
||||||
margin-right: 10px; /* 可选:添加间距 */
|
margin-left: 150px; /* 可选:添加间距 */
|
||||||
}
|
}
|
||||||
|
|
||||||
.right-editor {
|
.right-editor {
|
||||||
flex: 1; /* 右侧区域占据 1/4 的宽度 */
|
flex: 1; /* 右侧区域占据 1/4 的宽度 */
|
||||||
|
margin-right: 250px; /* 向左侧移动一点 */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user