|
@@ -55,15 +55,16 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="echartsList">
|
|
<div class="echartsList">
|
|
|
- <div>
|
|
|
|
|
|
|
+ <div v-for="(item, index) in deviceList">
|
|
|
|
|
+ <div class="space" v-if="index % 2 === 1"></div>
|
|
|
<div class="echarts_title"
|
|
<div class="echarts_title"
|
|
|
- >混合料设备总台数<span> {{ totalData.mixedDeviceNum }} </span
|
|
|
|
|
- >台</div
|
|
|
|
|
|
|
+ >{{ item.categoryName
|
|
|
|
|
+ }}<span> {{ item.totalCount }} </span>台</div
|
|
|
>
|
|
>
|
|
|
- <div class="echarts_box" ref="pie3d_3"></div>
|
|
|
|
|
- <div class="space"></div>
|
|
|
|
|
|
|
+ <div class="echarts_box" :ref="'pie3d_' + index"></div>
|
|
|
|
|
+ <div class="space" v-if="index % 2 === 0"></div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div>
|
|
|
|
|
|
|
+ <!-- <div>
|
|
|
<div class="space"></div>
|
|
<div class="space"></div>
|
|
|
<div class="echarts_title"
|
|
<div class="echarts_title"
|
|
|
>成型设备总台数<span> {{ totalData.moldingDeviceNum }} </span
|
|
>成型设备总台数<span> {{ totalData.moldingDeviceNum }} </span
|
|
@@ -94,7 +95,7 @@
|
|
|
>台</div
|
|
>台</div
|
|
|
>
|
|
>
|
|
|
<div class="echarts_box" ref="pie3d_2"></div>
|
|
<div class="echarts_box" ref="pie3d_2"></div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="table_bar">
|
|
<div class="table_bar">
|
|
@@ -120,7 +121,11 @@
|
|
|
import dvBorderContent from './dv-border-content.vue';
|
|
import dvBorderContent from './dv-border-content.vue';
|
|
|
import * as echarts from 'echarts';
|
|
import * as echarts from 'echarts';
|
|
|
import { component } from 'vue-fullscreen';
|
|
import { component } from 'vue-fullscreen';
|
|
|
- import { getRepairWorkList, statisticsDeviceStatus } from '@/api/equipment';
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ getRepairWorkList,
|
|
|
|
|
+ statisticsDeviceStatus,
|
|
|
|
|
+ getProductionDeviceCategoryStats
|
|
|
|
|
+ } from '@/api/equipment';
|
|
|
export default {
|
|
export default {
|
|
|
name: 'index',
|
|
name: 'index',
|
|
|
components: {
|
|
components: {
|
|
@@ -174,7 +179,7 @@
|
|
|
this.initData(true);
|
|
this.initData(true);
|
|
|
// statisticsDeviceStatus().then((data) => {
|
|
// statisticsDeviceStatus().then((data) => {
|
|
|
// console.log(data);
|
|
// console.log(data);
|
|
|
- // this.totalData = data;
|
|
|
|
|
|
|
+ // this.totalData = data;
|
|
|
// this.initCircle(
|
|
// this.initCircle(
|
|
|
// this.$refs.pie3d_1,
|
|
// this.$refs.pie3d_1,
|
|
|
// data.deepAddingDeviceNum,
|
|
// data.deepAddingDeviceNum,
|
|
@@ -296,6 +301,7 @@
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ deviceList: [],
|
|
|
timer: null,
|
|
timer: null,
|
|
|
totalData: {
|
|
totalData: {
|
|
|
repairNum: ''
|
|
repairNum: ''
|
|
@@ -393,39 +399,51 @@
|
|
|
initData(isLoad) {
|
|
initData(isLoad) {
|
|
|
// 改变图表台数
|
|
// 改变图表台数
|
|
|
statisticsDeviceStatus().then((data) => {
|
|
statisticsDeviceStatus().then((data) => {
|
|
|
- console.log(this.totalData.repairNum);
|
|
|
|
|
- console.log(data.repairNum);
|
|
|
|
|
|
|
+ // console.log(this.totalData.repairNum);
|
|
|
|
|
+ // console.log(data.repairNum);
|
|
|
this.totalData = data;
|
|
this.totalData = data;
|
|
|
- this.initCircle(
|
|
|
|
|
- this.$refs.pie3d_1,
|
|
|
|
|
- data.deepAddingDeviceNum,
|
|
|
|
|
- data.deepAddingDeviceNum1
|
|
|
|
|
- );
|
|
|
|
|
- this.initCircle(
|
|
|
|
|
- this.$refs.pie3d_2,
|
|
|
|
|
- data.inspectionDeviceNum,
|
|
|
|
|
- data.inspectionDeviceNum1
|
|
|
|
|
- );
|
|
|
|
|
- this.initCircle(
|
|
|
|
|
- this.$refs.pie3d_3,
|
|
|
|
|
- data.mixedDeviceNum,
|
|
|
|
|
- data.mixedDeviceNum1
|
|
|
|
|
- );
|
|
|
|
|
- this.initCircle(
|
|
|
|
|
- this.$refs.pie3d_4,
|
|
|
|
|
- data.moldingDeviceNum,
|
|
|
|
|
- data.moldingDeviceNum1
|
|
|
|
|
- );
|
|
|
|
|
- this.initCircle(
|
|
|
|
|
- this.$refs.pie3d_5,
|
|
|
|
|
- data.sinteringDeviceNum,
|
|
|
|
|
- data.sinteringDeviceNum1
|
|
|
|
|
- );
|
|
|
|
|
- // 改变滚动列表数据
|
|
|
|
|
|
|
+ // this.initCircle(
|
|
|
|
|
+ // this.$refs.pie3d_1,
|
|
|
|
|
+ // data.deepAddingDeviceNum,
|
|
|
|
|
+ // data.deepAddingDeviceNum1
|
|
|
|
|
+ // );
|
|
|
|
|
+ // this.initCircle(
|
|
|
|
|
+ // this.$refs.pie3d_2,
|
|
|
|
|
+ // data.inspectionDeviceNum,
|
|
|
|
|
+ // data.inspectionDeviceNum1
|
|
|
|
|
+ // );
|
|
|
|
|
+ // this.initCircle(
|
|
|
|
|
+ // this.$refs.pie3d_3,
|
|
|
|
|
+ // data.mixedDeviceNum,
|
|
|
|
|
+ // data.mixedDeviceNum1
|
|
|
|
|
+ // );
|
|
|
|
|
+ // this.initCircle(
|
|
|
|
|
+ // this.$refs.pie3d_4,
|
|
|
|
|
+ // data.moldingDeviceNum,
|
|
|
|
|
+ // data.moldingDeviceNum1
|
|
|
|
|
+ // );
|
|
|
|
|
+ // this.initCircle(
|
|
|
|
|
+ // this.$refs.pie3d_5,
|
|
|
|
|
+ // data.sinteringDeviceNum,
|
|
|
|
|
+ // data.sinteringDeviceNum1
|
|
|
|
|
+ // );
|
|
|
|
|
+ // // 改变滚动列表数据
|
|
|
this.getSalesFinishList();
|
|
this.getSalesFinishList();
|
|
|
});
|
|
});
|
|
|
|
|
+ getProductionDeviceCategoryStats().then((res) => {
|
|
|
|
|
+ this.deviceList = res;
|
|
|
|
|
+ this.$nextTick(() => {
|
|
|
|
|
+ this.deviceList.forEach((item, index) => {
|
|
|
|
|
+ this.initCircle(
|
|
|
|
|
+ this.$refs['pie3d_' + index][0],
|
|
|
|
|
+ item.totalCount,
|
|
|
|
|
+ item.repairCount
|
|
|
|
|
+ );
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
- initCircle(ref, total, repairNum) {
|
|
|
|
|
|
|
+ initCircle(ref, total, repairCount) {
|
|
|
let rightChart2 = echarts.init(ref);
|
|
let rightChart2 = echarts.init(ref);
|
|
|
let option = {
|
|
let option = {
|
|
|
legend: {
|
|
legend: {
|
|
@@ -491,11 +509,11 @@
|
|
|
},
|
|
},
|
|
|
data: [
|
|
data: [
|
|
|
{
|
|
{
|
|
|
- value: total - repairNum,
|
|
|
|
|
|
|
+ value: total - repairCount,
|
|
|
name: '运行数量'
|
|
name: '运行数量'
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
- value: repairNum,
|
|
|
|
|
|
|
+ value: repairCount,
|
|
|
name: '维修数量'
|
|
name: '维修数量'
|
|
|
}
|
|
}
|
|
|
],
|
|
],
|