吉安感知网项目-前端
张含笑
2026-01-29 f941f89adf8c6e6580dfc018520c37de12ca9c4c
Merge remote-tracking branch 'origin/master'
12 files modified
535 ■■■■■ changed files
applications/drone-command/src/views/areaManage/precinctInfo/FormDiaLog.vue 256 ●●●●● patch | view | raw | blame | history
applications/drone-command/src/views/basicManage/deviceStock/DeviceScrapDiaLog.vue 1 ●●●● patch | view | raw | blame | history
applications/drone-command/src/views/basicManage/deviceStock/index.vue 30 ●●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/equipmentResource/FormDiaLog.vue 28 ●●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/equipmentResource/index.vue 10 ●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/orderManage/inspectionReport/index.vue 79 ●●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/orderManage/inspectionReport/inspectionRequestApi.js 3 ●●●● patch | view | raw | blame | history
uniapps/work-wx/src/api/index.js 8 ●●●●● patch | view | raw | blame | history
uniapps/work-wx/src/pages/page/index.vue 16 ●●●●● patch | view | raw | blame | history
uniapps/work-wx/src/store/modules/app/index.js 7 ●●●●● patch | view | raw | blame | history
uniapps/work-wx/src/subPackages/flightApplication/details.vue 91 ●●●● patch | view | raw | blame | history
uniapps/work-wx/src/subPackages/flightApplication/index.vue 6 ●●●●● patch | view | raw | blame | history
applications/drone-command/src/views/areaManage/precinctInfo/FormDiaLog.vue
@@ -1,6 +1,10 @@
<template>
    <el-dialog class="command-page-view-dialog" v-model="visible" :title="titleEnum[dialogMode]"
        :close-on-click-modal="false">
    <el-dialog
        class="command-page-view-dialog"
        v-model="visible"
        :title="titleEnum[dialogMode]"
        :close-on-click-modal="false"
    >
        <div class="detail-container" v-if="readonly">
            <el-row>
                <el-col :span="12">
@@ -12,75 +16,98 @@
                    <div class="val">{{ formData.contactPerson }}</div>
                </el-col>
                <el-col :span="12">
                    <div class="label">位置</div>
                    <div class="val">{{ formData.address }}</div>
                </el-col>
                <el-col :span="12">
                    <div class="label">联系方式</div>
                    <div class="val">{{ formData.contactPhone }}</div>
                </el-col>
                <el-col :span="12">
                    <div class="label">位置</div>
                    <div class="val">{{ formData.address }}</div>
                </el-col>
            </el-row>
        </div>
        <el-form class="dialog-form" v-else ref="formRef" :model="formData" :rules="rules" :disabled="readonly"
            label-width="100px">
        <el-form
            class="dialog-form"
            v-else
            ref="formRef"
            :model="formData"
            :rules="rules"
            :disabled="readonly"
            label-width="100px"
        >
            <el-row>
                <el-col :span="24">
                    <el-form-item label="派出所名称" prop="stationName">
                        <el-input class="command-input" v-model="formData.stationName" maxlength="50"
                            placeholder="请输入" clearable />
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="位置" prop="longitude">
                        <el-button  class="address-btn" @click="selectLocation">
                            {{ formData.longitude }}, {{ formData.latitude }}, {{ formData.address }}
                        </el-button>
                        <el-input
                            class="command-input"
                            v-model="formData.stationName"
                            maxlength="50"
                            placeholder="请输入"
                            clearable
                        />
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="联系人" prop="contactPerson">
                        <el-input class="command-input" v-model="formData.contactPerson" maxlength="50"
                            placeholder="请输入" clearable />
                        <el-input
                            class="command-input"
                            v-model="formData.contactPerson"
                            maxlength="50"
                            placeholder="请输入"
                            clearable
                        />
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="联系方式" prop="contactPhone">
                        <el-input class="command-input" v-model="formData.contactPhone" maxlength="50"
                            placeholder="请输入" clearable />
                        <el-input
                            class="command-input"
                            v-model="formData.contactPhone"
                            maxlength="50"
                            placeholder="请输入"
                            clearable
                        />
                    </el-form-item>
                </el-col>
                <el-col :span="24">
                    <el-form-item label="位置" prop="longitude">
                        <div class="location-container">
                            <div class="location-info" v-if="formData.longitude && formData.latitude">
                                经度: {{ formData.longitude }}, 纬度: {{ formData.latitude }}
                                <span v-if="formData.address">, {{ formData.address }}</span>
                            </div>
                            <div class="location-info" v-else>请在地图上点击选择位置</div>
                            <div class="inline-map-container">
                                <CommonCesiumMap
                                    ref="inlineMapRef"
                                    class="inline-map command-cesium"
                                    :active="visible && !readonly"
                                    :flat-mode="false"
                                    :terrain="true"
                                    :layer-mode="4"
                                    :boundary="false"
                                />
                            </div>
                        </div>
                    </el-form-item>
                </el-col>
            </el-row>
        </el-form>
        <template #footer>
            <el-button v-if="dialogMode != 'view'" color="#2B2B4C" @click="handleCancel">{{ readonly ? '关闭' : '取消' }}</el-button>
            <el-button color="#284FE3" v-if="!readonly" type="primary" :loading="submitting" :disabled="submitting"
                @click="handleSubmit">
            <el-button v-if="dialogMode != 'view'" color="#2B2B4C" @click="handleCancel">
                {{ readonly ? '关闭' : '取消' }}
            </el-button>
            <el-button
                color="#284FE3"
                v-if="!readonly"
                type="primary"
                :loading="submitting"
                :disabled="submitting"
                @click="handleSubmit"
            >
                确定
            </el-button>
        </template>
    </el-dialog>
    <el-dialog class="command-page-map-view-dialog" v-model="visible1" :show-close="false"
            :close-on-click-modal="false" destroy-on-close @closed="positionClosed">
            <div class="dialog-container">
                <div class="left-container">
                    <CommonCesiumMap
                        ref="mapRef"
                        class="leftMap command-cesium"
                        :active="visible1"
                        :flat-mode="false"
                        :terrain="true"
                        :layer-mode="4"
                        :boundary="false"
                    />
                </div>
            </div>
            <template #footer>
                <el-button color="#2B2B4C" @click="handleMapCancel">取消</el-button>
                <el-button color="#284FE3" type="primary" @click="handleMapConfirm">确定</el-button>
            </template>
        </el-dialog>
