Browse Source

Merge branch 'develop' of http://39.106.31.193:9211/mengff/jihe-hs into develop

wangqin
hui 8 months ago
parent
commit
4a35ae8e59
  1. 8
      ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue
  2. 28
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/index.vue
  3. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js
  4. 11
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/eventPlanDialog/index.vue
  5. 143
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/qbbDialog/index.vue
  6. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventSource/index.vue

8
ruoyi-ui/src/views/JiHeExpressway/components/Dialog/index.vue

@ -75,8 +75,7 @@ export default {
}, },
methods: { methods: {
updateDialogVisible(bool) { updateDialogVisible(bool) {
this.modelVisible = bool; this.modelVisible = bool;;
console.log("modelVisible", this.modelVisible);
}, },
}, },
mounted() { mounted() {
@ -88,15 +87,12 @@ export default {
return this.visible; return this.visible;
}, },
set(val) { set(val) {
console.log("val", "val")
this.$emit("update:value", val); this.$emit("update:value", val);
}, },
}, },
}, },
beforeDestroy() { beforeDestroy() {
console.log("beforeDestory111")
this.modelVisible = false; this.modelVisible = false;
this.emitter.off("updateDialogVisible", this.updateDialogVisible);
}, },
}; };
</script> </script>
@ -109,7 +105,7 @@ export default {
height: 100%; height: 100%;
background: rgba(0, 0, 0, 0.36); background: rgba(0, 0, 0, 0.36);
border-radius: 0px 0px 0px 0px; border-radius: 0px 0px 0px 0px;
z-index: 100; z-index: 1100;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;

28
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/Intermodulation/index.vue

@ -9,18 +9,10 @@
</ElTabPane> </ElTabPane>
<ElTabPane label="设备参数" name="second"> <ElTabPane label="设备参数" name="second">
<div class="content-second" style="height: 185px"> <div class="content-second" style="height: 185px">
<RadioGroup <RadioGroup v-model="roadType" :options="roadTypeList" @input="changeRadio" />
v-model="roadType"
:options="roadTypeList"
@input="changeRadio"
/>
<span>当前车流量: {{ carNum }}</span> <span>当前车流量: {{ carNum }}</span>
<LineChartForTraffic <LineChartForTraffic style="flex: 1" v-if="isShowCar && activeName === 'second'" :xData="xData"
style="flex: 1" :yData="yData" />
v-if="isShowCar && activeName === 'second'"
:xData="xData"
:yData="yData"
/>
</div> </div>
</ElTabPane> </ElTabPane>
<ElTabPane label="在线率统计" name="third"> <ElTabPane label="在线率统计" name="third">
@ -148,13 +140,14 @@ export default {
// this.dialogData.brand = data.brand; // this.dialogData.brand = data.brand;
// }) // })
if (this.dialogData.iotDeviceId) {
this.getPropertiesHistory(this.dialogData.iotDeviceId);
}
const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark); const roadInfo = await getRoadInfoByStakeMark(this.dialogData.stakeMark);
if (roadInfo) this.data.roadName = roadInfo.roadName; if (roadInfo) this.data.roadName = roadInfo.roadName;
if (this.dialogData.iotDeviceId) {
this.getPropertiesHistory(this.dialogData.iotDeviceId);
}
}, },
methods: { methods: {
changeRadio(value) { changeRadio(value) {
@ -165,12 +158,9 @@ export default {
} else { } else {
this.yData = this.hzYData; this.yData = this.hzYData;
} }
// console.log('xdata', this.xData);
// console.log('ydata', this.hzYData);
// console.log('rdata', this.jnYData);
setTimeout(() => { setTimeout(() => {
this.isShowCar = true; this.isShowCar = true;
}, 1000); }, 0);
}, },
getPropertiesHistory(deviceId) { getPropertiesHistory(deviceId) {
this.xData = []; this.xData = [];
@ -248,7 +238,7 @@ div.switcher {
align-items: center; align-items: center;
justify-content: end; justify-content: end;
> div { >div {
font-size: 16px; font-size: 16px;
padding: 6px 12px; padding: 6px 12px;
} }

2
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/RoadAndEvents/utils/httpList.js

@ -121,7 +121,7 @@ export function getRoadInfoByStakeMark(stakeMark) {
url: `/business/stakeMark/query`, url: `/business/stakeMark/query`,
method: "get", method: "get",
params: { params: {
id: stakeMark, stakeMark: stakeMark,
direction: 1, direction: 1,
}, },
}) })

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