微调
This commit is contained in:
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@@ -2,6 +2,7 @@
|
|||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"daterange",
|
"daterange",
|
||||||
"errordata",
|
"errordata",
|
||||||
|
"errordetail",
|
||||||
"logdata",
|
"logdata",
|
||||||
"resourcedata",
|
"resourcedata",
|
||||||
"resourcename",
|
"resourcename",
|
||||||
|
|||||||
@@ -4,33 +4,152 @@ const errordata = ref<ErrorSystem.ErrorSystemList[]>([
|
|||||||
{
|
{
|
||||||
'id': '1',
|
'id': '1',
|
||||||
'name': 'Q/GDW 1650.2- 2016',
|
'name': 'Q/GDW 1650.2- 2016',
|
||||||
|
'publishTime':'',
|
||||||
'year':'2016',
|
'year':'2016',
|
||||||
'level':'A级',
|
'level':'A级',
|
||||||
'details': [
|
'state':'',
|
||||||
{ measured: '详细1-1', deviceLevel: '详细1-2', condition: '详细1-3', maxErrorValue: '详细1-4' },
|
|
||||||
{ measured: '详细1-5', deviceLevel: '详细1-6', condition: '详细1-7', maxErrorValue: '详细1-8' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'id': '2',
|
'id': '2',
|
||||||
'name': 'Q/GDW 10650.2 - 2021',
|
'name': 'Q/GDW 10650.2 - 2021',
|
||||||
|
'publishTime':'',
|
||||||
'year':'2021',
|
'year':'2021',
|
||||||
'level':'A级',
|
'level':'A级',
|
||||||
'details': [
|
'state':'',
|
||||||
{ measured: '详细1-1', deviceLevel: '详细1-2', condition: '详细1-3', maxErrorValue: '详细1-4' },
|
|
||||||
{ measured: '详细1-5', deviceLevel: '详细1-6', condition: '详细1-7', maxErrorValue: '详细1-8' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'id': '3',
|
'id': '3',
|
||||||
'name': 'GBT 19862 - 2016',
|
'name': 'GBT 19862 - 2016',
|
||||||
|
'publishTime':'',
|
||||||
'year':'2016',
|
'year':'2016',
|
||||||
'level':'A级',
|
'level':'A级',
|
||||||
'details': [
|
'state':'',
|
||||||
{ measured: '详细1-1', deviceLevel: '详细1-2', condition: '详细1-3', maxErrorValue: '详细1-4' },
|
|
||||||
{ measured: '详细1-5', deviceLevel: '详细1-6', condition: '详细1-7', maxErrorValue: '详细1-8' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
|
|
||||||
export default errordata
|
const errordetail = ref<ErrorSystem.ErrorSystemDetail[]>([
|
||||||
|
{
|
||||||
|
measured: '电压',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: '10%~150%标称电压',
|
||||||
|
maxErrorValue: '±0.1%Un'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '频率',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: '42.5~57.5 Hz',
|
||||||
|
maxErrorValue: '±0.01Hz'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '电压三相不平衡度',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: '0.5%~5%',
|
||||||
|
maxErrorValue: '±0.15%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '电压三相不平衡度',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: '5%(不包含)~ 40%',
|
||||||
|
maxErrorValue: '±0.3%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '电流三相不平衡度',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: '',
|
||||||
|
maxErrorValue: '±1%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '短时闪变',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'Pst:0.2~10',
|
||||||
|
maxErrorValue: '±5%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '谐波电压',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'Uh≥1%Un',
|
||||||
|
maxErrorValue: '±5%Uh'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '谐波电压',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'Uh<1%Un',
|
||||||
|
maxErrorValue: '±0.05%Un'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '谐波电流',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'In≥3%In',
|
||||||
|
maxErrorValue: '±5%Ih'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '谐波电流',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'In<3%In',
|
||||||
|
maxErrorValue: '±0.15%In'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '谐波功率',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'Ph≥150W',
|
||||||
|
maxErrorValue: '±1%Ph'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '谐波功率',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'Ph<150W',
|
||||||
|
maxErrorValue: '±1.5W'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '间谐波电压',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'Uh≥1%Un',
|
||||||
|
maxErrorValue: '±5%Uh'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '间谐波电压',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'Uh<1%Un',
|
||||||
|
maxErrorValue: '±0.05%Un'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '间谐波电流',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'In≥3%In',
|
||||||
|
maxErrorValue: '±5%Ih'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '间谐波电流',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'In<3%In',
|
||||||
|
maxErrorValue: '±0.15%In'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '电流',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: 'I≥0.05In',
|
||||||
|
maxErrorValue: '±0.5%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '电流',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: '0.01In≤I<0.05In',
|
||||||
|
maxErrorValue: '±1%'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '暂态幅值',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: '',
|
||||||
|
maxErrorValue: '±0.2%Un'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
measured: '暂态时间',
|
||||||
|
deviceLevel: 'A',
|
||||||
|
condition: '',
|
||||||
|
maxErrorValue: '±1周波'
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
export default {errordata,errordetail}
|
||||||
@@ -4,14 +4,18 @@ export namespace ErrorSystem {
|
|||||||
export interface ErrorSystemList {
|
export interface ErrorSystemList {
|
||||||
id: string;//误差体系表Id
|
id: string;//误差体系表Id
|
||||||
name: string;//误差体系名称
|
name: string;//误差体系名称
|
||||||
|
publishTime:string;//发布时间
|
||||||
year:string;//标准实施年份
|
year:string;//标准实施年份
|
||||||
level:string;//使用设备等级
|
level:string;//使用设备等级
|
||||||
details?: Array<{
|
state:string;//状态
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 查看详细误差体系
|
||||||
|
export interface ErrorSystemDetail {
|
||||||
measured: string;//被测量
|
measured: string;//被测量
|
||||||
deviceLevel: string;//检测装置级别
|
deviceLevel: string;//检测装置级别
|
||||||
condition: string;//测量条件
|
condition: string;//测量条件
|
||||||
maxErrorValue: string;//最大误差
|
maxErrorValue: string;//最大误差
|
||||||
}>; // 详细信息
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -223,7 +223,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
|||||||
'name': '普通表格',
|
'name': '普通表格',
|
||||||
|
|
||||||
'path':'/plan/planList/index',
|
'path':'/plan/planList/index',
|
||||||
'sort':71,
|
'sort':100,
|
||||||
'type':'菜单',
|
'type':'菜单',
|
||||||
'remark':'检测计划描述',
|
'remark':'检测计划描述',
|
||||||
'route_Name':'route',
|
'route_Name':'route',
|
||||||
@@ -235,7 +235,7 @@ const resourcedata = ref<Resource.ResResourceList[]>([
|
|||||||
'name': '表格树',
|
'name': '表格树',
|
||||||
|
|
||||||
'path':'/plan/planList/index',
|
'path':'/plan/planList/index',
|
||||||
'sort':72,
|
'sort':100,
|
||||||
'type':'菜单',
|
'type':'菜单',
|
||||||
'remark':'检测计划描述',
|
'remark':'检测计划描述',
|
||||||
'route_Name':'route',
|
'route_Name':'route',
|
||||||
|
|||||||
@@ -1,91 +0,0 @@
|
|||||||
<template >
|
|
||||||
<el-dialog :title="dialogTitle" :model-value="visible" @close="handleCancel" v-bind="dialogSmall" >
|
|
||||||
<el-form-item label="指标类型" prop="type">
|
|
||||||
<el-select
|
|
||||||
class='select'
|
|
||||||
placeholder='选择时间单位'
|
|
||||||
>
|
|
||||||
<!-- 采用 v-for 动态渲染 -->
|
|
||||||
<el-option
|
|
||||||
v-for="unit in typeList"
|
|
||||||
:key="unit.value"
|
|
||||||
:label="unit.label"
|
|
||||||
:value="unit.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
|
||||||
<el-button @click="handleCancel">取 消</el-button>
|
|
||||||
<el-button type="primary" @click="handleSubmit">新增</el-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts" setup name="IndicatorTypeDialog">
|
|
||||||
import { defineProps, defineEmits, reactive,watch } from 'vue';
|
|
||||||
import { dialogSmall} from '@/utils/elementBind'
|
|
||||||
const props = defineProps<{
|
|
||||||
visible: boolean;
|
|
||||||
dialogTitle: string;
|
|
||||||
|
|
||||||
formData: {
|
|
||||||
|
|
||||||
id:string;
|
|
||||||
name: string;
|
|
||||||
path: string;
|
|
||||||
sort: number;
|
|
||||||
type: string;
|
|
||||||
remark: string;
|
|
||||||
route_Name: string;
|
|
||||||
};
|
|
||||||
}>();
|
|
||||||
|
|
||||||
const typeList = [
|
|
||||||
{ label: '电压', value: '电压' },
|
|
||||||
{ label: '频率', value: '频率' },
|
|
||||||
{ label: '电压三相不平衡度', value: '电压三相不平衡度' },
|
|
||||||
{ label: '电流三相不平衡度', value: '电流三相不平衡度' },
|
|
||||||
{ label: '电压波动', value: '电压波动' },
|
|
||||||
{ label: '短时闪变', value: '短时闪变' },
|
|
||||||
{ label: '谐波电压', value: '谐波电压' },
|
|
||||||
{ label: '谐波电流', value: '谐波电流' },
|
|
||||||
{ label: '谐波相角', value: '谐波相角' },
|
|
||||||
{ label: '谐波功率', value: '谐波功率' },
|
|
||||||
{ label: '间谐波电压', value: '间谐波电压' },
|
|
||||||
{ label: '间谐波电流', value: '间谐波电流' },
|
|
||||||
{ label: '功率', value: '功率' },
|
|
||||||
{ label: '电流', value: '电流' },
|
|
||||||
{ label: '暂态电压幅值', value: '暂态电压幅值' },
|
|
||||||
{ label: '暂态持续时间', value: '暂态持续时间' },
|
|
||||||
];
|
|
||||||
|
|
||||||
const rules = {
|
|
||||||
name :[
|
|
||||||
{require:true,trigger:"blur",message:"请填写菜单名称"}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
const emit = defineEmits<{
|
|
||||||
(e: 'update:visible', value: boolean): void;
|
|
||||||
(e: 'submit', data: any): void;
|
|
||||||
}>();
|
|
||||||
|
|
||||||
const handleCancel = () => {
|
|
||||||
emit('update:visible', false); // 关闭对话框
|
|
||||||
};
|
|
||||||
|
|
||||||
const handleSubmit = () => {
|
|
||||||
emit('submit', props.formData); // 提交表单数据
|
|
||||||
emit('update:visible', false); // 提交后关闭对话框
|
|
||||||
};
|
|
||||||
|
|
||||||
// 当 props.visible 改变时,更新 formData
|
|
||||||
watch(() => props.visible, (newVal) => {
|
|
||||||
if (!newVal) {
|
|
||||||
// 这里可以重置表单数据,如果需要的话
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :title="dialogTitle" :model-value="visible" @close="handleCancel" v-bind="dialogBig">
|
||||||
|
<ProTable
|
||||||
|
ref='proTable'
|
||||||
|
:columns='columns'
|
||||||
|
:data='errorData'
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="IndicatorTypeDialog">
|
||||||
|
import { defineProps, defineEmits, reactive,watch,ref } from 'vue';
|
||||||
|
import { dialogBig} from '@/utils/elementBind'
|
||||||
|
import type { ColumnProps } from '@/components/ProTable/interface'
|
||||||
|
import type { ErrorSystem } from '@/api/error/interface'
|
||||||
|
import errorDataList from '@/api/error/errorData'
|
||||||
|
const errorData = errorDataList.errordetail
|
||||||
|
|
||||||
|
// 表格配置项
|
||||||
|
const columns = reactive<ColumnProps<ErrorSystem.ErrorSystemDetail>[]>([
|
||||||
|
{
|
||||||
|
prop: 'measured',
|
||||||
|
label: '被测量',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'deviceLevel',
|
||||||
|
label: '检测装置级别',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'condition',
|
||||||
|
label: '测量条件',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'maxErrorValue',
|
||||||
|
label: '最大误差',
|
||||||
|
},
|
||||||
|
])
|
||||||
|
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
visible: boolean;
|
||||||
|
dialogTitle: string;
|
||||||
|
|
||||||
|
formData: {
|
||||||
|
measured: string,
|
||||||
|
deviceLevel: string,
|
||||||
|
condition: string,
|
||||||
|
maxErrorValue: string
|
||||||
|
};
|
||||||
|
}>();
|
||||||
|
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'update:visible', value: boolean): void;
|
||||||
|
(e: 'submit', data: any): void;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const handleCancel = () => {
|
||||||
|
emit('update:visible', false); // 关闭对话框
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 当 props.visible 改变时,更新 formData
|
||||||
|
watch(() => props.visible, (newVal) => {
|
||||||
|
if (!newVal) {
|
||||||
|
// 这里可以重置表单数据,如果需要的话
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
@@ -7,12 +7,12 @@
|
|||||||
<el-row :gutter="20" >
|
<el-row :gutter="20" >
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item label="误差体系名称" prop="name">
|
<el-form-item label="误差体系名称" prop="name">
|
||||||
<el-input placeholder="标准号+年份+设备等级"/>
|
<el-input v-model='formData.name' placeholder="标准号+年份+设备等级"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="发布时间" prop="publishTime">
|
<el-form-item label="发布时间" prop="publishTime">
|
||||||
<el-input />
|
<el-input v-model="formData.publishTime" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@@ -23,21 +23,21 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20" >
|
<el-row :gutter="20" >
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item label="适用设备等级" prop="type">
|
<el-form-item label="适用设备等级" prop="level">
|
||||||
<el-select placeholder="请选择设备等级">
|
<el-select v-model='formData.level' placeholder="请选择设备等级">
|
||||||
<el-option label="A级" value="A级" />
|
<el-option label="A级" value="A级" />
|
||||||
<el-option label="S级" value="S级" />
|
<el-option label="S级" value="S级" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="实施时间" prop="publishTime">
|
<el-form-item label="实施时间" prop="year">
|
||||||
<el-input />
|
<el-input v-model='formData.year'/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="状态" prop="type">
|
<el-form-item label="状态" prop="state">
|
||||||
<el-select placeholder="请选择状态">
|
<el-select v-model='formData.state' placeholder="请选择状态">
|
||||||
<el-option label="启用" value="启用" />
|
<el-option label="启用" value="启用" />
|
||||||
<el-option label="停用" value="停用" />
|
<el-option label="停用" value="停用" />
|
||||||
</el-select>
|
</el-select>
|
||||||
@@ -53,12 +53,12 @@
|
|||||||
<el-button :icon='Delete' type="danger" >批量删除</el-button>
|
<el-button :icon='Delete' type="danger" >批量删除</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table :data="tableData" style="width: 100%;text-align: center" >
|
<el-table :data="tableData" style="width: 100%">
|
||||||
<el-table-column type="selection" width="55" />
|
<el-table-column type="selection" width="55" />
|
||||||
<el-table-column prop="id" label="序号" width="60" />
|
<el-table-column prop="id" label="序号" width="60" />
|
||||||
<el-table-column prop="type" label="电能质量检测指标类型" width="200"/>
|
<el-table-column prop="type" label="电能质量检测指标类型" width="200"/>
|
||||||
<el-table-column label="起止范围">
|
<el-table-column label="起止范围" style="text-align: center;">
|
||||||
<el-table-column label="起始">
|
<el-table-column label="起始" style="text-align: center;">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-row type="flex" align="middle">
|
<el-row type="flex" align="middle">
|
||||||
<el-col :span="16">
|
<el-col :span="16">
|
||||||
@@ -158,18 +158,19 @@
|
|||||||
dialogTitle: string;
|
dialogTitle: string;
|
||||||
|
|
||||||
formData: {
|
formData: {
|
||||||
|
|
||||||
id:string;
|
id:string;
|
||||||
name: string;
|
name: string;
|
||||||
path: string;
|
publishTime:string;
|
||||||
sort: number;
|
year: string;
|
||||||
type: string;
|
level: string;
|
||||||
remark: string;
|
state: string;
|
||||||
route_Name: string;
|
|
||||||
};
|
};
|
||||||
}>();
|
}>();
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
const dialogTitle = ref('新增检测指标误差项')
|
const dialogForm =ref({
|
||||||
|
type : '',
|
||||||
|
})
|
||||||
|
|
||||||
const errorTypeOptions = [
|
const errorTypeOptions = [
|
||||||
{ label: '绝对值-标称值', value: 'type1' },
|
{ label: '绝对值-标称值', value: 'type1' },
|
||||||
{ label: '相对值-I类', value: 'type2' },
|
{ label: '相对值-I类', value: 'type2' },
|
||||||
@@ -234,11 +235,6 @@ const errorEndOptions = [
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
const rules = {
|
|
||||||
name :[
|
|
||||||
{require:true,trigger:"blur",message:"请填写菜单名称"}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'update:visible', value: boolean): void;
|
(e: 'update:visible', value: boolean): void;
|
||||||
(e: 'submit', data: any): void;
|
(e: 'submit', data: any): void;
|
||||||
@@ -267,6 +263,7 @@ const errorEndOptions = [
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.form-grid {
|
.form-grid {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row; /* 横向排列 */
|
flex-direction: row; /* 横向排列 */
|
||||||
|
|||||||
@@ -3,7 +3,8 @@
|
|||||||
<el-form-item label="指标类型" prop="type">
|
<el-form-item label="指标类型" prop="type">
|
||||||
<el-select
|
<el-select
|
||||||
class='select'
|
class='select'
|
||||||
placeholder='选择时间单位'
|
placeholder='选择指标类型'
|
||||||
|
v-model="formData.type"
|
||||||
>
|
>
|
||||||
<!-- 采用 v-for 动态渲染 -->
|
<!-- 采用 v-for 动态渲染 -->
|
||||||
<el-option
|
<el-option
|
||||||
@@ -24,24 +25,20 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="IndicatorTypeDialog">
|
<script lang="ts" setup name="IndicatorTypeDialog">
|
||||||
import { defineProps, defineEmits, reactive,watch } from 'vue';
|
import { defineProps, defineEmits, reactive,watch ,ref} from 'vue';
|
||||||
import { dialogSmall} from '@/utils/elementBind'
|
import { dialogSmall} from '@/utils/elementBind'
|
||||||
|
const dialogTitle = ref('新增检测指标误差项')
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
dialogTitle: string;
|
|
||||||
|
|
||||||
formData: {
|
formData: {
|
||||||
|
|
||||||
id:string;
|
|
||||||
name: string;
|
|
||||||
path: string;
|
|
||||||
sort: number;
|
|
||||||
type: string;
|
type: string;
|
||||||
remark: string;
|
|
||||||
route_Name: string;
|
|
||||||
};
|
};
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
const formData = reactive({
|
||||||
|
type: ''
|
||||||
|
});
|
||||||
|
|
||||||
const typeList = [
|
const typeList = [
|
||||||
{ label: '电压', value: '电压' },
|
{ label: '电压', value: '电压' },
|
||||||
{ label: '频率', value: '频率' },
|
{ label: '频率', value: '频率' },
|
||||||
|
|||||||
@@ -16,19 +16,27 @@
|
|||||||
</template>
|
</template>
|
||||||
<!-- 表格操作 -->
|
<!-- 表格操作 -->
|
||||||
<template #operation='scope'>
|
<template #operation='scope'>
|
||||||
<el-button type='primary' link :icon='View' @row-click="handleRowClick">查看</el-button>
|
<el-button type='primary' link :icon='View' @click="handleRowClick(scope.row)">查看</el-button>
|
||||||
<el-button type='primary' link :icon='EditPen' @click="openEditDialog(scope.row)">编辑</el-button>
|
<el-button type='primary' link :icon='EditPen' @click="openEditDialog(scope.row)">编辑</el-button>
|
||||||
<el-button type='primary' link :icon='Delete' >删除</el-button>
|
<el-button type='primary' link :icon='Delete' >删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</ProTable>
|
</ProTable>
|
||||||
|
|
||||||
<!-- 新增/编辑资源对话框 -->
|
<!-- 新增/编辑误差体系对话框 -->
|
||||||
<ResourceDialog
|
<ErrorSystemDialog
|
||||||
:visible="dialogFormVisible"
|
:visible="dialogFormVisible"
|
||||||
:formData="dialogForm"
|
:formData="dialogForm"
|
||||||
:dialogTitle="dialogTitle"
|
:dialogTitle="dialogTitle"
|
||||||
@update:visible="dialogFormVisible = $event"
|
@update:visible="dialogFormVisible = $event"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 查看误差体系详细信息 -->
|
||||||
|
<ErrorStandardDialog
|
||||||
|
:visible="detail_dialogFormVisible"
|
||||||
|
:formData="detail_dialogForm"
|
||||||
|
:dialogTitle="detail_dialogTitle"
|
||||||
|
@update:visible="detail_dialogFormVisible = $event"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -39,16 +47,30 @@ import { CirclePlus, Delete,EditPen,View} from '@element-plus/icons-vue'
|
|||||||
import errorDataList from '@/api/error/errorData'
|
import errorDataList from '@/api/error/errorData'
|
||||||
import { reactive,ref } from 'vue'
|
import { reactive,ref } from 'vue'
|
||||||
import type { ErrorSystem } from '@/api/error/interface'
|
import type { ErrorSystem } from '@/api/error/interface'
|
||||||
import ResourceDialog from "@/views/machine/errorSystem/components/ErrorSystemDialog.vue"; // 导入子组件
|
import ErrorSystemDialog from "@/views/machine/errorSystem/components/ErrorSystemDialog.vue"; // 导入子组件
|
||||||
|
import ErrorStandardDialog from "@/views/machine/errorSystem/components/ErrorStandardDialog.vue"; // 导入子组件
|
||||||
let multipleSelection = ref<string[]>([])
|
let multipleSelection = ref<string[]>([])
|
||||||
const errorData = errorDataList
|
const errorData = errorDataList.errordata
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
const dialogTitle = ref('新增误差体系')
|
const dialogTitle = ref('新增误差体系')
|
||||||
const dialogForm = ref<ErrorSystem.ErrorSystemList>({
|
const dialogForm = ref<ErrorSystem.ErrorSystemList>({
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
|
publishTime: '',
|
||||||
year:'',
|
year:'',
|
||||||
level:'',
|
level:'',
|
||||||
|
state: '',
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const detail_dialogFormVisible = ref(false)
|
||||||
|
const detail_dialogTitle = ref('Q/GDW 10650.2-2021 误差体系')
|
||||||
|
const detail_dialogForm = ref<ErrorSystem.ErrorSystemDetail>({
|
||||||
|
measured: '',//被测量
|
||||||
|
deviceLevel: '',//检测装置级别
|
||||||
|
condition: '',//测量条件
|
||||||
|
maxErrorValue: '',//最大误差
|
||||||
});
|
});
|
||||||
|
|
||||||
// 表格配置项
|
// 表格配置项
|
||||||
@@ -79,23 +101,30 @@ const columns = reactive<ColumnProps<ErrorSystem.ErrorSystemList>[]>([
|
|||||||
])
|
])
|
||||||
|
|
||||||
// 打开编辑对话框
|
// 打开编辑对话框
|
||||||
const openEditDialog = (resource: ErrorSystem.ErrorSystemList) => {
|
const openEditDialog = (errorSystem: ErrorSystem.ErrorSystemList) => {
|
||||||
|
errorSystem.publishTime ='2024'
|
||||||
|
errorSystem.state = '启用';
|
||||||
|
dialogForm.value = {...errorSystem};
|
||||||
|
dialogTitle.value = '编辑误差体系';
|
||||||
|
dialogFormVisible.value = true; // 打开对话框
|
||||||
};
|
};
|
||||||
|
|
||||||
const openAddDialog = () => {
|
const openAddDialog = () => {
|
||||||
dialogForm.value = {
|
dialogForm.value = {
|
||||||
id: '',
|
id: '',
|
||||||
name: '',
|
name: '',
|
||||||
|
publishTime: '',
|
||||||
year: '',
|
year: '',
|
||||||
level: '',
|
level: '',
|
||||||
|
state: '',
|
||||||
};
|
};
|
||||||
|
dialogTitle.value = '新增误差体系';
|
||||||
dialogFormVisible.value = true; // 打开对话框
|
dialogFormVisible.value = true; // 打开对话框
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleRowClick = (errorSystem: ErrorSystem.ErrorSystemList) =>{
|
||||||
const handleRowClick = (row: ErrorSystem.ErrorSystemList) =>{
|
detail_dialogTitle.value = errorSystem.name;
|
||||||
|
detail_dialogFormVisible.value = true; // 显示对话框
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
"ee-core": "2.10.0",
|
"ee-core": "2.10.0",
|
||||||
"electron-updater": "^5.3.0",
|
"electron-updater": "^5.3.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mqtt": "^5.10.1"
|
"mqtt": "^5.10.1",
|
||||||
|
"sass": "^1.80.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user