From ca7b5bbedecdb5ba503125ac1a977d3c99900d32 Mon Sep 17 00:00:00 2001 From: zhaohy <1695786511@qq.com> Date: Tue, 13 Aug 2024 11:09:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=A0=B9=E6=8D=AEui=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../view/alarmManagement/alarmOverview/index.vue | 58 ++++++++++++++-------- .../energyAlarm/editConfigureEnergyAlarm.vue | 27 +++++----- .../alarmSettings/energyAlarm/editeEnergyAlarm.vue | 28 +++++------ .../equipmentAlarm/editConfigureDeviceAlarm.vue | 29 ++++++----- .../equipmentAlarm/editeEquipmentAlarm.vue | 28 +++++------ 5 files changed, 93 insertions(+), 77 deletions(-) diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue index 257de95..0219bf8 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmOverview/index.vue @@ -39,7 +39,7 @@ >{{ item.title }} - 今日处理 / 总数 + 今日处理 / 总数 @@ -50,7 +50,7 @@
- 优先级 + 优先级
- 处理进度 + 处理进度
- 处理进度 + 处理进度
( 近30天 )
@@ -150,12 +150,21 @@ }) .then((res) => { if (res.msg === 'success') { - res.data.forEach((item: any) => { + // 从小 到 大 日期排序 + const data = res.data.sort((a: any, b: any) => { + // 将 dayData 转换为日期对象 + const dateA: any = new Date(a.createTime); + const dateB: any = new Date(b.createTime); + // 返回比较结果,升序排列 + return dateA - dateB; + }); + data.forEach((item: any) => { energyAlarm.push(item.alarmEnergyConsumptionNum); wgAlarm.push(item.alarmGatewayNum); equipmentAlarm.push(item.alarmEquipmentNum); total.push(0); - dayData.push(item.createTime); + item.createTime = item.createTime.substring(5, 10); + dayData.push(item.createTime.replace('-', '/')); }); } }); @@ -217,11 +226,13 @@ left: 'right', // 将图例居中显示 textStyle: { color: 'rgb(89, 89, 89)', - fontSize: '14', + fontSize: 14, fontWeight: 'normal', }, // 注意这里的颜色值要用引号括起来 data: ['设备告警', '网关告警', '能源告警'], itemGap: 30, // 这里可以调整图例项之间的间距,单位为像素 + itemWidth: 16, //图例宽度 + itemHeight: 16, //图例高度 }, ], calculable: true, @@ -240,7 +251,7 @@ data: dayData, axisLabel: { show: true, // 显示所有刻度值 - interval: 1, // 显示所有刻度,不跳过 + // interval: 1, // 显示所有刻度,不跳过 // rotate: 45, // 可选:如果标签过长,可以旋转标签以避免重叠 }, }, @@ -248,9 +259,14 @@ yAxis: [ { type: 'value', - shwo: false, + show: true, splitLine: { show: true, + lineStyle: { + color: '#dae7ff', // 设置分隔线颜色 + width: 1, // 设置分隔线宽度 + type: 'dashed', // 设置分隔线类型,可选 'solid'、'dashed' 或 'dotted' + }, }, axisLine: { show: false, @@ -262,7 +278,7 @@ show: false, }, axisLabel: { - show: false, // 不显示刻度值 + show: true, // 不显示刻度值 }, }, ], @@ -409,7 +425,7 @@ // icon: 'circle', itemWidth: 16, itemHeight: 16, - itemGap: 16, + itemGap: 30, textStyle: { fontSize: 14, }, @@ -432,7 +448,8 @@ fontWeight: 'bold', }, formatter: function (parms: any) { - return '[ ' + parms.data.name + ' ] : ' + parms.data.value; + // return '[ ' + parms.data.name + ' ] : ' + parms.data.value; + return parms.data.name + ' : ' + parms.data.value; }, }, // emphasis: { @@ -521,7 +538,7 @@ orient: 'vertical', itemWidth: 16, itemHeight: 16, - itemGap: 16, + itemGap: 30, textStyle: { fontSize: 14, }, @@ -544,7 +561,8 @@ fontWeight: 'bold', }, formatter: function (parms: any) { - return '[ ' + parms.data.name + ' ] : ' + parms.data.value; + // return '[ ' + parms.data.name + ' ] : ' + parms.data.value; + return parms.data.name + ' : ' + parms.data.value; }, }, }, @@ -616,7 +634,7 @@ // border: 1px solid red; display: flex; flex-direction: column; - gap: 12px; + gap: 20px; background-color: #f0f1f4; box-sizing: border-box; .box-top { @@ -625,11 +643,11 @@ height: 100%; display: flex; flex-direction: row; - gap: 12px; + gap: 20px; .box-top-item { height: 100%; flex: 1; - gap: 12px; + gap: 20px; background-color: white; border-radius: 4px; .item-box { @@ -657,10 +675,10 @@ } .iem-box-left-number { color: #000000; - font-weight: 700; + font-weight: 400; font-family: 'Arial Negreta', 'Arial Normal', 'Arial', sans-serif; font-style: normal; - font-size: 30px; + font-size: 40px; } } .item-box-right { @@ -674,7 +692,7 @@ flex: 4; width: 100%; display: flex; - gap: 12px; + gap: 20px; .box-center-item { flex: 1; height: 100%; diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue index d48dde5..012c221 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editConfigureEnergyAlarm.vue @@ -8,20 +8,7 @@ :cancel="handleClose" @close="handleClose" placement="right"> -
+
{{ infoObject?.id ? '编辑' : '新增' }}
@@ -494,6 +481,18 @@ display: flex; justify-content: space-between; } + .title { + width: 200px; + height: 22px; + opacity: 1; + /** 文本1 */ + font-size: 16px; + font-weight: 700; + letter-spacing: 0px; + line-height: 21px; + color: rgba(51, 51, 51, 1); + margin-left: 24px; + } .blue-background.ant-switch-checked { background-color: linear-gradient( 180deg, diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue index 2a2b37c..86115e8 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/energyAlarm/editeEnergyAlarm.vue @@ -8,20 +8,7 @@ :cancel="handleClose" placement="right" @close="handleClose"> -
+
{{ infoObject?.id ? '编辑' : '新增' }}
@@ -272,6 +259,19 @@ display: flex; justify-content: space-between; } + .title { + width: 200px; + height: 22px; + opacity: 1; + /** 文本1 */ + font-size: 16px; + font-weight: 700; + letter-spacing: 0px; + line-height: 21px; + color: rgba(51, 51, 51, 1); + margin-bottom: 24px; + margin-left: 24px; + } .blue-background.ant-switch-checked { background-color: linear-gradient( 180deg, diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue index 82dfbfb..bc9e597 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editConfigureDeviceAlarm.vue @@ -9,20 +9,7 @@ placement="right" @close="handleClose">
-
+
{{ infoObject?.id ? '编辑' : '新增' }}
@@ -518,6 +505,19 @@ display: flex; justify-content: space-between; } + .title { + width: 200px; + height: 22px; + opacity: 1; + /** 文本1 */ + font-size: 16px; + font-weight: 700; + letter-spacing: 0px; + line-height: 21px; + color: rgba(51, 51, 51, 1); + margin-bottom: 24px; + margin-left: 24px; + } .blue-background.ant-switch-checked { background-color: linear-gradient( 180deg, @@ -547,7 +547,6 @@ z-index: 20; text-align: right; width: 23%; - display: flex; position: relative; } diff --git a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue index 58a64fb..68c421b 100644 --- a/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue +++ b/hx-ai-intelligent/src/view/alarmManagement/alarmSettings/equipmentAlarm/editeEquipmentAlarm.vue @@ -8,20 +8,7 @@ :cancel="handleClose" placement="right" @close="handleClose"> -
+
{{ infoObject?.id ? '编辑' : '新增' }}
@@ -332,6 +319,19 @@ display: flex; justify-content: space-between; } + .title { + width: 200px; + height: 22px; + opacity: 1; + /** 文本1 */ + font-size: 16px; + font-weight: 700; + letter-spacing: 0px; + line-height: 21px; + color: rgba(51, 51, 51, 1); + margin-bottom: 24px; + margin-left: 24px; + } .blue-background.ant-switch-checked { background-color: linear-gradient( 180deg,