Browse Source

bug

wangqin
zhoule 8 months ago
parent
commit
633e287c73
  1. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  2. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  3. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue

29
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue

@ -4,8 +4,7 @@
<ElForm :model="formData" inline :rules="rules" ref="ruleForm"> <ElForm :model="formData" inline :rules="rules" ref="ruleForm">
<div class="first"> <div class="first">
<el-radio-group v-model="planName"> <el-radio-group v-model="planName">
<el-radio-button label="名称1"></el-radio-button> <el-radio-button v-for="item in info" :key="item.id" :label="item.planName"></el-radio-button>
<el-radio-button label="名称2"></el-radio-button>
</el-radio-group> </el-radio-group>
</div> </div>
@ -68,9 +67,9 @@ export default {
}, },
props: { props: {
visible: Boolean, visible: Boolean,
detail: { info: {
type: Object, type: Array,
default: () => { } default: () => []
} }
}, },
data() { data() {
@ -95,6 +94,7 @@ export default {
qbb: '' qbb: ''
}], }],
planName: '', planName: '',
dcExecuteAction: [],
deviceData: [], deviceData: [],
eventOptions: [ eventOptions: [
{ {
@ -198,6 +198,8 @@ export default {
modelVisible: { modelVisible: {
get() { get() {
if (this.visible) { if (this.visible) {
this.planName = this.info[0]?.planName || '';
this.dcExecuteAction = this.info[0]?.dcExecuteAction || [];
} }
return this.visible; return this.visible;
}, },
@ -207,16 +209,8 @@ export default {
}, },
}, },
methods: { methods: {
initData(id = 1) { initData(data) {
request({ this.planId = data.id;
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;
this.formData = { this.formData = {
eventCategory: data.eventCategory, eventCategory: data.eventCategory,
planName: data.planName, planName: data.planName,
@ -236,11 +230,6 @@ export default {
} }
}) })
}).catch((err) => {
console.log(err)
Message.error("查询事件预案列表失败", err);
})
}, },
async loadData() { async loadData() {
if (this.deviceData.length <= 0) { if (this.deviceData.length <= 0) {

6
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue

@ -18,7 +18,7 @@
</div> </div>
<!-- 确认弹窗 --> <!-- 确认弹窗 -->
<EventPlanDialog :visible="isShowDialog" @close="onCloseAddNew" /> <EventPlanDialog :visible="isShowDialog" :info="info" @close="onCloseAddNew" />
<template #footer> <template #footer>
<Button style="padding: 0 24px;" @click.native="onDelete">误报</Button> <Button style="padding: 0 24px;" @click.native="onDelete">误报</Button>
@ -73,6 +73,7 @@ export default {
return { return {
formList, formList,
isShowDialog: false, isShowDialog: false,
info: [],
timeLine1List: [{ timeLine1List: [{
time: "", time: "",
label: "", label: "",
@ -188,7 +189,6 @@ export default {
onSubmit() { onSubmit() {
this.isShowDialog = true; this.isShowDialog = true;
let url = '/business/plans/list/warning/type' let url = '/business/plans/list/warning/type'
let data = {}
if (this.activeName == '-1') { if (this.activeName == '-1') {
url = '/business/plans/list/warning/type' url = '/business/plans/list/warning/type'
} else { } else {
@ -200,7 +200,7 @@ export default {
data: this.formData data: this.formData
}).then(result => { }).then(result => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
console.log('result', result) this.info = result.data;
}) })
} }

2
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/plan/index.vue

@ -28,7 +28,7 @@
<ElTableColumn prop="strEventType" label="事件类型" width="100" align="center" /> <ElTableColumn prop="strEventType" label="事件类型" width="100" align="center" />
<ElTableColumn prop="planName" label="预案名称" width="140" align="center" /> <ElTableColumn prop="planName" label="预案名称" width="140" align="center" />
<ElTableColumn prop="triggeringCondition" label="检索条件" width="140" /> <ElTableColumn prop="triggeringCondition" label="检索条件" width="140" />
<ElTableColumn prop="deviceType" label="设备类型" width="140" /> <ElTableColumn prop="deviceType" label="设备类型" />
<ElTableColumn prop="controllableDeviceName" label="可控设备"/> <ElTableColumn prop="controllableDeviceName" label="可控设备"/>
<ElTableColumn prop="controlCommand" label="控制指令" /> <ElTableColumn prop="controlCommand" label="控制指令" />
<ElTableColumn label="操作" width="210" align="center"> <ElTableColumn label="操作" width="210" align="center">

Loading…
Cancel
Save