更换favicon图标 修改能耗大屏图表按月筛选时页面显示不正确问题
BIN
public/bt_favicon.ico
Normal file
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 4.2 KiB |
Before Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 4.6 KiB |
Before Width: | Height: | Size: 799 B |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 4.2 KiB |
@ -1,3 +0,0 @@
|
|||||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<path d="M8.00251 14.9297L0 1.07422H6.14651L8.00251 4.27503L9.84583 1.07422H16L8.00251 14.9297Z" fill="black"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 215 B |
@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
<link rel="shortcut icon" href="/bt_favicon.ico">
|
||||||
<title><%= htmlWebpackPlugin.options.title %></title>
|
<title><%= htmlWebpackPlugin.options.title %></title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
* 版权信息 : 2023 by ${再登软件}, All Rights Reserved.
|
* 版权信息 : 2023 by ${再登软件}, All Rights Reserved.
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div :style="{ width: boxWH.width, height: boxWH.height }">
|
<div :style="{ width: boxWH.width, height: boxWH.height }" style="position: relative;">
|
||||||
<border6 ref="refborder6">
|
<border6 ref="refborder6">
|
||||||
<template v-slot>
|
<template v-slot>
|
||||||
|
<el-button type="success" class="linkPowerChart" @click="clickPowerChart">历史数据</el-button>
|
||||||
<div ref="inpie" class="ddd"></div>
|
<div ref="inpie" class="ddd"></div>
|
||||||
<div ref="inpie2" class="ddd"></div>
|
<div ref="inpie2" class="ddd"></div>
|
||||||
</template>
|
</template>
|
||||||
@ -29,6 +30,8 @@ import {
|
|||||||
} from "vue";
|
} from "vue";
|
||||||
import { EDataPerson, EDataPersonItem } from "@/type/environment";
|
import { EDataPerson, EDataPersonItem } from "@/type/environment";
|
||||||
import border6 from "@/components/borderBox/border6.vue";
|
import border6 from "@/components/borderBox/border6.vue";
|
||||||
|
import { useRoute, useRouter } from "vue-router";
|
||||||
|
const router = useRouter();
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as any;
|
||||||
let props = defineProps<{
|
let props = defineProps<{
|
||||||
title: string;
|
title: string;
|
||||||
@ -116,6 +119,11 @@ function setchartWH(width: any, height: any) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const clickPowerChart = () => {
|
||||||
|
router.push({
|
||||||
|
path: "/energyConsume/historyData",
|
||||||
|
});
|
||||||
|
};
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
setData(props.option,props.option);
|
setData(props.option,props.option);
|
||||||
});
|
});
|
||||||
@ -127,4 +135,17 @@ defineExpose({
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped>
|
||||||
|
.linkPowerChart {
|
||||||
|
position: absolute;
|
||||||
|
right: 25px;
|
||||||
|
top: 21px;
|
||||||
|
z-index: 999;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: bold;
|
||||||
|
padding: 10px;
|
||||||
|
color: white;
|
||||||
|
background-color: #3B498B;
|
||||||
|
border: #3B498B;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -28,7 +28,7 @@ import { EDataPerson, EDataPersonItem } from "@/type/energyConsume";
|
|||||||
import { accAdd } from "@/utils/precision";
|
import { accAdd } from "@/utils/precision";
|
||||||
import border4 from "@/components/borderBox/border6.vue";
|
import border4 from "@/components/borderBox/border6.vue";
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
let {t} = useI18n();
|
let { t } = useI18n();
|
||||||
const { proxy } = getCurrentInstance() as any;
|
const { proxy } = getCurrentInstance() as any;
|
||||||
let props = defineProps<{
|
let props = defineProps<{
|
||||||
title: string;
|
title: string;
|
||||||
@ -60,8 +60,8 @@ const setData = (value: any) => {
|
|||||||
let series2 = [];
|
let series2 = [];
|
||||||
let name = [];
|
let name = [];
|
||||||
let name2 = [];
|
let name2 = [];
|
||||||
let shuju = [{month: {}, type: '生产额'},{month: {}, type: '用电量'}];
|
let shuju = [{ month: {}, type: '生产额' }, { month: {}, type: '用电量' }];
|
||||||
let shuju2 = [{month: {}, type: '生产额'},{month: {}, type: '用电量'}];
|
let shuju2 = [{ month: {}, type: '生产额' }, { month: {}, type: '用电量' }];
|
||||||
let nameIndex = null;
|
let nameIndex = null;
|
||||||
value.name.forEach((ele, index) => {
|
value.name.forEach((ele, index) => {
|
||||||
if (ele == "机械分厂") {
|
if (ele == "机械分厂") {
|
||||||
@ -71,18 +71,18 @@ const setData = (value: any) => {
|
|||||||
name.push(ele);
|
name.push(ele);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
value.listData.forEach((res,listDataindex) => {
|
value.listData.forEach((res, listDataindex) => {
|
||||||
for (let key in res.month) {
|
for (let key in res.month) {
|
||||||
res.month[key].forEach((ele,index)=>{
|
res.month[key].forEach((ele, index) => {
|
||||||
if(!shuju2[listDataindex].month[key]){
|
if (!shuju2[listDataindex].month[key]) {
|
||||||
shuju2[listDataindex].month[key]=[]
|
shuju2[listDataindex].month[key] = []
|
||||||
}
|
}
|
||||||
if(!shuju[listDataindex].month[key]){
|
if (!shuju[listDataindex].month[key]) {
|
||||||
shuju[listDataindex].month[key]=[]
|
shuju[listDataindex].month[key] = []
|
||||||
}
|
}
|
||||||
if(index==nameIndex){
|
if (index == nameIndex) {
|
||||||
shuju2[listDataindex].month[key].push(ele)
|
shuju2[listDataindex].month[key].push(ele)
|
||||||
}else{
|
} else {
|
||||||
shuju[listDataindex].month[key].push(ele)
|
shuju[listDataindex].month[key].push(ele)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -114,7 +114,7 @@ const setData = (value: any) => {
|
|||||||
name: key + "月",
|
name: key + "月",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
stack: res.type,
|
stack: res.type,
|
||||||
barWidth:'20%',
|
barWidth: '20%',
|
||||||
emphasis: {
|
emphasis: {
|
||||||
focus: "coordinateSystem",
|
focus: "coordinateSystem",
|
||||||
label: {
|
label: {
|
||||||
@ -201,7 +201,7 @@ const setData = (value: any) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
echartsData.power!.div = powerjixie.value;
|
echartsData.power!.div = powerjixie.value;
|
||||||
echartsData.power!.title =props.title;;
|
echartsData.power!.title = props.title;
|
||||||
echartsData.power!.data = {
|
echartsData.power!.data = {
|
||||||
title: {
|
title: {
|
||||||
text: echartsData.power!.title,
|
text: echartsData.power!.title,
|
||||||
@ -210,7 +210,7 @@ const setData = (value: any) => {
|
|||||||
color: "#fff",
|
color: "#fff",
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
},
|
},
|
||||||
top:"2%"
|
top: "2%"
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "item",
|
trigger: "item",
|
||||||
@ -239,16 +239,16 @@ const setData = (value: any) => {
|
|||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: t('messages.Production_yuan'),
|
name: t('messages.Production_yuan'),
|
||||||
show:false,
|
show: false,
|
||||||
splitLine:{
|
splitLine: {
|
||||||
show:false
|
show: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: t('messages.powerhi_du'),
|
name: t('messages.powerhi_du'),
|
||||||
splitLine:{
|
splitLine: {
|
||||||
show:false
|
show: false
|
||||||
}
|
}
|
||||||
// show:false
|
// show:false
|
||||||
},
|
},
|
||||||
@ -261,7 +261,7 @@ const setData = (value: any) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
echartsData2.power!.div = power.value;
|
echartsData2.power!.div = power.value;
|
||||||
echartsData2.power!.title ='';
|
echartsData2.power!.title = '';
|
||||||
echartsData2.power!.data = {
|
echartsData2.power!.data = {
|
||||||
title: {
|
title: {
|
||||||
text: '',
|
text: '',
|
||||||
@ -298,19 +298,19 @@ const setData = (value: any) => {
|
|||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: t('messages.Production_yuan'),
|
name: t('messages.Production_yuan'),
|
||||||
splitLine:{
|
splitLine: {
|
||||||
show:false
|
show: false
|
||||||
},
|
},
|
||||||
max:10000000
|
max: 10000000
|
||||||
// show:false
|
// show:false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: t('messages.powerhi_du'),
|
name: t('messages.powerhi_du'),
|
||||||
splitLine:{
|
splitLine: {
|
||||||
show:false
|
show: false
|
||||||
},
|
},
|
||||||
show:false
|
show: false
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
yAxis: {
|
yAxis: {
|
||||||
@ -320,7 +320,9 @@ const setData = (value: any) => {
|
|||||||
series: series2,
|
series: series2,
|
||||||
};
|
};
|
||||||
change(echartsData.power, value);
|
change(echartsData.power, value);
|
||||||
change(echartsData2.power,value)
|
console.log(echartsData.power);
|
||||||
|
|
||||||
|
change(echartsData2.power, value)
|
||||||
};
|
};
|
||||||
|
|
||||||
const change = (item: EDataPersonItem, value: any) => {
|
const change = (item: EDataPersonItem, value: any) => {
|
||||||
@ -328,7 +330,10 @@ const change = (item: EDataPersonItem, value: any) => {
|
|||||||
clacChartsSum(item.data, value);
|
clacChartsSum(item.data, value);
|
||||||
Ebox.setOption(item.data);
|
Ebox.setOption(item.data);
|
||||||
item.box = Ebox;
|
item.box = Ebox;
|
||||||
|
if (item.title == props.title) {
|
||||||
changeecharts(item.data, value);
|
changeecharts(item.data, value);
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -349,10 +354,10 @@ const clacChartsSum = (option: any, value: any) => {
|
|||||||
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
|
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(stack=='生产额'){
|
if (stack == '生产额') {
|
||||||
stack=t('messages.Production')
|
stack = t('messages.Production')
|
||||||
}else if(stack=='用电量'){
|
} else if (stack == '用电量') {
|
||||||
stack=t('messages.powerTip')
|
stack = t('messages.powerTip')
|
||||||
}
|
}
|
||||||
|
|
||||||
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
|
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
|
||||||
@ -366,10 +371,10 @@ const clacChartsSum = (option: any, value: any) => {
|
|||||||
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
|
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(stack=='生产额'){
|
if (stack == '生产额') {
|
||||||
stack=t('messages.Production')
|
stack = t('messages.Production')
|
||||||
}else if(stack=='用电量'){
|
} else if (stack == '用电量') {
|
||||||
stack=t('messages.powerTip')
|
stack = t('messages.powerTip')
|
||||||
}
|
}
|
||||||
|
|
||||||
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
|
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
|
||||||
@ -401,10 +406,10 @@ const changeecharts = (option: any, value: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(stack=='生产额'){
|
if (stack == '生产额') {
|
||||||
stack=t('messages.Production')
|
stack = t('messages.Production')
|
||||||
}else if(stack=='用电量'){
|
} else if (stack == '用电量') {
|
||||||
stack=t('messages.powerTip')
|
stack = t('messages.powerTip')
|
||||||
}
|
}
|
||||||
|
|
||||||
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
|
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
|
||||||
@ -421,10 +426,10 @@ const changeecharts = (option: any, value: any) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(stack=='生产额'){
|
if (stack == '生产额') {
|
||||||
stack=t('messages.Production')
|
stack = t('messages.Production')
|
||||||
}else if(stack=='用电量'){
|
} else if (stack == '用电量') {
|
||||||
stack=t('messages.powerTip')
|
stack = t('messages.powerTip')
|
||||||
}
|
}
|
||||||
|
|
||||||
return datavalue ? stack + ":" + datavalue.toLocaleString() + "" : null;
|
return datavalue ? stack + ":" + datavalue.toLocaleString() + "" : null;
|
||||||
@ -443,10 +448,10 @@ const changeecharts = (option: any, value: any) => {
|
|||||||
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
|
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(stack=='生产额'){
|
if (stack == '生产额') {
|
||||||
stack=t('messages.Production')
|
stack = t('messages.Production')
|
||||||
}else if(stack=='用电量'){
|
} else if (stack == '用电量') {
|
||||||
stack=t('messages.powerTip')
|
stack = t('messages.powerTip')
|
||||||
}
|
}
|
||||||
|
|
||||||
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
|
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
|
||||||
@ -460,10 +465,10 @@ const changeecharts = (option: any, value: any) => {
|
|||||||
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
|
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(stack=='生产额'){
|
if (stack == '生产额') {
|
||||||
stack=t('messages.Production')
|
stack = t('messages.Production')
|
||||||
}else if(stack=='用电量'){
|
} else if (stack == '用电量') {
|
||||||
stack=t('messages.powerTip')
|
stack = t('messages.powerTip')
|
||||||
}
|
}
|
||||||
|
|
||||||
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
|
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
|
||||||
@ -474,10 +479,10 @@ const changeecharts = (option: any, value: any) => {
|
|||||||
|
|
||||||
function setchartWH(width: any, height: any) {
|
function setchartWH(width: any, height: any) {
|
||||||
echartsData.power!.div = power.value;
|
echartsData.power!.div = power.value;
|
||||||
power.value.style.height = height/20*5 + "px";
|
power.value.style.height = height / 20 * 5 + "px";
|
||||||
power.value.style.width = width + "px";
|
power.value.style.width = width + "px";
|
||||||
|
|
||||||
powerjixie.value.style.height = height/20*15 + "px";
|
powerjixie.value.style.height = height / 20 * 15 + "px";
|
||||||
powerjixie.value.style.width = width + "px";
|
powerjixie.value.style.width = width + "px";
|
||||||
refborder4.value.resetWH();
|
refborder4.value.resetWH();
|
||||||
if (echartsData.power.box) {
|
if (echartsData.power.box) {
|
||||||
@ -485,7 +490,7 @@ function setchartWH(width: any, height: any) {
|
|||||||
echartsData2.power.box.resize();
|
echartsData2.power.box.resize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(() => {});
|
onMounted(() => { });
|
||||||
|
|
||||||
// return{setchartWH}
|
// return{setchartWH}
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<chart :title="gasOption.title" :option="gasOption.option" ref="ratio" @click="clickPowerChart"></chart>
|
<chart :title="gasOption.title" :option="gasOption.option" ref="ratio"></chart>
|
||||||
|
|
||||||
<!-- <power
|
<!-- <power
|
||||||
ref="yields"
|
ref="yields"
|
||||||
@ -163,11 +163,7 @@ const powerBox = (width: any, height: any) => {
|
|||||||
yields.value.setchartWH(a.oWidth + 120, a.oHeight * 2 - 20);
|
yields.value.setchartWH(a.oWidth + 120, a.oHeight * 2 - 20);
|
||||||
ratio.value.setchartWH(a.oWidth - 120, a.oHeight * 5);
|
ratio.value.setchartWH(a.oWidth - 120, a.oHeight * 5);
|
||||||
};
|
};
|
||||||
const clickPowerChart = () => {
|
|
||||||
router.push({
|
|
||||||
path: "/energyConsume/historyData",
|
|
||||||
});
|
|
||||||
};
|
|
||||||
async function getpower() {
|
async function getpower() {
|
||||||
let result: any = await getPowerData({ time: 1 });
|
let result: any = await getPowerData({ time: 1 });
|
||||||
|
|
||||||
|