Compare commits

..

No commits in common. "ba1dd639786697db0d57dc0745510d3220d16999" and "e9ea23aa15c3f0fad297170329c8d16929a7302b" have entirely different histories.

2 changed files with 26 additions and 22 deletions

View File

@ -9,7 +9,11 @@ import lighting from '@/views/lighting/index.vue' //照明
import carbonEmission from '@/views/carbonEmission/index.vue' // import carbonEmission from '@/views/carbonEmission/index.vue' //
import screen from '@/views/screen/index.vue' // import screen from '@/views/screen/index.vue' //
<<<<<<< HEAD
=======
import energyMonitoring from '@/views/energyMonitoring/index.vue' import energyMonitoring from '@/views/energyMonitoring/index.vue'
>>>>>>> af48436e2178f27ff7772684e807f1fea9516ede
const nowDate = ref('') const nowDate = ref('')
const nowWeek = ref('') const nowWeek = ref('')
const nowMin = ref('') const nowMin = ref('')
@ -26,7 +30,11 @@ timer.value = setInterval(()=>{
},1000) },1000)
const menuList = ref([ const menuList = ref([
{name:shallowRef(overview),default:'../../assets/images/menu/overview.png',select:'../../assets/images/menu/overview-select.png'}, {name:shallowRef(overview),default:'../../assets/images/menu/overview.png',select:'../../assets/images/menu/overview-select.png'},
<<<<<<< HEAD
{ //name:shallowRef(energyMonitoring),
=======
{name:shallowRef(energyMonitoring), {name:shallowRef(energyMonitoring),
>>>>>>> af48436e2178f27ff7772684e807f1fea9516ede
default:'../../assets/images/menu/energy.png',select:'../../assets/images/menu/energy-select.png'}, default:'../../assets/images/menu/energy.png',select:'../../assets/images/menu/energy-select.png'},
{name:shallowRef(energyEfficiency),default:'../../assets/images/menu/energy-efficiency.png',select:'../../assets/images/menu/energy-efficiency-select.png'}, {name:shallowRef(energyEfficiency),default:'../../assets/images/menu/energy-efficiency.png',select:'../../assets/images/menu/energy-efficiency-select.png'},
{name:shallowRef(drainage),default:'../../assets/images/menu/drainage.png',select:'../../assets/images/menu/drainage-select.png'}, {name:shallowRef(drainage),default:'../../assets/images/menu/drainage.png',select:'../../assets/images/menu/drainage-select.png'},

View File

@ -134,17 +134,16 @@ function getDailyElectricityConsumption() {
}, },
buildPath: function (ctx, shape) { buildPath: function (ctx, shape) {
const xAxisPoint = shape.xAxisPoint; const xAxisPoint = shape.xAxisPoint;
const c0 = [shape.x - 10, shape.y]; const c0 = [shape.x, shape.y]; //
const c1 = [shape.x + 10, shape.y]; const c1 = [shape.x - offsetX, shape.y - offsetY + 5]; //
const c2 = [xAxisPoint[0] + 10, xAxisPoint[1]]; const c2 = [xAxisPoint[0] - offsetX, xAxisPoint[1] - offsetY + 5]; //
const c3 = [xAxisPoint[0] - 10, xAxisPoint[1]]; const c3 = [xAxisPoint[0], xAxisPoint[1] + 5]; //
ctx ctx
.moveTo(c0[0], c0[1]) .moveTo(c0[0], c0[1])
.lineTo(c1[0], c1[1]) .lineTo(c1[0], c1[1])
.lineTo(c2[0], c2[1]) .lineTo(c2[0], c2[1])
.lineTo(c3[0], c3[1]) .lineTo(c3[0], c3[1])
.closePath(); .closePath();
ctx.stroke();
}, },
}); });
// //
@ -155,17 +154,16 @@ function getDailyElectricityConsumption() {
}, },
buildPath: function (ctx, shape) { buildPath: function (ctx, shape) {
const xAxisPoint = shape.xAxisPoint; const xAxisPoint = shape.xAxisPoint;
const c1 = [shape.x + 9, shape.y]; const c1 = [shape.x, shape.y]; //
const c2 = [xAxisPoint[0] + 9, xAxisPoint[1]]; const c2 = [xAxisPoint[0], xAxisPoint[1] + 5]; //
const c3 = [xAxisPoint[0] + 9 + 8, xAxisPoint[1] - 10]; const c3 = [xAxisPoint[0] + offsetX, xAxisPoint[1] - offsetY + 5]; //
const c4 = [shape.x + 7 + 8, shape.y - 5]; const c4 = [shape.x + offsetX, shape.y - offsetY + 5]; //
ctx ctx
.moveTo(c1[0], c1[1]) .moveTo(c1[0], c1[1])
.lineTo(c2[0], c2[1]) .lineTo(c2[0], c2[1])
.lineTo(c3[0], c3[1]) .lineTo(c3[0], c3[1])
.lineTo(c4[0], c4[1]) .lineTo(c4[0], c4[1])
.closePath(); .closePath();
ctx.stroke();
}, },
}); });
// //
@ -175,17 +173,16 @@ function getDailyElectricityConsumption() {
y: 0, y: 0,
}, },
buildPath: function (ctx, shape) { buildPath: function (ctx, shape) {
const c1 = [shape.x - 10, shape.y]; const c1 = [shape.x, shape.y + 5]; //
const c2 = [shape.x + 10, shape.y]; const c2 = [shape.x + offsetX, shape.y - offsetY + 5]; //
const c3 = [shape.x + 15, shape.y - 5]; const c3 = [shape.x, shape.y - offsetX + 5]; //
const c4 = [shape.x - 5, shape.y - 5]; const c4 = [shape.x - offsetX, shape.y - offsetY + 5]; //
ctx ctx
.moveTo(c1[0], c1[1]) .moveTo(c1[0], c1[1])
.lineTo(c2[0], c2[1]) .lineTo(c2[0], c2[1])
.lineTo(c3[0], c3[1]) .lineTo(c3[0], c3[1])
.lineTo(c4[0], c4[1]) .lineTo(c4[0], c4[1])
.closePath(); .closePath();
ctx.stroke();
}, },
}); });
// //
@ -209,9 +206,9 @@ function getDailyElectricityConsumption() {
// let colorArr = [["#12D5AF"], ["#0BC19D", "rgba(13,8,16,0)"], ["#68EFD4", "rgba(14,185,151,0)"]] // let colorArr = [["#12D5AF"], ["#0BC19D", "rgba(13,8,16,0)"], ["#68EFD4", "rgba(14,185,151,0)"]]
// //
let colorArr = [ let colorArr = [
["rgba(0, 170, 193, 1)"], ["#71ddff"],
["rgba(0, 224, 255, 1)", "rgba(13,8,16,0)"], ["rgba(12, 149, 198, 1)", "rgba(13,8,16,0)"],
["rgba(0, 224, 255, 1)", "rgba(14,156,185,0)"], ["rgba(34, 188, 255, 1)", "rgba(14,156,185,0)"],
]; ];
let myChart = echarts.init( let myChart = echarts.init(
document.getElementById("dailyElectricityConsumption") document.getElementById("dailyElectricityConsumption")
@ -274,8 +271,7 @@ function getDailyElectricityConsumption() {
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
type: "dashed", color: "rgba(255,255,255,0.16)",
color: "rgba(1, 39, 37, 0.30)",
}, },
}, },
// y线 // y线
@ -377,7 +373,7 @@ function getDailyElectricityConsumption() {
type: "bar", type: "bar",
label: { label: {
normal: { normal: {
show: false, show: true,
position: "top", position: "top",
formatter: (e) => { formatter: (e) => {
return e.value; return e.value;
@ -402,7 +398,7 @@ onMounted(() => {
// //
getRealTimeLoad(); getRealTimeLoad();
// //
getDailyElectricityConsumption(); getDailyElectricityConsumption()
}); });
</script> </script>