time
This commit is contained in:
		@@ -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 = [];
 | 
			
		||||
 
 | 
			
		||||
@@ -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 = [];
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user