联调二级评估 参数字典维护页面

This commit is contained in:
guanj
2025-06-13 15:06:54 +08:00
parent 3451759e48
commit e9ecd876cb
21 changed files with 1523 additions and 531 deletions

View File

@@ -0,0 +1,99 @@
import createAxios from '@/utils/request'
//新增谐波源特性字典
export function characteristicAdd(data: any) {
return createAxios({
url: '/advance-boot/assessDicHarmonicCharacter/add',
method: 'Post',
data
})
}
//删除谐波源特性字典
export function characteristicDelete(data: any) {
return createAxios({
url: '/advance-boot/assessDicHarmonicCharacter/delete',
method: 'Post',
data
})
}
//修改谐波源特性字典
export function characteristicEdit(data: any) {
return createAxios({
url: '/advance-boot/assessDicHarmonicCharacter/edit',
method: 'Post',
data
})
}
//新增线缆类型字典
export function cableAdd(data: any) {
return createAxios({
url: '/advance-boot/assessDicCableType/add',
method: 'Post',
data
})
}
//修改线缆类型字典
export function cableEdit(data: any) {
return createAxios({
url: '/advance-boot/assessDicCableType/edit',
method: 'Post',
data
})
}
//删除线缆类型字典
export function cableDelete(data: any) {
return createAxios({
url: '/advance-boot/assessDicCableType/delete',
method: 'Post',
data
})
}
//新增变压器参数
export function transformerAdd(data: any) {
return createAxios({
url: '/advance-boot/assessDicTransformer/add',
method: 'Post',
data
})
}
//修改变压器参数
export function transformerEdit(data: any) {
return createAxios({
url: '/advance-boot/assessDicTransformer/edit',
method: 'Post',
data
})
}
//删除变压器参数
export function transformerDelete(data: any) {
return createAxios({
url: '/advance-boot/assessDicTransformer/delete',
method: 'Post',
data
})
}
//新增冲击负荷字典
export function loadAdd(data: any) {
return createAxios({
url: '/advance-boot/assessDicShockLoad/add',
method: 'Post',
data
})
}
//删除冲击负荷字典
export function loadDelete(data: any) {
return createAxios({
url: '/advance-boot/assessDicShockLoad/delete',
method: 'Post',
data
})
}
//编辑冲击负荷字典
export function loadEdit(data: any) {
return createAxios({
url: '/advance-boot/assessDicShockLoad/edit',
method: 'Post',
data
})
}

View File

