From a9fc77eb8b833ad18039c24ab2b057445f66256e Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Wed, 28 Jan 2026 10:33:59 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E6=A6=82=E8=A7=88?= =?UTF-8?q?=E6=9C=AA=E5=85=B3=E8=81=94=E6=9A=82=E9=99=8D=E6=AC=A1=E6=95=B0?= =?UTF-8?q?=E5=92=8C=E5=B7=B2=E5=85=B3=E8=81=94=E5=A4=84=E7=90=86=E4=BA=8B?= =?UTF-8?q?=E4=BB=B6=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Region/components/Tableabove.vue | 26 +++---- .../voltageSags/Region/components/echart.vue | 71 ++++++++++--------- 2 files changed, 47 insertions(+), 50 deletions(-) diff --git a/src/views/pqs/voltageSags/Region/components/Tableabove.vue b/src/views/pqs/voltageSags/Region/components/Tableabove.vue index aa1fef0e..59f576f3 100644 --- a/src/views/pqs/voltageSags/Region/components/Tableabove.vue +++ b/src/views/pqs/voltageSags/Region/components/Tableabove.vue @@ -35,8 +35,7 @@
- - +
@@ -102,28 +101,21 @@ const info = (list: any, searchBeginTime: any, searchEndTime: any,selectedAreaNa ] - // let all = 0 + let all = 0 - // list.monthlyStatistics.monthCalculation.forEach((item: any) => { - // all += item.linked + item.notAssociated - // }) - let allNotAssociated = 0 - let allLinked= 0 list.monthlyStatistics.monthCalculation.forEach((item: any) => { - allNotAssociated += item.notAssociated + all += item.linked + item.notAssociated }) - - list.monthlyStatistics.monthCalculation.forEach((item: any) => { - allLinked += item.linked - }) - + shareData.value = [ { month: '总计', - notAssociated: allNotAssociated.toFixed(2), - linked: allLinked.toFixed(2) + notAssociated: all, }, - ...list.monthlyStatistics.monthCalculation + ...list.monthlyStatistics.monthCalculation.map((item: any) => ({ + month: item.month, + notAssociated: item.notAssociated + item.linked + })) ] } diff --git a/src/views/pqs/voltageSags/Region/components/echart.vue b/src/views/pqs/voltageSags/Region/components/echart.vue index d4ba4194..23043521 100644 --- a/src/views/pqs/voltageSags/Region/components/echart.vue +++ b/src/views/pqs/voltageSags/Region/components/echart.vue @@ -48,7 +48,7 @@ const Processing = (list: any) => { return html } }, - + color: ['#07CCCA'], legend: { data: ['暂降次数'] }, @@ -117,7 +117,7 @@ const Grade = (list: any) => { return html } }, - + color: ['#07CCCA'], legend: { data: ['暂降次数'] }, @@ -185,7 +185,10 @@ const Relation = (list: any, interval: number) => { // } else if (item.notAssociated == 1) { // item.notAssociated = 1.3 // } - echartswArr.push(item.notAssociated) + //echartswArr.push(item.notAssociated) + const total = item.notAssociated + item.linked + echartswArr.push(total) + }) monthlyStatistics.value = { title: { @@ -208,9 +211,11 @@ const Relation = (list: any, interval: number) => { }, legend: { - data: ['未关联暂降次数', '已关联处理事件'] + data: ['暂降次数'] + //data: ['未关联暂降次数', '已关联处理事件'] }, - color: ['#07CCCA', '#Ff6600'], + color: ['#07CCCA'], + //color: ['#07CCCA', '#Ff6600'], xAxis: { name: '月份', // 给X轴加单位 data: echartsndArr @@ -221,11 +226,11 @@ const Relation = (list: any, interval: number) => { options: { series: [ { - name: '未关联暂降次数', + name: '暂降次数', type: 'bar', barMaxWidth: 30, barMinHeight: 5, - data: echartswArr, + data: echartswArr, itemStyle: { normal: { label: { @@ -247,32 +252,32 @@ const Relation = (list: any, interval: number) => { } } }, - { - name: '已关联处理事件', - type: 'bar', - barMaxWidth: 30, - data: echartsArr, - itemStyle: { - normal: { - label: { - // show: true, //数字开启显示 - textStyle: { - //数值样式 - color: '#fff', - fontSize: 14, - fontWeight: 600 - } - }, - color: function (params: any) { - if (params.data == 0) { - return '#B3B3B3' - } else { - return '#Ff6600' - } - } - } - } - } + // { + // name: '已关联处理事件', + // type: 'bar', + // barMaxWidth: 30, + // data: echartsArr, + // itemStyle: { + // normal: { + // label: { + // // show: true, //数字开启显示 + // textStyle: { + // //数值样式 + // color: '#fff', + // fontSize: 14, + // fontWeight: 600 + // } + // }, + // color: function (params: any) { + // if (params.data == 0) { + // return '#B3B3B3' + // } else { + // return '#Ff6600' + // } + // } + // } + // } + // } ] } } From 7188e3e6810e10cf667052e3e439cf6846e4595d Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Wed, 28 Jan 2026 14:33:42 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../business/terminal/transformerStrategy/index.vue | 13 ++++--------- .../runManage/terminalLedger/index.vue | 6 +++--- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/views/pqs/business/terminal/transformerStrategy/index.vue b/src/views/pqs/business/terminal/transformerStrategy/index.vue index 82877820..82d50200 100644 --- a/src/views/pqs/business/terminal/transformerStrategy/index.vue +++ b/src/views/pqs/business/terminal/transformerStrategy/index.vue @@ -53,8 +53,8 @@
- - + + @@ -122,13 +122,8 @@ const menuTree = ref() const TableHeaderRef = ref() const rules = reactive({ - name: [{ required: true, message: '名称不可为空', trigger: 'blur' }], - ip: [{ required: true, message: 'ip不可为空', trigger: 'blur' }], - nodeGrade: [{ required: true, message: '等级不可为空', trigger: 'blur' }], - nodeDevNum: [{ required: true, message: '最大终端数不可为空', trigger: 'blur' }], - maxProcessNum: [{ required: true, message: '最大进程数不可为空', trigger: 'blur' }], - sort: [{ required: true, message: '排序不可为空', trigger: 'blur' }], - remark: [{ required: true, message: '描述不可为空', trigger: 'blur' }] + tpName: [{ required: true, message: '名称不可为空', trigger: 'blur' }], + }) const dialogFormVisible = ref(false) diff --git a/src/views/pqs/harmonicMonitoring/runManage/terminalLedger/index.vue b/src/views/pqs/harmonicMonitoring/runManage/terminalLedger/index.vue index ebdd27bd..5d38b0f2 100644 --- a/src/views/pqs/harmonicMonitoring/runManage/terminalLedger/index.vue +++ b/src/views/pqs/harmonicMonitoring/runManage/terminalLedger/index.vue @@ -98,9 +98,9 @@ > - + @@ -219,7 +219,7 @@ tableStore.table.params.statisticalType = classificationData[0] tableStore.table.params.serverName = 'harmonic-boot' tableStore.table.params.comFlag = [] tableStore.table.params.runFlag = [] -tableStore.table.params.evaluate = '' +// tableStore.table.params.evaluate = '' tableStore.table.params.powerFlag = 2 tableStore.table.params.monitorFlag = 2 tableStore.table.params.scale = [] From 8d9ccf97a762b113bcc53850c3a3a678ffdb4335 Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Thu, 29 Jan 2026 13:44:12 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=89=8D=E7=BD=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=88=86=E9=85=8D=E7=BB=88=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/device-boot/Business.ts | 8 +++ .../terminal/FrontManagement/index.vue | 30 ++++++++- .../analyse/eventCorrelation/index.vue | 67 ++++++++++++++++--- src/views/system/strategyManage/index.vue | 4 +- 4 files changed, 97 insertions(+), 12 deletions(-) diff --git a/src/api/device-boot/Business.ts b/src/api/device-boot/Business.ts index 27c0f989..dabb046a 100644 --- a/src/api/device-boot/Business.ts +++ b/src/api/device-boot/Business.ts @@ -206,3 +206,11 @@ export function exportTerminalBase() { responseType: 'blob' }) } +//一键分配终端 +export function allotTerminal(data: any) { + return createAxios({ + url: '/device-boot/nodeDevice/oneKeyDistribution', + method: 'post', + params: data + }) +} diff --git a/src/views/pqs/business/terminal/FrontManagement/index.vue b/src/views/pqs/business/terminal/FrontManagement/index.vue index 1eebaa70..b271d04a 100644 --- a/src/views/pqs/business/terminal/FrontManagement/index.vue +++ b/src/views/pqs/business/terminal/FrontManagement/index.vue @@ -209,7 +209,8 @@ import { updateNode, nodeDeviceTree, updateDeviceProcess, - askRestartProcess + askRestartProcess, + allotTerminal } from '@/api/device-boot/Business' import TableStore from '@/utils/tableStore' import Table from '@/components/table/index.vue' @@ -384,7 +385,32 @@ const tableStore = new TableStore({ tableStore.index() }) } - } + }, + { + name: 'edit', + title: '分配终端', + type: 'primary', + icon: 'InfoFilled', + render: 'confirmButton', + popconfirm: { + confirmButtonText: '确认', + cancelButtonText: '取消', + confirmButtonType: 'primary', + title: '确定分配终端吗?' + }, + click: row => { + if (!hasDevices.value) { + ElMessage.warning('此前置机下无设备,无法分配终端!'); + return; + } + allotTerminal({ + nodeId: row.id + }).then(res => { + ElMessage.success(res.message) + tableStore.index() + }) + } + }, ] } ], diff --git a/src/views/pqs/voltageSags/analyse/eventCorrelation/index.vue b/src/views/pqs/voltageSags/analyse/eventCorrelation/index.vue index 44d6322e..d0c95c0e 100644 --- a/src/views/pqs/voltageSags/analyse/eventCorrelation/index.vue +++ b/src/views/pqs/voltageSags/analyse/eventCorrelation/index.vue @@ -29,6 +29,17 @@ +
@@ -168,7 +179,12 @@ tableStore.table.params.searchValue = '' const bxactiveName = ref('ssbx') const boxoList = ref({}) const wp = ref({}) - +const form = ref({ + pageSize: 20, + pageNum: 1, + id: '' +}) +const total = ref(0) provide('tableStore', tableStore) onMounted(() => { @@ -180,13 +196,47 @@ onMounted(() => { }) }) -//分析记录管理 -const analysis1 = () => { - queryRelevantLogPage({}).then((res: any) => { + +// 分页 +const onTableSizeChange = (val: number) => { + form.value.pageSize = val + form.value.pageNum = 1 // 改变每页条数时回到第一页 + loadAnalysisData() // 重新加载数据 + +} + +const onTableCurrentChange = (val: number) => { + form.value.pageNum = val + loadAnalysisData() // 重新加载数据 + +} + +// 封装数据加载逻辑 +const loadAnalysisData = async () => { + try { + const params = { + pageNum: form.value.pageNum, + pageSize: form.value.pageSize + } + const res: any = await queryRelevantLogPage(params) AnalysisData.value = res.data.records - }) + total.value = res.data.total + } catch (error) { + console.error('获取分析记录失败:', error) + AnalysisData.value = [] + total.value = 0 + } +} + +//分析记录管理 +const analysis1 = async () => { + // 初始化分页参数 + form.value.pageNum = 1 + await loadAnalysisData() dialogAnalysis.value = true } + + // 启动关联分析 const firing = () => { processEvents({ @@ -207,9 +257,8 @@ const details = (row: any) => { type: 'success', message: res.message }) - queryRelevantLogPage({}).then((res: any) => { - AnalysisData.value = res.data.records - }) + // 重新加载当前页的数据 + loadAnalysisData() }) } @@ -217,4 +266,6 @@ const backbxlb = () => { view.value = true view2.value = false } + + diff --git a/src/views/system/strategyManage/index.vue b/src/views/system/strategyManage/index.vue index 0284541b..9c9acaf7 100644 --- a/src/views/system/strategyManage/index.vue +++ b/src/views/system/strategyManage/index.vue @@ -33,10 +33,10 @@ style="width: 100%" > - + - +