zhangzhang
8 months ago
3 changed files with 157 additions and 25 deletions
After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 369 KiB |
@ -1,42 +1,152 @@ |
|||
<template> |
|||
<div class='comp_box'> |
|||
<img src="./img.png" /> |
|||
<div class="RoadNetworkMonitoring"> |
|||
<!-- 搜索栏 --> |
|||
<div class="filter"> |
|||
<ButtonGradient @click="onRefresh" class="refresh-btn"> |
|||
<template #prefix> |
|||
<img src="./images/refresh.svg" /> |
|||
</template> |
|||
刷新 |
|||
</ButtonGradient> |
|||
|
|||
<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" |
|||
/> |
|||
</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> |
|||
</div> |
|||
</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 EventDetailDialog from "./EventDetailDialog/index"; |
|||
// import EventDispatchDialog from "./EventDispatchDialog/index"; |
|||
// import { searchFormList } from "./data"; |
|||
import request from "@/utils/request"; |
|||
|
|||
const directionMapping = { |
|||
1: "菏泽方向", |
|||
2: "双向", |
|||
3: "济南方向", |
|||
}; |
|||
|
|||
export default { |
|||
name: 'InDevelopment', |
|||
name: "RoadNetworkMonitoring", |
|||
components: { |
|||
Pagination, |
|||
RoadStateCard, |
|||
InputSearch, |
|||
Pagination, |
|||
ButtonGradient, |
|||
}, |
|||
props: { |
|||
text: { |
|||
type: String, |
|||
default: "暂无数据" |
|||
} |
|||
data() { |
|||
return { |
|||
searchFormList: {}, |
|||
detailDialogFormData: {}, |
|||
total: 0, |
|||
data: [], |
|||
eventId: "0", |
|||
searchData: { |
|||
pageSize: 16, |
|||
pageNum: 1, |
|||
eventState: "0", |
|||
}, |
|||
}; |
|||
}, |
|||
mounted() { |
|||
} |
|||
} |
|||
created() { |
|||
this.initData(); |
|||
}, |
|||
methods: { |
|||
initData() { |
|||
request({ |
|||
// url: `/dc/system/event/dispatchEventList`, |
|||
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) => { |
|||
it.stringDirection = directionMapping[it.direction] || it.direction; |
|||
}); |
|||
this.data = result.rows; |
|||
}); |
|||
}, |
|||
onSizeChange(pageSize) {}, |
|||
getStateCardBind(item) {}, |
|||
onRefresh() {}, |
|||
firstBtnClick(id) {}, |
|||
handleSearch(data) {}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
.comp_box { |
|||
// padding-top:160px; |
|||
width: 100%; |
|||
<style lang="scss" scoped> |
|||
.RoadNetworkMonitoring { |
|||
padding: 21px; |
|||
|
|||
height: 100%; |
|||
color: #8A9EAA; |
|||
display: flex; |
|||
justify-content: center; |
|||
align-items: center; |
|||
position: relative; |
|||
img { |
|||
position: absolute; |
|||
left: 0; |
|||
top: 0; |
|||
bottom: 0; |
|||
right: 0; |
|||
flex-direction: column; |
|||
z-index: 6; |
|||
|
|||
.filter { |
|||
height: 38px; |
|||
display: flex; |
|||
// justify-content: flex-end; |
|||
justify-content: space-between; |
|||
.refresh-btn { |
|||
} |
|||
} |
|||
|
|||
.body { |
|||
flex: 1; |
|||
overflow: auto; |
|||
display: grid; |
|||
grid-template-columns: repeat(4, 1fr); |
|||
grid-gap: 20px; |
|||
// grid-row-gap: 9px; |
|||
// grid-column-gap: 9px; |
|||
grid-auto-rows: min-content; |
|||
} |
|||
|
|||
.footer { |
|||
margin-top: 15px; |
|||
height: 36px; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
} |
|||
</style> |
|||
|
Loading…
Reference in new issue