承载能力评估页面 绘制 79%

This commit is contained in:
GGJ
2024-03-04 20:33:32 +08:00
parent cf70adb959
commit 4b30fc8a01
15 changed files with 950 additions and 252 deletions

View File

@@ -27,7 +27,7 @@
</el-select>
</el-form-item>
<el-form-item label="用户类型" prop="casualUser">
<el-select v-model="form.casualUser" placeholder="请选择权限类型">
<el-select v-model="form.casualUser" placeholder="请选择用户类型类型">
<el-option
v-for="(item, index) in TypeOptions"
:label="item.label"

View File

@@ -0,0 +1,11 @@
<template>
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane label="光伏电站承载能力评估" name="1">User</el-tab-pane>
<el-tab-pane label="充电站、电加热负荷、电气化铁路承载能力评估" name="2">Config</el-tab-pane>
</el-tabs>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue'
const activeName = ref('1')
</script>
<style lang="scss" scoped></style>

View File

@@ -0,0 +1,201 @@
<template>
<div class="default-main">
<div v-show="addedShow">
<TableHeader datePicker ref="TableHeaderRef">
<template #select>
<el-form-item label="用户类型">
<el-input
v-model="tableStore.table.params.searchValue"
clearable
placeholder="输入关键字筛选"
/>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Setting" type="primary" @click="configuration">承载能力评估策略</el-button>
<el-button icon="el-icon-Plus" type="primary" @click="addedShow = false">
新增承载能力评估
</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<el-dialog v-model="view" :title="title" width="600" :before-close="handleClose">
<el-form ref="ruleFormRef" :model="form" label-width="auto" :disabled="disabled" :rules="rules">
<el-form-item label="用户名称:" prop="name">
<el-input v-model="form.name" clearable placeholder="请输入用户名称" />
</el-form-item>
<el-form-item label="用户类型:" prop="userType">
<el-select v-model="form.userType" clearable collapse-tagsplaceholder="请选择用户类型">
<el-option v-for="item in uesrList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="电压等级:" prop="level">
<el-select v-model="form.level" clearable collapse-tags placeholder="请选择电压等级">
<el-option v-for="item in levelList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="用户协议容量(MVA)" prop="mav1">
<el-input v-model="form.mav1" clearable placeholder="请输入用户协议容量" />
</el-form-item>
<el-form-item label="拟接入容量(MVA)" prop="mav2">
<el-input v-model="form.mav2" clearable placeholder="请输入拟接入容量" />
</el-form-item>
<el-form-item label="区域">
<Area v-model="form.deptIndex" style="width: 100%" />
</el-form-item>
<el-form-item label="详细地址:" prop="detailed">
<el-input
clearable
v-model="form.detailed"
:autosize="{ minRows: 2, maxRows: 4 }"
type="textarea"
placeholder="请输入详细地址"
/>
</el-form-item>
</el-form>
</el-dialog>
<policy v-if="policyView" @View="policyView = false" />
</div>
<Added v-if="!addedShow" />
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, reactive } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import Area from '@/components/form/area/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import Added from './added.vue'
import policy from './policy.vue'
import { mainHeight } from '@/utils/layout'
import { useDictData } from '@/stores/dictData'
defineOptions({
name: 'estimate/evaluationList'
})
const dictData = useDictData()
const levelList = dictData.getBasicData('Dev_Voltage_Stand')
const uesrList = dictData.getBasicData('Interference_Source')
const view = ref(false)
const disabled = ref(false)
const policyView = ref(false)
const addedShow = ref(false)
const TableHeaderRef = ref()
const title = ref('')
const form = ref({
name: '',
level: '',
deptIndex: dictData.state.area[0].id,
userType: '光伏电站',
type: '光伏电站',
mav1: '100',
mav2: '100',
user: 'Admin',
time: '2024-01-03',
detailed: '详细地址'
})
const rules = {
name: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
userType: [{ required: true, message: '请选择用户类型', trigger: 'change' }],
level: [{ required: true, message: '请选择电压等级', trigger: 'change' }],
mav1: [{ required: true, message: '请输入用户协议容量', trigger: 'blur' }],
mav2: [{ required: true, message: '请输入拟接入容量', trigger: 'blur' }],
detailed: [{ required: true, message: '请输入详细地址', trigger: 'blur' }]
}
const ruleFormRef = ref()
const tableStore = new TableStore({
url: '/advance-boot/process/querySagEventsPage',
method: 'POST',
column: [
{ width: '60', type: 'checkbox' },
{
field: 'index',
title: '序号',
width: '60',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'name', title: '配变台区' },
{ field: 'type', title: '评估类型' },
{ field: 'Area', title: '预评估用户' },
{ field: 'level', title: '评估结果' },
{ field: 'mav1', title: '评估日期' },
{
title: '操作',
width: '180',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '查看',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
if (ruleFormRef.value) ruleFormRef.value.resetFields()
disabled.value = true
title.value = '查看承载能力预评估用户'
form.value = JSON.parse(JSON.stringify(row))
view.value = true
}
},
{
name: 'del',
text: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除?'
},
click: row => {}
}
]
}
],
loadCallback: () => {
tableStore.table.data = [
{
name: '光伏电站用户1',
type: '光伏电站',
Area: '中国',
level: '220',
mav1: '100',
mav2: '100',
detailed: '详情',
user: 'Admin',
time: '2024-01-03'
}
]
}
})
tableStore.table.params.searchValue = ''
provide('tableStore', tableStore)
onMounted(() => {
TableHeaderRef.value.setDatePicker([{ label: '周', value: 4 }])
TableHeaderRef.value.setInterval(4)
tableStore.index()
})
// 配置
const configuration = () => {
policyView.value = true
}
// 取消
const handleClose = () => {
ruleFormRef.value.resetFields()
view.value = false
}
</script>

