Browse Source

修改事件列表

wangqin
zhoule 9 months ago
parent
commit
70130583d9
  1. 2
      ruoyi-ui/src/api/event/perceiveEvent.js
  2. 23
      ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue
  3. 6
      ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue
  4. 4
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/Carousel/index.vue
  5. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/EventDetailDialog/index.vue
  6. 8
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/event/index.vue
  7. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index copy.vue
  8. 2
      ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue

2
ruoyi-ui/src/api/event/perceiveEvent.js

@ -165,7 +165,7 @@ export function geTwarningTotal(query) {
export function getRoadSectionList(query) { export function getRoadSectionList(query) {
//system/status/tablist //system/status/tablist
return request({ return request({
url: '/business/roadSection/list', url: '/business/roadSection/listAll',
method: 'get', method: 'get',
params: { params: {
...query, ...query,

23
ruoyi-ui/src/views/JiHeExpressway/components/RoadStateCard/index.vue

@ -2,7 +2,7 @@
<BorderRadiusImage class='RoadStateCard' borderRadius="2px" <BorderRadiusImage class='RoadStateCard' borderRadius="2px"
borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px"> borderColor="linear-gradient(360deg, rgba(55, 231, 255, 0.3), rgba(55, 231, 255, 0))" borderWidth="2px">
<div class="left"> <div class="left">
<img :src="(cardData.pictures ? cardData.pictures[0] : null) || require(`./test.png` )"> <img :src="(cardData.pictures ? cardData.pictures[0] : null) || require(`./test.png`)">
<!-- <img :src="require(`./test.png`)"> --> <!-- <img :src="require(`./test.png`)"> -->
</div> </div>
<div class="right"> <div class="right">
@ -15,10 +15,10 @@
<div class="controls"> <div class="controls">
<Button :style="{ background: firstBtnColor, width: '50%' }" <Button :style="{ background: firstBtnColor, width: '50%' }"
@click.native="$emit('firstBtnClick', cardData.id)">{{ @click.native="$emit('firstBtnClick', cardData.id)">{{
firstBtnText getFirstBtnText(cardData.state)
}}</Button> }}</Button>
<Button v-if="cardData.state != 3" :style="{ background: lastBtnColor, width: '50%' }" <Button v-if="cardData.state == 4" :style="{ background: lastBtnColor, width: '50%' }"
@click.native="$emit('lastBtnClick', cardData.id)">{{ lastBtnText @click.native="$emit('lastBtnClick', cardData.id)">{{ getLastBtnText(cardData.state)
}}</Button> }}</Button>
</div> </div>
</div> </div>
@ -82,7 +82,7 @@ export default {
]) ])
} }
}, },
data(){ data() {
return { return {
picUrl: './test.png' picUrl: './test.png'
} }
@ -94,6 +94,19 @@ export default {
}, },
created() { created() {
this.statusMap = statusMap; this.statusMap = statusMap;
},
methods: {
getFirstBtnText(state) {
let text = '详情';
if(state == 5) text = '去确认'
if(state == 4) text = '详情'
if(state == 3) text = '处置记录'
return text;
},
getLastBtnText(state) {
let text = '去处置';
return text;
},
} }
} }
</script> </script>

6
ruoyi-ui/src/views/JiHeExpressway/components/Video/index.vue

@ -1,6 +1,6 @@
<template> <template>
<div class="video-container"> <div class="video-container">
<div class="header"> <div class="header" v-if="showHeader">
<div class="left"> <div class="left">
<div class="radio"> <div class="radio">
<span @click="active = 'img'" :class="{ active: active === 'img' }">图像</span> <span @click="active = 'img'" :class="{ active: active === 'img' }">图像</span>
@ -46,6 +46,10 @@ export default {
rangeIndex: { rangeIndex: {
type: Number, type: Number,
default: 0 default: 0
},
showHeader: {
type: Boolean,
default: true
} }
}, },
data() { data() {

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

@ -29,8 +29,8 @@ export default {
pictures: { pictures: {
type: Array, type: Array,
default: () => [ default: () => [
"https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg", // "https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg",
"https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg", // "https://cube.elemecdn.com/6/94/4d3ea53c084bad6931a56d5158a48jpeg.jpeg",
// "require('@screen/images/shareWith/message-active.svg')", // "require('@screen/images/shareWith/message-active.svg')",
// "require('@screen/images/shareWith/message.svg')", // "require('@screen/images/shareWith/message.svg')",
// "require('@screen/images/shareWith/website-active.svg')", // "require('@screen/images/shareWith/website-active.svg')",

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

@ -1,21 +1,23 @@
<template> <template>
<Dialog v-model="modelVisible" title="事件详情"> <Dialog v-model="modelVisible" title="事件详情">
<div class="EventDetail"> <div class="EventDetail" :style="{ height: (activeName == '-1' || activeName == '0') ? '380px' : '768px'}">
<Form :formList="formList" :dFormData="formData" label-width="100px" /> <Form :formList="formList" :dFormData="formData" label-width="100px" />
<div class="video-pic"> <div class="video-pic">
<Video style="height: 100%;" /> <Video style="height: 100%;" :showHeader="activeName != '-1'"/>
<Video v-if="activeName != '-1'" style="height: 100%;" />
<Carousel style="flex: 1" :pictures="formData.pictures"/> <Carousel v-else style="flex: 1" :pictures="formData.pictures"/>
</div> </div>
<TimeLine1 :data="timeLine1List" /> <TimeLine1 v-if="activeName == '1' || activeName == '2'" :data="timeLine1List" />
<TimeLine2 :data="timeLine2List" style="flex: 1;" /> <TimeLine2 v-if="activeName == '1' || activeName == '2'" :data="timeLine2List" style="flex: 1;" />
</div> </div>
<template #footer> <template #footer>
<Button style="padding: 0 24px;" @click.native="modelVisible = false">确认</Button> <Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px;" @click.native="modelVisible = false">误报</Button>
<Button :style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }" @click.native="modelVisible = false"> 取消</Button> <Button :style="{ backgroundColor: '#C9C9C9', padding: '0 24px' }" @click.native="modelVisible = false">取消</Button>
<Button v-if="activeName == '-1' || activeName == '0'" style="padding: 0 24px;" @click.native="modelVisible = false">确认</Button>
</template> </template>
</Dialog> </Dialog>
</template> </template>
@ -50,6 +52,7 @@ export default {
}, },
props: { props: {
visible: Boolean, visible: Boolean,
activeName: String,
formData: { formData: {
type: Object, type: Object,
default: () => { } default: () => { }
@ -89,6 +92,11 @@ export default {
}, },
methods: { methods: {
getProcess() { getProcess() {
if(this.activeName == '-1' || this.activeName == '0'){
this.timeLine1List = [];
this.timeLine2List = [];
return;
}
let directionFlg = true; let directionFlg = true;
@ -146,13 +154,14 @@ export default {
display: flex; display: flex;
gap: 9px; gap: 9px;
width: 836px; width: 836px;
height: 768px; // height: 768px;
flex-direction: column; flex-direction: column;
.video-pic { .video-pic {
display: flex; display: flex;
height: 150px; height: 190px;
gap: 15px gap: 15px;
justify-content: space-around;
} }
} }
</style> </style>

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

@ -43,7 +43,7 @@
</div> </div>
<!-- "详情"弹出框 --> <!-- "详情"弹出框 -->
<EventDetailDialog :visible="eventDetailDialogVisible" :formData="detailDialogFormData" @update:value="handleClose" /> <EventDetailDialog :visible="eventDetailDialogVisible" :formData="detailDialogFormData" :activeName="activeName" @update:value="handleClose" />
<!-- "新增"弹出框 --> <!-- "新增"弹出框 -->
<FormEvent :visible="isShowAddNew" @close="onCloseAddNew" /> <FormEvent :visible="isShowAddNew" @close="onCloseAddNew" />
</div> </div>
@ -189,7 +189,7 @@ export default {
}).then((result) => { }).then((result) => {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
result.rows.forEach(it => { result.rows.forEach(it => {
it.stringEventSource = warningSourceMapping[it.warningSource]; it.stringEventSource = it?.warningSource ? warningSourceMapping[it?.warningSource] : '';
it.stringDirection = directionMapping[it.direction] || it.direction; it.stringDirection = directionMapping[it.direction] || it.direction;
it.startTime = it.warningTime; it.startTime = it.warningTime;
@ -302,7 +302,7 @@ export default {
if (result.code != 200) return Message.error(result?.msg); if (result.code != 200) return Message.error(result?.msg);
let data = result.data; let data = result.data;
data.stringEventSource = warningSourceMapping[data.warningSource]; data.stringEventSource = data?.warningSource ? warningSourceMapping[data.warningSource] : '';
data.direction = directionMapping[data.direction] || data.direction; data.direction = directionMapping[data.direction] || data.direction;
data.startTime = data.warningTime; data.startTime = data.warningTime;
data.stringEventState = warningStateMapping[data.warningState]; data.stringEventState = warningStateMapping[data.warningState];
@ -353,7 +353,7 @@ export default {
...this.searchData, ...this.searchData,
eventType: data.eventType, eventType: data.eventType,
eventSources: data.eventSources, eventSources: data.eventSources,
warningSource: data.warningSource, warningSource: data?.warningSource || '',
direction: data.direction, direction: data.direction,
startTime: daterange && daterange.length > 0 ? daterange[0] : "", startTime: daterange && daterange.length > 0 ? daterange[0] : "",
endTime: daterange && daterange.length > 0 ? daterange[1] : "", endTime: daterange && daterange.length > 0 ? daterange[1] : "",

2
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index copy.vue

@ -437,7 +437,7 @@ export default {
getRoadSectionList().then(res => { getRoadSectionList().then(res => {
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
let rows = res.rows; let rows = res.data;
this.dataList = []; this.dataList = [];
rows.forEach(it => { rows.forEach(it => {
this.dataList.push({ this.dataList.push({

2
ruoyi-ui/src/views/JiHeExpressway/pages/perception/eventDetection/components/eventQuery/index.vue

@ -554,7 +554,7 @@ export default {
getRoadSectionList().then((res) => { getRoadSectionList().then((res) => {
console.log(res); console.log(res);
if (res.code == 200) { if (res.code == 200) {
let rows = res.rows; let rows = res.data;
this.dataList = []; this.dataList = [];
rows.forEach((it) => { rows.forEach((it) => {
this.dataList.push({ this.dataList.push({

Loading…
Cancel
Save