|
|
@ -1,17 +1,20 @@ |
|
|
|
<template> |
|
|
|
<Card2 class="Auditlists" title="审核列表"> |
|
|
|
<InputSearch style="width: 100%" :formList="searchFormList" /> |
|
|
|
<InputSearch style="width: 100%" :formList="searchFormList" @handleSearch="handleSearch" /> |
|
|
|
<div class="body"> |
|
|
|
<ListItem |
|
|
|
v-for="item in list.rows" |
|
|
|
:key="item.id" |
|
|
|
:data="item" |
|
|
|
origin="left" |
|
|
|
class="middle-ratio" |
|
|
|
@click.native="onClick(item)" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div class="footer"> |
|
|
|
<Pagination layout="total,prev, pager, next, jumper" :total="list.total" /> |
|
|
|
<Pagination layout="total,prev, pager, next, jumper" :total="list.total" |
|
|
|
:page.sync="queryParams.pageNum" |
|
|
|
:limit.sync="queryParams.pageSize" |
|
|
|
@pagination="bindList" /> |
|
|
|
</div> |
|
|
|
</Card2> |
|
|
|
</template> |
|
|
@ -25,6 +28,19 @@ import ListItem from "./ListItem.vue"; |
|
|
|
import { method } from "lodash"; |
|
|
|
import request from '@/utils/request' |
|
|
|
import {DirectionTypes} from '@screen/utils/enum.js'; |
|
|
|
const enum_event_type = [ |
|
|
|
{key:'1',value:'交通事故',icon:"TrafficControl"}, |
|
|
|
{key:'2',value:'车辆故障',icon:"TrafficControl"}, |
|
|
|
{key:'3',value:'交通管制',icon:"TrafficControl"}, |
|
|
|
{key:'4',value:'交通拥堵',icon:"TrafficControl"}, |
|
|
|
{key:'5',value:'非法上路',icon:"TrafficControl"}, |
|
|
|
{key:'6',value:'路障清除',icon:"TrafficControl"}, |
|
|
|
{key:'7',value:'施工建设',icon:"TrafficControl"}, |
|
|
|
{key:'8',value:'服务区异常',icon:"TrafficControl"}, |
|
|
|
{key:'9',value:'设施设备隐患',icon:"TrafficControl"}, |
|
|
|
{key:'10',value:'异常天气', icon:"AbnormalWeather"}, |
|
|
|
{key:'11',value:'其他事件',icon:"TrafficControl"} |
|
|
|
] |
|
|
|
export default { |
|
|
|
name: "Auditlists", |
|
|
|
components: { |
|
|
@ -38,65 +54,54 @@ export default { |
|
|
|
return { |
|
|
|
searchFormList, |
|
|
|
list:{total:0,rows:[]}, |
|
|
|
eventType:[ |
|
|
|
'交通事故', |
|
|
|
'车辆故障', |
|
|
|
'交通管制', |
|
|
|
'交通拥堵', |
|
|
|
'非法上路', |
|
|
|
'路障清除', |
|
|
|
'施工建设', |
|
|
|
'', |
|
|
|
'', |
|
|
|
'', |
|
|
|
'', |
|
|
|
], |
|
|
|
list1: Array.from({ length: 3 }).map(() => ({ |
|
|
|
title: "异常天气", |
|
|
|
content: "2023.12.23 13:00:00 济南方向K100+000 中雪", |
|
|
|
type: 0, |
|
|
|
isverify: (() => { |
|
|
|
const min = 0; |
|
|
|
const max = 2; |
|
|
|
return Math.floor(Math.random() * (max - min + 1)) + min; |
|
|
|
})(), |
|
|
|
})), |
|
|
|
list2: Array.from({ length: 10 }).map(() => ({ |
|
|
|
title: "交通事故", |
|
|
|
content: "2023.12.23 13:00:00 济南方向K100+000 交通事故", |
|
|
|
type: 1, |
|
|
|
isverify: (() => { |
|
|
|
const min = 0; |
|
|
|
const max = 2; |
|
|
|
return Math.floor(Math.random() * (max - min + 1)) + min; |
|
|
|
})(), |
|
|
|
})), |
|
|
|
queryParams: { |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 10, |
|
|
|
}, |
|
|
|
p:{} |
|
|
|
}; |
|
|
|
}, |
|
|
|
created() { |
|
|
|
this.bindList() |
|
|
|
// axiosIns.get("/business/dcPublishInfo/list") |
|
|
|
// .then((result) => { |
|
|
|
// console.log("%c [ result ]-39-「index.vue」", "font-size:15px; background:#4bd543; color:#8fff87;", result); |
|
|
|
// if (result.code !== 200) return this.list = []; |
|
|
|
// this.list = result.rows; |
|
|
|
// }).catch((err) => { |
|
|
|
// }); |
|
|
|
}, |
|
|
|
methods:{ |
|
|
|
onClick(e){ |
|
|
|
this.$emit("click",e.eventId); |
|
|
|
}, |
|
|
|
handleSearch(e){ |
|
|
|
let p = {}; |
|
|
|
if(e.eventState){ |
|
|
|
p['eventState']= e.eventState |
|
|
|
} |
|
|
|
if(e.eventType){ |
|
|
|
p['eventState']= e.eventState |
|
|
|
} |
|
|
|
if(e.startStakeMark && e.startStakeMark.length === 2){ |
|
|
|
p['startStakeMarkValue']= `K${e.startStakeMark[0]}+${e.startStakeMark[1]}` |
|
|
|
} |
|
|
|
if(e.endStakeMark && e.endStakeMark.length === 2){ |
|
|
|
p['endStakeMarkValue']= `K${e.endStakeMark[0]}+${e.endStakeMark[1]}` |
|
|
|
} |
|
|
|
this.p = p; |
|
|
|
this.list = []; |
|
|
|
this.bindList() |
|
|
|
}, |
|
|
|
bindList(){ |
|
|
|
request({ |
|
|
|
url: '/business/manage/list', |
|
|
|
method: 'get', |
|
|
|
data: {} |
|
|
|
params: this.p |
|
|
|
}).then(res=>{ |
|
|
|
res.rows.forEach(e => { |
|
|
|
console.log(e) |
|
|
|
const ev = _.find(enum_event_type,{key:e.eventType}) |
|
|
|
e.content = `${e.eventTime} ${e.stakeMark} ${DirectionTypes[e.direction]} ${e.contentDetails}` |
|
|
|
e.type = e.eventType |
|
|
|
e.icon = ev.icon |
|
|
|
e.title = ev.value |
|
|
|
e.isverify = e.eventState |
|
|
|
}); |
|
|
|
this.list = res |
|
|
|
this.$emit("click",res.rows[0].eventId); |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|