- {{ radioPx }} ({{ fileSize.toFixed(2) }}M)
+ {{ radioPx }} ({{ fileSize }})
国网I1
陕西
安徽
@@ -391,10 +391,18 @@ export default {
} else {
this.radioPx = "";
}
- if (data.fileSize != undefined) {
- this.fileSize = data.fileSize / (1024 * 1024);
+ if (data.fileSize !== undefined) {
+ const sizeInBytes = data.fileSize;
+ const sizeInMB = sizeInBytes / (1024 * 1024);
+ const sizeInKB = sizeInBytes / 1024;
+
+ if (sizeInMB >= 1) {
+ this.fileSize = `${sizeInMB.toFixed(2)}M`; // 大于等于1MB,以MB为单位,保留两位小数
+ } else {
+ this.fileSize = `${sizeInKB.toFixed(2)}K`; // 小于1MB,以KB为单位,保留两位小数
+ }
} else {
- this.fileSize = "";
+ this.fileSize = ""; // 如果data.fileSize未定义,则设置为空字符串
}
// console.log(data.channelId);
From 273a9509b3338807ccb6e7cf0c6203b83d522864 Mon Sep 17 00:00:00 2001
From: fanluyan <754122931@qq.com>
Date: Wed, 10 Apr 2024 13:41:21 +0800
Subject: [PATCH 8/9] =?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/realTimeSearch/index.vue | 1 -
vue.config.js | 9 ++++-----
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/views/realTimeSearch/index.vue b/src/views/realTimeSearch/index.vue
index 3aadc6c..fb5c68e 100644
--- a/src/views/realTimeSearch/index.vue
+++ b/src/views/realTimeSearch/index.vue
@@ -310,7 +310,6 @@ export default {
} else {
this.formdata.lineid = Number(this.$route.query.lineId);
}
-
this.getSearchgt();
})
.catch((err) => {});
diff --git a/vue.config.js b/vue.config.js
index 6211b20..239379d 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -21,13 +21,12 @@ module.exports = defineConfig({
proxy: {
"/api": {
//表示拦截以/api开头的请求路径
- //target: "http://47.96.238.157:8093", //阿里云服务器环境
- target: "http://180.166.218.222:40080", //dell
- //target: "http://192.168.1.190:8080", //liu 本机ip 需要去掉/Api
- // target: "http://192.168.50.42:81", //东视
+ //target: "http://180.166.218.222:40080", //dell
+ // target: "http://192.168.1.190:8080", //liu 本机ip 需要去掉/Api
+ target: "http://192.168.50.7:8093", //东视
changOrigin: true, //是否开启跨域
pathRewrite: {
- "^/api": "/api", //重写api,把api变成空字符,因为我们真正请求的路径是没有api的
+ "^/api": "", //重写api,把api变成空字符,因为我们真正请求的路径是没有api的
},
},
},
From 2fb20f00ea9836e90e0be150323af7fa4e6854b4 Mon Sep 17 00:00:00 2001
From: fanluyan <754122931@qq.com>
Date: Wed, 10 Apr 2024 13:48:53 +0800
Subject: [PATCH 9/9] =?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/towerInformation/index.vue | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/views/towerInformation/index.vue b/src/views/towerInformation/index.vue
index 9b20ef8..bea5c23 100644
--- a/src/views/towerInformation/index.vue
+++ b/src/views/towerInformation/index.vue
@@ -112,6 +112,11 @@
}}
+