Commit bebe83be authored by 盖献康's avatar 盖献康

综合查询 - 车辆查询 - 车型下拉框和'不显示非机动车'复选框 联动

parent c264a36d
......@@ -28,10 +28,10 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="类型" prop="businessType">
<el-form-item label="关键字" prop="businessType">
<el-select
v-model="queryParams.businessType"
placeholder="操作类型"
placeholder="关键字"
clearable
style="width: 240px"
>
......@@ -115,7 +115,7 @@
<el-table-column type="selection" width="50" align="center" />
<el-table-column label="日志编号" align="center" prop="operId" />
<el-table-column label="系统模块" align="center" prop="title" :show-overflow-tooltip="true" />
<el-table-column label="操作类型" align="center" prop="businessType">
<el-table-column label="关键字" align="center" prop="businessType">
<template slot-scope="scope">
<dict-tag :options="dict.type.sys_oper_type" :value="scope.row.businessType" />
</template>
......
......@@ -85,6 +85,7 @@
clearable
placeholder="全部"
style="width: 100%"
@change="changeVehicleType"
>
<el-option
v-for="(item, index) in dict.type.bhsp_vtype"
......@@ -119,6 +120,14 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- 不显示非机动车 单选框 -->
<el-checkbox
v-model="checked"
style="padding-right: 10px;"
:disabled="queryParams.vehicleType !== ''"
>
不显示非机动车
</el-checkbox>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">查询</el-button>
</el-form>
<!--table表单-->
......@@ -243,6 +252,7 @@ export default {
dicts: ['bhsp_area', 'bhsp_road', 'bhsp_vtype', 'bhsp_customs', 'bhsp_colour'],
data() {
return {
checked: false,
// 列表数据集合
vehicleList: [],
// 时间筛选数组
......@@ -269,8 +279,8 @@ export default {
monitoringPosition: '',
roadName: '',
startTimeList: [],
overTimeList: []
overTimeList: [],
vehicleType: ''
},
// 表单参数
form: {
......@@ -287,6 +297,14 @@ export default {
this.getList()
},
methods: {
/** 车型下拉框change回调函数 */
changeVehicleType(value) {
console.log('changeVehicleType', value)
// 当车型下拉框有值被选中时,'不显示非机动车'单选框取消勾选
if (value !== '') {
this.checked = false
}
},
/** 动态增加时间筛选控件 */
addDatePicker() {
this.datePickers.push({ time: '' }) // 添加一个新的日期选择器
......@@ -343,6 +361,12 @@ export default {
temp.roadName = ''
}
console.log('我的筛选项', temp)
/** 如果'不显示非机动车'单选框被选中,择给车型集合赋值 */
if (this.checked) {
temp.nonMotorVehicleTypeList = 'vtype6,vtype7,vtype8,vtype12'
} else {
temp.nonMotorVehicleTypeList = null
}
/** 请求api方法 */
getVehicleList(temp).then(response => {
// 返回列表数据
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment