From 98b031720bbf45c51f710393bf8820699e30be80 Mon Sep 17 00:00:00 2001 From: hui <770260999@qq.com> Date: Wed, 15 May 2024 16:30:46 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=AD=E9=9F=B3=E5=B9=BF=E6=92=AD=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/api/broadcast/broadcast.js | 56 + ruoyi-ui/src/api/broadcast/record.js | 53 + ruoyi-ui/src/api/broadcast/template.js | 216 +++ ruoyi-ui/src/common/menuData.js | 6 + .../broadcast/BroadcastTplShower.vue | 44 + .../components/broadcast/broadcastEditor.vue | 432 ++++++ .../views/JiHeExpressway/mixins/broadcast.js | 144 ++ .../components/HomeFrameControl/index.vue | 6 +- .../pages/service/broadcast/addinfo copy.vue | 973 ++++++++++++++ .../pages/service/broadcast/editInfo.vue | 963 ++++++++++++++ .../pages/service/broadcast/index.vue | 1174 +++++++++++++++++ .../service/broadcast/testData/device.js | 116 ++ .../service/broadcast/testData/direction.js | 59 + .../service/broadcast/testData/template.js | 166 +++ .../broadcast/testData/templateCategory.js | 116 ++ .../src/views/JiHeExpressway/utils/enum.js | 8 + ruoyi-ui/src/views/websocket.vue | 3 +- ruoyi-ui/vue.config.js | 4 +- 18 files changed, 4533 insertions(+), 6 deletions(-) create mode 100644 ruoyi-ui/src/api/broadcast/broadcast.js create mode 100644 ruoyi-ui/src/api/broadcast/record.js create mode 100644 ruoyi-ui/src/api/broadcast/template.js create mode 100644 ruoyi-ui/src/views/JiHeExpressway/components/broadcast/BroadcastTplShower.vue create mode 100644 ruoyi-ui/src/views/JiHeExpressway/components/broadcast/broadcastEditor.vue create mode 100644 ruoyi-ui/src/views/JiHeExpressway/mixins/broadcast.js create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/addinfo copy.vue create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/editInfo.vue create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/index.vue create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/testData/device.js create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/testData/direction.js create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/testData/template.js create mode 100644 ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/testData/templateCategory.js diff --git a/ruoyi-ui/src/api/broadcast/broadcast.js b/ruoyi-ui/src/api/broadcast/broadcast.js new file mode 100644 index 00000000..5d664d1e --- /dev/null +++ b/ruoyi-ui/src/api/broadcast/broadcast.js @@ -0,0 +1,56 @@ +import request from '@/utils/request' + +// 查询设备列表 +export function getdeviceList(query) { + return request({ + url: '/business/device/query', + method: 'get', + params: { + ...query, + deviceType:5 + } + }) +} + +// 查询设备列表 +export function getBoardDeviceInfo(deviceId) { + return request({ + // url: `/business/board/realtimeProperty/${deviceId}`, + url: `/business/device/properties/realtime/${deviceId}/3A`, + // url: `/business/device/batchFunctions`, + method: 'GET', + params: {} + }) +} + +// 敏感字段检测 +export function checkBoardContent(content) { + return request({ + url: `/business/dcInfoBoardVocabulary/checkBoardContent`, + method: 'get', + params:{ + content + } + }) +} + +// 保存情报板发布日志 +export function saveBoardReleaseLog(data) { + return request({ + url: `/business/boardReleaseLog`, + method: 'post', + data + }) +} + +export function publishToBoard(data) { + return request({ + // url: '/business/board/batch/publish', + url: `/broadcast/broadcastFunctionCall`, + method: 'post', + // data: data + data + }) +} + + diff --git a/ruoyi-ui/src/api/broadcast/record.js b/ruoyi-ui/src/api/broadcast/record.js new file mode 100644 index 00000000..b23c32b2 --- /dev/null +++ b/ruoyi-ui/src/api/broadcast/record.js @@ -0,0 +1,53 @@ +import request from '@/utils/request' + +// 查询发布记录列表 +export function listRecord(query) { + return request({ + url: '/system/log/list', + method: 'get', + params: query + }) +} + +// 查询发布记录详细 +export function getRecord(id) { + return request({ + url: '/system/record/' + id, + method: 'get' + }) +} + +// 新增发布记录 +export function addRecord(data) { + return request({ + url: '/system/record', + method: 'post', + data: data + }) +} + +// 修改发布记录 +export function updateRecord(data) { + return request({ + url: '/system/record', + method: 'put', + data: data + }) +} + +// 删除发布记录 +export function delRecord(id) { + return request({ + url: '/system/record/' + id, + method: 'delete' + }) +} + +// 导出发布记录 +export function exportRecord(query) { + return request({ + url: '/system/log/export', + method: 'get', + params: query + }) +} diff --git a/ruoyi-ui/src/api/broadcast/template.js b/ruoyi-ui/src/api/broadcast/template.js new file mode 100644 index 00000000..e98e3abf --- /dev/null +++ b/ruoyi-ui/src/api/broadcast/template.js @@ -0,0 +1,216 @@ + +import request from '@/utils/request' + +// 查询模板列表 +export function getTemplateList(query) { + return request({ + url: '/system/broadcast/listAll', + method: 'get', + params: query + }) +} + +// 新增情报板模板 +export function addTemplate(data) { + console.log(data , "dddddddddaaataaaa") + return request({ + url: '/system/broadcast', + method: 'post', + data: data + }) +} + +//修改情报板模板 +export function editTemplate(data) { + return request({ + url: '/system/broadcast', + method: 'put', + data: data + }) +} + + + + + + + + + + + + + + + + + +//修改情报板模板内容 +export function editTemplateContent(data) { + return request({ + url: '/system/content', + method: 'put', + data: data + }) +} + +// 删除情报板模板 +export function deleteTemplate(id) { + return request({ + url: '/system/broadcast/' + id, + method: 'delete' + }) +} + + + + + + + + + + + + + + + + +//获取情报板模板详细信息 +export function getTemplateInfo(id) { + return request({ + url: '/system/template/' + id, + method: 'get', + }) +} + +//获取情报板模板内容信息 +export function getTemplateContent(id) { + return request({ + url: '/system/content/list?templateId=' + id, + method: 'get', + }) +} + + + +//新增情报板模板内容 +export function addTemplateContent(data) { + return request({ + url: '/system/content', + method: 'post', + data: data + }) +} + +//图片库列表查询 +export function getGalleryList() { + return request({ + url: '/system/upload/list', + method: 'get', + }) +} + +//图片获取详细信息 +export function getGallery(id) { + return request({ + url: '/system/upload/'+ id, + method: 'get', + }) +} + + +// 情报板发布 +export function postInformationBoardRelease(data) { + return request({ + url: '/system/template/informationBoardRelease', + method: 'post', + data: data + }) +} + +// 情报板获取 +export function getInformationBoardRelease(data) { + return request({ + url: '/system/template/informationBoardAcquisition', + method: 'post', + data: data + }) +} + +//情报板发布 +export function uploadBoardEditInfo(devicelds,protocolType,parameters) { + var data = { + deviceIds:devicelds, + protocolType:protocolType, + // parameters:parameters + parameters:encodeURI(parameters) + + } + return request({ + url: '/parser/board/uploadBoardEditInfo', + method: 'get', + params: data + }) +} + +//情报板发布 隧道内 +export function splicingBoard(data) { + return request({ + url: '/parser/board/splicingBoard', + method: 'get', + params: data + + }) +} + +//情报板发布 门架式 +export function gantryVmsInfo(data) { + return request({ + url: '/parser/board/gantryVmsInfo', + method: 'get', + params: data + + }) +} + + +//情报板管理右侧查询接口 +export function getAllVmsTemplate(data) { + return request({ + url: '/system/template/getAllVmsTemplate', + method: 'get', + params: data + + }) +} + +// 情报板内容查询 +export function getBoardContent(deviceId) { + return request({ + url: '/parser/board/getBoardContent?deviceId=' + deviceId, + method: 'get', + + }) +} + + +// 情报板根据分辨率筛字体大小 +export function getFontSizeByDevicePixel(screenSize) { + return request({ + url: '/parser/board/getFontSizeByDevicePixel/' + screenSize, + method: 'get', + + }) +} + + +// 导出情报板模板 +export function exportTemplate(query) { + return request({ + url: '/system/template/export', + method: 'get', + params: query + }) +} diff --git a/ruoyi-ui/src/common/menuData.js b/ruoyi-ui/src/common/menuData.js index fabf1536..c5517702 100644 --- a/ruoyi-ui/src/common/menuData.js +++ b/ruoyi-ui/src/common/menuData.js @@ -209,6 +209,12 @@ export default [ path: "/service/sensitive", component: "service/sensitive/index.vue", }, + { + title: "语音广播发布", + name: "broadcast", + path: "/service/broadcast", + component: "service/broadcast/index.vue", + }, { title: "发布渠道管理", name: "PublishingChannelManagement", diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/broadcast/BroadcastTplShower.vue b/ruoyi-ui/src/views/JiHeExpressway/components/broadcast/BroadcastTplShower.vue new file mode 100644 index 00000000..e5caa57c --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/broadcast/BroadcastTplShower.vue @@ -0,0 +1,44 @@ + + + \ No newline at end of file diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/broadcast/broadcastEditor.vue b/ruoyi-ui/src/views/JiHeExpressway/components/broadcast/broadcastEditor.vue new file mode 100644 index 00000000..d14ece18 --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/broadcast/broadcastEditor.vue @@ -0,0 +1,432 @@ + + + diff --git a/ruoyi-ui/src/views/JiHeExpressway/mixins/broadcast.js b/ruoyi-ui/src/views/JiHeExpressway/mixins/broadcast.js new file mode 100644 index 00000000..fa3aaacc --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/mixins/broadcast.js @@ -0,0 +1,144 @@ +import { publishToBoard, saveBoardReleaseLog } from "@/api/broadcast/broadcast"; +import moment from "moment/moment"; +import store from "@/store"; +export default { + data() { + return {}; + }, + methods: { + // 新增待下发 + ____onAddDeviceItem() { + + this.editDialog = { + visible: true, + mode: "add", + type: "device", + tpl: { + content:"" + }, + }; + }, + // 从模板新增待下发 + ____onTplToDevice(item, showDialog) { + // if(this.checkedDeviceIds.length<=0){ + // this.$message.warning('未选择设备!'); + // return; + // } + + if (this.selectedBdMsg.length >= 1){ + this.$message({ + type: "warning", + message: "只能发布一条语音广播!", + }); + return; + } + + this.editDialog = { + visible: showDialog == false ? false : true, + mode: "toDevice", + type: "template", + tpl: item, + }; + }, + // 发布信息 + ____publishInfo() { + let deviceList = []; + if (this.selectedDevice){ + deviceList = [item.otherConfig]; + } + else{ + this.selectedDevices.forEach(item=>{ + deviceList.push(item.otherConfig); + }) + } + this.$confirm("是否确定发布语音广播?", "提示", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(() => { + let loading = this.$loading({ + lock: true, + text: "Loading", + spinner: "el-icon-loading", + background: "rgba(0, 0, 0, 0.7)", + }); + + // let content = []; + + let data = { + functionType : "startPaTts", + name : "task-3", + // outVol : "6", + outVol: this.selectedBdMsg[0].outVol, + // priority : "1", + priority: this.selectedBdMsg[0].priority, + repeatTimes: this.selectedBdMsg[0].repeatTimes, + // termList : [{ zoneld: "6001", termDN: "601" }, { zoneld: "6001", termDN: "608" }, { zoneld: "6001", termDN: "610" }], + termList: deviceList, + text: this.selectedBdMsg[0].content + } + + if (IS_TESTING) { + // this.saveLog(content); + this.____getDeviceInfo(); + loading.close(); + } else { + publishToBoard(data) + .then((res) => { + // this.saveLog(content); + this.$message({ + type: "success", + message: "发布成功!", + }); + // !isMultiControl && this.____getDeviceInfo(); + }) + .catch((err) => {}) + .finally(() => { + loading.close(); + }); + } + }) + .catch(() => { + this.$message({ + type: "info", + message: "取消发布", + }); + }); + }, + // + saveLog(content) { + let time = moment().format("YYYY-MM-DD HH:mm:ss"); + let device = this.selectedDevices; + let data = { + createBy: store.getters.name, + createTime: time, + deviceId: device.id, + deviceName: device.deviceName, + direction: device.direction, + params: {}, + platform: "", + releaseContent: JSON.stringify(content), + releaseDeptId: "", + releaseDeptName: "", + releaseIp: "", + releaseStatus: "", + releaseTime: time, + releaseUserId: "", + releaseUserName: "", + remark: "", + searchValue: "", + stakeMark: device.stakeMark, + updateBy: "", + updateTime: time, + }; + saveBoardReleaseLog(data).then((res) => { + if (res.code == 200) { + console.log("情报板日志已保存:::", data); + } else { + console.log("情报板日志保存失败!"); + } + }); + }, + }, +}; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue index fea8dc43..5d115634 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/HomeFrameControl/index.vue @@ -33,8 +33,8 @@ -
- 暂无数据 +
+ 暂无数据