|
|
@ -12,20 +12,39 @@ |
|
|
|
<DeviceParams disabled :dialogData="dialogData" /> |
|
|
|
</ElTabPane> |
|
|
|
<ElTabPane label="在线率统计" name="third"> |
|
|
|
<LineChart v-if="activeName === 'third'" :productId="dialogData.id" style="height: 180px" /> |
|
|
|
<LineChart |
|
|
|
v-if="activeName === 'third'" |
|
|
|
:productId="dialogData.id" |
|
|
|
style="height: 180px" |
|
|
|
/> |
|
|
|
</ElTabPane> |
|
|
|
</ElTabs> |
|
|
|
</div> |
|
|
|
<template #footer> |
|
|
|
<Button v-if="check(['business:home:equipmentBox']) && activeName != 'first' && data.deviceState == '1'" @click.native="deviceControlVisible = true"> |
|
|
|
<Button |
|
|
|
v-if=" |
|
|
|
check(['business:home:equipmentBox']) && |
|
|
|
activeName != 'first' && |
|
|
|
data.deviceState == '1' |
|
|
|
" |
|
|
|
@click.native="deviceControlVisible = true" |
|
|
|
> |
|
|
|
设备操作 |
|
|
|
</Button> |
|
|
|
<Button v-else-if="check(['business:home:equipmentBox']) && activeName != 'first'" style="background-color: #bbb"> |
|
|
|
<Button |
|
|
|
v-else-if=" |
|
|
|
check(['business:home:equipmentBox']) && activeName != 'first' |
|
|
|
" |
|
|
|
style="background-color: #bbb" |
|
|
|
> |
|
|
|
设备离线 |
|
|
|
</Button> |
|
|
|
</template> |
|
|
|
|
|
|
|
<DeviceControlDialog v-model="deviceControlVisible" :dialogData="dialogData" /> |
|
|
|
<DeviceControlDialog |
|
|
|
v-model="deviceControlVisible" |
|
|
|
:dialogData="dialogData" |
|
|
|
/> |
|
|
|
</Dialog> |
|
|
|
</template> |
|
|
|
|
|
|
@ -124,11 +143,12 @@ export default { |
|
|
|
this.data = { ...this.dialogData, roadName: '济菏高速' }; |
|
|
|
|
|
|
|
let deviceInfo = await this.getDeviceInfo(); |
|
|
|
console.log(this.data,'------') |
|
|
|
this.data = { |
|
|
|
roadName: '济菏高速' , |
|
|
|
deviceStateLiteral: deviceInfo?.data.formatValue.deviceState, |
|
|
|
//deviceStateLiteral: deviceInfo?.data.formatValue.deviceState, |
|
|
|
...this.data, |
|
|
|
deviceStateName: (this.data === '0'?'离线':'在线') |
|
|
|
deviceStateName: (this.data.deviceState === '0'?'离线':'在线') |
|
|
|
}; |
|
|
|
|
|
|
|
// console.log( |
|
|
@ -203,7 +223,7 @@ div.switcher { |
|
|
|
align-items: center; |
|
|
|
justify-content: end; |
|
|
|
|
|
|
|
>div { |
|
|
|
> div { |
|
|
|
font-size: 16px; |
|
|
|
padding: 6px 12px; |
|
|
|
} |
|
|
|