update
This commit is contained in:
parent
75bcc46bfd
commit
b209a6aba0
@ -8,6 +8,9 @@
|
||||
* 版权信息 : 2023 by ${再登软件}, All Rights Reserved.
|
||||
*/
|
||||
|
||||
|
||||
const currentDate = new Date();
|
||||
const currentYear = currentDate.getFullYear();
|
||||
export default {
|
||||
messages: {
|
||||
'energyConsume': '能耗 实时监测系统',
|
||||
@ -255,7 +258,7 @@ export default {
|
||||
'HanJie_generalEnvironment': '焊接-环境 实时监测系统',
|
||||
'noiseDetection': '噪音监测',
|
||||
'NormalValue': '正常值',
|
||||
'PowerConsumption_2023': '2024年度用电量(度)',
|
||||
'PowerConsumption_2023': currentYear + '年度用电量(度)',
|
||||
'Production_2023': '2024年度生产额(元)',
|
||||
'GasConsumption_2023JiXie': '2024年机械分厂用气量(立方)',
|
||||
'DianKongGatewayDtatus': '电控分厂物联网关状态',
|
||||
|
@ -12,11 +12,7 @@
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<div style="display: flex;justify-content: space-evenly; align-items: center; margin-bottom: 10px;">
|
||||
<chart
|
||||
:title="powerOption.title"
|
||||
:option="powerOption.option"
|
||||
ref="powerref"
|
||||
></chart>
|
||||
<chart :title="powerOption.title" :option="powerOption.option" ref="powerref"></chart>
|
||||
<!-- <chart
|
||||
:title="powerOption.title"
|
||||
:option="powerOption.option"
|
||||
@ -27,8 +23,8 @@
|
||||
<template v-slot>
|
||||
<pm name="Electriccontrol" title="pm2.5/pm10" ref="pmref"></pm>
|
||||
</template>
|
||||
</border3>
|
||||
</div> -->
|
||||
</border3>
|
||||
</div> -->
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@ -43,12 +39,11 @@ import { getPowerData, getconsumeDetail } from "@/http/energyConsume";
|
||||
import border6 from "@/components/borderBox/border6.vue";
|
||||
import border3 from "@/components/borderBox/border3.vue";
|
||||
import pm from "./chart/pm.vue";
|
||||
import power from "./chart/power2023.vue";
|
||||
import chart from "@/components/assembly/chart2.vue";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { useEnergyConsumeStore } from "@/store/module/energyConsume";
|
||||
import { useI18n } from 'vue-i18n'
|
||||
let {t} = useI18n();
|
||||
let { t } = useI18n();
|
||||
const store = useEnergyConsumeStore();
|
||||
const router = useRouter();
|
||||
|
||||
@ -82,10 +77,10 @@ function reset(val: any) {
|
||||
const powerBox = (width: any, height: any) => {
|
||||
let a = calcWH(height, width, 1, 1, 0);
|
||||
//修改高度
|
||||
powerref.value.setchartWH(a.oWidth-20, a.oHeight-20);
|
||||
powerref.value.setchartWH(a.oWidth - 20, a.oHeight - 20);
|
||||
// Productionref.value.setchartWH(a.oWidth-20, a.oHeight-20);
|
||||
// pmref.value.setchartWH(a.oWidth-40,a.oHeight-40)
|
||||
// yields.value.setchartWH(a.oWidth, a.oHeight - 30);
|
||||
// yields.value.setchartWH(a.oWidth, a.oHeight - 30);
|
||||
};
|
||||
let powerOption = reactive({
|
||||
title: "",
|
||||
@ -107,8 +102,8 @@ let powerOption = reactive({
|
||||
},
|
||||
legend: {
|
||||
type: "scroll",
|
||||
width:800,
|
||||
right:20,
|
||||
width: 800,
|
||||
right: 20,
|
||||
},
|
||||
grid: {
|
||||
top: "8%",
|
||||
@ -144,16 +139,16 @@ let powerOption = reactive({
|
||||
// // yields.value.setData(result.data);
|
||||
// }
|
||||
// }
|
||||
function setcontentData(val){
|
||||
let monthData=[]
|
||||
let powerMonth=[]
|
||||
for(let key in val.power){
|
||||
function setcontentData(val) {
|
||||
let monthData = []
|
||||
let powerMonth = []
|
||||
for (let key in val.power) {
|
||||
monthData.push(key)
|
||||
powerMonth.push(val.power[key])
|
||||
}
|
||||
powerOption.option.xAxis.data=[]
|
||||
powerOption.option.series=[]
|
||||
powerOption.option.xAxis.data=monthData.reverse()
|
||||
powerOption.option.xAxis.data = []
|
||||
powerOption.option.series = []
|
||||
powerOption.option.xAxis.data = monthData.reverse()
|
||||
powerOption.option.series.push({
|
||||
data: powerMonth.reverse(),
|
||||
type: 'bar',
|
||||
@ -162,7 +157,7 @@ function setcontentData(val){
|
||||
color: 'rgba(180, 180, 180, 0.2)'
|
||||
},
|
||||
itemStyle: {
|
||||
color: function(params) {
|
||||
color: function (params) {
|
||||
// 通过返回值的下标一一对应将颜色赋给柱子上,return出去什么颜色就是什么颜色,这里可以写判断
|
||||
// console.log(params)
|
||||
let color = ['#1089e7', '#f57474', '#56d0e3', '#f8b448', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc']
|
||||
@ -170,11 +165,11 @@ function setcontentData(val){
|
||||
return color[params.dataIndex];
|
||||
}
|
||||
},
|
||||
barWidth:'20%',
|
||||
barWidth: '20%',
|
||||
label: {
|
||||
show: true,
|
||||
color:'#fff',
|
||||
formatter: function(params){
|
||||
color: '#fff',
|
||||
formatter: function (params) {
|
||||
return params.value.toLocaleString()
|
||||
},
|
||||
position: "top",
|
||||
|
@ -21,8 +21,8 @@ module.exports = defineConfig(
|
||||
devServer: {
|
||||
proxy: {
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
target: 'http://192.168.10.98:9015', // 想要请求的url地址
|
||||
// target: 'http://8.130.165.100:9015',
|
||||
// target: 'http://192.168.10.98:9015', // 想要请求的url地址
|
||||
target: 'http://8.141.87.86:9015',
|
||||
// target: 'http://192.168.110.19:8080',
|
||||
ws: true, // 是否要开启代理
|
||||
changeOrigin: true,
|
||||
|
Loading…
Reference in New Issue
Block a user