This commit is contained in:
GYYM
2024-12-05 21:34:10 +08:00
7 changed files with 167 additions and 127 deletions

View File

@@ -42,194 +42,194 @@ const errordata = ref<ErrorSystem.ErrorSystemList[]>([
{
col1:'频率偏差',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'频率',
condition: '42.5~57.5 Hz',
maxErrorValue: '±0.01Hz'
condition: '42.5~57.5 Hz',
maxErrorValue: '±0.01Hz'
},
{
col1:'三相不平衡度',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电压',
condition: '0.5%~5%',
maxErrorValue: '±0.15%'
condition: '0.5%~5%',
maxErrorValue: '±0.15%'
},
{
col1:'三相不平衡度',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电压',
condition: '5%(不包含)~ 40%',
maxErrorValue: '±0.3%'
condition: '5%(不包含)~ 40%',
maxErrorValue: '±0.3%'
},
{
col1:'三相不平衡度',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电流',
condition: '',
maxErrorValue: '±1%'
condition: '',
maxErrorValue: '±1%'
},
{
col1:'电压波动',
col2: '电压幅值',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电压',
condition: '',
maxErrorValue: '±0.2%Un'
condition: '',
maxErrorValue: '±0.2%Un'
},
{
col1:'电压波动',
col2: '持续时间',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'时间',
condition: '',
maxErrorValue: '±1周波'
condition: '',
maxErrorValue: '±1周波'
},
{
col1:'闪变',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'短时间闪变',
condition: 'Pst0.2~10',
maxErrorValue: '±5%'
condition: 'Pst0.2~10',
maxErrorValue: '±5%'
},
{
col1:'谐波和间谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电压',
condition: 'Uh≥1%Un',
maxErrorValue: '±5%Uh'
condition: 'Uh≥1%Un',
maxErrorValue: '±5%Uh'
},
{
col1:'谐波和间谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电压',
condition: 'Uh1%Un',
maxErrorValue: '±0.05%Un'
condition: 'Uh1%Un',
maxErrorValue: '±0.05%Un'
},
{
col1:'谐波和间谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电流',
condition: 'In≥3%In',
maxErrorValue: '±5%Ih'
condition: 'In≥3%In',
maxErrorValue: '±5%Ih'
},
{
col1:'谐波和间谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电流',
condition: 'In3%In',
maxErrorValue: '±0.15%In'
condition: 'In3%In',
maxErrorValue: '±0.15%In'
},
{
col1:'谐波和间谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'相角',
condition: '',
maxErrorValue: 'h≤5,±1°*h'
condition: '',
maxErrorValue: 'h≤5,±1°*h'
},
{
col1:'谐波和间谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'相角',
condition: '',
maxErrorValue: 'h>5,±5°'
condition: '',
maxErrorValue: 'h>5,±5°'
},
{
col1:'谐波和间谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'功率',
condition: 'Ph≥150W',
maxErrorValue: '±1%Ph'
condition: 'Ph≥150W',
maxErrorValue: '±1%Ph'
},
{
col1:'谐波和间谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'功率',
condition: 'Ph150W',
maxErrorValue: '±1.5W'
condition: 'Ph150W',
maxErrorValue: '±1.5W'
},
{
col1:'高频次谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电压',
condition: 'Uh≥1%Un',
maxErrorValue: '±5%Uh'
condition: 'Uh≥1%Un',
maxErrorValue: '±5%Uh'
},
{
col1:'高频次谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电压',
condition: 'Uh1%Un',
maxErrorValue: '±0.05%Un'
condition: 'Uh1%Un',
maxErrorValue: '±0.05%Un'
},
{
col1:'高频次谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电流',
condition: 'In≥3%In',
maxErrorValue: '±5%Ih'
condition: 'In≥3%In',
maxErrorValue: '±5%Ih'
},
{
col1:'高频次谐波',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电流',
condition: 'In3%In',
maxErrorValue: '±0.15%In'
condition: 'In3%In',
maxErrorValue: '±0.15%In'
},
{
col1:'功率',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'功率',
condition: '',
maxErrorValue: '±0.5%'
condition: '',
maxErrorValue: '±0.5%'
},
{
col1:'电流',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电流',
condition: 'I≥0.05In',
maxErrorValue: '±0.5%'
condition: 'I≥0.05In',
maxErrorValue: '±0.5%'
},
{
col1:'电流',
col2: '',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电流',
condition: '0.01In≤I0.05In',
maxErrorValue: '±1%'
condition: '0.01In≤I0.05In',
maxErrorValue: '±1%'
},
{
col1: '电压暂降、电压暂升和短时中断',
col2: '电压幅值',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'电压',
condition: '',
maxErrorValue: '±0.2%Un'
condition: '',
maxErrorValue: '±0.2%Un'
},
{
col1: '电压暂降、电压暂升和短时中断',
col2: '持续时间',
deviceLevel: 'A',
deviceLevel: 'A',
measurementType:'时间',
condition: '',
maxErrorValue: '±1周波'
condition: '',
maxErrorValue: '±1周波'
},
])