@@ -1,113 +0,0 @@
<template>
<div class="mt10">
<TableHeader :showReset="false" ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="谐波原名称">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" />
</el-form-item>
</template>
<template #operation>
<el-button type="primary" icon="el-icon-Plus">新增</el-button>
<el-button type="primary" icon="el-icon-Delete">删除</el-button>
<el-button type="primary" icon="el-icon-Download">模版下载</el-button>
<el-button type="primary" icon="el-icon-Upload">导入</el-button>
</template>
</TableHeader>
<Table ref="tableRef"></Table>
</div>
</template>
<script setup lang="ts">
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import Table from '@/components/table/index.vue'
import { mainHeight } from '@/utils/layout'
import { ref, reactive, onMounted } from 'vue'
const tableStore = new TableStore({
url: '/user-boot/dept/deptTree',
method: 'POST',
publicHeight: 115,
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
}
},
{ title: '导线型号', field: 'userName', minWidth: '130' },
{ title: '线缆类型', field: 'harmonic2', minWidth: '80' },
{ title: '正序电阻R1(Ω/km)', field: 'harmonic3', minWidth: '80' },
{ title: '正序电抗X1(Ω/km)', field: 'harmonic4', minWidth: '80' },
{ title: '正序电纳Y(S/km)', field: 'harmonic5', minWidth: '80' },
{ title: '零序电阻R0(Ω/km)', field: 'harmonic6', minWidth: '80' },
{ title: '零序电纳Y0(Ω/km)', field: 'harmonic7', minWidth: '80' },
{
title: '操作',
minWidth: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {}
},
{
name: 'edit',
title: '查看',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {}
}
]
}
],
loadCallback: () => {
setTimeout(() => {
tableStore.table.data = [
{
userName: 'LGJ-220-35kV',
harmonic2: '架空',
harmonic3: '0.33',
harmonic4: '2.42',
harmonic5: '2.42',
harmonic6: '1.25',
harmonic7: '2.42',
harmonic8: '1.25',
harmonic9: '2.42'
},
{
userName: 'LGJ-220-35kV',
harmonic2: '电缆',
harmonic3: '0.33',
harmonic4: '2.42',
harmonic5: '2.42',
harmonic6: '1.25',
harmonic7: '2.42',
harmonic8: '1.25',
harmonic9: '2.42'
},
]
}, 0)
}
})
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
onMounted(() => {
tableStore.index()
})
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,124 @@
<template>
<el-dialog draggable width="800px" v-model="dialogVisible" :title="title">
<el-form :inline="false" :model="form" label-width="auto" class="form-two" :rules="rules" ref="formRef">
<el-form-item label="导线型号" prop="linetypeName">
<el-input
v-model.trim="form.linetypeName"
clearable
maxlength="32"
show-word-limit
placeholder="请输入导线型号"
/>
</el-form-item>
<el-form-item label="线缆类型" prop="linetypeType">
<el-select v-model="form.linetypeType" placeholder="请选择线缆类型">
<el-option label="架空线" value="01"></el-option>
<el-option label="电缆" value="02"></el-option>
</el-select>
</el-form-item>
<el-form-item label="正序电阻R1(Ω/km)" prop="posR1">
<el-input-number v-model.trim="form.posR1" show-word-limit placeholder="请输入值"></el-input-number>
</el-form-item>
<el-form-item label="正序电抗X1(Ω/km)" prop="posX1">
<el-input-number v-model.trim="form.posX1" show-word-limit placeholder="请输入值"></el-input-number>
</el-form-item>
<el-form-item label="正序电纳Y1(S/km)" prop="posY1">
<el-input-number v-model.trim="form.posY1" show-word-limit placeholder="请输入值"></el-input-number>
</el-form-item>
<el-form-item label="零序电阻R0(Ω/km)" prop="zeroR0">
<el-input-number v-model.trim="form.zeroR0" show-word-limit placeholder="请输入值"></el-input-number>
</el-form-item>
<el-form-item label="零序电抗X0(Ω/km)" prop="zeroX0">
<el-input-number v-model.trim="form.zeroX0" show-word-limit placeholder="请输入值"></el-input-number>
</el-form-item>
<el-form-item label="零序电纳Y0(S/km)" prop="zeroY0">
<el-input-number v-model.trim="form.zeroY0" show-word-limit placeholder="请输入值"></el-input-number>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="submit">确认</el-button>
</span>
</template>
</el-dialog>
</template>
<script lang="ts" setup>
import { ref, inject, onMounted } from 'vue'
import { reactive } from 'vue'
import { ElMessage } from 'element-plus'
import { cableAdd, cableEdit } from '@/api/advance-boot/assess'
const emit = defineEmits(['submit'])
const dialogVisible = ref(false)
const title = ref('')
const formRef = ref()
// 注意不要和表单ref的命名冲突
const form: any = ref({
linetypeName: '',
linetypeType: '',
posR1: 0,
posX1: 0,
posY1: 0,
zeroR0: 0,
zeroX0: 0,
zeroY0: 0
})
const rules: any = ref({
linetypeName: [{ required: true, message: '请输入导线型号', trigger: 'blur' }],
linetypeType: [{ required: true, message: '请选择线缆类型', trigger: 'blur' }],
posR1: [{ required: true, message: '请输入正序电阻', trigger: 'blur' }],
posX1: [{ required: true, message: '请输入正序电抗', trigger: 'blur' }],
posY1: [{ required: true, message: '请输入正序电纳', trigger: 'blur' }],
zeroR0: [{ required: true, message: '请输入零序电阻', trigger: 'blur' }],
zeroX0: [{ required: true, message: '请输入零序电抗', trigger: 'blur' }],
zeroY0: [{ required: true, message: '请输入零序电纳', trigger: 'blur' }]
})
const open = (text: string, data?: anyObj) => {
title.value = text
dialogVisible.value = true
if (data) {
// 表单赋值
form.value = JSON.parse(JSON.stringify(data))
} else {
form.value = {
linetypeName: '',
linetypeType: '',
posR1: 0,
posX1: 0,
posY1: 0,
zeroR0: 0,
zeroX0: 0,
zeroY0: 0
}
}
}
onMounted(() => {})
const submit = () => {
formRef.value.validate(async (valid: boolean) => {
if (valid) {
if (title.value == '新增线缆类型字典') {
cableAdd(form.value).then(res => {
ElMessage.success('新增成功')
dialogVisible.value = false
emit('submit')
})
} else {
cableEdit(form.value).then(res => {
ElMessage.success('编辑成功')
dialogVisible.value = false
emit('submit')
})
}
}
})
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
.el-input-number {
width: 100%;
}
</style>

View File

@@ -0,0 +1,119 @@
<template>
<div class="mt10">
<TableHeader :showReset="false" ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="导线型号">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入导线型号" />
</el-form-item>
</template>
<template #operation>
<el-button type="primary" icon="el-icon-Plus" @click="add">新增</el-button>
<el-button type="primary" icon="el-icon-Delete" @click="del">删除</el-button>
<!-- <el-button type="primary" icon="el-icon-Download">模版下载</el-button>
<el-button type="primary" icon="el-icon-Upload">导入</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef"></Table>
<!-- 表单 -->
<Form ref="formRef" @submit="tableStore.index()" />
</div>
</template>
<script setup lang="ts">
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import Table from '@/components/table/index.vue'
import Form from './form.vue'
import { cableDelete } from '@/api/advance-boot/assess'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ref, reactive, onMounted } from 'vue'
const tableStore = new TableStore({
url: '/advance-boot/assessDicCableType/page',
method: 'POST',
publicHeight: 115,
filename: '线缆类型',
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
}
},
{ title: '导线型号', field: 'linetypeName', minWidth: '130' },
{
title: '线缆类型',
field: 'linetypeType',
minWidth: '80',
formatter: (row: any) => {
return row.cellValue == '01' ? '架空线' : '电缆'
}
},
{ title: '正序电阻R1(Ω/km)', field: 'posR1', minWidth: '80' },
{ title: '正序电抗X1(Ω/km)', field: 'posX1', minWidth: '80' },
{ title: '正序电纳Y1(S/km)', field: 'posY1', minWidth: '80' },
{ title: '零序电阻R0(Ω/km)', field: 'zeroR0', minWidth: '80' },
{ title: '零序电抗X0(Ω/km)', field: 'zeroX0', minWidth: '80' },
{ title: '零序电纳Y0(S/km)', field: 'zeroY0', minWidth: '80' },
{
title: '操作',
width: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {
formRef.value.open('编辑线缆类型字典', row)
}
}
]
}
],
loadCallback: () => {}
})
const formRef = ref()
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
// 新增
const add = () => {
formRef.value.open('新增线缆类型字典')
}
//删除
const del = () => {
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
cableDelete(tableStore.table.selection.map(item => item.linetypeId)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
})
}
}
onMounted(() => {
tableStore.index()
})
</script>
<style lang="scss" scoped></style>

View File

