update 班组交接班记录

This commit is contained in:
lb 2022-11-24 15:30:56 +08:00
parent be18358b9c
commit 123cdd59a5

View File

@ -8,10 +8,7 @@
-->
<template>
<div class="app-container">
<head-form
:form-config="headFormConfig"
@headBtnClick="btnClick"
/>
<head-form :form-config="headFormConfig" @headBtnClick="btnClick" />
<base-table
:top-btn-config="topBtnConfig"
:page="listQuery.current"
@ -21,12 +18,7 @@
:is-loading="listLoading"
@clickTopBtn="clickTopBtn"
>
<method-btn
slot="handleBtn"
:width="trueWidth"
:method-list="tableBtn"
@clickBtn="handleClick"
/>
<method-btn slot="handleBtn" :width="trueWidth" :method-list="tableBtn" @clickBtn="handleClick" />
</base-table>
<pagination
v-show="total > 0"
@ -35,11 +27,7 @@
:limit.sync="listQuery.size"
@pagination="getList()"
/>
<team-info-detail
v-if="addOrUpdateVisible"
ref="addOrUpdate"
@refreshDataList="getList"
/>
<team-info-detail v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getList" />
<team-info-add
v-if="addVisible"
ref="addNew"
@ -61,6 +49,7 @@ import MethodBtn from '@/components/BaseTable/subcomponents/MethodBtn'
import { timeFormatter } from '@/filters'
import i18n from '@/lang'
// import data from '../pdf/content'
import { Random } from 'mockjs'
/**
* 表格表头配置项 TypeScript接口注释
@ -218,9 +207,31 @@ export default {
this.listQuery.planHandoverEndTime = this.headFormValue.timeSlot ? this.headFormValue.timeSlot[1] : ''
this.$nextTick(() => {
this.listLoading = true
list(this.listQuery).then((response) => {
list(this.listQuery).then(response => {
if (response.data.records) {
this.list = response.data.records
// this.list = response.data.records
// 11-mes
this.list = response.data.records.map(item => {
let startDate = 2022 + '-' + '11-' + Random.integer(1, 29)
let endDate = startDate.split('-')
endDate[2] = +endDate[2] + Random.integer(0, 3)
let startHour = Random.integer(1, 22)
return {
...item,
planHandoverTime:
startDate + ' ' + (startHour < 10 ? '0' + startHour : '' + startHour) + Random.datetime(':mm:ss'),
planOfflineTime:
endDate.join('-') +
' ' +
(startHour + 1 < 10 ? +'0' + (startHour + 1) : 1 + startHour + '') +
Random.datetime(':mm:ss')
}
})
console.log("list;', ", this.list)
} else {
this.list.splice(0, this.list.length)
}
@ -263,7 +274,7 @@ export default {
const blob = new Blob([response.data])
const reader = new FileReader()
reader.readAsDataURL(blob)
reader.onload = (e) => {
reader.onload = e => {
const a = document.createElement('a')
a.download = fileName
a.href = e.target.result
@ -285,7 +296,7 @@ export default {
},
clickTopBtn(val) {
if (val === 'add') {
this.addNewInfo()//
this.addNewInfo() //
}
}
}