projects/mesxc-dy #374

Merged
juzi merged 3 commits from projects/mesxc-dy into projects/mesxc-test 2024-04-26 10:39:56 +08:00
2 changed files with 71 additions and 31 deletions
Showing only changes of commit 6adac714f0 - Show all commits

View File

@ -1,7 +1,7 @@
<!--
* @Author: Do not edit
* @Date: 2024-04-22 15:49:56
* @LastEditTime: 2024-04-26 10:14:50
* @LastEditTime: 2024-04-26 10:32:29
* @LastEditors: DY
* @Description:
-->
@ -43,12 +43,16 @@
</el-button>
</el-form>
<base-table
ref="productionDataMonthTable11"
id="productionDataMonthTable1"
:table-props="tableProps"
:table-data="tableData"
:span-method="objectSpanMethod1"
@emitFun="handleEmitFun"
:max-height="tableH" />
<base-table
ref="productionDataMonthTable22"
id="productionDataMonthTable2"
:table-props="tableProps1"
:table-data="tableData1"
:span-method="objectSpanMethod1"
@ -119,13 +123,15 @@ export default {
prop: 'lineName',
label: '',
fixed: true,
width: 150,
width: 120,
'show-overflow-tooltip': true
},
{
prop: 'paramsName',
label: '',
fixed: true,
width: 150,
width: 120,
'show-overflow-tooltip': true
},
{
prop: 'xc',
@ -140,13 +146,15 @@ export default {
prop: 'lineName',
label: '',
fixed: true,
width: 150,
width: 120,
'show-overflow-tooltip': true
},
{
prop: 'paramsName',
label: '',
fixed: true,
width: 150,
width: 120,
'show-overflow-tooltip': true,
},
{
prop: 'xc1',
@ -215,6 +223,9 @@ export default {
}
this.tableData1 = tempData;
this.getSpanArr1(this.tableData1);
this.$nextTick(() => {
this.reTable1();
});
},
//
buildTableData(data) {
@ -250,6 +261,15 @@ export default {
}
this.tableData = tempData;
this.getSpanArr(this.tableData);
this.$nextTick(() => {
this.reTable();
});
},
reTable() {
this.$refs.productionDataMonthTable11.doLayout('productionDataMonthTable1');
},
reTable1() {
this.$refs.productionDataMonthTable22.doLayout('productionDataMonthTable2');
},
getSpanArr1(data) {
this.span2 = [];

View File

@ -1,7 +1,7 @@
<!--
* @Author: Do not edit
* @Date: 2024-04-22 15:49:56
* @LastEditTime: 2024-04-25 19:16:49
* @LastEditTime: 2024-04-26 10:34:12
* @LastEditors: DY
* @Description:
-->
@ -43,12 +43,16 @@
</el-button>
</el-form>
<base-table
ref="productionDataYearTable11"
id="productionDataYearTable1"
:table-props="tableProps"
:table-data="tableData"
:span-method="objectSpanMethod1"
@emitFun="handleEmitFun"
:max-height="tableH" />
<base-table
ref="productionDataYearTable22"
id="productionDataYearTable2"
:table-props="tableProps1"
:table-data="tableData1"
:span-method="objectSpanMethod1"
@ -80,25 +84,9 @@ export default {
// glassWeekShow: false,
// proWeekShow: false,
tableData: [],
tableProps: [
{
prop: 'xc',
label: '许昌安彩年原片生产汇总',
align: 'center',
// fixed: true,
// width: 500,
children: []
}
],
tableProps: [],
tableData1: [],
tableProps1: [
{
prop: 'xc1',
label: '许昌安彩年成品生产汇总',
align: 'center',
children: []
}
],
tableProps1: [],
resData: [],
span1: [], //1
resData1: [],
@ -127,38 +115,58 @@ export default {
this.tableProps1[0].label = '许昌安彩年成品生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')'
},
async getList() {
this.getTime()
// this.getTime()
const firstDayOfYear = new Date(this.listQuery.time)
const lastDayOfYear = new Date(firstDayOfYear.getFullYear() + 1, 0, 0, 0, 0, 0, 0)
this.tableData = [];
this.tableProps[0].children = [
this.tableProps = [
{
prop: 'lineName',
label: '',
fixed: true,
width: 120,
'show-overflow-tooltip': true
},
{
prop: 'paramsName',
label: '',
fixed: true,
width: 120,
'show-overflow-tooltip': true
},
{
prop: 'xc',
label: '许昌安彩年原片生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')',
// align: 'center',
children: []
}
];
this.tableData1 = [];
this.tableProps1[0].children = [
this.tableProps1 = [
{
prop: 'lineName',
label: '',
// fixed: true,
fixed: true,
'show-overflow-tooltip': true
},
{
prop: 'paramsName',
label: '',
// fixed: true,
fixed: true,
'show-overflow-tooltip': true
},
{
prop: 'xc1',
label: '许昌安彩年成品生产汇总(' + parseTime(firstDayOfYear) + '-' + parseTime(lastDayOfYear) + ')',
// align: 'center',
children: []
}
];
await productionYearY(this.listQuery).then((res) => {
this.resData = res.data;
//
Object.keys(this.resData).forEach((item) => {
this.tableProps[0].children.push({
this.tableProps[2].children.push({
prop: item,
label: item,
'show-overflow-tooltip': true,
@ -170,7 +178,7 @@ export default {
this.resData1 = res.data;
//
Object.keys(this.resData1).forEach((item) => {
this.tableProps1[0].children.push({
this.tableProps1[2].children.push({
prop: item,
label: item,
'show-overflow-tooltip': true,
@ -213,6 +221,9 @@ export default {
}
this.tableData1 = tempData;
this.getSpanArr1(this.tableData1);
this.$nextTick(() => {
this.reTable1();
});
},
//
buildTableData(data) {
@ -248,6 +259,15 @@ export default {
}
this.tableData = tempData;
this.getSpanArr(this.tableData);
this.$nextTick(() => {
this.reTable();
});
},
reTable() {
this.$refs.productionDataYearTable11.doLayout('productionDataYearTable1');
},
reTable1() {
this.$refs.productionDataYearTable22.doLayout('productionDataYearTable2');
},
getSpanArr1(data) {
this.span2 = [];