@@ -1,185 +0,0 @@
<template>
<div class="mt10">
<TableHeader :showReset="false" ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="谐波原名称">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" />
</el-form-item>
</template>
<template #operation>
<el-button type="primary" icon="el-icon-Plus">新增</el-button>
<el-button type="primary" icon="el-icon-Delete">删除</el-button>
<el-button type="primary" icon="el-icon-Download">模版下载</el-button>
<el-button type="primary" icon="el-icon-Upload">导入</el-button>
</template>
</TableHeader>
<Table ref="tableRef"></Table>
</div>
</template>
<script setup lang="ts">
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import Table from '@/components/table/index.vue'
import { mainHeight } from '@/utils/layout'
import { ref, reactive, onMounted } from 'vue'
const tableStore = new TableStore({
url: '/user-boot/dept/deptTree',
method: 'POST',
publicHeight: 115,
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
}
},
{ title: '谐波原名称', field: 'userName', minWidth: '130' },
{ title: '谐波2次', field: 'harmonic2', minWidth: '80' },
{ title: '谐波3次', field: 'harmonic3', minWidth: '80' },
{ title: '谐波4次', field: 'harmonic4', minWidth: '80' },
{ title: '谐波5次', field: 'harmonic5', minWidth: '80' },
{ title: '谐波6次', field: 'harmonic6', minWidth: '80' },
{ title: '谐波7次', field: 'harmonic7', minWidth: '80' },
{ title: '谐波8次', field: 'harmonic8', minWidth: '80' },
{ title: '谐波9次', field: 'harmonic9', minWidth: '80' },
{ title: '谐波10次', field: 'harmonic10', minWidth: '80' },
{ title: '谐波11次', field: 'harmonic11', minWidth: '80' },
{ title: '谐波12次', field: 'harmonic12', minWidth: '80' },
{ title: '谐波13次', field: 'harmonic13', minWidth: '80' },
{ title: '谐波14次', field: 'harmonic14', minWidth: '80' },
{ title: '谐波15次', field: 'harmonic15', minWidth: '80' },
{ title: '谐波16次', field: 'harmonic16', minWidth: '80' },
{ title: '谐波17次', field: 'harmonic17', minWidth: '80' },
{ title: '谐波18次', field: 'harmonic18', minWidth: '80' },
{ title: '谐波19次', field: 'harmonic19', minWidth: '80' },
{ title: '谐波20次', field: 'harmonic20', minWidth: '80' },
{ title: '谐波21次', field: 'harmonic21', minWidth: '80' },
{ title: '谐波22次', field: 'harmonic22', minWidth: '80' },
{ title: '谐波23次', field: 'harmonic23', minWidth: '80' },
{ title: '谐波24次', field: 'harmonic24', minWidth: '80' },
{ title: '谐波25次', field: 'harmonic25', minWidth: '80' },
{ title: '谐波26次', field: 'harmonic26', minWidth: '80' },
{ title: '谐波27次', field: 'harmonic27', minWidth: '80' },
{ title: '谐波28次', field: 'harmonic28', minWidth: '80' },
{ title: '谐波29次', field: 'harmonic29', minWidth: '80' },
{ title: '谐波30次', field: 'harmonic30', minWidth: '80' },
{ title: '谐波31次', field: 'harmonic31', minWidth: '80' },
{ title: '谐波32次', field: 'harmonic32', minWidth: '80' },
{ title: '谐波33次', field: 'harmonic33', minWidth: '80' },
{ title: '谐波34次', field: 'harmonic34', minWidth: '80' },
{ title: '谐波35次', field: 'harmonic35', minWidth: '80' },
{ title: '谐波36次', field: 'harmonic36', minWidth: '80' },
{ title: '谐波37次', field: 'harmonic37', minWidth: '80' },
{ title: '谐波38次', field: 'harmonic38', minWidth: '80' },
{ title: '谐波39次', field: 'harmonic39', minWidth: '80' },
{ title: '谐波40次', field: 'harmonic40', minWidth: '80' },
{ title: '谐波41次', field: 'harmonic41', minWidth: '80' },
{ title: '谐波42次', field: 'harmonic42', minWidth: '80' },
{ title: '谐波43次', field: 'harmonic43', minWidth: '80' },
{ title: '谐波44次', field: 'harmonic44', minWidth: '80' },
{ title: '谐波45次', field: 'harmonic45', minWidth: '80' },
{ title: '谐波46次', field: 'harmonic46', minWidth: '80' },
{ title: '谐波47次', field: 'harmonic47', minWidth: '80' },
{ title: '谐波48次', field: 'harmonic48', minWidth: '80' },
{ title: '谐波49次', field: 'harmonic49', minWidth: '80' },
{ title: '谐波50次', field: 'harmonic50', minWidth: '80' },
{
title: '操作',
minWidth: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {}
},
{
name: 'edit',
title: '查看',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {}
}
]
}
],
loadCallback: () => {
setTimeout(() => {
tableStore.table.data = [{
userName:'六脉整流',
harmonic2:'1.25',
harmonic3:'0.63',
harmonic4:'1.25',
harmonic5:'0.63',
harmonic6:'1.25',
harmonic7:'0.63',
harmonic8:'1.25',
harmonic9:'0.63',
harmonic10:'1.25',
harmonic11:'0.63',
harmonic12:'1.25',
harmonic13:'0.63',
harmonic14:'1.25',
harmonic15:'0.63',
harmonic16:'1.25',
harmonic17:'0.63',
harmonic18:'1.25',
harmonic19:'0.63',
harmonic20:'1.25',
harmonic21:'0.63',
harmonic22:'1.25',
harmonic23:'0.63',
harmonic24:'1.25',
harmonic25:'0.63',
harmonic26:'1.25',
harmonic27:'0.63',
harmonic28:'1.25',
harmonic29:'0.63',
harmonic30:'1.25',
harmonic31:'0.63',
harmonic32:'1.25',
harmonic33:'0.63',
harmonic34:'1.25',
harmonic35:'0.63',
harmonic36:'1.25',
harmonic37:'0.63',
harmonic38:'1.25',
harmonic39:'0.63',
harmonic40:'1.25',
harmonic41:'0.63',
harmonic42:'1.25',
harmonic43:'0.63',
harmonic44:'1.25',
harmonic45:'0.63',
harmonic46:'1.25',
harmonic47:'0.63',
harmonic48:'1.25',
harmonic49:'0.63',
harmonic50:'1.25',
}]
}, 0)
}
})
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
onMounted(() => {
tableStore.index()
})
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,107 @@
<template>
<el-dialog draggable width="1000px" v-model="dialogVisible" :title="title">
<el-form :inline="false" :model="form" label-width="auto" :rules="rules" ref="formRef">
<el-form-item label="谐波源名称" prop="harmName">
<el-input
v-model.trim="form.harmName"
clearable
style="width: 475px"
maxlength="32"
show-word-limit
placeholder="请输入谐波源名称"
/>
</el-form-item>
<div class="form-four">
<el-form-item v-for="item in 49" :label="`谐波${item + 1}次`" :key="item + 1" :prop="`i${item + 1}`">
<el-input-number v-model.trim="form[`i${item + 1}`]" show-word-limit placeholder="请输入值" />
</el-form-item>
</div>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="submit">确认</el-button>
</span>
</template>
</el-dialog>
</template>
<script lang="ts" setup>
import { ref, inject, onMounted } from 'vue'
import { reactive } from 'vue'
import { ElMessage } from 'element-plus'
import { characteristicAdd, characteristicEdit } from '@/api/advance-boot/assess'
const emit = defineEmits(['submit'])
const dialogVisible = ref(false)
const title = ref('')
const formRef = ref()
// 注意不要和表单ref的命名冲突
const form: any = ref({
harmName: ''
})
const rules: any = ref({
harmName: [{ required: true, message: '谐波源名称', trigger: 'blur' }]
})
const open = (text: string, data?: anyObj) => {
for (let i = 2; i < 51; i++) {
rules.value[`i${i}`] = [{ required: true, message: '请输入值', trigger: 'blur' }]
}
title.value = text
dialogVisible.value = true
if (data) {
// 表单赋值
form.value = JSON.parse(JSON.stringify(data))
} else {
form.value = {
harmName: ''
}
for (let i = 2; i < 51; i++) {
form.value[`i${i}`] = 0
}
}
}
onMounted(() => {})
const submit = () => {
formRef.value.validate(async (valid: boolean) => {
if (valid) {
if (title.value == '新增谐波源特性字典') {
characteristicAdd(form.value).then(res => {
ElMessage.success('新增成功')
dialogVisible.value = false
emit('submit')
})
} else {
characteristicEdit(form.value).then(res => {
ElMessage.success('编辑成功')
dialogVisible.value = false
emit('submit')
})
}
}
})
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
.form-four {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.el-form-item {
display: flex;
width: 33%;
.el-form-item__content {
flex: 1;
.el-select,
.el-cascader,
.el-input__inner,
.el-date-editor {
width: 100%;
}
}
}
}
</style>

View File

@@ -0,0 +1,155 @@
<template>
<div class="mt10">
<TableHeader :showReset="false" ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="谐波源名称">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入谐波源名称" />
</el-form-item>
</template>
<template #operation>
<el-button type="primary" icon="el-icon-Plus" @click="add">新增</el-button>
<el-button type="primary" icon="el-icon-Delete" @click="del">删除</el-button>
<!-- <el-button type="primary" icon="el-icon-Download">模版下载</el-button>
<el-button type="primary" icon="el-icon-Upload">导入</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef"></Table>
<!-- 编辑 -->
<Form ref="formRef" @submit="tableStore.index()" />
</div>
</template>
<script setup lang="ts">
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import Table from '@/components/table/index.vue'
import Form from './form.vue'
import { characteristicDelete } from '@/api/advance-boot/assess'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ref, reactive, onMounted } from 'vue'
const tableStore = new TableStore({
url: '/advance-boot/assessDicHarmonicCharacter/page',
method: 'POST',
publicHeight: 115,
filename: '谐波特性',
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
}
},
{ title: '谐波源名称', field: 'harmName', minWidth: '130' },
{ title: '谐波2次', field: 'i2', minWidth: '80' },
{ title: '谐波3次', field: 'i3', minWidth: '80' },
{ title: '谐波4次', field: 'i4', minWidth: '80' },
{ title: '谐波5次', field: 'i5', minWidth: '80' },
{ title: '谐波6次', field: 'i6', minWidth: '80' },
{ title: '谐波7次', field: 'i7', minWidth: '80' },
{ title: '谐波8次', field: 'i8', minWidth: '80' },
{ title: '谐波9次', field: 'i9', minWidth: '80' },
{ title: '谐波10次', field: 'i10', minWidth: '80' },
{ title: '谐波11次', field: 'i11', minWidth: '80' },
{ title: '谐波12次', field: 'i12', minWidth: '80' },
{ title: '谐波13次', field: 'i13', minWidth: '80' },
{ title: '谐波14次', field: 'i14', minWidth: '80' },
{ title: '谐波15次', field: 'i15', minWidth: '80' },
{ title: '谐波16次', field: 'i16', minWidth: '80' },
{ title: '谐波17次', field: 'i17', minWidth: '80' },
{ title: '谐波18次', field: 'i18', minWidth: '80' },
{ title: '谐波19次', field: 'i19', minWidth: '80' },
{ title: '谐波20次', field: 'i20', minWidth: '80' },
{ title: '谐波21次', field: 'i21', minWidth: '80' },
{ title: '谐波22次', field: 'i22', minWidth: '80' },
{ title: '谐波23次', field: 'i23', minWidth: '80' },
{ title: '谐波24次', field: 'i24', minWidth: '80' },
{ title: '谐波25次', field: 'i25', minWidth: '80' },
{ title: '谐波26次', field: 'i26', minWidth: '80' },
{ title: '谐波27次', field: 'i27', minWidth: '80' },
{ title: '谐波28次', field: 'i28', minWidth: '80' },
{ title: '谐波29次', field: 'i29', minWidth: '80' },
{ title: '谐波30次', field: 'i30', minWidth: '80' },
{ title: '谐波31次', field: 'i31', minWidth: '80' },
{ title: '谐波32次', field: 'i32', minWidth: '80' },
{ title: '谐波33次', field: 'i33', minWidth: '80' },
{ title: '谐波34次', field: 'i34', minWidth: '80' },
{ title: '谐波35次', field: 'i35', minWidth: '80' },
{ title: '谐波36次', field: 'i36', minWidth: '80' },
{ title: '谐波37次', field: 'i37', minWidth: '80' },
{ title: '谐波38次', field: 'i38', minWidth: '80' },
{ title: '谐波39次', field: 'i39', minWidth: '80' },
{ title: '谐波40次', field: 'i40', minWidth: '80' },
{ title: '谐波41次', field: 'i41', minWidth: '80' },
{ title: '谐波42次', field: 'i42', minWidth: '80' },
{ title: '谐波43次', field: 'i43', minWidth: '80' },
{ title: '谐波44次', field: 'i44', minWidth: '80' },
{ title: '谐波45次', field: 'i45', minWidth: '80' },
{ title: '谐波46次', field: 'i46', minWidth: '80' },
{ title: '谐波47次', field: 'i47', minWidth: '80' },
{ title: '谐波48次', field: 'i48', minWidth: '80' },
{ title: '谐波49次', field: 'i49', minWidth: '80' },
{ title: '谐波50次', field: 'i50', minWidth: '80' },
{
title: '操作',
width: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {
formRef.value.open('编辑谐波源特性字典', row)
}
}
]
}
],
loadCallback: () => {}
})
const formRef = ref()
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
// 新增
const add = () => {
formRef.value.open('新增谐波源特性字典')
}
//删除
const del = () => {
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
characteristicDelete(tableStore.table.selection.map(item => item.harmId)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
})
}
}
onMounted(() => {
tableStore.index()
})
</script>
<style lang="scss" scoped></style>

