diff --git a/ruoyi-ui/src/api/board/board.js b/ruoyi-ui/src/api/board/board.js index 95397b90..dcdeda22 100644 --- a/ruoyi-ui/src/api/board/board.js +++ b/ruoyi-ui/src/api/board/board.js @@ -85,7 +85,8 @@ export function publishToBoard(data) { ] } - }) + }); + } diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/broadcast/BroadcastTplList.vue b/ruoyi-ui/src/views/JiHeExpressway/components/broadcast/BroadcastTplList.vue new file mode 100644 index 00000000..2006b91c --- /dev/null +++ b/ruoyi-ui/src/views/JiHeExpressway/components/broadcast/BroadcastTplList.vue @@ -0,0 +1,249 @@ + + + \ No newline at end of file diff --git a/ruoyi-ui/src/views/JiHeExpressway/mixins/broadcast.js b/ruoyi-ui/src/views/JiHeExpressway/mixins/broadcast.js index fa3aaacc..c3ac3d18 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/mixins/broadcast.js +++ b/ruoyi-ui/src/views/JiHeExpressway/mixins/broadcast.js @@ -18,28 +18,6 @@ export default { }, }; }, - // 从模板新增待下发 - ____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 = []; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue index b8ce4ed6..81061944 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Broadcast/components/BroadcastReleases.vue @@ -1,5 +1,5 @@ -
+
+
+ + + + + +
@@ -84,14 +87,19 @@ import { getDeviceList } from "@screen/pages/Home/components/RoadAndEvents/utils import { Message } from "element-ui"; import { broadcastPriority } from "@screen/utils/enum.js"; +import BroadcastTplList from "@screen/components/broadcast/BroadcastTplList.vue"; + +import WgtTitle from "@screen/pages/perception/widgets/title"; export default { name: "BroadcastReleases", components: { + BroadcastTplList, Dialog, Button, Video, CheckboxGroup, - BroadcastParam + BroadcastParam, + WgtTitle }, model: { prop: "visible", @@ -201,6 +209,14 @@ export default { this.submitting = false; }); }, + onAddFromTpl(item){ + this.dataForm = { + content: item.content, + priority: item.priority, + repeatTimes: +item.repeatTimes, + outVol: +item.outVol + }; + } }, }; @@ -243,7 +259,7 @@ export default { .state { width: 18px; height: 18px; - margin-right: 4px; + margin-middle: 4px; } .huiduButton { @@ -273,7 +289,8 @@ export default { } } - .right { + .middle { + width: 550px; display: flex; flex-direction: column; justify-content: space-between; @@ -296,6 +313,11 @@ export default { } } } + .broadcast_template{ + flex: 1; display: flex; flex-direction: column; + .title{ height: 40px;} + .list{ flex: 1; height: 0} + } } .footer { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/service/InformationReleaseManagement/Cards/AuditDetails/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/service/InformationReleaseManagement/Cards/AuditDetails/index.vue index 1e0fe925..6ce82e59 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/service/InformationReleaseManagement/Cards/AuditDetails/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/service/InformationReleaseManagement/Cards/AuditDetails/index.vue @@ -34,8 +34,9 @@ export default { }).then(res=>{ console.log(id, res) let list = [] - res.data.forEach(e => { - console.log(e,'---') + let temp = res.data; + // let temp = [...res.data, ...res.data, ...res.data]; + temp.forEach(e => { list.push({ source: "1", onlyright:true, diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/Card.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/Card.vue index d3bffcc3..0546059c 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/Card.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/service/PublishingChannelManagement/components/Card.vue @@ -63,7 +63,7 @@ export default { this.$parent.handleOpenDialogAddEdit(this.data); }, handleDelete(item) { - this.$confirm("确定要删除该任务么?", "操作确认", { + this.$confirm("确定要删除么?", "操作确认", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning", diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/index.vue index 78434f4a..c40b3334 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/service/broadcast/index.vue @@ -142,49 +142,14 @@ -
- - + +
+
添加模板
-
- - -
- -

