diff --git a/src/components/Charts/appearanceDailyAlertChart.vue b/src/components/Charts/appearanceDailyAlertChart.vue index 86a35a5..cd8de85 100644 --- a/src/components/Charts/appearanceDailyAlertChart.vue +++ b/src/components/Charts/appearanceDailyAlertChart.vue @@ -2,23 +2,199 @@ * @Author: donghao donghao@supervision.ltd * @Date: 2025-08-14 10:33:46 * @LastEditors: donghao donghao@supervision.ltd - * @LastEditTime: 2025-08-15 15:18:21 + * @LastEditTime: 2025-08-18 17:03:28 * @FilePath: \5G-Web\src\components\Charts\appearanceDailyAlertChart.vue - * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE ---> - + - + diff --git a/src/components/Charts/appearanceDailyDetectionChart.vue b/src/components/Charts/appearanceDailyDetectionChart.vue index e30fe85..ca13eb2 100644 --- a/src/components/Charts/appearanceDailyDetectionChart.vue +++ b/src/components/Charts/appearanceDailyDetectionChart.vue @@ -1,3 +1,11 @@ + + + + + diff --git a/src/components/Charts/diggerHourlyDistanceChart.vue b/src/components/Charts/diggerHourlyDistanceChart.vue index e69de29..9e89538 100644 --- a/src/components/Charts/diggerHourlyDistanceChart.vue +++ b/src/components/Charts/diggerHourlyDistanceChart.vue @@ -0,0 +1,296 @@ + + + + + diff --git a/src/components/Charts/poleDailyAlertChart.vue b/src/components/Charts/poleDailyAlertChart.vue index bae802d..e8497b6 100644 --- a/src/components/Charts/poleDailyAlertChart.vue +++ b/src/components/Charts/poleDailyAlertChart.vue @@ -28,15 +28,15 @@ const propsData = { ], legendData: ["撑杆断裂", "撑杆锈蚀", "撑杆穿孔"], seriesData: { - "撑杆断裂": [ + 撑杆断裂: [ 60, 80, 120, 100, 90, 120, 110, 140, 130, 120, 120, 125, 130, 160, 150, 100, ], - "撑杆锈蚀": [ + 撑杆锈蚀: [ 70, 110, 140, 120, 140, 70, 80, 170, 160, 140, 140, 130, 140, 120, 90, 110, ], - "撑杆穿孔": [ + 撑杆穿孔: [ 80, 150, 180, 160, 80, 60, 70, 180, 190, 170, 160, 140, 130, 80, 100, 150, ], }, @@ -82,16 +82,14 @@ const option = { xAxis: [ { type: "category", + axisLine: { + show: false, + }, axisTick: { show: false, }, - interval: 1, axisLabel: { - color: "rgba(36, 173, 254, 1)", - fontSize: "1rem", - }, - axisLine: { - show: false, + color: "#B4C0CC", }, data: xData, }, @@ -99,19 +97,18 @@ const option = { yAxis: [ { type: "value", - name: "", - min: 0, - max: 300, - interval: 50, + // interval: 50, axisLabel: { formatter: "{value} ", }, + axisLine: { + show: false, + }, + axisTick: { + show: false, + }, axisLabel: { - textStyle: { - //坐标轴颜色 - color: "rgba(36, 173, 254, 1)", - fontSize: "1rem", - }, + color: "#B4C0CC", }, //坐标轴线样式 splitLine: { @@ -121,7 +118,7 @@ const option = { color: "rgba(36, 173, 254, 0.2)", }, }, - } + }, ], series: [ { @@ -129,6 +126,7 @@ const option = { data: propsData.seriesData["撑杆断裂"], type: "line", smooth: true, //true曲线; false折线 + symbol: "none", itemStyle: { normal: { color: "#ffc600", //改变折线点的颜色 @@ -165,6 +163,8 @@ const option = { data: propsData.seriesData["撑杆锈蚀"], type: "line", smooth: true, //true曲线; false折线 + symbol: "none", + itemStyle: { normal: { color: "#24adfe", //改变折线点的颜色 @@ -196,11 +196,13 @@ const option = { }, }, }, - { + { name: "撑杆穿孔", data: propsData.seriesData["撑杆穿孔"], type: "line", smooth: true, //true曲线; false折线 + symbol: "none", + itemStyle: { normal: { color: "#0DE98A", //改变折线点的颜色 diff --git a/src/components/Charts/poleDailyDetectionChart.vue b/src/components/Charts/poleDailyDetectionChart.vue index c0f37cf..163f000 100644 --- a/src/components/Charts/poleDailyDetectionChart.vue +++ b/src/components/Charts/poleDailyDetectionChart.vue @@ -6,89 +6,191 @@ const props = defineProps({ required: true, }, }); +const data1 = [ + { + name: "1日", + value: 175, + }, + { + name: "2日", + value: 148, + }, + { + name: "3日", + value: 195, + }, + { + name: "4日", + value: 115, + }, + { + name: "5日", + value: 148, + }, + { + name: "6日", + value: 95, + }, + { + name: "7日", + value: 56, + }, + { + name: "8日", + value: 45, + }, + { + name: "9日", + value: 15, + }, + { + name: "10日", + value: 48, + }, + { + name: "11日", + value: 95, + }, + { + name: "12日", + value: 128, + }, + { + name: "13日", + value: 34, + }, + { + name: "14日", + value: 123, + }, + { + name: "15日", + value: 175, + }, + { + name: "16日", + value: 148, + }, +]; +let xAxisData = []; +let seriesData1 = []; +data1.forEach((item) => { + xAxisData.push(item.name); + seriesData1.push(item.value); +}); +var barWidth = 32; +var barWidthBg = 45; +const color = [ + { + type: "linear", + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [ + { + offset: 1, + color: "rgba(16, 53, 41, 0.10)", + }, + { + offset: 0, + color: "rgba(57, 161, 59, 1)", + }, + ], + }, +]; +const seriesData = xAxisData.map((item, index) => { + return { + value: seriesData1[index], + itemStyle: { + borderRadius: [2, 2, 0, 0], + color: color[0], + }, + }; +}); + const option = { - title: { - text: '', - textStyle: { - color: '#fff', - }, + grid: { + left: "1%", + right: "1%", + bottom: "2%", + top: "15%", + containLabel: true, + }, + xAxis: { + data: xAxisData, + axisLine: { + show: false, }, - // backgroundColor: '#141845', - tooltip: { - trigger: 'axis' + axisTick: { + show: false, }, - grid: { - top: '8%', - left: '3%', - right: '6%', - bottom: '6%', - containLabel: true + axisLabel: { + show: true, + color: "#B4C0CC", + fontSize: 12, }, - xAxis: { - type: 'category', - boundaryGap: true, - data: ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'], - axisLine: { - lineStyle: { - color: "#fff" - } - } + }, + yAxis: { + axisLine: { + show: true, + lineStyle: { + color: "#B4C0CC", + }, }, - yAxis: { - type: 'value', - axisLine: { - lineStyle: { - color: "#fff" - } - } + axisLabel: { + show: true, + color: "#B4C0CC", + fontSize: 12, }, - series: [{ - name: '成都', - type: 'bar', - stack: '总量', - data: [2800, 1800, 1700, 1600, 1500, 1400, 1300, 1200, 1100, 1000, 900, 800], - itemStyle: { - normal: { - show: true, - color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ - offset: 0, - color: '#f7734e' - }, { - offset: 1, - color: '#e12945' - }]), - barBorderRadius: 50, - borderWidth: 6, - borderColor:"#fff" - } - }, - }, - { - name: '广元', - type: 'bar', - stack: '总量', - data: [4000, 3800, 3600, 3500, 3200, 3100, 2800, 2700, 2600, 2500, 2400, 2300] - }, - { - name: '德阳', - type: 'bar', - stack: '总量', - data: [4000, 3800, 3600, 3500, 3200, 3100, 2800, 2700, 2600, 2500, 2400, 2300] - }, - { - name: '阿坝', - type: 'bar', - stack: '总量', - data: [4000, 3800, 3600, 3500, 3200, 3100, 2800, 2700, 2600, 2500, 2400, 2300] - }, - { - name: '绵阳', - type: 'bar', - stack: '总量', - data: [4000, 3800, 3600, 3500, 3200, 3100, 2800, 2700, 2600, 2500, 2400, 2300] - } - ] + splitLine: { + lineStyle: { + color: "#B4C0CC", + opacity: 0.2, + }, + }, + }, + series: [ + { + type: "bar", + data: seriesData, + barWidth: barWidth, + }, + { + type: "bar", + data: seriesData, + barWidth: barWidthBg, + barGap: "-120%", + itemStyle: { + opacity: 0.2, + }, + }, + { + type: "pictorialBar", + data: seriesData, + symbolPosition: "end", + symbolSize: [barWidth, 7], + z: 12, + symbolOffset: [-3, -3], + label: { + show: true, + position: "top", + }, + }, + { + type: "pictorialBar", + data: seriesData, + symbolPosition: "end", + symbolSize: [barWidthBg, 6], + itemStyle: { + opacity: 0.2, + }, + z: 11, + symbolOffset: [-3, -3], + }, + ], }; + const initChart = () => { const chartDom = document.getElementById("poleDailyDetectionChart"); const mainChart = echarts.init(chartDom); diff --git a/src/styles/common.scss b/src/styles/common.scss index 6aeea7b..265661b 100644 --- a/src/styles/common.scss +++ b/src/styles/common.scss @@ -67,7 +67,7 @@ background-position: center; background-repeat: no-repeat; } -// 按钮 +/* 按钮 */ .fg-button { cursor: pointer; display: flex; @@ -77,6 +77,51 @@ height: 28px; border-radius: 2px 2px 2px 2px; } + +.fg-basic-btn { + height: 32px; + width: 76px; + margin: 0; + &.el-button { + margin-left: 0; + } +} + +.fg-info-button { + background: linear-gradient(180deg, #2589ff 0%, #46a9ed 100%); + border: 1px solid #42a5f5; + border-radius: 2px; + color: white; + margin-left: 0; + height: 32px; + & .icon { + width: 14px; + height: 14px; + background-image: url("@/assets/common/search_icon.png"); + background-size: contain; + background-position: center; + background-repeat: no-repeat; + margin-right: 5px; + } +} + +.fg-reset-btn { + background: transparent; + border-radius: 2px; + border: 1px solid #088bd6; + color: white; + box-shadow: none; + & .icon { + width: 14px; + height: 14px; + background-image: url("@/assets/common/reset_icon.png"); + background-size: contain; + background-position: center; + background-repeat: no-repeat; + margin-right: 5px; + } +} + .fg-button-primary { @apply fg-button; background: #009dff; diff --git a/src/styles/element-plus.scss b/src/styles/element-plus.scss index 0fc9036..8ce4df6 100644 --- a/src/styles/element-plus.scss +++ b/src/styles/element-plus.scss @@ -208,46 +208,3 @@ } } -/* 按钮 */ -.basic-btn { - height: 32px; - width: 76px; - margin: 0; - &.el-button { - margin-left: 0; - } -} - -.query-btn { - background: linear-gradient(180deg, #2589ff 0%, #46a9ed 100%); - border: 1px solid #42a5f5; - border-radius: 2px; - color: white; - margin-left: 0; - & .icon { - width: 14px; - height: 14px; - background-image: url("@/assets/common/search_icon.png"); - background-size: contain; - background-position: center; - background-repeat: no-repeat; - margin-right: 5px; - } -} - -.reset-btn { - background: transparent; - border-radius: 2px; - border: 1px solid #088bd6; - color: white; - box-shadow: none; - & .icon { - width: 14px; - height: 14px; - background-image: url("@/assets/common/reset_icon.png"); - background-size: contain; - background-position: center; - background-repeat: no-repeat; - margin-right: 5px; - } -} diff --git a/src/views/dashboard/AppearanceMonitor.vue b/src/views/dashboard/AppearanceMonitor.vue index 1e6d420..1cdde96 100644 --- a/src/views/dashboard/AppearanceMonitor.vue +++ b/src/views/dashboard/AppearanceMonitor.vue @@ -3,9 +3,10 @@ import { onBeforeRouteLeave } from "vue-router"; import { BaseTable } from "@/components/CustomTable"; import SwiperMonitor from "./components/SwiperMonitor.vue"; import AppearanceDailyDetectionChart from "@/components/Charts/appearanceDailyDetectionChart.vue"; -import PoleDailyAlertChart from "@/components/Charts/poleDailyAlertChart.vue"; +import AppearanceDailyAlertChart from "@/components/Charts/appearanceDailyAlertChart.vue"; import AppearanceAlarmModal from "./components/AppearanceAlarmModal.vue"; import DeleteModal from "./components/DeleteModal.vue"; +import VideoExport from "./components/VideoExport.vue"; import { getAppearanceMonitorApi, getAppearanceMonitorDetailApi, @@ -242,50 +243,55 @@ onMounted(() => {