|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<div class='RoadNetworkMonitoring'> |
|
|
|
<div class="RoadNetworkMonitoring"> |
|
|
|
<!-- 搜索栏 --> |
|
|
|
<div class="filter"> |
|
|
|
<ButtonGradient @click="onRefresh" class="refresh-btn"> |
|
|
@ -9,47 +9,71 @@ |
|
|
|
刷新 |
|
|
|
</ButtonGradient> |
|
|
|
|
|
|
|
<InputSearch style="width: 402px;" :formList="searchFormList" :formConfigOptions="{ dFormData: { eventState: 0 } }" |
|
|
|
@handleSearch="handleSearch" /> |
|
|
|
<InputSearch |
|
|
|
style="width: 402px" |
|
|
|
:formList="searchFormList" |
|
|
|
:formConfigOptions="{ dFormData: { eventState: '0' } }" |
|
|
|
@handleSearch="handleSearch" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 内容 --> |
|
|
|
<div class="body"> |
|
|
|
<RoadStateCard v-for="(item, index) in data" :key="index" :cardData="item" @firstBtnClick="firstBtnClick" |
|
|
|
@lastBtnClick="lastBtnClick" /> |
|
|
|
<RoadStateCard |
|
|
|
v-for="(item, index) in data" |
|
|
|
:key="index" |
|
|
|
:cardData="item" |
|
|
|
@firstBtnClick="firstBtnClick" |
|
|
|
@lastBtnClick="lastBtnClick" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 分页 --> |
|
|
|
<div class="footer"> |
|
|
|
<Pagination @current-change="initData" @size-change="onSizeChange" width="'100%'" :page-sizes="[12, 16, 20, 30, 50]" |
|
|
|
:page-size="searchData.pageSize" :current-page.sync="searchData.pageNum" layout="total, sizes, prev, pager, next" |
|
|
|
:total="total"> |
|
|
|
<Pagination |
|
|
|
@current-change="initData" |
|
|
|
@size-change="onSizeChange" |
|
|
|
width="'100%'" |
|
|
|
:page-sizes="[12, 16, 20, 30, 50]" |
|
|
|
:page-size="searchData.pageSize" |
|
|
|
:current-page.sync="searchData.pageNum" |
|
|
|
layout="total, sizes, prev, pager, next" |
|
|
|
:total="total" |
|
|
|
> |
|
|
|
</Pagination> |
|
|
|
</div> |
|
|
|
|
|
|
|
<EventDetailDialog :visible="eventDetailDialogVisible" :formData="detailDialogFormData" @update:value="handleClose" /> |
|
|
|
<EventDispatchDialog :visible="eventDispatchDialogVisible" @update:value="handleClose" :eventId="eventId" /> |
|
|
|
<EventDetailDialog |
|
|
|
:visible="eventDetailDialogVisible" |
|
|
|
:formData="detailDialogFormData" |
|
|
|
@update:value="handleClose" |
|
|
|
/> |
|
|
|
<EventDispatchDialog |
|
|
|
:visible="eventDispatchDialogVisible" |
|
|
|
@update:value="handleClose" |
|
|
|
:eventId="eventId" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import ButtonGradient from "@screen/components/Buttons/ButtonGradient.vue"; |
|
|
|
import Pagination from '@screen/components/Pagination.vue'; |
|
|
|
import InputSearch from '@screen/components/InputSearch/index.vue'; |
|
|
|
import RoadStateCard from '@screen/components/RoadStateCard/index.vue'; |
|
|
|
import Pagination from "@screen/components/Pagination.vue"; |
|
|
|
import InputSearch from "@screen/components/InputSearch/index.vue"; |
|
|
|
import RoadStateCard from "@screen/components/RoadStateCard/index.vue"; |
|
|
|
import EventDetailDialog from "./EventDetailDialog/index"; |
|
|
|
import EventDispatchDialog from "./EventDispatchDialog/index"; |
|
|
|
import { searchFormList } from './data'; |
|
|
|
import { searchFormList } from "./data"; |
|
|
|
import request from "@/utils/request"; |
|
|
|
|
|
|
|
const directionMapping = { |
|
|
|
'1': '菏泽方向', |
|
|
|
'2': '双向', |
|
|
|
'3': '济南方向' |
|
|
|
} |
|
|
|
1: "菏泽方向", |
|
|
|
2: "双向", |
|
|
|
3: "济南方向", |
|
|
|
}; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'RoadNetworkMonitoring', |
|
|
|
name: "RoadNetworkMonitoring", |
|
|
|
components: { |
|
|
|
Pagination, |
|
|
|
RoadStateCard, |
|
|
@ -57,7 +81,7 @@ export default { |
|
|
|
EventDispatchDialog, |
|
|
|
EventDetailDialog, |
|
|
|
Pagination, |
|
|
|
ButtonGradient |
|
|
|
ButtonGradient, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
@ -67,13 +91,13 @@ export default { |
|
|
|
detailDialogFormData: {}, |
|
|
|
total: 0, |
|
|
|
data: [], |
|
|
|
eventId: '0', |
|
|
|
eventId: "0", |
|
|
|
searchData: { |
|
|
|
pageSize: 16, |
|
|
|
pageNum: 1, |
|
|
|
eventState: 0, |
|
|
|
eventState: "0", |
|
|
|
}, |
|
|
|
} |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.initData(); |
|
|
@ -82,15 +106,15 @@ export default { |
|
|
|
initData() { |
|
|
|
request({ |
|
|
|
// url: `/dc/system/event/dispatchEventList`, |
|
|
|
url: '/dc/system/event/list', |
|
|
|
url: "/dc/system/event/list", |
|
|
|
method: "get", |
|
|
|
params: this.searchData, |
|
|
|
}).then((result) => { |
|
|
|
if (result.code != 200) return Message.error(result?.msg); |
|
|
|
this.total = result.total; |
|
|
|
result.rows.forEach(it => { |
|
|
|
result.rows.forEach((it) => { |
|
|
|
it.stringDirection = directionMapping[it.direction] || it.direction; |
|
|
|
}) |
|
|
|
}); |
|
|
|
this.data = result.rows; |
|
|
|
}); |
|
|
|
}, |
|
|
@ -126,7 +150,7 @@ export default { |
|
|
|
}); |
|
|
|
}, |
|
|
|
lastBtnClick(id) { |
|
|
|
console.log(id) |
|
|
|
console.log(id); |
|
|
|
this.eventDispatchDialogVisible = true; |
|
|
|
this.eventId = id; |
|
|
|
}, |
|
|
@ -137,8 +161,10 @@ export default { |
|
|
|
let dStakeMark = data.stakeMark; |
|
|
|
let dendStakeMark = data.endStakeMark; |
|
|
|
|
|
|
|
let stakeMark = dStakeMark[0] ? `K${dStakeMark[0]}+${dStakeMark[1]}` : ''; |
|
|
|
let endStakeMark = dendStakeMark[0] ? `K${dendStakeMark[0]}+${dendStakeMark[1]}` : ''; |
|
|
|
let stakeMark = dStakeMark[0] ? `K${dStakeMark[0]}+${dStakeMark[1]}` : ""; |
|
|
|
let endStakeMark = dendStakeMark[0] |
|
|
|
? `K${dendStakeMark[0]}+${dendStakeMark[1]}` |
|
|
|
: ""; |
|
|
|
|
|
|
|
this.searchData = { |
|
|
|
...this.searchData, |
|
|
@ -155,12 +181,12 @@ export default { |
|
|
|
handleClose() { |
|
|
|
this.eventDetailDialogVisible = false; |
|
|
|
this.eventDispatchDialogVisible = false; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang='scss' scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.RoadNetworkMonitoring { |
|
|
|
padding: 21px; |
|
|
|
|
|
|
@ -175,7 +201,6 @@ export default { |
|
|
|
// justify-content: flex-end; |
|
|
|
justify-content: space-between; |
|
|
|
.refresh-btn { |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|