From 1201e54a9e032b89b9ce99b1f057b39d8a574410 Mon Sep 17 00:00:00 2001 From: xuechunyuan <17853500702@163.com> Date: Fri, 24 Feb 2023 09:12:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=97=E7=83=AD=E8=83=BD=E8=80=97=E5=88=86?= =?UTF-8?q?=E6=9E=90=E7=BD=91=E7=8A=B6=E5=9B=BE=E8=AE=BE=E7=BD=AE=E6=9C=80?= =?UTF-8?q?=E5=A4=A7=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/sourceAnaly/components/buildWarm.vue | 18 ++++++++++++------ vue.config.js | 4 ++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/views/sourceAnaly/components/buildWarm.vue b/src/views/sourceAnaly/components/buildWarm.vue index ddfa425..ce79256 100644 --- a/src/views/sourceAnaly/components/buildWarm.vue +++ b/src/views/sourceAnaly/components/buildWarm.vue @@ -322,19 +322,25 @@ export default { }); }, getWarmLeida(value) { + value.map(item => { + item = item.toString().split('.')[1] != undefined && item.toString().split('.')[1].length > 1 ? item.toFixed(2) : item + }) + let max = Math.max(...value); const data = [ { value: value, name: "楼宇耗热", }, ]; + max = max === 0 ? 100 : max; + console.log('max', max); const title = [ - { name: "#1", max: 2000 }, - { name: "#2", max: 2000 }, - { name: "#3", max: 2000 }, - { name: "#4", max: 2000 }, - { name: "#5", max: 2000 }, - { name: "#6", max: 2000 }, + { name: "#1", max: max }, + { name: "#2", max: max }, + { name: "#3", max: max }, + { name: "#4", max: max }, + { name: "#5", max: max }, + { name: "#6", max: max }, ]; this.$refs.radar.getLeidaChart( "耗热", diff --git a/vue.config.js b/vue.config.js index 2c00fe4..6ab8ff6 100644 --- a/vue.config.js +++ b/vue.config.js @@ -31,9 +31,9 @@ module.exports = { // target: 'http://180.76.231.175:8000', // target: 'http://192.168.0.105:80', // target: "http://192.168.43.35", - target: 'http://192.168.1.106', + // target: 'http://192.168.1.106', // target: "http://192.168.1.3", - // target: "http://10.90.100.204", + target: "http://10.90.100.204", // target: "http://rsvz4t.natappfree.cc", //远程演示服务地址,可用于直接启动项目 //target: 'https://saber.bladex.vip/api',