</template>
<script setup>
@@ -99,21 +126,19 @@
    contactPerson: '', // 联系人
    contactPhone: '', // 联系方式
    stationName: '', // 派出所名称
    longitude: 0,
    latitude: 0,
    longitude: null,
    latitude: null,
})
const emit = defineEmits(['success'])
const formRef = ref(null) // 表单实例
const formData = ref(initForm()) // 表单数据
const visible = defineModel() // 弹框显隐
const visible1 = ref(false) // 弹框显隐
const dialogMode = ref('add') // 弹框模式
const submitting = ref(false) // 提交中
const readonly = computed(() => dialogMode.value === 'view')
const titleEnum = ref({ edit: '编辑', view: '查看', add: '新增' })
const tempLocation = ref({ longitude: null, latitude: null })
const mapRef = ref(null)
const inlineMapRef = ref(null) // 内嵌地图引用
const route = useRoute()
const rules = {
@@ -121,15 +146,16 @@
    stationName: fieldRules(true, 50),
    contactPerson: fieldRules(true, 50),
    contactPhone: fieldRules(true, 50),
    longitude: fieldRules(true),
}
// 关闭弹框
function handleCancel () {
function handleCancel() {
    visible.value = false
}
// 提交新增/编辑
async function handleSubmit () {
async function handleSubmit() {
    const isValid = await formRef.value?.validate().catch(() => false)
    if (!isValid) return
    submitting.value = true
@@ -149,13 +175,31 @@
}
// 加载详情
async function loadDetail () {
async function loadDetail() {
    if (!formData.value.id) return
    const res = await fwPoliceStationDetailApi({ id: formData.value.id })
    formData.value = res?.data?.data ?? {}
}
function LeftClickEvent (click) {
let viewer
let redPointEntity
let leftClickBound = false
const labelParams = {
    font: '16px',
    fillColor: Cesium.Color.WHITE, // 文字颜色:白色
    backgroundColor: Cesium.Color.BLACK, //背景颜色
    backgroundPadding: new Cesium.Cartesian2(5, 5), // 水平/垂直内边距(像素)
    pixelOffset: new Cesium.Cartesian2(0, -20), // 可选:微调位置
    showBackground: true, // 确保背景显示(某些版本需要)
    style: Cesium.LabelStyle.FILL_AND_OUTLINE,
    horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
    verticalOrigin: Cesium.VerticalOrigin.CENTER,
    outlineWidth: 1,
    outlineColor: Cesium.Color.WHITE,
    heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
}
function LeftClickEvent(click) {
    const pos = click.position // Cartesian2 屏幕坐标
    // 屏幕坐标 -> 椭球面坐标(不考虑地形/模型)
    const cartesian3 = viewer.camera.pickEllipsoid(pos, viewer.scene.globe.ellipsoid)
@@ -166,7 +210,11 @@
    const carto = Cesium.Cartographic.fromCartesian(cartesian3)
    const longitude = Cesium.Math.toDegrees(carto.longitude)
    const latitude = Cesium.Math.toDegrees(carto.latitude)
    tempLocation.value = { longitude, latitude }
    // 直接更新 formData
    formData.value.longitude = _.round(longitude, 6)
    formData.value.latitude = _.round(latitude, 6)
    getLocationName(longitude, latitude)
    // 添加红点(全局仅保留一个)并渲染经纬度标签
    if (!redPointEntity) {
        redPointEntity = viewer.entities.add({
@@ -174,21 +222,11 @@
            point: {
                color: Cesium.Color.RED,
                pixelSize: 10,
                heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
            },
            label: {
                text: `${longitude.toFixed(6)}, ${latitude.toFixed(6)}`,
                font: '14px',
                fillColor: Cesium.Color.WHITE, // 文字颜色:白色
                backgroundColor: Cesium.Color.BLACK.withAlpha(0.6), //背景颜色
                backgroundPadding: new Cesium.Cartesian2(5, 5), // 水平/垂直内边距(像素)
                pixelOffset: new Cesium.Cartesian2(0, -20), // 可选:微调位置
                showBackground: true, // 确保背景显示(某些版本需要)
                style: Cesium.LabelStyle.FILL_AND_OUTLINE,
                horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
                verticalOrigin: Cesium.VerticalOrigin.CENTER,
                outlineWidth: 1,
                outlineColor: Cesium.Color.WHITE,
                eyeOffset: new Cesium.Cartesian3(0, 0, -20), // 负值更靠近相机(显示在前)
                ...labelParams
            },
        })
    } else {
@@ -197,14 +235,7 @@
    }
}
function positionClosed () {
    redPointEntity = null
}
let viewer
let redPointEntity
let leftClickBound = false
function setMapPoint (longitude, latitude) {
function setMapPoint(longitude, latitude) {
    if (!viewer || longitude == null || latitude == null) return
    if (!redPointEntity) {
        redPointEntity = viewer.entities.add({
@@ -212,21 +243,11 @@
            point: {
                color: Cesium.Color.RED,
                pixelSize: 10,
                heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
            },
            label: {
                text: `${longitude.toFixed(6)}, ${latitude.toFixed(6)}`,
                font: '14px',
                fillColor: Cesium.Color.WHITE,
                backgroundColor: Cesium.Color.BLACK.withAlpha(0.6),
                backgroundPadding: new Cesium.Cartesian2(5, 5),
                pixelOffset: new Cesium.Cartesian2(0, -20),
                showBackground: true,
                style: Cesium.LabelStyle.FILL_AND_OUTLINE,
                horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
                verticalOrigin: Cesium.VerticalOrigin.CENTER,
                outlineWidth: 1,
                outlineColor: Cesium.Color.WHITE,
                eyeOffset: new Cesium.Cartesian3(0, 0, -20),
                ...labelParams
            },
        })
    } else {
@@ -235,34 +256,27 @@
    }
}
function formatCoord (value) {
function formatCoord(value) {
    if (value == null || value === '') return '-'
    return _.round(Number(value), 6)
}
async function selectLocation () {
    visible1.value = true
// 初始化内嵌地图
async function initInlineMap() {
    await nextTick()
    const map = mapRef.value?.getMap()
    const map = inlineMapRef.value?.getMap()
    viewer = map?.viewer || null
    if (viewer && !leftClickBound) {
        map.publicCesium?.addLeftClickEvent?.(null, LeftClickEvent)
        leftClickBound = true
    }
    if (formData.value.longitude != null && formData.value.latitude != null) {
        tempLocation.value = { longitude: formData.value.longitude, latitude: formData.value.latitude }
        setMapPoint(formData.value.longitude, formData.value.latitude)
    }
}
function handleMapCancel () {
    tempLocation.value = { longitude: null, latitude: null }
    visible1.value = false
}
async function getLocationName () {
async function getLocationName(longitude, latitude) {
    const tk = import.meta.env.VITE_APP_TDT_TOKEN
    const { latitude, longitude } = tempLocation.value
    const http = axios.create({ withCredentials: false })
    const res = await http({
        url: `https://api.tianditu.gov.cn/geocoder?postStr={'lon':${longitude},'lat':${latitude},'ver':1}&tk=${tk}`,
@@ -271,24 +285,44 @@
    formData.value.address = res.data.result.formatted_address
}
function handleMapConfirm () {
    if (tempLocation.value.longitude != null && tempLocation.value.latitude != null) {
        formData.value.longitude = _.round(tempLocation.value.longitude, 6)
        formData.value.latitude = _.round(tempLocation.value.latitude, 6)
        getLocationName()
    }
    visible1.value = false
}
// 打开弹框
async function open ({ mode, row } = {}) {
async function open({ mode, row } = {}) {
    dialogMode.value = mode || 'add'
    formData.value = dialogMode.value === 'add' ? initForm() : row
    dialogMode.value !== 'add' && (await loadDetail())
    redPointEntity = null
    leftClickBound = false
    if (dialogMode.value !== 'add') {
        await loadDetail()
    }
    // 延迟初始化地图,确保 DOM 渲染完成
    setTimeout(() => {
        initInlineMap()
    }, 500)
}
defineExpose({ open })
</script>
<style scoped lang="scss">
.location-container {
    width: 100%;
}
.location-info {
    margin-bottom: 8px;
    color: #fff;
    font-size: 14px;
}
.inline-map-container {
    width: 100%;
    height: 300px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.inline-map {
    width: 100%;
    height: 100%;
}
</style>
applications/drone-command/src/views/basicManage/deviceStock/DeviceScrapDiaLog.vue
@@ -118,7 +118,6 @@
}
onMounted(() => {
    getCheckAreaBind()
})
defineExpose({ open })
applications/drone-command/src/views/basicManage/deviceStock/index.vue
@@ -1,9 +1,9 @@
<template>
    <basic-container>
        <div class="chart">
            <DeviceChart1 />
            <DeviceChart2 />
            <DeviceChart3 />
            <DeviceChart1 :key="updateKey"/>
            <DeviceChart2 :key="updateKey"/>
            <DeviceChart3 :key="updateKey"/>
        </div>
        <el-form ref="queryParamsRef" :model="searchParams" class="command-page-history-search">
@@ -77,9 +77,9 @@
                            {{ dayjs(row.createTime).format('YYYY-MM-DD') }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="source" show-overflow-tooltip width="112" label="来源" />
                    <el-table-column prop="purpose" show-overflow-tooltip width="206" label="用途" />
                    <el-table-column prop="belongDeptName" show-overflow-tooltip label="所属部门" />
                    <el-table-column prop="source" show-overflow-tooltip width="120" label="来源" />
                    <el-table-column prop="purpose" show-overflow-tooltip width="130" label="用途" />
                    <el-table-column prop="belongDeptName" show-overflow-tooltip width="160" label="所属部门" />
                    <el-table-column prop="charger" show-overflow-tooltip width="100" label="负责人" />
                    <el-table-column prop="yxzt" show-overflow-tooltip width="116" label="运行状态">
                        <template v-slot="{ row }">
@@ -91,7 +91,7 @@
                            {{ getDictLabel(row.trackStatus, trackStatusOptions) }}
                        </template>
                    </el-table-column>
                    <el-table-column label="操作" class-name="operation-btns">
                    <el-table-column label="操作" class-name="operation-btns" width="140">
                        <template v-slot="{ row }">
                            <el-link @click="handleView(row)">查看</el-link>
                            <el-link @click="handleEdit(row)">编辑</el-link>
@@ -116,9 +116,9 @@
            </div>
        </div>
        <FormDiaLog ref="dialogRef" @success="getList" />
        <DeviceTrackDiaLog ref="outboundDialogRef" @success="getList" />
        <DeviceScrapDiaLog ref="scrapDialogRef" @success="getList" />
        <FormDiaLog ref="dialogRef" @success="successFun" />
        <DeviceTrackDiaLog ref="outboundDialogRef" @success="successFun" />
        <DeviceScrapDiaLog ref="scrapDialogRef" @success="successFun" />
    </basic-container>
</template>
@@ -175,6 +175,12 @@
    { dictKey: 1, dictValue: '已出库' }
])
const updateKey = ref(0)
function successFun() {
    updateKey.value = updateKey.value + 1
    getList()
}
// 获取列表
async function getList() {
    const range = dateRangeFormat(dateRange.value)
@@ -219,7 +225,7 @@
// 归还
async function returnDevice(row) {
    await ElMessageBox.confirm(`确认归还吗?`, '提示', {
    await ElMessageBox.confirm(`确认归还吗?`, '提示', {
        type: 'warning',
        customClass: 'command-page-view-message-box',
        confirmButtonClass: 'command-message-box-confirm',
@@ -240,7 +246,7 @@
// 删除
async function handleDelete(row) {
    const tips = row ? '该条' : '选中的项'
    await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', {
    await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', {
        type: 'warning',
        customClass: 'command-page-view-message-box',
        confirmButtonClass: 'command-message-box-confirm',
applications/task-work-order/src/views/orderView/equipmentResource/FormDiaLog.vue
@@ -25,6 +25,14 @@
        <div class="val">{{ getDictLabel(formData.devicePayload, devicePayloadOptions) }}</div>
      </el-col>
      <el-col :span="12">
        <div class="label">流量剩余(GB)</div>
        <div class="val">无</div>
      </el-col>
      <el-col :span="12">
        <div class="label">流量到期时间</div>
        <div class="val">无</div>
      </el-col>
      <el-col :span="12">
        <div class="label">设备状态</div>
        <div class="val">{{ getDictLabel(formData.modeCode, dictObj.modeCode) }}</div>
      </el-col>
@@ -36,6 +44,26 @@
        <div class="label">设备位置</div>
        <div class="val">{{ formData.latitude }}, {{ formData.longitude }}</div>
      </el-col>
      <el-col :span="12">
        <div class="label">保险有效期</div>
        <div class="val">无</div>
      </el-col>
      <el-col :span="12">
        <div class="label">固件版本</div>
        <div class="val">{{ formData.firmwareVersion }}</div>
      </el-col>
       <el-col :span="12">
        <div class="label">所属部门</div>
        <div class="val">{{ formData.deviceDeptName }}</div>
      </el-col>
      <el-col :span="12">
        <div class="label">最新在线时间</div>
        <div class="val">无</div>
      </el-col>
      <el-col :span="12">
        <div class="label">设备注册时间</div>
        <div class="val">无</div>
      </el-col>
    </el-row>
        <el-form
applications/task-work-order/src/views/orderView/equipmentResource/index.vue
@@ -54,9 +54,9 @@
            </el-form-item>
        </el-form>
        <div class="gd-table-toolbar">
        <!-- <div class="gd-table-toolbar">
            <el-button :icon="Plus" color="#4C34FF" type="primary" @click="addEquipment">新增</el-button>
        </div>
        </div> -->
        <div class="gd-table-container" v-loading="loading">
            <div class="gd-table-content gd-table-content-bg">
@@ -81,13 +81,13 @@
                            {{ row.latitude ? (row.latitude + ', ' + row.longitude) : '未定位' }}
                        </template>
                    </el-table-column>
                    <!-- <el-table-column prop="firmwareVersion" show-overflow-tooltip label="固件版本" /> -->
                    <el-table-column prop="firmwareVersion" show-overflow-tooltip label="固件版本" />
                    <el-table-column prop="deviceDeptName" show-overflow-tooltip label="所属部门" />
                    <el-table-column label="操作" class-name="operation-btns" width="180">
                        <template v-slot="{ row }">
                            <el-link @click="viewEquipment(row)">查看</el-link>
                            <el-link type="primary" @click="editEquipment(row)">编辑</el-link>
                            <el-link type="danger" @click="deleteEquipment(row)">删除</el-link>
                            <!-- <el-link type="primary" @click="editEquipment(row)">编辑</el-link>
                            <el-link type="danger" @click="deleteEquipment(row)">删除</el-link> -->
                        </template>
                    </el-table-column>
                </el-table>
applications/task-work-order/src/views/orderView/orderManage/inspectionReport/index.vue
@@ -82,10 +82,9 @@
        </div>
        <el-dialog
            class="gd-dialog"
            append-to-body
            v-model="isShowEditView"
            :title="titleTxt"
            :width="pxToRem(800)"
            :width="pxToRem(500)"
            :close-on-click-modal="false"
            :destroy-on-close="true"
            @close="handleClose"
@@ -313,43 +312,53 @@
        ElMessage.warning('请选择要下载的文件')
        return
    }
    if (selectedFiles.value.length === 1) {
        selectedFiles.value.forEach((file, index) => {
            // setTimeout(() => {
            if (file.link) {
                const a = document.createElement('a')
                a.href = file.link
                a.download = file.originalName || `attachment_${index + 1}`
                document.body.appendChild(a)
                a.click()
                document.body.removeChild(a)
            }
            // }, index * 300) // 300ms delay between downloads
        })
    } else {
        // 批量下载
        try {
            console.log(selectedFiles.value, '9999')
            loadingData = ElLoading.service({ background: 'rgba(0, 0, 0, 0.5)', text: '打包中,请稍等...' })
    // if (selectedFiles.value.length === 1) {
    //     selectedFiles.value.forEach(async (file, index) => {
    //         if (file.link) {
    //             try {
    //                 // 使用 fetch 获取 blob 数据来强制下载,避免浏览器打开文件
    //                 const response = await fetch(file.link)
    //                 if (!response.ok) {
    //                     throw new Error(`Failed to fetch file: ${response.status}`)
    //                 }
    //                 const blob = await response.blob()
    //                 const url = URL.createObjectURL(blob)
    //                 const a = document.createElement('a')
    //                 a.href = url
    //                 a.download = file.originalName || `attachment_${index + 1}`
    //                 document.body.appendChild(a)
    //                 a.click()
    //                 document.body.removeChild(a)
    //                 // 释放 URL 对象
    //                 setTimeout(() => URL.revokeObjectURL(url), 100)
    //                 ElMessage.success('下载成功')
    //             } catch (error) {
    //                 console.error('Download error:', error)
    //                 ElMessage.error(`下载文件 ${file.originalName} 失败: ${error.message}`)
    //             }
    //         }
    //     })
    // } else {
            try {
            const fileIds = selectedFiles.value.map(i => i.id).join(',')
            // const res = await getDownloadStatusApi({ type: 'dpsjzx' })
            // if (!['CANCELLED', 'COMPLETED'].includes(res.data.data?.status || 'COMPLETED')) {
            //     return ElMessage.warning('还有正在处理的')
            // }
            console.log(fileIds, '7777')
            await fjDownloadByByteApi({ attachIds: fileIds }).then(res => {
                if (res.data.code === 200) {
            const blob = res.data
            const url = URL.createObjectURL(blob)
            const a = document.createElement('a')
            a.href = url
            a.download = `巡查报告.zip`
            document.body.appendChild(a)
            a.click()
            document.body.removeChild(a)
            URL.revokeObjectURL(url)
                    ElMessage.success('下载成功')
                } else {
                    ElMessage.error(res.msg || '下载失败')
                }
            })
        } catch (e) {
        } finally {
            loadingData.close()
        }
                })
            } catch (e) {
            } finally {
                // loadingData.close()
            }
    }
    // }
}
// 文档上传
applications/task-work-order/src/views/orderView/orderManage/inspectionReport/inspectionRequestApi.js
@@ -47,9 +47,10 @@
// 批量打包下载
export const fjDownloadByByteApi = params => {
    return request({
        return request({
        url: `/blade-resource/attach/downloadByByte`,
        method: 'get',
        params,
        responseType: 'blob'
    })
}
uniapps/work-wx/src/api/index.js
@@ -175,6 +175,14 @@
  })
}
// 无人机起飞状态
export const flyActivityTakeoffStatusApi = () => {
  return request({
    url: `/system/dict/data/type/fly_activity_takeoff_status`,
    method: 'get'
  })
}
// 无人机厂商
export const manufacturerInfoApi = data => {
  return request({
uniapps/work-wx/src/pages/page/index.vue
@@ -86,7 +86,7 @@
  import docSvg from '@/static/images/doc.png'
  import lbBottomPng from '@/static/images/lb_bottom.png'
  import { sysNoticePageInfoApi, droneFlightTaskApi } from '@/api/index'
  import { flightTaskApi,flightRulesApi,flightModeApi,flightPlanApi,flyActivityStatusApi,proTypeApi} from '@/api/index'
  import { flightTaskApi,flightRulesApi,flightModeApi,flightPlanApi,flyActivityStatusApi,flyActivityTakeoffStatusApi,proTypeApi} from '@/api/index'
import { useAppStore } from "@/store";
const appStore = useAppStore()
@@ -293,6 +293,19 @@
    })
}
// 获取飞行状态
function flyActivityTakeoffStatus() {
    flyActivityTakeoffStatusApi().then(res => {
        flyActivityTakeoffStatus.value = res.data.data.map(item => ({
            ...item,
            label: item.dictLabel || '暂无',
            value: item.dictValue || '暂无',
        }))
        // 存储到store
        appStore.setFlyActivityTakeoffStatus(flyActivityTakeoffStatus.value)
    })
}
// 获取飞行器类型
const typeList = ref([])
function getProTypeApi() {
@@ -318,6 +331,7 @@
  getFlightRules()
  getFlightPlan()
  getFlyActivityStatus()
  flyActivityTakeoffStatus()
  getProTypeApi()
})
</script>
uniapps/work-wx/src/store/modules/app/index.js
@@ -16,6 +16,7 @@
    flightRules: [], // 飞行规则
    flightPlan: [], // 飞行计划
    flyActivityStatus: [], // 飞行活动状态
    flyActivityTakeoffStatus: [], // 无人机起飞状态
    proType: [], // 飞行器类型
  }),
  getters: {
@@ -41,6 +42,9 @@
    getFlyActivityStatus (state) {
      return state.flyActivityStatus
    },
    getFlyActivityTakeoffStatus (state) {
      return state.flyActivityTakeoffStatus
    },
    getProType (state) {
      return state.proType
    },
@@ -62,6 +66,9 @@
    setFlyActivityStatus (data) {
      this.flyActivityStatus = data
    },
    setFlyActivityTakeoffStatus (data) {
      this.flyActivityTakeoffStatus = data
    },
    setProType (data) {
      this.proType = data
    },
uniapps/work-wx/src/subPackages/flightApplication/details.vue
@@ -195,7 +195,54 @@
                border="none"
            ></u-input>
        </u-form-item>
        <u-popup :show="applyShow" :round="10" mode="center" @close="close" :closeable="true" :mask-close-able="true">
         <u-form labelPosition="top" :model="formParams" :rules="rules" ref="formRef">
            <u-form-item
                label="计划申请起飞时间"
                labelWidth="260rpx"
                prop="actualTakeoffTime"
                :borderBottom="true"
                ref="item1"
                @click="isShowStartTime = true"
                required
        >
            <u-input v-model="formParams.actualTakeoffTime" border="none" placeholder="请选择" suffixIcon="calendar"></u-input>
        </u-form-item>
         <u-form-item
                label="计划申请结束时间"
                labelWidth="260rpx"
                prop="actualLandingTime"
                :borderBottom="true"
                ref="item1"
                @click="isShowEndTime = true"
                required
        >
            <u-input v-model="formParams.actualLandingTime" border="none" placeholder="请选择" suffixIcon="calendar"></u-input>
        </u-form-item>
        <u-datetime-picker
            :show="isShowStartTime"
            v-model="startTime"
            mode="datetime"
            :min-date="minDate"
            :formatter="formatter"
            @confirm="onConfirmStartTime"
             @cancel="isShowStartTime = false">
        </u-datetime-picker>
        <u-datetime-picker
            :show="isShowEndTime"
            v-model="endTime"
            mode="datetime"
            :min-date="minDate"
            :formatter="formatter"
            @confirm="onConfirmEndTime"
            @cancel="isShowEndTime = false">
        </u-datetime-picker>
         </u-form>
         <u-button @click="submitApply" color="#1D6FE9">确定</u-button>
    </u-popup>
    </u-form>
    <u-button v-if="formParams.planApprovalStatus === '99'" @click="submitApply" color="#1D6FE9">申请</u-button>
</view>
</template>
<script setup>
@@ -232,17 +279,28 @@
const isShowStartTime = ref(false)
// 是否显示结束时间选择器
const isShowEndTime = ref(false)
// const startTime = ref(Date.now()); // 设置默认值为当前时间戳
// const endTime = ref(Date.now()); // 设置默认值为当前时间戳
const minDate = ref(Date.now()); // 设置最小日期为当前时间戳
const startTime = ref(Date.now()); // 设置默认值为当前时间戳
const endTime = ref(Date.now()); // 设置默认值为当前时间戳
// const onConfirmStartTime = (e) => {
//     formParams.value.flightStartTime = dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')
//     isShowStartTime.value = false
// }
// const onConfirmEndTime = (e) => {
//     formParams.value.flightEndTime = dayjs(e.value).format('YYYY-MM-DD HH:mm:ss')
//     isShowEndTime.value = false
// }
const onConfirmStartTime = (e) => {
    formParams.value.actualTakeoffTime = dayjs(e.value).format('YYYY-MM-DD HH:mm')
    isShowStartTime.value = false
}
const onConfirmEndTime = (e) => {
    formParams.value.actualLandingTime = dayjs(e.value).format('YYYY-MM-DD HH:mm')
    isShowEndTime.value = false
}
const formatter = (type, value) => {
    if (type === 'year') return `${value}年`;
    if (type === 'month') return `${value}月`;
    if (type === 'day') return `${value}日`;
    if (type === 'hour') return `${value}时`;
    if (type === 'minute') return `${value}分`;
    return value;
};
@@ -306,6 +364,19 @@
    })
}
// 申请
const applyShow = ref(false)
function submitApply() {
   applyShow.value = true
}
function close() {
    // 清空时间
    formParams.value.actualTakeoffTime = ''
    formParams.value.actualLandingTime = ''
    applyShow.value = false
}
onLoad((options) => {
     flightPlanDetailsApi(options.id).then(res => {
        // return
uniapps/work-wx/src/subPackages/flightApplication/index.vue
@@ -29,10 +29,11 @@
                            {{ approvalRecord.planApprovalStatusLabel || ''}}
                        </view>
                    </view>
                    <view class="txt">计划起飞状态:{{approvalRecord.fly_activity_takeoff_status || ''}}</view>
                    <view class="txt">飞行器:{{approvalRecord.spacecraftLabel || '无'}}</view>
                    <view class="txt">飞行任务:{{approvalRecord.flightTaskTypeLabel || ''}}</view>
                    <view class="txt">飞行起飞时间:{{approvalRecord.actualTakeoffTime || ''}}</view>
                    <view class="txt">飞行降落时间:{{approvalRecord.actualLandingTime || ''}}</view>
                    <view class="txt">飞行起飞时间:{{approvalRecord.flightStartTime || ''}}</view>
                    <view class="txt">飞行降落时间:{{approvalRecord.flightEndTime || ''}}</view>
                </view>
            </u-list>
        </view>
@@ -115,6 +116,7 @@
        newData.forEach(item => {
            item.spacecraftLabel = aircraftInfoList.value.find(info => info.value === item.spacecraftId)?.label || '无'
            item.planApprovalStatusLabel = appStore.flyActivityStatus.find(status => status.dictValue === item.planApprovalStatus)?.dictLabel || '无'
            item.flyActivityTakeoffStatusLabel = appStore.flyActivityTakeoffStatus.find(status => status.dictValue === item.planStatus)?.dictLabel || '无'
            item.flightTaskTypeLabel = appStore.taskType.find(type => type.dictValue === item.flightTaskType)?.dictLabel || '无'
        })
        // 如果是第一页,直接替换数据;否则追加数据