|  |  | 
 |  |  |       <el-button :loading="exLoading" @click="handleEx" | 
 |  |  |         v-permissions="['business:platformjob:exportExcel']">导出</el-button> | 
 |  |  |     </div> | 
 |  |  |     <el-table class="mb20" v-loading="loading" :data="list" stripe> | 
 |  |  |     <el-table :height="tableHeightNew" v-loading="loading" :data="list" stripe> | 
 |  |  |       <el-table-column prop="contractNum" label="合同号" min-width="100" show-overflow-tooltip /> | 
 |  |  |       <el-table-column prop="reason" label="入园原因" min-width="100" show-overflow-tooltip /> | 
 |  |  |       <el-table-column prop="totalNum" label="总作业量(万支)" min-width="120" show-overflow-tooltip /> | 
 |  |  | 
 |  |  | import QueryForm from '@/components/common/QueryForm' | 
 |  |  | import { platformJobPage, platformJobExport, platformJobDel } from '@/api' | 
 |  |  | import { statusMap } from '../config' | 
 |  |  | import DriverDetail from "@/views/task/driverDetail" | 
 |  |  | import DriverDetail from '@/views/task/driverDetail' | 
 |  |  | import GlobalWindow from '@/components/common/GlobalWindow' | 
 |  |  | import UploadFaceImg from '@/components/common/UploadFaceImg' | 
 |  |  | import { Message } from 'element-ui' | 
 |  |  | import dayjs from 'dayjs' | 
 |  |  | import duration from 'dayjs/plugin/duration' | 
 |  |  | dayjs.extend(duration) | 
 |  |  | import BaseComputHeight from "@/components/base/BaseComputHeight" | 
 |  |  | export default { | 
 |  |  |   extends: BaseComputHeight, | 
 |  |  |   components: { | 
 |  |  |     Pagination, | 
 |  |  |     QueryForm, | 
 |  |  | 
 |  |  |         total: 0 | 
 |  |  |       }, | 
 |  |  |       filters: { | 
 |  |  |         selDate: [], | 
 |  |  |         createDateStart: '', | 
 |  |  |         createDateEnd: '', | 
 |  |  |         fastdate: 0 | 
 |  |  |       }, | 
 |  |  |       list: [], | 
 |  |  | 
 |  |  |             label: '驾驶员' | 
 |  |  |           }, | 
 |  |  |           { | 
 |  |  |             filed: 'selDate', | 
 |  |  |             type: 'datetimerange', | 
 |  |  |             label: '', | 
 |  |  |             pickerOptions: {} | 
 |  |  |             filed1: 'createDateStart', | 
 |  |  |             filed2: 'createDateEnd', | 
 |  |  |             type: 'datetime', | 
 |  |  |             label: '创建时间' | 
 |  |  |           }, | 
 |  |  |           { | 
 |  |  |             type: 'slot', | 
 |  |  | 
 |  |  |   methods: { | 
 |  |  |     changeRadio(day) { | 
 |  |  |       const arr = [dayjs().subtract(day, 'day').format('YYYY-MM-DD') + ' 00:00:00', dayjs().format('YYYY-MM-DD') + ' 23:59:59'] | 
 |  |  |       this.$set(this.filters, 'selDate', arr) | 
 |  |  |       this.getList() | 
 |  |  |       this.filters.createDateStart = arr[0] | 
 |  |  |       this.filters.createDateEnd = arr[1] | 
 |  |  |       this.getList(1) | 
 |  |  |     }, | 
 |  |  |     changeForm(str) { | 
 |  |  |       if (str === 'selDate') { | 
 |  |  |         this.$set(this.filters, 'fastdate', null) | 
 |  |  |         this.getList() | 
 |  |  |       if (this.filters.createDateStart > this.filters.createDateEnd) { | 
 |  |  |         this.filters.createDateStart = this.filters.createDateEnd | 
 |  |  |         return this.$message.error('开始时间不能大于结束时间') | 
 |  |  |       } | 
 |  |  |       this.getList() | 
 |  |  |     }, | 
 |  |  |     getList(page) { | 
 |  |  |       const { pagination, filters } = this | 
 |  |  | 
 |  |  |       platformJobPage({ | 
 |  |  |         model: { | 
 |  |  |           ...filters, | 
 |  |  |           jobType: 1, | 
 |  |  |           createDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, | 
 |  |  |           createDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null, | 
 |  |  |           jobType: 1 | 
 |  |  |         }, | 
 |  |  |         sorts: [{ direction: 'DESC', property: 'create_date' }], | 
 |  |  |         capacity: pagination.pageSize, | 
 |  |  | 
 |  |  |         this.list.forEach(item => { | 
 |  |  |           item.inTypeTemp = item.inType == 0 ? '整托盘' : '件烟' | 
 |  |  |           item.taskOrigin = 'WMS获取' | 
 |  |  |           if(item.workTime && item.workTime>=24*60*60 ){ | 
 |  |  |             item.workTime = dayjs.duration(item.workTime, 'seconds').format('D天H时m分s秒'); | 
 |  |  |           }else{ | 
 |  |  |             item.workTime = dayjs.duration(item.workTime, 'seconds').format('H时m分s秒'); | 
 |  |  |           if (item.workTime && item.workTime >= 24 * 60 * 60) { | 
 |  |  |             item.workTime = dayjs.duration(item.workTime, 'seconds').format('D天H时m分s秒') | 
 |  |  |           } else { | 
 |  |  |             item.workTime = dayjs.duration(item.workTime, 'seconds').format('H时m分s秒') | 
 |  |  |           } | 
 |  |  |           // item.workTime = dayjs.duration(item.workTime, 'seconds').format('H时m分s秒') | 
 |  |  |         }) | 
 |  |  | 
 |  |  |           platformJobExport({ | 
 |  |  |             model: { | 
 |  |  |               ...filters, | 
 |  |  |               jobType: 1, | 
 |  |  |               createDateStart: filters.selDate && filters.selDate.length > 0 ? filters.selDate[0] : null, | 
 |  |  |               createDateEnd: filters.selDate && filters.selDate.length > 0 ? filters.selDate[1] : null | 
 |  |  |               jobType: 1 | 
 |  |  |             }, | 
 |  |  |             sorts: [{ direction: 'DESC', property: 'create_date' }], | 
 |  |  |             capacity: 10000, | 
 |  |  | 
 |  |  |     }, | 
 |  |  |     handleSizeChange(capacity) { | 
 |  |  |       this.pagination.pageSize = capacity | 
 |  |  |       this.getList() | 
 |  |  |       this.getList(1) | 
 |  |  |     } | 
 |  |  |   } | 
 |  |  | } |