|
|
@ -17,8 +17,10 @@ const formInline = ref({
|
|
|
|
date: [],
|
|
|
|
date: [],
|
|
|
|
policeId: "",
|
|
|
|
policeId: "",
|
|
|
|
event: "",
|
|
|
|
event: "",
|
|
|
|
violation: ""
|
|
|
|
violation: "",
|
|
|
|
|
|
|
|
violationType: ""
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
const currentPage = ref(1);
|
|
|
|
const currentPage = ref(1);
|
|
|
|
const totalNumber = ref(0);
|
|
|
|
const totalNumber = ref(0);
|
|
|
|
const pageSize = ref(10);
|
|
|
|
const pageSize = ref(10);
|
|
|
@ -68,6 +70,7 @@ function onSearch() {
|
|
|
|
police_id: formInline.value.policeId || undefined,
|
|
|
|
police_id: formInline.value.policeId || undefined,
|
|
|
|
event_type: formInline.value.event || undefined,
|
|
|
|
event_type: formInline.value.event || undefined,
|
|
|
|
violation: violationMap.value[formInline.value.violation] || undefined,
|
|
|
|
violation: violationMap.value[formInline.value.violation] || undefined,
|
|
|
|
|
|
|
|
violation_type: formInline.value.violationType || undefined,
|
|
|
|
page: currentPage.value || undefined,
|
|
|
|
page: currentPage.value || undefined,
|
|
|
|
page_size: pageSize.value || undefined
|
|
|
|
page_size: pageSize.value || undefined
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -132,7 +135,7 @@ function getEvents() {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.then(response => {
|
|
|
|
.then(response => {
|
|
|
|
eventMap.value = response.data.data;
|
|
|
|
eventMap.value = response.data.data;
|
|
|
|
console.log(eventMap.value);
|
|
|
|
// console.log(eventMap.value);
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.catch(error => {
|
|
|
|
.catch(error => {
|
|
|
|
// console.log("请求失败");
|
|
|
|
// console.log("请求失败");
|
|
|
@ -141,6 +144,14 @@ function getEvents() {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function pickerOptions(time){
|
|
|
|
|
|
|
|
return time.getTime() > Date.now()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const now_date = new Date();
|
|
|
|
|
|
|
|
now_date.setMonth(now_date.getMonth() - 1)
|
|
|
|
|
|
|
|
const lastMonth = now_date
|
|
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
onMounted(() => {
|
|
|
|
onSearch();
|
|
|
|
onSearch();
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -166,15 +177,18 @@ onMounted(() => {
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
start-placeholder="开始日期"
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
end-placeholder="结束日期"
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
|
|
|
|
:disabled-date="pickerOptions"
|
|
|
|
|
|
|
|
:default-value="lastMonth"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="警号:">
|
|
|
|
<el-form-item label="警号:">
|
|
|
|
<el-input v-model="formInline.policeId" placeholder="警号" clearable style="width: 198px" />
|
|
|
|
<el-input v-model="formInline.policeId" placeholder="警号" clearable style="width: 198px" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="事件:">
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="违法行为:">
|
|
|
|
<!-- <el-input v-model="formInline.event" placeholder="事件"/>-->
|
|
|
|
<!-- <el-input v-model="formInline.event" placeholder="事件"/>-->
|
|
|
|
<el-select v-model="formInline.event" placeholder="选择事件" clearable @click="getEvents">
|
|
|
|
<el-select v-model="formInline.event" placeholder="违法行为" clearable @click="getEvents">
|
|
|
|
<el-option v-for="(event, type) in eventMap" :key="type" :label="event" :value="event"></el-option>
|
|
|
|
<el-option v-for="(event, type) in eventMap" :key="type" :label="event" :value="event"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -185,6 +199,10 @@ onMounted(() => {
|
|
|
|
</el-select>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item label="违规行为:">
|
|
|
|
|
|
|
|
<el-input v-model="formInline.violationType" placeholder="违规行为" clearable style="width: 198px" />
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type="primary" @click="handleSearch">查询</el-button>
|
|
|
|
<el-button type="primary" @click="handleSearch">查询</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
@ -205,7 +223,7 @@ onMounted(() => {
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<el-table-column prop="record_time" sortable label="记录仪日期时间" />
|
|
|
|
<el-table-column prop="record_time" sortable label="记录仪日期时间" />
|
|
|
|
<el-table-column prop="police_id" label="警号" />
|
|
|
|
<el-table-column prop="police_id" label="警号" />
|
|
|
|
<el-table-column prop="event_type" label="事件">
|
|
|
|
<el-table-column prop="event_type" label="违法行为">
|
|
|
|
<template v-slot="scope">
|
|
|
|
<template v-slot="scope">
|
|
|
|
<span>
|
|
|
|
<span>
|
|
|
|
{{ scope.row.event_type || "未定义事件" }}
|
|
|
|
{{ scope.row.event_type || "未定义事件" }}
|
|
|
|