{{ item.dictLabel }}

-
- - -
- -

-

-
- -

-
- -

-
-
-
-
-
-
+
{ this.____resetForm(); this.____getIotBoard(); - this.____sortTemplate(); }); }, mounted() { @@ -331,19 +290,6 @@ export default { }; }, - // 获取信息模板分类 - ____getTemplateCategory() { - return this.getDicts("iot_template_category").then((res) => { - this.tplCategory = res.data; - }); - }, - - ____getAllTemplate() { - return getTemplateList().then((res) => { - this.templateAll = res.rows; - }); - }, - // 行拖拽 rowDrop() { if (JSON.parse(JSON.stringify(this.contentList)).length > 0) { @@ -458,16 +404,6 @@ export default { }, }; }, - ____onEditTemplate(tpl) { - // type : board template - // mode : edit add - this.editDialog = { - visible: true, - mode: "edit", - type: "template", - tpl, - }; - }, ____onDragend(evt) { // console.log(evt, this.selectedBdMsg , "拖拽结束+++=======") }, @@ -482,6 +418,23 @@ export default { tpl, }; }, + ____onAddFromTpl(item){ + // if(this.checkedDeviceIds.length<=0){ // this.$message.warning('未选择设备!'); // return; // } + if(this.selectedBdMsg.length >= 1) { + this.$message({ + type: "warning", + message: "只能发布一条语音广播!", + }); + return; + } + + this.editDialog = { + visible: false, + mode: "toDevice", + type: "template", + tpl: item, + }; + }, //提交之后的回调 ____onEditSubmit(para) { this.editDialog.tpl = {}; @@ -498,18 +451,19 @@ export default { this.$delete(temp, "id"); this.selectedBdMsg.push(temp); } else { - this.____refreshPageData(para); + this.____refreshPageData(); } }, - ____refreshPageData(para) { - if (para.type == "template") { + ____refreshPageData() { + this.$refs["tplList"].____refreshData(); + // if (para.type == "template") { - this.____getAllTemplate().then((res) => { - this.____sortTemplate(); - }); + // this.____getAllTemplate().then((res) => { + // this.____sortTemplate(); + // }); - } else { - } + // } else { + // } }, // 修改弹窗 @@ -537,22 +491,6 @@ export default { this.showEmit = true; }, - /** 删除按钮操作 */ - ____onDeleteTemplate(item) { - const id = item.id; - let content = "确认删除?"; - this.$confirm(content, "警告", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: "warning", - }).then(() => { - deleteTemplate(id).then(() => { - this.$message.success("删除成功"); - this.____refreshPageData({ type: "template" }); - }); - }); - }, - // 删除中间模板 ____onDeleteBoardItem(index) { if (index > -1) { @@ -592,22 +530,6 @@ export default { // this.____forkDeviceInfo(this.selectedDevices); }, - ____sortTemplate() { - - this.templateAvailable = []; - this.tplCategory.forEach((item, index) => { - - let temp = _.filter(this.templateAll, { category: item.dictValue }); - if(temp.length>0){ - this.templateAvailable.push({ - ...item, - list: temp, - }); - } - - }); - - }, // 回读 async onSubmit(deviceId) { @@ -860,118 +782,132 @@ export default { } } - .templateBox { - width: 100%; - height: 100%; - transition: all linear 0.3s; - opacity: 1; - transform: translateX(0); - - &.hide { - transform: translateX(20px); - opacity: 0; - transition: all linear 0.3s; - } - - .tplItem { - margin-right: 14px; - display: flex; - align-items: stretch; - padding-bottom: 10px; - - .boardPreview { - border: 2px solid #004c64; - // width: 560px; - // height:80px; - flex: 1; - } - - .infoBtnBox { - width: 160px; - height: 50px; - display: flex; - margin-left: 10px; - /* // border: solid 1px #05afe3; */ - border: 2px solid #004c64; - background-color: #133242; - display: flex; - justify-content: space-around; - align-items: center; - - .btn { - background-repeat: no-repeat; - background-size: 100% 100%; - width: 40px; - height: 40px; - - &.btnApply { - background-image: url(~@/assets/jihe/images/button/toLeft.svg); + .templateBox { + width: 100%; + height: 100%; + transition: all linear 0.3s; + opacity: 1; + transform: translateX(0); + + &.hide { + transform: translateX(20px); + opacity: 0; + transition: all linear 0.3s; } - - &.btnEdit { - background-image: url(~@/assets/jihe/images/button/edit.svg); + + .tplItem { + margin-right: 14px; + display: flex; + align-items: stretch; + padding-bottom: 10px; + + .boardPreview { + border: 2px solid #004c64; + // width: 560px; + // height:80px; + flex: 1; + } + + .infoBtnBox { + width: 160px; + height: 50px; + display: flex; + margin-left: 10px; + /* // border: solid 1px #05afe3; */ + border: 2px solid #004c64; + background-color: #133242; + display: flex; + justify-content: space-around; + align-items: center; + + .btn { + background-repeat: no-repeat; + background-size: 100% 100%; + width: 40px; + height: 40px; + + &.btnApply { + background-image: url(~@/assets/jihe/images/button/toLeft.svg); + } + + &.btnEdit { + background-image: url(~@/assets/jihe/images/button/edit.svg); + } + + &.btnDelete { + background-image: url(~@/assets/jihe/images/button/delete.svg); + } + } + + i { + font-size: 24px; + color: #666; + padding-left: 4px; + cursor: pointer; + caret-color: rgba(0, 0, 0, 0); + user-select: none; + } + + i:hover { + color: #05afe3; + } + + .disabledClass { + pointer-events: none; + cursor: auto !important; + color: #ccc; + } + } } - - &.btnDelete { - background-image: url(~@/assets/jihe/images/button/delete.svg); + + .tplItem.ghost_class { + + .boardPreview, + .infoBtnBox { + border-color: #F00; + } + } + + .tplItem.chosen_class { + + .boardPreview, + .infoBtnBox { + border-color: #0A0; + } + } + + .tplItem.drag_class { + + .boardPreview, + .infoBtnBox { + border-color: #FF0; + } + } + + .el-collapse { + max-height: 100% !important; + overflow: auto; + border-bottom: none; + border-top: none; + padding: 0 0.5vw; } } + } + } - i { - font-size: 24px; - color: #666; - padding-left: 4px; - cursor: pointer; - caret-color: rgba(0, 0, 0, 0); - user-select: none; - } - - i:hover { - color: #05afe3; - } - - .disabledClass { - pointer-events: none; - cursor: auto !important; - color: #ccc; - } - } - } - - .tplItem.ghost_class { - - .boardPreview, - .infoBtnBox { - border-color: #F00; - } - } - - .tplItem.chosen_class { - - .boardPreview, - .infoBtnBox { - border-color: #0A0; - } - } - - .tplItem.drag_class { - - .boardPreview, - .infoBtnBox { - border-color: #FF0; - } - } - - .el-collapse { - max-height: 100% !important; - overflow: auto; - border-bottom: none; - border-top: none; - padding: 0 0.5vw; - } + .tpl_box { + display: flex; + flex-direction: column; + + .tpl_title { + } + + .tpl_list { + flex: 1; + height: 0; + padding-left:10px; } } - } .checkbox { .boardLabel {} diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 77f27227..b818a945 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -56,7 +56,7 @@ module.exports = { // target: `http://10.168.68.42:8087`, //王思祥 // target: `http://10.168.72.174:8087`, //赵祥龙 // target: `http://10.168.65.156:8097`, //孟 - // target: `http://10.168.56.165:8087`, //王家宝 + // target: `http://10.168.76.181:8089`, //王家宝 // target: `http://10.168.77.128:8087`, //王兴琳 // target: `http://10.168.65.103:8097`, changeOrigin: true,