| | |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="成果类型" prop="attachmentType"> |
| | | <el-select |
| | | class="gd-select" |
| | | popper-class="gd-select-popper" |
| | | v-model="searchParams.attachmentType" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="handleSearch" |
| | | > |
| | | <el-option |
| | | v-for="item in attachmentTypeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item > |
| | | <el-button :icon="RefreshRight" @click="resetForm"></el-button> |
| | | <el-button :icon="Search" color="#383874" @click="handleSearch"></el-button> |
| | |
| | | <el-table-column type="index" label="序号" width="80" /> |
| | | <el-table-column label="图片/视频" > |
| | | <template v-slot="{ row }"> |
| | | <el-image |
| | | v-if="row.attachmentType ===0 && row.resultUrl" |
| | | :src="row.resultUrl" |
| | | :preview-src-list="[row.resultUrl]" |
| | | fit="cover" |
| | | style="width: 80px; height: 80px; border-radius: 4px;" |
| | | preview-teleported |
| | | /> |
| | | <div class="video-btn" v-if="row.attachmentType === 1 && row.resultUrl" @click="videoClick(row)"> |
| | | <el-image |
| | | v-if="row.attachmentType === 1 || row.attachmentType === 2" |
| | | :src="row.attachmentType === 1 ? row.resultUrl : row.aiImg" |
| | | :preview-src-list="[row.attachmentType === 1 ? row.resultUrl : row.aiImg]" |
| | | fit="cover" |
| | | style="width: 80px; height: 80px" |
| | | preview-teleported |
| | | /> |
| | | <div class="video-btn" v-if="row.attachmentType === 3 && row.resultUrl" @click="videoClick(row)"> |
| | | <el-icon :size="30" color="#fff"> |
| | | <VideoPlay /> |
| | | </el-icon> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="patrolTaskName" show-overflow-tooltip label="巡查任务名称" /> |
| | | <el-table-column label="成果类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ getAttachmentTypeLabel(row.attachmentType) }} |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="shootTime" show-overflow-tooltip label="拍摄时间" /> |
| | | <el-table-column label="操作" class-name="operation-btns" width="120"> |
| | | <template v-slot="{ row }"> |
| | |
| | | import {gdTaskResultPageApi, gdTaskResultDownloadApi, gdTaskResultRemoveApi,listByWorkOrderId}from './orderManageApi' |
| | | import { Search, RefreshRight, Download } from '@element-plus/icons-vue' |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import { getAiImg, getDictLabel } from '@ztzf/utils' |
| | | import dayjs from 'dayjs' |
| | | import VideoPlayDialog from '@/components/VideoPlayDialog.vue' |
| | | |
| | |
| | | const initSearchParams = () => ({ |
| | | current: 1, |
| | | size: 10, |
| | | patrolTaskIds: [] |
| | | patrolTaskIds: [], |
| | | attachmentType: '' |
| | | }) |
| | | |
| | | const searchParams = ref(initSearchParams()) |
| | |
| | | const selectedRows = ref([]) |
| | | const patrolTaskList = ref([]) |
| | | const dictObj = inject('dictObj') |
| | | const attachmentTypeOptions = [ |
| | | { label: '媒体文件', value: 1 }, |
| | | { label: 'AI文件', value: 2 }, |
| | | { label: '主视频', value: 3 }, |
| | | ] |
| | | |
| | | function getAttachmentTypeLabel(attachmentType) { |
| | | return attachmentTypeOptions.find(item => item.value === Number(attachmentType))?.label || '' |
| | | } |
| | | |
| | | // 导出加载状态 |
| | | const exportLoading = ref(false) |
| | | // 获取巡查任务列表 |
| | |
| | | ? searchParams.value.patrolTaskIds.join(',') |
| | | : '' |
| | | }) |
| | | list.value = res?.data?.data?.records || [] |
| | | list.value = await Promise.all( |
| | | (res?.data?.data?.records ?? []).map(async item => { |
| | | if (item.attachmentType !== 2) return item |
| | | const aiImg = await getAiImg(item.resultUrl,item.geojson) |
| | | return { ...item, aiImg } |
| | | }) |
| | | ) |
| | | total.value = res?.data?.data?.total || 0 |
| | | } finally { |
| | | loading.value = false |
| | |
| | | let VideoShow = ref(false) |
| | | let currentVideo = ref({}) |
| | | function videoClick(row) { |
| | | currentVideo.value = row |
| | | VideoShow.value = true |
| | | currentVideo.value = row |
| | | } |
| | | |
| | | // 监听 workOrderId 变化 |