Files
admin-sjzx/src/views/pqs/runManage/assessment/components/uese/index.vue

183 lines
6.7 KiB
Vue
Raw Normal View History

2025-03-25 10:20:24 +08:00
<template>
<div>
<div>
<TableHeader ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="所在地市">
<el-select v-model="tableStore.table.params.city" clearable placeholder="请选择所在地市">
<el-option
v-for="item in areaOptionList"
:key="item.id"
:label="item.name"
:value="item.name"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="用户名称">
<el-input
style="width: 200px"
placeholder="请输入用户名称"
v-model="tableStore.table.params.userName"
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"
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-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-input
style="width: 200px"
placeholder="请输入接入母线"
v-model="tableStore.table.params.projectName"
clearable
maxlength="32"
show-word-limit
></el-input>
</el-form-item>
</template>
<template #operation>
2025-03-25 10:57:52 +08:00
<el-button icon="el-icon-Plus" type="primary" @click="addForm">新增</el-button>
2025-03-25 10:20:24 +08:00
<el-button icon="el-icon-Delete">删除</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide } from 'vue'
import TableStore from '@/utils/tableStore'
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'
2025-03-25 10:57:52 +08:00
import { useRouter } from 'vue-router'
defineOptions({
name: 'runManage/addUser'
})
2025-03-25 10:57:52 +08:00
const { push } = useRouter()
2025-03-25 10:20:24 +08:00
const dictData = useDictData()
const areaOptionList = dictData.getBasicData('jibei_area')
//字典获取电压等级
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
const tableStore: any = new TableStore({
url: '/user-boot/user/getAllUserSimpleList',
method: 'GET',
publicHeight: 65,
column: [
{
width: '60',
type: 'checkbox'
},
{
title: '序号',
width: 80,
field: 'name',
formatter: (row: any) => {
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 },
2025-03-25 10:20:24 +08:00
{
title: '操作',
width: '220',
render: 'buttons',
fixed: 'right',
2025-03-25 10:20:24 +08:00
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: async row => {}
},
{
name: 'edit',
title: '查看',
type: 'primary',
icon: 'el-icon-EditPen',
render: 'basicButton',
click: async row => {}
}
]
}
],
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'
}
]
2025-03-25 10:20:24 +08:00
}
})
tableStore.table.params.searchValue = ''
tableStore.table.params.searchState = ''
provide('tableStore', tableStore)
2025-03-25 10:57:52 +08:00
// 新增评估用户页面
const addForm = () => {
push({
path: 'addUser',
query: {
type: 1,
t: Date.now()
}
})
}
2025-03-25 10:20:24 +08:00
onMounted(() => {
tableStore.index()
})
</script>