Browse Source

updat zhining

develop
mbp 1 month ago
parent
commit
526a82ab1f
  1. 32
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue

32
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue

@ -12,20 +12,39 @@
<DeviceParams disabled :dialogData="dialogData" /> <DeviceParams disabled :dialogData="dialogData" />
</ElTabPane> </ElTabPane>
<ElTabPane label="在线率统计" name="third"> <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> </ElTabPane>
</ElTabs> </ElTabs>
</div> </div>
<template #footer> <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>
<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> </Button>
</template> </template>
<DeviceControlDialog v-model="deviceControlVisible" :dialogData="dialogData" /> <DeviceControlDialog
v-model="deviceControlVisible"
:dialogData="dialogData"
/>
</Dialog> </Dialog>
</template> </template>
@ -124,11 +143,12 @@ export default {
this.data = { ...this.dialogData, roadName: '济菏高速' }; this.data = { ...this.dialogData, roadName: '济菏高速' };
let deviceInfo = await this.getDeviceInfo(); let deviceInfo = await this.getDeviceInfo();
console.log(this.data,'------')
this.data = { this.data = {
roadName: '济菏高速' , roadName: '济菏高速' ,
deviceStateLiteral: deviceInfo?.data.formatValue.deviceState, //deviceStateLiteral: deviceInfo?.data.formatValue.deviceState,
...this.data, ...this.data,
deviceStateName: (this.data === '0'?'离线':'在线') deviceStateName: (this.data.deviceState === '0'?'离线':'在线')
}; };
// console.log( // console.log(

Loading…
Cancel
Save