jiangAB 4 weeks ago
parent
commit
cd4f47dcb1
  1. BIN
      public/img/未连接.png
  2. 2
      public/map/components/PortOverview.vue
  3. 4
      public/map/components/ShorePowerUsage.vue
  4. 2
      public/map/components/cesiumMap.vue
  5. 22
      public/map/index.vue

BIN
public/img/未连接.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

2
public/map/components/PortOverview.vue

@ -457,7 +457,7 @@ const getStatusClass = (status: string | undefined) => {
case '故障': case '故障':
return 'status-fault' return 'status-fault'
case '超容': case '超容':
return 'status-fault' return 'status-maintenance'
case '异常': case '异常':
return 'status-abnormal' return 'status-abnormal'
case '维修中': case '维修中':

4
public/map/components/ShorePowerUsage.vue

@ -1152,6 +1152,10 @@ onBeforeUnmount(() => {
gap: 10px; gap: 10px;
} }
.card .card-content {
overflow: hidden !important;
}
.average { .average {
.overview-value { .overview-value {

2
public/map/components/cesiumMap.vue

@ -859,7 +859,7 @@ onMounted(async () => {
let statusImage = null; let statusImage = null;
if (item.shipStatus === '正常') { if (item.shipStatus === '正常') {
// statusImage = null; // statusImage = null;
} else if (item.shipStatus === '故障') { } else if (item.shipStatus === '超容') {
statusImage = '/img/故障.png'; statusImage = '/img/故障.png';
} else { } else {
statusImage = '/img/未连接.png'; statusImage = '/img/未连接.png';

22
public/map/index.vue

@ -532,26 +532,36 @@ const handleGetStorePower = async () => {
} }
const getShipStatus = (ship: ShipRespVo) => { const getShipStatus = (ship: ShipRespVo) => {
// console.log(props.realtimeDeviceData) if (ship.shorePowerAndShip.status === 9) {
if (ship.applyInfo.reason !== 0) {
return '未使用' return '未使用'
} else if ([2, 5, 8].includes(ship.shorePowerAndShip.status)) { } else {
const shorePower = realtimeDeviceData.value.find(item => item.deviceId === ship.shorePowerAndShip.shorePowerId)
if (!shorePower) {
return '未知'
}
// const shorePower = ShorePowerList.value.find(item => item.shorePowerId === ship.shorePowerAndShip.shorePowerId)
// return shorePower?.storePowerStatus || ''
if ([2, 5, 8].includes(shorePower.deviceStatus)) {
return '故障' return '故障'
} else if (shorePower?.deviceStatus === 6) {
return '超容'
} else { } else {
const Vobj = realtimeDeviceData.value.find(item => item.deviceId === ship.shorePower.voltageDeviceld) const Vobj = realtimeDeviceData.value.find(item => item.deviceId === ship.shorePower.voltageDeviceId)
const Cobj = realtimeDeviceData.value.find(item => item.deviceId === ship.shorePower.currentDeviceld) const Cobj = realtimeDeviceData.value.find(item => item.deviceId === ship.shorePower.currentDeviceId)
let capacity = 0 let capacity = 0
try { try {
capacity = Number(ship.shorePowerEquipment.capacity) capacity = Number(ship.shorePowerEquipment.capacity)
console.log('capacity', capacity, Vobj.measureValue, Cobj?.measureValue)
} catch (error) { } catch (error) {
return '获取岸电容量失败' return '获取岸电容量失败'
} }
const power = (Vobj?.measureValue ?? 0) * (Cobj?.measureValue ?? 0); const power = (Vobj?.measureValue ?? 0) * (Cobj?.measureValue ?? 0);
if (power > capacity) { if (power / 1000 > capacity) {
return '超容' return '超容'
} }
return '正常' return '正常'
} }
}
} }
const handleGetShipData = async () => { const handleGetShipData = async () => {

Loading…
Cancel
Save