bug
Bu işleme şunda yer alıyor:
ebeveyn
d3b119ad9b
işleme
2b76ef7d23
@ -144,11 +144,6 @@ export default {
|
||||
// this.listQuery.lineId = '1672847052717821953'
|
||||
// this.listQuery.startTime = '1693497600000';
|
||||
// this.listQuery.endTime = '1693843200000';
|
||||
this.tableData.splice(0)
|
||||
this.xData.splice(0)
|
||||
this.yData.splice(0)
|
||||
this.tableProps.splice(0)
|
||||
this.spanArr.splice(0)
|
||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||
console.log(res)
|
||||
let arr = [
|
||||
@ -228,11 +223,17 @@ export default {
|
||||
this.listQuery.lineId = val.lineIds
|
||||
this.listQuery.startTime = val.time ? String(new Date(val.time[0]).getTime()) : undefined;
|
||||
this.listQuery.endTime = val.time ? String(new Date(val.time[1]).getTime()) : undefined;
|
||||
if (val.time) {
|
||||
if (val.time && val.lineIds) {
|
||||
this.tableData = []
|
||||
this.xData = []
|
||||
this.yData = []
|
||||
this.tableProps = []
|
||||
this.spanArr = []
|
||||
this.timeList = []
|
||||
this.getData()
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请选择时间',
|
||||
message: '请选择产线和时间',
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ export default {
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间',
|
||||
dateType: 'datetime',
|
||||
dateType: 'month',
|
||||
format: 'yyyy-MM-dd',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
@ -220,7 +220,6 @@ export default {
|
||||
});
|
||||
},
|
||||
buttonClick(val) {
|
||||
// console.log(val)
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.lineIds = val.lineIds ? val.lineIds :undefined
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2023-08-03 14:09:18
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-10-10 16:54:09
|
||||
* @LastEditTime: 2023-10-11 11:20:51
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -61,6 +61,7 @@ export default {
|
||||
switchLineBindProduct(data).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false;
|
||||
this.list.productName = this.list.string.split('+')[1]
|
||||
this.$emit('emitData');
|
||||
});
|
||||
},
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2023-10-09 09:08:08
|
||||
* @LastEditTime: 2023-10-12 16:54:15
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
@ -117,6 +117,7 @@ export default {
|
||||
pageNo: 1,
|
||||
total: 1,
|
||||
},
|
||||
fileName: '',
|
||||
exportLoading: false,
|
||||
dataListLoading: false,
|
||||
dialogVisible: false,
|
||||
@ -207,6 +208,7 @@ export default {
|
||||
test() {
|
||||
var target = document.getElementsByClassName("right-aside")[0]
|
||||
target.style.background = '#FFFFFF'
|
||||
var that = this
|
||||
setTimeout(() => {
|
||||
html2canvas(target).then(function(canvas) {
|
||||
var contentWidth = canvas.width
|
||||
@ -242,7 +244,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
pdf.save('产线统计自动报表.pdf')
|
||||
pdf.save(that.fileName + '产线产量.pdf')
|
||||
})
|
||||
}, 300)
|
||||
},
|
||||
@ -285,7 +287,7 @@ export default {
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream'
|
||||
}), '产线统计自动报表.xlsx')
|
||||
}), this.fileName + '产线产量.xlsx')
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||
}
|
||||
@ -310,6 +312,9 @@ export default {
|
||||
this.listQuery.reportType = val.reportType ? val.reportType : undefined;
|
||||
this.listQuery.reportStartTime = val.timeVal ? [new Date(val.timeVal[0]).getTime()] : undefined;
|
||||
this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined;
|
||||
if (val.timeVal && val.timeVal.length > 0) {
|
||||
this.fileName = val.timeVal[0].slice(0, 10) + '-' + val.timeVal[1].slice(0, 10) + '_'
|
||||
}
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2023-10-09 15:14:42
|
||||
* @LastEditTime: 2023-10-12 16:51:54
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
@ -110,7 +110,7 @@ export default {
|
||||
showData: [],
|
||||
tableData: [],
|
||||
selectedList: [],
|
||||
fileName: [],
|
||||
fileName: '',
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
@ -156,7 +156,7 @@ export default {
|
||||
}
|
||||
// const time = new Date()
|
||||
// this.formConfig[1].defaultSelect = [time, time]
|
||||
// this.getDataList()
|
||||
this.getDataList()
|
||||
this.getPdLineList()
|
||||
},
|
||||
methods: {
|
||||
@ -199,7 +199,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
pdf.save(that.fileName[0] + '-' + that.fileName[1] + '_产线产量.pdf')
|
||||
pdf.save(that.fileName + '产线产量.pdf')
|
||||
})
|
||||
}, 300)
|
||||
},
|
||||
@ -222,7 +222,7 @@ export default {
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream'
|
||||
}), this.fileName[0] + '-' + this.fileName[1] + '_产线产量.xlsx')
|
||||
}), this.fileName + '产线产量.xlsx')
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||
}
|
||||
@ -265,17 +265,10 @@ export default {
|
||||
this.listQuery.proLineId = val.line ? val.line : undefined;
|
||||
this.listQuery.startTime = val.timeVal ? new Date(val.timeVal[0]).getTime() : undefined;
|
||||
this.listQuery.endTime = val.timeVal ? new Date(val.timeVal[1]).getTime() : undefined;
|
||||
console.log('nihc 你好', val.timeVal)
|
||||
if (val.timeVal && val.timeVal.length > 0) {
|
||||
this.fileName[0] = val.timeVal[0].slice(0, 10)
|
||||
this.fileName[1] = val.timeVal[1].slice(0, 10)
|
||||
this.getDataList();
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请选择时间',
|
||||
type: 'warning'
|
||||
});
|
||||
this.fileName = val.timeVal[0].slice(0, 10) + '-' + val.timeVal[1].slice(0, 10) + '_'
|
||||
}
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-08-29 14:59:29
|
||||
* @LastEditTime: 2023-10-08 10:51:49
|
||||
* @LastEditTime: 2023-10-12 16:35:49
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
-->
|
||||
@ -129,6 +129,7 @@ export default {
|
||||
tableBtn: [],
|
||||
tableData: [],
|
||||
showData: [],
|
||||
fileName: '',
|
||||
formConfig: [
|
||||
{
|
||||
type: 'select',
|
||||
@ -200,6 +201,7 @@ export default {
|
||||
test() {
|
||||
var target = document.getElementsByClassName("right-aside")[0]
|
||||
target.style.background = '#FFFFFF'
|
||||
var that = this
|
||||
setTimeout(() => {
|
||||
html2canvas(target).then(function(canvas) {
|
||||
var contentWidth = canvas.width
|
||||
@ -235,7 +237,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
pdf.save('工段统计自动报表.pdf')
|
||||
pdf.save(that.fileName + '工段统计.pdf')
|
||||
})
|
||||
}, 300)
|
||||
},
|
||||
@ -258,7 +260,7 @@ export default {
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream'
|
||||
}), '工段统计自动报表.xlsx')
|
||||
}), this.fileName + '工段统计.xlsx')
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||
}
|
||||
@ -307,6 +309,9 @@ export default {
|
||||
this.listQuery.reportType = val.reportType ? val.reportType : undefined;
|
||||
this.listQuery.reportStartTime = val.timeVal ? [new Date(val.timeVal[0]).getTime()] : undefined;
|
||||
this.listQuery.reportEndTime = val.timeVal ? [new Date(val.timeVal[1]).getTime()] : undefined;
|
||||
if (val.timeVal && val.timeVal.length > 0) {
|
||||
this.fileName = val.timeVal[0].slice(0, 10) + '-' + val.timeVal[1].slice(0, 10) + '_'
|
||||
}
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
|
@ -3,6 +3,7 @@
|
||||
<search-bar
|
||||
:formConfigs="formConfig"
|
||||
ref="searchBarForm"
|
||||
@select-changed="handleSearchBarChanged"
|
||||
@headBtnClick="buttonClick" />
|
||||
<base-table
|
||||
class="right-aside"
|
||||
@ -110,6 +111,7 @@ export default {
|
||||
param: 'proLineId',
|
||||
defaultSelect: '',
|
||||
filterable: true,
|
||||
onchange: true,
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
@ -151,9 +153,39 @@ export default {
|
||||
// this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
/** 根据产线获取工段 */
|
||||
async getWorksectionById(lineId) {
|
||||
const { code, data } = await this.$axios({
|
||||
url: '/base/workshop-section/listByParentId',
|
||||
method: 'get',
|
||||
params: {
|
||||
id: lineId,
|
||||
},
|
||||
});
|
||||
if (code == 0) {
|
||||
this.formConfig[1].selectOptions = data.map((item) => {
|
||||
return {
|
||||
name: item.name,
|
||||
id: item.id,
|
||||
};
|
||||
});
|
||||
}
|
||||
},
|
||||
handleSearchBarChanged({ param, value }) {
|
||||
if (!value) {
|
||||
this.formConfig[1].selectOptions = [];
|
||||
return;
|
||||
}
|
||||
switch (param) {
|
||||
case 'proLineId':
|
||||
this.getWorksectionById(value);
|
||||
break;
|
||||
}
|
||||
},
|
||||
test() {
|
||||
var target = document.getElementsByClassName("right-aside")[0]
|
||||
target.style.background = '#FFFFFF'
|
||||
var that = this
|
||||
setTimeout(() => {
|
||||
html2canvas(target).then(function(canvas) {
|
||||
var contentWidth = canvas.width
|
||||
@ -189,7 +221,7 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
pdf.save('工段统计数据查询报表.pdf')
|
||||
pdf.save(that.fileName[0] + '-' + that.fileName[1] + '_工段统计.pdf')
|
||||
})
|
||||
}, 300)
|
||||
},
|
||||
@ -212,7 +244,7 @@ export default {
|
||||
try {
|
||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||
type: 'application/octet-stream'
|
||||
}), '工段统计数据查询报表.xlsx')
|
||||
}), this.fileName[0] + '-' + this.fileName[1] + '_工段统计.xlsx')
|
||||
} catch (e) {
|
||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||
}
|
||||
@ -293,10 +325,9 @@ export default {
|
||||
this.listQuery.sectionId = val.sectionId ? val.sectionId : undefined
|
||||
this.listQuery.startTime = val.timeSlot ? new Date(val.timeSlot[0]).getTime() : undefined
|
||||
this.listQuery.endTime = val.timeSlot ? new Date(val.timeSlot[1]).getTime() : undefined
|
||||
this.fileName[0] = val.timeSlot[0]
|
||||
this.fileName[1] = val.timeSlot[1]
|
||||
console.log('wfjmmki文件名称', this.fileName)
|
||||
if (val.timeSlot) {
|
||||
if (val.timeSlot && val.timeSlot.length > 0) {
|
||||
this.fileName[0] = val.timeSlot[0].slice(0, 10)
|
||||
this.fileName[1] = val.timeSlot[1].slice(0, 10)
|
||||
this.getDataList()
|
||||
} else {
|
||||
this.$message({
|
||||
@ -315,7 +346,14 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
if (val.timeSlot && val.timeSlot.length > 0) {
|
||||
this.handleExport();
|
||||
} else {
|
||||
this.$message({
|
||||
message: '请选择时间',
|
||||
type: 'warning'
|
||||
});
|
||||
}
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
|
Yükleniyor…
Yeni konuda referans
Bir kullanıcı engelle