applications/drone-command/src/api/dataCockpit/index.js
@@ -2,7 +2,7 @@ * @Author : yuan * @Date : 2026-01-09 11:14:04 * @LastEditors : yuan * @LastEditTime : 2026-01-09 11:35:14 * @LastEditTime : 2026-01-26 09:38:16 * @FilePath : \applications\drone-command\src\api\dataCockpit\index.js * @Description : * Copyright 2026 OBKoro1, All Rights Reserved. @@ -53,6 +53,27 @@ }) } // ???? export const alarmFavoriteSaveApi = (data) => { return request({ url: '/drone-fw/record/fwAlarmFavorite/save', method: 'post', data }) } // ?????? export const alarmFavoriteRemoveApi = (ids) => { const formattedIds = Array.isArray(ids) ? ids.join(',') : ids return request({ url: '/drone-fw/record/fwAlarmFavorite/cancelFavorite', method: 'post', params: { ids: formattedIds } }) } // 数据驾驶舱地图聚合 export const cockpitAggregationApi = () => { return request({ applications/drone-command/src/views/api.txt
@@ -1,22 +1,32 @@ ## 分页 ## 重点关注 **接口地址**:`/blade-log/log/operationLog/page` **接口地址**:`/drone-fw/record/fwAlarmFavorite/save` **请求方式**:`GET` **请求方式**:`POST` **请求数据类型**:`application/x-www-form-urlencoded` **请求数据类型**:`application/json` **响应数据类型**:`*/*` **接口描述**:<p>分页</p> **接口描述**:<p>传入fwAlarmFavorite</p> **请求示例**: ```javascript { "alarmRecordId": 0 } ``` **请求参数**: @@ -27,12 +37,8 @@ | 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema | | -------- | -------- | ----- | -------- | -------- | ------ | |createBy|操作人|query|false|string|| |current|当前页|query|false|integer(int32)|| |endTime|结束时间|query|false|string|| |size|每页的数量|query|false|integer(int32)|| |startTime|开始时间|query|false|string|| |title|日志类型(0菜单/1按钮)|query|false|string|| |fwAlarmFavorite|告警记录关注表|body|true|FwAlarmFavorite对象|FwAlarmFavorite对象| |  alarmRecordId|告警记录id||false|integer(int64)|| **响应状态**: @@ -40,7 +46,8 @@ | 状态码 | 说明 | schema | | -------- | -------- | ----- | |200|OK|R«IPage«OperationLogVO»»| |200|OK|R| |201|Created|| |401|Unauthorized|| |403|Forbidden|| |404|Not Found|| @@ -52,18 +59,7 @@ | 参数名称 | 参数说明 | 类型 | schema | | -------- | -------- | ----- |----- | |code|状态码|integer(int32)|integer(int32)| |data|承载数据|IPage«OperationLogVO»|IPage«OperationLogVO»| |  current||integer(int64)|| |  pages||integer(int64)|| |  records||array|OperationLogVO| |    createBy|操作人|string|| |    remoteIp|客户端IP|string|| |    requestUri|请求地址|string|| |    title|日志标题|string|| |    type|日志类型(0菜单/1按钮)|string|| |    userAgent|客户端|string|| |  size||integer(int64)|| |  total||integer(int64)|| |data|承载数据|object|| |msg|返回消息|string|| |success|是否成功|boolean|| @@ -72,22 +68,73 @@ ```javascript { "code": 0, "data": { "current": 0, "pages": 0, "records": [ { "createBy": "", "remoteIp": "", "requestUri": "", "title": "", "type": "", "userAgent": "" } ], "size": 0, "total": 0 }, "data": {}, "msg": "", "success": true } ``` ## 取消关注 **接口地址**:`/drone-fw/record/fwAlarmFavorite/remove` **请求方式**:`POST` **请求数据类型**:`application/json` **响应数据类型**:`*/*` **接口描述**:<p>传入ids</p> **请求参数**: **请求参数**: | 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema | | -------- | -------- | ----- | -------- | -------- | ------ | |ids|主键集合|query|true|string|| **响应状态**: | 状态码 | 说明 | schema | | -------- | -------- | ----- | |200|OK|R| |201|Created|| |401|Unauthorized|| |403|Forbidden|| |404|Not Found|| **响应参数**: | 参数名称 | 参数说明 | 类型 | schema | | -------- | -------- | ----- |----- | |code|状态码|integer(int32)|integer(int32)| |data|承载数据|object|| |msg|返回消息|string|| |success|是否成功|boolean|| **响应示例**: ```javascript { "code": 0, "data": {}, "msg": "", "success": true } applications/drone-command/src/views/dataCockpit/components/RealWarning.vue
@@ -2,7 +2,7 @@ * @Author : yuan * @Date : 2026-01-08 09:29:07 * @LastEditors : yuan * @LastEditTime : 2026-01-19 11:31:09 * @LastEditTime : 2026-01-26 09:59:52 * @FilePath : \applications\drone-command\src\views\dataCockpit\components\RealWarning.vue * @Description : * Copyright 2026 OBKoro1, All Rights Reserved. @@ -24,7 +24,7 @@ :data="item" @signal="() => handleAction('signal', item)" @counter="() => handleAction('counter', item)" @favorite="() => console.log('收藏', item.id)" @favorite="() => handleFavorite(item)" /> </div> </div> @@ -32,7 +32,12 @@ <script setup> import RealTemplate from './templateComponents/RealTemplate.vue' import { alarmLogApi, interferenceAndExpulsionApi } from '@/api/dataCockpit' import { alarmLogApi, alarmFavoriteRemoveApi, alarmFavoriteSaveApi, interferenceAndExpulsionApi } from '@/api/dataCockpit' import { onMounted, ref } from 'vue' import EmptyState from './EmptyState.vue' import { ElMessage } from 'element-plus' @@ -46,9 +51,23 @@ counter: '诱导驱离' } const getAlarmRecordId = (item) => item?.alarmRecordId ?? item?.id const getFavoriteId = (item) => item?.favoriteId ?? item?.alarmFavoriteId ?? item?.fwAlarmFavoriteId ?? item?.favoriteRecordId ?? getAlarmRecordId(item) const isFavorited = (item) => { const value = item?.favorited ?? item?.isFavorite return value === 1 || value === '1' || value === true } const buildPayload = (type, item) => ({ counterWay: type === 'signal' ? 1 : type === 'counter' ? 2 : '', alarmRecordId: item?.alarmRecordId ?? item?.id alarmRecordId: getAlarmRecordId(item) }) const handleAction = async (type, item) => { @@ -56,13 +75,36 @@ try { const res = await interferenceAndExpulsionApi(buildPayload(type, item)) if (res?.data?.success) { ElMessage({ type: 'success', message: `${actionText}成功` }) ElMessage({ type: 'success', message: actionText + '成功' }) await fetchRealWarning() } else { ElMessage({ type: 'error', message: res?.data?.msg || `${actionText}失败` }) ElMessage({ type: 'error', message: res?.data?.msg || actionText + '失败' }) } } catch (error) { ElMessage({ type: 'error', message: `${actionText}失败` }) ElMessage({ type: 'error', message: actionText + '失败' }) } } const handleFavorite = async (item) => { const alarmRecordId = getAlarmRecordId(item) if (!alarmRecordId) { ElMessage({ type: 'warning', message: '缺少告警记录ID' }) return } const isFavorite = isFavorited(item) const actionText = isFavorite ? '取消关注' : '关注' try { const res = isFavorite ? await alarmFavoriteRemoveApi(getFavoriteId(item)) : await alarmFavoriteSaveApi({ alarmRecordId }) if (res?.data?.success) { ElMessage({ type: 'success', message: actionText + '成功' }) await fetchRealWarning() } else { ElMessage({ type: 'error', message: res?.data?.msg || actionText + '失败' }) } } catch (error) { ElMessage({ type: 'error', message: actionText + '失败' }) } } @@ -73,7 +115,12 @@ const params = { current: 1, size: 20, alarmType: '1' } const res = await alarmLogApi(params) const records = res?.data?.data?.records ?? [] realWarningData.value = records realWarningData.value = records.map((record) => ({ ...record, isFavorite: record?.isFavorite ?? (record?.favorited === 1 || record?.favorited === '1') })) } finally { const elapsed = Date.now() - startAt if (elapsed < minLoadingMs) { applications/mobile-web-view/src/appComponents/workMap/index.vue
@@ -291,7 +291,7 @@ watch( () => mapCurrentDetail, newVal => { const newDataMap=JSON.parse(newVal) const newDataMap=newVal // 只有 workNavigationShow 为 true 且有经纬度时才添加标记 if (workNavigationShow && newDataMap?.longitude && newDataMap?.latitude) { addIncidentMarker(newDataMap) applications/mobile-web-view/src/appPages/work/workDetail/mapWork/index.vue
@@ -7,31 +7,21 @@ :workNavigationShow="true" :mapCurrentDetail="mapCurrentDetail" > <!-- <template #eventNav>--> <!-- <EventNavigation :mapCurrentDetail="mapCurrentDetail"></EventNavigation>--> <!-- </template>--> </WorkMap> </div> </template> <script setup> import { getDeviceRegion } from '@/api/home/aggregation' import WorkMap from '@/appComponents/workMap/index.vue' import EventNavigation from '@/appPages/work/workDetail/mapWork/eventNavigation.vue' import { useRoute } from 'vue-router' import { showToast } from 'vant' import { getList } from '/src/api/work/index.js' import { useStore } from 'vuex' const store = useStore() const userInfo = computed(() => store?.state?.user?.userInfo) const route = useRoute() const mapCurrentDetail = ref({}) const eventNum = ref('') onMounted(async () => { eventNum.value = route.query.currentItem mapCurrentDetail.value = eventNum.value mapCurrentDetail.value = JSON.parse(decodeURIComponent(route.query.currentItem)) }) </script>