From 633e287c7377344f8db659dcb90160ff6af5db53 Mon Sep 17 00:00:00 2001 From: zhoule Date: Tue, 19 Mar 2024 18:19:56 +0800 Subject: [PATCH] bug --- .../eventPlanDialog/index.vue | 29 ++++++------------- .../event/event/EventDetailDialog/index.vue | 6 ++-- .../pages/control/event/plan/index.vue | 2 +- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue index fb7721a6..d13d831f 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue @@ -4,8 +4,7 @@
- - +
@@ -68,9 +67,9 @@ export default { }, props: { visible: Boolean, - detail: { - type: Object, - default: () => { } + info: { + type: Array, + default: () => [] } }, data() { @@ -95,6 +94,7 @@ export default { qbb: '' }], planName: '', + dcExecuteAction: [], deviceData: [], eventOptions: [ { @@ -198,6 +198,8 @@ export default { modelVisible: { get() { if (this.visible) { + this.planName = this.info[0]?.planName || ''; + this.dcExecuteAction = this.info[0]?.dcExecuteAction || []; } return this.visible; }, @@ -207,16 +209,8 @@ export default { }, }, methods: { - initData(id = 1) { - request({ - url: `/business/plans/list/${id}`, - method: "get", - }).then((result) => { - if (result.code != 200) return Message.error(result?.msg); - let data = result.data; - let dcExecuteAction = result.data.dcExecuteAction; - - this.planId = data.id; + initData(data) { + this.planId = data.id; this.formData = { eventCategory: data.eventCategory, planName: data.planName, @@ -236,11 +230,6 @@ export default { } }) - }).catch((err) => { - console.log(err) - Message.error("查询事件预案列表失败", err); - }) - }, async loadData() { if (this.deviceData.length <= 0) { diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue index 8e7d6f29..fc7b1da8 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue @@ -18,7 +18,7 @@ - +