From c6c7ff3ae1ad49d603851d5c80cdea1f4c243534 Mon Sep 17 00:00:00 2001
From: fanluyan <754122931@qq.com>
Date: Wed, 3 Jul 2024 11:08:40 +0800
Subject: [PATCH] =?UTF-8?q?=E7=BC=A9=E7=95=A5=E5=9B=BE=E7=82=B9=E5=87=BB?=
=?UTF-8?q?=E5=B7=A6=E5=8F=B3=E7=AE=AD=E5=A4=B4=E5=8A=A0=E8=BD=BD=E5=9B=BE?=
=?UTF-8?q?=E7=89=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../realTimeMonitor/components/carouselChart.vue | 14 +++++++++-----
vue.config.js | 4 ++--
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/src/views/realTimeMonitor/components/carouselChart.vue b/src/views/realTimeMonitor/components/carouselChart.vue
index 25d3be3..10d159e 100644
--- a/src/views/realTimeMonitor/components/carouselChart.vue
+++ b/src/views/realTimeMonitor/components/carouselChart.vue
@@ -100,6 +100,7 @@
>
+
+
-
@@ -258,6 +259,7 @@ export default {
deep: true, //deep,默认值是 false,代表是否深度监听。
},
},
+ computed: {},
created() {
this.roleUser = localStorage.getItem("role");
////console.log(this.roleUser);
@@ -434,19 +436,21 @@ export default {
let direction = e.deltaY > 0 ? "down" : "up"; //deltaY为正则滚轮向下,为负滚轮向上
if (direction == "down") {
this.$refs.scrollBox.scrollLeft +=
- (this.$refs.scrollBox.offsetWidth / this.photoNum) * 1;
+ (this.$refs.scrollBox.offsetWidth / this.photoNum) * 2;
}
if (direction == "up") {
this.$refs.scrollBox.scrollLeft -=
- (this.$refs.scrollBox.offsetWidth / this.photoNum) * 1;
+ (this.$refs.scrollBox.offsetWidth / this.photoNum) * 2;
}
},
//缩略图的左右箭头
smallLeftClick() {
this.$refs.scrollBox.scrollLeft -= this.$refs.scrollBox.offsetWidth;
+ this.$forceUpdate(); // 强制 Vue 重新渲染
},
smallRightClick() {
this.$refs.scrollBox.scrollLeft += this.$refs.scrollBox.offsetWidth;
+ this.$forceUpdate(); // 强制 Vue 重新渲染
},
//绘制大图告警区域
diff --git a/vue.config.js b/vue.config.js
index 9e1ce46..94473de 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -23,8 +23,8 @@ module.exports = defineConfig({
//表示拦截以/api开头的请求路径
//target: "http://192.168.1.190:8080", //190 需要去掉/Api
- target: "http://61.169.135.146:9911/", //运维
- // target: "http://61.169.135.146:40080/", //dell
+ //target: "http://61.169.135.146:9911/", //运维
+ target: "http://61.169.135.146:40080/", //dell
changOrigin: true, //是否开启跨域
pathRewrite: {
"^/api": "/api", //重写api,把api变成空字符,因为我们真正请求的路径是没有api的