Compare commits
9 Commits
067cd4765e
...
bf4bab2f3c
Author | SHA1 | Date | |
---|---|---|---|
bf4bab2f3c | |||
6a491ff498 | |||
|
be607e4bf3 | ||
|
87ef42e277 | ||
aa65a7e97e | |||
|
b8d26c87d8 | ||
b89f510e61 | |||
|
0e60f426bc | ||
|
21f4879394 |
7
.env.dev
7
.env.dev
@ -1,8 +1,8 @@
|
|||||||
###
|
###
|
||||||
# @Author: zhp
|
# @Author: zhp
|
||||||
# @Date: 2024-04-12 14:30:48
|
# @Date: 2024-04-12 14:30:48
|
||||||
# @LastEditTime: 2024-04-23 17:25:25
|
# @LastEditTime: 2024-04-25 10:07:02
|
||||||
# @LastEditors: DY
|
# @LastEditors: zhp
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
@ -13,8 +13,7 @@ VUE_APP_TITLE = MES系统
|
|||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
|
||||||
# VUE_APP_BASE_API = 'http://xcac.mes.picaiba.com/'
|
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
|
||||||
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
|
|
||||||
# 积木报表指向地址
|
# 积木报表指向地址
|
||||||
VUE_APP_JIMU_API = 'http://192.168.1.101:48082'
|
VUE_APP_JIMU_API = 'http://192.168.1.101:48082'
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-29 16:50:26
|
* @Date: 2024-01-29 16:50:26
|
||||||
* @LastEditTime: 2024-04-22 09:42:45
|
* @LastEditTime: 2024-04-25 09:03:50
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -628,7 +628,7 @@ export default {
|
|||||||
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.productArea) + '㎡' || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.productArea) + '㎡' || ''}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.wasteArea) + '㎡' || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.5)">${this.NumFormat(item.wasteArea) + '㎡' || ''}</span>`,
|
||||||
`<div style = "${(item.product * 100).toFixed(0) >= 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>
|
`<div style = "${(item.product * 100).toFixed(0) >= 91 ? 'display:block;color:#00FFF7' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>
|
||||||
<div style = "${(item.product * 100).toFixed(0) <= 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(0) + '%' || ''}</div>`
|
<div style = "${(item.product * 100).toFixed(0) <= 91 ? 'display:block; color:rgba(255, 209, 96, 1)' : 'display:none;'}">${(item.product * 100).toFixed(2) + '%' || ''}</div>`
|
||||||
])
|
])
|
||||||
this.cutConfig.data = cutArr
|
this.cutConfig.data = cutArr
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-29 13:45:56
|
* @Date: 2024-01-29 13:45:56
|
||||||
* @LastEditTime: 2024-04-17 15:48:21
|
* @LastEditTime: 2024-04-24 15:48:32
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -113,7 +113,7 @@ export default {
|
|||||||
color:this.colors,
|
color:this.colors,
|
||||||
title:{
|
title:{
|
||||||
text: num,
|
text: num,
|
||||||
subtext: '总数/片',
|
subtext: '总数/个',
|
||||||
top: '32%',
|
top: '32%',
|
||||||
left: '49%',
|
left: '49%',
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-07-19 15:18:30
|
* @Date: 2021-07-19 15:18:30
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-04-24 14:48:00
|
* @LastEditTime: 2024-04-25 09:02:38
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -42,21 +42,26 @@
|
|||||||
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
|
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
|
||||||
<!-- <el-col :span="12"> -->
|
<!-- <el-col :span="12"> -->
|
||||||
<!-- <div style="height: 34px;"> -->
|
<!-- <div style="height: 34px;"> -->
|
||||||
<span style="display: inline-block;width: 330px;">
|
<span style="display: inline-block;width: 400px;height: 10px;">
|
||||||
<span class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</span>
|
<span class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</span>
|
||||||
<el-divider class="split" v-if="op.specifications" direction="vertical"></el-divider>
|
<el-divider class="split" v-if="op.name" direction="vertical"></el-divider>
|
||||||
<!-- <span v-if="op.size" class="split"></span> -->
|
<!-- <span v-if="op.size" class="split"></span> -->
|
||||||
<span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{
|
<span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{
|
||||||
op.specifications }}</span>
|
op.specifications }}</span>
|
||||||
<el-divider class="split" v-if="op.planQuantity" direction="vertical"></el-divider>
|
<el-divider class="split" v-if="op.specifications" direction="vertical"></el-divider>
|
||||||
<span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
|
<span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
|
||||||
op.planQuantity }}</span>
|
op.planQuantity }}</span>
|
||||||
|
<span v-if="op.planQuantity" class="orderFinishTwo"
|
||||||
|
style="font-size: 14px;opacity: calc(.6);">片</span>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="op.actualQuantity" class="orderFinish" style="font-size: 14px;margin-left: 130px;">{{
|
<!-- <span style="overflow: hidden;"> -->
|
||||||
|
<span v-if="op.actualQuantity" class="orderFinish" style="font-size: 14px;margin-left: 40px;">{{
|
||||||
op.actualQuantity
|
op.actualQuantity
|
||||||
}}</span>
|
}}</span>
|
||||||
|
<span v-if="op.actualQuantity" class="orderFinishTwo" style="font-size: 14px">片</span>
|
||||||
<el-divider class="split" style="background-color: rgba(0, 255, 247, 1)" v-if="op.actualQuantity"
|
<el-divider class="split" style="background-color: rgba(0, 255, 247, 1)" v-if="op.actualQuantity"
|
||||||
direction="vertical"></el-divider>
|
direction="vertical"></el-divider>
|
||||||
|
<!-- </span> -->
|
||||||
<!-- </div> -->
|
<!-- </div> -->
|
||||||
<el-progress style="width: 620px;" text-color="rgba(0, 255, 247, 1)" :stroke-width="10"
|
<el-progress style="width: 620px;" text-color="rgba(0, 255, 247, 1)" :stroke-width="10"
|
||||||
define-back-color="rgba(32, 57, 96, 1)" :percentage="op.progressRate" class="custom-progress-bar" />
|
define-back-color="rgba(32, 57, 96, 1)" :percentage="op.progressRate" class="custom-progress-bar" />
|
||||||
@ -110,78 +115,79 @@ const qualityYearList = [
|
|||||||
{
|
{
|
||||||
name: '翻转机',
|
name: '翻转机',
|
||||||
code: 'EQ20240110112358000235',
|
code: 'EQ20240110112358000235',
|
||||||
status: '正常',
|
status: '运行',
|
||||||
error: true,
|
error: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '烘干炉',
|
name: '烘干炉',
|
||||||
code: 'EQ20240110112537000241',
|
code: 'EQ20240110112537000241',
|
||||||
status: '计划停机',
|
status: '停机',
|
||||||
error: true,
|
error: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '清洗机',
|
name: '清洗机',
|
||||||
code: ' EQ20240110112310000232',
|
code: ' EQ20240110112310000232',
|
||||||
status: '正常',
|
status: '故障',
|
||||||
error: true,
|
error: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '钢化清洗机',
|
name: '钢化清洗机',
|
||||||
code: 'EQ20240110111700000208',
|
code: 'EQ20240110111700000208',
|
||||||
status: '正常',
|
status: '故障',
|
||||||
error: true,
|
error: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '固化机',
|
name: '固化机',
|
||||||
code: 'EQ20240110111700000201',
|
code: 'EQ20240110111700000201',
|
||||||
status: '正常',
|
status: '停机',
|
||||||
error: false,
|
error: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '磨边清洗机',
|
name: '磨边清洗机',
|
||||||
code: ' EQ20240110111700000208',
|
code: ' EQ20240110111700000208',
|
||||||
status: '正常',
|
status: '停机',
|
||||||
error: true,
|
error: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '预热机',
|
name: '预热机',
|
||||||
code: 'EQ20240110111700000205',
|
code: 'EQ20240110111700000205',
|
||||||
status: '故障',
|
status: '运行',
|
||||||
error: false,
|
error: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '下片机',
|
name: '下片机',
|
||||||
code: 'EQ20240115151435000279',
|
code: 'EQ20240115151435000279',
|
||||||
|
status: '故障',
|
||||||
error: true,
|
error: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '冷却机',
|
name: '冷却机',
|
||||||
code: 'EQ20240110111700000203',
|
code: 'EQ20240110111700000203',
|
||||||
status: '正常',
|
status: '运行',
|
||||||
error: false,
|
error: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'A储片机106',
|
name: 'A储片机106',
|
||||||
code: 'EQ20240110111700000202',
|
code: 'EQ20240110111700000202',
|
||||||
status: '正常',
|
status: '停机',
|
||||||
error: true,
|
error: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '二次清洗机',
|
name: '二次清洗机',
|
||||||
code: 'EQ20240110111700000209',
|
code: 'EQ20240110111700000209',
|
||||||
status: '正常',
|
status: '停机',
|
||||||
error: true,
|
error: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '二次磨边机',
|
name: '二次磨边机',
|
||||||
code: ' EQ20240110110927000181',
|
code: ' EQ20240110110927000181',
|
||||||
status: '正常',
|
status: '停机',
|
||||||
error: false,
|
error: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '测试设备',
|
name: '测试设备',
|
||||||
code: 'EQ20240110111700000201',
|
code: 'EQ20240110111700000201',
|
||||||
status: '正常',
|
status: '运行',
|
||||||
error: true,
|
error: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -292,11 +298,11 @@ export default {
|
|||||||
// equipmentList:[],
|
// equipmentList:[],
|
||||||
EnergyMonitoringList: [],
|
EnergyMonitoringList: [],
|
||||||
eqConfig: {
|
eqConfig: {
|
||||||
header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'],
|
header: ['序号', '设备名称', '产线名', '设备状态'],
|
||||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||||
columnWidth: [70, 100, 200, 90, 90],
|
columnWidth: [70, 130, 240, 120],
|
||||||
align: ['center'],
|
align: ['center'],
|
||||||
data: [],
|
data: [],
|
||||||
// index:true,
|
// index:true,
|
||||||
@ -377,11 +383,11 @@ export default {
|
|||||||
let detData = [
|
let detData = [
|
||||||
{
|
{
|
||||||
id: '1',
|
id: '1',
|
||||||
name: '测试工单',
|
name: '镀釉光伏玻璃GW',
|
||||||
progressRate: 0.933333,
|
progressRate: 0.933333,
|
||||||
specifications: '1100*5554*22',
|
specifications: '1100*5554*22',
|
||||||
plan: 11111,
|
plan: 111111111111,
|
||||||
actualQuantity:111,
|
actualQuantity:10000001111,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: '2',
|
id: '2',
|
||||||
@ -455,9 +461,9 @@ export default {
|
|||||||
id: ele.id,
|
id: ele.id,
|
||||||
name: ele.name,
|
name: ele.name,
|
||||||
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
progressRate: parseFloat((ele.progressRate * 100).toFixed(0)),
|
||||||
specifications: ele.specifications ? '规格' + ele.specifications :null,
|
specifications: ele.specifications ? '规格' + ele.specifications :'',
|
||||||
planQuantity: ele.plan ? '计划' + ele.plan + '片' : null,
|
planQuantity: ele.plan ? '计划' + this.getStr(String(ele.plan)) : '',
|
||||||
actualQuantity: ele.actualQuantity + '片',
|
actualQuantity: ele.actualQuantity ?this.getStr(String(ele.actualQuantity)) : '',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -480,9 +486,8 @@ export default {
|
|||||||
`
|
`
|
||||||
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||||
</span>`,
|
</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.5)">${item.lineName || ''}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '正常' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:13px 10px 0 0 '}"></div> ${item.status || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '}"></div> ${item.error == true ? '是' : '否' || ''}</span>`,
|
|
||||||
]);
|
]);
|
||||||
this.eqConfig.data = eqArr;
|
this.eqConfig.data = eqArr;
|
||||||
let data = [
|
let data = [
|
||||||
@ -561,6 +566,15 @@ export default {
|
|||||||
// removeEventListener('resize', resizeFun)
|
// removeEventListener('resize', resizeFun)
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
|
getStr(str) {
|
||||||
|
//你要处理的字符串
|
||||||
|
if (str.length > 6) { //如果字符长度超过10,后面的字符就变成...可自行调整长度和代替字符
|
||||||
|
str = str.substr(0, 6) + "..." //截取从第一个字符开始,往后取10个字符,剩余的用...代替
|
||||||
|
return str
|
||||||
|
} else {
|
||||||
|
return str
|
||||||
|
}
|
||||||
|
},
|
||||||
getData() {
|
getData() {
|
||||||
let processArr = qualityMonthList.map((item, index) => [
|
let processArr = qualityMonthList.map((item, index) => [
|
||||||
// console.log(item)
|
// console.log(item)
|
||||||
@ -746,10 +760,10 @@ export default {
|
|||||||
`<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
`<span style="color:rgba(255,255,255,0.5)" >${item.name || ''}
|
||||||
</span>`,
|
</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)">${
|
`<span style="color:rgba(255,255,255,0.5)">${
|
||||||
item.code || ''
|
item.lineName || ''
|
||||||
}</span>`,
|
}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '正常' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:10px 10px 0 0 '}"></div> ${item.status || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0' : item.status == '停机' ? 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0'}"></div> ${item.status || ''}</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error == true ?'是' :'否' || ''}</span>`,
|
// `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error == true ?'是' :'否' || ''}</span>`,
|
||||||
]);
|
]);
|
||||||
this.eqConfig.data = eqArr;
|
this.eqConfig.data = eqArr;
|
||||||
// this.$nextTick(() => {
|
// this.$nextTick(() => {
|
||||||
@ -971,7 +985,7 @@ export default {
|
|||||||
|
|
||||||
.now-secondary-title {
|
.now-secondary-title {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 70px;
|
width: 110px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 2em;
|
line-height: 2em;
|
||||||
@ -990,16 +1004,27 @@ export default {
|
|||||||
width: 60px;
|
width: 60px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
text-align: right;
|
||||||
|
color: rgba(0, 255, 247, 1);
|
||||||
|
}
|
||||||
|
.orderFinishTwo{
|
||||||
|
display: inline-block;
|
||||||
|
width: 15px;
|
||||||
|
margin: 0;
|
||||||
|
font-size: 14px;
|
||||||
line-height: 2em;
|
line-height: 2em;
|
||||||
|
// text-overflow: ellipsis;
|
||||||
|
// white-space: nowrap;
|
||||||
|
// overflow: hidden;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
color: rgba(0, 255, 247, 1);
|
color: rgba(0, 255, 247, 1);
|
||||||
}
|
}
|
||||||
.orderPlan {
|
.orderPlan {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 100px;
|
// width: 80px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
line-height: 2em;
|
// line-height: 2em;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
@ -32,11 +32,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
timestr: '',
|
timestr: '',
|
||||||
config: {
|
config: {
|
||||||
header: ['序号', '设备名称', '设备编码', '设备状态', '是否故障'],
|
header: ['序号', '设备名称', '产线名', '设备状态'],
|
||||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
oddRowBGC: 'rgba(32, 55, 96, 0.8)',
|
||||||
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
evenRowBGC: 'rgba(14, 32, 62, 0.8)',
|
||||||
columnWidth: [60, 150, 190],
|
columnWidth: [60, 280, 120],
|
||||||
align: ['center'],
|
align: ['center'],
|
||||||
data: [],
|
data: [],
|
||||||
// data: [
|
// data: [
|
||||||
@ -64,7 +64,7 @@ export default {
|
|||||||
let outArr = this.sjgEquipment.map((item, index) => [
|
let outArr = this.sjgEquipment.map((item, index) => [
|
||||||
index + 1,
|
index + 1,
|
||||||
`<span title=${item.name || ''}>${item.name || ''}</span>`,
|
`<span title=${item.name || ''}>${item.name || ''}</span>`,
|
||||||
`<span title=${item.code || ''}>${item.code || ''}</span>`,
|
`<span title=${item.lineName || ''}>${item.lineName || ''}</span>`,
|
||||||
`<span><div style="${
|
`<span><div style="${
|
||||||
item.status == '运行'
|
item.status == '运行'
|
||||||
? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
|
? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
|
||||||
@ -72,11 +72,11 @@ export default {
|
|||||||
? 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '
|
? 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '
|
||||||
: 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:13px 10px 0 0 '
|
: 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:13px 10px 0 0 '
|
||||||
}"></div> ${item.status || ''}</span>`,
|
}"></div> ${item.status || ''}</span>`,
|
||||||
`<span"><div style="${
|
// `<span"><div style="${
|
||||||
item.error == false
|
// item.error == false
|
||||||
? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
|
// ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
|
||||||
: 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '
|
// : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '
|
||||||
}"></div> ${item.error == true ? '是' : '否' || ''}</span>`,
|
// }"></div> ${item.error == true ? '是' : '否' || ''}</span>`,
|
||||||
]);
|
]);
|
||||||
this.config.data = outArr;
|
this.config.data = outArr;
|
||||||
this.$refs['eqScrollBoard'].updateRows(outArr);
|
this.$refs['eqScrollBoard'].updateRows(outArr);
|
||||||
|
@ -80,7 +80,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</ShadowRect>
|
</ShadowRect>
|
||||||
|
|
||||||
<ShadowRect>
|
<!-- <ShadowRect>
|
||||||
<span
|
<span
|
||||||
style="
|
style="
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
@ -99,7 +99,7 @@
|
|||||||
: ''
|
: ''
|
||||||
}}mg/m³
|
}}mg/m³
|
||||||
</span>
|
</span>
|
||||||
</ShadowRect>
|
</ShadowRect> -->
|
||||||
</div>
|
</div>
|
||||||
<KilnLine :horizontal="true" />
|
<KilnLine :horizontal="true" />
|
||||||
<div
|
<div
|
||||||
@ -130,8 +130,9 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
">
|
">
|
||||||
|
<!-- :options="['氧气含量', '二氧化硫', '氮氧化物', '颗粒物']" -->
|
||||||
<SelectorBtnGroup
|
<SelectorBtnGroup
|
||||||
:options="['氧气含量', '二氧化硫', '氮氧化物', '颗粒物']"
|
:options="['氧气含量', '二氧化硫', '氮氧化物']"
|
||||||
@emitFun="toggleType"
|
@emitFun="toggleType"
|
||||||
:active="chartType" />
|
:active="chartType" />
|
||||||
<SelectorBtnGroup
|
<SelectorBtnGroup
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2024-04-22 15:49:56
|
* @Date: 2024-04-22 15:49:56
|
||||||
* @LastEditTime: 2024-04-25 08:39:13
|
* @LastEditTime: 2024-04-25 09:53:41
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -48,15 +48,18 @@
|
|||||||
:span-method="objectSpanMethod1"
|
:span-method="objectSpanMethod1"
|
||||||
@emitFun="handleEmitFun"
|
@emitFun="handleEmitFun"
|
||||||
:max-height="tableH" />
|
:max-height="tableH" />
|
||||||
<!-- <monthWeek v-if="glassWeekShow" ref="monthWeek" :product="false" :params="listQuery" />
|
<base-table
|
||||||
<proMonth v-if="proWeekShow" ref="proMonth" :product="false" :params="listQuery" /> -->
|
:table-props="tableProps1"
|
||||||
|
:table-data="tableData1"
|
||||||
|
:span-method="objectSpanMethod1"
|
||||||
|
@emitFun="handleEmitFun"
|
||||||
|
:max-height="tableH"
|
||||||
|
style="margin-top: 15px" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import monthWeek from '../glass/month.vue'
|
import { productionMonthY, productionMonthD } from '@/api/report/glass';
|
||||||
// import proMonth from '../productionMonthReport/index.vue'
|
|
||||||
import { productionMonthY } from '@/api/report/glass';
|
|
||||||
import { parseTime } from '../../core/mixins/code-filter';
|
import { parseTime } from '../../core/mixins/code-filter';
|
||||||
import FileSaver from 'file-saver';
|
import FileSaver from 'file-saver';
|
||||||
import * as XLSX from 'xlsx/xlsx.mjs';
|
import * as XLSX from 'xlsx/xlsx.mjs';
|
||||||
@ -67,9 +70,9 @@ export default {
|
|||||||
mixins: [tableHeightMixin],
|
mixins: [tableHeightMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
heightNum: 240,
|
heightNum: 350,
|
||||||
listQuery: {
|
listQuery: {
|
||||||
time: parseTime(new Date()),
|
time: '',
|
||||||
},
|
},
|
||||||
// startTimeStamp: '',
|
// startTimeStamp: '',
|
||||||
// endTimeStamp: '',
|
// endTimeStamp: '',
|
||||||
@ -77,24 +80,22 @@ export default {
|
|||||||
// glassWeekShow: false,
|
// glassWeekShow: false,
|
||||||
// proWeekShow: false,
|
// proWeekShow: false,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
tableProps: [
|
tableProps: [],
|
||||||
{
|
tableData1: [],
|
||||||
prop: 'lineName',
|
tableProps1: [],
|
||||||
label: '',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'paramsName',
|
|
||||||
label: '',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
resData: [],
|
resData: [],
|
||||||
span1: [], //表格1的合并规则
|
span1: [], //表格1的合并规则
|
||||||
|
resData1: [],
|
||||||
|
span2: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.getCurrentMonthFirst()
|
let now = new Date()
|
||||||
// this.glassWeekShow = true
|
now.setHours(0, 0, 0, 0)
|
||||||
// this.proWeekShow = true
|
now.setDate(1)
|
||||||
|
let startOfMonth = now.getTime()
|
||||||
|
let firstDayOfMonth = new Date(startOfMonth)
|
||||||
|
this.listQuery.time = parseTime(firstDayOfMonth)
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -114,6 +115,19 @@ export default {
|
|||||||
fixed: true,
|
fixed: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
this.tableData1 = [];
|
||||||
|
this.tableProps1 = [
|
||||||
|
{
|
||||||
|
prop: 'lineName',
|
||||||
|
label: '',
|
||||||
|
fixed: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'paramsName',
|
||||||
|
label: '',
|
||||||
|
fixed: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
await productionMonthY(this.listQuery).then((res) => {
|
await productionMonthY(this.listQuery).then((res) => {
|
||||||
this.resData = res.data;
|
this.resData = res.data;
|
||||||
// 设置表头
|
// 设置表头
|
||||||
@ -126,6 +140,53 @@ export default {
|
|||||||
});
|
});
|
||||||
this.buildTableData(this.resData);
|
this.buildTableData(this.resData);
|
||||||
});
|
});
|
||||||
|
await productionMonthD(this.listQuery).then((res) => {
|
||||||
|
this.resData1 = res.data;
|
||||||
|
// 设置表头
|
||||||
|
Object.keys(this.resData1).forEach((item) => {
|
||||||
|
this.tableProps1.push({
|
||||||
|
prop: item,
|
||||||
|
label: item,
|
||||||
|
'show-overflow-tooltip': true,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.buildTableData1(this.resData1);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 设置表格2数据
|
||||||
|
buildTableData1(data) {
|
||||||
|
let keys = Object.keys(data);
|
||||||
|
let tempData = [];
|
||||||
|
let subKeys = Object.keys(data[keys[0]]);
|
||||||
|
let sub2Keys = Object.keys(data[keys[0]][subKeys[0]]);
|
||||||
|
for (let i = 0; i < keys.length; i++) {
|
||||||
|
if (i === 0) {
|
||||||
|
for (let j = 0; j < subKeys.length; j++) {
|
||||||
|
for (let k = 0; k < sub2Keys.length; k++) {
|
||||||
|
let obj = {};
|
||||||
|
obj.lineName = subKeys[j];
|
||||||
|
obj.paramsName = sub2Keys[k];
|
||||||
|
obj[keys[0]] = data[keys[0]][subKeys[j]][sub2Keys[k]];
|
||||||
|
tempData.push(obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let j = 0; j < subKeys.length; j++) {
|
||||||
|
for (let k = 0; k < sub2Keys.length; k++) {
|
||||||
|
for (let v = 0; v < tempData.length; v++) {
|
||||||
|
if (
|
||||||
|
tempData[v].lineName === subKeys[j] &&
|
||||||
|
tempData[v].paramsName === sub2Keys[k]
|
||||||
|
) {
|
||||||
|
tempData[v][keys[i]] = data[keys[i]][subKeys[j]][sub2Keys[k]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.tableData1 = tempData;
|
||||||
|
this.getSpanArr1(this.tableData1);
|
||||||
},
|
},
|
||||||
// 设置表格数据
|
// 设置表格数据
|
||||||
buildTableData(data) {
|
buildTableData(data) {
|
||||||
@ -162,6 +223,23 @@ export default {
|
|||||||
this.tableData = tempData;
|
this.tableData = tempData;
|
||||||
this.getSpanArr(this.tableData);
|
this.getSpanArr(this.tableData);
|
||||||
},
|
},
|
||||||
|
getSpanArr1(data) {
|
||||||
|
this.span2 = [];
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
if (i === 0) {
|
||||||
|
this.span2.push(1);
|
||||||
|
this.index1 = 0;
|
||||||
|
} else {
|
||||||
|
if (data[i].lineName === data[i - 1].lineName) {
|
||||||
|
this.span2[this.index1] += 1;
|
||||||
|
this.span2.push(0);
|
||||||
|
} else {
|
||||||
|
this.span2.push(1);
|
||||||
|
this.index1 = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取合并行
|
// 获取合并行
|
||||||
getSpanArr(data) {
|
getSpanArr(data) {
|
||||||
this.span1 = [];
|
this.span1 = [];
|
||||||
@ -191,14 +269,33 @@ export default {
|
|||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const xlsxParam = { raw: true };
|
const xlsxParam = { raw: true };
|
||||||
|
let tables = document.querySelector('.el-table').cloneNode(true)
|
||||||
|
const fix = tables.querySelector('.el-table__fixed')
|
||||||
|
const fixRight = tables.querySelector('.el-table__fixed-right')
|
||||||
|
if (fix) {
|
||||||
|
tables.removeChild(tables.querySelector('.el-table__fixed'))
|
||||||
|
}
|
||||||
|
if (fixRight) {
|
||||||
|
tables.removeChild(tables.querySelector('.el-table__fixed-right'))
|
||||||
|
}
|
||||||
let workbook = XLSX.utils.book_new();
|
let workbook = XLSX.utils.book_new();
|
||||||
var ws = XLSX.utils.table_to_sheet(
|
var ws = XLSX.utils.table_to_sheet(
|
||||||
document.querySelector('#exportTable'),
|
tables,
|
||||||
xlsxParam
|
xlsxParam
|
||||||
);
|
);
|
||||||
XLSX.utils.book_append_sheet(workbook, ws, '许昌安彩月原片生产汇总');
|
XLSX.utils.book_append_sheet(workbook, ws, '许昌安彩月原片生产汇总');
|
||||||
|
|
||||||
|
let tables1 = document.querySelectorAll('.el-table')[1].cloneNode(true)
|
||||||
|
const fix1 = tables1.querySelector('.el-table__fixed')
|
||||||
|
const fixRight1 = tables1.querySelector('.el-table__fixed-right')
|
||||||
|
if (fix1) {
|
||||||
|
tables1.removeChild(fix1)
|
||||||
|
}
|
||||||
|
if (fixRight1) {
|
||||||
|
tables1.removeChild(fixRight1)
|
||||||
|
}
|
||||||
var prows = XLSX.utils.table_to_sheet(
|
var prows = XLSX.utils.table_to_sheet(
|
||||||
document.querySelector('#exportproductionTable'),
|
tables1,
|
||||||
xlsxParam
|
xlsxParam
|
||||||
);
|
);
|
||||||
XLSX.utils.book_append_sheet(workbook, prows, '许昌安彩月成品生产汇总');
|
XLSX.utils.book_append_sheet(workbook, prows, '许昌安彩月成品生产汇总');
|
||||||
|
@ -1,68 +1,304 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2024-04-22 15:49:56
|
* @Date: 2024-04-22 15:49:56
|
||||||
* @LastEditTime: 2024-04-24 15:49:32
|
* @LastEditTime: 2024-04-25 09:54:39
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="weekly">
|
<div class="weekly">
|
||||||
<el-form :inline="true" :model="listQuery" class="blueTip">
|
<el-form
|
||||||
<el-form-item label="年" prop="reportTime">
|
:inline="true"
|
||||||
<el-date-picker v-model="reportTime" type="year" size="small" @change="changeTime"
|
:model="listQuery"
|
||||||
:picker-options="{firstDayOfWeek: 1}" :format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
|
class="blueTip">
|
||||||
style="width: 350px" placeholder="选择年">
|
<el-form-item
|
||||||
</el-date-picker>
|
label="月"
|
||||||
|
prop="reportTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="listQuery.time"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
type="year"
|
||||||
|
size="small"
|
||||||
|
placeholder="选择年"></el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button v-if="this.$auth.hasPermi('base:report-auto-production:query')" type="primary" size="small" @click="search()">
|
<el-button
|
||||||
|
v-if="this.$auth.hasPermi('base:report-auto-production:query')"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="getList">
|
||||||
查询
|
查询
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-if="this.$auth.hasPermiAnd(['base:report-auto-original-glass:export', 'base:report-auto-production:export'])" type="primary" size="small" plain
|
<el-button
|
||||||
@click="handleExport">导出</el-button>
|
v-if="
|
||||||
|
this.$auth.hasPermiAnd([
|
||||||
|
'base:report-auto-original-glass:export',
|
||||||
|
'base:report-auto-production:export',
|
||||||
|
])
|
||||||
|
"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
plain
|
||||||
|
@click="handleExport">
|
||||||
|
导出
|
||||||
|
</el-button>
|
||||||
</el-form>
|
</el-form>
|
||||||
<glassYear v-if="glassYearShow" ref="glassYear" :product="false" :params="listQuery" />
|
<base-table
|
||||||
<proYear v-if="proYearShow" ref="proYear" :product="false" :params="listQuery" />
|
:table-props="tableProps"
|
||||||
|
:table-data="tableData"
|
||||||
|
:span-method="objectSpanMethod1"
|
||||||
|
@emitFun="handleEmitFun"
|
||||||
|
:max-height="tableH" />
|
||||||
|
<base-table
|
||||||
|
:table-props="tableProps1"
|
||||||
|
:table-data="tableData1"
|
||||||
|
:span-method="objectSpanMethod1"
|
||||||
|
@emitFun="handleEmitFun"
|
||||||
|
:max-height="tableH"
|
||||||
|
style="margin-top: 15px" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import glassYear from '../glass/year.vue'
|
import { productionYearY, productionYearD } from '@/api/report/glass';
|
||||||
import proYear from '../productionYearReport/index.vue'
|
import { parseTime } from '../../core/mixins/code-filter';
|
||||||
import { parseTime } from '../../core/mixins/code-filter'
|
import FileSaver from 'file-saver';
|
||||||
import FileSaver from 'file-saver'
|
import * as XLSX from 'xlsx/xlsx.mjs';
|
||||||
import * as XLSX from 'xlsx/xlsx.mjs'
|
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { glassYear, proYear },
|
// components: { monthWeek, proMonth },
|
||||||
|
mixins: [tableHeightMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
heightNum: 350,
|
||||||
listQuery: {
|
listQuery: {
|
||||||
// pageSize: 10,
|
time: '',
|
||||||
// pageNo: 1,
|
|
||||||
// total: 0,
|
|
||||||
reportType: 5,
|
|
||||||
reportTime: []
|
|
||||||
},
|
},
|
||||||
startTimeStamp: '',
|
// startTimeStamp: '',
|
||||||
endTimeStamp: '',
|
// endTimeStamp: '',
|
||||||
reportTime: '',
|
// reportTime: '',
|
||||||
glassYearShow: false,
|
// glassWeekShow: false,
|
||||||
proYearShow: false
|
// proWeekShow: false,
|
||||||
}
|
tableData: [],
|
||||||
|
tableProps: [],
|
||||||
|
tableData1: [],
|
||||||
|
tableProps1: [],
|
||||||
|
resData: [],
|
||||||
|
span1: [], //表格1的合并规则
|
||||||
|
resData1: [],
|
||||||
|
span2: []
|
||||||
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getCurrentYearFirst()
|
let now = new Date()
|
||||||
this.glassYearShow = true
|
now.setHours(0, 0, 0, 0)
|
||||||
this.proYearShow = true
|
now.setDate(1)
|
||||||
|
let startOfMonth = now.getTime()
|
||||||
|
let firstDayOfMonth = new Date(startOfMonth)
|
||||||
|
this.listQuery.time = parseTime(firstDayOfMonth)
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async getList() {
|
||||||
|
this.tableData = [];
|
||||||
|
this.tableProps = [
|
||||||
|
{
|
||||||
|
prop: 'lineName',
|
||||||
|
label: '',
|
||||||
|
fixed: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'paramsName',
|
||||||
|
label: '',
|
||||||
|
fixed: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
this.tableData1 = [];
|
||||||
|
this.tableProps1 = [
|
||||||
|
{
|
||||||
|
prop: 'lineName',
|
||||||
|
label: '',
|
||||||
|
fixed: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'paramsName',
|
||||||
|
label: '',
|
||||||
|
fixed: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
await productionYearY(this.listQuery).then((res) => {
|
||||||
|
this.resData = res.data;
|
||||||
|
// 设置表头
|
||||||
|
Object.keys(this.resData).forEach((item) => {
|
||||||
|
this.tableProps.push({
|
||||||
|
prop: item,
|
||||||
|
label: item,
|
||||||
|
'show-overflow-tooltip': true,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.buildTableData(this.resData);
|
||||||
|
});
|
||||||
|
await productionYearD(this.listQuery).then((res) => {
|
||||||
|
this.resData1 = res.data;
|
||||||
|
// 设置表头
|
||||||
|
Object.keys(this.resData1).forEach((item) => {
|
||||||
|
this.tableProps1.push({
|
||||||
|
prop: item,
|
||||||
|
label: item,
|
||||||
|
'show-overflow-tooltip': true,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.buildTableData1(this.resData1);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 设置表格2数据
|
||||||
|
buildTableData1(data) {
|
||||||
|
let keys = Object.keys(data);
|
||||||
|
let tempData = [];
|
||||||
|
let subKeys = Object.keys(data[keys[0]]);
|
||||||
|
let sub2Keys = Object.keys(data[keys[0]][subKeys[0]]);
|
||||||
|
for (let i = 0; i < keys.length; i++) {
|
||||||
|
if (i === 0) {
|
||||||
|
for (let j = 0; j < subKeys.length; j++) {
|
||||||
|
for (let k = 0; k < sub2Keys.length; k++) {
|
||||||
|
let obj = {};
|
||||||
|
obj.lineName = subKeys[j];
|
||||||
|
obj.paramsName = sub2Keys[k];
|
||||||
|
obj[keys[0]] = data[keys[0]][subKeys[j]][sub2Keys[k]];
|
||||||
|
tempData.push(obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let j = 0; j < subKeys.length; j++) {
|
||||||
|
for (let k = 0; k < sub2Keys.length; k++) {
|
||||||
|
for (let v = 0; v < tempData.length; v++) {
|
||||||
|
if (
|
||||||
|
tempData[v].lineName === subKeys[j] &&
|
||||||
|
tempData[v].paramsName === sub2Keys[k]
|
||||||
|
) {
|
||||||
|
tempData[v][keys[i]] = data[keys[i]][subKeys[j]][sub2Keys[k]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.tableData1 = tempData;
|
||||||
|
this.getSpanArr1(this.tableData1);
|
||||||
|
},
|
||||||
|
// 设置表格数据
|
||||||
|
buildTableData(data) {
|
||||||
|
let keys = Object.keys(data);
|
||||||
|
let tempData = [];
|
||||||
|
let subKeys = Object.keys(data[keys[0]]);
|
||||||
|
let sub2Keys = Object.keys(data[keys[0]][subKeys[0]]);
|
||||||
|
for (let i = 0; i < keys.length; i++) {
|
||||||
|
if (i === 0) {
|
||||||
|
for (let j = 0; j < subKeys.length; j++) {
|
||||||
|
for (let k = 0; k < sub2Keys.length; k++) {
|
||||||
|
let obj = {};
|
||||||
|
obj.lineName = subKeys[j];
|
||||||
|
obj.paramsName = sub2Keys[k];
|
||||||
|
obj[keys[0]] = data[keys[0]][subKeys[j]][sub2Keys[k]];
|
||||||
|
tempData.push(obj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let j = 0; j < subKeys.length; j++) {
|
||||||
|
for (let k = 0; k < sub2Keys.length; k++) {
|
||||||
|
for (let v = 0; v < tempData.length; v++) {
|
||||||
|
if (
|
||||||
|
tempData[v].lineName === subKeys[j] &&
|
||||||
|
tempData[v].paramsName === sub2Keys[k]
|
||||||
|
) {
|
||||||
|
tempData[v][keys[i]] = data[keys[i]][subKeys[j]][sub2Keys[k]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.tableData = tempData;
|
||||||
|
this.getSpanArr(this.tableData);
|
||||||
|
},
|
||||||
|
getSpanArr1(data) {
|
||||||
|
this.span2 = [];
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
if (i === 0) {
|
||||||
|
this.span2.push(1);
|
||||||
|
this.index1 = 0;
|
||||||
|
} else {
|
||||||
|
if (data[i].lineName === data[i - 1].lineName) {
|
||||||
|
this.span2[this.index1] += 1;
|
||||||
|
this.span2.push(0);
|
||||||
|
} else {
|
||||||
|
this.span2.push(1);
|
||||||
|
this.index1 = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 获取合并行
|
||||||
|
getSpanArr(data) {
|
||||||
|
this.span1 = [];
|
||||||
|
for (var i = 0; i < data.length; i++) {
|
||||||
|
if (i === 0) {
|
||||||
|
this.span1.push(1);
|
||||||
|
this.index = 0;
|
||||||
|
} else {
|
||||||
|
if (data[i].lineName === data[i - 1].lineName) {
|
||||||
|
this.span1[this.index] += 1;
|
||||||
|
this.span1.push(0);
|
||||||
|
} else {
|
||||||
|
this.span1.push(1);
|
||||||
|
this.index = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
objectSpanMethod1({ rowIndex, columnIndex }) {
|
||||||
|
if (columnIndex === 0) {
|
||||||
|
const _row = this.span1[rowIndex];
|
||||||
|
return {
|
||||||
|
rowspan: _row,
|
||||||
|
colspan: 1,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
const xlsxParam = { raw: true }
|
const xlsxParam = { raw: true };
|
||||||
let workbook = XLSX.utils.book_new()
|
let tables = document.querySelector('.el-table').cloneNode(true)
|
||||||
var ws = XLSX.utils.table_to_sheet( document.querySelector('#exportTable'), xlsxParam)
|
const fix = tables.querySelector('.el-table__fixed')
|
||||||
XLSX.utils.book_append_sheet(workbook, ws, '许昌安彩年原片生产汇总')
|
const fixRight = tables.querySelector('.el-table__fixed-right')
|
||||||
var prows = XLSX.utils.table_to_sheet( document.querySelector('#exportproductionTable'), xlsxParam)
|
if (fix) {
|
||||||
XLSX.utils.book_append_sheet(workbook, prows, '许昌安彩年成品生产汇总')
|
tables.removeChild(tables.querySelector('.el-table__fixed'))
|
||||||
|
}
|
||||||
|
if (fixRight) {
|
||||||
|
tables.removeChild(tables.querySelector('.el-table__fixed-right'))
|
||||||
|
}
|
||||||
|
let workbook = XLSX.utils.book_new();
|
||||||
|
var ws = XLSX.utils.table_to_sheet(
|
||||||
|
tables,
|
||||||
|
xlsxParam
|
||||||
|
);
|
||||||
|
XLSX.utils.book_append_sheet(workbook, ws, '许昌安彩年原片生产汇总');
|
||||||
|
|
||||||
|
let tables1 = document.querySelectorAll('.el-table')[1].cloneNode(true)
|
||||||
|
const fix1 = tables1.querySelector('.el-table__fixed')
|
||||||
|
const fixRight1 = tables1.querySelector('.el-table__fixed-right')
|
||||||
|
if (fix1) {
|
||||||
|
tables1.removeChild(tables1.querySelector('.el-table__fixed'))
|
||||||
|
}
|
||||||
|
if (fixRight1) {
|
||||||
|
tables1.removeChild(tables1.querySelector('.el-table__fixed-right'))
|
||||||
|
}
|
||||||
|
var prows = XLSX.utils.table_to_sheet(
|
||||||
|
tables1,
|
||||||
|
xlsxParam
|
||||||
|
);
|
||||||
|
XLSX.utils.book_append_sheet(workbook, prows, '许昌安彩年成品生产汇总');
|
||||||
let fileName = '生产数据汇总表-年报.xlsx';
|
let fileName = '生产数据汇总表-年报.xlsx';
|
||||||
var wbout = XLSX.write(workbook, {
|
var wbout = XLSX.write(workbook, {
|
||||||
bookType: 'xlsx',
|
bookType: 'xlsx',
|
||||||
@ -80,57 +316,25 @@ export default {
|
|||||||
}
|
}
|
||||||
return wbout;
|
return wbout;
|
||||||
},
|
},
|
||||||
search() {
|
handleEmitFun(payload) {
|
||||||
this.$nextTick(() => {
|
console.log('payload', payload);
|
||||||
this.$refs['glassYear'].getDataList()
|
|
||||||
this.$refs['proYear'].getDataList()
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
changeTime(val) {
|
|
||||||
if(val) {
|
|
||||||
// let timeStamp = val.getTime(); //标准时间转为时间戳,毫秒级别
|
|
||||||
this.endTimeStamp = this.timeFun(new Date(val.getFullYear(),11, 31, 7, 0, 0).getTime()); //开始时间
|
|
||||||
this.startTimeStamp = this.timeFun(new Date(val.getFullYear(), 0, 1, 7, 0, 1).getTime()); //结束时间
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(val.getFullYear(), 0, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(val.getFullYear(), 11, 31, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
|
||||||
} else {
|
|
||||||
this.listQuery.reportTime = []
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getCurrentYearFirst() {
|
};
|
||||||
let date = new Date();
|
|
||||||
date.setDate(1);
|
|
||||||
date.setMonth(0);
|
|
||||||
this.reportTime = date;
|
|
||||||
this.startTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 0, 1,7,0,1).getTime()); //开始时间
|
|
||||||
this.endTimeStamp = this.timeFun(new Date(new Date().getFullYear(), 11, 31, 7, 0, 0).getTime()); //结束时间
|
|
||||||
this.listQuery.reportTime[0] = parseTime(new Date(new Date().getFullYear(), 0, 1, 7, 0, 1).getTime()) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
|
||||||
this.listQuery.reportTime[1] = parseTime(new Date(new Date().getFullYear(), 11, 31, 7, 0, 0).getTime()) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 100
|
|
||||||
},
|
|
||||||
//时间戳转为yy-mm-dd hh:mm:ss
|
|
||||||
timeFun(unixtimestamp) {
|
|
||||||
var unixtimestamp = new Date(unixtimestamp);
|
|
||||||
var year = 1900 + unixtimestamp.getYear();
|
|
||||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
|
||||||
var date = "0" + unixtimestamp.getDate();
|
|
||||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
|
|
||||||
},
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.weekly {
|
.weekly {
|
||||||
padding-top: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
.blueTip::before{
|
.blueTip::before {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
content: '';
|
content: '';
|
||||||
width: 4px;
|
width: 4px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
background: #0B58FF;
|
background: #0b58ff;
|
||||||
border-radius: 1px;
|
border-radius: 1px;
|
||||||
margin-right: 8PX;
|
margin-right: 8px;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,3 @@
|
|||||||
<!--
|
|
||||||
* @Author: zhp
|
|
||||||
* @Date: 2024-04-18 14:08:46
|
|
||||||
* @LastEditTime: 2024-04-24 13:52:45
|
|
||||||
* @LastEditors: zhp
|
|
||||||
* @Description:
|
|
||||||
-->
|
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||||
@ -24,8 +17,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table> -->
|
</el-table> -->
|
||||||
|
|
||||||
<el-table class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
|
<el-table id="exportTable" :header-cell-style="{
|
||||||
<el-table-column align="center" prop="" label="配料日报" width="120">
|
background: '#F2F4F9',
|
||||||
|
color: '#606266'
|
||||||
|
}" class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
|
||||||
|
<el-table-column align="center" prop="" :label=" '配料日报' + time " width="120">
|
||||||
<el-table-column label="原料样式" align="right" width="150">
|
<el-table-column label="原料样式" align="right" width="150">
|
||||||
<el-table-column prop="className" label="时间" width="120">
|
<el-table-column prop="className" label="时间" width="120">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -36,7 +32,7 @@
|
|||||||
<el-table-column prop="activityName"></el-table-column>
|
<el-table-column prop="activityName"></el-table-column>
|
||||||
<el-table-column prop="message"></el-table-column>
|
<el-table-column prop="message"></el-table-column>
|
||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column align="center" style="text-align: center;" v-for="(item,index) in codeList " :prop="item"
|
<el-table-column align="center" style="text-align: center;" v-for="(item, index) in codeList " :prop="item"
|
||||||
:label="item">
|
:label="item">
|
||||||
<!-- <template slot-scope="scope">
|
<!-- <template slot-scope="scope">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@ -77,6 +73,7 @@ import {
|
|||||||
} from '@/api/report/qcReport';
|
} from '@/api/report/qcReport';
|
||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||||
import FileSaver from 'file-saver'
|
import FileSaver from 'file-saver'
|
||||||
|
import moment from 'moment'
|
||||||
// import { getList, } from "@/api/base/qualityScrapType";
|
// import { getList, } from "@/api/base/qualityScrapType";
|
||||||
const headers = [
|
const headers = [
|
||||||
// {
|
// {
|
||||||
@ -122,7 +119,7 @@ const headers = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ tableHeightMixin],
|
mixins: [tableHeightMixin],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
@ -130,34 +127,33 @@ export default {
|
|||||||
// deleteURL: deleteQualityHotMaterial,
|
// deleteURL: deleteQualityHotMaterial,
|
||||||
// exportURL: exportFactoryExcel,
|
// exportURL: exportFactoryExcel,
|
||||||
},
|
},
|
||||||
codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11', 'sj12', 'sj13', 'sj14'],
|
codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11','sj14'],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
listQuery: {
|
listQuery: {
|
||||||
startTime: undefined,
|
startTime: undefined,
|
||||||
endTime:undefined
|
endTime: undefined
|
||||||
},
|
},
|
||||||
|
time: '',
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间段',
|
label: '时间',
|
||||||
dateType: 'daterange',
|
dateType: 'date',
|
||||||
format: 'yyyy-MM-dd HH:mm:ss',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: "timestamp",
|
valueFormat: "timestamp",
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
|
||||||
endPlaceholder: '结束时间',
|
|
||||||
param: 'checkTime',
|
param: 'checkTime',
|
||||||
defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
|
defaultSelect: Date.now(),
|
||||||
width: 350
|
width: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type:'button',
|
type: 'button',
|
||||||
btnName: '查询',
|
btnName: '查询',
|
||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type:'button',
|
type: 'button',
|
||||||
btnName: '导出',
|
btnName: '导出',
|
||||||
name: 'export',
|
name: 'export',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
@ -173,14 +169,29 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.formConfig[1].defaultSelect[]
|
// this.formConfig[1].defaultSelect[]
|
||||||
this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
|
this.listQuery.startTime = Date.now()
|
||||||
this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
|
this.time = moment(new Date(Date.now())).format('YYYY-MM-DD')
|
||||||
|
this.listQuery.endTime = Date.now() + 24 * 60 * 60 * 1000
|
||||||
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
|
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
// this.getSpanArr(this.tableData)
|
// this.getSpanArr(this.tableData)
|
||||||
// this.getDict();
|
// this.getDict();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
timestampToTime(date) {
|
||||||
|
// 时间戳为10位需*1000,时间戳为13位不需乘1000
|
||||||
|
// var date = new Date(timestamp * 1000);
|
||||||
|
var Y = date.getFullYear() + "-";
|
||||||
|
var M =
|
||||||
|
(date.getMonth() + 1 < 10
|
||||||
|
? "0" + (date.getMonth() + 1)
|
||||||
|
: date.getMonth() + 1) + "-";
|
||||||
|
var D = (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
|
||||||
|
var h = date.getHours() + ":";
|
||||||
|
var m = date.getMinutes() + ":";
|
||||||
|
var s = date.getSeconds();
|
||||||
|
return Y + M + D + h + m + s;
|
||||||
|
},
|
||||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||||
let spanOneArr = [], concatOne = 0;
|
let spanOneArr = [], concatOne = 0;
|
||||||
this.tableData.map((item, index) => {
|
this.tableData.map((item, index) => {
|
||||||
@ -206,7 +217,7 @@ export default {
|
|||||||
colspan: _col
|
colspan: _col
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (columnIndex === 1 ) {
|
if (columnIndex === 1) {
|
||||||
if (rowIndex === 0 || rowIndex === 2 || rowIndex === 4 || rowIndex === 6 || rowIndex === 8 || rowIndex === 10) {
|
if (rowIndex === 0 || rowIndex === 2 || rowIndex === 4 || rowIndex === 6 || rowIndex === 8 || rowIndex === 10) {
|
||||||
return {
|
return {
|
||||||
rowspan: 2,
|
rowspan: 2,
|
||||||
@ -215,14 +226,14 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (columnIndex === 1) {
|
if (columnIndex === 1) {
|
||||||
if (rowIndex %2 == 1) {
|
if (rowIndex % 2 == 1) {
|
||||||
return {
|
return {
|
||||||
rowspan: 1,
|
rowspan: 1,
|
||||||
colspan: 2
|
colspan: 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (columnIndex === 4 || columnIndex === 5 || columnIndex === 6 || columnIndex === 7 || columnIndex === 8 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11 || columnIndex === 12 || columnIndex === 13) {
|
if (columnIndex === 4 || columnIndex === 5 || columnIndex === 6 || columnIndex === 7 || columnIndex === 8 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11 ) {
|
||||||
if (rowIndex % 2 == 0) {
|
if (rowIndex % 2 == 0) {
|
||||||
return {
|
return {
|
||||||
rowspan: 2,
|
rowspan: 2,
|
||||||
@ -255,7 +266,7 @@ export default {
|
|||||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||||
new Blob([wbout], { type: "application/octet-stream" }),
|
new Blob([wbout], { type: "application/octet-stream" }),
|
||||||
//设置导出文件名称
|
//设置导出文件名称
|
||||||
"切割堆垛日报表.xlsx"
|
"配料日报.xlsx"
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== "undefined") console.log(e, wbout);
|
if (typeof console !== "undefined") console.log(e, wbout);
|
||||||
@ -285,7 +296,7 @@ export default {
|
|||||||
let arr = [
|
let arr = [
|
||||||
{
|
{
|
||||||
classType: 1,
|
classType: 1,
|
||||||
className:'白班(8:00-20:00)',
|
className: '白班(8:00-20:00)',
|
||||||
'sj1': null,
|
'sj1': null,
|
||||||
'sj2': null,
|
'sj2': null,
|
||||||
'sj3': null,
|
'sj3': null,
|
||||||
@ -295,10 +306,9 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
putType: '投入数量'
|
putType: '原料投入'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
classType: 1,
|
classType: 1,
|
||||||
@ -312,8 +322,7 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
'sj1+sj2': null,
|
'sj1+sj2': null,
|
||||||
putType: ''
|
putType: ''
|
||||||
@ -330,8 +339,7 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
putType: '投入次数'
|
putType: '投入次数'
|
||||||
},
|
},
|
||||||
@ -347,8 +355,7 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
'sj1+sj2': null,
|
'sj1+sj2': null,
|
||||||
putType: ''
|
putType: ''
|
||||||
@ -365,10 +372,9 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
putType: '投入数量',
|
putType: '原料投入',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
classType: 2,
|
classType: 2,
|
||||||
@ -382,14 +388,13 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
'sj1+sj2': null,
|
'sj1+sj2': null,
|
||||||
putType: ''
|
putType: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
classType:2,
|
classType: 2,
|
||||||
className: '夜班(20:00-8:00)',
|
className: '夜班(20:00-8:00)',
|
||||||
'sj1': null,
|
'sj1': null,
|
||||||
'sj2': null,
|
'sj2': null,
|
||||||
@ -400,8 +405,7 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
putType: '投入次数',
|
putType: '投入次数',
|
||||||
},
|
},
|
||||||
@ -417,8 +421,7 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
'sj1+sj2': null,
|
'sj1+sj2': null,
|
||||||
putType: ''
|
putType: ''
|
||||||
@ -435,10 +438,9 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
putType: '投入数量',
|
putType: '原料投入',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
classType: 3,
|
classType: 3,
|
||||||
@ -452,10 +454,9 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
'sj1+sj2':null,
|
'sj1+sj2': null,
|
||||||
putType: ''
|
putType: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -470,8 +471,7 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
putType: '投入次数',
|
putType: '投入次数',
|
||||||
},
|
},
|
||||||
@ -487,41 +487,40 @@ export default {
|
|||||||
'sj8': null,
|
'sj8': null,
|
||||||
'sj10': null,
|
'sj10': null,
|
||||||
'sj11': null,
|
'sj11': null,
|
||||||
'sj12': null,
|
|
||||||
'sj13': null,
|
|
||||||
'sj14': null,
|
'sj14': null,
|
||||||
'sj1+sj2': null,
|
'sj1+sj2': null,
|
||||||
putType: ''
|
putType: ''
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
res.data.forEach((ele) => {
|
res.data.forEach((ele) => {
|
||||||
if(ele.classType === 1 && ele.code == 'sj1+sj2') {
|
if (ele.classType === 1 && ele.code == 'sj1+sj2') {
|
||||||
arr[1]['putType'] = ele.putNum
|
arr[1]['putType'] = ele.useNum
|
||||||
arr[3]['putType'] = ele.useNum
|
arr[3]['putType'] = ele.putNum
|
||||||
// arr[1]['sj2'] = ele.putNum
|
// arr[1]['sj2'] = ele.putNum
|
||||||
// arr[3]['sj2'] = ele.useNum
|
// arr[3]['sj2'] = ele.useNum
|
||||||
} else if (ele.classType === 2 && ele.code == 'sj1+sj2') {
|
} else if (ele.classType === 2 && ele.code == 'sj1+sj2') {
|
||||||
arr[5]['putType'] = ele.putNum
|
arr[5]['putType'] = ele.useNum
|
||||||
arr[7]['putType'] = ele.useNum
|
arr[7]['putType'] = ele.putNum
|
||||||
// arr[5]['sj2'] = ele.putNum
|
// arr[5]['sj2'] = ele.putNum
|
||||||
// arr[7]['sj2'] = ele.useNum
|
// arr[7]['sj2'] = ele.useNum
|
||||||
} else if (ele.classType === 3 && ele.code == 'sj1+sj2') {
|
} else if (ele.classType === 3 && ele.code == 'sj1+sj2') {
|
||||||
arr[9]['putType'] = ele.putNum
|
arr[9]['putType'] = ele.useNum
|
||||||
arr[11]['putType'] = ele.useNum
|
arr[11]['putType'] = ele.putNum
|
||||||
// arr[9]['sj2'] = ele.putNum
|
// arr[9]['sj2'] = ele.putNum
|
||||||
// arr[11]['sj2'] = ele.useNum
|
// arr[11]['sj2'] = ele.useNum
|
||||||
}
|
}
|
||||||
this.codeList.forEach((item) => {
|
this.codeList.forEach((item) => {
|
||||||
if (ele.classType === 1 && ele.code == item) {
|
if (ele.classType === 1 && ele.code == item) {
|
||||||
// console.log(arr[0][item])
|
// console.log(arr[0][item])
|
||||||
arr[0][item] = ele.putNum
|
arr[0][item] = ele.useNum
|
||||||
arr[2][item] = ele.useNum
|
arr[2][item] = ele.putNum
|
||||||
} else if (ele.classType === 2 && ele.code == item) {
|
} else if (ele.classType === 2 && ele.code == item) {
|
||||||
arr[4][item] = ele.putNum
|
arr[4][item] = ele.useNum
|
||||||
arr[6][item] = ele.useNum
|
arr[6][item] = ele.putNum
|
||||||
} else if (ele.classType === 3 && ele.code == item) {
|
} else if (ele.classType === 3 && ele.code == item) {
|
||||||
arr[8][item] = ele.putNum
|
arr[8][item] = ele.useNum
|
||||||
arr[10][item] = ele.useNum
|
arr[10][item] = ele.putNum
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -532,10 +531,13 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
|
console.log(val.checkTime)
|
||||||
|
// Date.now() - 24 * 60 * 60 - 1000
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.startTime = val.checkTime ? val.checkTime[0] : undefined;
|
this.listQuery.startTime = val.checkTime ? val.checkTime : undefined;
|
||||||
this.listQuery.endTime = val.checkTime ? val.checkTime[1] : undefined;
|
this.time = moment(new Date(this.listQuery.startTime)).format('YYYY-MM-DD')
|
||||||
|
this.listQuery.endTime = val.checkTime ? val.checkTime + 24 * 60 * 60 * 1000 : undefined;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
@ -557,6 +559,7 @@ export default {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep.el-table thead.is-group th {
|
::v-deep.el-table thead.is-group th {
|
||||||
background: none;
|
background: none;
|
||||||
}
|
}
|
||||||
@ -567,6 +570,7 @@ export default {
|
|||||||
::v-deep.el-table thead.is-group tr:nth-child(2) th:nth-child(1) {
|
::v-deep.el-table thead.is-group tr:nth-child(2) th:nth-child(1) {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep.el-table thead.is-group tr:nth-child(2) th:first-of-type:before {
|
::v-deep.el-table thead.is-group tr:nth-child(2) th:first-of-type:before {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-18 10:01:33
|
* @Date: 2024-04-18 10:01:33
|
||||||
* @LastEditTime: 2024-04-24 09:34:36
|
* @LastEditTime: 2024-04-25 09:54:55
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -17,6 +17,12 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<el-table class="baseTable" :max-height="tableH" id="exportTableChild" :data="tableDataChild" style="width: 100%">
|
||||||
|
<el-table-column v-for="item in tablePropsChild" :prop="item.prop" :label="item.label" align="center">
|
||||||
|
<el-table-column v-for="it in item.children" :prop="it.prop" :label="it.label" align="center">
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
||||||
@pagination="getDataList" /> -->
|
@pagination="getDataList" /> -->
|
||||||
<!-- <base-dialog
|
<!-- <base-dialog
|
||||||
@ -42,6 +48,37 @@ import {
|
|||||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||||
import FileSaver from 'file-saver'
|
import FileSaver from 'file-saver'
|
||||||
import { parseTime } from '../../../core/mixins/code-filter';
|
import { parseTime } from '../../../core/mixins/code-filter';
|
||||||
|
|
||||||
|
const tablePropsChild = [
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '人工堆垛人员'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '规格mm'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '片数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '规格mm'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '片数'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '规格mm'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '片数'
|
||||||
|
},
|
||||||
|
]
|
||||||
// import { getList, } from "@/api/base/qualityScrapType";
|
// import { getList, } from "@/api/base/qualityScrapType";
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
// {
|
// {
|
||||||
@ -121,8 +158,10 @@ export default {
|
|||||||
// deleteURL: deleteQualityHotMaterial,
|
// deleteURL: deleteQualityHotMaterial,
|
||||||
// exportURL: exportFactoryExcel,
|
// exportURL: exportFactoryExcel,
|
||||||
},
|
},
|
||||||
|
tablePropsChild,
|
||||||
tableProps,
|
tableProps,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
tableDataChild:[],
|
||||||
mergeArr: [],//记录合并行数
|
mergeArr: [],//记录合并行数
|
||||||
pos: 0,
|
pos: 0,
|
||||||
listQuery: {
|
listQuery: {
|
||||||
@ -295,7 +334,35 @@ export default {
|
|||||||
return wbout;
|
return wbout;
|
||||||
//do something......
|
//do something......
|
||||||
})
|
})
|
||||||
|
var xlsxParam = { raw: true };
|
||||||
|
/* 从表生成工作簿对象 */
|
||||||
|
import('xlsx').then(excel => {
|
||||||
|
var wb = excel.utils.table_to_book(
|
||||||
|
document.querySelector("#exportTableChild"),
|
||||||
|
xlsxParam
|
||||||
|
);
|
||||||
|
/* 获取二进制字符串作为输出 */
|
||||||
|
var wbout = excel.write(wb, {
|
||||||
|
bookType: "xlsx",
|
||||||
|
bookSST: true,
|
||||||
|
type: "array",
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
FileSaver.saveAs(
|
||||||
|
//Blob 对象表示一个不可变、原始数据的类文件对象。
|
||||||
|
//Blob 表示的不一定是JavaScript原生格式的数据。
|
||||||
|
//File 接口基于Blob,继承了 blob 的功能并将其扩展使其支持用户系统上的文件。
|
||||||
|
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||||
|
new Blob([wbout], { type: "application/octet-stream" }),
|
||||||
|
//设置导出文件名称
|
||||||
|
"原片各线堆垛表.xlsx"
|
||||||
|
);
|
||||||
|
} catch (e) {
|
||||||
|
if (typeof console !== "undefined") console.log(e, wbout);
|
||||||
|
}
|
||||||
|
return wbout;
|
||||||
|
//do something......
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// otherMethods(val) {
|
// otherMethods(val) {
|
||||||
// if (val.type === 'detail') {
|
// if (val.type === 'detail') {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-18 14:08:46
|
* @Date: 2024-04-18 14:08:46
|
||||||
* @LastEditTime: 2024-04-24 14:41:01
|
* @LastEditTime: 2024-04-25 09:36:09
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -9,7 +9,7 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
|
||||||
<el-form-item label="时间" prop="startTime">
|
<el-form-item label="时间" prop="startTime">
|
||||||
<el-date-picker v-model="listQuery.startTime" value-format="timestamp" type="date" placeholder="选择日期">
|
<el-date-picker v-model="listQuery.startTime" value-format="yyyy-MM-dd HH:mm:ss" type="date" placeholder="选择日期">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="产线" prop="productionLineId">
|
<el-form-item label="产线" prop="productionLineId">
|
||||||
@ -46,7 +46,10 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table> -->
|
</el-table> -->
|
||||||
|
|
||||||
<el-table class="baseTable" :data="tableData" style="width: 100%">
|
<el-table :header-cell-style="{
|
||||||
|
background: '#F2F4F9',
|
||||||
|
color: '#606266'
|
||||||
|
}" class=" baseTable" :data="tableData" style="width: 100%">
|
||||||
<el-table-column label="时间" align="right" width="150">
|
<el-table-column label="时间" align="right" width="150">
|
||||||
<el-table-column prop="name" label="缺陷" width="120">
|
<el-table-column prop="name" label="缺陷" width="120">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -59,21 +62,6 @@
|
|||||||
</el-table-column> -->
|
</el-table-column> -->
|
||||||
<el-table-column v-for="(item, index) in codeList " :prop="item.prop" :label="item.label">
|
<el-table-column v-for="(item, index) in codeList " :prop="item.prop" :label="item.label">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<div slot="append" v-if="this.tableData.length != 0" style="text-align: center">
|
|
||||||
<!--在此处添加你想要插入在表格最后一行的内容-->
|
|
||||||
<el-col :span="8">
|
|
||||||
人工监测人员
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
<!-- {{ }} -->
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
合计
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8">
|
|
||||||
{{ sum }}
|
|
||||||
</el-col>
|
|
||||||
</div>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
||||||
@pagination="getDataList" /> -->
|
@pagination="getDataList" /> -->
|
||||||
@ -160,59 +148,59 @@ export default {
|
|||||||
radio:'晚班查询',
|
radio:'晚班查询',
|
||||||
lineList:[],
|
lineList:[],
|
||||||
codeList: [
|
codeList: [
|
||||||
{
|
// {
|
||||||
label: '19:00',
|
// label: '19:00',
|
||||||
prop: 'num0'
|
// prop: 'num0'
|
||||||
|
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '20:00',
|
// label: '20:00',
|
||||||
prop: 'num1'
|
// prop: 'num1'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '21:00',
|
// label: '21:00',
|
||||||
prop: 'num2'
|
// prop: 'num2'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '22:00',
|
// label: '22:00',
|
||||||
prop: 'num3'
|
// prop: 'num3'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '23:00',
|
// label: '23:00',
|
||||||
prop: 'num4'
|
// prop: 'num4'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '00:00',
|
// label: '00:00',
|
||||||
prop: 'num5'
|
// prop: 'num5'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '01:00',
|
// label: '01:00',
|
||||||
prop: 'num6'
|
// prop: 'num6'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '02:00',
|
// label: '02:00',
|
||||||
prop: 'num7'
|
// prop: 'num7'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '03:00',
|
// label: '03:00',
|
||||||
prop: 'num8'
|
// prop: 'num8'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '04:00',
|
// label: '04:00',
|
||||||
prop: 'num9'
|
// prop: 'num9'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '05:00',
|
// label: '05:00',
|
||||||
prop: 'num10'
|
// prop: 'num10'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '06:00',
|
// label: '06:00',
|
||||||
prop: 'num11'
|
// prop: 'num11'
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
label: '不良合计',
|
// label: '不良合计',
|
||||||
prop: 'sum'
|
// prop: 'sum'
|
||||||
}
|
// }
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
formConfig: [
|
formConfig: [
|
||||||
@ -255,7 +243,7 @@ export default {
|
|||||||
// this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
|
// this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
|
||||||
// this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
|
// this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
|
||||||
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
|
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
|
||||||
this.listQuery.startTime = new Date(new Date().setHours(1, 9, 0, 0)).getTime()
|
this.listQuery.startTime = new Date()
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
this.getDict()
|
this.getDict()
|
||||||
// this.getSpanArr(this.tableData)
|
// this.getSpanArr(this.tableData)
|
||||||
@ -268,28 +256,12 @@ export default {
|
|||||||
this.lineList = res.data
|
this.lineList = res.data
|
||||||
},
|
},
|
||||||
// objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
// objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||||
// let spanOneArr = [], concatOne = 0;
|
// if (columnIndex === 1) {
|
||||||
// this.tableData.map((item, index) => {
|
// if (rowIndex === this.tableData.length-1) {
|
||||||
// if (index === 0) {
|
|
||||||
// spanOneArr.push(1);
|
|
||||||
// } else {
|
|
||||||
// //第一列需合并相同内容的判断条件
|
|
||||||
// if (item.className === this.tableData[index - 1].className) {
|
|
||||||
// spanOneArr[concatOne] += 1;
|
|
||||||
// spanOneArr.push(0);
|
|
||||||
// } else {
|
|
||||||
// spanOneArr.push(1);
|
|
||||||
// concatOne = index;
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// if (columnIndex === 0) {
|
|
||||||
// const _row = spanOneArr[rowIndex];
|
|
||||||
// const _col = _row > 0 ? 1 : 0;
|
|
||||||
// return {
|
// return {
|
||||||
// rowspan: _row,
|
// rowspan: 1,
|
||||||
// colspan: _col
|
// colspan: 4
|
||||||
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
@ -310,134 +282,7 @@ export default {
|
|||||||
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
|
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
|
||||||
},
|
},
|
||||||
handleGetClass(e) {
|
handleGetClass(e) {
|
||||||
let str = this.listQuery.startTime
|
|
||||||
// console.log(str);
|
|
||||||
this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
|
|
||||||
// console.log(startTime1)
|
|
||||||
this.codeList = []
|
|
||||||
if (e === '早班查询') {
|
|
||||||
let arr = [
|
|
||||||
{
|
|
||||||
label: '07:00',
|
|
||||||
prop:'num0'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '08:00',
|
|
||||||
prop: 'num1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '09:00',
|
|
||||||
prop: 'num2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '10:00',
|
|
||||||
prop: 'num3'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '11:00',
|
|
||||||
prop: 'num4'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '12:00',
|
|
||||||
prop: 'num5'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '13:00',
|
|
||||||
prop: 'num6'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '14:00',
|
|
||||||
prop: 'num7'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '15:00',
|
|
||||||
prop: 'num8'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '16:00',
|
|
||||||
prop: 'num9'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '17:00',
|
|
||||||
prop: 'num10'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '18:00',
|
|
||||||
prop: 'num11'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '不良合计',
|
|
||||||
prop: 'sum'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
arr.forEach((ele,index) => [
|
|
||||||
this.codeList.push(ele)
|
|
||||||
])
|
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
} else {
|
|
||||||
let str = this.listQuery.startTime
|
|
||||||
// console.log(str);
|
|
||||||
this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
|
|
||||||
let arr = [
|
|
||||||
{
|
|
||||||
label: '19:00',
|
|
||||||
prop: 'num0'
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '20:00',
|
|
||||||
prop: 'num1'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '21:00',
|
|
||||||
prop: 'num2'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '22:00',
|
|
||||||
prop: 'num3'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '23:00',
|
|
||||||
prop: 'num4'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '00:00',
|
|
||||||
prop: 'num5'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '01:00',
|
|
||||||
prop: 'num6'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '02:00',
|
|
||||||
prop: 'num7'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '03:00',
|
|
||||||
prop: 'num8'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '04:00',
|
|
||||||
prop: 'num9'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '05:00',
|
|
||||||
prop: 'num10'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '06:00',
|
|
||||||
prop: 'num11'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: '不良合计',
|
|
||||||
prop: 'sum'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
arr.forEach((ele, index) => [
|
|
||||||
this.codeList.push(ele)
|
|
||||||
])
|
|
||||||
this.getDataList()
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
handleExport() {
|
handleExport() {
|
||||||
// 处理查询参数
|
// 处理查询参数
|
||||||
@ -484,28 +329,45 @@ export default {
|
|||||||
// },
|
// },
|
||||||
// 获取数据列表
|
// 获取数据列表
|
||||||
getDataList() {
|
getDataList() {
|
||||||
if (this.radio === '晚班查询') {
|
var str = null
|
||||||
let str = this.listQuery.startTime
|
if (this.radio == '晚班查询') {
|
||||||
// console.log(str);
|
console.log(this.radio);
|
||||||
this.listQuery.startTime = new Date(new Date(str).setHours(1, 9, 0, 0)).getTime()
|
str = new Date(new Date(this.listQuery.startTime).setHours(19, 0, 0, 0)).getTime()
|
||||||
} else {
|
} else {
|
||||||
let str = this.listQuery.startTime
|
str = new Date(new Date(this.listQuery.startTime).setHours(7, 0, 0, 0)).getTime()
|
||||||
// console.log(str);
|
|
||||||
this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
|
|
||||||
}
|
}
|
||||||
this.dataListLoading = true;
|
// this.dataListLoading = true;
|
||||||
// this.listQuery.startTime = '1713197388000';
|
// this.listQuery.startTime = '1713197388000';
|
||||||
// this.listQuery.endTime = '1713254961000';
|
// this.listQuery.endTime = '1713254961000';
|
||||||
this.urlOptions.getDataListURL({
|
this.urlOptions.getDataListURL({
|
||||||
// productionLineId: '1696716506443354114',
|
// productionLineId: '1696716506443354114',
|
||||||
// startTime: '1705618800000'
|
// startTime: '1705618800000',
|
||||||
productionLineId: this.listQuery.productionLineId,
|
productionLineId: this.listQuery.productionLineId,
|
||||||
startTime:this.listQuery.startTime
|
startTime: str
|
||||||
},).then(res => {
|
},).then(res => {
|
||||||
let count = 0
|
let count = 0
|
||||||
let arr = []
|
let arr = []
|
||||||
console.log(res.data)
|
console.log(res.data)
|
||||||
this.sum = res.data.allSum
|
|
||||||
|
res.data.timeStrList.push('不良合计')
|
||||||
|
this.codeList = res.data.timeStrList.map((ele, index) => {
|
||||||
|
if (ele === '不良合计') {
|
||||||
|
return {
|
||||||
|
label: ele,
|
||||||
|
prop: 'sum'
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return {
|
||||||
|
label: ele,
|
||||||
|
prop: 'num' + index
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
console.log(this.codeList)
|
||||||
|
// res.data.timeStrList.forEach((ele, index) => [
|
||||||
|
// this.codeList.push(ele)
|
||||||
|
// ])
|
||||||
for (let i in res.data.qualityInspectionRecordReportLineVOMap) {
|
for (let i in res.data.qualityInspectionRecordReportLineVOMap) {
|
||||||
count ++,
|
count ++,
|
||||||
console.log(res.data.qualityInspectionRecordReportLineVOMap[i])
|
console.log(res.data.qualityInspectionRecordReportLineVOMap[i])
|
||||||
@ -526,130 +388,11 @@ export default {
|
|||||||
}
|
}
|
||||||
console.log(arr);
|
console.log(arr);
|
||||||
this.tableData = arr
|
this.tableData = arr
|
||||||
// console.log(res)
|
this.tableData.push({
|
||||||
// console.log(res.data)
|
name: '检验员',
|
||||||
// let arr = [
|
num11: '合计',
|
||||||
// {
|
sum: res.data.allSum
|
||||||
// classType: 1,
|
})
|
||||||
// className: '白班(8:00-20:00)',
|
|
||||||
// 'sj1': null,
|
|
||||||
// 'sj2': null,
|
|
||||||
// 'sj3': null,
|
|
||||||
// 'sj4': null,
|
|
||||||
// 'sj5': null,
|
|
||||||
// 'sj7': null,
|
|
||||||
// 'sj8': null,
|
|
||||||
// 'sj10': null,
|
|
||||||
// 'sj11': null,
|
|
||||||
// 'sj12': null,
|
|
||||||
// 'sj13': null,
|
|
||||||
// 'sj14': null,
|
|
||||||
// putType: '投入数量'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// classType: 1,
|
|
||||||
// className: '白班(8:00-20:00)',
|
|
||||||
// 'sj1': null,
|
|
||||||
// 'sj2': null,
|
|
||||||
// 'sj3': null,
|
|
||||||
// 'sj4': null,
|
|
||||||
// 'sj5': null,
|
|
||||||
// 'sj7': null,
|
|
||||||
// 'sj8': null,
|
|
||||||
// 'sj10': null,
|
|
||||||
// 'sj11': null,
|
|
||||||
// 'sj12': null,
|
|
||||||
// 'sj13': null,
|
|
||||||
// 'sj14': null,
|
|
||||||
// putType: '投入次数'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// classType: 2,
|
|
||||||
// className: '夜班(20:00-8:00)',
|
|
||||||
// 'sj1': null,
|
|
||||||
// 'sj2': null,
|
|
||||||
// 'sj3': null,
|
|
||||||
// 'sj4': null,
|
|
||||||
// 'sj5': null,
|
|
||||||
// 'sj7': null,
|
|
||||||
// 'sj8': null,
|
|
||||||
// 'sj10': null,
|
|
||||||
// 'sj11': null,
|
|
||||||
// 'sj12': null,
|
|
||||||
// 'sj13': null,
|
|
||||||
// 'sj14': null,
|
|
||||||
// putType: '投入数量',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// classType: 2,
|
|
||||||
// className: '夜班(20:00-8:00)',
|
|
||||||
// 'sj1': null,
|
|
||||||
// 'sj2': null,
|
|
||||||
// 'sj3': null,
|
|
||||||
// 'sj4': null,
|
|
||||||
// 'sj5': null,
|
|
||||||
// 'sj7': null,
|
|
||||||
// 'sj8': null,
|
|
||||||
// 'sj10': null,
|
|
||||||
// 'sj11': null,
|
|
||||||
// 'sj12': null,
|
|
||||||
// 'sj13': null,
|
|
||||||
// 'sj14': null,
|
|
||||||
// putType: '投入次数',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// classType: 1,
|
|
||||||
// className: '全天',
|
|
||||||
// 'sj1': null,
|
|
||||||
// 'sj2': null,
|
|
||||||
// 'sj3': null,
|
|
||||||
// 'sj4': null,
|
|
||||||
// 'sj5': null,
|
|
||||||
// 'sj7': null,
|
|
||||||
// 'sj8': null,
|
|
||||||
// 'sj10': null,
|
|
||||||
// 'sj11': null,
|
|
||||||
// 'sj12': null,
|
|
||||||
// 'sj13': null,
|
|
||||||
// 'sj14': null,
|
|
||||||
// putType: '投入数量',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// classType: 2,
|
|
||||||
// className: '全天',
|
|
||||||
// 'sj1': null,
|
|
||||||
// 'sj2': null,
|
|
||||||
// 'sj3': null,
|
|
||||||
// 'sj4': null,
|
|
||||||
// 'sj5': null,
|
|
||||||
// 'sj7': null,
|
|
||||||
// 'sj8': null,
|
|
||||||
// 'sj10': null,
|
|
||||||
// 'sj11': null,
|
|
||||||
// 'sj12': null,
|
|
||||||
// 'sj13': null,
|
|
||||||
// 'sj14': null,
|
|
||||||
// putType: '投入次数',
|
|
||||||
// }
|
|
||||||
// ]
|
|
||||||
// res.data.forEach((ele) => {
|
|
||||||
// this.codeList.forEach((item) => {
|
|
||||||
// if (ele.classType === 1 && ele.code == item) {
|
|
||||||
// // console.log(arr[0][item])
|
|
||||||
// arr[0][item] = ele.putNum
|
|
||||||
// arr[1][item] = ele.useNum
|
|
||||||
// } else if (ele.classType === 2 && ele.code == item) {
|
|
||||||
// arr[2][item] = ele.putNum
|
|
||||||
// arr[3][item] = ele.useNum
|
|
||||||
// } else if (ele.classType === 3 && ele.code == item) {
|
|
||||||
// arr[4][item] = ele.putNum
|
|
||||||
// arr[5][item] = ele.useNum
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// // console.log(arr)
|
|
||||||
// this.tableData = arr
|
|
||||||
// this.dataListLoading = false;
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
|
Loading…
Reference in New Issue
Block a user