View File

@@ -0,0 +1,231 @@
<template>
<el-dialog v-model="policyView" title="承载能力评估策略" width="1400" :before-close="handleClose">
<div style="display: flex; justify-content:end">
<el-button icon="el-icon-Refresh" type="primary" >一键还原</el-button>
</div>
<el-divider content-position="left">光伏电站承载能力评估策略</el-divider>
<vxe-table
v-bind="defaultAttribute"
ref="xTable"
:column-config="{ resizable: true }"
:loading="loading"
:data="tableData"
:edit-config="{ trigger: 'manual', mode: 'row', autoClear: false, showIcon: false }"
>
<vxe-colgroup field="group0" title="等级" align="right">
<vxe-column field="name" width="180" title="结果" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="form.name" type="text"></vxe-input>
</template>
</vxe-column>
</vxe-colgroup>
<vxe-column field="role" title="安全(个)" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="form.role" type="text" placeholder="请输入昵称"></vxe-input>
</template>
</vxe-column>
<vxe-column field="num6" title="III级预警(个)" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="form.num6" type="text"></vxe-input>
</template>
</vxe-column>
<vxe-column field="date12" title="II级预警(个)" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="form.date12" type="text"></vxe-input>
</template>
</vxe-column>
<vxe-column field="date13" title="I级预警(个)" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="form.date13" type="text"></vxe-input>
</template>
</vxe-column>
<vxe-column title="操作" width="160">
<template #default="{ row }">
<template v-if="isActiveStatus(row)">
<el-button type="primary" size="small" @click="saveRowEvent(row)" link>保存</el-button>
<el-button type="primary" size="small" @click="cancelRowEvent(row)" link>取消</el-button>
</template>
<template v-else>
<el-button size="small" @click="editRowEvent(row)" link>编辑</el-button>
</template>
</template>
</vxe-column>
</vxe-table>
<el-divider content-position="left">充电站电加热负荷电气化铁路承载能力评估</el-divider>
<vxe-table
v-bind="defaultAttribute"
ref="xTable"
:column-config="{ resizable: true }"
:loading="loading"
:data="tableData"
:edit-config="{ trigger: 'manual', mode: 'row', autoClear: false, showIcon: false }"
>
<vxe-colgroup field="group0" title="等级" align="right">
<vxe-column field="name" width="180" title="结果" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="form.name" type="text"></vxe-input>
</template>
</vxe-column>
</vxe-colgroup>
<vxe-column field="role" title="THD(%)" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="form.role" type="text" placeholder="请输入昵称"></vxe-input>
</template>
</vxe-column>
<vxe-column field="num6" title="2~25次谐波合格个数" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="form.num6" type="text"></vxe-input>
</template>
</vxe-column>
<vxe-column field="date12" title="畸次谐波合格个数" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="form.date12" type="text"></vxe-input>
</template>
</vxe-column>
<vxe-column field="date13" title="偶次谐波合格个数" :edit-render="{}">
<template #edit="{ row }">
<vxe-input v-model="form.date13" type="text"></vxe-input>
</template>
</vxe-column>
<vxe-column title="操作" width="160">
<template #default="{ row }">
<template v-if="isActiveStatus(row)">
<el-button type="primary" size="small" @click="saveRowEvent(row)" link>保存</el-button>
<el-button type="primary" size="small" @click="cancelRowEvent(row)" link>取消</el-button>
</template>
<template v-else>
<el-button size="small" @click="editRowEvent(row)" link>编辑</el-button>
</template>
</template>
</vxe-column>
</vxe-table>
</el-dialog>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, reactive } from 'vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { mainHeight } from '@/utils/layout'
import { json } from 'stream/consumers'
defineOptions({
name: 'Advancedanalysis/eventcorrelation'
})
const emit = defineEmits(['View'])
const view = ref(false)
const policyView = ref(true)
const xTable = ref()
const loading = ref(false)
const tableData = ref([
{
id: 10001,
name: '安全',
role: '0',
num6: '0',
date12: '0',
date13: '0'
},
{
id: 10002,
name: 'III级预警',
role: '0',
num6: '0',
date12: '0',
date13: '0'
},
{
id: 10003,
name: 'II级预警',
role: 'Test',
date12: '0',
num6: '0',
date13: '0'
},
{
id: 10004,
name: 'I级预警',
role: '0',
date12: '0',
num6: '0',
date13: '0'
}
])
const form = ref({
id: '',
name: '',
role: '',
num6: '',
date12: '',
date13: ''
})
const isActiveStatus = row => {
return xTable.value.isEditByRow(row)
}
// 编辑配置
const editRowEvent = row => {
form.value = JSON.parse(JSON.stringify(row))
xTable.value.setEditRow(row)
}
// 保存配置
const saveRowEvent = row => {
xTable.value.clearEdit().then(() => {
loading.value = true
setTimeout(() => {
loading.value = false
console.log('🚀 ~ saveRowEvent ~ row:', form.value)
}, 300)
})
}
// 取消配置
const cancelRowEvent = row => {
xTable.value.clearEdit().then(() => {
// 还原行数据
xTable.value.revertData(row)
})
}
// 取消
const handleClose = () => {
emit('View')
}
</script>
<style lang="scss" scoped>
::v-deep .vxe-table--header thead tr:first-of-type th:first-of-type {
background: #f8f8f9;
}
::v-deep .vxe-table--header thead tr:first-of-type th:first-of-type:before {
content: '';
position: absolute;
width: 1px;
height: 98px; /*这里需要自己调整根据td的宽度和高度*/
top: 0;
left: 0;
background-color: grey;
opacity: 0.3;
display: block;
transform: rotate(-66deg); /*这里需要自己调整,根据线的位置*/
transform-origin: top;
}
::v-deep .vxe-table--header thead tr:last-of-type th:first-of-type:before {
content: '';
position: absolute;
width: 1px;
height: 98px; /*这里需要自己调整根据td的宽度和高度*/
bottom: 0;
right: 0;
background-color: grey;
opacity: 0.3;
display: block;
transform: rotate(-66deg); /*这里需要自己调整,根据线的位置*/
transform-origin: bottom;
}
</style>

