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

View File

@@ -77,7 +77,7 @@ const acceptParams = (params: ExcelParameterProps) => {
// Excel 导入模板下载 // Excel 导入模板下载
const downloadTemp = () => { const downloadTemp = () => {
if (!parameter.value.tempApi) return; 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-input v-model="formContent.softwareVersion" placeholder="请输入软件版本"/>
</el-form-item> </el-form-item>
<el-divider >参数信息</el-divider> <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-select v-model="formContent.devChns" clearable placeholder="请选择设备通道数">
<el-option <el-option
v-for="item in dictStore.getDictData('Dev_Chns')" v-for="item in dictStore.getDictData('Dev_Chns')"

View File

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

View File

@@ -8,14 +8,14 @@
:cell-style="{ textAlign: 'center' }" :cell-style="{ textAlign: 'center' }"
style="width: 100%" style="width: 100%"
:span-method="spanMethod" :span-method="spanMethod"
border :border="true"
class="custom-table" class="custom-table"
> >
<el-table-column label="被测量"> <el-table-column label="被测量">
<el-table-column prop="col1" width="120"/> <el-table-column prop="col1" width="150"/>
<el-table-column prop="col2" width="100"/> <el-table-column prop="col2" width="120" />
</el-table-column> </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="measurementType" label="测量类型" />
<el-table-column prop="condition" label="测量条件" /> <el-table-column prop="condition" label="测量条件" />
<el-table-column prop="maxErrorValue" label="最大误差" /> <el-table-column prop="maxErrorValue" label="最大误差" />
@@ -78,58 +78,86 @@ const spanMethod = ({
rowIndex, rowIndex,
columnIndex, columnIndex,
}: SpanMethodProps) => { }: SpanMethodProps) => {
if (columnIndex === 0) {
if (columnIndex === 0 ) { // 检查是否为第一列 if (rowIndex <= 1 || rowIndex === 7 || rowIndex == 20) {
if (rowIndex === 2||rowIndex === 5 ||rowIndex === 21||rowIndex === 23) { // 检查是否为第三行
return { return {
rowspan: 2, // 合并行数 rowspan: 1,
colspan: 1, // 单元格列数 colspan: 2,
}; }
}else if (rowIndex === 8) { // }
if (rowIndex === 2) {
return { return {
rowspan: 8, rowspan: 3, // 不显示该单元格
colspan: 1, colspan: 2,
}; }
} }
else if (rowIndex === 16) { // if (rowIndex === 3 || rowIndex === 4 || rowIndex === 6 || rowIndex >= 9 && rowIndex <= 15 || rowIndex >= 17 && rowIndex <= 19 || rowIndex === 22 || rowIndex === 24) {
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) { // 检查是否为第四行
return { return {
rowspan: 0, // 不显示该单元格 rowspan: 0, // 不显示该单元格
colspan: 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) {
if (columnIndex === 1 || columnIndex === 2){ if (rowIndex <= 4 || rowIndex >= 7 && rowIndex <= 22) {
if (rowIndex === 2
|| rowIndex === 8|| rowIndex === 10|| rowIndex === 12|| rowIndex === 14
|| rowIndex === 16|| rowIndex === 18
|| rowIndex === 21) {
return { return {
rowspan: 2, rowspan: 0,
colspan: 1,
};
}
else if (rowIndex === 3
|| rowIndex === 9|| rowIndex === 11|| rowIndex === 13|| rowIndex === 15
|| rowIndex === 17|| rowIndex === 19
|| rowIndex === 22) { // 检查是否为第四行
return {
rowspan: 0, // 不显示该单元格
colspan: 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 = () => { const save = () => {
try { try {
dialogFormRef.value?.validate(async (valid: boolean) => { dialogFormRef.value?.validate(async (valid: boolean) => {
console.log("11111111111111111")
if (valid) { if (valid) {
if (formContent.value.id) { if (formContent.value.id) {
await updateTestSource(formContent.value); await updateTestSource(formContent.value);

View File

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