吉安感知网项目-前端
张含笑
2026-01-28 bed023eede3ceb53995d85d7daa9b6c748deeb97
Merge remote-tracking branch 'origin/master'
3 files modified
52 ■■■■■ changed files
applications/drone-command/src/views/basicManage/deviceStock/fwDeviceTrackApi.js 9 ●●●●● patch | view | raw | blame | history
applications/drone-command/src/views/basicManage/deviceStock/index.vue 31 ●●●●● patch | view | raw | blame | history
applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/ViewDiaLog.vue 12 ●●●●● patch | view | raw | blame | history
applications/drone-command/src/views/basicManage/deviceStock/fwDeviceTrackApi.js
@@ -35,3 +35,12 @@
        params,
    })
}
// 更新出库状态
export const fwDeviceUpdateTrackStatusApi = params => {
    return request({
        url: `/drone-fw/device/fwDevice/updateTrackStatus`,
        method: 'post',
        params,
    })
}
applications/drone-command/src/views/basicManage/deviceStock/index.vue
@@ -86,11 +86,17 @@
                            {{ getDictLabel(row.status, dictObj.deviceStatus) }}
                        </template>
                    </el-table-column>
                    <el-table-column prop="yxzt" show-overflow-tooltip width="116" label="出库状态">
                        <template v-slot="{ row }">
                            {{ getDictLabel(row.trackStatus, trackStatusOptions) }}
                        </template>
                    </el-table-column>
                    <el-table-column label="操作" class-name="operation-btns">
                        <template v-slot="{ row }">
                            <el-link @click="handleView(row)">查看</el-link>
                            <el-link @click="handleEdit(row)">编辑</el-link>
                            <el-link @click="outbound(row)">出库</el-link>
                            <el-link v-if="row.trackStatus === 0" @click="outbound(row)">出库</el-link>
                            <el-link v-else @click="returnDevice(row)">归还</el-link>
                            <el-link @click="scrap(row)" v-if="row.status !== 3">报废</el-link>
                            <!--                    <el-link @click="handleDelete(row)" type="danger">删除</el-link>-->
                        </template>
@@ -121,6 +127,7 @@
import { onMounted, ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { exportFwDeviceApi, fwDevicePageApi, fwDeviceRemoveApi } from '@/views/basicManage/deviceStock/fwDevice'
import { fwDeviceUpdateTrackStatusApi } from '@/views/basicManage/deviceStock/fwDeviceTrackApi'
import FormDiaLog from './FormDiaLog.vue'
import { getDictionaryByCode } from '@/api/system/dictbiz'
import { getDeptTree } from '@/api/system/dept'
@@ -162,6 +169,12 @@
provide('dictObj', dictObj)
provide('deptTree', deptTree)
// 出库状态
const trackStatusOptions = ref([
    { dictKey: 0, dictValue: '未出库' },
    { dictKey: 1, dictValue: '已出库' }
])
// 获取列表
async function getList() {
    const range = dateRangeFormat(dateRange.value)
@@ -204,6 +217,22 @@
    outboundDialogRef.value?.open({ mode: 'edit', row: { ...row } })
}
// 归还
async function returnDevice(row) {
    await ElMessageBox.confirm(`确认归还吗?`, '提示', {
        type: 'warning',
        customClass: 'command-page-view-message-box',
        confirmButtonClass: 'command-message-box-confirm',
        cancelButtonClass: 'command-message-box-cancel',
    })
    const payload = {
        deviceId: row.id
    }
    await fwDeviceUpdateTrackStatusApi(payload)
    ElMessage.success('归还成功')
    getList()
}
function scrap(row) {
    scrapDialogRef.value?.open({ mode: 'edit', row: { ...row } })
}
applications/task-work-order/src/views/orderView/orderManage/inspectionRequest/ViewDiaLog.vue
@@ -46,7 +46,11 @@
                        </el-col>
                        <el-col :span="12">
                            <div class="label">巡查任务航线</div>
                            <div class="val">{{ getAirName(formData.patrolRouteUrl) }}</div>
                            <div class="val val-long">
                                <el-tooltip :content="getAirName(formData.patrolRouteUrl)" placement="top">
                                    {{ getAirName(formData.patrolRouteUrl) }}
                                </el-tooltip>
                            </div>
                        </el-col>
                        <el-col :span="12">
                            <div class="label">推荐飞手</div>
@@ -507,4 +511,10 @@
</script>
<style lang="scss" scoped>
.val-long {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}
</style>