联调二级评估页面

This commit is contained in:
guanj
2025-06-17 15:48:22 +08:00
parent e9ecd876cb
commit 49b476ebc8
12 changed files with 11643 additions and 5485 deletions

View File

@@ -1,10 +1,10 @@
<template>
<div>
<div>
<TableHeader ref="TableHeaderRef" showExport>
<TableHeader ref="TableHeaderRef" area showExport>
<template #select>
<el-form-item label="所在地市">
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
<!-- <el-form-item label="所在地市">
<el-select v-model="tableStore.table.params.deptId" clearable placeholder="请选择所在地市">
<el-option
v-for="item in areaOptionList"
:key="item.id"
@@ -12,29 +12,34 @@
:value="item.name"
></el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-form-item label="用户名称">
<el-input
style="width: 200px"
placeholder="请输入用户名称"
v-model="tableStore.table.params.userName"
v-model="tableStore.table.params.assessName"
clearable
maxlength="32"
show-word-limit
></el-input>
</el-form-item>
<el-form-item label="接入变电站">
<el-input
style="width: 200px"
placeholder="请输入接入变电站"
v-model="tableStore.table.params.projectName"
v-model="tableStore.table.params.powerstationName"
clearable
maxlength="32"
show-word-limit
></el-input>
</el-form-item>
<el-form-item label="电站电压等级">
<el-select v-model="tableStore.table.params.scale" clearable placeholder="请选择电站电压等级">
<el-select
v-model="tableStore.table.params.powerstationScaleList"
multiple
collapse-tags
collapse-tags-tooltip
filterable
clearable
style="width: 240px"
placeholder="请选择电站电压等级"
>
<el-option
v-for="item in voltageleveloption"
:key="item.id"
@@ -43,20 +48,42 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="接入母线">
<el-input
style="width: 200px"
placeholder="请输入接入母线"
v-model="tableStore.table.params.projectName"
<el-form-item label="母线电压等级">
<el-select
v-model="tableStore.table.params.busScaleList"
multiple
collapse-tags
collapse-tags-tooltip
filterable
clearable
maxlength="32"
show-word-limit
></el-input>
style="width: 240px"
placeholder="请选择母线电压等级"
>
<el-option
v-for="item in voltageleveloption"
:key="item.id"
:label="item.name"
:value="item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="用户负荷类型">
<el-select
v-model="tableStore.table.params.isWindfarm"
filterable
clearable
style="width: 240px"
placeholder="请选择用户负荷类型"
>
<el-option label="风电场" value="01"></el-option>
<el-option label="光伏" value="02"></el-option>
<el-option label="其他" value="03"></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="addForm">新增</el-button>
<el-button icon="el-icon-Delete">删除</el-button>
<el-button type="primary" icon="el-icon-Delete" @click="del">删除</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
@@ -70,6 +97,7 @@ import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
import { ElMessage, ElMessageBox, ElDatePicker } from 'element-plus'
import { cableList, batchDel } from '@/api/advance-boot/assess'
import { useRouter } from 'vue-router'
defineOptions({
name: 'runManage/addUser'
@@ -77,14 +105,15 @@ defineOptions({
const { push } = useRouter()
const dictData = useDictData()
const areaOptionList = dictData.getBasicData('jibei_area')
const linetypeList = ref([])
//字典获取电压等级
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
const tableStore: any = new TableStore({
url: '/user-boot/user/getAllUserSimpleList',
method: 'GET',
url: '/advance-boot/assessUser/page',
method: 'POST',
publicHeight: 65,
column: [
{
{
width: '60',
type: 'checkbox'
},
@@ -96,20 +125,58 @@ const tableStore: any = new TableStore({
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'name', title: '所属地市', minWidth: 100 },
{ field: 'name1', title: '用户名称', minWidth: 180 },
{ field: 'name2', title: '接入变电站', minWidth: 180 },
{ field: 'name3', title: '电站电压等级', minWidth: 180 },
{ field: 'name4', title: '接入母线', minWidth: 180 },
{ field: 'name5', title: '接入电压等级', minWidth: 180 },
{ field: 'name6', title: '供电设备容量(MVA)', minWidth: 180 },
{ field: 'name7', title: '最小短路容量(MVA)', minWidth: 180 },
{ field: 'name8', title: '用户协议容量(MVA)', minWidth: 180 },
{ field: 'name9', title: 'PCC点名称', minWidth: 180 },
{ field: 'name10', title: 'PCC电网电阻', minWidth: 180 },
{ field: 'name11', title: '长度', minWidth: 180 },
{ field: 'name12', title: '回路数', minWidth: 180 },
{ field: 'name13', title: '导线类型', minWidth: 180 },
{ field: 'deptName', title: '所属地市', minWidth: 100 },
{ field: 'assessName', title: '用户名称', minWidth: 180 },
{ field: 'powerstationName', title: '接入变电站', minWidth: 180 },
{
field: 'powerstationScale',
title: '电站电压等级',
minWidth: 180,
formatter: (row: any) => {
return voltageleveloption.find((item: any) => item.id === row.cellValue)?.name
}
},
{ field: 'busName', title: '接入母线', minWidth: 180 },
{
field: 'busScale',
title: '母线电压等级',
minWidth: 180,
formatter: (row: any) => {
return voltageleveloption.find((item: any) => item.id === row.cellValue)?.name
}
},
{ field: 'powersupplyCapacity', title: '供电设备容量(MVA)', minWidth: 180 },
{ field: 'minshortcircuitCapacity', title: '最小短路容量(MVA)', minWidth: 180 },
{ field: 'agreedCapacity', title: '用户协议容量(MVA)', minWidth: 180 },
{ field: 'lineName', title: 'PCC点名称', minWidth: 180 },
{
field: 'linetypeId',
title: '导线类型',
minWidth: 180,
formatter: (row: any) => {
return linetypeList.value.find((item: any) => item.linetypeId === row.cellValue)?.linetypeName
}
},
{ field: 'lineLen', title: '长度(km)', minWidth: 180 },
{ field: 'lineNum', title: '回路数', minWidth: 180 },
{
field: 'isWindfarm',
title: '用户负荷类型',
minWidth: 180,
formatter: (row: any) => {
return row.cellValue == '01' ? '风电场' : row.cellValue == '02' ? '光伏' : '其他'
}
},
{ field: 'windfarmCapacity', title: '用户有功功率(MW)', minWidth: 180 },
{
field: 'singleLoad',
title: '是否单相负荷',
minWidth: 180,
formatter: (row: any) => {
return row.cellValue == '00' ? '是' : '否'
}
},
// { field: 'name13', title: '单相负荷', minWidth: 180 },
{
title: '操作',
@@ -123,8 +190,14 @@ const tableStore: any = new TableStore({
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: async row => {}
click: async row => {
push({
path: 'addUser',
query: {
id: row.assessId
}
})
}
},
{
name: 'edit',
@@ -138,45 +211,56 @@ const tableStore: any = new TableStore({
]
}
],
beforeSearchFun: () => {
// tableStore.table.params.deptId = tableStore.table.params.deptIndex
},
loadCallback: () => {
// 格式化 cron 表达式
tableStore.table.data = [
{
name: '张家口',
name1: '特种钢厂',
name2: '220kV石门变',
name3: '220kV',
name4: '110kV 母线',
name5: '110kV',
name6: '90',
name7: '100',
name8: '40',
name9: '测试名称',
name10: '10',
name11: '12',
name12: '13',
name13: '14',
name14: '15'
}
]
}
loadCallback: () => {}
})
tableStore.table.params.searchValue = ''
tableStore.table.params.searchState = ''
tableStore.table.params.assessName = ''
tableStore.table.params.deptId = ''
tableStore.table.params.powerstationName = ''
tableStore.table.params.busScaleList = []
tableStore.table.params.isWindfarm = ''
tableStore.table.params.powerstationScaleList = []
provide('tableStore', tableStore)
// 新增评估用户页面
const addForm = () => {
push({
path: 'addUser',
query: {
type: 1,
t: Date.now()
}
path: 'addUser'
})
}
const Info = () => {
cableList({}).then(res => {
linetypeList.value = res.data
})
}
//删除
const del = () => {
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
batchDel(tableStore.table.selection.map(item => item.assessId)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
})
}
}
onMounted(() => {
tableStore.index()
Info()
})
</script>