|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <GlobalWindow title="巡检任务详情" :showConfirm="false" :visible.sync="isShowModal"> | 
|---|
|  |  |  | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getList(1)" @clear="clear" /> | 
|---|
|  |  |  | <GlobalWindow title="巡检任务详情" width="800px" :showConfirm="false" :visible.sync="isShowModal"> | 
|---|
|  |  |  | <QueryForm v-model="filters" :query-form-config="queryFormConfig" @handleQuery="getDetail(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> | 
|---|
|  |  |  | <el-table-column prop="pointName" label="巡检点名称" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="" label="状态" min-width="100" show-overflow-tooltip> | 
|---|
|  |  |  | <template v-slot="{ row }"> | 
|---|
|  |  |  | <span v-if="row.status == 0">待开始</span> | 
|---|
|  |  |  | <span v-if="row.status == 1">已巡检</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="realname" label="巡检人" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="editDate" label="巡检时间" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | <el-table-column prop="files" label="巡检结果" min-width="100" show-overflow-tooltip > | 
|---|
|  |  |  | <template v-slot="{ row }"> | 
|---|
|  |  |  | <span class="gray" v-if="row.dealStatus == 0">正常</span> | 
|---|
|  |  |  | <span class="red" v-if="row.dealStatus == 1">异常</span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="" label="巡检附件" min-width="100" show-overflow-tooltip> | 
|---|
|  |  |  | <template v-slot="{ row }"> | 
|---|
|  |  |  | <div class="value" v-if="row.multifileList != null && row.multifileList.length"> | 
|---|
|  |  |  | <div v-for="item in row.multifileList" :key="item.id" style="display: inline;margin-right: 20px"> | 
|---|
|  |  |  | <video v-if="item.fileurlFull && item.fileurlFull.endsWith('.mp4')" ref="videoRef" controls preload="auto" | 
|---|
|  |  |  | style="width: 60px;height: 60px;object-fit: contain;" :src="item.fileurlFull" /> | 
|---|
|  |  |  | <el-image v-else-if="item.fileurlFull" style="width:60px; height: 60px" :src="item.fileurlFull" | 
|---|
|  |  |  | :preview-src-list="[item.fileurlFull]"> | 
|---|
|  |  |  | </el-image> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="dealInfo" label="巡检说明" min-width="100" show-overflow-tooltip /> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  | <div class="mt20"> | 
|---|
|  |  |  | <Pagination @size-change="handleSizeChange" @current-change="getDetail" :pagination="pagination" /> | 
|---|
|  |  |  | 
|---|
|  |  |  | import GlobalWindow from '@/components/common/GlobalWindow' | 
|---|
|  |  |  | import QueryForm from '@/components/common/QueryForm' | 
|---|
|  |  |  | import Pagination from '@/components/common/Pagination' | 
|---|
|  |  |  | import { getDetail } from '@/api/Inspection/ywPatrolTask' | 
|---|
|  |  |  | import dayjs from 'dayjs' | 
|---|
|  |  |  | export default { | 
|---|
|  |  |  | components: { GlobalWindow, QueryForm, Pagination }, | 
|---|
|  |  |  | data() { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | isShowModal: true, | 
|---|
|  |  |  | isShowModal: false, | 
|---|
|  |  |  | id: '', | 
|---|
|  |  |  | pagination: { | 
|---|
|  |  |  | pageSize: 10, | 
|---|
|  |  |  | page: 1, | 
|---|
|  |  |  | total: 0 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | loading:false, | 
|---|
|  |  |  | filters: {}, | 
|---|
|  |  |  | list: [], | 
|---|
|  |  |  | total: 0, | 
|---|
|  |  |  | queryFormConfig: { | 
|---|
|  |  |  | formItems: [ | 
|---|
|  |  |  | { | 
|---|
|  |  |  | filed: 'name', | 
|---|
|  |  |  | filed: 'pointName', | 
|---|
|  |  |  | type: 'input', | 
|---|
|  |  |  | label: '巡检点名称' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | { | 
|---|
|  |  |  | filed: 'status', | 
|---|
|  |  |  | type: 'select', | 
|---|
|  |  |  | label: '执行状态', | 
|---|
|  |  |  | label: '状态', | 
|---|
|  |  |  | placeholder: '全部', | 
|---|
|  |  |  | options: [] | 
|---|
|  |  |  | options: [ | 
|---|
|  |  |  | { label: '待开始', value: 0 }, | 
|---|
|  |  |  | { label: '已巡检', value: 1 }, | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | ], | 
|---|
|  |  |  | online: true | 
|---|
|  |  |  | 
|---|
|  |  |  | getDetail(page) { | 
|---|
|  |  |  | const { pagination, filters, id } = this | 
|---|
|  |  |  | this.loading = true | 
|---|
|  |  |  | platformLogPage({ | 
|---|
|  |  |  | getDetail({ | 
|---|
|  |  |  | model: { | 
|---|
|  |  |  | ...filters, | 
|---|
|  |  |  | id, | 
|---|
|  |  |  | taskId: id, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | sorts: [{ direction: 'DESC', property: 'param1' }], | 
|---|
|  |  |  | capacity: pagination.pageSize, | 
|---|
|  |  |  | 
|---|
|  |  |  | }).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 | 
|---|
|  |  |  | // 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 | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <style lang="scss" scoped></style> | 
|---|