电压暂降-高级分析-事件关联分析 影响范围分析 迁移 40%
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
"echarts": "^5.4.3",
|
||||
"echarts4": "npm:echarts@^4.9.0",
|
||||
"element-plus": "^2.5.3",
|
||||
"exceljs": "^4.4.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
"jquery": "^3.7.1",
|
||||
"lodash-es": "^4.17.21",
|
||||
@@ -34,6 +35,7 @@
|
||||
"vue-draggable-resizable": "3.0.0-beta.2",
|
||||
"vue-router": "4",
|
||||
"vxe-table": "^4.5.17",
|
||||
"vxe-table-plugin-export-xlsx": "^4.0.1",
|
||||
"xe-utils": "^3.5.14"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
26
src/api/advance-boot/analyse.ts
Normal file
26
src/api/advance-boot/analyse.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
import createAxios from '@/utils/request'
|
||||
|
||||
// 分析记录管理
|
||||
export function queryRelevantLogPage(data: any) {
|
||||
return createAxios({
|
||||
url: '/advance-boot/process/queryRelevantLogPage',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除策略
|
||||
export function delRelevantLog(data: any) {
|
||||
return createAxios({
|
||||
url: '/advance-boot/process/delRelevantLog',
|
||||
method: 'get',
|
||||
params:data,
|
||||
})
|
||||
}
|
||||
// 影响范围分析 查询
|
||||
export function queryEventsAssPage(data: any) {
|
||||
return createAxios({
|
||||
url: '/advance-boot/process/queryEventsAssPage',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
@@ -15,7 +15,13 @@ import '@/styles/index.scss'
|
||||
import '@/assets/font/iconfont.css'
|
||||
import { ElDialog } from 'element-plus'
|
||||
import BaiduMap from 'vue-baidu-map-3x'
|
||||
import ExcelJS from 'exceljs'
|
||||
import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'
|
||||
|
||||
// 方式1:NPM 安装,注入 ExcelJS 对象
|
||||
VXETable.use(VXETablePluginExportXLSX, {
|
||||
ExcelJS
|
||||
})
|
||||
window.XEUtils = XEUtils
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
@@ -105,14 +105,12 @@ const map = (res: any) => {
|
||||
|
||||
if (geoCoordMap.value.lengt > 0) {
|
||||
geoCoordMap.value.map(item => {
|
||||
console.log("🚀 ~ map ~ item:", item)
|
||||
areaData.push(...new Array(3).fill(item))
|
||||
})
|
||||
}
|
||||
let maxNum = 0
|
||||
let minNum = 0
|
||||
let num: any = []
|
||||
console.log('🚀 ~ map ~ areaData:', areaData)
|
||||
|
||||
if (areaData.length > 0) {
|
||||
areaData.forEach(item => {
|
||||
|
||||
@@ -1,3 +1,161 @@
|
||||
<template>
|
||||
<div class='default-main'>关联性分析</div>
|
||||
</template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker>
|
||||
<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-Tickets" type="primary" @click="analysis">分析记录管理</el-button>
|
||||
<el-button icon="el-icon-SuccessFilled" type="primary" @click="firing">启动关联分析</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 分析记录管理 -->
|
||||
<el-dialog v-model="dialogAnalysis" title="分析记录管理" width="60%">
|
||||
<vxe-table height="500" auto-resize :data="AnalysisData" v-bind="defaultAttribute">
|
||||
<vxe-column field="timeId" title="策略名称"></vxe-column>
|
||||
<vxe-column field="timeId" title="操作时间"></vxe-column>
|
||||
<vxe-column field="createName" title="操作人"></vxe-column>
|
||||
<vxe-column title="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-popconfirm title="是否确认删除策略!" @confirm="details(row)">
|
||||
<template #reference>
|
||||
<el-button type="danger" link>删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { queryRelevantLogPage, delRelevantLog } from '@/api/advance-boot/analyse.ts'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'govern/log/operation'
|
||||
})
|
||||
const dialogAnalysis = ref(false)
|
||||
const AnalysisData = ref([])
|
||||
const tableStore = new TableStore({
|
||||
url: '/advance-boot/process/querySagEventsPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'startTime', title: '发生时间' },
|
||||
{ field: 'duration', title: '持续时间(s)' },
|
||||
{
|
||||
field: 'featureAmplitude',
|
||||
title: '暂降(骤升)幅值(%)'
|
||||
},
|
||||
{ field: 'gdName', title: '供电公司' },
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{
|
||||
field: 'dealFlag',
|
||||
title: '暂降特征幅值计算',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'success',
|
||||
2: 'success',
|
||||
3: 'warning'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '未处理',
|
||||
1: '已处理',
|
||||
2: '已处理,无结果',
|
||||
3: '计算失败'
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'fileFlag',
|
||||
title: '录波文件',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'warning',
|
||||
1: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '不存在',
|
||||
1: '存在'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '波形分析',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return row.fileFlag == 0
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '暂无波形',
|
||||
type: '',
|
||||
disabled: row => {
|
||||
return row.fileFlag == 1
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
item.failReason = item.failReason || '/'
|
||||
item.result = item.result === 1 ? '成功' : '失败'
|
||||
item.loginName = item.loginName || '/'
|
||||
})
|
||||
}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
//分析记录管理
|
||||
const analysis = () => {
|
||||
queryRelevantLogPage({}).then((res: any) => {
|
||||
AnalysisData.value = res.data.records
|
||||
})
|
||||
dialogAnalysis.value = true
|
||||
}
|
||||
// 启动关联分析
|
||||
const firing = () => {}
|
||||
// 删除策略
|
||||
const details = (row: any) => {
|
||||
delRelevantLog({ id: row.id }).then((res: any) => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
queryRelevantLogPage({}).then((res: any) => {
|
||||
AnalysisData.value = res.data.records
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>3</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive } from 'vue'
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
149
src/views/pms/voltageSags/analyse/impactscope/index.vue
Normal file
149
src/views/pms/voltageSags/analyse/impactscope/index.vue
Normal file
@@ -0,0 +1,149 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker>
|
||||
<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-Download" type="primary" @click="exportEvent">导出</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<!-- 分析记录管理 -->
|
||||
<el-dialog v-model="dialogAnalysis" title="分析记录管理" width="60%">
|
||||
<vxe-table height="500" auto-resize :data="AnalysisData" v-bind="defaultAttribute">
|
||||
<vxe-column field="timeId" title="策略名称"></vxe-column>
|
||||
<vxe-column field="timeId" title="操作时间"></vxe-column>
|
||||
<vxe-column field="createName" title="操作人"></vxe-column>
|
||||
<vxe-column title="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<el-popconfirm title="是否确认删除策略!" @confirm="details(row)">
|
||||
<template #reference>
|
||||
<el-button type="danger" link>删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { queryRelevantLogPage, delRelevantLog } from '@/api/advance-boot/analyse.ts'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { queryEventsAssPage } from '@/api/advance-boot/analyse.ts'
|
||||
defineOptions({
|
||||
name: 'govern/log/operation'
|
||||
})
|
||||
const dialogAnalysis = ref(false)
|
||||
const AnalysisData = ref([])
|
||||
const tableRef = ref()
|
||||
const tableStore = new TableStore({
|
||||
url: '/advance-boot/process/queryEventsAssPage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'timeId', title: '时间', width: '200' },
|
||||
{ field: 'timeId', title: '事件关联分析名称', width: '200' },
|
||||
{
|
||||
field: 'contentDes',
|
||||
title: '事件关联分析描述'
|
||||
},
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
width: '200',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '暂降源定位',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: row => {}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '范围查看',
|
||||
type: 'primary',
|
||||
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
item.failReason = item.failReason || '/'
|
||||
item.result = item.result === 1 ? '成功' : '失败'
|
||||
item.loginName = item.loginName || '/'
|
||||
})
|
||||
}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
//分析记录管理
|
||||
const analysis = () => {
|
||||
queryRelevantLogPage({}).then((res: any) => {
|
||||
AnalysisData.value = res.data.records
|
||||
})
|
||||
dialogAnalysis.value = true
|
||||
}
|
||||
// 启动关联分析
|
||||
const firing = () => {}
|
||||
// 删除策略
|
||||
const details = (row: any) => {
|
||||
delRelevantLog({ id: row.id }).then((res: any) => {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: res.message
|
||||
})
|
||||
queryRelevantLogPage({}).then((res: any) => {
|
||||
AnalysisData.value = res.data.records
|
||||
})
|
||||
})
|
||||
}
|
||||
// 导出
|
||||
const exportEvent = () => {
|
||||
console.log('🚀 ~ exportEvent ~ tableRef.value:', tableRef.value)
|
||||
|
||||
queryEventsAssPage({
|
||||
searchBeginTime: tableStore.table.params.searchBeginTime,
|
||||
searchEndTime: tableStore.table.params.searchEndTime,
|
||||
searchValue: tableStore.table.params.searchValue,
|
||||
pageNum: 1,
|
||||
pageSize: tableStore.table.params.total
|
||||
}).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)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user