联调二级评估页面
This commit is contained in:
@@ -1,10 +1,14 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div>
|
||||
<TableHeader datePicker ref="TableHeaderRef">
|
||||
<TableHeader :showTimeAll="false" showExport ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="用户类型">
|
||||
<el-select v-model.trim="tableStore.table.params.userType" clearable placeholder="请选择用户类型">
|
||||
<el-select
|
||||
v-model.trim="tableStore.table.params.userType"
|
||||
clearable
|
||||
placeholder="请选择用户类型"
|
||||
>
|
||||
<el-option v-for="item in uesrList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -15,21 +19,28 @@
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<el-dialog draggable v-model="dialogVisible" :title="title" width="600" :before-close="handleClose">
|
||||
<el-form ref="ruleFormRef" :model="form" label-width="auto" :disabled="disabled" :rules="rules">
|
||||
<el-form-item label="用户名称:" prop="userName">
|
||||
<el-input v-model.trim="form.userName" clearable placeholder="请输入用户名称" maxlength="32" show-word-limit/>
|
||||
</el-form-item>
|
||||
<el-form ref="ruleFormRef" :model="form" label-width="170px" :disabled="disabled" :rules="rules">
|
||||
<el-form-item label="用户类型:" prop="userType">
|
||||
<el-select v-model="form.userType" clearable placeholder="请选择用户类型" @change="useChange">
|
||||
<el-option v-for="item in uesrList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户名称:" prop="userName">
|
||||
<el-input
|
||||
v-model.trim="form.userName"
|
||||
clearable
|
||||
placeholder="请输入用户名称"
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="电压等级:" prop="voltage">
|
||||
<el-select v-model="form.voltage" clearable collapse-tags placeholder="请选择电压等级">
|
||||
<el-option v-for="item in levelList" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item
|
||||
:label="userShow == 'Power_Station_Users' ? '拟接入容量(MVA):' : '用户协议容量(MVA):'"
|
||||
prop="protocolCapacity"
|
||||
@@ -39,7 +50,6 @@
|
||||
style="width: 100%"
|
||||
v-model="form.protocolCapacity"
|
||||
:min="0"
|
||||
:precision="4"
|
||||
:max="10000000"
|
||||
placeholder="请输入用容量"
|
||||
/>
|
||||
@@ -53,7 +63,8 @@
|
||||
clearable
|
||||
v-model="form.area"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
maxlength="300" show-word-limit
|
||||
maxlength="300"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
placeholder="请输入详细地址"
|
||||
/>
|
||||
@@ -68,7 +79,7 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<!-- 终端 -->
|
||||
<!-- 设备 -->
|
||||
<equipment ref="equipmentRef" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -177,7 +188,7 @@ const tableStore: any = new TableStore({
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '终端 ',
|
||||
title: '设备 ',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
@@ -196,10 +207,10 @@ const tableStore: any = new TableStore({
|
||||
disabled.value = true
|
||||
dialogVisible.value = true
|
||||
dialogVisible.value = true
|
||||
title.value = '查看承载能力预评估用户'
|
||||
title.value = '查看承载能力待评估用户'
|
||||
form.value = JSON.parse(JSON.stringify(row))
|
||||
form.value.regionList = [form.value.province, form.value.city, form.value.region]
|
||||
userShow.value=uesrList.filter(item => item.id == row.userType)[0].code
|
||||
userShow.value = uesrList.filter(item => item.id == row.userType)[0].code
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -212,11 +223,11 @@ const tableStore: any = new TableStore({
|
||||
disabled.value = false
|
||||
dialogVisible.value = true
|
||||
await nextTick
|
||||
title.value = '编辑承载能力预评估用户'
|
||||
|
||||
title.value = '编辑承载能力待评估用户'
|
||||
|
||||
form.value = JSON.parse(JSON.stringify(row))
|
||||
form.value.regionList = [form.value.province, form.value.city, form.value.region]
|
||||
userShow.value=uesrList.filter(item => item.id == row.userType)[0].code
|
||||
userShow.value = uesrList.filter(item => item.id == row.userType)[0].code
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -259,7 +270,7 @@ const useChange = (e: string) => {
|
||||
// 新增
|
||||
const add = () => {
|
||||
disabled.value = false
|
||||
title.value = '新增承载能力预评估用户'
|
||||
title.value = '新增承载能力待评估用户'
|
||||
dialogVisible.value = true
|
||||
}
|
||||
// 保存
|
||||
@@ -269,14 +280,14 @@ const onSubmit = () => {
|
||||
form.value.province = form.value.regionList[0] || ''
|
||||
form.value.city = form.value.regionList[1] || ''
|
||||
form.value.region = form.value.regionList[2] || ''
|
||||
if (title.value == '新增承载能力预评估用户') {
|
||||
if (title.value == '新增承载能力待评估用户') {
|
||||
addUse(form.value).then(res => {
|
||||
ElMessage.success('新增成功!')
|
||||
dialogVisible.value = false
|
||||
tableStore.index()
|
||||
handleClose()
|
||||
})
|
||||
} else if (title.value == '编辑承载能力预评估用户') {
|
||||
} else if (title.value == '编辑承载能力待评估用户') {
|
||||
updateUse(form.value).then(res => {
|
||||
ElMessage.success('修改成功!')
|
||||
dialogVisible.value = false
|
||||
|
||||
Reference in New Issue
Block a user