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',