diff --git a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue index 37ad3241..3be1387b 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/components/infoBoard/BoardInfoEditor.vue @@ -182,13 +182,10 @@ import { getFontSizeByDevicePixel, uploadBoardEditInfo, } from "@/api/board/template"; -import { devicessize } from "@/api/information/api.js"; -import { checkIotBoardContent } from "@/api/board/vocabulary"; import BoardPreview from "@screen/components/infoBoard/BoardPreview.vue"; import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue"; import infoBoardUtils from "@screen/utils/infoBoard.js"; import { checkBoardContent } from "@/api/board/board"; -import { debounce } from "lodash"; export default { data() { return { @@ -303,8 +300,8 @@ export default { textContent: "", fontStyle: "0", displayAreaWidth: "768", - playbackDuration: "50", displayAreaHeight: "64", + playbackDuration: "50", volume: "0", xCoordinate: "0", screenEntrySpeed: "1", @@ -483,7 +480,6 @@ export default { this.mode ); } else { - console.log(this.tpl , "tttttttttppplllll") this.dataForm = infoBoardUtils.dialogSourceFormat( this.tpl, this.type, diff --git a/ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js b/ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js index 5009b82f..a750c92d 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js +++ b/ruoyi-ui/src/views/JiHeExpressway/mixins/InfoBoard.js @@ -45,13 +45,16 @@ export default { }; }, // 发布信息 - ____publishInfo() { + ____publishInfo() { let deviceList = []; - if (this.isMultiControl && !this.selectItems.length) { - return Message.error("请至少选择一个设备!"); + + if (this.isMultiControl){ + if (!this.selectItems.length) { + return Message.error("请至少选择一个设备!"); + } + const selectItems = this.selectItems.map((item) => JSON.parse(item)); + deviceList = selectItems; } - const selectItems = this.selectItems.map((item) => JSON.parse(item)); - if (this.isMultiControl) deviceList = selectItems; else { if (this.selectedDevice) deviceList = [this.selectedDevice]; else deviceList = this.selectedDevices; diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue index bb072cea..08288ac7 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue @@ -1,6 +1,5 @@ @@ -52,7 +56,7 @@ - + @@ -99,6 +103,7 @@ export default { // } }; return { + editingTime:"", editData:{}, mode:"", isEditing:false, @@ -156,18 +161,61 @@ export default { }, methods: { onSubmitTaskItem(){ - this.getTaskList(); //新增task后自动刷新任务列表 + this.isEditing = false; + request({ + url: `/business/dcBatchFunctionsJobGroup/${this.propData.id}`, + method: "GET" + }).then(res=>{ + this.editData = { + id: res.data.id, + groupName: res.data.groupName, + status: res.data.status, + remark: res.data.remark, + detailedConfiguration: res.data.detailedConfiguration + } + this.getTaskList(); //新增task后自动刷新任务列表 + }); }, onAddTaskGroup(){ this.isShowTimeEdit = true; }, + onModifyTime(taskG){ + this.editingTime = taskG.time; + this.selectedTaskGroup = taskG; + this.isShowTimeEdit = true; + }, + onDeleteTaskGroup(taskG){ + request({ + url: `/business/dcBatchFunctionsJob/time/${this.propData.id}/${taskG.time}`, + method: "DELETE" + }).then(res => { + request({ + url: `/business/dcBatchFunctionsJobGroup/${this.propData.id}`, + method: "GET" + }).then(res => { + this.editData = { + id: res.data.id, + groupName: res.data.groupName, + status: res.data.status, + remark: res.data.remark, + detailedConfiguration: res.data.detailedConfiguration + } + this.getTaskList(); //新增task后自动刷新任务列表 + }); + }); + }, onSubmitTime(time){ this.isShowTimeEdit = false; - this.taskGroupsEditing.push({ time, tasks: [] }); + + if (this.selectedTaskGroup){ + this.selectedTaskGroup.time = time; + }else{ + this.taskGroupsEditing.push({ time, tasks: [] }); + } let detailedConfiguration =[]; this.taskGroupsEditing.forEach(item=>{ - detailedConfiguration.push({time:item.time, tasks:_.map(item.tasksEdit, "id")}); + detailedConfiguration.push({time:item.time, tasks:_.map(item.tasksEdit, "jobId")}); }); request({ url: `/business/dcBatchFunctionsJobGroup`, @@ -179,6 +227,7 @@ export default { }) .then((result) => { if (result.code != 200) return; + Message.success(`提交成功!`); }) }, @@ -186,10 +235,6 @@ export default { this.selectedTaskGroup = taskG; this.isEditing = true; }, - onModifyItem(newV , oldV){ - console.log(newV, oldV , "修改条目》》》") - // oldV.devices - }, initEditingData(){ if(this.propData?.id){ this.mode = "edit" @@ -212,7 +257,7 @@ export default { }, getTaskList(){ - this.taskGroupsEditing = JSON.parse(this.propData.detailedConfiguration); + this.taskGroupsEditing = JSON.parse(this.editData.detailedConfiguration); // this.taskGroupsEditing = [{time:"08:00:00",tasks:[1],tasksEdit:[]}]; // 测试代码开始 @@ -312,9 +357,16 @@ export default { font-size: 12px; } } -.task{ +.all_groups{ + max-height:500px; + overflow-y: scroll; +} +.task_group{ border: 1px solid #FFF; .task_info{ + .time_show{ + color: #0AC; + } } .task_op{ } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue index cb673be8..90d4876a 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/TaskItem.vue @@ -1,21 +1,21 @@