| | |
| | | </div> |
| | | <div class="imgBox"> |
| | | <div |
| | | v-for="item in taskResultList.filter(item1 => item1.resultUrl && [1, 2, 3].includes(item1.attachmentType))" |
| | | v-for="item in taskResultList.filter( |
| | | item1 => item1.resultUrl && [1, 2, 3].includes(item1.attachmentType) |
| | | )" |
| | | > |
| | | <el-image |
| | | :key="item.thumbnail" |
| | | v-if="item.attachmentType === 1 || item.attachmentType === 2" |
| | | :src="item.attachmentType === 1 ? item.resultUrl : item.aiImg" |
| | | :preview-src-list="[item.attachmentType === 1 ? item.resultUrl : item.aiImg]" |
| | | :src="item.thumbnail" |
| | | :preview-src-list="[item.resultUrl]" |
| | | fit="cover" |
| | | preview-teleported |
| | | @error="handleThumbnailError(item)" |
| | | /> |
| | | <div class="video-btn" v-if="item.attachmentType === 3" @click="videoClick(item)"> |
| | | <div |
| | | class="video-btn" |
| | | v-if="item.attachmentType === 3" |
| | | :style="item.thumbnailUrl ? { backgroundImage: `url(${item.thumbnailUrl})`, backgroundSize: 'cover', backgroundPosition: 'center' } : {}" |
| | | @click="videoClick(item)" |
| | | > |
| | | <el-icon :size="30" color="#fff"> |
| | | <VideoPlay /> |
| | | </el-icon> |
| | |
| | | </div> |
| | | |
| | | <template #footer v-if="detailLoaded"> |
| | | <el-button v-if="['1', '4', '7'].includes(taskStatus)" @click="viewDescription" color="#F2F3F5"> |
| | | <el-button |
| | | v-if="['1', '4', '7'].includes(taskStatus)" |
| | | :disabled="footerLoading" |
| | | @click="viewDescription" |
| | | color="#F2F3F5" |
| | | > |
| | | {{ gdStatusObj[taskStatus].reason }} |
| | | </el-button> |
| | | <el-button @click="statusChange(3)" v-if="taskStatus === '3' && permission.flyOrder_revoke" color="#4C34FF"> |
| | | <el-button |
| | | v-if="taskStatus === '3' && permission.flyOrder_revoke" |
| | | :loading="statusLoading === 3" |
| | | :disabled="footerLoading" |
| | | @click="statusChange(3)" |
| | | color="#4C34FF" |
| | | > |
| | | 撤回任务 |
| | | </el-button> |
| | | |
| | | <template v-if="permission.flyOrder_controlAcceptance"> |
| | | <el-button @click="refusalToAccept" v-if="taskStatus === '6'" color="#F2F3F5">拒绝验收</el-button> |
| | | <el-button @click="statusChange(6)" v-if="taskStatus === '6'" color="#4C34FF">验收通过</el-button> |
| | | <el-button v-if="taskStatus === '6'" :disabled="footerLoading" @click="refusalToAccept" color="#F2F3F5"> |
| | | 拒绝验收 |
| | | </el-button> |
| | | <el-button |
| | | v-if="taskStatus === '6'" |
| | | :loading="statusLoading === 6" |
| | | :disabled="footerLoading" |
| | | @click="statusChange(6)" |
| | | color="#4C34FF" |
| | | > |
| | | 验收通过 |
| | | </el-button> |
| | | </template> |
| | | <el-button |
| | | v-if="!dialogReadonly || (['1', '4'].includes(taskStatus) && permission.flyOrder_add)" |
| | | :loading="submitting" |
| | | :disabled="submitting" |
| | | :disabled="footerLoading" |
| | | color="#4C34FF" |
| | | @click="handleSubmit" |
| | | > |
| | | 提交 |
| | | </el-button> |
| | | <template v-if="permission.flyOrder_controlSignFor"> |
| | | <el-button v-if="taskStatus === '0'" @click="addDescription" color="#F2F3F5">拒绝签收</el-button> |
| | | <el-button v-if="taskStatus === '0'" @click="statusChange(1)" color="#4C34FF">签收</el-button> |
| | | <el-button v-if="taskStatus === '0'" :disabled="footerLoading" @click="addDescription" color="#F2F3F5"> |
| | | 拒绝签收 |
| | | </el-button> |
| | | <el-button |
| | | v-if="taskStatus === '0'" |
| | | :loading="statusLoading === 1" |
| | | :disabled="footerLoading" |
| | | @click="statusChange(1)" |
| | | color="#4C34FF" |
| | | > |
| | | 签收 |
| | | </el-button> |
| | | </template> |
| | | <template v-if="permission.flyOrder_controlReview"> |
| | | <el-button v-if="taskStatus === '3'" @click="addDescription" color="#F2F3F5">驳回</el-button> |
| | | <el-button v-if="taskStatus === '3'" @click="statusChange(4)" color="#4C34FF">通过</el-button> |
| | | <el-button v-if="taskStatus === '3'" :disabled="footerLoading" @click="addDescription" color="#F2F3F5"> |
| | | 驳回 |
| | | </el-button> |
| | | <el-button |
| | | v-if="taskStatus === '3'" |
| | | :loading="statusLoading === 4" |
| | | :disabled="footerLoading" |
| | | @click="statusChange(4)" |
| | | color="#4C34FF" |
| | | > |
| | | 通过 |
| | | </el-button> |
| | | </template> |
| | | </template> |
| | | <RefuseOrderDialog1 |
| | |
| | | <script setup> |
| | | import { computed, ref, onMounted, inject } from 'vue' |
| | | import { ElMessage } from 'element-plus' |
| | | import { fieldRules, flyVisual, geomAnalysis, getAiImg } from '@ztzf/utils' |
| | | import { fieldRules, flyVisual, geomAnalysis, appendAiImages } from '@ztzf/utils' |
| | | import { |
| | | gdPatrolTaskRepublish, |
| | | gdFlyerPageApi, |
| | |
| | | import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue' |
| | | import { gdTaskResultListApi } from '@/views/orderView/orderManage/clueEvents/achievementApi' |
| | | import RefuseOrderDialog1 from '@/views/orderView/orderManage/inspectionRequest/RefuseOrderDialog1.vue' |
| | | import { Check } from '@element-plus/icons-vue' |
| | | import { Check, VideoPlay } from '@element-plus/icons-vue' |
| | | import { queryAirById, airlineListApi, algorithmGroupedApi } from '@/api/zkxt' |
| | | import * as Cesium from 'cesium' |
| | | import { useStore } from 'vuex' |
| | |
| | | const visible = defineModel() |
| | | const dialogMode = ref('view') |
| | | const submitting = ref(false) |
| | | const statusLoading = ref(null) |
| | | const footerLoading = computed(() => submitting.value || statusLoading.value !== null) |
| | | const detailLoaded = ref(false) |
| | | const dialogReadonly = computed(() => dialogMode.value === 'view') |
| | | const titleEnum = ref({ edit: '编辑', view: '查看' }) |
| | |
| | | } |
| | | |
| | | // 操作类型:1.同意签收、2.拒绝签收 、3.撤回任务 、4.同意审核、 5.拒绝审核、 6.验收通过、 7.验收拒绝 |
| | | function statusChange(auditStatus) { |
| | | gdPatrolTaskAuditApi({ auditStatus, id: formData.value.id }).then(res => { |
| | | async function statusChange(auditStatus) { |
| | | if (footerLoading.value) return |
| | | statusLoading.value = auditStatus |
| | | try { |
| | | await gdPatrolTaskAuditApi({ auditStatus, id: formData.value.id }) |
| | | visible.value = false |
| | | emit('success') |
| | | }) |
| | | } finally { |
| | | statusLoading.value = null |
| | | } |
| | | } |
| | | |
| | | function refusalToAccept() { |
| | |
| | | |
| | | // 提交编辑 |
| | | async function handleSubmit() { |
| | | const isValid = await formRef.value?.validate().catch(() => false) |
| | | if (!isValid) return |
| | | if (footerLoading.value) return |
| | | submitting.value = true |
| | | try { |
| | | const isValid = await formRef.value?.validate().catch(() => false) |
| | | if (!isValid) return |
| | | await gdPatrolTaskRepublish(formData.value) |
| | | ElMessage.success('更新成功') |
| | | visible.value = false |
| | |
| | | } |
| | | |
| | | let taskResultList = ref([]) |
| | | // 缩略图加载失败时展示原图 |
| | | function handleThumbnailError(item) { |
| | | if (item.thumbnail !== item.resultUrl) { |
| | | item.thumbnail = item.resultUrl |
| | | } |
| | | } |
| | | |
| | | // 获取成果列表 |
| | | async function getTaskResultList() { |
| | | if (!formData.value?.id) return |
| | | try { |
| | | const res = await gdTaskResultListApi({ patrolTaskId: formData.value.id }) |
| | | taskResultList.value = await Promise.all( |
| | | (res?.data?.data ?? []).map(async item => { |
| | | if (item.attachmentType !== 2) return item |
| | | const aiImg = await getAiImg(item.resultUrl,item.geojson) |
| | | return { ...item, aiImg } |
| | | }) |
| | | ) |
| | | taskResultList.value = (res?.data?.data ?? []).map(item => ({ |
| | | ...item, |
| | | thumbnail: item.resultUrl.replace(/(\.[^./?]+)(\?.*)?$/, '_thumbnail$1$2'), |
| | | })) |
| | | taskResultList.value.forEach(item => { |
| | | if (item.attachmentType === 2 && item.geojson !== '[]' && item.geojson?.length) { |
| | | appendAiImages(item) |
| | | } |
| | | }) |
| | | } finally { |
| | | } |
| | | } |
| | |
| | | outlineWidth: 0, |
| | | speed: 5, |
| | | }) |
| | | |
| | | // 创建航线起终点标记 |
| | | function createRouteEndpoint(position, text, color) { |
| | | viewer.entities.add({ |
| | | position: Cesium.Cartesian3.fromDegrees(Number(position[0]), Number(position[1]), position[2]), |
| | | point: { |
| | | pixelSize: 16, |
| | | color, |
| | | outlineColor: Cesium.Color.WHITE, |
| | | outlineWidth: 4, |
| | | disableDepthTestDistance: Number.POSITIVE_INFINITY, |
| | | }, |
| | | label: { |
| | | text, |
| | | font: 'bold 14px sans-serif', |
| | | fillColor: Cesium.Color.WHITE, |
| | | outlineColor: Cesium.Color.BLACK.withAlpha(0.35), |
| | | outlineWidth: 2, |
| | | style: Cesium.LabelStyle.FILL_AND_OUTLINE, |
| | | showBackground: true, |
| | | backgroundColor: color.withAlpha(0.9), |
| | | backgroundPadding: new Cesium.Cartesian2(10, 6), |
| | | pixelOffset: new Cesium.Cartesian2(0, -18), |
| | | verticalOrigin: Cesium.VerticalOrigin.BOTTOM, |
| | | disableDepthTestDistance: Number.POSITIVE_INFINITY, |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | // 获取航线详情 |
| | | function getAirDetails() { |
| | | const dockHeight = formData.value.height |
| | |
| | | material: arrowLineMaterialProperty, |
| | | }, |
| | | }) |
| | | // 渲染起点(蓝色) |
| | | // 渲染起点 |
| | | const startPoint = result[0] |
| | | viewer.entities.add({ |
| | | position: Cesium.Cartesian3.fromDegrees(Number(startPoint[0]), Number(startPoint[1]), startPoint[2]), |
| | | point: { |
| | | pixelSize: 12, |
| | | color: Cesium.Color.BLUE, |
| | | outlineColor: Cesium.Color.WHITE, |
| | | outlineWidth: 2, |
| | | }, |
| | | }) |
| | | // 渲染终点(红色) |
| | | createRouteEndpoint(startPoint, '起点', Cesium.Color.fromCssColorString('#22C55E')) |
| | | // 渲染终点 |
| | | const endPoint = result[result.length - 1] |
| | | viewer.entities.add({ |
| | | position: Cesium.Cartesian3.fromDegrees(Number(endPoint[0]), Number(endPoint[1]), endPoint[2]), |
| | | point: { |
| | | pixelSize: 12, |
| | | color: Cesium.Color.RED, |
| | | outlineColor: Cesium.Color.WHITE, |
| | | outlineWidth: 2, |
| | | }, |
| | | }) |
| | | createRouteEndpoint(endPoint, '终点', Cesium.Color.fromCssColorString('#EF4444')) |
| | | flyVisual({ |
| | | positionsData: list.map(i => [Number(i.longitude), Number(i.latitude), i.height || 0]), |
| | | viewer, |