Compare commits
No commits in common. "f4493bde1c066d699917e52718ea3a5a9c4c37b0" and "e40f45a79af3e63edfd0e21cfc51887d159d1963" have entirely different histories.
f4493bde1c
...
e40f45a79a
@ -144,6 +144,11 @@ export default {
|
|||||||
// this.listQuery.lineId = '1672847052717821953'
|
// this.listQuery.lineId = '1672847052717821953'
|
||||||
// this.listQuery.startTime = '1693497600000';
|
// this.listQuery.startTime = '1693497600000';
|
||||||
// this.listQuery.endTime = '1693843200000';
|
// 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 => {
|
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
let arr = [
|
let arr = [
|
||||||
@ -223,17 +228,11 @@ export default {
|
|||||||
this.listQuery.lineId = val.lineIds
|
this.listQuery.lineId = val.lineIds
|
||||||
this.listQuery.startTime = val.time ? String(new Date(val.time[0]).getTime()) : undefined;
|
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;
|
this.listQuery.endTime = val.time ? String(new Date(val.time[1]).getTime()) : undefined;
|
||||||
if (val.time && val.lineIds) {
|
if (val.time) {
|
||||||
this.tableData = []
|
|
||||||
this.xData = []
|
|
||||||
this.yData = []
|
|
||||||
this.tableProps = []
|
|
||||||
this.spanArr = []
|
|
||||||
this.timeList = []
|
|
||||||
this.getData()
|
this.getData()
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '请选择产线和时间',
|
message: '请选择时间',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -72,7 +72,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间',
|
label: '时间',
|
||||||
dateType: 'month',
|
dateType: 'datetime',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
@ -220,6 +220,7 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
buttonClick(val) {
|
buttonClick(val) {
|
||||||
|
// console.log(val)
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.lineIds = val.lineIds ? val.lineIds :undefined
|
this.listQuery.lineIds = val.lineIds ? val.lineIds :undefined
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2023-08-03 14:09:18
|
* @Date: 2023-08-03 14:09:18
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2023-10-11 11:20:51
|
* @LastEditTime: 2023-10-10 16:54:09
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -61,7 +61,6 @@ export default {
|
|||||||
switchLineBindProduct(data).then((response) => {
|
switchLineBindProduct(data).then((response) => {
|
||||||
this.$modal.msgSuccess('修改成功');
|
this.$modal.msgSuccess('修改成功');
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.list.productName = this.list.string.split('+')[1]
|
|
||||||
this.$emit('emitData');
|
this.$emit('emitData');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-08-29 14:59:29
|
* @Date: 2023-08-29 14:59:29
|
||||||
* @LastEditTime: 2023-10-12 16:54:15
|
* @LastEditTime: 2023-10-09 09:08:08
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -117,7 +117,6 @@ export default {
|
|||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
total: 1,
|
total: 1,
|
||||||
},
|
},
|
||||||
fileName: '',
|
|
||||||
exportLoading: false,
|
exportLoading: false,
|
||||||
dataListLoading: false,
|
dataListLoading: false,
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
@ -208,7 +207,6 @@ export default {
|
|||||||
test() {
|
test() {
|
||||||
var target = document.getElementsByClassName("right-aside")[0]
|
var target = document.getElementsByClassName("right-aside")[0]
|
||||||
target.style.background = '#FFFFFF'
|
target.style.background = '#FFFFFF'
|
||||||
var that = this
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
html2canvas(target).then(function(canvas) {
|
html2canvas(target).then(function(canvas) {
|
||||||
var contentWidth = canvas.width
|
var contentWidth = canvas.width
|
||||||
@ -244,7 +242,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf.save(that.fileName + '产线产量.pdf')
|
pdf.save('产线统计自动报表.pdf')
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
@ -287,7 +285,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||||
type: 'application/octet-stream'
|
type: 'application/octet-stream'
|
||||||
}), this.fileName + '产线产量.xlsx')
|
}), '产线统计自动报表.xlsx')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||||
}
|
}
|
||||||
@ -312,9 +310,6 @@ export default {
|
|||||||
this.listQuery.reportType = val.reportType ? val.reportType : undefined;
|
this.listQuery.reportType = val.reportType ? val.reportType : undefined;
|
||||||
this.listQuery.reportStartTime = val.timeVal ? [new Date(val.timeVal[0]).getTime()] : 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;
|
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();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-08-29 14:59:29
|
* @Date: 2023-08-29 14:59:29
|
||||||
* @LastEditTime: 2023-10-12 16:51:54
|
* @LastEditTime: 2023-10-09 15:14:42
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -110,7 +110,7 @@ export default {
|
|||||||
showData: [],
|
showData: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
selectedList: [],
|
selectedList: [],
|
||||||
fileName: '',
|
fileName: [],
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -156,7 +156,7 @@ export default {
|
|||||||
}
|
}
|
||||||
// const time = new Date()
|
// const time = new Date()
|
||||||
// this.formConfig[1].defaultSelect = [time, time]
|
// this.formConfig[1].defaultSelect = [time, time]
|
||||||
this.getDataList()
|
// this.getDataList()
|
||||||
this.getPdLineList()
|
this.getPdLineList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@ -199,7 +199,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf.save(that.fileName + '产线产量.pdf')
|
pdf.save(that.fileName[0] + '-' + that.fileName[1] + '_产线产量.pdf')
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
@ -222,7 +222,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||||
type: 'application/octet-stream'
|
type: 'application/octet-stream'
|
||||||
}), this.fileName + '产线产量.xlsx')
|
}), this.fileName[0] + '-' + this.fileName[1] + '_产线产量.xlsx')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||||
}
|
}
|
||||||
@ -265,10 +265,17 @@ export default {
|
|||||||
this.listQuery.proLineId = val.line ? val.line : undefined;
|
this.listQuery.proLineId = val.line ? val.line : undefined;
|
||||||
this.listQuery.startTime = val.timeVal ? new Date(val.timeVal[0]).getTime() : 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;
|
this.listQuery.endTime = val.timeVal ? new Date(val.timeVal[1]).getTime() : undefined;
|
||||||
|
console.log('nihc 你好', val.timeVal)
|
||||||
if (val.timeVal && val.timeVal.length > 0) {
|
if (val.timeVal && val.timeVal.length > 0) {
|
||||||
this.fileName = val.timeVal[0].slice(0, 10) + '-' + val.timeVal[1].slice(0, 10) + '_'
|
this.fileName[0] = val.timeVal[0].slice(0, 10)
|
||||||
}
|
this.fileName[1] = val.timeVal[1].slice(0, 10)
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: '请选择时间',
|
||||||
|
type: 'warning'
|
||||||
|
});
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: Do not edit
|
* @Author: Do not edit
|
||||||
* @Date: 2023-08-29 14:59:29
|
* @Date: 2023-08-29 14:59:29
|
||||||
* @LastEditTime: 2023-10-12 16:35:49
|
* @LastEditTime: 2023-10-08 10:51:49
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -129,7 +129,6 @@ export default {
|
|||||||
tableBtn: [],
|
tableBtn: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
showData: [],
|
showData: [],
|
||||||
fileName: '',
|
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -201,7 +200,6 @@ export default {
|
|||||||
test() {
|
test() {
|
||||||
var target = document.getElementsByClassName("right-aside")[0]
|
var target = document.getElementsByClassName("right-aside")[0]
|
||||||
target.style.background = '#FFFFFF'
|
target.style.background = '#FFFFFF'
|
||||||
var that = this
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
html2canvas(target).then(function(canvas) {
|
html2canvas(target).then(function(canvas) {
|
||||||
var contentWidth = canvas.width
|
var contentWidth = canvas.width
|
||||||
@ -237,7 +235,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf.save(that.fileName + '工段统计.pdf')
|
pdf.save('工段统计自动报表.pdf')
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
@ -260,7 +258,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||||
type: 'application/octet-stream'
|
type: 'application/octet-stream'
|
||||||
}), this.fileName + '工段统计.xlsx')
|
}), '工段统计自动报表.xlsx')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||||
}
|
}
|
||||||
@ -309,9 +307,6 @@ export default {
|
|||||||
this.listQuery.reportType = val.reportType ? val.reportType : undefined;
|
this.listQuery.reportType = val.reportType ? val.reportType : undefined;
|
||||||
this.listQuery.reportStartTime = val.timeVal ? [new Date(val.timeVal[0]).getTime()] : 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;
|
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();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
<search-bar
|
<search-bar
|
||||||
:formConfigs="formConfig"
|
:formConfigs="formConfig"
|
||||||
ref="searchBarForm"
|
ref="searchBarForm"
|
||||||
@select-changed="handleSearchBarChanged"
|
|
||||||
@headBtnClick="buttonClick" />
|
@headBtnClick="buttonClick" />
|
||||||
<base-table
|
<base-table
|
||||||
class="right-aside"
|
class="right-aside"
|
||||||
@ -111,7 +110,6 @@ export default {
|
|||||||
param: 'proLineId',
|
param: 'proLineId',
|
||||||
defaultSelect: '',
|
defaultSelect: '',
|
||||||
filterable: true,
|
filterable: true,
|
||||||
onchange: true,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -153,39 +151,9 @@ export default {
|
|||||||
// this.getDataList()
|
// this.getDataList()
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
test() {
|
||||||
var target = document.getElementsByClassName("right-aside")[0]
|
var target = document.getElementsByClassName("right-aside")[0]
|
||||||
target.style.background = '#FFFFFF'
|
target.style.background = '#FFFFFF'
|
||||||
var that = this
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
html2canvas(target).then(function(canvas) {
|
html2canvas(target).then(function(canvas) {
|
||||||
var contentWidth = canvas.width
|
var contentWidth = canvas.width
|
||||||
@ -221,7 +189,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pdf.save(that.fileName[0] + '-' + that.fileName[1] + '_工段统计.pdf')
|
pdf.save('工段统计数据查询报表.pdf')
|
||||||
})
|
})
|
||||||
}, 300)
|
}, 300)
|
||||||
},
|
},
|
||||||
@ -244,7 +212,7 @@ export default {
|
|||||||
try {
|
try {
|
||||||
FileSaver.saveAs(new Blob([exportTableOut], {
|
FileSaver.saveAs(new Blob([exportTableOut], {
|
||||||
type: 'application/octet-stream'
|
type: 'application/octet-stream'
|
||||||
}), this.fileName[0] + '-' + this.fileName[1] + '_工段统计.xlsx')
|
}), '工段统计数据查询报表.xlsx')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
if (typeof console !== 'undefined') console.log(e, exportTableOut)
|
||||||
}
|
}
|
||||||
@ -325,9 +293,10 @@ export default {
|
|||||||
this.listQuery.sectionId = val.sectionId ? val.sectionId : undefined
|
this.listQuery.sectionId = val.sectionId ? val.sectionId : undefined
|
||||||
this.listQuery.startTime = val.timeSlot ? new Date(val.timeSlot[0]).getTime() : 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.listQuery.endTime = val.timeSlot ? new Date(val.timeSlot[1]).getTime() : undefined
|
||||||
if (val.timeSlot && val.timeSlot.length > 0) {
|
this.fileName[0] = val.timeSlot[0]
|
||||||
this.fileName[0] = val.timeSlot[0].slice(0, 10)
|
this.fileName[1] = val.timeSlot[1]
|
||||||
this.fileName[1] = val.timeSlot[1].slice(0, 10)
|
console.log('wfjmmki文件名称', this.fileName)
|
||||||
|
if (val.timeSlot) {
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
} else {
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
@ -346,14 +315,7 @@ export default {
|
|||||||
this.getDataList();
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'export':
|
case 'export':
|
||||||
if (val.timeSlot && val.timeSlot.length > 0) {
|
|
||||||
this.handleExport();
|
this.handleExport();
|
||||||
} else {
|
|
||||||
this.$message({
|
|
||||||
message: '请选择时间',
|
|
||||||
type: 'warning'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log(val);
|
console.log(val);
|
||||||
|
Loading…
Reference in New Issue
Block a user