Files
admin-sjzx/src/views/pqs/runManage/assessment/components/assess/information.vue

448 lines
16 KiB
Vue
Raw Normal View History

2025-03-31 14:33:05 +08:00
<template>
<div>
<el-collapse v-model="activeNames">
<el-collapse v-model="activeNames">
<el-collapse-item title="用户参数维护" :name="1">
<el-descriptions :column="4" border>
2025-08-26 11:07:11 +08:00
<el-descriptions-item label="所在地市">{{ form.deptName }}</el-descriptions-item>
<el-descriptions-item label="用户名称">{{ form.assessName }}</el-descriptions-item>
<el-descriptions-item label="用户协议容量(MVA)">{{ form.agreedCapacity }}</el-descriptions-item>
<el-descriptions-item label="是否包含电容器">{{ form.withCapacitor }}</el-descriptions-item>
<el-descriptions-item :label=windfarmCapacityLabel>{{ form.windfarmCapacity }}</el-descriptions-item>
2025-03-31 14:33:05 +08:00
</el-descriptions>
</el-collapse-item>
<el-collapse-item title="系统参数维护" :name="2">
<el-descriptions :column="4" border>
2025-08-26 11:07:11 +08:00
<el-descriptions-item label="接入变电站">{{ form.powerstationName }}</el-descriptions-item>
<el-descriptions-item label="变电站电压等级">{{ form.powerstationScale }}</el-descriptions-item>
<el-descriptions-item label="接入母线">{{ form.busName }}</el-descriptions-item>
<el-descriptions-item label="母线电压等级">{{ form.busScale }}</el-descriptions-item>
<el-descriptions-item label="供电设备容量(MVA)">{{ form.powersupplyCapacity }}</el-descriptions-item>
<el-descriptions-item label="最小短路容量(MVA)">{{ form.minshortcircuitCapacity }}</el-descriptions-item>
<el-descriptions-item label="PCC点名称">{{ form.lineName }}</el-descriptions-item>
<el-descriptions-item label="PCC点电网电阻">{{ form.lineGridreactance }}</el-descriptions-item>
<el-descriptions-item label="长度">{{ form.lineLen }}</el-descriptions-item>
<el-descriptions-item label="回路数">{{ form.lineNum }}</el-descriptions-item>
<el-descriptions-item label="导线类型">{{ form.linetypeId }}</el-descriptions-item>
2025-03-31 14:33:05 +08:00
</el-descriptions>
</el-collapse-item>
2025-08-26 11:07:11 +08:00
<el-collapse-item :title="item.name" v-for="(item, index) in column" :key="index" :name="index + 3">
2025-03-31 14:33:05 +08:00
<div style="height: 200px">
2025-08-26 11:07:11 +08:00
<vxe-table height="auto" :data="form[item.key]" v-bind="defaultAttribute" v-loading="item.loading">
2025-08-11 16:13:51 +08:00
<vxe-column type="seq" title="序号" width="80px"></vxe-column>
2025-03-31 14:33:05 +08:00
<vxe-column
v-for="(k, index) in item.child"
:key="index"
:field="k.field"
:title="k.title"
></vxe-column>
</vxe-table>
</div>
</el-collapse-item>
</el-collapse>
</el-collapse>
</div>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
2025-08-26 11:07:11 +08:00
import { userGetInfo ,
cableList,
assessTransformerParamList,
transformerList,
capacitorList,
windPowerList,
loadParamList,
loadList,
shockList,
characteristicList
} from '@/api/advance-boot/assess'
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
// 定义 props
const props = defineProps({
nodeId: {
type: [String, Number],
default: null
}
})
2025-03-31 14:33:05 +08:00
const activeNames = ref([1, 2, 3, 4, 5, 6, 7])
const form: any = ref({
2025-08-26 11:07:11 +08:00
deptName: '', // 所在地市
assessName: '', // 用户名称
agreedCapacity: '', // 用户协议容量(MVA)
withCapacitor: '', // 是否包含电容器
windFarms: '', // 风电场装机容量
powerstationName: '', // 接入变电站
powerstationScale: '', // 变电站电压等级
busName: '', // 接入母线
busScale: '', // 母线电压等级
powersupplyCapacity: '', // 供电设备容量(MVA)
minshortcircuitCapacity: '', // 最小短路容量(MVA)
lineName: '', // PCC点名称
lineGridreactance: '', // PCC点电网电阻
lineLen: '', // 长度
lineNum: '', // 回路数
linetypeId: '', // 导线类型
transformer: [], //变压器
capacitor: [], //电容器
windPower: [], //风电
2025-03-31 14:33:05 +08:00
load: [], //用户负荷
impact: [] //冲击性负荷
})
const column: any = ref([
{
2025-08-26 11:07:11 +08:00
loading: false,
2025-03-31 14:33:05 +08:00
name: '变压器参数维护',
key: 'transformer',
child: [
{
title: '用户变压器名称',
2025-08-26 11:07:11 +08:00
field: 'transName'
2025-03-31 14:33:05 +08:00
},
{
title: '变压器型号',
2025-08-26 11:07:11 +08:00
field: 'transtypeId'
2025-03-31 14:33:05 +08:00
},
{
title: '变压器台数',
2025-08-26 11:07:11 +08:00
field: 'transNum'
2025-03-31 14:33:05 +08:00
}
]
},
2025-08-26 11:07:11 +08:00
{
loading: false,
2025-03-31 14:33:05 +08:00
name: '电容器组参数维护',
key: 'capacitor',
child: [
{
title: '用户电容器名称',
2025-08-26 11:07:11 +08:00
field: 'capacitorName'
2025-03-31 14:33:05 +08:00
},
{
title: '电容器组数量',
2025-08-26 11:07:11 +08:00
field: 'capacitorNum'
2025-03-31 14:33:05 +08:00
},
{
title: '单组容量(kVar)',
2025-08-26 11:07:11 +08:00
field: 'capacitorCapacity'
2025-03-31 14:33:05 +08:00
},
{
title: '电抗率(%)',
2025-08-26 11:07:11 +08:00
field: 'capacitorReactance'
2025-03-31 14:33:05 +08:00
},
{
title: '电压等级',
2025-08-26 11:07:11 +08:00
field: 'capacitorScale'
2025-03-31 14:33:05 +08:00
}
]
},
{
2025-08-26 11:07:11 +08:00
loading: false,
2025-03-31 14:33:05 +08:00
name: '风电参数',
key: 'windPower',
child: [
{
title: '风机名称',
2025-08-26 11:07:11 +08:00
field: 'windgeneratorName'
2025-03-31 14:33:05 +08:00
},
{
title: '风机闪变系数',
2025-08-26 11:07:11 +08:00
field: 'flickerCoeff'
2025-03-31 14:33:05 +08:00
},
{
title: '风机额定视在功率',
2025-08-26 11:07:11 +08:00
field: 's'
2025-03-31 14:33:05 +08:00
}
]
},
{
2025-08-26 11:07:11 +08:00
loading: false,
2025-03-31 14:33:05 +08:00
name: '用户负荷',
key: 'load',
child: [
{
title: '配电窒名称',
2025-08-26 11:07:11 +08:00
field: 'loadName'
2025-03-31 14:33:05 +08:00
},
{
title: '进线电压',
2025-08-26 11:07:11 +08:00
field: 'linevoltageScale'
2025-03-31 14:33:05 +08:00
},
{
title: '配变容量(kVA)',
2025-08-26 11:07:11 +08:00
field: 'transhighCapacity'
2025-03-31 14:33:05 +08:00
},
{
title: '配电变压器阻抗(%)',
2025-08-26 11:07:11 +08:00
field: 'transImpedance'
2025-03-31 14:33:05 +08:00
},
{
title: '谐波源特性',
2025-08-26 11:07:11 +08:00
field: 'harmId'
2025-03-31 14:33:05 +08:00
},
{
title: '配变低压侧电压',
2025-08-26 11:07:11 +08:00
field: 'translowScale'
2025-03-31 14:33:05 +08:00
},
{
title: '非线性负荷功率(kW)',
2025-08-26 11:07:11 +08:00
field: 'nonlinearloadPower'
2025-03-31 14:33:05 +08:00
},
{
title: '功率因素',
2025-08-26 11:07:11 +08:00
field: 'powerFactor'
2025-03-31 14:33:05 +08:00
}
]
},
{
2025-08-26 11:07:11 +08:00
loading: false,
2025-03-31 14:33:05 +08:00
name: '冲击性负荷',
key: 'impact',
child: [
{
title: '冲击负荷类型',
2025-08-26 11:07:11 +08:00
field: 'inpactloadtypeId'
2025-03-31 14:33:05 +08:00
},
{
title: '数量',
2025-08-26 11:07:11 +08:00
field: 'inpactloadNum'
2025-03-31 14:33:05 +08:00
},
2025-08-26 11:07:11 +08:00
2025-03-31 14:33:05 +08:00
{
title: '启动容量倍数',
2025-08-26 11:07:11 +08:00
field: 'inpactloadPower'
2025-03-31 14:33:05 +08:00
},
{
2025-08-26 11:07:11 +08:00
title: '高压侧电压',
field: 'inpactloadhighScale'
2025-03-31 14:33:05 +08:00
},
{
title: '有无隔离变',
2025-08-26 11:07:11 +08:00
field: 'isIsolationtrans'
2025-03-31 14:33:05 +08:00
},
{
title: '隔离变阻抗(%)',
2025-08-26 11:07:11 +08:00
field: 'isolationtransImpedance'
2025-03-31 14:33:05 +08:00
},
{
title: '低压侧电压',
2025-08-26 11:07:11 +08:00
field: 'inpactloadlowScale'
2025-03-31 14:33:05 +08:00
},
{
title: '负荷频度选择',
2025-08-26 11:07:11 +08:00
field: 'inpactloadFreq'
2025-03-31 14:33:05 +08:00
},
{
title: '闪变叠加系数',
2025-08-26 11:07:11 +08:00
field: 'flickerCoeff'
2025-03-31 14:33:05 +08:00
}
]
}
])
2025-08-26 11:07:11 +08:00
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
// 创建计算属性来动态生成标签文本
const windfarmCapacityLabel = computed(() => {
if (form.value.isWindfarm === '01') {
return '风电场装机容量'
} else {
return '用户有功功率'
}
})
const filteredColumn = computed(() => {
// const windfarmValue = form.value.isWindfarm;
// if (windfarmValue === '01') {
// // 如果是风电场,显示除冲击负荷外的所有项
// return column.value.filter((item: any) => item.key !== 'impact')
// } else {
// // 如果不是风电场,显示除风电参数外的所有项
// return column.value.filter((item: any) => item.key !== 'windPower')
// }
})
const emit = defineEmits(['data-loaded'])
// 监听 nodeId 变化并执行相应操作
watch(() => props.nodeId, async (newId) => {
// 先清空表单数据
form.value = {
deptName: '', // 所在地市
assessName: '', // 用户名称
agreedCapacity: '', // 用户协议容量(MVA)
withCapacitor: '', // 是否包含电容器
windFarms: '', // 风电场装机容量
powerstationName: '', // 接入变电站
powerstationScale: '', // 变电站电压等级
busName: '', // 接入母线
busScale: '', // 母线电压等级
powersupplyCapacity: '', // 供电设备容量(MVA)
minshortcircuitCapacity: '', // 最小短路容量(MVA)
lineName: '', // PCC点名称
lineGridreactance: '', // PCC点电网电阻
lineLen: '', // 长度
lineNum: '', // 回路数
linetypeId: '', // 导线类型
transformer: [], // 变压器
capacitor: [], // 电容器
windPower: [], // 风电
load: [], // 用户负荷
impact: [] // 冲击性负荷
};
if (newId) {
userGetInfo({ assessId: newId }).then(async (res: any) => {
form.value = res.data
// 转换 withCapacitor 字段
if (form.value.withCapacitor === '00') {
form.value.withCapacitor = '否'
} else if (form.value.withCapacitor === '01') {
form.value.withCapacitor = '是'
}
//变电站电压等级
const voltageLevel = voltageleveloption.find(item => item.id === form.value.powerstationScale);
form.value.powerstationScale= voltageLevel?.name
//母线电压等级
const busScale = voltageleveloption.find(item => item.id === form.value.busScale);
form.value.busScale = busScale?.name
//导线类型
await cableList({}).then(res => {
form.value.linetypeId = res.data.find((item: any) => item.linetypeId === form.value.linetypeId)?.linetypeName
})
// 变压器参数维护
await assessTransformerParamList({ assessId: props.nodeId}).then(res => {
form.value.transformer = res.data
// 获取变压器类型字典数据
transformerList({}).then((res: any) => {
// 使用 map 方法创建新数组
form.value.transformer = form.value.transformer.map((transformerItem: any) => {
const found = res.data.find((item: any) => item.transtypeId == transformerItem.transtypeId)
if (found) {
return {
...transformerItem,
transtypeId: found.transtypeName
}
}
return transformerItem
})
})
})
// 电容器参数维护
await capacitorList({ assessId: props.nodeId }).then(res => {
form.value.capacitor = res.data
form.value.capacitor = form.value.capacitor.map((capacitorItem: any) => {
const voltageLevel = voltageleveloption.find(item => item.id === capacitorItem.capacitorScale);
if (voltageLevel) {
return {
...capacitorItem,
capacitorScale: voltageLevel.name
}
}
return capacitorItem
})
})
// 风电参数
await windPowerList({ assessId: props.nodeId }).then(res => {
form.value.windPower = res.data
})
// 用户负荷参数
await loadParamList({ assessId: props.nodeId }).then(res => {
form.value.load = res.data
// 谐波源特特性
characteristicList({}).then((res: any) => {
form.value.load = form.value.load.map((transformerItem: any) => {
const found = res.data.find((item: any) => item.harmId == transformerItem.harmId)
if (found) {
return {
...transformerItem,
harmId: found.harmName
}
}
return transformerItem
})
})
form.value.load = form.value.load.map((loadItem: any) => {
// 处理进线电压
const lineVoltage = voltageleveloption.find(item => item.id === loadItem.linevoltageScale);
// 处理配变低压侧电压
const transLowVoltage = voltageleveloption.find(item => item.id === loadItem.translowScale)
return {
...loadItem,
linevoltageScale: lineVoltage?.name || loadItem.linevoltageScale,
translowScale: transLowVoltage?.name || loadItem.translowScale
}
})
})
// 冲击性负荷
const startupOptions = ref<Array<{ label: string; value: string }>>([])
await shockList({ assessId: props.nodeId }).then(async (res: { data: never[] }) => {
form.value.impact = res.data
// 冲击负荷类型
const loadRes = await loadList({})
// 处理冲击负荷类型名称
form.value.impact = form.value.impact.map((impactItem: any) => {
const found = loadRes.data.find((item: any) => item.inpactloadtypeId == impactItem.inpactloadtypeId)
if (found) {
return {
...impactItem,
inpactloadtypeId: found.inpactloadtypeName
}
}
return impactItem
})
form.value.impact = form.value.impact.map((loadItem: any) => {
// 处理高压侧电压
const HeightVoltage = voltageleveloption.find(item => item.id === loadItem.inpactloadhighScale);
// 处理低压侧电压
const LowVoltage = voltageleveloption.find(item => item.id === loadItem.inpactloadlowScale)
return {
...loadItem,
inpactloadhighScale: HeightVoltage?.name || loadItem.inpactloadhighScale,
inpactloadlowScale: LowVoltage?.name || loadItem.inpactloadlowScale
}
})
})
}
)
}
// 等待 DOM 更新后延迟触发
await nextTick()
setTimeout(() => {
emit('data-loaded')
}, 1000) // 3秒延迟
}, { immediate: true })
2025-03-31 14:33:05 +08:00
</script>
<style lang="scss" scoped>
:deep(.el-collapse-item__header) {
padding-left: 20px;
font-size: 16px !important;
&::before {
content: '' !important; /* 添加星号 */
}
2025-03-31 14:33:05 +08:00
}
:deep(.el-descriptions__cell) {
width: 12.5%;
}
</style>