This commit is contained in:
helloDy 2024-04-25 09:10:28 +08:00
parent e24f9c1079
commit 21f4879394

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 08:39:13 * @LastEditTime: 2024-04-25 09:10:07
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -33,7 +33,7 @@
<script> <script>
// import monthWeek from '../glass/month.vue' // import monthWeek from '../glass/month.vue'
// import proMonth from '../productionMonthReport/index.vue' // import proMonth from '../productionMonthReport/index.vue'
import { productionMonthY } from '@/api/report/glass'; import { productionMonthY, productionMonthD } from '@/api/report/glass';
import { parseTime } from '../../core/mixins/code-filter' import { parseTime } from '../../core/mixins/code-filter'
import FileSaver from 'file-saver' import FileSaver from 'file-saver'
import * as XLSX from 'xlsx/xlsx.mjs' import * as XLSX from 'xlsx/xlsx.mjs'
@ -46,7 +46,7 @@ export default {
return { return {
heightNum: 240, heightNum: 240,
listQuery: { listQuery: {
time: parseTime(new Date()) time: ''
}, },
// startTimeStamp: '', // startTimeStamp: '',
// endTimeStamp: '', // endTimeStamp: '',
@ -68,9 +68,12 @@ export default {
} }
}, },
created() { created() {
// this.getCurrentMonthFirst() let now = new Date()
// this.glassWeekShow = true now.setHours(0, 0, 0, 0)
// this.proWeekShow = true now.setDate(1)
let startOfMonth = now.getTime()
let firstDayOfMonth = new Date(startOfMonth)
this.listQuery.time = parseTime(firstDayOfMonth)
}, },
mounted() { mounted() {
this.getList() this.getList()
@ -113,6 +116,19 @@ export default {
}) })
this.buildTableData() this.buildTableData()
}) })
await productionMonthD(this.listQuery).then(res => {
console.log('11', res.data)
// this.resData = res.data
// //
// Object.keys(this.resData).forEach(item => {
// this.tableProps.push({
// prop: item,
// label: item,
// 'show-overflow-tooltip': true
// })
// })
// this.buildTableData()
})
}, },
// //
buildTableData() { buildTableData() {