View File

@@ -0,0 +1,242 @@
<template>
<div class="default-main">
<div>
<TableHeader datePicker ref="TableHeaderRef">
<template #select>
<el-form-item label="用户类型">
<el-input
v-model="tableStore.table.params.searchValue"
clearable
placeholder="输入关键字筛选"
/>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
<el-dialog v-model="dialogVisible" :title="title" width="600" :before-close="handleClose">
<el-form ref="ruleFormRef" :model="form" label-width="auto" :disabled="disabled" :rules="rules">
<el-form-item label="用户名称:" prop="name">
<el-input v-model="form.name" clearable placeholder="请输入用户名称" />
</el-form-item>
<el-form-item label="用户类型:" prop="userType">
<el-select v-model="form.userType" clearable collapse-tagsplaceholder="请选择用户类型">
<el-option v-for="item in uesrList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="电压等级:" prop="level">
<el-select v-model="form.level" clearable collapse-tags placeholder="请选择电压等级">
<el-option v-for="item in levelList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="用户协议容量(MVA)" prop="mav1">
<el-input v-model="form.mav1" clearable placeholder="请输入用户协议容量" />
</el-form-item>
<el-form-item label="拟接入容量(MVA)" prop="mav2">
<el-input v-model="form.mav2" clearable placeholder="请输入拟接入容量" />
</el-form-item>
<el-form-item label="区域">
<Area v-model="form.deptIndex" style="width: 100%" />
</el-form-item>
<el-form-item label="详细地址:" prop="detailed">
<el-input
clearable
v-model="form.detailed"
:autosize="{ minRows: 2, maxRows: 4 }"
type="textarea"
placeholder="请输入详细地址"
/>
</el-form-item>
</el-form>
<template #footer v-if="!disabled">
<div class="dialog-footer">
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="onSubmit">确定</el-button>
</div>
</template>
</el-dialog>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, reactive } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import Area from '@/components/form/area/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { mainHeight } from '@/utils/layout'
import { useDictData } from '@/stores/dictData'
defineOptions({
name: 'estimate/userManagement'
})
const dictData = useDictData()
const levelList = dictData.getBasicData('Dev_Voltage_Stand')
const uesrList = dictData.getBasicData('Interference_Source')
const dialogVisible = ref(false)
const disabled = ref(false)
const TableHeaderRef = ref()
const title = ref('')
interface RuleForm {
name: string
level: string
deptIndex: string
userType: string
type: string
mav1: string
mav2: string
user: string
time: string
detailed: string
}
const form = ref<RuleForm>({
name: '',
level: '',
deptIndex: dictData.state.area[0].id,
userType: '光伏电站',
type: '光伏电站',
mav1: '100',
mav2: '100',
user: 'Admin',
time: '2024-01-03',
detailed: '详细地址'
})
const rules = {
name: [{ required: true, message: '请输入用户名称', trigger: 'blur' }],
userType: [{ required: true, message: '请选择用户类型', trigger: 'change' }],
level: [{ required: true, message: '请选择电压等级', trigger: 'change' }],
mav1: [{ required: true, message: '请输入用户协议容量', trigger: 'blur' }],
mav2: [{ required: true, message: '请输入拟接入容量', trigger: 'blur' }],
detailed: [{ required: true, message: '请输入详细地址', trigger: 'blur' }]
}
const ruleFormRef = ref()
const tableStore = new TableStore({
url: '/advance-boot/process/querySagEventsPage',
method: 'POST',
column: [
{ width: '60', type: 'checkbox' },
{
field: 'index',
title: '序号',
width: '60',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'name', title: '用户名称' },
{ field: 'type', title: '用户类型' },
{ field: 'Area', title: '所属区域' },
{ field: 'level', title: '电压等级(V)' },
{ field: 'mav1', title: '用户协议容量(MVA)' },
{ field: 'mav2', title: '拟接入容量(MVA)' },
{ field: 'detailed', title: '详细地址' },
{ field: 'user', title: '创建者' },
{ field: 'time', title: '创建日期' },
{
title: '操作',
width: '180',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '查看',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
if (ruleFormRef.value) ruleFormRef.value.resetFields()
disabled.value = true
title.value = '查看承载能力预评估用户'
form.value = JSON.parse(JSON.stringify(row))
dialogVisible.value = true
}
},
{
name: 'edit',
title: '编辑',
type: '',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
if (ruleFormRef.value) ruleFormRef.value.resetFields()
disabled.value = false
title.value = '编辑承载能力预评估用户'
form.value = JSON.parse(JSON.stringify(row))
dialogVisible.value = true
}
},
{
name: 'del',
text: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除?'
},
click: row => {
}
}
]
}
],
loadCallback: () => {
tableStore.table.data = [
{
name: '光伏电站用户1',
type: '光伏电站',
Area: '中国',
level: '220',
mav1: '100',
mav2: '100',
detailed: '详情',
user: 'Admin',
time: '2024-01-03'
}
]
}
})
tableStore.table.params.searchValue = ''
provide('tableStore', tableStore)
onMounted(() => {
TableHeaderRef.value.setDatePicker([{ label: '周', value: 4 }])
TableHeaderRef.value.setInterval(4)
tableStore.index()
})
// 新增
const add = () => {
disabled.value = false
title.value = '新增承载能力预评估用户'
dialogVisible.value = true
}
// 保存
const onSubmit = () => {
ruleFormRef.value.validate((valid: boolean) => {
if (valid) {
if (title.value == '新增承载能力预评估用户') {
} else if (title.value == '编辑承载能力预评估用户') {
}
}
})
}
// 取消
const handleClose = () => {
ruleFormRef.value.resetFields()
dialogVisible.value = false
}
</script>