View File

@@ -1,100 +0,0 @@
<template>
<div class="mt10">
<TableHeader :showReset="false" ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="谐波原名称">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" />
</el-form-item>
</template>
<template #operation>
<el-button type="primary" icon="el-icon-Plus">新增</el-button>
<el-button type="primary" icon="el-icon-Delete">删除</el-button>
<el-button type="primary" icon="el-icon-Download">模版下载</el-button>
<el-button type="primary" icon="el-icon-Upload">导入</el-button>
</template>
</TableHeader>
<Table ref="tableRef"></Table>
</div>
</template>
<script setup lang="ts">
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import Table from '@/components/table/index.vue'
import { mainHeight } from '@/utils/layout'
import { ref, reactive, onMounted } from 'vue'
const tableStore = new TableStore({
url: '/user-boot/dept/deptTree',
method: 'POST',
publicHeight: 115,
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
}
},
{ title: '符合类型', field: 'userName', minWidth: '130' },
{ title: '启动方式', field: 'harmonic2', minWidth: '80' },
{ title: '启动容量倍数', field: 'harmonic3', minWidth: '80' },
{
title: '操作',
minWidth: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {}
},
{
name: 'edit',
title: '查看',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {}
}
]
}
],
loadCallback: () => {
setTimeout(() => {
tableStore.table.data = [
{
userName: '电机',
harmonic2: '直接启动',
harmonic3: '4',
},
{
userName: '电机',
harmonic2: '软启动',
harmonic3: '3',
}
]
}, 0)
}
})
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
onMounted(() => {
tableStore.index()
})
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,102 @@
<template>
<el-dialog draggable width="800px" v-model="dialogVisible" :title="title">
<el-form :inline="false" :model="form" label-width="auto" class="form-two" :rules="rules" ref="formRef">
<el-form-item label="负荷类型" prop="inpactloadtypeName">
<el-input
v-model.trim="form.inpactloadtypeName"
clearable
maxlength="32"
show-word-limit
placeholder="请输入负荷类型"
/>
</el-form-item>
<el-form-item label="启动方式" prop="inpactloadStartup">
<el-input
v-model.trim="form.inpactloadStartup"
clearable
maxlength="32"
show-word-limit
placeholder="请输入启动方式"
/>
</el-form-item>
<el-form-item label="启动容量倍数" prop="inpactloadMultiple">
<el-input-number
v-model.trim="form.inpactloadMultiple"
show-word-limit
placeholder="请输入值"
></el-input-number>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="submit">确认</el-button>
</span>
</template>
</el-dialog>
</template>
<script lang="ts" setup>
import { ref, inject, onMounted } from 'vue'
import { reactive } from 'vue'
import { ElMessage } from 'element-plus'
import { loadAdd, loadEdit } from '@/api/advance-boot/assess'
const emit = defineEmits(['submit'])
const dialogVisible = ref(false)
const title = ref('')
const formRef = ref()
// 注意不要和表单ref的命名冲突
const form: any = ref({
inpactloadtypeName: '',
inpactloadStartup: '',
inpactloadMultiple: 0
})
const rules: any = ref({
inpactloadtypeName: [{ required: true, message: '请输入负荷类型', trigger: 'blur' }],
inpactloadStartup: [{ required: true, message: '请输入启动方式', trigger: 'blur' }],
inpactloadMultiple: [{ required: true, message: '请输入启动容量倍数', trigger: 'blur' }]
})
const open = (text: string, data?: anyObj) => {
title.value = text
dialogVisible.value = true
if (data) {
// 表单赋值
form.value = JSON.parse(JSON.stringify(data))
} else {
form.value = {
inpactloadtypeName: '',
inpactloadStartup: '',
inpactloadMultiple: 0
}
}
}
onMounted(() => {})
const submit = () => {
formRef.value.validate(async (valid: boolean) => {
if (valid) {
if (title.value == '新增冲击负荷参数字典') {
loadAdd(form.value).then(res => {
ElMessage.success('新增成功')
dialogVisible.value = false
emit('submit')
})
} else {
loadEdit(form.value).then(res => {
ElMessage.success('编辑成功')
dialogVisible.value = false
emit('submit')
})
}
}
})
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
.el-input-number {
width: 100%;
}
</style>

View File

@@ -0,0 +1,121 @@
<template>
<div class="mt10">
<TableHeader :showReset="false" ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="负荷类型">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入负荷类型" />
</el-form-item>
</template>
<template #operation>
<el-button type="primary" icon="el-icon-Plus" @click="add">新增</el-button>
<el-button type="primary" icon="el-icon-Delete" @click="del">删除</el-button>
<!-- <el-button type="primary" icon="el-icon-Download">模版下载</el-button>
<el-button type="primary" icon="el-icon-Upload">导入</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef"></Table>
<!-- 表单 -->
<Form ref="formRef" @submit="tableStore.index()" />
</div>
</template>
<script setup lang="ts">
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import Table from '@/components/table/index.vue'
import { mainHeight } from '@/utils/layout'
import { ref, reactive, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { loadDelete } from '@/api/advance-boot/assess'
import Form from './form.vue'
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
//字典电压等级
const List = dictData.getBasicData('Interference_Source')
const tableStore = new TableStore({
url: '/advance-boot/assessDicShockLoad/page',
method: 'POST',
filename: '冲击负荷参数',
publicHeight: 115,
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
}
},
{ title: '负荷类型', field: 'inpactloadtypeName', minWidth: '130' },
// {
// title: '负荷类型',
// field: 'inpactloadtypeId',
// minWidth: '130',
// // formatter: (row: any) => {
// // return List.find((item: any) => item.id == row.row.inpactloadtypeId)?.name
// // }
// },
{ title: '启动方式', field: 'inpactloadStartup', minWidth: '80' },
{ title: '启动容量倍数', field: 'inpactloadMultiple', minWidth: '80' },
{
title: '操作',
width: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {
formRef.value.open('编辑冲击负荷参数字典', row)
}
}
]
}
],
loadCallback: () => {}
})
const formRef = ref()
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
// 新增
const add = () => {
formRef.value.open('新增冲击负荷参数字典')
}
//删除
const del = () => {
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
loadDelete(tableStore.table.selection.map(item => item.inpactloadtypeId)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
})
}
}
onMounted(() => {
tableStore.index()
})
</script>
<style lang="scss" scoped></style>

