更换favicon图标 修改能耗大屏图表按月筛选时页面显示不正确问题

This commit is contained in:
hzz 2023-05-26 11:59:49 +08:00
parent a39227e043
commit 8056eb7632
21 changed files with 93 additions and 74 deletions

BIN
public/bt_favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 799 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View File

@ -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

View File

@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<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>
</head>
<body>

View File

@ -8,9 +8,10 @@
* 版权信息 : 2023 by ${再登软件}, All Rights Reserved.
-->
<template>
<div :style="{ width: boxWH.width, height: boxWH.height }">
<div :style="{ width: boxWH.width, height: boxWH.height }" style="position: relative;">
<border6 ref="refborder6">
<template v-slot>
<el-button type="success" class="linkPowerChart" @click="clickPowerChart">历史数据</el-button>
<div ref="inpie" class="ddd"></div>
<div ref="inpie2" class="ddd"></div>
</template>
@ -29,6 +30,8 @@ import {
} from "vue";
import { EDataPerson, EDataPersonItem } from "@/type/environment";
import border6 from "@/components/borderBox/border6.vue";
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const { proxy } = getCurrentInstance() as any;
let props = defineProps<{
title: string;
@ -116,6 +119,11 @@ function setchartWH(width: any, height: any) {
})
}
}
const clickPowerChart = () => {
router.push({
path: "/energyConsume/historyData",
});
};
onMounted(() => {
setData(props.option,props.option);
});
@ -127,4 +135,17 @@ defineExpose({
});
</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>

View File

