From 4ac7fdb4b00a5ebb1b04da306214de7f35dfee09 Mon Sep 17 00:00:00 2001 From: qingzhengli <1204552371@qq.com> Date: Fri, 29 Mar 2024 14:35:01 +0800 Subject: [PATCH 01/10] =?UTF-8?q?fix=20=20=E4=BF=AE=E5=A4=8D3140bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/components/RoadAndEvents/utils/map.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js index d00e4d0b..dd6222fc 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/map.js @@ -343,9 +343,10 @@ export class MarkerCluster { const findIndex = this.data.findIndex( (removeData) => removeData === item ); - let { stakeMark } = item.extData; + let { stakeMark, direction } = item.extData; stakeMark = upperFirst(stakeMark); //统一格式 大写K - const existNode = graphInstance.getCellById(stakeMark); + const id = `${stakeMark}_${direction || ""}`; + const existNode = graphInstance.getCellById(id); const lnglat = item.lnglat; if (lnglat) { const { lat, lng } = getLatAndLng(lnglat); @@ -357,10 +358,10 @@ export class MarkerCluster { window.graphInstance.removeNode(existNode.id); else { //更新节点 - const updateNode = graphInstance.getCellById(stakeMark); + const updateNode = graphInstance.getCellById(id); updateNode.updateData(getDataConf(lngLatArr, item.extData)); } - } else window.graphInstance.removeNode(stakeMark); + } else window.graphInstance.removeNode(id); } } if (findIndex > -1) this.data.splice(findIndex, 1); @@ -482,9 +483,10 @@ export function marksAddInGraph(data) { export function addInGraphHandle(data) { const graphInstance = window.graphInstance; const extData = data[0].extData; + console.log(extData, "extData"); const { item: eventItem } = data[0].config; if (eventItem.id.match("./事件专题")) { - let { stakeMark, lang } = extData; + let { stakeMark, lang, direction } = extData; stakeMark = upperFirst(stakeMark); //统一格式 大写K const distance = (Number( @@ -496,7 +498,8 @@ export function addInGraphHandle(data) { const node = { shape: "custom-html", effect: ["data"] }; node.data = getDataConf(data, extData); - const existNode = graphInstance.getCellById(stakeMark); + const id = `${stakeMark}_${direction || ""}`; + const existNode = graphInstance.getCellById(id); if (existNode) { existNode.updateData(node.data); } else { @@ -508,7 +511,7 @@ export function addInGraphHandle(data) { height: 20, ...node, zIndex: 1, - id: stakeMark, + id: id, }); // }, 0); } From 588decb5e227338b3ba6d0d387a82934779d9f78 Mon Sep 17 00:00:00 2001 From: qingzhengli <1204552371@qq.com> Date: Fri, 29 Mar 2024 14:49:20 +0800 Subject: [PATCH 02/10] =?UTF-8?q?fix=20=E8=AF=AF=E6=8A=A5=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E6=97=A0=E5=93=8D=E5=BA=94=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Dialogs/PerceiveEvent/index.vue | 34 +++++-------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue index dab0013a..2a6194a2 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/PerceiveEvent/index.vue @@ -3,35 +3,17 @@
-
-
+
@@ -203,7 +185,7 @@ export default { this.getDetails(); this.getVehicleTypeList(); }, - async mounted() {}, + async mounted() { }, beforeDestroy() { clearInterval(this.interval); }, @@ -255,7 +237,7 @@ export default { }) ); }) - .catch((err) => {}); + .catch((err) => { }); }, convertSecToHHmmss(sec) { let currentTime = moment.duration(sec, "seconds"); From 3b71571aa211d965eab3f6af159bb9d54ed6f722 Mon Sep 17 00:00:00 2001 From: hui <770260999@qq.com> Date: Fri, 29 Mar 2024 14:53:14 +0800 Subject: [PATCH 03/10] =?UTF-8?q?=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/eventQuery/assets/charts.js | 2 +- .../components/eventQuery/index.vue | 35 +++++++++++++------ 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts.js index ba6f7ba6..d38f2096 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/assets/charts.js @@ -62,7 +62,7 @@ var options = { grid: { top: "15%", //上边距 right: "5px", //右边距 - left: "0", //左边距 + left: "10px", //左边距 bottom: "2%", //下边距 containLabel: true, }, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue index 21ceab64..680259b4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue @@ -88,7 +88,7 @@
-
+
-
+
Date: Fri, 29 Mar 2024 15:14:24 +0800 Subject: [PATCH 04/10] =?UTF-8?q?=E4=B8=8B=E6=8B=89=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JiHeExpressway/pages/control/event/event/data.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js index f5ceb632..5f52ea9f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/data.js @@ -80,14 +80,14 @@ export const gjSearchFormList = [ key: "5", label: "扫码报警", }, - { - key: "6", - label: "非机预警", - }, // { - // key: "7", - // label: "气象监测器", + // key: "6", + // label: "非机预警", // }, + { + key: "7", + label: "气象监测器", + }, ], }, }, From f99c9a6887c20a7b0dfb0a6c8cf1287689be5d12 Mon Sep 17 00:00:00 2001 From: zhoule Date: Fri, 29 Mar 2024 15:24:59 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E4=BA=8B=E4=BB=B6=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../JiHeExpressway/pages/control/event/event/index.vue | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue index c3abcd58..7608e4bc 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue @@ -238,7 +238,13 @@ export default { background: "#00000052", text: "文件正在下载...", }); - request.post(url, {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob' }) + // request.post(url, {}, { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, responseType: 'blob' }) + request({ + url: url,//感知事件 + method: "post", + data: { ...this.searchData, warningState: 1 }, + responseType: 'blob' + }) .then((res) => { console.log(res); const url = window.URL.createObjectURL(new Blob([res])); From b5f002c87d497e04beda2cc063d5dad711e95fa3 Mon Sep 17 00:00:00 2001 From: zhangzhang <1747194829@qq.com> Date: Fri, 29 Mar 2024 15:36:54 +0800 Subject: [PATCH 06/10] =?UTF-8?q?=E6=84=9F=E7=9F=A5=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E5=8A=A8=E6=80=81=E7=BF=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/typeAnalysis/assets/charts.js | 14 +- .../components/typeAnalysis/index.vue | 229 +++++++++++++++++- .../components/flowstate/index.vue | 2 +- 3 files changed, 229 insertions(+), 16 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/assets/charts.js b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/assets/charts.js index a2bb57fc..db4e8596 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/assets/charts.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/assets/charts.js @@ -14,13 +14,18 @@ window.colorList = [ "#FFDD69", "#F6A73C", "#7390FD", + "#2967EA", + "#1DA7FF", + "#219f73", + "#7cedd5", ]; -window.colorList1 = ["#61D8FF", "#FFB905", "#6AE0BC"]; +// window.colorList1 = ["#61D8FF", "#FFB905", "#6AE0BC"]; var options = { color: colorList, legend: { + show: false, width: "500px", height: "160px", orient: "vertical", @@ -87,8 +92,10 @@ var options = { { name: "", type: "pie", + // radius: "70%", + // center: ["30%", "50%"], radius: "70%", - center: ["30%", "50%"], + center: ["40%", "50%"], clockwise: false, // roseType: "area", startAngle1: 180, @@ -133,7 +140,8 @@ var options = { hoverAnimation: false, emphasis: { scale: false }, clockwise: false, - center: ["30%", "50%"], + // center: ["30%", "50%"], + center: ["40%", "50%"], // roseType: "area", label: { show: false, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue index fe56e6c1..c1a4801a 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue @@ -3,6 +3,21 @@
+
+ + +
+ {{ items.name }} + {{ items.value }} 起 + {{ items.percert }}% +
+
+
+
@@ -47,9 +62,9 @@ export default { WgtTitle, }, data() { - return {}; + return { dataList: [] }; }, - created() { }, + created() {}, methods: {}, mounted() { setTimeout(() => { @@ -57,10 +72,8 @@ export default { var myChart = echarts.init(document.getElementById("typeAnalysis")); getWarningTypeDay().then((res) => { - console.log(res); if (res.code == 200) { let data = res.data; - console.log("===================22", data); typeAnalysisData = [ { name: "交通拥堵", @@ -123,15 +136,31 @@ export default { value: 0, }, ]; + let total = null; + data.forEach((item, index) => { + total += item.number; + }); data.forEach((item, index) => { typeAnalysisData.forEach((r) => { if (item.warningType == r.warningType) { - r.value += item.number; + r.value = item.number; + this.dataList.push({ + name: r.name, + value: r.value, + percert: + total == 0 ? 0 : ((r.value / total) * 100).toFixed(2), + }); } }); // drawRoundRect(context, 250, 8 + index * 28, 120, 24, 12, gr); }); + const list = this.dataList.reduce((acc, curr, index) => { + if (index % 6 === 0) acc.push([]); + acc[Math.floor(index / 6)].push(curr); + return acc; + }, []); + this.dataList = list; chartsStatistics.legend.data = typeAnalysisData?.map((x) => x.name); chartsStatistics.series[0].data = typeAnalysisData.map( (item, index) => { @@ -191,23 +220,199 @@ export default { .congestion { .board { padding: 0px 20px; - background: linear-gradient(180deg, - rgba(6, 66, 88, 0.2) 0%, - #06425888 100%); + background: linear-gradient( + 180deg, + rgba(6, 66, 88, 0.2) 0%, + #06425888 100% + ); border-radius: 5px 5px 5px 5px; opacity: 1; border: 1px solid; - border-image: linear-gradient(360deg, + border-image: linear-gradient( + 360deg, rgba(55, 231, 255, 0.1), - rgba(55, 231, 255, 0)) 1 1; + rgba(55, 231, 255, 0) + ) + 1 1; display: flex; justify-content: center; align-items: center; + .legend-box { + width: 60%; + margin: auto; + margin-top: 20px; + height: 185px; + overflow: hidden; + + .legend-item { + width: 100%; + /** + 单个动画循环样式 勿删 + */ + // height: 30px; + // display: flex; + // justify-content: space-between; + // align-items: center; + // animation: 5s infinite roll; + // position: relative; + + // &::before { + // // position: absolute; + // content: ""; + // width: 8px; + // height: 8px; + // left: 0px; + // border-radius: 50%; + // background: #37e7ff; + // } + .legend-items { + width: 100%; + height: 24px; + display: flex; + justify-content: space-between; + align-items: center; + padding-left: 20px; + background: linear-gradient(to right, #327799 0%, #0d3443 60%); + border-top-left-radius: 25px; + border-bottom-left-radius: 25px; + margin-bottom: 5px; + &::before { + // position: absolute; + content: ""; + width: 8px; + height: 8px; + left: 0px; + border-radius: 50%; + background: #37e7ff; + } + } + .legend-name { + width: 60px; + margin-left: 10px; + font-size: 14px; + } + .legend-num, + .legend-percert { + width: 50px; + display: flex; + justify-content: center; + align-items: center; + font-size: 14px; + color: #37e7ff; + font-weight: bold; + } + } + .legend-item:nth-child(1) { + .legend-items:nth-child(1) { + &::before { + background: #019aff; + } + } + .legend-items:nth-child(2) { + &::before { + background: #3cc3f0; + } + } + .legend-items:nth-child(3) { + &::before { + background: #51d5ad; + } + } + .legend-items:nth-child(4) { + &::before { + background: #ffdd69; + } + } + .legend-items:nth-child(5) { + &::before { + background: #f6a73c; + } + } + .legend-items:nth-child(6) { + &::before { + background: #7390fd; + } + } + } + .legend-item:nth-child(2) { + .legend-items:nth-child(1) { + &::before { + background: #2967ea; + } + } + .legend-items:nth-child(2) { + &::before { + background: #1da7ff; + } + } + .legend-items:nth-child(3) { + &::before { + background: #219f73; + } + } + .legend-items:nth-child(4) { + &::before { + background: #7cedd5; + } + } + } + /** + 单个动画循环样式 勿删 + */ + // .legend-item:nth-child(1) { + // &::before { + // background: #68f4dd; + // } + // } + // .legend-item:nth-child(2) { + // &::before { + // background: #1785c0; + // } + // } + // .legend-item:nth-child(3) { + // &::before { + // background: #476dbc; + // } + // } + // .legend-item:nth-child(4) { + // &::before { + // background: #b55233; + // } + // } + // .legend-item:nth-child(5) { + // &::before { + // background: #b0862c; + // } + // } + // .legend-item:nth-child(6) { + // &::before { + // background: #35ad6b; + // } + // } + // .legend-item:nth-child(7) { + // &::before { + // background: #219f73; + // } + // } + // .legend-item:nth-child(8) { + // &::before { + // background: #7cedd5; + // } + // } + + // .legend-item:nth-child(9) { + // &::before { + // background: #68f4dd; + // } + // } + } } } - +::v-deep .el-carousel__indicators--vertical { + display: none; +} .charts { height: 180px; - width: 100%; + width: 50%; } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/flowstate/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/flowstate/index.vue index ebec4e95..eae17a4d 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/flowstate/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/trafficFlow/components/flowstate/index.vue @@ -67,7 +67,7 @@ export default { .tag1 { position: absolute; margin-top: -174px; - margin-left: 80px; + margin-left: 120px; font-size: 12px; } From 71c26ab7b8e81faa76d0b6222d2b905131378a7c Mon Sep 17 00:00:00 2001 From: qingzhengli <1204552371@qq.com> Date: Fri, 29 Mar 2024 17:07:08 +0800 Subject: [PATCH 07/10] =?UTF-8?q?fix=20=E8=BF=9E=E7=BB=AD=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E4=BF=A9=E6=AC=A1=E5=85=B3=E9=97=AD=E6=97=B6,=20?= =?UTF-8?q?=E5=BC=82=E6=AD=A5=E5=AF=BC=E8=87=B4=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E4=B8=8D=E4=B8=80=E8=87=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/components/RoadAndEvents/index.vue | 18 +++++++++++++++--- .../RoadAndEvents/utils/buttonEvent.js | 4 +++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue index 40647287..9ff12937 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/index.vue @@ -96,7 +96,8 @@ export default { layerData: [], active: "事件专题", tabContentData: [], - + nowSelected: null, //当前点击选中的事件 title + nowSelectedCompleted: true, //选中事件的处理是否完成 // 路测设备-摄像机 dialogConfig: { // 0 有 可控(球机) ControlCamera | 1 ⽆ 不可控(枪机) Camera @@ -161,6 +162,7 @@ export default { this.active = layerData[defaultActive].title; this.minLayers = 3; + this.emitter.on("selectedCompleted", this.selectedCompletedHandle); }, mounted() { // 获取原始 Layer @@ -176,7 +178,13 @@ export default { getMinMapLayers(); }, + beforeDestroy() { + this.emitter.off("selectedCompleted", this.selectedCompletedHandle); + }, methods: { + selectedCompletedHandle(item) { + if (this.nowSelected === item.title) this.nowSelectedCompleted = true; + }, setFilterDataNoAction(data) { //纯更新data this.filterData = data; }, @@ -219,6 +227,10 @@ export default { const status = item.status; + console.log(item, "item"); + if (!status) { this.nowSelected = item.title; this.nowSelectedCompleted = false; } + else if (this.nowSelected === item.title && this.nowSelectedCompleted === false) return; + item.status = item.status ? "" : "_active"; console.log("%c [ key ]-102-「index.vue」", "font-size:15px; background:#9d63e9; color:#e1a7ff;", key); @@ -228,8 +240,8 @@ export default { await eventMap[`${key}${status ? "_close" : ""}`]?.call(this, item, this.filterData, isDefault, this.cb); }, - handleDevice: debounce(function (item) { - this.handleDeviceImmediate(item); + handleDevice: debounce(async function (item) { + await this.handleDeviceImmediate(item); }, 360), handleCleared() { const { mapIns } = this.getMap(); diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js index 3c457eb9..bd316ae4 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/buttonEvent.js @@ -166,8 +166,8 @@ export const eventMap = { removeData ); addDataPreHandle(removeData); - markerClusterIns.addData(removeData, isDefault); + this.emitter.emit("selectedCompleted", item); cacheRemoveFunc[`地图路测设备/${item.title}`] = () => { cbCall(); @@ -225,6 +225,7 @@ export const eventMap = { ); addDataPreHandle(removeData); markerClusterIns.addData(removeData, isDefault); + this.emitter.emit("selectedCompleted", item); cacheRemoveFunc[`地图事件专题/${item.title}`] = () => { cbCall(); @@ -275,6 +276,7 @@ export const eventMap = { ); addDataPreHandle(removeData); markerClusterIns.addData(removeData, isDefault); + this.emitter.emit("selectedCompleted", item); loadingMessage?.close(); From 76d24ad970fdf3796ea950a999bb03b657b23a88 Mon Sep 17 00:00:00 2001 From: zhangzhang <1747194829@qq.com> Date: Fri, 29 Mar 2024 17:13:52 +0800 Subject: [PATCH 08/10] =?UTF-8?q?=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/typeAnalysis/index.vue | 98 +++++++++---------- 1 file changed, 49 insertions(+), 49 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue index c1a4801a..e1c91b50 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/typeAnalysis/index.vue @@ -28,33 +28,33 @@ import * as echarts from "echarts"; import chartsStatistics from "./assets/charts"; import { getWarningTypeDay } from "../../../../../../../api/event/perceiveEvent"; -const drawRoundRect = (ctx, x, y, width, height, radius, gr) => { - // ctx, 矩形距离x坐标位置, 矩形距离y坐标的位置, 矩形的宽, 矩形的长,圆角角度 - ctx.beginPath(); - ctx.fillStyle = gr; - ctx.arc(x + radius, y + radius, radius, Math.PI, (Math.PI * 3) / 2); - ctx.lineTo(width - radius + x, y); - ctx.arc( - width - radius + x, - radius + y, - radius, - (Math.PI * 3) / 2, - Math.PI * 2 - ); - ctx.lineTo(width + x, height + y - radius); - ctx.arc( - width - radius + x, - height - radius + y, - radius, - 0, - (Math.PI * 1) / 2 - ); - ctx.lineTo(radius + x, height + y); - ctx.arc(radius + x, height - radius + y, radius, (Math.PI * 1) / 2, Math.PI); - ctx.closePath(); - //ctx.stroke(); - ctx.fill(); -}; +// const drawRoundRect = (ctx, x, y, width, height, radius, gr) => { +// // ctx, 矩形距离x坐标位置, 矩形距离y坐标的位置, 矩形的宽, 矩形的长,圆角角度 +// ctx.beginPath(); +// ctx.fillStyle = gr; +// ctx.arc(x + radius, y + radius, radius, Math.PI, (Math.PI * 3) / 2); +// ctx.lineTo(width - radius + x, y); +// ctx.arc( +// width - radius + x, +// radius + y, +// radius, +// (Math.PI * 3) / 2, +// Math.PI * 2 +// ); +// ctx.lineTo(width + x, height + y - radius); +// ctx.arc( +// width - radius + x, +// height - radius + y, +// radius, +// 0, +// (Math.PI * 1) / 2 +// ); +// ctx.lineTo(radius + x, height + y); +// ctx.arc(radius + x, height - radius + y, radius, (Math.PI * 1) / 2, Math.PI); +// ctx.closePath(); +// //ctx.stroke(); +// ctx.fill(); +// }; export default { name: "TypeAnalysis", @@ -187,29 +187,29 @@ export default { myChart.setOption(chartsStatistics); }); - const domMap = document.getElementById("typeAnalysis"); - let parentDiv = domMap.firstChild; - // 创建canvas - let canvas = document.createElement("canvas"); - canvas.width = parentDiv.offsetWidth; - canvas.height = parentDiv.offsetHeight; - parentDiv.appendChild(canvas); - const context = canvas.getContext("2d"); + // const domMap = document.getElementById("typeAnalysis"); + // let parentDiv = domMap.firstChild; + // // 创建canvas + // let canvas = document.createElement("canvas"); + // canvas.width = parentDiv.offsetWidth; + // canvas.height = parentDiv.offsetHeight; + // parentDiv.appendChild(canvas); + // const context = canvas.getContext("2d"); - // 填充渐变颜色 - var gr = context.createLinearGradient(230, 0, 360, 0); - // 颜色断点 - gr.addColorStop(1, "rgba(92,197,255,0)"); - gr.addColorStop(0, "rgba(92,197,255,0.5)"); + // // 填充渐变颜色 + // var gr = context.createLinearGradient(230, 0, 360, 0); + // // 颜色断点 + // gr.addColorStop(1, "rgba(92,197,255,0)"); + // gr.addColorStop(0, "rgba(92,197,255,0.5)"); - context.lineWidth = 1; // 设置线段宽度 + // context.lineWidth = 1; // 设置线段宽度 - // 绘制圆角矩形 - drawRoundRect(context, 228, 8, 280, 24, 12, gr); - drawRoundRect(context, 228, 36, 280, 24, 12, gr); - drawRoundRect(context, 228, 64, 280, 24, 12, gr); - drawRoundRect(context, 228, 92, 280, 24, 12, gr); - drawRoundRect(context, 228, 120, 280, 24, 12, gr); + // // 绘制圆角矩形 + // drawRoundRect(context, 228, 8, 280, 24, 12, gr); + // drawRoundRect(context, 228, 36, 280, 24, 12, gr); + // drawRoundRect(context, 228, 64, 280, 24, 12, gr); + // drawRoundRect(context, 228, 92, 280, 24, 12, gr); + // drawRoundRect(context, 228, 120, 280, 24, 12, gr); }); }); }, @@ -289,7 +289,7 @@ export default { .legend-name { width: 60px; margin-left: 10px; - font-size: 14px; + font-size: 12px; } .legend-num, .legend-percert { @@ -297,7 +297,7 @@ export default { display: flex; justify-content: center; align-items: center; - font-size: 14px; + font-size: 12px; color: #37e7ff; font-weight: bold; } From 2cd83a2e9e984401151fdab2afeb7f97e55e4863 Mon Sep 17 00:00:00 2001 From: hui <770260999@qq.com> Date: Fri, 29 Mar 2024 17:14:51 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/assets/styles/JiHeExpressway.scss | 10 +++++++++ .../pages/Home/components/InfoBoard/index.vue | 21 ++++++++++++------- 2 files changed, 24 insertions(+), 7 deletions(-) diff --git a/ruoyi-ui/src/assets/styles/JiHeExpressway.scss b/ruoyi-ui/src/assets/styles/JiHeExpressway.scss index cc02947f..0395d767 100644 --- a/ruoyi-ui/src/assets/styles/JiHeExpressway.scss +++ b/ruoyi-ui/src/assets/styles/JiHeExpressway.scss @@ -277,4 +277,14 @@ .el-time-spinner__item.active{ color: #fff !important;} } + .el-picker-panel{ + .today div a,.today div span{ + color: #ff0 !important; + font-weight: bold !important; + } + .current div a.cell { + // background-color: #000 !important; + } + } + } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue index 28b7f398..9e48a5ab 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue @@ -61,20 +61,20 @@
-
-
设备名称
+
+
设备名称:
{{ selectedDevice.deviceName }}
-
设备桩号
+
设备桩号:
{{ selectedDevice.stakeMark }}
-
屏幕像素
+
屏幕像素:
{{ JSON.parse(selectedDevice.otherConfig).screenSize @@ -82,6 +82,12 @@ px
+
+
设备状态
+
+ {{ selectedDevice.deviceState == 1 ? "在线" : "离线" }} +
+