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