@ -28,7 +28,7 @@ import { EDataPerson, EDataPersonItem } from "@/type/energyConsume";
import { accAdd } from "@/utils/precision";
import border4 from "@/components/borderBox/border6.vue";
import { useI18n } from 'vue-i18n'
let {t} = useI18n();
let { t } = useI18n();
const { proxy } = getCurrentInstance() as any;
let props = defineProps<{
title: string;
@ -60,8 +60,8 @@ const setData = (value: any) => {
let series2 = [];
let name = [];
let name2 = [];
let shuju = [{month: {}, type: '生产额'},{month: {}, type: '用电量'}];
let shuju2 = [{month: {}, type: '生产额'},{month: {}, type: '用电量'}];
let shuju = [{ month: {}, type: '生产额' }, { month: {}, type: '用电量' }];
let shuju2 = [{ month: {}, type: '生产额' }, { month: {}, type: '用电量' }];
let nameIndex = null;
value.name.forEach((ele, index) => {
if (ele == "机械分厂") {
@ -71,18 +71,18 @@ const setData = (value: any) => {
name.push(ele);
}
});
value.listData.forEach((res,listDataindex) => {
value.listData.forEach((res, listDataindex) => {
for (let key in res.month) {
res.month[key].forEach((ele,index)=>{
if(!shuju2[listDataindex].month[key]){
shuju2[listDataindex].month[key]=[]
res.month[key].forEach((ele, index) => {
if (!shuju2[listDataindex].month[key]) {
shuju2[listDataindex].month[key] = []
}
if(!shuju[listDataindex].month[key]){
shuju[listDataindex].month[key]=[]
if (!shuju[listDataindex].month[key]) {
shuju[listDataindex].month[key] = []
}
if(index==nameIndex){
if (index == nameIndex) {
shuju2[listDataindex].month[key].push(ele)
}else{
} else {
shuju[listDataindex].month[key].push(ele)
}
})
@ -114,7 +114,7 @@ const setData = (value: any) => {
name: key + "月",
type: "bar",
stack: res.type,
barWidth:'20%',
barWidth: '20%',
emphasis: {
focus: "coordinateSystem",
label: {
@ -201,7 +201,7 @@ const setData = (value: any) => {
);
echartsData.power!.div = powerjixie.value;
echartsData.power!.title =props.title;;
echartsData.power!.title = props.title;
echartsData.power!.data = {
title: {
text: echartsData.power!.title,
@ -210,7 +210,7 @@ const setData = (value: any) => {
color: "#fff",
fontSize: 20,
},
top:"2%"
top: "2%"
},
tooltip: {
trigger: "item",
@ -239,17 +239,17 @@ const setData = (value: any) => {
{
type: "value",
name: t('messages.Production_yuan'),
show:false,
splitLine:{
show:false
}
show: false,
splitLine: {
show: false
}
},
{
type: "value",
name: t('messages.powerhi_du'),
splitLine:{
show:false
}
splitLine: {
show: false
}
// show:false
},
],
@ -261,7 +261,7 @@ const setData = (value: any) => {
};
echartsData2.power!.div = power.value;
echartsData2.power!.title ='';
echartsData2.power!.title = '';
echartsData2.power!.data = {
title: {
text: '',
@ -298,19 +298,19 @@ const setData = (value: any) => {
{
type: "value",
name: t('messages.Production_yuan'),
splitLine:{
show:false
},
max:10000000
splitLine: {
show: false
},
max: 10000000
// show:false
},
{
type: "value",
name: t('messages.powerhi_du'),
splitLine:{
show:false
},
show:false
splitLine: {
show: false
},
show: false
},
],
yAxis: {
@ -320,7 +320,9 @@ const setData = (value: any) => {
series: series2,
};
change(echartsData.power, value);
change(echartsData2.power,value)
console.log(echartsData.power);
change(echartsData2.power, value)
};
const change = (item: EDataPersonItem, value: any) => {
@ -328,7 +330,10 @@ const change = (item: EDataPersonItem, value: any) => {
clacChartsSum(item.data, value);
Ebox.setOption(item.data);
item.box = Ebox;
changeecharts(item.data, value);
if (item.title == props.title) {
changeecharts(item.data, value);
}
};
/**
@ -349,10 +354,10 @@ const clacChartsSum = (option: any, value: any) => {
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
}
}
if(stack=='生产额'){
stack=t('messages.Production')
}else if(stack=='用电量'){
stack=t('messages.powerTip')
if (stack == '生产额') {
stack = t('messages.Production')
} else if (stack == '用电量') {
stack = t('messages.powerTip')
}
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
@ -366,10 +371,10 @@ const clacChartsSum = (option: any, value: any) => {
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
}
}
if(stack=='生产额'){
stack=t('messages.Production')
}else if(stack=='用电量'){
stack=t('messages.powerTip')
if (stack == '生产额') {
stack = t('messages.Production')
} else if (stack == '用电量') {
stack = t('messages.powerTip')
}
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
@ -401,11 +406,11 @@ const changeecharts = (option: any, value: any) => {
}
}
}
if(stack=='生产额'){
stack=t('messages.Production')
}else if(stack=='用电量'){
stack=t('messages.powerTip')
}
if (stack == '生产额') {
stack = t('messages.Production')
} else if (stack == '用电量') {
stack = t('messages.powerTip')
}
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
}
@ -421,11 +426,11 @@ const changeecharts = (option: any, value: any) => {
}
}
}
if(stack=='生产额'){
stack=t('messages.Production')
}else if(stack=='用电量'){
stack=t('messages.powerTip')
}
if (stack == '生产额') {
stack = t('messages.Production')
} else if (stack == '用电量') {
stack = t('messages.powerTip')
}
return datavalue ? stack + ":" + datavalue.toLocaleString() + "" : null;
}
@ -443,10 +448,10 @@ const changeecharts = (option: any, value: any) => {
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
}
}
if(stack=='生产额'){
stack=t('messages.Production')
}else if(stack=='用电量'){
stack=t('messages.powerTip')
if (stack == '生产额') {
stack = t('messages.Production')
} else if (stack == '用电量') {
stack = t('messages.powerTip')
}
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
@ -460,10 +465,10 @@ const changeecharts = (option: any, value: any) => {
datavalue = accAdd(datavalue, series[i].data[params.dataIndex]);
}
}
if(stack=='生产额'){
stack=t('messages.Production')
}else if(stack=='用电量'){
stack=t('messages.powerTip')
if (stack == '生产额') {
stack = t('messages.Production')
} else if (stack == '用电量') {
stack = t('messages.powerTip')
}
return datavalue ? stack + ":" + datavalue.toLocaleString() : null;
@ -474,10 +479,10 @@ const changeecharts = (option: any, value: any) => {
function setchartWH(width: any, height: any) {
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";
powerjixie.value.style.height = height/20*15 + "px";
powerjixie.value.style.height = height / 20 * 15 + "px";
powerjixie.value.style.width = width + "px";
refborder4.value.resetWH();
if (echartsData.power.box) {
@ -485,7 +490,7 @@ function setchartWH(width: any, height: any) {
echartsData2.power.box.resize();
}
}
onMounted(() => {});
onMounted(() => { });
// return{setchartWH}
defineExpose({

View File

@ -12,7 +12,7 @@
<el-row>
<el-col :span="24">
<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
ref="yields"
@ -163,11 +163,7 @@ const powerBox = (width: any, height: any) => {
yields.value.setchartWH(a.oWidth + 120, a.oHeight * 2 - 20);
ratio.value.setchartWH(a.oWidth - 120, a.oHeight * 5);
};
const clickPowerChart = () => {
router.push({
path: "/energyConsume/historyData",
});
};
async function getpower() {
let result: any = await getPowerData({ time: 1 });