From 92945af2e3d8f86c1f598b8d2a7c17ba776e7950 Mon Sep 17 00:00:00 2001 From: fanluyan <754122931@qq.com> Date: Tue, 31 Oct 2023 10:48:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/carouselChart.vue | 18 +++++++++++------- src/views/components/carouselChartmore.vue | 16 ++++++++++------ src/views/pictureRotation/index.vue | 12 ++++++++++++ vue.config.js | 5 +++-- 4 files changed, 36 insertions(+), 15 deletions(-) diff --git a/src/views/components/carouselChart.vue b/src/views/components/carouselChart.vue index e8a46bc..d18a851 100644 --- a/src/views/components/carouselChart.vue +++ b/src/views/components/carouselChart.vue @@ -467,7 +467,7 @@ export default { }, //不显示绘制线 handelClear() { - this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); + // this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); this.flagline = false; updateMarkEnableStatus({ status: 0, @@ -597,8 +597,9 @@ export default { this.alarmList = this.fiveList[this.bigNum].alarmlist; this.drawlineBig(this.alarmList[0]); } else { - // this.canvas = document.getElementById("bigCanvas"); - // this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); + this.canvas = document.getElementById("bigCanvas"); + this.ctx = this.canvas.getContext("2d"); + this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); } console.log(this.fiveList[this.bigNum]); getCoordinate({ @@ -634,8 +635,9 @@ export default { this.alarmList = this.fiveList[this.bigNum].alarmlist; this.drawlineBig(this.alarmList[0]); } else { - // this.canvas = document.getElementById("bigCanvas"); - // this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); + this.canvas = document.getElementById("bigCanvas"); + this.ctx = this.canvas.getContext("2d"); + this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); } getCoordinate({ channelId: this.fiveList[this.bigNum].channelId, @@ -664,8 +666,10 @@ export default { this.alarmList = row.alarmlist; this.drawlineBig(this.alarmList[0]); } else { - // this.canvas = document.getElementById("bigCanvas"); - // this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); + this.canvas = document.getElementById("bigCanvas"); + console.log(this.canvas); + this.ctx = this.canvas.getContext("2d"); + this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); } // this.bgbigPath = row.path + "!1366x768"; diff --git a/src/views/components/carouselChartmore.vue b/src/views/components/carouselChartmore.vue index e35ff93..7640f3a 100644 --- a/src/views/components/carouselChartmore.vue +++ b/src/views/components/carouselChartmore.vue @@ -626,8 +626,9 @@ export default { this.drawlineBig(this.alarmList[0]); }); } else { - // this.canvas = document.getElementById("bigCanvas"); - // this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); + this.canvas = document.getElementById("bigCanvas1"); + this.ctx = this.canvas.getContext("2d"); + this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); } console.log(this.fiveList[this.bigNum]); getCoordinate({ @@ -665,8 +666,9 @@ export default { this.drawlineBig(this.alarmList[0]); }); } else { - // this.canvas = document.getElementById("bigCanvas"); - // this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); + this.canvas = document.getElementById("bigCanvas1"); + this.ctx = this.canvas.getContext("2d"); + this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); } getCoordinate({ channelId: this.fiveList[this.bigNum].channelId, @@ -697,8 +699,10 @@ export default { this.drawlineBig(this.alarmList[0]); }); } else { - // this.canvas = document.getElementById("bigCanvas"); - // this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); + this.canvas = document.getElementById("bigCanvas1"); + console.log(this.canvas); + this.ctx = this.canvas.getContext("2d"); + this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height); } // this.bgbigPath = row.path + "!1366x768"; diff --git a/src/views/pictureRotation/index.vue b/src/views/pictureRotation/index.vue index 4fce24e..d5c5787 100644 --- a/src/views/pictureRotation/index.vue +++ b/src/views/pictureRotation/index.vue @@ -83,6 +83,9 @@ {{ $moment(item.photoTime).format("YYYY-MM-DD HH:mm:ss") }}

无抓拍

+ (设备已离线) @@ -178,6 +181,7 @@ : picInfoData.channnelname }}){{ $moment(picInfoData.photoTime).format("YYYY-MM-DD ") }}

+ @@ -601,6 +605,14 @@ export default { .timeinfo { margin-bottom: 4px; } + .isOffLine { + color: #999; + margin-bottom: 6px; + display: flex; + align-items: center; + text-align: center; + justify-content: center; + } } } } diff --git a/vue.config.js b/vue.config.js index 301cf51..f3d9ace 100644 --- a/vue.config.js +++ b/vue.config.js @@ -29,12 +29,13 @@ module.exports = defineConfig({ proxy: { "/api": { //表示拦截以/api开头的请求路径 - target: "http://47.96.238.157:8093", //阿里云服务器环境 + //target: "http://47.96.238.157:8093", //阿里云服务器环境 //target: "http://180.166.218.222:40080", //dell //target: "http://180.166.218.222:40080", //dell服务器环境 + target: "http://192.168.50.42:81/", //湖南 changOrigin: true, //是否开启跨域 pathRewrite: { - "^/api": "", //重写api,把api变成空字符,因为我们真正请求的路径是没有api的 + "^/api": "/api", //重写api,把api变成空字符,因为我们真正请求的路径是没有api的 }, }, },