View File

@@ -43,12 +43,12 @@
</el-select>
</el-form-item>
<el-form-item label="筛选">
<el-input v-model="filterName" @keyup="searchEvent" placeholder="输入关键字筛选" />
<el-input v-model="tableStore.table.params.filterName" @keyup="searchEvent" placeholder="输入关键字筛选" />
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Download" type="primary" @click="add">导出</el-button>
<el-button icon="el-icon-Check" type="primary" @click="add">批量升级</el-button>
<el-button icon="el-icon-Download" @click="add">导出</el-button>
<el-button icon="el-icon-Check" @click="add">批量升级</el-button>
</template>
</TableHeader>
<div :style="`height: calc(${tableStore.table.height} + 58px)`">
@@ -71,7 +71,7 @@
<vxe-column field="runFlag" title="终端状态">
<template #default="{ row }">
<el-tag
type="primary"
v-if="row.runFlag === 0"
style="color: #fff; background: #0099cc"
size="small"
@@ -79,7 +79,7 @@
投运
</el-tag>
<el-tag
type="primary"
v-if="row.runFlag === 1"
style="color: #fff; background: #996600"
size="small"
@@ -87,7 +87,7 @@
热备用
</el-tag>
<el-tag
type="primary"
v-if="row.runFlag === 2"
style="color: #fff; background: #cc0000"
size="small"
@@ -99,7 +99,7 @@
<vxe-column field="comFlag" title="通讯状态">
<template #default="{ row }">
<el-tag
type="primary"
v-if="row.comFlag === 0"
style="color: #fff; background: #cc0000"
size="small"
@@ -107,7 +107,7 @@
中断
</el-tag>
<el-tag
type="primary"
v-if="row.comFlag === 1"
style="color: #fff; background: #2e8b57"
size="small"
@@ -125,13 +125,13 @@
<vxe-column field="updateTime" title="最新升级时间"></vxe-column>
<vxe-column title="操作" min-width="100">
<template #default="{ row }">
<el-button v-if="row.level == 4" type="primary" size="small" link @click="updateprogram(row)">
<el-button v-if="row.level == 4" size="small" link @click="updateprogram(row)">
升级
</el-button>
<el-button
v-if="row.level == 4"
:disabled="row.state == 1 ? true : false"
type="primary"
size="small"
link
@click="queryview(row)"
@@ -154,30 +154,30 @@
<vxe-column field="versionId" align="center" title="版本序号"></vxe-column>
<vxe-column field="flag" align="center" title="版本状态" width="100">
<template #default="{ row }">
<el-tag type="primary" v-if="row.flag == true" style="color: #fff; background: #fc0">
<el-tag v-if="row.flag == true" style="color: #fff; background: #fc0">
前期版本
</el-tag>
<el-tag type="primary" v-if="row.flag == false" style="color: #fff; background: #0c0">
<el-tag v-if="row.flag == false" style="color: #fff; background: #0c0">
当前版本
</el-tag>
</template>
</vxe-column>
<vxe-column field="result" align="center" title="升级结果" width="100">
<template #default="{ row }">
<el-tag type="primary" v-if="row.result == false" style="color: #fff; background: #f30">
<el-tag v-if="row.result == false" style="color: #fff; background: #f30">
升级失败
</el-tag>
<el-tag type="primary" v-if="row.result == true" style="color: #fff; background: #093">
<el-tag v-if="row.result == true" style="color: #fff; background: #093">
升级成功
</el-tag>
</template>
</vxe-column>
<vxe-column field="state" align="center" title="状态" width="100">
<template #default="{ row }">
<el-tag type="primary" v-if="row.state == false" style="color: #fff; background: #f30">
<el-tag v-if="row.state == false" style="color: #fff; background: #f30">
删除
</el-tag>
<el-tag type="primary" v-if="row.state == true" style="color: #fff; background: #093">
<el-tag v-if="row.state == true" style="color: #fff; background: #093">
正常
</el-tag>
</template>
@@ -242,7 +242,6 @@ const stateoption = ref([
const prodialogVisible = ref(false)
const dialogVisible = ref(false)
const protitle = ref('')
const filterName = ref('')
const treeData: any = ref([])
const treeDataCopy: any = ref([])
//进度条对象
@@ -284,6 +283,12 @@ const tableStore = new TableStore({
}, 0)
}
})
tableStore.table.params.teriminal=''
tableStore.table.params.state=''
tableStore.table.params.program=''
tableStore.table.params.searchEvent=''
tableStore.table.params.filterName=''
provide('tableStore', tableStore)
const tree2List = (list: any) => {
//存储结果的数组
let arr: any = []
@@ -302,7 +307,7 @@ const tree2List = (list: any) => {
// 返回结果数组
return arr
}
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
tableStore.table.params.searchState = 0
onMounted(() => {
@@ -350,7 +355,7 @@ const formFilter = (row: any) => {
// 表格过滤
const searchEvent = debounce(e => {
const filterVal = XEUtils.toValueString(filterName.value).trim().toLowerCase()
const filterVal = XEUtils.toValueString(tableStore.table.params.filterName).trim().toLowerCase()
if (filterVal) {
const options = { children: 'children' }
const searchProps = ['name']

View File

@@ -34,7 +34,7 @@
</el-form-item>
<el-form-item label="筛选">
<el-input v-model="filterName" @keyup="searchEvent" placeholder="输入关键字筛选" />
<el-input v-model="tableStore.table.params.filterName" @keyup="searchEvent" placeholder="输入关键字筛选" />
</el-form-item>
</template>
<template #operation>
@@ -238,7 +238,7 @@ const condialogVisible = ref(false)
const tjdialogVisible = ref(false)
const protitle = ref('')
const filterName = ref('')
const treeData: any = ref([])
const treeDataCopy: any = ref([])
const echartsXq: any = ref([])
@@ -263,6 +263,10 @@ const tableStore = new TableStore({
}, 0)
}
})
tableStore.table.params.devType=''
tableStore.table.params.runFlag=''
tableStore.table.params.comFlag=''
tableStore.table.params.filterName=''
// 处理大数据卡顿
const tree2List = (list: any) => {
//存储结果的数组
@@ -383,7 +387,7 @@ const handleClose = () => {
}
// 表格过滤
const searchEvent = debounce(e => {
const filterVal = XEUtils.toValueString(filterName.value).trim().toLowerCase()
const filterVal = XEUtils.toValueString(tableStore.table.params.filterName).trim().toLowerCase()
if (filterVal) {
const options = { children: 'children' }
const searchProps = ['name']

View File

@@ -1,6 +1,6 @@
<template>
<div class="default-main">
<div v-show="flag">
<div v-show="view">
<TableHeader datePicker>
<template #select>
<el-form-item label="统计类型:">
@@ -120,73 +120,14 @@
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Tickets" type="primary">下载波形</el-button>
<el-button icon="el-icon-SuccessFilled" type="primary">导出</el-button>
<el-button icon="el-icon-Download" type="primary" @click="download">下载波形</el-button>
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
</div>
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="view2">
<el-row>
<el-col :span="12">
<span v-if="view2" style="font-size: 14px; font-weight: ; line-height: 30px">值类型选择:</span>
<el-select
v-if="view2"
style="min-width: 200px; width: 200px"
@change="changeView"
v-model="value"
placeholder="请选择值类型"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-col>
<el-col :span="12">
<el-button
v-if="view2"
@click="backbxlb"
type="primary"
class="el-icon-refresh-right"
icon="el-icon-CloseBold"
style="float: right"
>
返回
</el-button>
</el-col>
</el-row>
<el-tabs v-if="view2" class="default-main" v-model="bxactiveName" @tab-click="bxhandleClick">
<el-tab-pane
label="瞬时波形"
name="ssbx"
class="boxbx pt10 pb10"
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
>
<shushiboxi
v-if="bxactiveName == 'ssbx' && showBoxi"
:value="value"
:boxoList="boxoList"
:wp="wp"
></shushiboxi>
</el-tab-pane>
<el-tab-pane
label="RMS波形"
class="boxbx pt10 pb10"
name="rmsbx"
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
>
<rmsboxi
v-if="bxactiveName == 'rmsbx' && showBoxi"
:value="value"
:boxoList="boxoList"
:wp="wp"
></rmsboxi>
</el-tab-pane>
</el-tabs>
<waveForm senior :boxoList="boxoList" :wp="wp" @backbxlb="backbxlb" />
</div>
</div>
</template>
@@ -195,24 +136,23 @@ import { ref, onMounted, provide } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { mainHeight } from '@/utils/layout'
import { useDictData } from '@/stores/dictData'
import shushiboxi from '@/components/echarts/shushiboxi.vue'
import rmsboxi from '@/components/echarts/rmsboxi.vue'
import { getMonitorEventAnalyseWave } from '@/api/event-boot/transient.ts'
import { ElMessageBox, ElMessage } from 'element-plus'
import { getTransientValue } from '@/api/event-boot/report'
import waveForm from '@/components/echarts/waveForm.vue'
import { getMonitorEventAnalyseWave ,downloadWaveFile} from '@/api/event-boot/transient'
defineOptions({
name: 'Region/transientlist'
})
const dictData = useDictData()
const pageHeight = mainHeight(20)
const bxecharts = mainHeight(95).height as any
const view = ref(true)
const view2 = ref(false)
const showBoxi = ref(true)
const flag = ref(true)
const typeoptions = dictData.getBasicData('Event_Type')
const tableRef = ref()
const reasonoptions = dictData.getBasicData('Event_Reason')
const triggeroptions = dictData.getBasicData('Event_Statis')
const wareaoptions = ref([
@@ -229,6 +169,7 @@ const tableStore = new TableStore({
url: '/event-boot/transient/getTransientValue',
method: 'POST',
column: [
{ width: '60', type: 'checkbox' },
{
field: 'index',
title: '序号',
@@ -290,7 +231,6 @@ const tableStore = new TableStore({
if (res != undefined) {
wp.value = res.data
view.value = false
flag.value = false
view2.value = true
}
})
@@ -316,20 +256,9 @@ const tableStore = new TableStore({
loadCallback: () => {}
})
const bxactiveName = ref('ssbx')
const boxoList = ref({})
const wp = ref({})
const value = ref(1)
const options = ref([
{
value: 1,
label: '一次值'
},
{
value: 2,
label: '二次值'
}
])
provide('tableStore', tableStore)
tableStore.table.params.deptIndex = dictData.state.area[0].id
@@ -352,24 +281,49 @@ tableStore.table.params.fileFlag = ''
onMounted(() => {
tableStore.index()
})
const changeView = () => {
showBoxi.value = false
setTimeout(() => {
showBoxi.value = true
}, 0)
}
const bxhandleClick = (tab: any) => {
if (tab.name == 'ssbx') {
bxactiveName.value = 'ssbx'
} else if (tab.name == 'rmsbx') {
bxactiveName.value = 'rmsbx'
}
// console.log(tab, event);
}
const backbxlb = () => {
view.value = true
flag.value = true
view2.value = false
}
// 导出列表
const exportEvent = () => {
let form = JSON.parse(JSON.stringify(tableStore.table.params))
form.pageNum = 1
form.pageSize = tableStore.table.total
getTransientValue(form).then(res => {
tableRef.value.getRef().exportData({
filename: '区域暂态列表', // 文件名字
sheetName: 'Sheet1',
type: 'xlsx', //导出文件类型 xlsx 和 csv
useStyle: true,
data: res.data.records, // 数据源 // 过滤那个字段导出
columnFilterMethod: function (column, $columnIndex) {
return !(column.$columnIndex === 0)
}
})
})
}
const download = () => {
if (!tableStore.table.selection.length) {
ElMessage.warning('请选择数据')
return
}
downloadWaveFile({
lineId: tableStore.table.selection.map((item: any) => item.eventId)
}).then((res: any) => {
if (res.type == 'application/json') {
ElMessage.warning('暂无可下载的波形文件!')
return
}
ElMessage.success('下载中。。。!')
let blob = new Blob([res], { type: 'application/zip' }) // console.log(blob) // var href = window.URL.createObjectURL(blob); //创建下载的链接
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a') // 创建a标签
link.href = url
link.download = '波形分析下载' // 设置下载的文件名
document.body.appendChild(link)
link.click() //执行下载
document.body.removeChild(link) //释放标签
})
}
</script>

View File

@@ -1,452 +0,0 @@
<template>
<div v-loading="loading">
<div>
<div id="boxi" :style="`height:${vh};overflow: hidden;`">
<div class="bx" id="wave"></div>
</div>
<el-tabs type="border-card">
<el-tab-pane label="暂态波形上送" :style="'height:' + vhh">
<el-table
stripe
:data="Data"
:height="height"
border
style="width: 100%"
header-cell-class-name="table_header"
>
<el-table-column align="center" prop="number" label="事件段"></el-table-column>
<el-table-column align="center" prop="number" label="波形起始点相位(°)">
<el-table-column align="center" prop="number" label="A相"></el-table-column>
<el-table-column align="center" prop="number" label="B相"></el-table-column>
<el-table-column align="center" prop="number" label="C相"></el-table-column>
</el-table-column>
<el-table-column align="center" prop="number" label="跳变段电压变化率(V/ms)">
<el-table-column align="center" prop="number" label="A相"></el-table-column>
<el-table-column align="center" prop="number" label="B相"></el-table-column>
<el-table-column align="center" prop="number" label="C相"></el-table-column>
</el-table-column>
<el-table-column align="center" prop="number" label="相位跳变(°)">
<el-table-column align="center" prop="number" label="A相"></el-table-column>
<el-table-column align="center" prop="number" label="B相"></el-table-column>
<el-table-column align="center" prop="number" label="C相"></el-table-column>
</el-table-column>
<el-table-column align="center" prop="number" label="总分段数目"></el-table-column>
<el-table-column
align="center"
prop="number"
label="三相电压不平衡度(%)"
width="180"
></el-table-column>
<el-table-column align="center" prop="number" label="暂降类型"></el-table-column>
<el-table-column align="center" prop="number" label="暂降原因"></el-table-column>
</el-table>
</el-tab-pane>
</el-tabs>
</div>
</div>
</template>
<script>
import { downloadWaveFile, getMonitorEventAnalyseWave } from '@/api/event-boot/transient'
import { mainHeight } from '@/utils/layout'
import * as echarts from 'echarts'
import url from '@/assets/img/point.png'
import $ from 'jquery'
export default {
props: {
flag: {
type: Boolean,
default: false
},
DColor: {
type: Boolean,
default: false
},
boxoList: {
type: [Object, Array]
},
GJList: {
type: [Object, Array]
}
},
data() {
return {
loading: true,
valA: 0,
isOpen: false,
time: '',
type: '',
severity: '',
iphasic: '',
eventValue: '',
persistTime: '',
lineName: '',
subName: '',
waveDatas: [],
Data: [],
height: null,
vhh: null,
ptpass: '',
waveHeight: undefined,
$wave: undefined,
color: '#006565',
charts: {},
arrpoints: [],
titles: '',
vh: null,
vw: null,
zoom: ''
}
},
created() {},
watch: {
value: function (a, b) {
if (a == 2) {
// $("#wave1").remove();
this.initWaves()
} else {
$('#wave1').remove()
this.initWaves()
}
}
},
mounted() {
this.setHeight()
window.addEventListener('resize', this.setHeight)
this.$wave = $('#wave').eq(0)
this.$nextTick(() => {
this.query()
})
},
beforeDestroy() {
window.removeEventListener('resize', this.setHeight)
},
methods: {
setHeight() {
this.zoom = 1 / document.body.style.zoom
if (this.flag) {
// console.log(123);
this.vh = mainHeight(250).height
} else {
// console.log(3333);
this.vh = mainHeight(270).height
}
},
query() {
this.loading = true
this.initWave()
},
//开始画图
initWave() {
//清除之前增加的div
// $("#wave ~ .bx1").remove();
$('div.bx1').remove()
//设置暂降触发点的位置 一次值与二次值Y轴不同不是计算出来的
// var height = $(window).height() - 90;
var picHeight
var show = true
//var v = $("#interval").val();
var isvisible = false
picHeight = this.vh
// this.$wave.css('height', picHeight)
// this.$wave.css('width', '100%')
$('#wave').css('height', picHeight)
$('#wave').css('width', this.vw)
var adata = []
var bdata = []
var cdata = []
var max = 0
var min = 0
//绘制横向第一个波形图
this.GJList.smp_x.forEach((item, ind) => {
if (this.GJList.smp_a[ind] > max) {
max = this.GJList.smp_a[ind]
} else if (this.GJList.smp_a[ind] < min) {
min = this.GJList.smp_a[ind]
}
if (this.GJList.smp_b[ind] > max) {
max = this.GJList.smp_b[ind]
} else if (this.GJList.smp_b[ind] < min) {
min = this.GJList.smp_b[ind]
}
if (this.GJList.smp_c[ind] > max) {
max = this.GJList.smp_c[ind]
} else if (this.GJList.smp_c[ind] < min) {
min = this.GJList.smp_c[ind]
}
adata.push([item, this.GJList.smp_a[ind]])
bdata.push([item, this.GJList.smp_b[ind]])
cdata.push([item, this.GJList.smp_c[ind]])
})
//绘制瞬时波形图
// const echarts = require('echarts')
let wave = document.getElementById('wave')
let _this = this
var myChartes = echarts.init(wave)
let echartsColor = {
WordColor: '#000',
thread: '#000000',
FigureColor: [
'#07CCCA ',
'#00BFF5',
'#FFBF00',
'#77DA63',
'#D5FF6B',
'#Ff6600',
'#FF9100',
'#5B6E96',
'#66FFCC',
'#B3B3B3',
'#FF00FF',
'#CC00FF',
'#FF9999'
]
}
var option = {
tooltip: {
top: '10px',
trigger: 'axis',
borderColor: 'grey',
backgroundColor: '#fff',
style: {
color: '#000',
fontSize: '15px',
padding: 10
},
formatter: function (params) {
// console.log(params)
var tips = ''
tips += '时刻:' + params[0].data[0] + '</br/>'
for (var i = 0; i < params.length; i++) {
if (params[i].seriesName != '暂降触发点') {
tips += params[i].seriesName + ':' + params[i].value[1] + '<br/>'
}
}
return tips
},
// axisPointer: {
// type: "cross",
// label: {
// color: "#fff",
// fontSize: 16,
// },
// },
textStyle: {
color: '#fff',
fontStyle: 'normal',
opacity: 0.35,
fontSize: 14
},
backgroundColor: 'rgba(0,0,0,0.35)',
borderWidth: 0
},
title: {
left: 'center',
text: '发生时刻:' + this.boxoList.startTime + ' PT变化:' + this.boxoList.measurementPointName,
textStyle: {
fontSize: 16,
color: _this.DColor ? '#fff' : echartsColor.WordColor
}
},
legend: {
left: '5%',
top: '20',
verticalAlign: 'top',
enabled: true,
itemDistance: 5,
textStyle: {
color: _this.DColor ? '#fff' : echartsColor.WordColor,
rich: {
a: {
verticalAlign: 'middle'
}
},
padding: [2, 0, 0, 0] //[上、右、下、左]
}
},
toolbox: {
show: false,
feature: {
//restore: {},
saveAsImage: {
iconStyle: {
borderColor: _this.DColor ? '#fff' : echartsColor.WordColor
}
}
}
},
xAxis: {
type: 'value',
name: '时刻',
boundaryGap: false,
min: this.GJList.smp_x[0],
max: this.GJList.smp_x[this.GJList.smp_x.length - 1] + 1,
title: {
text: 'ms',
textStyle: {
fontSize: 12,
color: _this.DColor ? '#fff' : echartsColor.WordColor
},
enabled: true,
align: 'high'
},
splitLine: {
show: false
},
axisTick: {
alignWithLabel: true
},
axisLine: {
lineStyle: {
color: _this.DColor ? '#fff' : echartsColor.thread
},
onZero: false //-----------重点
},
axisLabel: {
color: _this.DColor ? '#fff' : echartsColor.WordColor,
formatter: function (value, index) {
if (_this.valA != (value - 0).toFixed(0)) {
_this.valA = (value - 0).toFixed(0)
return (value - 0).toFixed(0)
}
}
//rotate:39
}
// data: this.syncExtremes,
},
yAxis: {
type: 'value',
name: 'kV',
title: {
align: 'high',
offset: 0,
text: 'kV',
rotation: 0,
y: -10
},
boundaryGap: [0, '100%'],
showLastLabel: true,
max: (max + 10).toFixed(2),
min: (min - 10).toFixed(2),
opposite: false,
nameTextStyle: {
color: _this.DColor ? '#fff' : echartsColor.WordColor
},
//minInterval: 1,
type: 'value',
axisLine: {
show: true,
lineStyle: {
color: _this.DColor ? '#fff' : echartsColor.thread
},
onZero: false //-----------重点
},
axisLabel: {
color: _this.DColor ? '#fff' : echartsColor.WordColor,
formatter: function (value, index) {
return (value - 0).toFixed(2)
}
},
splitLine: {
lineStyle: {
// 使用深浅的间隔色
color: [_this.DColor ? '#fff' : echartsColor.thread],
type: 'dashed',
opacity: 0.5
}
}
},
grid: {
left: '1%',
right: '40px',
bottom: '40px',
top: '55px',
containLabel: true
},
dataZoom: [
{
type: 'inside',
height: 13,
start: 0,
bottom: '20px',
end: 100
},
{
start: 0,
height: 13,
bottom: '20px',
end: 100
}
],
series: [
{
name: 'A相',
type: 'line',
smooth: true,
symbol: 'none',
sampling: 'lttb',
itemStyle: {
color: '#FFCC00'
},
data: adata
},
{
name: 'B相',
type: 'line',
smooth: true,
symbol: 'none',
sampling: 'lttb',
itemStyle: {
color: '#009900'
},
data: bdata
},
{
name: 'C相',
type: 'line',
smooth: true,
symbol: 'none',
sampling: 'lttb',
itemStyle: {
color: '#CC0000'
},
data: cdata
},
{
name: '暂降触发点',
type: 'scatter',
symbol: 'image://' + url,
itemStyle: {
width: 16,
height: 16
},
data: [[0, min]]
}
]
}
myChartes.setOption(option)
// window.echartsArr.push(myChartes)
setTimeout(() => {
myChartes.resize()
this.loading = false
}, 400)
//第一个波形图数据绘制完毕后,绘制后续的波形图
// let waveDatasTemp = waveDatas.slice(1);
// waveDatasTemp.reverse();
}
}
}
</script>

View File

@@ -1,6 +1,6 @@
<template>
<div class="default-main">
<div v-show="flag">
<div v-show="view">
<TableHeader datePicker>
<template #select>
<el-form-item label="筛选">
@@ -36,74 +36,7 @@
</el-dialog>
</div>
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="view2">
<el-row>
<el-col :span="12">
<span v-if="view2" style="font-size: 14px; font-weight: ; line-height: 30px">值类型选择:</span>
<el-select
v-if="view2"
style="min-width: 200px; width: 200px"
@change="changeView"
v-model="value"
placeholder="请选择值类型"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<el-button v-if="view2" class="ml10" type="primary" @click="AdvancedAnalytics">高级分析</el-button>
</el-col>
<el-col :span="12">
<el-button
v-if="view2"
@click="backbxlb"
type="primary"
class="el-icon-refresh-right"
icon="el-icon-CloseBold"
style="float: right"
>
返回
</el-button>
</el-col>
</el-row>
<el-tabs v-if="view2" class="default-main" v-model="bxactiveName" @tab-click="bxhandleClick">
<el-tab-pane
label="瞬时波形"
name="ssbx"
class="boxbx pt10 pb10"
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
>
<shushiboxi
v-if="bxactiveName == 'ssbx' && showBoxi"
:value="value"
:boxoList="boxoList"
:wp="wp"
></shushiboxi>
</el-tab-pane>
<el-tab-pane
label="RMS波形"
class="boxbx pt10 pb10"
name="rmsbx"
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
>
<rmsboxi
v-if="bxactiveName == 'rmsbx' && showBoxi"
:value="value"
:boxoList="boxoList"
:wp="wp"
></rmsboxi>
</el-tab-pane>
</el-tabs>
</div>
<!-- 高级分析-->
<div v-if="view3" class="pd10">
<span style="font-weight: 500; font-size: 22px">高级分析</span>
<el-button type="primary" @click="gaoBack" style="float: right">返回</el-button>
<boxi :flag="true" :GJList="GJList" :boxoList="boxoList"></boxi>
<waveForm senior :boxoList="boxoList" :wp="wp" @backbxlb="backbxlb" />
</div>
</div>
</template>
@@ -113,13 +46,11 @@ import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import TableHeader from '@/components/table/header/index.vue'
import { queryRelevantLogPage, delRelevantLog, processEvents, analysis } from '@/api/advance-boot/analyse.ts'
import { queryRelevantLogPage, delRelevantLog, processEvents, analysis } from '@/api/advance-boot/analyse'
import { ElMessage, ElMessageBox } from 'element-plus'
import { mainHeight } from '@/utils/layout'
import shushiboxi from '@/components/echarts/shushiboxi.vue'
import rmsboxi from '@/components/echarts/rmsboxi.vue'
import boxi from './boxi.vue'
import { getMonitorEventAnalyseWave } from '@/api/event-boot/transient.ts'
import waveForm from '@/components/echarts/waveForm.vue'
import { getMonitorEventAnalyseWave } from '@/api/event-boot/transient'
defineOptions({
name: 'Advancedanalysis/eventcorrelation'
@@ -130,12 +61,7 @@ const pageHeight = mainHeight(20)
const bxecharts = mainHeight(95).height as any
const loading = ref(false)
const view = ref(true)
const view2 = ref(false)
const view3 = ref(false)
const showBoxi = ref(true)
const flag = ref(true)
const GJList = ref([])
const tableStore = new TableStore({
url: '/advance-boot/process/querySagEventsPage',
@@ -211,7 +137,6 @@ const tableStore = new TableStore({
if (res != undefined) {
wp.value = res.data
view.value = false
flag.value = false
view2.value = true
}
})
@@ -236,21 +161,11 @@ const tableStore = new TableStore({
loadCallback: () => {}
})
tableStore.table.params.searchValue=''
tableStore.table.params.searchValue = ''
const bxactiveName = ref('ssbx')
const boxoList = ref({})
const wp = ref({})
const value = ref(1)
const options = ref([
{
value: 1,
label: '一次值'
},
{
value: 2,
label: '二次值'
}
])
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
@@ -287,39 +202,11 @@ const details = (row: any) => {
})
})
}
// 高级分析
const AdvancedAnalytics = () => {
analysis({
eventIndex: boxoList.value.eventId
}).then(res => {
GJList.value = res.data
flag.value = false
view3.value = true
view2.value = false
})
}
const changeView = () => {
showBoxi.value = false
setTimeout(() => {
showBoxi.value = true
}, 0)
}
const bxhandleClick = (tab: any) => {
if (tab.name == 'ssbx') {
bxactiveName.value = 'ssbx'
} else if (tab.name == 'rmsbx') {
bxactiveName.value = 'rmsbx'
}
// console.log(tab, event);
}
const backbxlb = () => {
view.value = true
flag.value = true
view2.value = false
}
const gaoBack = () => {
view2.value = true
view3.value = false
}
</script>