指令下发记录

This commit is contained in:
fengerli
2025-08-27 15:45:59 +08:00
parent 00eea217a0
commit e07a4fea01
7 changed files with 542 additions and 41 deletions

View File

@ -67,7 +67,8 @@
<div class="location-item">
<div>地址 <span class="lacatin_gps">{{ deviceDetail.address || "未获取到地址" }}</span></div>
<el-button link type="primary" class="view-btn">查看</el-button>
<el-button link type="primary" class="view-btn"
@click="lookMap(deviceDetail)">查看</el-button>
</div>
</div>
</div>
@ -128,6 +129,7 @@ import api from '@/api/controlCenter/controlPanel/index'
import { DeviceDetail, LightMode } from '@/api/controlCenter/controlPanel/types';
import { generateShortId, getDeviceStatus } from '@/utils/function';
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
const router = useRouter();
// 导入图片资源(确保路径正确)
import strongLightDefault from '@/assets/images/strong-light.png';
import strongLightActive from '@/assets/images/strong-light_HL.png';
@ -141,10 +143,10 @@ import laserLightDefault from '@/assets/images/laser-light.png';
import laserLightActive from '@/assets/images/laser-light_HL.png';
import closeDefault from '@/assets/images/close.png';
import closeActive from '@/assets/images/close_HL.png';
const fullscreenLoading = ref(false)
const fullscreenLoading = ref(false)
const forceAlarmLoading = ref(false) //强制报警
const sendTextLoading =ref(false)
const lightModesLoading =ref(false)
const sendTextLoading = ref(false)
const lightModesLoading = ref(false)
// 灯光模式数据(引用导入的图片)
const lightModes = ref<LightMode[]>([
@ -431,7 +433,7 @@ const forceAlarm = async () => {
}
} catch (error: any) {
proxy?.$modal.msgWarning(error.msg)
proxy?.$modal.msgWarning(error.msg)
} finally {
forceAlarmLoading.value = false;
@ -445,7 +447,7 @@ const sendTextMessage = async () => {
return;
}
try {
sendTextLoading.value = true;
sendTextLoading.value = true;
// 2. 准备请求数据
const batchId = generateShortId();
const data = {
@ -483,7 +485,16 @@ const sendTextMessage = async () => {
sendTextLoading.value = false;
}
}
const lookMap = (row: any) => {
console.log(row, 'row');
router.push({
path: '/controlCenter/controlPanel', // 目标页面的正确路由路径(需与项目路由配置一致)
query: {
view: 'map',
deviceId: row.deviceId // 可选传递当前设备ID用于地图定位/筛选
}
});
}
onMounted(() => {
getList();