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

View File

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