View File

@@ -77,7 +77,7 @@ const acceptParams = (params: ExcelParameterProps) => {
// Excel 导入模板下载
const downloadTemp = () => {
if (!parameter.value.tempApi) return;
useDownload(parameter.value.tempApi, `${parameter.value.title}模板`,{},true);
useDownload(parameter.value.tempApi, `${parameter.value.title}模板`,{},false);
};
// 文件上传

View File

@@ -55,7 +55,7 @@
<el-input v-model="formContent.softwareVersion" placeholder="请输入软件版本"/>
</el-form-item>
<el-divider >参数信息</el-divider>
<el-form-item label="设备通道数" prop="devChns" >
<el-form-item label="通道数" prop="devChns" >
<el-select v-model="formContent.devChns" clearable placeholder="请选择设备通道数">
<el-option
v-for="item in dictStore.getDictData('Dev_Chns')"

View File

@@ -98,7 +98,7 @@ const columns = reactive<ColumnProps<Device.ResPqDev>[]>([
},
{
prop: 'devChns',
label: '设备通道数',
label: '通道数',
minWidth: 110,
},

View File

@@ -8,14 +8,14 @@
:cell-style="{ textAlign: 'center' }"
style="width: 100%"
:span-method="spanMethod"
border
:border="true"
class="custom-table"
>
<el-table-column label="被测量">
<el-table-column prop="col1" width="120"/>
<el-table-column prop="col2" width="100"/>
<el-table-column prop="col1" width="150"/>
<el-table-column prop="col2" width="120" />
</el-table-column>
<el-table-column prop="deviceLevel" label="检测装置级别" />
<el-table-column prop="deviceLevel" label="检测装置级别" width="120"/>
<el-table-column prop="measurementType" label="测量类型" />
<el-table-column prop="condition" label="测量条件" />
<el-table-column prop="maxErrorValue" label="最大误差" />
@@ -78,58 +78,86 @@ const spanMethod = ({
rowIndex,
columnIndex,
}: SpanMethodProps) => {
if (columnIndex === 0 ) { // 检查是否为第一列
if (rowIndex === 2||rowIndex === 5 ||rowIndex === 21||rowIndex === 23) { // 检查是否为第三行
if (columnIndex === 0) {
if (rowIndex <= 1 || rowIndex === 7 || rowIndex == 20) {
return {
rowspan: 2, // 合并行数
colspan: 1, // 单元格列数
};
}else if (rowIndex === 8) { //
rowspan: 1,
colspan: 2,
}
}
if (rowIndex === 2) {
return {
rowspan: 8,
colspan: 1,
};
}
else if (rowIndex === 16) { //
return {
rowspan: 4,
colspan: 1,
};
}
else if (rowIndex === 3 ||rowIndex === 6 ||rowIndex === 9 || rowIndex === 10|| rowIndex === 11
|| rowIndex === 12|| rowIndex === 13|| rowIndex === 14|| rowIndex === 15
|| rowIndex === 17 || rowIndex === 18|| rowIndex === 19
|| rowIndex === 22 ||rowIndex === 24) { // 检查是否为第四行
rowspan: 3, // 不显示该单元格
colspan: 2,
}
}
if (rowIndex === 3 || rowIndex === 4 || rowIndex === 6 || rowIndex >= 9 && rowIndex <= 15 || rowIndex >= 17 && rowIndex <= 19 || rowIndex === 22 || rowIndex === 24) {
return {
rowspan: 0, // 不显示该单元格
colspan: 0,
};
}
}
if (rowIndex === 5 || rowIndex === 23) {
return {
rowspan: 2,
colspan: 1,
}
}
if (rowIndex === 8) {
return {
rowspan: 8,
colspan: 2,
}
}
if (rowIndex === 16) {
return {
rowspan: 4,
colspan: 2,
}
}
if (rowIndex === 21 || rowIndex === 22) {
return {
rowspan: 2,
colspan: 2,
}
}
}
if (columnIndex === 1 || columnIndex === 2){
if (rowIndex === 2
|| rowIndex === 8|| rowIndex === 10|| rowIndex === 12|| rowIndex === 14
|| rowIndex === 16|| rowIndex === 18
|| rowIndex === 21) {
if (columnIndex === 1) {
if (rowIndex <= 4 || rowIndex >= 7 && rowIndex <= 22) {
return {
rowspan: 2,
colspan: 1,
};
}
else if (rowIndex === 3
|| rowIndex === 9|| rowIndex === 11|| rowIndex === 13|| rowIndex === 15
|| rowIndex === 17|| rowIndex === 19
|| rowIndex === 22) { // 检查是否为第四行
return {
rowspan: 0, // 不显示该单元格
rowspan: 0,
colspan: 0,
};
}
}
}
}
if (columnIndex === 2) {
if (rowIndex === 2 || rowIndex === 8 || rowIndex === 10 || rowIndex === 12 || rowIndex === 14 || rowIndex === 16 || rowIndex === 18 || rowIndex === 21) {
return {
rowspan: 2,
colspan: 1,
}
}
if (rowIndex === 3 || rowIndex === 9 || rowIndex === 11 || rowIndex === 13 || rowIndex === 15 || rowIndex === 17 || rowIndex === 19 || rowIndex === 22) {
return {
rowspan: 0,
colspan: 0,
}
}
}
if (columnIndex === 3) {
if (rowIndex === 2 || rowIndex === 8 || rowIndex === 10 || rowIndex === 12 || rowIndex === 14 || rowIndex === 16 || rowIndex === 18 || rowIndex === 21) {
return {
rowspan: 2,
colspan: 1,
}
}
if (rowIndex === 3 || rowIndex === 9 || rowIndex === 11 || rowIndex === 13 || rowIndex === 15 || rowIndex === 17 || rowIndex === 19 || rowIndex === 22) {
return {
rowspan: 0,
colspan: 0,
}
}
}
};
// 关闭弹窗

View File

@@ -123,7 +123,7 @@ const close = () => {
const save = () => {
try {
dialogFormRef.value?.validate(async (valid: boolean) => {
console.log("11111111111111111")
if (valid) {
if (formContent.value.id) {
await updateTestSource(formContent.value);

View File

@@ -55,6 +55,7 @@
:dialogTitle="dialogTitle"
:is-read-only="isReadOnly"
@update:visible="dialogFormVisible = $event"
ref='testSourcePopup'
/>
<!-- 查看误差体系详细信息 -->
<ErrorStandardDialog
@@ -62,6 +63,7 @@
:formData='detail_dialogForm'
:dialogTitle='detail_dialogTitle'
@update:visible='detail_dialogFormVisible = $event'
ref="errorStandardPopup"
/>
</div>
<devTransfer
@@ -177,7 +179,7 @@ const columns = reactive<ColumnProps<Plan.PlanAndSourceBO>[]>([
render: scope => {
return (
<div class='flx-flex-start'>
<el-button type='primary' link onClick={() => showData(scope.row.testSourceName)}>
<el-button type='primary' link onClick={() => showTestSource(scope.row.testSourceName)}>
{scope.row.testSourceName}
</el-button>
<moreButtons isShow={isVisible(scope.row)} ></moreButtons>
@@ -193,7 +195,7 @@ const columns = reactive<ColumnProps<Plan.PlanAndSourceBO>[]>([
fieldNames: { label: 'label', value: 'id' },
render: scope => {
return (
<el-button type='primary' link onClick={() => showData(scope.row.script_Id)}>
<el-button type='primary' link onClick={() => showTestScript(scope.row.script_Id)}>
{getScriptName(scope.row.script_Id)}
</el-button>
)
@@ -278,15 +280,25 @@ function isVisible(row: Plan.PlanAndSourceBO) {
else
return true
}
const errorStandardPopup = ref()
function showData(row: string) {
detail_dialogTitle.value = row
detail_dialogFormVisible.value = true // 显示对话框
errorStandardPopup.value?.open(row, row)
// router.push({
// path: "/machine/device",
// query: { id: row }
// });
}
const testSourcePopup = ref()
function showTestSource(row: string) {
//testSourcePopup.value?.open('view', row,'模拟式')
}
function showTestScript(row: string) {
}
function handleFiles(event: Event) {