联调二级评估 参数字典维护页面
This commit is contained in:
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user