View File

@@ -1,114 +0,0 @@
<template>
<div class="mt10">
<TableHeader :showReset="false" ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="谐波原名称">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" />
</el-form-item>
</template>
<template #operation>
<el-button type="primary" icon="el-icon-Plus">新增</el-button>
<el-button type="primary" icon="el-icon-Delete">删除</el-button>
<el-button type="primary" icon="el-icon-Download">模版下载</el-button>
<el-button type="primary" icon="el-icon-Upload">导入</el-button>
</template>
</TableHeader>
<Table ref="tableRef"></Table>
</div>
</template>
<script setup lang="ts">
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import Table from '@/components/table/index.vue'
import { mainHeight } from '@/utils/layout'
import { ref, reactive, onMounted } from 'vue'
const tableStore = new TableStore({
url: '/user-boot/dept/deptTree',
method: 'POST',
publicHeight: 115,
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
}
},
{ title: '型号', field: 'userName', minWidth: '130' },
{ title: '额定容量(kVA)', field: 'harmonic2', minWidth: '80' },
{ title: '高压制额定电压(kV)', field: 'harmonic3', minWidth: '80' },
{ title: '低压侧额定电压(kV)', field: 'harmonic4', minWidth: '80' },
{ title: '联结组标号', field: 'harmonic5', minWidth: '80' },
{ title: '空载损耗(kW)', field: 'harmonic6', minWidth: '80' },
{ title: '空载电流(A)', field: 'harmonic7', minWidth: '80' },
{ title: '短路阻抗(%)', field: 'harmonic8', minWidth: '80' },
{
title: '操作',
minWidth: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {}
},
{
name: 'edit',
title: '查看',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {}
}
]
}
],
loadCallback: () => {
setTimeout(() => {
tableStore.table.data = [
{
userName: 'LGJ-220-35kV',
harmonic2: '架空',
harmonic3: '0.33',
harmonic4: '2.42',
harmonic5: '2.42',
harmonic6: '1.25',
harmonic7: '2.42',
harmonic8: '1.25',
harmonic9: '2.42'
},
{
userName: 'LGJ-220-35kV',
harmonic2: '电缆',
harmonic3: '0.33',
harmonic4: '2.42',
harmonic5: '2.42',
harmonic6: '1.25',
harmonic7: '2.42',
harmonic8: '1.25',
harmonic9: '2.42'
},
]
}, 0)
}
})
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
onMounted(() => {
tableStore.index()
})
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,158 @@
<template>
<el-dialog draggable width="800px" v-model="dialogVisible" :title="title">
<el-form :inline="false" :model="form" label-width="auto" class="form-two" :rules="rules" ref="formRef">
<el-form-item label="变压器型号" prop="transtypeName">
<el-input
v-model.trim="form.transtypeName"
clearable
maxlength="32"
show-word-limit
placeholder="请输入变压器型号"
/>
</el-form-item>
<el-form-item label="额定容量(kVA)" prop="transCapa">
<el-input-number v-model.trim="form.transCapa" show-word-limit placeholder="请输入值"></el-input-number>
</el-form-item>
<el-form-item label="高压侧电压" prop="transhighScale">
<el-select v-model="form.transhighScale" placeholder="请选择高压侧电压">
<el-option
v-for="item in voltageLevelList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="低压侧电压" prop="translowScale">
<el-select v-model="form.translowScale" placeholder="请选择低压侧电压">
<el-option
v-for="item in voltageLevelList"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="联结组标号" prop="trnasNo">
<el-input-number v-model.trim="form.trnasNo" show-word-limit placeholder="请输入值"></el-input-number>
</el-form-item>
<el-form-item label="空载损耗(kW)" prop="noloadLoss">
<el-input-number
v-model.trim="form.noloadLoss"
show-word-limit
placeholder="请输入值空载损耗"
></el-input-number>
</el-form-item>
<el-form-item label="负载损耗(kW)" prop="loadLoss">
<el-input-number
v-model.trim="form.loadLoss"
show-word-limit
placeholder="请输入值负载损耗"
></el-input-number>
</el-form-item>
<el-form-item label="空载电流(A)" prop="noloadCur">
<el-input-number v-model.trim="form.noloadCur" show-word-limit placeholder="请输入值"></el-input-number>
</el-form-item>
<el-form-item label="短路阻抗(%)" prop="shortCircuitImpedance">
<el-input-number
v-model.trim="form.shortCircuitImpedance"
show-word-limit
placeholder="请输入值"
></el-input-number>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="submit">确认</el-button>
</span>
</template>
</el-dialog>
</template>
<script lang="ts" setup>
import { ref, inject, onMounted } from 'vue'
import { reactive } from 'vue'
import { ElMessage } from 'element-plus'
import { transformerAdd, transformerEdit } from '@/api/advance-boot/assess'
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
//字典电压等级
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
const emit = defineEmits(['submit'])
const dialogVisible = ref(false)
const title = ref('')
const formRef = ref()
// 注意不要和表单ref的命名冲突
const form: any = ref({
transtypeName: '',
translowScale: '',
transCapa: 0,
transhighScale: '',
trnasNo: 0,
noloadLoss: 0,
loadLoss: 0,
noloadCur: 0,
shortCircuitImpedance: 0
})
const rules: any = ref({
transtypeName: [{ required: true, message: '请输入变压器型号', trigger: 'blur' }],
translowScale: [{ required: true, message: '请选择低压侧电压', trigger: 'change' }],
transCapa: [{ required: true, message: '请输入额定容量', trigger: 'blur' }],
transhighScale: [{ required: true, message: '请选择高压侧电压', trigger: 'change' }],
trnasNo: [{ required: true, message: '请输入联结组标号', trigger: 'blur' }],
noloadLoss: [{ required: true, message: '请输入空载损耗', trigger: 'blur' }],
loadLoss: [{ required: true, message: '请输入空载损耗', trigger: 'blur' }],
noloadCur: [{ required: true, message: '请输入空载电流', trigger: 'blur' }],
shortCircuitImpedance: [{ required: true, message: '请输入短路阻抗', trigger: 'blur' }]
})
const open = (text: string, data?: anyObj) => {
title.value = text
dialogVisible.value = true
if (data) {
// 表单赋值
form.value = JSON.parse(JSON.stringify(data))
} else {
form.value = {
transtypeName: '',
translowScale: '',
transCapa: 0,
transhighScale: '',
trnasNo: 0,
noloadLoss: 0,
loadLoss: 0,
noloadCur: 0,
shortCircuitImpedance: 0
}
}
}
onMounted(() => {})
const submit = () => {
formRef.value.validate(async (valid: boolean) => {
if (valid) {
if (title.value == '新增变压器参数字典') {
transformerAdd(form.value).then(res => {
ElMessage.success('新增成功')
dialogVisible.value = false
emit('submit')
})
} else {
transformerEdit(form.value).then(res => {
ElMessage.success('编辑成功')
dialogVisible.value = false
emit('submit')
})
}
}
})
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
.el-input-number {
width: 100%;
}
</style>

View File

@@ -0,0 +1,140 @@
<template>
<div class="mt10">
<TableHeader :showReset="false" ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="变压器型号">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入变压器型号" />
</el-form-item>
</template>
<template #operation>
<el-button type="primary" icon="el-icon-Plus" @click="add">新增</el-button>
<el-button type="primary" icon="el-icon-Delete" @click="del">删除</el-button>
<!-- <el-button type="primary" icon="el-icon-Download">模版下载</el-button>
<el-button type="primary" icon="el-icon-Upload">导入</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef"></Table>
<!-- 表单 -->
<Form ref="formRef" @submit="tableStore.index()" />
</div>
</template>
<script setup lang="ts">
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import Table from '@/components/table/index.vue'
import { transformerDelete } from '@/api/advance-boot/assess'
import { useDictData } from '@/stores/dictData'
import Form from './form.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ref, reactive, onMounted } from 'vue'
const dictData = useDictData()
//字典电压等级
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
const tableStore = new TableStore({
url: '/advance-boot/assessDicTransformer/page',
method: 'POST',
publicHeight: 115,
filename: '变压器参数',
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
}
},
{ title: '变压器型号', field: 'transtypeName', minWidth: '130' },
{ title: '额定容量(kVA)', field: 'transCapa', minWidth: '80' },
{
title: '高压侧电压(kV)',
field: 'transhighScale',
minWidth: '80',
formatter: (row: any) => {
return voltageLevelList.find((item: any) => item.id == row.row.transhighScale)?.name
}
},
{
title: '低压侧电压(kV)',
field: 'translowScale',
minWidth: '80',
formatter: (row: any) => {
return voltageLevelList.find((item: any) => item.id == row.row.translowScale)?.name
}
},
{ title: '联结组标号', field: 'trnasNo', minWidth: '80' },
{ title: '空载损耗(kW)', field: 'noloadLoss', minWidth: '80' },
{ title: '负载损耗(kW)', field: 'loadLoss', minWidth: '80' },
{ title: '空载电流(A)', field: 'noloadCur', minWidth: '80' },
{ title: '短路阻抗(%)', field: 'shortCircuitImpedance', minWidth: '80' },
{
title: '操作',
width: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {
formRef.value.open('编辑变压器参数字典', row)
}
},
// {
// name: 'edit',
// title: '查看',
// type: 'primary',
// icon: 'el-icon-Open',
// render: 'basicButton',
// click: row => {}
// }
]
}
],
loadCallback: () => {}
})
const formRef = ref()
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
// 新增
const add = () => {
formRef.value.open('新增变压器参数字典')
}
//删除
const del = () => {
if (tableStore.table.selection.length == 0) {
ElMessage({
type: 'warning',
message: '请选择要删除的数据'
})
} else {
ElMessageBox.confirm('此操作将永久删除, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
transformerDelete(tableStore.table.selection.map(item => item.transtypeId)).then(res => {
ElMessage({
type: 'success',
message: '删除成功!'
})
tableStore.index()
})
})
}
}
onMounted(() => {
tableStore.index()
})
</script>
<style lang="scss" scoped></style>

