/*
|
* @Author: shuishen 1109946754@qq.com
|
* @Date: 2025-04-17 20:17:12
|
* @LastEditors: shuishen 1109946754@qq.com
|
* @LastEditTime: 2025-04-17 20:28:08
|
* @FilePath: \command-center-dashboard\src\utils\stateToImageMap\drone.js
|
* @Description:
|
*
|
* Copyright (c) 2025 by shuishen, All Rights Reserved.
|
*/
|
import endingImg from '@/assets/images/aiNowFly/ending.png'
|
import endingHighImg from '@/assets/images/aiNowFly/ending-high.png'
|
|
const droneImage = {
|
'OFFLINE': endingImg,
|
'WORKING': endingHighImg,
|
'LEISURE': endingHighImg
|
}
|
|
/**
|
* 根据机巢状态获取图片
|
* @param {string} status 状态
|
* @returns
|
*/
|
export const getDroneStatusImage = (status) => droneImage[status] || endingHighImg
|
|
/**
|
* 根据机巢状态获取图片
|
* @param {boolean} isOnline 状态
|
* @returns
|
*/
|
export const getDroneFlagImage = (isOnline) => isOnline ? endingHighImg : endingImg
|