|
|
@ -2,7 +2,6 @@ |
|
|
|
<Dialog v-model="visibleModel" |
|
|
|
title="智能设备箱" width="470px" > |
|
|
|
<Video class="video-stream" :camId="camId" img="设备箱" /> |
|
|
|
|
|
|
|
<div class="SmartDevice"> |
|
|
|
<ElTabs v-model="activeName" class="tabs"> |
|
|
|
<ElTabPane label="基本信息" name="first" style="height: 195px"> |
|
|
@ -16,7 +15,7 @@ |
|
|
|
<LineChart |
|
|
|
v-if="activeName === 'third'" |
|
|
|
:productId="dialogData.id" |
|
|
|
style="height: 180px" |
|
|
|
style="height: 150px" |
|
|
|
/> |
|
|
|
</ElTabPane> |
|
|
|
</ElTabs> |
|
|
@ -41,14 +40,14 @@ |
|
|
|
设备离线 |
|
|
|
</Button> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<DeviceControlDialog |
|
|
|
v-model="deviceControlVisible" |
|
|
|
:dialogData="dialogData" |
|
|
|
/> |
|
|
|
</Dialog> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
import Dialog from "@screen/components/Dialog/index.vue"; |
|
|
|
import Button from "@screen/components/Buttons/Button.vue"; |
|
|
@ -57,17 +56,17 @@ |
|
|
|
import LineChart from "../LineChart/index.vue"; |
|
|
|
import DeviceParams from "../Dialogs/SmartDevice/components/DeviceParams.vue"; |
|
|
|
import DeviceControlDialog from "../Dialogs/SmartDevice/components/DeviceControlDialog.vue"; |
|
|
|
|
|
|
|
|
|
|
|
import { checkPermi } from "@/utils/permission.js"; |
|
|
|
import request from "@/utils/request"; |
|
|
|
|
|
|
|
|
|
|
|
import { |
|
|
|
getRoadInfoByStakeMark, |
|
|
|
getProduct, |
|
|
|
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"; |
|
|
|
import { dialogDelayVisible } from "../Dialogs/mixin.js"; |
|
|
|
import { resolve } from "@antv/x6/lib/registry/node-anchor/util"; |
|
|
|
|
|
|
|
|
|
|
|
// 广播发布 |
|
|
|
export default { |
|
|
|
name: "SmartDevice", |
|
|
@ -150,7 +149,7 @@ |
|
|
|
}, |
|
|
|
async created() { |
|
|
|
// if (!this.dialogData.iotDeviceId) this.dialogData.iotDeviceId = '10.0.36.146-1883'; |
|
|
|
|
|
|
|
|
|
|
|
if(typeof this.data.otherConfig === 'string'){ |
|
|
|
const oConfig = JSON.parse(this.data.otherConfig) |
|
|
|
if(oConfig && oConfig.camId){ |
|
|
@ -158,7 +157,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
this.data = { ...this.dialogData, roadName: '济菏高速' }; |
|
|
|
|
|
|
|
|
|
|
|
let deviceInfo; |
|
|
|
if(this.dialogData.iotDeviceId!=null){ |
|
|
|
deviceInfo = await this.getDeviceInfo(); |
|
|
@ -170,7 +169,7 @@ |
|
|
|
...this.data, |
|
|
|
deviceStateName: (this.data.deviceState === '0'?'离线':'在线') |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
// console.log( |
|
|
|
// "%c [ dialogData ]-103-「index.vue」", |
|
|
|
// "font-size:15px; background:#36347c; color:#7a78c0;", |
|
|
@ -182,10 +181,10 @@ |
|
|
|
this.dialogData.brand = data.brand; |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark); |
|
|
|
|
|
|
|
|
|
|
|
// if (roadInfo) this.data.roadName = roadInfo.roadName; |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -204,7 +203,7 @@ |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
div.switcher { |
|
|
|
font-size: 12px; |
|
|
@ -218,34 +217,34 @@ |
|
|
|
color: #fff; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
|
|
.camera-video { |
|
|
|
flex: 1.5; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tabs { |
|
|
|
flex: 1; |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
|
|
::v-deep { |
|
|
|
.el-tabs__content { |
|
|
|
flex: 1; |
|
|
|
|
|
|
|
|
|
|
|
.el-tab-pane { |
|
|
|
height: 100%; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.bottom { |
|
|
|
margin-top: 12px; |
|
|
|
display: flex; |
|
|
|
gap: 9px; |
|
|
|
align-items: center; |
|
|
|
justify-content: end; |
|
|
|
|
|
|
|
|
|
|
|
> div { |
|
|
|
font-size: 16px; |
|
|
|
padding: 6px 12px; |
|
|
@ -253,4 +252,3 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
|