View File

@@ -10,10 +10,10 @@
<script lang="ts" setup>
import { ref } from 'vue'
import type { TabsPaneContext } from 'element-plus'
import HarmonicWave from './components/harmonicWave.vue'
import cable from './components/cable.vue'
import transformer from './components/transformer.vue'
import load from './components/load.vue'
import HarmonicWave from './components/harmonicWave/index.vue'
import cable from './components/cable/index.vue'
import transformer from './components/transformer/index.vue'
import load from './components/load/index.vue'
const activeName = ref('1')
const handleClick = (tab: TabsPaneContext, event: Event) => {

View File

@@ -3,7 +3,7 @@
<el-tabs type="border-card" v-model="activeName">
<el-tab-pane label="评估用户维护" name="1"><User v-if="activeName == '1'"/></el-tab-pane>
<el-tab-pane label="用户二级评估" name="2"><Assess v-if="activeName == '2'"/></el-tab-pane>
<el-tab-pane label="参数字典维护" name="3"><Dictionary/></el-tab-pane>
<el-tab-pane label="参数字典维护" name="3"><Dictionary v-if="activeName == '3'"/></el-tab-pane>
</el-tabs>
</div>
</template>
@@ -15,6 +15,6 @@ import Dictionary from '@/views/pqs/runManage/assessment/components/dictionary/i
defineOptions({
name: 'runManage/assessment'
})
const activeName = ref('1')
const activeName = ref('3')
</script>
<style lang="scss" scoped></style>

View File

@@ -76,7 +76,7 @@ const tableStore = new TableStore({
{
field: 'devCapacity',
title: '供电终端容量(MVA )',
minWidth: 150
minWidth: 160
},
{
field: 'dealCapacity',
@@ -104,12 +104,12 @@ const tableStore = new TableStore({
{
field: 'voltageDev',
title: '电压偏差上限(%)',
minWidth: 120
minWidth: 140
},
{
field: 'uvoltageDev',
title: '电压偏差下限(%)',
minWidth: 120
minWidth: 140
},

View File

@@ -17,7 +17,7 @@
</div>
<div>
<vxe-table height="auto" auto-resize :data="resembleData" v-bind="defaultAttribute">
<vxe-column field="name" title="暂降原因"></vxe-column>
<vxe-column field="name" title="暂降类型"></vxe-column>
<vxe-column field="value" title="暂降次数"></vxe-column>
</vxe-table>
</div>

View File

@@ -0,0 +1,102 @@
<template>
<div>
<el-card class="default-main mb10">
<template #header>
<div class="card-header">
<span>模拟短信发送</span>
</div>
</template>
<div :style="height">
<div>
<div class="title">接收手机号</div>
<el-input
class="mt10 mb20"
v-model="phone"
placeholder="请输入手机号"
maxlength="11"
style="width: 200px; margin-left: 30px"
></el-input>
</div>
<div>
<div class="title">发送内容</div>
<el-input
class="mt10 mb10 ml30"
style="width: 95%"
v-model.trim="textarea"
:rows="5"
type="textarea"
placeholder="请输入短信内容"
/>
</div>
<el-divider />
<div style="text-align: center" class="mt10">
<el-button type="primary" icon="el-icon-Sort" @click="send">发送</el-button>
<el-button icon="el-icon-Close" @click="clear">清空</el-button>
</div>
</div>
</el-card>
</div>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue'
import { mainHeight } from '@/utils/layout'
import { ElMessage } from 'element-plus'
defineOptions({
name: 'smsConfiguration'
})
const phone = ref('')
const textarea = ref('')
const send = () => {
const phoneRegex = /^1[3-9]\d{9}$/ // 简单的手机号正则,只验证格式
if (!phoneRegex.test(phone.value)) {
ElMessage({
message: '请输入正确的手机号',
type: 'warning'
})
return
// 显示错误信息m
}
if (textarea.value === '') {
ElMessage({
message: '短信内容不能为空',
type: 'warning'
})
return
}
ElMessage({
message: '模拟短信发送成功',
type: 'success'
})
}
const clear = () => {
phone.value = ''
textarea.value = ''
ElMessage({
message: '清空成功',
type: 'success'
})
}
const height = mainHeight(105)
</script>
<style lang="scss" scoped>
.title {
background-color: #f2f2f2;
height: 30px;
line-height: 30px;
font-weight: 600;
padding-left: 10px;
margin-bottom: 10px;
border-left: 10px solid var(--el-color-primary);
}
:deep(.el-card__body) {
padding: 10px !important;
}
:deep(.el-select) {
min-width: 80px !important;
}
.checkbox {
display: flex;
justify-content: space-between;
}
</style>

View File

@@ -0,0 +1,272 @@
<template>
<div>
<el-card class="default-main mb10 mr0">
<template #header>
<div class="card-header">
<span>短信配置</span>
</div>
</template>
<div :style="height">
<div>
<div class="title">短信发送设置</div>
<el-form :model="form" inline label-width="100px" class="mb10 ml30 mt20">
<el-form-item label="短信发送功能">
<el-select v-model="form.sms" style="width: 100px">
<el-option
v-for="item in list[0]"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="事件扫描间隔">
<el-select v-model="form.interval" style="width: 100px">
<el-option
v-for="item in list[1]"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="离线数据时间">
<el-select v-model="form.time" style="width: 100px">
<el-option
v-for="item in list[2]"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
</div>
<div>
<div class="title">短信发送时间段设置</div>
<div class="mb20 ml30 checkbox">
<el-checkbox-group v-model="form.sendTime">
<el-checkbox
v-for="item in timePeriod"
class="mt10"
:key="item.start + item.end"
:label="`${item.start} - ${item.end}`"
border
/>
</el-checkbox-group>
<el-button type="primary" icon="el-icon-Plus" @click="addTime" class="mt10"></el-button>
</div>
</div>
<div>
<div class="title">类型设置</div>
<div class="mb20 ml30 checkbox">
<el-checkbox-group v-model="form.type">
<el-checkbox
v-for="item in typeList"
class="mt10"
:key="item.label"
:label="item.label"
border
/>
</el-checkbox-group>
<el-button type="primary" icon="el-icon-Plus" @click="addType" class="mt10"></el-button>
</div>
</div>
<el-divider />
<div style="text-align: center">
<el-button type="primary" icon="el-icon-Tools" @click="addTime" class="mt10">设置</el-button>
</div>
</div>
</el-card>
<!-- 时间范围 -->
<el-dialog draggable v-model="timeFlag" title="添加时间范围模版" width="300">
<div>
<span class="mr10">起始时间</span>
<el-time-select
v-model="startTime"
style="width: 200px"
:max-time="endTime"
placeholder="起始时间"
start="00:00"
step="1:00"
end="23:00"
/>
</div>
<div class="mt10">
<span class="mr10">结束时间</span>
<el-time-select
v-model="endTime"
style="width: 200px"
:min-time="startTime"
placeholder="结束时间"
start="00:00"
step="1:00"
end="23:00"
/>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="timeFlag = false">取消</el-button>
<el-button type="primary" @click="determineTheTime">确定</el-button>
</div>
</template>
</el-dialog>
<!-- 添加类型模版 -->
<el-dialog draggable v-model="typeFlag" title="添加类型模版" width="300">
<div>
<span class="mr10"> 类型名称</span>
<el-input v-model="typeName" style="width: 200px" placeholder="请输入类型名称"></el-input>
</div>
<div class="mt10">
<span class="mr10">临界最小值</span>
<el-input-number
v-model="minType"
:min="0"
@change="minChange"
style="width: 200px"
placeholder="请输入临界最小值"
></el-input-number>
</div>
<div class="mt10">
<span class="mr10">临界最大值</span>
<el-input-number
v-model="maxType"
:min="minType + 1"
style="width: 200px"
placeholder="请输入临界最大值"
></el-input-number>
</div>
<template #footer>
<div class="dialog-footer">
<el-button @click="timeFlag = false">取消</el-button>
<el-button type="primary" @click="addAType">确定</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue'
import { mainHeight } from '@/utils/layout'
import { ElMessage } from 'element-plus'
defineOptions({
name: 'smsConfiguration'
})
const list = [
[
{ label: '关闭', value: 0 },
{ label: '启动', value: 1 }
],
[
{ label: '2分钟', value: 2 },
{ label: '3分钟', value: 3 },
{ label: '5分钟', value: 5 },
{ label: '10分钟', value: 10 },
{ label: '30分钟', value: 30 }
],
[
{ label: '1天', value: 1 },
{ label: '2天', value: 2 },
{ label: '3天', value: 3 },
{ label: '4天', value: 4 },
{ label: '5天', value: 5 },
{ label: '6天', value: 6 },
{ label: '7天', value: 7 }
]
]
const typeList = ref([{ label: '暂降', min: 0, max: 0 }])
const timeFlag = ref(false)
const typeFlag = ref(false)
const startTime = ref('')
const endTime = ref('')
const timePeriod = ref([
{ start: '08:00', end: '12:00' },
{ start: '13:00', end: '18:00' }
])
const typeName = ref('')
const minType = ref(0)
const maxType = ref(0)
const height = mainHeight(105)
const form = reactive({
sms: 0,
interval: 3,
time: 1,
sendTime: [],
type: []
})
const addTime = () => {
startTime.value = ''
endTime.value = ''
timeFlag.value = true
// 这里可以添加逻辑来处理时间范围的添加
}
const addType = () => {
typeName.value = ''
minType.value = 0
maxType.value = 0
typeFlag.value = true
// 这里可以添加逻辑来处理时间范围的添加
}
// 确定时间
const determineTheTime = () => {
if (!startTime.value || !endTime.value) {
ElMessage({
message: '请选择时间',
type: 'warning'
})
return
}
timePeriod.value.push({
start: startTime.value,
end: endTime.value
})
timeFlag.value = false
}
// 确定设置类型
const addAType = () => {
if (!typeName.value) {
ElMessage({
message: '请输入类型名称',
type: 'warning'
})
return
}
typeList.value.push({
label: typeName.value,
min: minType.value,
max: maxType.value
})
typeFlag.value = false
}
const minChange = (val: number) => {
if (val >= maxType.value) {
maxType.value = val + 1
}
}
</script>
<style lang="scss" scoped>
.title {
background-color: #f2f2f2;
height: 30px;
line-height: 30px;
font-weight: 600;
padding-left: 10px;
margin-bottom: 10px;
border-left: 10px solid var(--el-color-primary);
}
:deep(.el-card__body) {
padding: 10px !important;
}
:deep(.el-select) {
min-width: 80px !important;
}
.checkbox {
display: flex;
justify-content: space-between;
}
</style>

View File

@@ -1,12 +1,17 @@
<template>
<div class="default-main">123 </div>
<div class="default-main">
<el-row >
<el-col :span="12"><setSms /></el-col>
<el-col :span="12"><send /></el-col>
</el-row>
</div>
</template>
<script setup lang='ts'>
// src/views/setting/translate/configuration/index.vue
<script setup lang="ts">
import { ref, reactive } from 'vue'
import setSms from '@/views/setting/translate/configuration/component/setSms.vue'
import send from '@/views/setting/translate/configuration/component/send.vue'
defineOptions({
name: 'smsQueries'
})
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@@ -28,7 +28,7 @@ import { ElMessage } from 'element-plus'
import { dictTypeDelete } from '@/api/system-boot/dictType'
defineOptions({
name: 'system-boot/dictType/list'
name: 'smsQueries'
})
const tableStore = new TableStore({
url: '/system-boot/dictType/list',