| | |
| | | </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 |
| | |
| | | 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 |
| | |
| | | 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, |