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 8f9733ea..a66e0c59 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 @@ -128,6 +128,7 @@ export default { return this.visible; }, set(val) { + this.$emit("onSuccess"); this.$emit("update:value", val); }, }, @@ -143,6 +144,7 @@ export default { // : { // ...this.propData, // }; + this.taskGroupsEditing = []; this.initEditingData(); this.getTaskList(); }, @@ -163,6 +165,7 @@ export default { methods: { onSubmitTaskItem(){ this.isEditing = false; + this.selectedTaskGroup = {}; request({ url: `/business/dcBatchFunctionsJobGroup/${this.propData.id}`, method: "GET" @@ -186,30 +189,41 @@ export default { this.isShowTimeEdit = true; }, onDeleteTaskGroup(taskG){ - request({ - url: `/business/dcBatchFunctionsJob/time/${this.propData.id}/${taskG.time}`, - method: "DELETE" - }).then(res => { + this.$confirm("确定要删除该任务组么?", "操作确认", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }).then(() => { + request({ - url: `/business/dcBatchFunctionsJobGroup/${this.propData.id}`, - method: "GET" + url: `/business/dcBatchFunctionsJob/time/${this.propData.id}/${taskG.time}`, + method: "DELETE" }).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后自动刷新任务列表 + 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后自动刷新任务列表 + }); + }); + + }) + .catch(() => { + this.$message.warn("取消删除。"); }); - }); }, onSubmitTime(time){ this.isShowTimeEdit = false; - - if (this.selectedTaskGroup){ + if (Object.keys(this.selectedTaskGroup).length>0){ this.selectedTaskGroup.time = time; + this.selectedTaskGroup = {}; }else{ this.taskGroupsEditing.push({ time, tasks: [] }); } 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 03c4daf5..6a77bb63 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 @@ -18,16 +18,26 @@ -