Browse Source

更改首页bug

wangqin
zhangzhang 1 year ago
parent
commit
e63414a5ee
  1. 1
      ruoyi-ui/src/components/eventDialogTable/video.vue
  2. 89
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue
  3. 78
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue
  4. 86
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/index.vue
  5. 79
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/index.vue
  6. 102
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue
  7. 373
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue
  8. 280
      ruoyi-ui/src/views/workbench/config/components/board.vue
  9. 1
      ruoyi-ui/src/views/workbench/config/components/video.vue

1
ruoyi-ui/src/components/eventDialogTable/video.vue

@ -142,6 +142,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="在线率统计" name="third">在线率统计</el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
<div slot="footer"> <div slot="footer">

89
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/index.vue

@ -7,12 +7,20 @@
<ElTabPane label="基本信息" name="first"> <ElTabPane label="基本信息" name="first">
<Descriptions :list="list" :data="data" style="gap: 18px"> <Descriptions :list="list" :data="data" style="gap: 18px">
<template #content-deviceState> <template #content-deviceState>
<img :src="require(`./images/${data.deviceState == 1 ? 'online' : 'offline'}.jpg`)" width="18"> <img
:src="
require(`./images/${
data.deviceState == 1 ? 'online' : 'offline'
}.jpg`)
"
width="18"
/>
{{ DeviceTypeEnum[data.deviceState] || "" }} {{ DeviceTypeEnum[data.deviceState] || "" }}
</template> </template>
</Descriptions> </Descriptions>
</ElTabPane> </ElTabPane>
<ElTabPane label="设备参数" name="second">设备参数</ElTabPane> <ElTabPane label="设备参数" name="second">设备参数</ElTabPane>
<ElTabPane label="在线率统计" name="third">在线率统计</ElTabPane>
</ElTabs> </ElTabs>
<div class="bottom"> <div class="bottom">
@ -20,36 +28,45 @@
</div> </div>
</div> </div>
<BroadcastReleases v-model="releaseVisible" :deviceId="dialogData.iotDeviceId" :pileNum="dialogData.stakeMark" <BroadcastReleases
:otherConfig="dialogData.otherConfig" :currentId="dialogData.id" /> v-model="releaseVisible"
:deviceId="dialogData.iotDeviceId"
:pileNum="dialogData.stakeMark"
:otherConfig="dialogData.otherConfig"
:currentId="dialogData.id"
/>
</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";
import Descriptions from '@screen/components/Descriptions.vue'; import Descriptions from "@screen/components/Descriptions.vue";
import BroadcastReleases from "./components/BroadcastReleases.vue" import BroadcastReleases from "./components/BroadcastReleases.vue";
import Video from "@screen/components/Video" import Video from "@screen/components/Video";
import { DeviceTypeEnum } from "@screen/utils/enum.js"; import { DeviceTypeEnum } from "@screen/utils/enum.js";
import { getRoadInfoByStakeMark, getOrganizationName, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" import {
import { dialogDelayVisible } from "./../mixin" getRoadInfoByStakeMark,
getOrganizationName,
getProduct,
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { dialogDelayVisible } from "./../mixin";
// 广 // 广
export default { export default {
name: 'Broadcast', name: "Broadcast",
mixins: [dialogDelayVisible], mixins: [dialogDelayVisible],
components: { components: {
Dialog, Dialog,
Button, Button,
Descriptions, Descriptions,
BroadcastReleases, BroadcastReleases,
Video Video,
}, },
data() { data() {
return { return {
activeName: 'first', activeName: "first",
releaseVisible: false, releaseVisible: false,
data: { data: {
deviceName: "LH24", deviceName: "LH24",
@ -63,63 +80,65 @@ export default {
DeviceTypeEnum, DeviceTypeEnum,
list: [ list: [
{ {
label: '设备名称', label: "设备名称",
key: "deviceName", key: "deviceName",
}, },
{ {
label: '道路名称', label: "道路名称",
key: "roadName", key: "roadName",
}, },
{ {
label: '设备桩号', label: "设备桩号",
key: "stakeMark", key: "stakeMark",
}, },
{ {
label: '所属方向', label: "所属方向",
key: "direction", key: "direction",
enum: "CameraDirectionEnum" enum: "CameraDirectionEnum",
}, },
{ {
label: '所属机构', label: "所属机构",
key: "organizationName", key: "organizationName",
}, },
{ {
label: '设备厂商', label: "设备厂商",
key: "brand", key: "brand",
}, },
{ {
label: '设备状态', label: "设备状态",
key: "deviceState", key: "deviceState",
enum: "DeviceTypeEnum" enum: "DeviceTypeEnum",
}, },
] ],
} };
}, },
async created() { async created() {
this.data = { ...this.dialogData, roadName: null } this.data = { ...this.dialogData, roadName: null };
getProduct(this.dialogData.productId) getProduct(this.dialogData.productId).then((data) => {
.then(data => {
this.dialogData.brand = data.brand; this.dialogData.brand = data.brand;
}) });
getOrganizationName(this.dialogData.iotDeviceId) getOrganizationName(this.dialogData.iotDeviceId).then((data) => {
.then(data => {
this.dialogData.organizationName = data?.organizationName; this.dialogData.organizationName = data?.organizationName;
}) });
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark); const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
console.log("%c [ roadInfo ]-103-「index.vue」", "font-size:15px; background:#36347c; color:#7a78c0;", roadInfo.roadName); console.log(
"%c [ roadInfo ]-103-「index.vue」",
"font-size:15px; background:#36347c; color:#7a78c0;",
roadInfo.roadName
);
if (roadInfo) this.data.roadName = roadInfo.roadName; if (roadInfo) this.data.roadName = roadInfo.roadName;
}, },
methods: { methods: {
handleClickTabs() { } handleClickTabs() {},
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.Broadcast { .Broadcast {
width: 600px; width: 600px;
height: 240px; height: 240px;

78
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Camera/index.vue

@ -6,14 +6,25 @@
<ElTabPane label="基本信息" name="first"> <ElTabPane label="基本信息" name="first">
<Descriptions :list="list" :data="data" style="gap: 18px"> <Descriptions :list="list" :data="data" style="gap: 18px">
<template #content-deviceName> <template #content-deviceName>
<span>{{ dialogData.deviceName || '-' }}</span> <span>{{ dialogData.deviceName || "-" }}</span>
<img @click="controlDialogVisible = true" <img
v-if="[0, '0'].includes(dialogData.parseOtherConfig && dialogData.parseOtherConfig.ptzCtrl)" @click="controlDialogVisible = true"
src="@screen/images/camera-control-icon.svg" width="18px" height="18px" style="cursor: pointer;"> v-if="
[0, '0'].includes(
dialogData.parseOtherConfig &&
dialogData.parseOtherConfig.ptzCtrl
)
"
src="@screen/images/camera-control-icon.svg"
width="18px"
height="18px"
style="cursor: pointer"
/>
</template> </template>
</Descriptions> </Descriptions>
</ElTabPane> </ElTabPane>
<ElTabPane label="摄相机参数" name="second">摄相机参数</ElTabPane> <ElTabPane label="摄相机参数" name="second">摄相机参数</ElTabPane>
<ElTabPane label="在线率统计" name="third">在线率统计</ElTabPane>
</ElTabs> </ElTabs>
<div class="bottom"> <div class="bottom">
@ -22,71 +33,77 @@
</div> </div>
</div> </div>
<CameraControlDialog :deviceId="dialogData.iotDeviceId" v-model="controlDialogVisible" /> <CameraControlDialog
:deviceId="dialogData.iotDeviceId"
v-model="controlDialogVisible"
/>
</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";
import Video from "@screen/components/Video" import Video from "@screen/components/Video";
import Descriptions from '@screen/components/Descriptions.vue'; import Descriptions from "@screen/components/Descriptions.vue";
import CameraControlDialog from "./components/CameraControlDialog.vue"; import CameraControlDialog from "./components/CameraControlDialog.vue";
import { getRoadInfoByStakeMark, getOrganizationName } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" import {
getRoadInfoByStakeMark,
getOrganizationName,
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { dialogDelayVisible } from "./../mixin" import { dialogDelayVisible } from "./../mixin";
// //
export default { export default {
name: 'Camera', name: "Camera",
mixins: [dialogDelayVisible], mixins: [dialogDelayVisible],
components: { components: {
Dialog, Dialog,
Button, Button,
Descriptions, Descriptions,
Video, Video,
CameraControlDialog CameraControlDialog,
}, },
data() { data() {
return { return {
activeName: 'first', activeName: "first",
controlDialogVisible: false, controlDialogVisible: false,
data: {}, data: {},
list: [ list: [
{ {
label: '设备名称', label: "设备名称",
key: "deviceName", key: "deviceName",
}, },
{ {
label: '道路名称', label: "道路名称",
key: "roadName", key: "roadName",
}, },
{ {
label: '设备编号', label: "设备编号",
key: "deviceCode", key: "deviceCode",
}, },
{ {
label: '所属机构', label: "所属机构",
key: "organizationName", key: "organizationName",
}, },
{ {
label: '设备桩号', label: "设备桩号",
key: "stakeMark", key: "stakeMark",
}, },
{ {
label: '设备方向', label: "设备方向",
key: "direction", key: "direction",
enum: "CameraDirectionEnum" enum: "CameraDirectionEnum",
}, },
{ {
label: '设备状态', label: "设备状态",
key: "deviceState", key: "deviceState",
enum: "DeviceTypeEnum", enum: "DeviceTypeEnum",
gridColumn: 2, gridColumn: 2,
}, },
{ {
label: '状态更新时间', label: "状态更新时间",
key: "updateTime", key: "updateTime",
gridColumn: 2, gridColumn: 2,
// enum: "CameraDirectionEnum" // enum: "CameraDirectionEnum"
@ -96,16 +113,13 @@ export default {
// key: "${longitude} / ${latitude}", // key: "${longitude} / ${latitude}",
// }, // },
], ],
} };
},
watch: {
}, },
watch: {},
async created() { async created() {
this.data = { ...this.dialogData, organizationName: null, roadName: null }; this.data = { ...this.dialogData, organizationName: null, roadName: null };
getOrganizationName(this.dialogData.iotDeviceId) getOrganizationName(this.dialogData.iotDeviceId).then((data) => {
.then((data) => {
this.data.organizationName = data?.organizationName; this.data.organizationName = data?.organizationName;
}); });
@ -118,12 +132,12 @@ export default {
if (bool) return; if (bool) return;
this.controlDialogVisible = false; this.controlDialogVisible = false;
} },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.Camera { .Camera {
width: 600px; width: 600px;
height: 510px; height: 510px;

86
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/index.vue

@ -8,13 +8,16 @@
<Descriptions :list="list" :data="data" style="gap: 18px" /> <Descriptions :list="list" :data="data" style="gap: 18px" />
</ElTabPane> </ElTabPane>
<ElTabPane label="设备参数" name="second"> <ElTabPane label="设备参数" name="second">
<div class="content-second" style="height: 185px;"> <div class="content-second" style="height: 185px">
<RadioGroup v-model="roadType" :options="roadTypeList" /> <RadioGroup v-model="roadType" :options="roadTypeList" />
<span>当前车流量: 999</span> <span>当前车流量: 999</span>
<LineChartForTraffic style="flex: 1;" v-if="activeName === 'second'" /> <LineChartForTraffic
style="flex: 1"
v-if="activeName === 'second'"
/>
</div> </div>
</ElTabPane> </ElTabPane>
<ElTabPane label="在线统计率" name="third"> <ElTabPane label="在线统计" name="third">
<LineChart v-if="activeName === 'third'" /> <LineChart v-if="activeName === 'third'" />
</ElTabPane> </ElTabPane>
</ElTabs> </ElTabs>
@ -24,22 +27,25 @@
<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";
import Descriptions from '@screen/components/Descriptions.vue'; import Descriptions from "@screen/components/Descriptions.vue";
import Video from "@screen/components/Video" import Video from "@screen/components/Video";
import LineChart from './components/LineChart/index.vue'; import LineChart from "./components/LineChart/index.vue";
import LineChartForTraffic from './components/LineChartForTraffic/index.vue'; import LineChartForTraffic from "./components/LineChartForTraffic/index.vue";
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue'; import Switcher from "@screen/pages/service/PublishingChannelManagement/components/Switcher.vue";
import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" import {
import { dialogDelayVisible } from "./../mixin" getRoadInfoByStakeMark,
getProduct,
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { dialogDelayVisible } from "./../mixin";
import request from "@/utils/request"; import request from "@/utils/request";
import { Message } from 'element-ui'; import { Message } from "element-ui";
import RadioGroup from '@screen/components/FormConfig/components/RadioGroup/index.vue'; import RadioGroup from "@screen/components/FormConfig/components/RadioGroup/index.vue";
// 广 // 广
export default { export default {
name: 'Intermodulation', name: "Intermodulation",
mixins: [dialogDelayVisible], mixins: [dialogDelayVisible],
components: { components: {
Dialog, Dialog,
@ -49,11 +55,11 @@ export default {
LineChartForTraffic, LineChartForTraffic,
Video, Video,
Switcher, Switcher,
RadioGroup RadioGroup,
}, },
data() { data() {
return { return {
activeName: 'first', activeName: "first",
releaseVisible: false, releaseVisible: false,
secondLoading: true, secondLoading: true,
data: { data: {
@ -67,32 +73,32 @@ export default {
}, },
roadTypeList: [ roadTypeList: [
{ key: '1', label: '济南方向' }, { key: "1", label: "济南方向" },
{ key: '3', label: '菏泽方向' }, { key: "3", label: "菏泽方向" },
], ],
roadType: '1', roadType: "1",
list: [ list: [
{ {
label: '设备名称', label: "设备名称",
key: "deviceName", key: "deviceName",
}, },
{ {
label: '设备桩号', label: "设备桩号",
key: "stakeMark", key: "stakeMark",
}, },
{ {
label: '道路名称', label: "道路名称",
key: "roadName", key: "roadName",
}, },
{ {
label: '设备方向', label: "设备方向",
key: "direction", key: "direction",
enum: "CameraDirectionEnum" enum: "CameraDirectionEnum",
}, },
{ {
label: '设备状态', label: "设备状态",
key: "deviceState", key: "deviceState",
enum: "DeviceTypeEnum" enum: "DeviceTypeEnum",
}, },
// { // {
// label: '', // label: '',
@ -101,21 +107,25 @@ export default {
], ],
activeOption: { activeOption: {
active: { active: {
text: "开" text: "开",
}, },
unActive: { unActive: {
text: "关" text: "关",
}
}, },
devicesList: [] },
} devicesList: [],
};
}, },
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';
this.data = { ...this.dialogData, roadName: null } this.data = { ...this.dialogData, roadName: null };
console.log("%c [ dialogData ]-103-「index.vue」", "font-size:15px; background:#36347c; color:#7a78c0;", this.dialogData); console.log(
"%c [ dialogData ]-103-「index.vue」",
"font-size:15px; background:#36347c; color:#7a78c0;",
this.dialogData
);
// getProduct(this.dialogData.productId) // getProduct(this.dialogData.productId)
// .then(data => { // .then(data => {
@ -125,17 +135,17 @@ export default {
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;
} },
} };
</script> </script>
<style lang='scss'> <style lang="scss">
div.switcher { div.switcher {
font-size: 12px; font-size: 12px;
padding: 2px; padding: 2px;
} }
</style> </style>
<style lang='scss' scoped> <style lang="scss" scoped>
.Intermodulation { .Intermodulation {
width: 510px; width: 510px;
height: 240px; height: 240px;

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

@ -10,37 +10,41 @@
<ElTabPane label="设备参数" name="second"> <ElTabPane label="设备参数" name="second">
<DeviceParams disabled :dialogData="dialogData" /> <DeviceParams disabled :dialogData="dialogData" />
</ElTabPane> </ElTabPane>
<ElTabPane label="在线统计" name="third"> <ElTabPane label="在线统计" name="third">
<LineChart v-if="activeName === 'third'" style="height: 222px" /> <LineChart v-if="activeName === 'third'" style="height: 222px" />
</ElTabPane> </ElTabPane>
</ElTabs> </ElTabs>
</div> </div>
<template #footer> <template #footer>
<Button @click.native="deviceControlVisible = true"> <Button @click.native="deviceControlVisible = true"> 设备操作 </Button>
设备操作
</Button>
</template> </template>
<DeviceControlDialog v-model="deviceControlVisible" :dialogData="dialogData" /> <DeviceControlDialog
v-model="deviceControlVisible"
: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";
import Descriptions from '@screen/components/Descriptions.vue'; import Descriptions from "@screen/components/Descriptions.vue";
import Video from "@screen/components/Video" import Video from "@screen/components/Video";
import LineChart from './components/LineChart/index.vue'; import LineChart from "./components/LineChart/index.vue";
import DeviceParams from "./components/DeviceParams.vue" import DeviceParams from "./components/DeviceParams.vue";
import DeviceControlDialog from "./components/DeviceControlDialog.vue" import DeviceControlDialog from "./components/DeviceControlDialog.vue";
import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" import {
import { dialogDelayVisible } from "./../mixin" getRoadInfoByStakeMark,
getProduct,
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { dialogDelayVisible } from "./../mixin";
// 广 // 广
export default { export default {
name: 'SmartDevice', name: "SmartDevice",
mixins: [dialogDelayVisible], mixins: [dialogDelayVisible],
components: { components: {
Dialog, Dialog,
@ -49,11 +53,11 @@ export default {
Video, Video,
Button, Button,
DeviceParams, DeviceParams,
DeviceControlDialog DeviceControlDialog,
}, },
data() { data() {
return { return {
activeName: 'first', activeName: "first",
releaseVisible: false, releaseVisible: false,
deviceControlVisible: false, deviceControlVisible: false,
data: { data: {
@ -67,60 +71,63 @@ export default {
}, },
list: [ list: [
{ {
label: '设备名称', label: "设备名称",
key: "deviceName", key: "deviceName",
}, },
{ {
label: '设备桩号', label: "设备桩号",
key: "stakeMark", key: "stakeMark",
}, },
{ {
label: '道路名称', label: "道路名称",
key: "roadName", key: "roadName",
}, },
{ {
label: '设备方向', label: "设备方向",
key: "direction", key: "direction",
enum: "CameraDirectionEnum" enum: "CameraDirectionEnum",
}, },
{ {
label: '设备状态', label: "设备状态",
key: "deviceState", key: "deviceState",
enum: "DeviceTypeEnum" enum: "DeviceTypeEnum",
}, },
{ {
label: '设备厂商', label: "设备厂商",
key: "brand", key: "brand",
}, },
] ],
} };
}, },
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';
this.data = { ...this.dialogData, roadName: null } this.data = { ...this.dialogData, roadName: null };
console.log("%c [ dialogData ]-103-「index.vue」", "font-size:15px; background:#36347c; color:#7a78c0;", this.dialogData); console.log(
"%c [ dialogData ]-103-「index.vue」",
"font-size:15px; background:#36347c; color:#7a78c0;",
this.dialogData
);
getProduct(this.dialogData.productId) getProduct(this.dialogData.productId).then((data) => {
.then(data => {
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;
} },
} };
</script> </script>
<style lang='scss'> <style lang="scss">
div.switcher { div.switcher {
font-size: 12px; font-size: 12px;
padding: 2px; padding: 2px;
} }
</style> </style>
<style lang='scss' scoped> <style lang="scss" scoped>
.SmartDevice { .SmartDevice {
width: 510px; width: 510px;
// height: 240px; // height: 240px;

102
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/TrafficIncidents/index.vue

@ -1,37 +1,50 @@
<template> <template>
<Dialog v-model="obverseVisible" :title="dialogData._itemData && dialogData._itemData.title"> <Dialog
v-model="obverseVisible"
:title="dialogData._itemData && dialogData._itemData.title"
>
<div class="TrafficIncidents"> <div class="TrafficIncidents">
<div class="header"> <div class="header">
<Video class="video-stream" :pileNum="dialogData.stakeMark" /> <Video class="video-stream" :pileNum="dialogData.stakeMark" />
<Video class="video-stream" :pileNum="dialogData.stakeMark" :rangeIndex="1" /> <Video
class="video-stream"
:pileNum="dialogData.stakeMark"
:rangeIndex="1"
/>
</div> </div>
<Descriptions labelWidth="72px" :list="list" :data="data" style="gap: 18px" column="7" /> <Descriptions
labelWidth="72px"
:list="list"
:data="data"
style="gap: 18px"
column="7"
/>
</div> </div>
</Dialog> </Dialog>
</template> </template>
<script> <script>
import Dialog from "@screen/components/Dialog/index.vue"; import Dialog from "@screen/components/Dialog/index.vue";
import Descriptions from '@screen/components/Descriptions.vue'; import Descriptions from "@screen/components/Descriptions.vue";
// import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js" // import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import Video from "@screen/components/Video" import Video from "@screen/components/Video";
import request from "@/utils/request"; import request from "@/utils/request";
import { dialogDelayVisible } from "./../mixin" import { dialogDelayVisible } from "./../mixin";
// //
export default { export default {
name: 'TrafficIncidents', name: "TrafficIncidents",
mixins: [dialogDelayVisible], mixins: [dialogDelayVisible],
components: { components: {
Dialog, Dialog,
Descriptions, Descriptions,
Video Video,
}, },
data() { data() {
return { return {
activeName: 'first', activeName: "first",
deviceControlVisible: false, deviceControlVisible: false,
data: { data: {
deviceType: "行车诱导", deviceType: "行车诱导",
@ -43,94 +56,93 @@ export default {
}, },
list: [ list: [
{ {
label: '机构', label: "机构",
key: "organizationName", key: "organizationName",
gridColumn: '3' gridColumn: "3",
}, },
{ {
label: '高速名称', label: "高速名称",
key: "roadName", key: "roadName",
gridColumn: '3' gridColumn: "3",
}, },
{ {
label: '感知时间', label: "感知时间",
key: "occurrenceTime", key: "occurrenceTime",
gridColumn: '3', gridColumn: "3",
visible: () => this.isPerceived visible: () => this.isPerceived,
}, },
{ {
label: '桩号', label: "桩号",
key: "stakeMark", key: "stakeMark",
gridColumn: '3' gridColumn: "3",
}, },
{ {
label: '事件源', label: "事件源",
key: "stringEventSource", key: "stringEventSource",
gridColumn: '3' gridColumn: "3",
}, },
{ {
label: '车道列表', label: "车道列表",
key: "lang", key: "lang",
enum: "LaneOccupancy", enum: "LaneOccupancy",
gridColumn: '2' gridColumn: "3",
}, },
{ {
label: '事件状态', label: "事件状态",
key: "eventState", key: "eventState",
enum: "EventType", enum: "EventType",
gridColumn: '2' gridColumn: "3",
}, },
{ {
label: '经/纬度', label: "经/纬度",
key: "${longitude} / ${latitude}", key: "${longitude} / ${latitude}",
gridColumn: '3' gridColumn: "5",
}, },
{ {
label: '发生时间', label: "发生时间",
key: "occurrenceTime", key: "occurrenceTime",
gridColumn: '3' gridColumn: "3",
}, },
{ {
label: '行驶方向', label: "行驶方向",
key: "direction", key: "direction",
enum: "CameraDirectionEnum", enum: "CameraDirectionEnum",
gridColumn: '3' gridColumn: "3",
}, },
{ {
label: '完结时间', label: "完结时间",
key: "endTime", key: "endTime",
gridColumn: '3' gridColumn: "3",
}, },
{ {
label: '事件描述', label: "事件描述",
key: "description", key: "description",
gridColumn: '5' gridColumn: "5",
}, },
] ],
} };
}, },
async created() { async created() {
this.data = { ...this.dialogData }; this.data = { ...this.dialogData };
request({ request({
url: `/business/trafficIncidents/getEventInfo/${this.dialogData.id}`, url: `/business/trafficIncidents/getEventInfo/${this.dialogData.id}`,
method: "get" method: "get",
}) })
.then(({ code, data }) => { .then(({ code, data }) => {
if (code != 200) return; if (code != 200) return;
this.data = { ...data, ...this.data }; this.data = { ...data, ...this.data };
console.log(data) console.log(data);
}).catch((err) => { })
.catch((err) => {});
});
}, },
methods: { methods: {
handleClickTabs() { } handleClickTabs() {},
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.TrafficIncidents { .TrafficIncidents {
width: 600px; width: 600px;
color: #fff; color: #fff;

373
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/InfoBoard/index.vue

@ -6,29 +6,55 @@
<div class="mainDialog"> <div class="mainDialog">
<div class="dialog_head"> <div class="dialog_head">
<div class="tit">{{ selectedDevice.deviceName }}</div> <div class="tit">{{ selectedDevice.deviceName }}</div>
<img class="btnCls" src="@/assets/jihe/images/dialog/ibCls.png" alt="" @click="____onClose"> <img
<img class="deco" src="@/assets/jihe/images/dialog/ibHeadDeco.png" alt=""> class="btnCls"
src="@/assets/jihe/images/dialog/ibCls.png"
alt=""
@click="____onClose"
/>
<img
class="deco"
src="@/assets/jihe/images/dialog/ibHeadDeco.png"
alt=""
/>
</div> </div>
<div class="dialogContent"> <div class="dialogContent">
<div v-if="selectedBdMsg.length > 0" class="dialogContent_box" style="height: 100%;"> <div
v-if="selectedBdMsg.length > 0"
class="dialogContent_box"
style="height: 100%"
>
<vuescroll :ops="scrollOptions" class="listBox"> <vuescroll :ops="scrollOptions" class="listBox">
<div v-for="(itm, indx) in selectedBdMsg" :key="indx" class="tplItem"> <div
v-for="(itm, indx) in selectedBdMsg"
:key="indx"
class="tplItem"
>
<!-- 模板内容 --> <!-- 模板内容 -->
<BoardPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardPreview> <BoardPreview
class="boardPreview"
:boardWH="selectedSize"
:tpl="itm"
></BoardPreview>
<!-- 操作按钮 --> <!-- 操作按钮 -->
<div class="infoBtnBox"> <div class="infoBtnBox">
<el-tooltip content="编辑" placement="top"> <el-tooltip content="编辑" placement="top">
<p @click="____onEditBoardItem(itm, indx)" class="btn btnEdit"></p> <p
@click="____onEditBoardItem(itm, indx)"
class="btn btnEdit"
></p>
</el-tooltip> </el-tooltip>
<el-tooltip content="删除" placement="top"> <el-tooltip content="删除" placement="top">
<p @click="____onDeleteBoardItem(indx)" class="btn btnDelete"></p> <p
@click="____onDeleteBoardItem(indx)"
class="btn btnDelete"
></p>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
</vuescroll> </vuescroll>
</div> </div>
<div v-else class="dialogContent_box" style="height: 100%;"> <div v-else class="dialogContent_box" style="height: 100%">
<div class="dialogContent_box_empty">暂无数据</div> <div class="dialogContent_box_empty">暂无数据</div>
</div> </div>
<div class="dialogContent_bottom"> <div class="dialogContent_bottom">
@ -37,15 +63,24 @@
<div class="show_bottom_tab_box"> <div class="show_bottom_tab_box">
<div class="deviceInfo"> <div class="deviceInfo">
<div class="deviceInfo_l">设备名称</div> <div class="deviceInfo_l">设备名称</div>
<div class="deviceInfo_r">{{ selectedDevice.deviceName }}</div> <div class="deviceInfo_r">
{{ selectedDevice.deviceName }}
</div>
</div> </div>
<div class="deviceInfo"> <div class="deviceInfo">
<div class="deviceInfo_l">设备桩号</div> <div class="deviceInfo_l">设备桩号</div>
<div class="deviceInfo_r">{{ selectedDevice.stakeMark }}</div> <div class="deviceInfo_r">
{{ selectedDevice.stakeMark }}
</div>
</div> </div>
<div class="deviceInfo"> <div class="deviceInfo">
<div class="deviceInfo_l">屏幕像素</div> <div class="deviceInfo_l">屏幕像素</div>
<div class="deviceInfo_r">{{ JSON.parse(selectedDevice.otherConfig).screenSize }} px</div> <div class="deviceInfo_r">
{{
JSON.parse(selectedDevice.otherConfig).screenSize
}}
px
</div>
</div> </div>
<!-- <div class="deviceInfo" v-for="item in tabDataInfoList" :key="item.id"> <!-- <div class="deviceInfo" v-for="item in tabDataInfoList" :key="item.id">
<div class="deviceInfo_l">{{ item.tit }}: </div> <div class="deviceInfo_l">{{ item.tit }}: </div>
@ -53,22 +88,58 @@
</div> --> </div> -->
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="设备参数" name="second">设备参数</el-tab-pane> <el-tab-pane label="设备参数" name="second"
>设备参数</el-tab-pane
>
<el-tab-pane label="在线率统计" name="third"
>在线率统计</el-tab-pane
>
</el-tabs> </el-tabs>
</div> </div>
<div class="dialogContent_bottom_btn"> <div class="dialogContent_bottom_btn">
<el-button class="btnInfoBoard" type="add" @click.native="____onAddDeviceItem()">添加信息</el-button> <el-button
<el-button class="btnInfoBoard" type="publish" @click="____publishInfo" :disabled="selectedBdMsg.length <= 0">发布信息</el-button> class="btnInfoBoard"
type="add"
@click.native="____onAddDeviceItem()"
>添加信息</el-button
>
<el-button
class="btnInfoBoard"
type="publish"
@click="____publishInfo"
:disabled="selectedBdMsg.length <= 0"
>发布信息</el-button
>
</div> </div>
<div class="sideSwitch" @click="____onShowTemplate"> <div class="sideSwitch" @click="____onShowTemplate">
<img class="img" src="@/assets/screen/xtb/leftd.png" alt="" <img
:style="{ 'transform': isShowTemplate ? 'rotate(0deg)' : 'rotate(180deg)' }"> class="img"
src="@/assets/screen/xtb/leftd.png"
alt=""
:style="{
transform: isShowTemplate
? 'rotate(0deg)'
: 'rotate(180deg)',
}"
/>
<div class="txt">信息模板</div> <div class="txt">信息模板</div>
</div> </div>
<!-- 附近的摄像机 --> <!-- 附近的摄像机 -->
<div class="sideSwitch" style="top:36%;" @click="____onShowCameraShower"> <div
<img class="img" src="@/assets/screen/xtb/leftd.png" alt="" class="sideSwitch"
:style="{ 'transform': dialogInfoCamera ? 'rotate(0deg)' : 'rotate(180deg)' }"> style="top: 36%"
@click="____onShowCameraShower"
>
<img
class="img"
src="@/assets/screen/xtb/leftd.png"
alt=""
:style="{
transform: dialogInfoCamera
? 'rotate(0deg)'
: 'rotate(180deg)',
}"
/>
<div class="txt">附近相机</div> <div class="txt">附近相机</div>
</div> </div>
</div> </div>
@ -77,12 +148,23 @@
<!-- 信息模板 --> <!-- 信息模板 -->
<div v-if="isShowTemplate" class="sideContent template"> <div v-if="isShowTemplate" class="sideContent template">
<vuescroll :ops="scrollOptions" class="listBox"> <vuescroll :ops="scrollOptions" class="listBox">
<div v-for="(item, index) in templateAvailable" :key="item.dictValue"> <div
v-for="(item, index) in templateAvailable"
:key="item.dictValue"
>
<!-- 原来是<el-collapse v-model="activeNames"> --> <!-- 原来是<el-collapse v-model="activeNames"> -->
<h3>{{ item.dictLabel }}</h3> <h3>{{ item.dictLabel }}</h3>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem"> <div
v-for="(itm, indx) in item.list"
:key="indx"
class="tplItem"
>
<!-- 模板内容 --> <!-- 模板内容 -->
<BoardTplPreview class="boardPreview" :boardWH="selectedSize" :tpl="itm"></BoardTplPreview> <BoardTplPreview
class="boardPreview"
:boardWH="selectedSize"
:tpl="itm"
></BoardTplPreview>
<!-- <div class="infoPreview"> <!-- <div class="infoPreview">
<div class="infoBox" :style="____boardBgStyle"> <div class="infoBox" :style="____boardBgStyle">
<span class="infoTxt" :style="____boardTxtStyle(itm)" v-html="itm.content.replace(/\n|\r\n/g, '<br>').replace(/ /g, '&nbsp')"></span> <span class="infoTxt" :style="____boardTxtStyle(itm)" v-html="itm.content.replace(/\n|\r\n/g, '<br>').replace(/ /g, '&nbsp')"></span>
@ -91,7 +173,10 @@
<!-- 操作按钮 --> <!-- 操作按钮 -->
<div class="infoBtnBox infoBtnBoxSm"> <div class="infoBtnBox infoBtnBoxSm">
<el-tooltip content="加入待下发信息" placement="top"> <el-tooltip content="加入待下发信息" placement="top">
<p @click="____onTplToDevice(itm, false)" class="btn btnApply"></p> <p
@click="____onTplToDevice(itm, false)"
class="btn btnApply"
></p>
</el-tooltip> </el-tooltip>
</div> </div>
</div> </div>
@ -99,43 +184,54 @@
</vuescroll> </vuescroll>
</div> </div>
<!-- 附近相机 --> <!-- 附近相机 -->
<CameraShower class="sideContent camera" :visible.sync="dialogInfoCamera" :list="nearbyCameraList"></CameraShower> <CameraShower
class="sideContent camera"
:visible.sync="dialogInfoCamera"
:list="nearbyCameraList"
></CameraShower>
</div> </div>
</transition> </transition>
<BoardInfoEditor @afterSubmit="____onEditSubmit" :mode="editDialog.mode" :type="editDialog.type" <BoardInfoEditor
:visible.sync="editDialog.visible" :screenSize="selectedSize" :tpl="editDialog.tpl"></BoardInfoEditor> @afterSubmit="____onEditSubmit"
:mode="editDialog.mode"
:type="editDialog.type"
:visible.sync="editDialog.visible"
:screenSize="selectedSize"
:tpl="editDialog.tpl"
></BoardInfoEditor>
</div> </div>
</Teleport> </Teleport>
</template> </template>
<script> <script>
import { listDevice, invokedFunction, getDeviceRealtimeProperty } from '@/api/device/device.js' import {
listDevice,
invokedFunction,
getDeviceRealtimeProperty,
} from "@/api/device/device.js";
// import infoBoardTestData from "@/common/infoBoardTestData.js" // import infoBoardTestData from "@/common/infoBoardTestData.js"
import { getBoardDeviceInfo } from '@/api/board/board' import { getBoardDeviceInfo } from "@/api/board/board";
import { getNearbyCameraByPileNum } from '@/api/camera/camera' import { getNearbyCameraByPileNum } from "@/api/camera/camera";
import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue" import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue";
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue" import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue";
import BoardInfoEditor from '@screen/components/infoBoard/BoardInfoEditor' import BoardInfoEditor from "@screen/components/infoBoard/BoardInfoEditor";
import vuescroll from 'vuescroll' import vuescroll from "vuescroll";
import scrollOptions from '@/common/scrollbar.js' import scrollOptions from "@/common/scrollbar.js";
import Teleport from '@screen/components/Teleport.vue' import Teleport from "@screen/components/Teleport.vue";
import { getTemplateList } from '@/api/board/template' import { getTemplateList } from "@/api/board/template";
import testDeviceInfo from "@screen/testData/infoBoard.js" import testDeviceInfo from "@screen/testData/infoBoard.js";
import CameraShower from '@screen/components/CameraShower' import CameraShower from "@screen/components/CameraShower";
import InfoBoard from '@screen/mixins/InfoBoard' import InfoBoard from "@screen/mixins/InfoBoard";
export default { export default {
name: 'InfoBoard', name: "InfoBoard",
mixins: [InfoBoard], mixins: [InfoBoard],
data() { data() {
return { return {
@ -148,24 +244,24 @@ export default {
tabDataInfoList: [], tabDataInfoList: [],
cameraDataVideoList: [], cameraDataVideoList: [],
cameraDataList: [ cameraDataList: [
{ id: 3001, txt: '设备名称', val: '疲劳唤醒设备1' }, { id: 3001, txt: "设备名称", val: "疲劳唤醒设备1" },
{ id: 3002, txt: '设备编号', val: 'G00030497B0180001' }, { id: 3002, txt: "设备编号", val: "G00030497B0180001" },
{ id: 3003, txt: '设备桩号', val: 'K097+900' }, { id: 3003, txt: "设备桩号", val: "K097+900" },
{ id: 3004, txt: '经/纬度', val: '117.071152/35.910659' }, { id: 3004, txt: "经/纬度", val: "117.071152/35.910659" },
{ id: 3005, txt: '道路名称', val: 'G35济菏高速' }, { id: 3005, txt: "道路名称", val: "G35济菏高速" },
{ id: 3006, txt: '道路状况', val: '正常' }, { id: 3006, txt: "道路状况", val: "正常" },
{ id: 3007, txt: '方向', val: '菏泽' } { id: 3007, txt: "方向", val: "菏泽" },
], ],
cameraBtnList: [ cameraBtnList: [
{ id: 4001, cmd: 23, dir: 'left', le: '26%', to: '33%', ro: 0 }, { id: 4001, cmd: 23, dir: "left", le: "26%", to: "33%", ro: 0 },
{ id: 4002, cmd: 21, dir: 'up', le: '46%', to: '4%', ro: 90 }, { id: 4002, cmd: 21, dir: "up", le: "46%", to: "4%", ro: 90 },
{ id: 4003, cmd: 24, dir: 'right', le: '65%', to: '33%', ro: 180 }, { id: 4003, cmd: 24, dir: "right", le: "65%", to: "33%", ro: 180 },
{ id: 4004, cmd: 22, dir: 'downward', le: '46%', to: '62%', ro: 267 } { id: 4004, cmd: 22, dir: "downward", le: "46%", to: "62%", ro: 267 },
], ],
cameraControlList: [ cameraControlList: [
{ id: 5001, txt: '变倍', numL: 11, numR: 12 }, { id: 5001, txt: "变倍", numL: 11, numR: 12 },
{ id: 5002, txt: '光圈', numL: 16, numR: 15 }, { id: 5002, txt: "光圈", numL: 16, numR: 15 },
{ id: 5003, txt: '聚焦', numL: 14, numR: 13 } { id: 5003, txt: "聚焦", numL: 14, numR: 13 },
], ],
selectedBdMsg: [], selectedBdMsg: [],
@ -174,50 +270,53 @@ export default {
mode: "", mode: "",
type: "", type: "",
visible: false, visible: false,
tpl: {} tpl: {},
}, },
scrollOptions, scrollOptions,
templateAvailable: null, templateAvailable: null,
tplCategory: [], // tplCategory: [], //
templateAll: [], templateAll: [],
nearbyCameraList:[] nearbyCameraList: [],
} };
}, },
props: { props: {
visible: { visible: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
selectedDevice: { selectedDevice: {
type: Object, type: Object,
default: null default: null,
} },
}, },
watch: { watch: {
selectedDevice: { selectedDevice: {
handler(newV) { handler(newV) {
this.____initData(); this.____initData();
}, },
immediate: true immediate: true,
} },
}, },
components: { BoardPreview, BoardTplPreview, BoardInfoEditor, vuescroll, Teleport, components: {
CameraShower BoardPreview,
BoardTplPreview,
BoardInfoEditor,
vuescroll,
Teleport,
CameraShower,
}, },
created() { created() {
// this.____getTemplateCategory(); // this.____getTemplateCategory();
// this.____getAllTemplate(); // this.____getAllTemplate();
}, },
computed: { computed: {},
}, mounted() {},
mounted() {
},
methods: { methods: {
// //
____getTemplateCategory() { ____getTemplateCategory() {
return this.getDicts('iot_template_category').then(res => { return this.getDicts("iot_template_category").then((res) => {
this.tplCategory = res.data; this.tplCategory = res.data;
}) });
}, },
// //
____getAllTemplate() { ____getAllTemplate() {
@ -227,13 +326,18 @@ export default {
}, },
// //
____initData() { ____initData() {
this.selectedSize = JSON.parse(this.selectedDevice.otherConfig).screenSize; this.selectedSize = JSON.parse(
this.selectedDevice.otherConfig
).screenSize;
if (this.tplCategory.length && this.templateAll.length) { if (this.tplCategory.length && this.templateAll.length) {
this.____setAvailableTemplate(); this.____setAvailableTemplate();
} else { } else {
Promise.all([this.____getTemplateCategory(), this.____getAllTemplate()]).then(res=>{ Promise.all([
this.____getTemplateCategory(),
this.____getAllTemplate(),
]).then((res) => {
this.____setAvailableTemplate(); this.____setAvailableTemplate();
}) });
} }
this.____getDeviceInfo(); this.____getDeviceInfo();
@ -241,37 +345,35 @@ export default {
// //
____getDeviceInfo() { ____getDeviceInfo() {
if (IS_TESTING) { if (IS_TESTING) {
this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content); this.selectedBdMsg = _.cloneDeep(testDeviceInfo.data["3A"].content);
} else { } else {
getBoardDeviceInfo(this.selectedDevice.iotDeviceId).then(res => { getBoardDeviceInfo(this.selectedDevice.iotDeviceId)
.then((res) => {
this.selectedBdMsg = res.data["3A"].content; this.selectedBdMsg = res.data["3A"].content;
}).catch(err => {
}) })
.catch((err) => {});
} }
}, },
// //
____setAvailableTemplate() { ____setAvailableTemplate() {
this.templateAvailable = []; this.templateAvailable = [];
this.tplCategory.forEach((item, index) => { this.tplCategory.forEach((item, index) => {
let arr = this.templateAll['' + index]; let arr = this.templateAll["" + index];
if (arr.length > 0) { if (arr.length > 0) {
let temp = []; let temp = [];
arr.forEach(tpl => { arr.forEach((tpl) => {
if (tpl.screenSize == this.selectedSize) { if (tpl.screenSize == this.selectedSize) {
temp.push(tpl); temp.push(tpl);
} }
}) });
if (temp.length > 0) { if (temp.length > 0) {
this.templateAvailable.push({ this.templateAvailable.push({
...item, ...item,
list: temp list: temp,
}); });
} }
} }
}) });
}, },
// //
____onEditBoardItem(tpl, index) { ____onEditBoardItem(tpl, index) {
@ -282,14 +384,14 @@ export default {
visible: true, visible: true,
mode: "edit", mode: "edit",
type: "device", type: "device",
tpl tpl,
} };
}, },
// //
____onDeleteBoardItem(index) { ____onDeleteBoardItem(index) {
if (index > -1) { if (index > -1) {
this.selectedBdMsg.splice(index, 1) this.selectedBdMsg.splice(index, 1);
this.$message.success('删除成功。') this.$message.success("删除成功。");
} }
}, },
// //
@ -320,75 +422,83 @@ export default {
// stakeMark = "K64+300"; // stakeMark = "K64+300";
getNearbyCameraByPileNum(stakeMark).then(res=>{ getNearbyCameraByPileNum(stakeMark).then((res) => {
this.nearbyCameraList = res.data; this.nearbyCameraList = res.data;
}) });
}, },
cameraControlBtnFn(item) { cameraControlBtnFn(item) {
this.getEnergyCameraControlFn(item.cmd, 5) this.getEnergyCameraControlFn(item.cmd, 5);
}, },
cameraControlLeFn(item) { cameraControlLeFn(item) {
// console.log('', item) // console.log('', item)
this.getEnergyCameraControlFn(item, 5) this.getEnergyCameraControlFn(item, 5);
}, },
getEnergyCameraControlFn(cmd, spe) { getEnergyCameraControlFn(cmd, spe) {
getEnergyCameraControlAPi({ camId: this.cameraVal, cmdType: cmd, speed: spe }).then(res => { getEnergyCameraControlAPi({
camId: this.cameraVal,
cmdType: cmd,
speed: spe,
}).then((res) => {
// console.log('', res) // console.log('', res)
// this.videoUrl = res.data.liveUrl // this.videoUrl = res.data.liveUrl
}) });
}, },
cameraValChangeFn() { cameraValChangeFn() {
console.log('点击切换按钮', this.cameraVal) console.log("点击切换按钮", this.cameraVal);
this.cameraValCha(this.cameraOptList, this.cameraVal) this.cameraValCha(this.cameraOptList, this.cameraVal);
}, },
// cameraDataVideoList // cameraDataVideoList
cameraValCha(date, num) { cameraValCha(date, num) {
let str = { let str = {
0: '正常', 0: "正常",
1: '网络中断', 1: "网络中断",
2: '网络正常无图像', 2: "网络正常无图像",
3: '有图像图可能存在问题' 3: "有图像图可能存在问题",
} };
date.forEach(i => { date.forEach((i) => {
if (i.camId === num) { if (i.camId === num) {
this.cameraDataVideoList = [ this.cameraDataVideoList = [
{ id: 3001, txt: '设备名称', val: i.camName }, { id: 3001, txt: "设备名称", val: i.camName },
{ id: 3002, txt: '设备编号', val: i.camId }, { id: 3002, txt: "设备编号", val: i.camId },
{ id: 3003, txt: '设备桩号', val: i.pileNum }, { id: 3003, txt: "设备桩号", val: i.pileNum },
{ id: 3005, txt: '道路名称', val: i.deptName }, { id: 3005, txt: "道路名称", val: i.deptName },
{ id: 3006, txt: '道路状况', val: i.status == '-1' ? '未启用' : str[Number(i.status)] } {
] id: 3006,
txt: "道路状况",
val: i.status == "-1" ? "未启用" : str[Number(i.status)],
},
];
} }
}) });
}, },
tabClickFn(tab, event) { tabClickFn(tab, event) {
console.log(tab, event) console.log(tab, event);
}, },
____onClose() { ____onClose() {
this.$emit("update:visible", false); this.$emit("update:visible", false);
this.isShowTemplate = false this.isShowTemplate = false;
}, },
____onShowTemplate() { ____onShowTemplate() {
if (this.dialogInfoCamera) { if (this.dialogInfoCamera) {
this.dialogInfoCamera = false this.dialogInfoCamera = false;
} }
this.isShowTemplate = !this.isShowTemplate this.isShowTemplate = !this.isShowTemplate;
}, },
____onShowCameraShower() { ____onShowCameraShower() {
if (this.isShowTemplate) { if (this.isShowTemplate) {
this.isShowTemplate = false this.isShowTemplate = false;
} }
this.dialogInfoCamera = !this.dialogInfoCamera this.dialogInfoCamera = !this.dialogInfoCamera;
this.____getNearbyCams(); this.____getNearbyCams();
}, },
subjectBtnFn(item) { subjectBtnFn(item) {
this.subjectBtn = item.id this.subjectBtn = item.id;
} },
} },
} };
</script> </script>
<style lang='scss' scoped> <style lang="scss" scoped>
.listBox { .listBox {
padding: 20px; padding: 20px;
@ -457,7 +567,6 @@ export default {
color: #ccc; color: #ccc;
} }
} }
} }
.controlBox { .controlBox {
@ -481,7 +590,7 @@ export default {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
background: rgba(0, 0, 0, .36); background: rgba(0, 0, 0, 0.36);
z-index: 1100; z-index: 1100;
display: flex; display: flex;
justify-content: center; justify-content: center;
@ -519,7 +628,7 @@ export default {
width: 100%; width: 100%;
height: 48px; height: 48px;
padding: 0 10px; padding: 0 10px;
background-image: url('~@/assets/screen/xtb/qbbtit.png'); background-image: url("~@/assets/screen/xtb/qbbtit.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
@ -600,21 +709,21 @@ export default {
} }
.dialogContent_r_btn1 { .dialogContent_r_btn1 {
background-image: url('~@/assets/screen/xtb/gg.png'); background-image: url("~@/assets/screen/xtb/gg.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
} }
.dialogContent_r_btn2 { .dialogContent_r_btn2 {
background-image: url('~@/assets/screen/xtb/xx.png'); background-image: url("~@/assets/screen/xtb/xx.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
} }
.dialogContent_r_btn3 { .dialogContent_r_btn3 {
background-image: url('~@/assets/screen/xtb/zz.png'); background-image: url("~@/assets/screen/xtb/zz.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
@ -794,7 +903,7 @@ export default {
left: 27%; left: 27%;
top: 33%; top: 33%;
cursor: pointer; cursor: pointer;
background-image: url('~@/assets/screen/xtb/xjleft.png'); background-image: url("~@/assets/screen/xtb/xjleft.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
@ -811,7 +920,7 @@ export default {
width: 1.2vw; width: 1.2vw;
height: 2.4vh; height: 2.4vh;
border-radius: 50%; border-radius: 50%;
background-image: url('~@/assets/screen/xtb/jhbtn.png'); background-image: url("~@/assets/screen/xtb/jhbtn.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
@ -826,7 +935,7 @@ export default {
width: 1.2vw; width: 1.2vw;
height: 2.4vh; height: 2.4vh;
border-radius: 50%; border-radius: 50%;
background-image: url('~@/assets/screen/xtb/addbtn.png'); background-image: url("~@/assets/screen/xtb/addbtn.png");
background-size: 100% 100%; background-size: 100% 100%;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;

280
ruoyi-ui/src/views/workbench/config/components/board.vue

@ -1,7 +1,16 @@
<template> <template>
<div style="width: 100%; height: 100%"> <div style="width: 100%; height: 100%">
<el-dialog v-dialogDrag class="workbench-dialog workbench-boardDialog" :title="title" width="835px" append-to-body <el-dialog
:visible="visible" :before-close="handleClosee" :close-on-click-modal="false" :modal="false"> v-dialogDrag
class="workbench-dialog workbench-boardDialog"
:title="title"
width="835px"
append-to-body
:visible="visible"
:before-close="handleClosee"
:close-on-click-modal="false"
:modal="false"
>
<div class="dialogStyleBox"> <div class="dialogStyleBox">
<div class="dialogLine"></div> <div class="dialogLine"></div>
<div class="dialogCloseButton"></div> <div class="dialogCloseButton"></div>
@ -9,11 +18,18 @@
<div v-show="infoType == 'info'" style="display: flex"> <div v-show="infoType == 'info'" style="display: flex">
<div style="float: left"> <div style="float: left">
<div class="infoBox"> <div class="infoBox">
<el-table :data="contentList" row-key="ID" max-height="550" v-loading="loading"> <el-table
:data="contentList"
row-key="ID"
max-height="550"
v-loading="loading"
>
<el-table-column align="left" width="645"> <el-table-column align="left" width="645">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="contentBox"> <div class="contentBox">
<div class="content" :style="{ <div
class="content"
:style="{
color: scope.row.COLOR, color: scope.row.COLOR,
fontSize: addForm.devicePixel fontSize: addForm.devicePixel
? getFontSize( ? getFontSize(
@ -28,8 +44,10 @@
height: addForm.devicePixel height: addForm.devicePixel
? getDevicePixel(addForm.devicePixel, 1) + 'px' ? getDevicePixel(addForm.devicePixel, 1) + 'px'
: '', : '',
}"> }"
<span :style="{ >
<span
:style="{
left: getCoordinate( left: getCoordinate(
scope.row.COORDINATE.substring(0, 3), scope.row.COORDINATE.substring(0, 3),
'left' 'left'
@ -38,9 +56,16 @@
scope.row.COORDINATE.substring(3, 6), scope.row.COORDINATE.substring(3, 6),
'top' 'top'
), ),
}" class="boardTextStyle" v-html=" }"
scope.row.CONTENT?scope.row.CONTENT.replace(/\n|\r\n/g,'<br>').replace(/ /g, '&nbsp').replace('<r><n>', '<br>'):'' class="boardTextStyle"
"></span> v-html="
scope.row.CONTENT
? scope.row.CONTENT.replace(/\n|\r\n/g, '<br>')
.replace(/ /g, '&nbsp')
.replace('<r><n>', '<br>')
: ''
"
></span>
</div> </div>
</div> </div>
</template> </template>
@ -48,7 +73,10 @@
<el-table-column align="center" width="135"> <el-table-column align="center" width="135">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="infoButton"> <div class="infoButton">
<div @click="openQbbDrawer(scope.row, scope.$index, 1)" class="edit"></div> <div
@click="openQbbDrawer(scope.row, scope.$index, 1)"
class="edit"
></div>
<!-- <img <!-- <img
src="../../../../assets/cloudControl/edit2.png" src="../../../../assets/cloudControl/edit2.png"
@click="openQbbDrawer(scope.row, scope.$index, 1)" @click="openQbbDrawer(scope.row, scope.$index, 1)"
@ -59,13 +87,23 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<div class="openMIniDialogStyle" :class=" <div
class="openMIniDialogStyle"
:class="
msgModeShow ? 'el-icon-d-arrow-left' : 'el-icon-d-arrow-right' msgModeShow ? 'el-icon-d-arrow-left' : 'el-icon-d-arrow-right'
" @click="openMesMode"> "
@click="openMesMode"
>
信息模板 信息模板
</div> </div>
<el-form ref="form" :model="stateForm" label-width="75px" label-position="left" size="mini" <el-form
style="width: 800px"> ref="form"
:model="stateForm"
label-width="75px"
label-position="left"
size="mini"
style="width: 800px"
>
<el-tabs class="videoTabs" v-model="videoActive"> <el-tabs class="videoTabs" v-model="videoActive">
<el-tab-pane label="详细信息" name="information"> <el-tab-pane label="详细信息" name="information">
<el-row> <el-row>
@ -95,14 +133,17 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item label="设备状态:" :style="{ <el-form-item
label="设备状态:"
:style="{
color: color:
stateForm.eqStatus == '1' stateForm.eqStatus == '1'
? 'yellowgreen' ? 'yellowgreen'
: stateForm.eqStatus == '2' : stateForm.eqStatus == '2'
? 'white' ? 'white'
: 'red', : 'red',
}"> }"
>
{{ geteqType(stateForm.eqStatus) }} {{ geteqType(stateForm.eqStatus) }}
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -127,39 +168,69 @@
</el-col> </el-col>
</el-row> </el-row>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="在线率统计" name="third"
>在线率统计</el-tab-pane
>
</el-tabs> </el-tabs>
</el-form> </el-form>
<div slot="footer" style="margin: 10px 0 20px; width: 800px" class="dialog-footer"> <div
<el-button @click="openDialogVisible(1, 1)" style="width: 80px" class="submitButton" slot="footer"
v-hasPermi="['workbench:dialog:save']">添加信息</el-button> style="margin: 10px 0 20px; width: 800px"
<el-button @click="releaseInfo()" v-hasPermi="['workbench:dialog:save']" :disabled="contentList.length == 0" class="dialog-footer"
>
<el-button
@click="openDialogVisible(1, 1)"
style="width: 80px"
class="submitButton"
v-hasPermi="['workbench:dialog:save']"
>添加信息</el-button
>
<el-button
@click="releaseInfo()"
v-hasPermi="['workbench:dialog:save']"
:disabled="contentList.length == 0"
:class=" :class="
contentList.length == 0 contentList.length == 0
? 'zancunButtonDisabled' ? 'zancunButtonDisabled'
: 'zancunButton' : 'zancunButton'
">信息发布</el-button> "
>信息发布</el-button
>
</div> </div>
</div> </div>
<div class="boardRightBox" v-show="msgModeShow"> <div class="boardRightBox" v-show="msgModeShow">
<div class="mesModeBg"> <div class="mesModeBg">
<div class="mesModeBox"> <div class="mesModeBox">
<el-collapse v-model="activeNames" @change="handleChange"> <el-collapse v-model="activeNames" @change="handleChange">
<el-collapse-item v-for="(item, index) in iotTemplateCategoryList" :key="index" :title="item.dictLabel" <el-collapse-item
:name="item.dictValue"> v-for="(item, index) in iotTemplateCategoryList"
<div v-for="(itm, indx) in item.list" :key="indx" class="con" :style="{ :key="index"
:title="item.dictLabel"
:name="item.dictValue"
>
<div
v-for="(itm, indx) in item.list"
:key="indx"
class="con"
:style="{
'font-size': getFontSize( 'font-size': getFontSize(
itm.tcontents[0].fontSize, itm.tcontents[0].fontSize,
itm.screenSize itm.screenSize
), ),
color: getColorStyle(itm.tcontents[0].fontColor), color: getColorStyle(itm.tcontents[0].fontColor),
fontFamily: itm.tcontents[0].fontType, fontFamily: itm.tcontents[0].fontType,
}"> }"
>
<div class="templateTitle"> <div class="templateTitle">
<div :style="{ <div
:style="{
width: getDevicePixel(itm.screenSize, 0) + 'px', width: getDevicePixel(itm.screenSize, 0) + 'px',
height: getDevicePixel(itm.screenSize, 1) + 'px', height: getDevicePixel(itm.screenSize, 1) + 'px',
}" style="background: black; position: relative"> }"
<span :style="{ style="background: black; position: relative"
>
<span
:style="{
left: getCoordinate( left: getCoordinate(
itm.tcontents[0].coordinate.substring(0, 3), itm.tcontents[0].coordinate.substring(0, 3),
'left', 'left',
@ -170,11 +241,14 @@
'top', 'top',
itm.screenSize itm.screenSize
), ),
}" class="boardTextStyle" v-html=" }"
class="boardTextStyle"
v-html="
itm.tcontents[0].content itm.tcontents[0].content
.replace(/\n|\r\n/g, '<br>') .replace(/\n|\r\n/g, '<br>')
.replace(/ /g, '&nbsp') .replace(/ /g, '&nbsp')
"></span> "
></span>
</div> </div>
</div> </div>
<div class="downIcon"> <div class="downIcon">
@ -189,32 +263,28 @@
</div> </div>
</el-dialog> </el-dialog>
<editInfo :boardEmitItem="this.boardEmitItem" @receiveForm="receiveForm" v-if="this.showEmit" <editInfo
@dialogClose="dialogClose1"></editInfo> :boardEmitItem="this.boardEmitItem"
@receiveForm="receiveForm"
v-if="this.showEmit"
@dialogClose="dialogClose1"
></editInfo>
<addinfo ref="addinfo" @addInfo="addInfo"></addinfo> <addinfo ref="addinfo" @addInfo="addInfo"></addinfo>
</div> </div>
</template> </template>
<script> <script>
import $ from "jquery"; import $ from "jquery";
import { import { displayH5sVideoAll } from "@/api/icyH5stream";
displayH5sVideoAll import { getDeviceById } from "@/api/equipment/eqlist/api.js"; //
} from "@/api/icyH5stream"; import { getInfo } from "@/api/equipment/tunnel/api.js"; //
import { import { listDevice } from "@/api/board/informationBoard.js"; //
getDeviceById
} from "@/api/equipment/eqlist/api.js"; //
import {
getInfo
} from "@/api/equipment/tunnel/api.js"; //
import {
listDevice
} from "@/api/board/informationBoard.js"; //
import { import {
getAllVmsTemplate, getAllVmsTemplate,
uploadBoardEditInfo, uploadBoardEditInfo,
// getBoardContent, // getBoardContent,
splicingBoard, splicingBoard,
gantryVmsInfo gantryVmsInfo,
} from "@/api/board/template"; } from "@/api/board/template";
import boardData from "@/views/information/board/boardData.json"; import boardData from "@/views/information/board/boardData.json";
import editInfo from "@/views/information/board/editInfo"; import editInfo from "@/views/information/board/editInfo";
@ -222,7 +292,7 @@
import Sortable from "sortablejs"; import Sortable from "sortablejs";
import { import {
getBoardEditInfo, getBoardEditInfo,
getBoardContentData getBoardContentData,
} from "@/api/information/api.js"; } from "@/api/information/api.js";
// //
export const deepClone = (data) => { export const deepClone = (data) => {
@ -318,10 +388,7 @@
const _this = this; const _this = this;
Sortable.create(tbody, { Sortable.create(tbody, {
// //
onEnd({ onEnd({ newIndex, oldIndex }) {
newIndex,
oldIndex
}) {
const currentRow = _this.contentList.splice(oldIndex, 1)[0]; const currentRow = _this.contentList.splice(oldIndex, 1)[0];
_this.contentList.splice(newIndex, 0, currentRow); _this.contentList.splice(newIndex, 0, currentRow);
}, },
@ -338,16 +405,16 @@
.then(() => { .then(() => {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: 'Loading', text: "Loading",
spinner: 'el-icon-loading', spinner: "el-icon-loading",
background: 'rgba(0, 0, 0, 0.7)' background: "rgba(0, 0, 0, 0.7)",
}); });
if (this.eqInfo.clickEqType == 16) { if (this.eqInfo.clickEqType == 16) {
const objAll = {}; const objAll = {};
objAll.deviceIds = this.eqInfo.equipmentId; objAll.deviceIds = this.eqInfo.equipmentId;
let that = this let that = this;
let newArr = this.contentList.map(function (item) { let newArr = this.contentList.map(function (item) {
let obj = {} let obj = {};
obj.STAY = item.STAY; obj.STAY = item.STAY;
obj.ACTION = item.ACTION; obj.ACTION = item.ACTION;
obj.SPEED = item.SPEED; obj.SPEED = item.SPEED;
@ -356,18 +423,22 @@
obj.FONT = that.getFontValue(item.FONT); obj.FONT = that.getFontValue(item.FONT);
obj.FONT_SIZE = item.FONT_SIZE.substring(0, 2); obj.FONT_SIZE = item.FONT_SIZE.substring(0, 2);
obj.CONTENT = item.CONTENT?item.CONTENT.replace(/\n|\r\n/g, "<r><n>"):''; obj.CONTENT = item.CONTENT
return obj ? item.CONTENT.replace(/\n|\r\n/g, "<r><n>")
}) : "";
objAll.parameters = newArr return obj;
});
objAll.parameters = newArr;
const param = { const param = {
objectData: JSON.stringify(objAll) objectData: JSON.stringify(objAll),
} };
console.log(param, "param") console.log(param, "param");
splicingBoard(param).then((res) => { splicingBoard(param)
.then((res) => {
this.$modal.msgSuccess("发布成功"); this.$modal.msgSuccess("发布成功");
loading.close(); loading.close();
}).catch((res) => { })
.catch((res) => {
loading.close(); loading.close();
// this.$message({ // this.$message({
// type: "info", // type: "info",
@ -377,9 +448,9 @@
} else { } else {
const objAll = {}; const objAll = {};
objAll.deviceIds = this.eqInfo.equipmentId; objAll.deviceIds = this.eqInfo.equipmentId;
let that = this let that = this;
let newArr = this.contentList.map(function (item) { let newArr = this.contentList.map(function (item) {
let obj = {} let obj = {};
obj.delay = item.STAY; obj.delay = item.STAY;
obj.showStyle = item.ACTION; obj.showStyle = item.ACTION;
obj.speed = item.SPEED; obj.speed = item.SPEED;
@ -394,23 +465,24 @@
obj.fontSize = item.FONT_SIZE.substring(0, 2); obj.fontSize = item.FONT_SIZE.substring(0, 2);
obj.content = item.CONTENT.replace(/\n|\r\n/g, "<r><n>"); obj.content = item.CONTENT.replace(/\n|\r\n/g, "<r><n>");
return obj return obj;
}) });
objAll.screenList = newArr objAll.screenList = newArr;
const param = { const param = {
objectData: JSON.stringify(objAll) objectData: JSON.stringify(objAll),
} };
gantryVmsInfo(param).then((res)=>{ gantryVmsInfo(param)
loading.close(); .then((res) => {
}).catch(() => {
loading.close(); loading.close();
}) })
.catch(() => {
loading.close();
});
} }
// let parameters = [] // let parameters = []
// parameters.push(obj) // parameters.push(obj)
// var content = ""; // var content = "";
// var playList = "[Playlist]<r><n>"; // var playList = "[Playlist]<r><n>";
// var Item_Start = "ITEM_NO="; // var Item_Start = "ITEM_NO=";
@ -468,15 +540,15 @@
}, },
// //
getFont(font) { getFont(font) {
if (font == "KaiTi" || font == 'k') { if (font == "KaiTi" || font == "k") {
return "楷体"; return "楷体";
} else if (font == "SimSun" || font == 's') { } else if (font == "SimSun" || font == "s") {
return "宋体"; return "宋体";
} else if (font == "SimHei" || font == 'h') { } else if (font == "SimHei" || font == "h") {
return "黑体"; return "黑体";
} else if (font == "FangSong" || font == 'f') { } else if (font == "FangSong" || font == "f") {
return "仿宋"; return "仿宋";
} else if (font == "LiSu" || font == 'l') { } else if (font == "LiSu" || font == "l") {
return "隶书"; return "隶书";
} else { } else {
return font; return font;
@ -535,25 +607,27 @@
onSubmit() { onSubmit() {
this.loading = true; this.loading = true;
const param = { const param = {
deviceId: this.associatedDeviceId deviceId: this.associatedDeviceId,
} };
getBoardContentData(param).then((res) => { getBoardContentData(param)
console.log(res, "onSubmit") .then((res) => {
console.log(res, "onSubmit");
var contents = res.data.parameters; var contents = res.data.parameters;
console.log(contents, "onSubmit-----contents") console.log(contents, "onSubmit-----contents");
for (let i = 0; i < contents.length; i++) { for (let i = 0; i < contents.length; i++) {
let item = contents[i] let item = contents[i];
item.COLOR = this.getColorStyle(item.COLOR); item.COLOR = this.getColorStyle(item.COLOR);
item.FONT_SIZE = Number(item.FONT_SIZE.substring(0, 2)) + "px"; item.FONT_SIZE = Number(item.FONT_SIZE.substring(0, 2)) + "px";
item.ID = i; item.ID = i;
item.FONT = this.getFont(item.FONT) item.FONT = this.getFont(item.FONT);
item.CONTENT = item.CONTENT item.CONTENT = item.CONTENT;
this.contentList.push(item); this.contentList.push(item);
} }
console.log(this.contentList, "onSubmit-----this.contentList") console.log(this.contentList, "onSubmit-----this.contentList");
this.loading = false; this.loading = false;
this.rowDrop(); this.rowDrop();
}).catch((e) => { })
.catch((e) => {
this.loading = false; this.loading = false;
}); });
// getBoardEditInfo(this.associatedDeviceId) // getBoardEditInfo(this.associatedDeviceId)
@ -633,7 +707,7 @@
moveTop(i, item) { moveTop(i, item) {
if (item && i) { if (item && i) {
let obj = { let obj = {
...this.contentList[i - 1] ...this.contentList[i - 1],
}; };
this.contentList.splice(i - 1, 1, item); this.contentList.splice(i - 1, 1, item);
this.contentList.splice(i, 1, obj); this.contentList.splice(i, 1, obj);
@ -644,7 +718,7 @@
moveBottom(i, item) { moveBottom(i, item) {
if (item && typeof i === "number") { if (item && typeof i === "number") {
let obj = { let obj = {
...this.contentList[i + 1] ...this.contentList[i + 1],
}; };
this.contentList.splice(i + 1, 1, item); this.contentList.splice(i + 1, 1, item);
this.contentList.splice(i, 1, obj); this.contentList.splice(i, 1, obj);
@ -752,13 +826,17 @@
}, },
// //
getColorStyle(font) { getColorStyle(font) {
if (font == "黄色" || font == '255255000000') { if (font == "黄色" || font == "255255000000") {
return "yellow"; return "yellow";
} else if (font == "红色" || font == '255000000000') { } else if (font == "红色" || font == "255000000000") {
return "red"; return "red";
} else if (font == "绿色" || font == "GreenYellow" || font == '000255000000') { } else if (
font == "绿色" ||
font == "GreenYellow" ||
font == "000255000000"
) {
return "#00FF00"; return "#00FF00";
} else if (font == "蓝色" || font == '000000255000') { } else if (font == "蓝色" || font == "000000255000") {
return "blue"; return "blue";
} else { } else {
return font; return font;
@ -831,9 +909,11 @@
handleClosee() { handleClosee() {
if (this.associatedDeviceId) { if (this.associatedDeviceId) {
const param = { const param = {
deviceId: this.associatedDeviceId deviceId: this.associatedDeviceId,
} };
getBoardContentData(param).then((res) => {}).catch((e) => {}); getBoardContentData(param)
.then((res) => {})
.catch((e) => {});
// getBoardContent(this.associatedDeviceId) // getBoardContent(this.associatedDeviceId)
// .then((res) => { // .then((res) => {
// console.log(res, ""); // console.log(res, "");
@ -850,7 +930,6 @@
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@ -1175,5 +1254,4 @@
::v-deep .el-dialog { ::v-deep .el-dialog {
pointer-events: auto !important; pointer-events: auto !important;
} }
</style> </style>

1
ruoyi-ui/src/views/workbench/config/components/video.vue

@ -156,6 +156,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="在线率统计" name="third">在线率统计</el-tab-pane>
</el-tabs> </el-tabs>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">

Loading…
Cancel
Save