Browse Source

语音广播,智能设备箱

develop
王兴琳 2 weeks ago
parent
commit
8eefad51b8
  1. 40
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeDevice/SmartDevice.vue
  2. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/index.vue

40
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeDevice/SmartDevice.vue

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

6
ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/index.vue

@ -108,7 +108,7 @@
<el-button class="btnInfoBoard" type="add" @click.native="____onAddDeviceItem()" <el-button class="btnInfoBoard" type="add" @click.native="____onAddDeviceItem()"
:disabled="selectedBdMsg.length>=1">添加信息</el-button> :disabled="selectedBdMsg.length>=1">添加信息</el-button>
<el-button v-hasPermi="['service:broadcast:publish']" class="btnInfoBoard" type="publish" @click="____onPublish" <el-button v-hasPermi="['service:broadcast:publish']" class="btnInfoBoard" type="publish" @click="____onPublish"
:disabled="selectedBdMsg.length <= 0 || deviceList.length <= 0">发布信息</el-button> :disabled="selectedBdMsg.length <= 0 || checkedDeviceIds.length <= 0">发布信息</el-button>
</div> </div>
</WgtTitle> </WgtTitle>
<!-- <div class="partTitle partDeviceTempateTitle"> <!-- <div class="partTitle partDeviceTempateTitle">
@ -536,7 +536,7 @@ export default {
// //
____onPublish() { ____onPublish() {
if (!this.deviceList.length) { if (!this.checkedDeviceIds.length) {
this.$message.warning("请选择设备"); this.$message.warning("请选择设备");
return; return;
} }
@ -662,9 +662,9 @@ export default {
this.allVmsTemplate("no"); this.allVmsTemplate("no");
}, },
// //
____onSelectDevices(arr) { ____onSelectDevices(arr) {
this.updateCheckAllStatus();
this.selectedDevices = []; this.selectedDevices = [];
if (this.checkedDeviceIds.length == 0) { if (this.checkedDeviceIds.length == 0) {

Loading…
Cancel
Save