246 lines
6.5 KiB
Vue
246 lines
6.5 KiB
Vue
|
|
<template>
|
||
|
|
<el-collapse-item :title="item.name" v-for="(item, index) in column" :key="index" :name="index + 3">
|
||
|
|
<div class="mb10">
|
||
|
|
<el-button type="primary" size="small" icon="el-icon-Plus" @click="addFform(item)">新增</el-button>
|
||
|
|
<el-button type="primary" size="small" icon="el-icon-Delete">删除</el-button>
|
||
|
|
<el-button type="primary" size="small" icon="el-icon-Download">导出</el-button>
|
||
|
|
</div>
|
||
|
|
<div style="height: 200px">
|
||
|
|
<vxe-table height="auto" :data="dataList[item.key]" v-bind="defaultAttribute">
|
||
|
|
<vxe-column type="checkbox" width="60"></vxe-column>
|
||
|
|
<vxe-column type="seq" title="序号" width="60px"></vxe-column>
|
||
|
|
|
||
|
|
<vxe-column
|
||
|
|
v-for="(k, index) in item.child"
|
||
|
|
:key="index"
|
||
|
|
:field="k.field"
|
||
|
|
:title="k.title"
|
||
|
|
:formatter="formatter"
|
||
|
|
></vxe-column>
|
||
|
|
<vxe-column title="操作" width="150px">
|
||
|
|
<template #default="{ row }">
|
||
|
|
<el-button type="text" @click="edit(item, row)">编辑</el-button>
|
||
|
|
</template>
|
||
|
|
</vxe-column>
|
||
|
|
</vxe-table>
|
||
|
|
</div>
|
||
|
|
</el-collapse-item>
|
||
|
|
<!-- 新增 -->
|
||
|
|
<addform ref="addformRef" />
|
||
|
|
</template>
|
||
|
|
<script setup lang="ts">
|
||
|
|
import { ref, reactive, onMounted } from 'vue'
|
||
|
|
import addform from './addform.vue'
|
||
|
|
import { assessTransformerParamList, transformerList } from '@/api/advance-boot/assess'
|
||
|
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||
|
|
const props = defineProps({
|
||
|
|
assessId: { type: String, required: true }
|
||
|
|
})
|
||
|
|
const transformer = ref([])
|
||
|
|
const addformRef = ref()
|
||
|
|
const column: any = ref([
|
||
|
|
{
|
||
|
|
name: '变压器参数维护',
|
||
|
|
key: 'transformerList',
|
||
|
|
child: [
|
||
|
|
{
|
||
|
|
title: '用户变压器名称',
|
||
|
|
field: 'transName'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '变压器型号',
|
||
|
|
field: 'transtypeId'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '变压器台数',
|
||
|
|
field: 'transNum'
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '电容器组参数维护',
|
||
|
|
key: 'capacitorList',
|
||
|
|
child: [
|
||
|
|
{
|
||
|
|
title: '用户电容器名称',
|
||
|
|
field: 'name'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '电容器组数量',
|
||
|
|
field: 'name1'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '单组容量(kVar)',
|
||
|
|
field: 'name2'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '电抗率(%)',
|
||
|
|
field: 'name3'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '电压等级',
|
||
|
|
field: 'name4'
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '风电参数',
|
||
|
|
key: 'windPowerList',
|
||
|
|
child: [
|
||
|
|
{
|
||
|
|
title: '风机名称',
|
||
|
|
field: 'name'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '风机闪变系数',
|
||
|
|
field: 'name1'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '风机额定视在功率',
|
||
|
|
field: 'name2'
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '用户负荷',
|
||
|
|
key: 'loadList',
|
||
|
|
child: [
|
||
|
|
{
|
||
|
|
title: '配电窒名称',
|
||
|
|
field: 'name'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '进线电压',
|
||
|
|
field: 'name1'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '配变容量(kVA)',
|
||
|
|
field: 'name2'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '配电变压器阻抗(%)',
|
||
|
|
field: 'name3'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '谐波源特性',
|
||
|
|
field: 'name4'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '配变低压侧电压',
|
||
|
|
field: 'name5'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '非线性负荷功率(kW)',
|
||
|
|
field: 'name6'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '功率因素',
|
||
|
|
field: 'name7'
|
||
|
|
}
|
||
|
|
]
|
||
|
|
},
|
||
|
|
{
|
||
|
|
name: '冲击性负荷',
|
||
|
|
key: 'impactList',
|
||
|
|
child: [
|
||
|
|
{
|
||
|
|
title: '冲击负荷类型',
|
||
|
|
field: 'name'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '冲击负荷功率(MVA)',
|
||
|
|
field: 'name1'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '数量',
|
||
|
|
field: 'name2'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '启动方式',
|
||
|
|
field: 'name3'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '启动容量倍数',
|
||
|
|
field: 'name4'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '冲击负荷高压侧电压',
|
||
|
|
field: 'name5'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '有无隔离变',
|
||
|
|
field: 'name6'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '隔离变阻抗(%)',
|
||
|
|
field: 'name7'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '低压侧电压',
|
||
|
|
field: 'name8'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '负荷频度选择',
|
||
|
|
field: 'name9'
|
||
|
|
},
|
||
|
|
{
|
||
|
|
title: '闪变叠加系数',
|
||
|
|
field: 'name10'
|
||
|
|
}
|
||
|
|
]
|
||
|
|
}
|
||
|
|
])
|
||
|
|
const dataList = ref({
|
||
|
|
transformerList: [], //变压器参数维护
|
||
|
|
capacitorList: [], //电容器
|
||
|
|
windPowerList: [], //风电
|
||
|
|
loadList: [], //用户负荷
|
||
|
|
impactList: [] //冲击性负荷
|
||
|
|
})
|
||
|
|
// 新增
|
||
|
|
const addFform = (item: any) => {
|
||
|
|
addformRef.value.open({
|
||
|
|
title: '新增',
|
||
|
|
item: item,
|
||
|
|
assessId: props.assessId,
|
||
|
|
|
||
|
|
})
|
||
|
|
}
|
||
|
|
// 编辑
|
||
|
|
const edit = (item: any, row: any) => {
|
||
|
|
addformRef.value.open({
|
||
|
|
title: '编辑',
|
||
|
|
item: item,
|
||
|
|
row: row,
|
||
|
|
assessId: props.assessId
|
||
|
|
})
|
||
|
|
}
|
||
|
|
// 过滤数据
|
||
|
|
const formatter = (row: any) => {
|
||
|
|
if (row.column.field == 'transtypeId') {
|
||
|
|
|
||
|
|
return transformer.value.find(item => item.transtypeId == row.cellValue)?.transtypeName
|
||
|
|
} else {
|
||
|
|
return row.cellValue
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
const info = () => {
|
||
|
|
assessTransformerParamList({ assessId: props.assessId }).then(res => {
|
||
|
|
dataList.value.transformerList = res.data
|
||
|
|
})
|
||
|
|
}
|
||
|
|
// 字典
|
||
|
|
const dictionary = () => {
|
||
|
|
// 获取变压器参数字典列表
|
||
|
|
transformerList({}).then((res: any) => {
|
||
|
|
transformer.value = res.data
|
||
|
|
})
|
||
|
|
}
|
||
|
|
onMounted(() => {
|
||
|
|
dictionary()
|
||
|
|
info()
|
||
|
|
})
|
||
|
|
</script>
|
||
|
|
<style lang="scss" scoped></style>
|