| <template> | 
|   <GlobalWindow title="巡检任务详情" :showConfirm="false" :visible.sync="isShowModal"> | 
|     <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> | 
|     <el-table v-loading="loading" :data="list" stripe> | 
|       <el-table-column prop="" label="巡检点名称" min-width="100" show-overflow-tooltip /> | 
|       <el-table-column prop="" label="状态" min-width="100" show-overflow-tooltip /> | 
|       <el-table-column prop="" label="巡检人" min-width="100" show-overflow-tooltip /> | 
|       <el-table-column prop="" label="巡检时间" min-width="100" show-overflow-tooltip /> | 
|       <el-table-column prop="" label="巡检结果" min-width="100" show-overflow-tooltip /> | 
|       <el-table-column prop="" label="巡检说明" min-width="100" show-overflow-tooltip> | 
|         <template v-slot="scope"> | 
|           <span>{{ scope.row.billCode || scope.row.contractNum }}</span> | 
|         </template> | 
|       </el-table-column> | 
|     </el-table> | 
|     <div class="mt20"> | 
|       <Pagination @size-change="handleSizeChange" @current-change="getDetail" :pagination="pagination" /> | 
|     </div> | 
|   </GlobalWindow> | 
| </template> | 
|   | 
| <script> | 
| import GlobalWindow from '@/components/common/GlobalWindow' | 
| import QueryForm from '@/components/common/QueryForm' | 
| import Pagination from '@/components/common/Pagination' | 
| export default { | 
|   components: { GlobalWindow, QueryForm, Pagination }, | 
|   data() { | 
|     return { | 
|       isShowModal: true, | 
|       id: '', | 
|       pagination: { | 
|         pageSize: 10, | 
|         page: 1, | 
|         total: 0 | 
|       }, | 
|       filters: {}, | 
|       list: [], | 
|       total: 0, | 
|       queryFormConfig: { | 
|         formItems: [ | 
|           { | 
|             filed: 'name', | 
|             type: 'input', | 
|             label: '巡检点名称' | 
|           }, | 
|           { | 
|             filed: 'status', | 
|             type: 'select', | 
|             label: '执行状态', | 
|             placeholder: '全部', | 
|             options: [] | 
|           }, | 
|         ], | 
|         online: true | 
|       } | 
|     } | 
|   }, | 
|   methods: { | 
|     getDetail(page) { | 
|       const { pagination, filters, id } = this | 
|       this.loading = true | 
|       platformLogPage({ | 
|         model: { | 
|           ...filters, | 
|           id, | 
|         }, | 
|         sorts: [{ direction: 'DESC', property: 'param1' }], | 
|         capacity: pagination.pageSize, | 
|         page: page || pagination.page, | 
|       }).then(res => { | 
|         this.loading = false | 
|         this.list = res.records || [] | 
|         this.list.forEach(item => { | 
|           item.inTypeTemp = item.inType == 0 ? '整托盘' : '件烟' | 
|           item.taskOrigin = 'WMS获取' | 
|           item.workTime = dayjs.duration(item.param3, 'seconds').format('H时m分s秒') | 
|         }) | 
|         this.pagination.total = res.total || 0 | 
|       }, () => { | 
|         this.loading = false | 
|       }) | 
|     }, | 
|     clear() { | 
|       this.filters = {} | 
|       this.pagination.pageSize = 10 | 
|       this.pagination.page = 1 | 
|       this.getDetail() | 
|     }, | 
|     handleSizeChange(capacity) { | 
|       this.pagination.pageSize = capacity | 
|       this.getDetail() | 
|     } | 
|   } | 
| } | 
| </script> | 
|   | 
| <style lang="scss" scoped></style> |