| | |
| | | v-model="searchParams.patrolTaskIds" |
| | | placeholder="请选择" |
| | | clearable |
| | | |
| | | |
| | | multiple |
| | | @change="handleSearch" |
| | | > |
| | |
| | | /> |
| | | </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 class="gd-table" :data="list" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="46" /> |
| | | <el-table-column type="index" label="序号" width="80" /> |
| | | <el-table-column label="图片" > |
| | | <el-table-column label="图片/视频" > |
| | | <template v-slot="{ row }"> |
| | | <el-image |
| | | v-if="row.resultUrl" |
| | | 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 |
| | | /> |
| | | <span v-else>-</span> |
| | | <div class="video-btn" v-if="row.attachmentType === 1 && row.resultUrl" @click="videoClick(row)"> |
| | | <el-icon :size="30" color="#fff"> |
| | | <VideoPlay /> |
| | | </el-icon> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="patrolTaskName" show-overflow-tooltip label="巡查任务名称" /> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <VideoPlayDialog |
| | | ref="videoPlayDialogRef" |
| | | v-if="VideoShow" |
| | | v-model="VideoShow" |
| | | :playUrl="currentVideo.resultUrl" |
| | | > |
| | | </VideoPlayDialog> |
| | | </template> |
| | | |
| | | <script setup> |
| | |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import dayjs from 'dayjs' |
| | | import VideoPlayDialog from '@/components/VideoPlayDialog.vue' |
| | | |
| | | const props = defineProps({ |
| | | workOrderId: { |
| | |
| | | const res = await gdTaskResultPageApi({ |
| | | ...searchParams.value, |
| | | workOrderId: props.workOrderId, |
| | | patrolTaskIds: searchParams.value.patrolTaskIds.length |
| | | ? searchParams.value.patrolTaskIds.join(',') |
| | | patrolTaskIds: searchParams.value.patrolTaskIds.length |
| | | ? searchParams.value.patrolTaskIds.join(',') |
| | | : '' |
| | | }) |
| | | list.value = res?.data?.data?.records || [] |
| | |
| | | } |
| | | } |
| | | |
| | | // 点击视频 |
| | | let VideoShow = ref(false) |
| | | let currentVideo = ref({}) |
| | | function videoClick(row) { |
| | | VideoShow.value = true |
| | | currentVideo.value = row |
| | | } |
| | | |
| | | // 监听 workOrderId 变化 |
| | | watch( |
| | | () => props.workOrderId, |
| | |
| | | display: flex; |
| | | flex-direction: column; |
| | | overflow: hidden; |
| | | |
| | | |
| | | .gd-table-container { |
| | | flex: 1; |
| | | overflow: hidden; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | |
| | | .gd-table-content { |
| | | flex: 1; |
| | | overflow: auto; |
| | | } |
| | | .video-btn { |
| | | width: 80px; |
| | | height: 80px; |
| | | background-color: #9E9E9E; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border-radius: 4px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | </style> |
| | | </style> |