Browse Source

bug

wangqin
zhoule 8 months ago
parent
commit
0c9441b7b2
  1. 11
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  2. 143
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/qbbDialog/index.vue
  3. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue

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

@ -200,6 +200,7 @@ export default {
this.planName = this.info[0]?.planName || ''; this.planName = this.info[0]?.planName || '';
this.planInfo = this.info[0]; this.planInfo = this.info[0];
this.initData(this.info[0]); this.initData(this.info[0]);
// this.getPlanHf(this.eventFormData.id);
} }
} }
return this.visible; return this.visible;
@ -330,6 +331,16 @@ export default {
} }
return this.boardOriginalData; return this.boardOriginalData;
}, },
getPlanHf(id) {
request({
url: `/business/plans/event/assoc/${id}`,
method: "get",
}).then((result) => {
if (result.code != 200) return Message.error(result?.msg);
}).catch(() => {
Message.error("查询失败");
})
},
changeRadio(value) { changeRadio(value) {
let plan = this.info.find(it => it.planName == value); let plan = this.info.find(it => it.planName == value);
this.planInfo = plan; this.planInfo = plan;

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

@ -1,66 +1,77 @@
<template> <template>
<Dialog v-model="modelVisible" title="情报板确认"> <div>
<div v-if="type == 1" class="EventAddPlanDialog">
<h4>预案内容</h4>
<dev class="listBox disPid"> <Dialog v-model="modelVisible" title="情报板确认">
<div class="tplItem"> <div v-if="type == 1" class="EventAddPlanDialog">
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="automaticData"></BoardTplPreview> <h4>预案内容</h4>
<div class="infoBtnBox infoBtnBoxSm"> <dev class="listBox disPid">
<p class="btn"> <div class="tplItem">
<!-- <el-radio v-model="radio1" :label="1" @input="changeRadio(1)" /> --> <BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="automaticData"></BoardTplPreview>
</p>
</div>
</div>
</dev>
<h4>自动生成</h4>
<dev class="listBox disPid">
<div class="tplItem">
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="automaticData"></BoardTplPreview>
<div class="infoBtnBox infoBtnBoxSm">
<p class="btn">
<!-- <el-radio v-model="radio1" :label="2" @input="changeRadio(2)" /> -->
</p>
</div>
</div>
</dev>
<h4>情报板模版</h4>
<vuescroll :ops="scrollOptions" class="listBox">
<div v-for="(item) in templateAvailable" :key="item.dictValue">
<h5>{{ item.dictLabel }}</h5>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="itm"></BoardTplPreview>
<div class="infoBtnBox infoBtnBoxSm"> <div class="infoBtnBox infoBtnBoxSm">
<p class="btn"> <p class="btn">
<el-radio v-model="radio1" :label="itm.id" @input="changeRadio(itm)" /> <el-radio v-model="radio1" :label="1" @input="changeRadio(automaticData)" />
</p> </p>
<!-- <p @click="____onEditTemplate(automaticData)" class="btn btnEdit" /> -->
</div> </div>
</div> </div>
</div> </dev>
</vuescroll> <h4>自动生成</h4>
</div>
<div v-if="type == 2" class="EventAddPlanDialog">
<div v-for="(item, index) in Object.keys(originalData)" :key="index">
<h4>{{ item }}</h4>
<dev class="listBox disPid"> <dev class="listBox disPid">
<div v-for="(it, idx) in originalData[item]" :key="idx" class="tplItem"> <div class="tplItem">
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="it"></BoardTplPreview> <BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="automaticData"></BoardTplPreview>
<div class="infoBtnBox infoBtnBoxSm">
<p class="btn">
<el-radio v-model="radio1" :label="2" @input="changeRadio(automaticData)" />
</p>
<!-- <p @click="____onEditTemplate(automaticData)" class="btn btnEdit" /> -->
</div>
</div> </div>
</dev> </dev>
<h4>情报板模版</h4>
<vuescroll :ops="scrollOptions" class="listBox">
<div v-for="(item) in templateAvailable" :key="item.dictValue">
<h5>{{ item.dictLabel }}</h5>
<div v-for="(itm, indx) in item.list" :key="indx" class="tplItem">
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="itm"></BoardTplPreview>
<div class="infoBtnBox infoBtnBoxSm">
<!-- <p class="btn">
<el-radio v-model="radio1" :label="itm.id" @input="changeRadio(itm)" />
</p> -->
<p @click="____onEditTemplate(itm)" class="btn btnEdit" />
</div>
</div>
</div>
</vuescroll>
</div> </div>
<div v-if="type == 2" class="EventAddPlanDialog">
<div v-for="(item, index) in Object.keys(originalData)" :key="index">
<h4>{{ item }}</h4>
<dev class="listBox disPid">
<div v-for="(it, idx) in originalData[item]" :key="idx" class="tplItem">
<BoardTplPreview class="boardPreview" boardWH="1400*200" :tpl="it"></BoardTplPreview>
</div>
</dev>
</div>
</div>
<template #footer v-if="type == 1">
<Button style="background: #C9C9C9;padding:0 24px;"
@click.native="modelVisible = false, submitting = false">取消</Button>
<Button style="padding:0 24px;" @click.native="handleSubmit" :loading="submitting">确认</Button>
</template>
</Dialog>
</div> <BoardInfoEditor @afterSubmit="____onEditSubmit" :mode="editDialog.mode" :type="editDialog.type"
<template #footer v-if="type == 1"> :visible.sync="editDialog.visible" :screenSize="selectedSize" :tpl="editDialog.tpl"></BoardInfoEditor>
<Button style="background: #C9C9C9;padding:0 24px;" </div>
@click.native="modelVisible = false, submitting = false">取消</Button>
<Button style="padding:0 24px;" @click.native="handleSubmit" :loading="submitting">确认</Button>
</template>
</Dialog>
</template> </template>
<script> <script>
import vuescroll from "vuescroll"; import vuescroll from "vuescroll";
import scrollOptions from "@/common/scrollbar.js"; import scrollOptions from "@/common/scrollbar.js";
import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue"; import BoardTplPreview from "@screen/components/infoBoard/BoardTplPreview.vue";
import BoardInfoEditor from "@screen/components/infoBoard/BoardInfoEditor";
import Dialog from "@screen/components/Dialog/index"; import Dialog from "@screen/components/Dialog/index";
import Button from '@screen/components/Buttons/Button.vue'; import Button from '@screen/components/Buttons/Button.vue';
import { getTemplateList } from "@/api/board/template"; import { getTemplateList } from "@/api/board/template";
@ -72,6 +83,7 @@ export default {
Button, Button,
vuescroll, vuescroll,
BoardTplPreview, BoardTplPreview,
BoardInfoEditor
}, },
model: { model: {
prop: 'visible', prop: 'visible',
@ -101,6 +113,12 @@ export default {
itmData: {}, itmData: {},
automaticData: {}, automaticData: {},
originalData: {}, originalData: {},
editDialog: {
mode: "",
type: "",
visible: false,
tpl: {},
},
} }
}, },
mounted() { mounted() {
@ -174,6 +192,39 @@ export default {
} }
}); });
}, },
____onEditTemplate(tpl) {
this.editDialog = {
visible: true,
mode: "edit",
type: "template",
tpl,
};
},
//
____onEditSubmit(para) {
this.editDialog.tpl = {};
this.editDialog.visible = false;
if (para.type == "device") {
if (para.mode == "edit") {
this.selectedBdMsg[this.boardItemEdtingIndex] = para.data;
} else {
this.selectedBdMsg.push(_.cloneDeep(para.data));
}
} else if (para.mode == "toDevice") {
this.selectedBdMsg.push(_.cloneDeep(para.data));
} else {
this.____refreshPageData(para);
}
},
____refreshPageData(para) {
if (para.type == "template") {
this.____getAllTemplate().then((res) => {
this.____setAvailableTemplate();
});
} else {
}
},
async getTemplateAutomatic() { async getTemplateAutomatic() {
let data = await this.getAutomatic(); let data = await this.getAutomatic();
console.log('dataaaa', data); console.log('dataaaa', data);

29
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue

@ -50,7 +50,7 @@ export default {
return {}; return {};
}, },
created() {}, created() { },
methods: { methods: {
changeReisze() { changeReisze() {
this.myChart.resize(); this.myChart.resize();
@ -93,16 +93,16 @@ export default {
name: "扫码报警", name: "扫码报警",
percent: 0.1, percent: 0.1,
}, },
{
average: 0,
name: "非机预警",
percent: 0.1,
},
// { // {
// average: 0, // average: 0,
// name: "", // name: "",
// percent: 0.1, // percent: 0.1,
// }, // },
{
average: 0,
name: "气象监测器",
percent: 0.1,
},
]; ];
data.forEach((it) => { data.forEach((it) => {
if (it.warningSource == 1) { if (it.warningSource == 1) {
@ -120,12 +120,12 @@ export default {
if (it.warningSource == 5) { if (it.warningSource == 5) {
chartData[4].average += it.number; chartData[4].average += it.number;
} }
if (it.warningSource == 6) { // if (it.warningSource == 6) {
// chartData[5].average += it.number;
// }
if (it.warningSource == 7) {
chartData[5].average += it.number; chartData[5].average += it.number;
} }
// if (it.warningSource == 7) {
// chartData[6].average += it.number;
// }
// total ++; // total ++;
// drawRoundRect(context, 231, 37 + (index * 27), 138, 20, 12, gr); // drawRoundRect(context, 231, 37 + (index * 27), 138, 20, 12, gr);
}); });
@ -239,12 +239,9 @@ export default {
border-radius: 5px 5px 5px 5px; border-radius: 5px 5px 5px 5px;
opacity: 1; opacity: 1;
border: 1px solid; border: 1px solid;
border-image: linear-gradient( border-image: linear-gradient(360deg,
360deg,
rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0.3),
rgba(55, 231, 255, 0) rgba(55, 231, 255, 0)) 1 1;
)
1 1;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;

Loading…
Cancel
Save