|
@@ -171,35 +171,36 @@
|
|
|
this.isFlag = true;
|
|
this.isFlag = true;
|
|
|
|
|
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- statisticsDeviceStatus().then((data) => {
|
|
|
|
|
- console.log(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.initData(true);
|
|
|
|
|
+ // statisticsDeviceStatus().then((data) => {
|
|
|
|
|
+ // console.log(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.initChartR2();
|
|
// this.initChartR2();
|
|
|
// let chartDom = this.$refs.monthly_sales_volume;
|
|
// let chartDom = this.$refs.monthly_sales_volume;
|
|
|
// this.salesChart = echarts.init(chartDom);
|
|
// this.salesChart = echarts.init(chartDom);
|
|
@@ -247,35 +248,36 @@
|
|
|
: '16px';
|
|
: '16px';
|
|
|
this.isFlag = true;
|
|
this.isFlag = true;
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
- statisticsDeviceStatus().then((data) => {
|
|
|
|
|
- console.log(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.initData(true);
|
|
|
|
|
+ // statisticsDeviceStatus().then((data) => {
|
|
|
|
|
+ // console.log(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.initChartR2();
|
|
// this.initChartR2();
|
|
|
// let chartDom = this.$refs.monthly_sales_volume;
|
|
// let chartDom = this.$refs.monthly_sales_volume;
|
|
|
// this.salesChart = echarts.init(chartDom);
|
|
// this.salesChart = echarts.init(chartDom);
|
|
@@ -294,7 +296,10 @@
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- totalData: {},
|
|
|
|
|
|
|
+ timer: null,
|
|
|
|
|
+ totalData: {
|
|
|
|
|
+ repairNum: ''
|
|
|
|
|
+ },
|
|
|
isFullscreen: false, // 是否是全屏
|
|
isFullscreen: false, // 是否是全屏
|
|
|
isFlag: false, // 是否展示图表
|
|
isFlag: false, // 是否展示图表
|
|
|
date: '',
|
|
date: '',
|
|
@@ -320,6 +325,7 @@
|
|
|
'固资编码',
|
|
'固资编码',
|
|
|
'编号',
|
|
'编号',
|
|
|
'执行人',
|
|
'执行人',
|
|
|
|
|
+ '故障持续时间',
|
|
|
'状态',
|
|
'状态',
|
|
|
'故障描述'
|
|
'故障描述'
|
|
|
],
|
|
],
|
|
@@ -372,47 +378,53 @@
|
|
|
this.updateTimer = setInterval(this.updateTime, 1000);
|
|
this.updateTimer = setInterval(this.updateTime, 1000);
|
|
|
},
|
|
},
|
|
|
mounted() {
|
|
mounted() {
|
|
|
- this.getSalesFinishList();
|
|
|
|
|
- setInterval(() => {
|
|
|
|
|
- this.getSalesFinishList();
|
|
|
|
|
- }, 3600000);
|
|
|
|
|
-
|
|
|
|
|
- // this.init(this.$refs.pie3d_1);
|
|
|
|
|
- // this.init(this.$refs.pie3d_2);
|
|
|
|
|
- // this.init(this.$refs.pie3d_3);
|
|
|
|
|
- // this.init(this.$refs.pie3d_4);
|
|
|
|
|
- // this.init(this.$refs.pie3d_5);
|
|
|
|
|
- statisticsDeviceStatus().then((data) => {
|
|
|
|
|
- console.log(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
|
|
|
|
|
- );
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ this.initData();
|
|
|
|
|
+ this.timer = setInterval(() => {
|
|
|
|
|
+ this.initData(false);
|
|
|
|
|
+ }, 60000);
|
|
|
|
|
+ }, 0);
|
|
|
|
|
+ },
|
|
|
|
|
+ beforeDestroy() {
|
|
|
|
|
+ console.log('beforeDestroy---------------');
|
|
|
|
|
+ clearInterval(this.timer);
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ initData(isLoad) {
|
|
|
|
|
+ // 改变图表台数
|
|
|
|
|
+ statisticsDeviceStatus().then((data) => {
|
|
|
|
|
+ console.log(this.totalData.repairNum);
|
|
|
|
|
+ console.log(data.repairNum);
|
|
|
|
|
+ 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.getSalesFinishList();
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
initCircle(ref, total, repairNum) {
|
|
initCircle(ref, total, repairNum) {
|
|
|
let rightChart2 = echarts.init(ref);
|
|
let rightChart2 = echarts.init(ref);
|
|
|
let option = {
|
|
let option = {
|
|
@@ -1263,33 +1275,45 @@ scheduleStatus 排产状态 1待排产2已排产 integer(int32)*/
|
|
|
}
|
|
}
|
|
|
if (i === 'substance') {
|
|
if (i === 'substance') {
|
|
|
list[2] = `<div class="white" style="font-size: 1.3rem;">${item[i].fixCode}</div>`;
|
|
list[2] = `<div class="white" style="font-size: 1.3rem;">${item[i].fixCode}</div>`;
|
|
|
- list[3] = `<div class="white" style="font-size: 1.3rem;">${item[i].codeNumber}</div>`;
|
|
|
|
|
|
|
+ list[3] = `<div class="white" style="font-size: 1.3rem;">${
|
|
|
|
|
+ item[i].extInfo?.codeNumber
|
|
|
|
|
+ ? item[i].extInfo.codeNumber
|
|
|
|
|
+ : ''
|
|
|
|
|
+ }</div>`;
|
|
|
}
|
|
}
|
|
|
if (i === 'executeUserName') {
|
|
if (i === 'executeUserName') {
|
|
|
div = `<div class="white" style="font-size: 1.3rem;">${item[i]}</div>`;
|
|
div = `<div class="white" style="font-size: 1.3rem;">${item[i]}</div>`;
|
|
|
list[4] = div;
|
|
list[4] = div;
|
|
|
}
|
|
}
|
|
|
|
|
+ if (i === 'createTime') {
|
|
|
|
|
+ let hours = (
|
|
|
|
|
+ (new Date().getTime() - new Date(item[i]).getTime()) /
|
|
|
|
|
+ 3600000
|
|
|
|
|
+ ).toFixed(2);
|
|
|
|
|
+ div = `<div class="white" style="font-size: 1.3rem;">${hours}小时</div>`;
|
|
|
|
|
+ list[5] = div;
|
|
|
|
|
+ }
|
|
|
if (i === 'orderStatus') {
|
|
if (i === 'orderStatus') {
|
|
|
if (item[i] > -1) {
|
|
if (item[i] > -1) {
|
|
|
div = `<div class="white" style="font-size: 1.3rem;">${
|
|
div = `<div class="white" style="font-size: 1.3rem;">${
|
|
|
this.orderStatusOptions[item[i]]
|
|
this.orderStatusOptions[item[i]]
|
|
|
}</div>`;
|
|
}</div>`;
|
|
|
- list[5] = div;
|
|
|
|
|
|
|
+ list[6] = div;
|
|
|
} else {
|
|
} else {
|
|
|
div = `<div class="white" style="font-size: 1.3rem;"></div>`;
|
|
div = `<div class="white" style="font-size: 1.3rem;"></div>`;
|
|
|
- list[5] = div;
|
|
|
|
|
|
|
+ list[6] = div;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (i === 'remark') {
|
|
if (i === 'remark') {
|
|
|
- div = `<div class="white" style="font-size: 1.3rem;">${item[i]}</div>`;
|
|
|
|
|
- list[6] = div;
|
|
|
|
|
|
|
+ div = `<div class="white" style="font-size: 1.3rem;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title='${item[i]}''>${item[i]}</div>`;
|
|
|
|
|
+ list[7] = div;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return list;
|
|
return list;
|
|
|
}) ?? [],
|
|
}) ?? [],
|
|
|
align: ['center', 'center', 'center', 'center', 'center', 'center'],
|
|
align: ['center', 'center', 'center', 'center', 'center', 'center'],
|
|
|
headerBGC: '#031d42',
|
|
headerBGC: '#031d42',
|
|
|
- columnWidth: [140, 250, 130, 200, 100, 150],
|
|
|
|
|
|
|
+ columnWidth: [140, 250, 130, 200, 100, 150, 100],
|
|
|
headerHeight: 30,
|
|
headerHeight: 30,
|
|
|
oddRowBGC: '#031d42',
|
|
oddRowBGC: '#031d42',
|
|
|
evenRowBGC: '#031d42',
|
|
evenRowBGC: '#031d42',
|