Browse Source

更改首页bug

wangqin
zhangzhang 12 months 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-row>
</el-tab-pane>
<el-tab-pane label="在线率统计" name="third">在线率统计</el-tab-pane>
</el-tabs>
</el-form>
<div slot="footer">

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

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

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

@ -6,14 +6,25 @@
<ElTabPane label="基本信息" name="first">
<Descriptions :list="list" :data="data" style="gap: 18px">
<template #content-deviceName>
<span>{{ dialogData.deviceName || '-' }}</span>
<img @click="controlDialogVisible = true"
v-if="[0, '0'].includes(dialogData.parseOtherConfig && dialogData.parseOtherConfig.ptzCtrl)"
src="@screen/images/camera-control-icon.svg" width="18px" height="18px" style="cursor: pointer;">
<span>{{ dialogData.deviceName || "-" }}</span>
<img
@click="controlDialogVisible = true"
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>
</Descriptions>
</ElTabPane>
<ElTabPane label="摄相机参数" name="second">摄相机参数</ElTabPane>
<ElTabPane label="在线率统计" name="third">在线率统计</ElTabPane>
</ElTabs>
<div class="bottom">
@ -22,71 +33,77 @@
</div>
</div>
<CameraControlDialog :deviceId="dialogData.iotDeviceId" v-model="controlDialogVisible" />
<CameraControlDialog
:deviceId="dialogData.iotDeviceId"
v-model="controlDialogVisible"
/>
</Dialog>
</template>
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Video from "@screen/components/Video"
import Descriptions from '@screen/components/Descriptions.vue';
import Button from "@screen/components/Buttons/Button.vue";
import Video from "@screen/components/Video";
import Descriptions from "@screen/components/Descriptions.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 {
name: 'Camera',
name: "Camera",
mixins: [dialogDelayVisible],
components: {
Dialog,
Button,
Descriptions,
Video,
CameraControlDialog
CameraControlDialog,
},
data() {
return {
activeName: 'first',
activeName: "first",
controlDialogVisible: false,
data: {},
list: [
{
label: '设备名称',
label: "设备名称",
key: "deviceName",
},
{
label: '道路名称',
label: "道路名称",
key: "roadName",
},
{
label: '设备编号',
label: "设备编号",
key: "deviceCode",
},
{
label: '所属机构',
label: "所属机构",
key: "organizationName",
},
{
label: '设备桩号',
label: "设备桩号",
key: "stakeMark",
},
{
label: '设备方向',
label: "设备方向",
key: "direction",
enum: "CameraDirectionEnum"
enum: "CameraDirectionEnum",
},
{
label: '设备状态',
label: "设备状态",
key: "deviceState",
enum: "DeviceTypeEnum",
gridColumn: 2,
},
{
label: '状态更新时间',
label: "状态更新时间",
key: "updateTime",
gridColumn: 2,
// enum: "CameraDirectionEnum"
@ -96,16 +113,13 @@ export default {
// key: "${longitude} / ${latitude}",
// },
],
}
},
watch: {
};
},
watch: {},
async created() {
this.data = { ...this.dialogData, organizationName: null, roadName: null };
getOrganizationName(this.dialogData.iotDeviceId)
.then((data) => {
getOrganizationName(this.dialogData.iotDeviceId).then((data) => {
this.data.organizationName = data?.organizationName;
});
@ -118,12 +132,12 @@ export default {
if (bool) return;
this.controlDialogVisible = false;
}
}
}
},
},
};
</script>
<style lang='scss' scoped>
<style lang="scss" scoped>
.Camera {
width: 600px;
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" />
</ElTabPane>
<ElTabPane label="设备参数" name="second">
<div class="content-second" style="height: 185px;">
<div class="content-second" style="height: 185px">
<RadioGroup v-model="roadType" :options="roadTypeList" />
<span>当前车流量: 999</span>
<LineChartForTraffic style="flex: 1;" v-if="activeName === 'second'" />
<LineChartForTraffic
style="flex: 1"
v-if="activeName === 'second'"
/>
</div>
</ElTabPane>
<ElTabPane label="在线统计率" name="third">
<ElTabPane label="在线统计" name="third">
<LineChart v-if="activeName === 'third'" />
</ElTabPane>
</ElTabs>
@ -24,22 +27,25 @@
<script>
import Dialog from "@screen/components/Dialog/index.vue";
import Button from "@screen/components/Buttons/Button.vue"
import Descriptions from '@screen/components/Descriptions.vue';
import Video from "@screen/components/Video"
import LineChart from './components/LineChart/index.vue';
import LineChartForTraffic from './components/LineChartForTraffic/index.vue';
import Switcher from '@screen/pages/service/PublishingChannelManagement/components/Switcher.vue';
import { getRoadInfoByStakeMark, getProduct } from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js"
import { dialogDelayVisible } from "./../mixin"
import Button from "@screen/components/Buttons/Button.vue";
import Descriptions from "@screen/components/Descriptions.vue";
import Video from "@screen/components/Video";
import LineChart from "./components/LineChart/index.vue";
import LineChartForTraffic from "./components/LineChartForTraffic/index.vue";
import Switcher from "@screen/pages/service/PublishingChannelManagement/components/Switcher.vue";
import {
getRoadInfoByStakeMark,
getProduct,
} from "@screen/pages/Home/components/RoadAndEvents/utils/httpList.js";
import { dialogDelayVisible } from "./../mixin";
import request from "@/utils/request";
import { Message } from 'element-ui';
import RadioGroup from '@screen/components/FormConfig/components/RadioGroup/index.vue';
import { Message } from "element-ui";
import RadioGroup from "@screen/components/FormConfig/components/RadioGroup/index.vue";
// 广
export default {
name: 'Intermodulation',
name: "Intermodulation",
mixins: [dialogDelayVisible],
components: {
Dialog,
@ -49,11 +55,11 @@ export default {
LineChartForTraffic,
Video,
Switcher,
RadioGroup
RadioGroup,
},
data() {
return {
activeName: 'first',
activeName: "first",
releaseVisible: false,
secondLoading: true,
data: {
@ -67,32 +73,32 @@ export default {
},
roadTypeList: [
{ key: '1', label: '济南方向' },
{ key: '3', label: '菏泽方向' },
{ key: "1", label: "济南方向" },
{ key: "3", label: "菏泽方向" },
],
roadType: '1',
roadType: "1",
list: [
{
label: '设备名称',
label: "设备名称",
key: "deviceName",
},
{
label: '设备桩号',
label: "设备桩号",
key: "stakeMark",
},
{
label: '道路名称',
label: "道路名称",
key: "roadName",
},
{
label: '设备方向',
label: "设备方向",
key: "direction",
enum: "CameraDirectionEnum"
enum: "CameraDirectionEnum",
},
{
label: '设备状态',
label: "设备状态",
key: "deviceState",
enum: "DeviceTypeEnum"
enum: "DeviceTypeEnum",
},
// {
// label: '',
@ -101,21 +107,25 @@ export default {
],
activeOption: {
active: {
text: "开"
text: "开",
},
unActive: {
text: "关"
}
text: "关",
},
devicesList: []
}
},
devicesList: [],
};
},
async created() {
// 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)
// .then(data => {
@ -125,17 +135,17 @@ export default {
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
if (roadInfo) this.data.roadName = roadInfo.roadName;
}
}
},
};
</script>
<style lang='scss'>
<style lang="scss">
div.switcher {
font-size: 12px;
padding: 2px;
}
</style>
<style lang='scss' scoped>
<style lang="scss" scoped>
.Intermodulation {
width: 510px;
height: 240px;

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save