更新首页
This commit is contained in:
		| @@ -215,13 +215,16 @@ export default { | ||||
| 				{ | ||||
| 					type: 'datePicker', | ||||
| 					label: '时间范围', | ||||
| 					dateType: 'daterange', | ||||
| 					format: 'yyyy-MM-dd', | ||||
| 					dateType: 'datetimerange', | ||||
| 					format: 'yyyy-MM-dd HH:mm:ss', | ||||
| 					valueFormat: 'yyyy-MM-dd HH:mm:ss', | ||||
| 					rangeSeparator: '-', | ||||
| 					startPlaceholder: '开始时间', | ||||
| 					endPlaceholder: '结束时间', | ||||
| 					defaultTime: ['08:30:00', '08:30:00'], | ||||
| 					param: 'searchTime', | ||||
| 					width: 350, | ||||
| 					clearable: false, | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| @@ -245,10 +248,11 @@ export default { | ||||
| 			activeName: 'his', | ||||
| 			tableProps, | ||||
| 			tableProps2, | ||||
| 			tableBtn: [{ | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| 					  } | ||||
| 			tableBtn: [ | ||||
| 				{ | ||||
| 					type: 'edit', | ||||
| 					btnName: '编辑', | ||||
| 				}, | ||||
| 			].filter((v) => v), | ||||
| 			tableData: [], | ||||
| 			tableData2: [], | ||||
| @@ -271,14 +275,10 @@ export default { | ||||
| 	methods: { | ||||
| 		buttonClick(val) { | ||||
| 			if (val.statisticType === 2) { | ||||
| 				this.tableProps[0].filter = (val) => | ||||
| 					parseTime(val, '{y}年第{w}周'); | ||||
| 			}else{ | ||||
| 				this.tableProps[0].filter = (val) => | ||||
| 					parseTime(val, '{y}年{m}月{d}日'); | ||||
|       } | ||||
| 			this.formConfig2[1].startPlaceholder = '开始时间'; | ||||
| 			this.formConfig2[1].endPlaceholder = '结束时间'; | ||||
| 				this.tableProps[0].filter = (val) => parseTime(val, '{y}年第{w}周'); | ||||
| 			} else { | ||||
| 				this.tableProps[0].filter = (val) => parseTime(val, '{y}年{m}月{d}日'); | ||||
| 			} | ||||
| 			switch (val.btnName) { | ||||
| 				case 'search': | ||||
| 					this.listQuery.pageNo = 1; | ||||
| @@ -286,10 +286,11 @@ export default { | ||||
| 					this.listQuery.energyTypeId = val.name || null; | ||||
| 					this.listQuery.statisticType = val.statisticType || 1; | ||||
| 					this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null; | ||||
| 					this.listQuery.endTime = val.searchTime | ||||
| 						? val.searchTime[1].substr(0, 10) + ' 23:59:59' | ||||
| 						: null; | ||||
| 					this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null; | ||||
| 					if (this.activeName === 'his') { | ||||
| 						this.listQuery.endTime = val.searchTime | ||||
| 							? val.searchTime[1].substr(0, 10) + ' 23:59:59' | ||||
| 							: null; | ||||
| 						this.getDataList(); | ||||
| 					} else { | ||||
| 						this.getDataList2(); | ||||
| @@ -304,9 +305,12 @@ export default { | ||||
| 					this.listQuery.energyTypeId = val.name || null; | ||||
| 					this.listQuery.statisticType = val.statisticType || 1; | ||||
| 					this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null; | ||||
| 					this.listQuery.endTime = val.searchTime | ||||
| 						? val.searchTime[1].substr(0, 10) + ' 23:59:59' | ||||
| 						: null; | ||||
| 					this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null; | ||||
| 					if (this.activeName === 'his') { | ||||
| 						this.listQuery.endTime = val.searchTime | ||||
| 							? val.searchTime[1].substr(0, 10) + ' 23:59:59' | ||||
| 							: null; | ||||
| 					} | ||||
| 					this.handleExport(); | ||||
| 					break; | ||||
| 				default: | ||||
| @@ -328,22 +332,26 @@ export default { | ||||
| 				const end = new Date(); | ||||
| 				const start = new Date(); | ||||
| 				start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); | ||||
| 				this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 00:00:00'; | ||||
| 				this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 23:59:59'; | ||||
| 				this.formConfig2[1].startPlaceholder = parseTime(start).substr(0, 10); | ||||
| 				this.formConfig2[1].endPlaceholder = parseTime(end).substr(0, 10); | ||||
| 				this.listQuery.startTime = parseTime(start).substr(0, 10) + ' 08:30:00'; | ||||
| 				this.listQuery.endTime = parseTime(end).substr(0, 10) + ' 08:30:00'; | ||||
| 				this.$nextTick(() => { | ||||
| 					this.$refs.searchBarForm2.formInline.searchTime = [ | ||||
| 						this.listQuery.startTime, | ||||
| 						this.listQuery.endTime, | ||||
| 					]; | ||||
| 				}); | ||||
| 				this.listQuery.name = null; | ||||
| 				this.listQuery.pageNo = 1; | ||||
| 				this.getDataList2(); | ||||
| 			} | ||||
| 		}, | ||||
|     getNavDataList(){ | ||||
| 		getNavDataList() { | ||||
| 			if (this.activeName === 'his') { | ||||
| 				this.getDataList(); | ||||
| 			} else { | ||||
| 				this.getDataList2(); | ||||
| 			} | ||||
|     }, | ||||
| 		}, | ||||
| 		// 获取数据2列表 | ||||
| 		getDataList2() { | ||||
| 			if (this.listQuery.startTime) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user