From 8c7e35901a9b8972752f7740386ecd6dc342b094 Mon Sep 17 00:00:00 2001
From: GGJ <357021191@qq.com>
Date: Fri, 23 Feb 2024 11:14:28 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=95=B0=E5=BD=A2?=
=?UTF-8?q?=E8=A1=A8=E6=A0=BC=20=E5=A4=A7=E6=95=B0=E6=8D=AE=E5=8D=A1?=
=?UTF-8?q?=E9=A1=BF=20=E7=BB=88=E7=AB=AF=E8=BF=90=E7=BB=B4=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=2020%?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/echarts/MyEchart.vue | 3 +
src/styles/vxeTable.scss | 2 +-
.../TerminalManagement/ProgramManagement.vue | 41 +++-
.../TerminalManagement/TerminalManagement.vue | 185 +++++++++++++++---
4 files changed, 199 insertions(+), 32 deletions(-)
diff --git a/src/components/echarts/MyEchart.vue b/src/components/echarts/MyEchart.vue
index be4655af..94b4e9fa 100644
--- a/src/components/echarts/MyEchart.vue
+++ b/src/components/echarts/MyEchart.vue
@@ -108,6 +108,9 @@ const initChart = () => {
],
...props.options.options
})
+ setTimeout(() => {
+ chart.resize()
+ },0)
}
const handlerYAxis = () => {
let temp = {
diff --git a/src/styles/vxeTable.scss b/src/styles/vxeTable.scss
index 031a924f..d04e725d 100644
--- a/src/styles/vxeTable.scss
+++ b/src/styles/vxeTable.scss
@@ -44,7 +44,7 @@
.vxe-table--render-default .is--checked.vxe-cell--checkbox .vxe-checkbox--icon,
.vxe-table--render-default .is--indeterminate.vxe-cell--checkbox,
.vxe-table--render-default .is--indeterminate.vxe-cell--checkbox .vxe-checkbox--icon {
- color: var(--el-color-primary-light-8);
+ color: var(--el-color-primary-light-3);
}
.vxe-checkbox:not(.is--disabled):hover .vxe-checkbox--icon,
diff --git a/src/views/pms/BusinessAdministrator/TerminalManagement/ProgramManagement.vue b/src/views/pms/BusinessAdministrator/TerminalManagement/ProgramManagement.vue
index 6a21b3ab..8db80014 100644
--- a/src/views/pms/BusinessAdministrator/TerminalManagement/ProgramManagement.vue
+++ b/src/views/pms/BusinessAdministrator/TerminalManagement/ProgramManagement.vue
@@ -59,8 +59,9 @@
ref="tableRef"
v-bind="defaultAttribute"
:data="treeData"
- :column-config="{ resizable: true }"
- :tree-config="{}"
+ show-overflow
+ :tree-config="{ transform: true, parentField: 'pid' }"
+ :scroll-y="{ enabled: true }"
>
@@ -122,7 +123,7 @@
-
+
升级
@@ -243,6 +244,7 @@ const dialogVisible = ref(false)
const protitle = ref('')
const filterName = ref('')
const treeData: any = ref([])
+const treeDataCopy: any = ref([])
//进度条对象
const percentageoption = ref([
{
@@ -270,13 +272,36 @@ const tableStore = new TableStore({
method: 'POST',
column: [],
loadCallback: () => {
- treeData.value = tableStore.table.data
+ tableStore.table.data.forEach((item: any) => {
+ if (item.children.length > 0) {
+ item.id = item.children[0].pid
+ }
+ })
+ treeData.value = tree2List(tableStore.table.data)
+ treeDataCopy.value = JSON.parse(JSON.stringify(treeData.value))
setTimeout(() => {
tableRef.value.setAllTreeExpand(true)
}, 0)
}
})
-
+const tree2List = (list: any) => {
+ //存储结果的数组
+ let arr: any = []
+ // 遍历 tree 数组
+ list.forEach((item: any) => {
+ // 判断item是否存在children
+ if (!item.children) return arr.push(item)
+ // 函数递归,对children数组进行tree2List的转换
+ const children = tree2List(item.children)
+ // 删除item的children属性
+ delete item.children
+ // 把item和children数组添加至结果数组
+ //..children: 意思是把children数组展开
+ arr.push(item, ...children)
+ })
+ // 返回结果数组
+ return arr
+}
provide('tableStore', tableStore)
tableStore.table.params.searchValue = ''
tableStore.table.params.searchState = 0
@@ -330,8 +355,8 @@ const searchEvent = debounce(e => {
const options = { children: 'children' }
const searchProps = ['name']
const rest = XEUtils.searchTree(
- tableStore.table.data,
- (item:any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
+ treeDataCopy,
+ (item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
options
)
@@ -339,7 +364,7 @@ const searchEvent = debounce(e => {
// 搜索之后默认展开所有子节点
} else {
- treeData.value = tableStore.table.data
+ treeData.value = treeDataCopy
}
nextTick(() => {
const $table = tableRef.value
diff --git a/src/views/pms/BusinessAdministrator/TerminalManagement/TerminalManagement.vue b/src/views/pms/BusinessAdministrator/TerminalManagement/TerminalManagement.vue
index d85cfe0c..10863cc5 100644
--- a/src/views/pms/BusinessAdministrator/TerminalManagement/TerminalManagement.vue
+++ b/src/views/pms/BusinessAdministrator/TerminalManagement/TerminalManagement.vue
@@ -55,10 +55,19 @@
ref="tableRef"
v-bind="defaultAttribute"
:data="treeData"
- :column-config="{ resizable: true }"
- :scroll-y="{ enabled: true, gt: 30 }"
+ show-overflow
+ :tree-config="{ transform: true, parentField: 'pid' }"
+ :scroll-y="{ enabled: true }"
+ :checkbox-config="{ labelField: 'name' }"
>
-
+
@@ -137,7 +146,8 @@
@@ -147,7 +157,8 @@
v-if="row.level === 4"
:disabled="row.state == 1 ? true : false"
type="primary"
- size="small" link
+ size="small"
+ link
icon="el-icon-view"
@click="queryview(row)"
>
@@ -157,6 +168,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From f51acd7623c13f728220ba249c9e81682fa290b5 Mon Sep 17 00:00:00 2001
From: GGJ <357021191@qq.com>
Date: Fri, 23 Feb 2024 16:26:32 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=B5=E5=8E=8B=E6=9A=82=E9=99=8D-?=
=?UTF-8?q?=E9=AB=98=E7=BA=A7=E5=88=86=E6=9E=90-=E4=BA=8B=E4=BB=B6?=
=?UTF-8?q?=E5=85=B3=E8=81=94=E5=88=86=E6=9E=90=20=E5=BD=B1=E5=93=8D?=
=?UTF-8?q?=E8=8C=83=E5=9B=B4=E5=88=86=E6=9E=90=20=20=E8=BF=81=E7=A7=BB=20?=
=?UTF-8?q?40%?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
package.json | 2 +
src/api/advance-boot/analyse.ts | 26 +++
src/main.ts | 6 +
.../Region/thermodynamicDiagram.vue | 2 -
.../analyse/eventCorrelation/index.vue | 162 +++++++++++++++++-
.../analyse/eventwaveform/index.vue | 7 +
.../voltageSags/analyse/impactscope/index.vue | 149 ++++++++++++++++
7 files changed, 350 insertions(+), 4 deletions(-)
create mode 100644 src/api/advance-boot/analyse.ts
create mode 100644 src/views/pms/voltageSags/analyse/eventwaveform/index.vue
create mode 100644 src/views/pms/voltageSags/analyse/impactscope/index.vue
diff --git a/package.json b/package.json
index 604122da..f72be292 100644
--- a/package.json
+++ b/package.json
@@ -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": {
diff --git a/src/api/advance-boot/analyse.ts b/src/api/advance-boot/analyse.ts
new file mode 100644
index 00000000..44873d70
--- /dev/null
+++ b/src/api/advance-boot/analyse.ts
@@ -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,
+ })
+}
\ No newline at end of file
diff --git a/src/main.ts b/src/main.ts
index e5f254ce..0b7b5cb2 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -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)
diff --git a/src/views/pms/Event-boot/Region/thermodynamicDiagram.vue b/src/views/pms/Event-boot/Region/thermodynamicDiagram.vue
index b74e2987..c5418c03 100644
--- a/src/views/pms/Event-boot/Region/thermodynamicDiagram.vue
+++ b/src/views/pms/Event-boot/Region/thermodynamicDiagram.vue
@@ -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 => {
diff --git a/src/views/pms/voltageSags/analyse/eventCorrelation/index.vue b/src/views/pms/voltageSags/analyse/eventCorrelation/index.vue
index 5a0c645c..d47ecf8f 100644
--- a/src/views/pms/voltageSags/analyse/eventCorrelation/index.vue
+++ b/src/views/pms/voltageSags/analyse/eventCorrelation/index.vue
@@ -1,3 +1,161 @@
- 关联性分析
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+ 分析记录管理
+ 启动关联分析
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+
diff --git a/src/views/pms/voltageSags/analyse/eventwaveform/index.vue b/src/views/pms/voltageSags/analyse/eventwaveform/index.vue
new file mode 100644
index 00000000..5e06e641
--- /dev/null
+++ b/src/views/pms/voltageSags/analyse/eventwaveform/index.vue
@@ -0,0 +1,7 @@
+
+ 3
+
+
+
diff --git a/src/views/pms/voltageSags/analyse/impactscope/index.vue b/src/views/pms/voltageSags/analyse/impactscope/index.vue
new file mode 100644
index 00000000..bd026cfb
--- /dev/null
+++ b/src/views/pms/voltageSags/analyse/impactscope/index.vue
@@ -0,0 +1,149 @@
+
+
+
+
+
+
+
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+
+