|
|
|
|
@ -8,37 +8,37 @@
|
|
|
|
|
<div class="energy">
|
|
|
|
|
<div class="text-div">
|
|
|
|
|
<h5 class="pt-32px text-20px font-bold">
|
|
|
|
|
<count-to :start-value="0" :end-value="5310" />
|
|
|
|
|
<count-to :start-value="0" :end-value="yearElectricQuantity.length && yearElectricQuantity[0].electricQuantity" />
|
|
|
|
|
kwh
|
|
|
|
|
</h5>
|
|
|
|
|
<p class="text-#aaa">点焊车间能耗</p>
|
|
|
|
|
<p class="text-#aaa">{{yearElectricQuantity.length && yearElectricQuantity[0].workshopType}}能耗</p>
|
|
|
|
|
<h5 class="pt-32px text-20px font-bold">
|
|
|
|
|
<count-to :start-value="0" :end-value="3327" />
|
|
|
|
|
<count-to :start-value="0" :end-value="yearElectricQuantity.length && yearElectricQuantity[2].electricQuantity" />
|
|
|
|
|
kwh
|
|
|
|
|
</h5>
|
|
|
|
|
<p class="text-#aaa">CNC车间能耗</p>
|
|
|
|
|
<h5 class="pt-32px text-20px font-bold">
|
|
|
|
|
<count-to :start-value="0" :end-value="1021" />
|
|
|
|
|
kwh
|
|
|
|
|
</h5>
|
|
|
|
|
<p class="text-#aaa">滚筒车间能耗</p>
|
|
|
|
|
<p class="text-#aaa">{{yearElectricQuantity.length && yearElectricQuantity[2].workshopType}}能耗</p>
|
|
|
|
|
<!-- <h5 class="pt-32px text-20px font-bold">-->
|
|
|
|
|
<!-- <count-to :start-value="0" :end-value="1021" />-->
|
|
|
|
|
<!-- kwh-->
|
|
|
|
|
<!-- </h5>-->
|
|
|
|
|
<!-- <p class="text-#aaa">滚筒车间能耗</p>-->
|
|
|
|
|
</div>
|
|
|
|
|
<div class="text-div">
|
|
|
|
|
<h5 class="pt-32px text-20px font-bold">
|
|
|
|
|
<count-to :start-value="0" :end-value="945" />
|
|
|
|
|
<count-to :start-value="0" :end-value="yearElectricQuantity.length && yearElectricQuantity[1].electricQuantity" />
|
|
|
|
|
kwh
|
|
|
|
|
</h5>
|
|
|
|
|
<p class="text-#aaa">钉胶车间能耗</p>
|
|
|
|
|
<p class="text-#aaa">{{yearElectricQuantity.length && yearElectricQuantity[1].workshopType}}能耗</p>
|
|
|
|
|
<h5 class="pt-32px text-20px font-bold">
|
|
|
|
|
<count-to :start-value="0" :end-value="3921" />
|
|
|
|
|
<count-to :start-value="0" :end-value="yearElectricQuantity.length && yearElectricQuantity[3].electricQuantity" />
|
|
|
|
|
kwh
|
|
|
|
|
</h5>
|
|
|
|
|
<p class="text-#aaa">抛光车间能耗</p>
|
|
|
|
|
<h5 class="pt-32px text-20px font-bold">
|
|
|
|
|
<count-to :start-value="0" :end-value="1607" />
|
|
|
|
|
kwh
|
|
|
|
|
</h5>
|
|
|
|
|
<p class="text-#aaa">割片车间能耗</p>
|
|
|
|
|
<p class="text-#aaa">{{yearElectricQuantity.length && yearElectricQuantity[3].workshopType}}能耗</p>
|
|
|
|
|
<!-- <h5 class="pt-32px text-20px font-bold">-->
|
|
|
|
|
<!-- <count-to :start-value="0" :end-value="1607" />-->
|
|
|
|
|
<!-- kwh-->
|
|
|
|
|
<!-- </h5>-->
|
|
|
|
|
<!-- <p class="text-#aaa">割片车间能耗</p>-->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <n-button class="mt-24px whitespace-pre-wrap" type="primary">Last Month Summary</n-button> -->
|
|
|
|
|
@ -63,11 +63,16 @@ import { ref, onMounted } from 'vue';
|
|
|
|
|
import type { Ref } from 'vue';
|
|
|
|
|
// eslint-disable-next-line import/no-unresolved
|
|
|
|
|
import { type ECOption, useEcharts } from '@/composables';
|
|
|
|
|
import {
|
|
|
|
|
getEcmElectricityIndex,
|
|
|
|
|
} from '@/service/api/board/kanBan';
|
|
|
|
|
|
|
|
|
|
defineOptions({ name: 'DashboardAnalysisTopCard' });
|
|
|
|
|
|
|
|
|
|
const myData = ref<any[]>(['fda']);
|
|
|
|
|
const yearElectricQuantity = ref<any[]>([]);
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getData();
|
|
|
|
|
// eslint-disable-next-line no-plusplus
|
|
|
|
|
for (let i = 0; i < 1000; i++) {
|
|
|
|
|
myData.value.push(i);
|
|
|
|
|
@ -76,6 +81,18 @@ onMounted(() => {
|
|
|
|
|
// myData.value.push('321');
|
|
|
|
|
// }, 1000);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
function getData() {
|
|
|
|
|
getEcmElectricityIndex().then(res => {
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
console.log(res.data);
|
|
|
|
|
res.data.yearElectricQuantity.forEach((item: any) => {
|
|
|
|
|
item.electricQuantity = item.electricQuantity / 1000;
|
|
|
|
|
});
|
|
|
|
|
yearElectricQuantity.value = res.data.yearElectricQuantity;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
const lineOptions = ref<ECOption>({
|
|
|
|
|
tooltip: {
|
|
|
|
|
trigger: 'axis',
|
|
|
|
|
|