lcw
This commit is contained in:
@ -1,46 +1,50 @@
|
||||
<template>
|
||||
<el-dialog width="1400px" :model-value="modelValue" append-to-body @close="closed">
|
||||
<template #title>
|
||||
<span class="mr10 f16">选择布控车辆</span>
|
||||
<el-button type="primary" size="small" @click="zdyaddPerson">添加其他车辆</el-button>
|
||||
<span class="mr10 f16">选择布控车辆</span>
|
||||
<el-button type="primary" size="small" @click="zdyaddPerson">添加其他车辆</el-button>
|
||||
</template>
|
||||
<el-form :model="listQuery" :inline="true">
|
||||
<el-form-item label="车牌号">
|
||||
<el-input placeholder="请输入车牌号" v-model="listQuery.hphm" clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="车架号">
|
||||
<el-input placeholder="请输入车架号" v-model="listQuery.clCjh" clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆所有人">
|
||||
<el-input placeholder="请输入车辆所有人" v-model="listQuery.clSyr" clearable ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="success" @click="handleFilter">查询</el-button>
|
||||
<el-button type="info" @click="reset()"> 重置 </el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="车牌号">
|
||||
<el-input placeholder="请输入车牌号" v-model="listQuery.hphm" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="车架号">
|
||||
<el-input placeholder="请输入车架号" v-model="listQuery.clCjh" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="车辆所有人">
|
||||
<el-input placeholder="请输入车辆所有人" v-model="listQuery.clSyr" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="success" @click="handleFilter">查询</el-button>
|
||||
<el-button type="info" @click="reset()"> 重置 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="tabBox" :class="props.Single ? 'tabBoxRadio' : ''" style="margin-top: 0px">
|
||||
<el-table ref="multipleUserRef" :key="keyTabel" v-loading="loading" @selection-change="handleSelectionChange" :data="tableData" border :row-key="keyid" style="width: 100%" height="450">
|
||||
<el-table-column type="selection" width="55" :reserve-selection="true"/>
|
||||
<el-table-column prop="hphm" align="center" label="车牌号"/>
|
||||
<el-table-column prop="clCjh" align="center" label="车架号"/>
|
||||
<el-table-column prop="clYs" align="center" label="车辆颜色"/>
|
||||
<el-table-column prop="clSyr" align="center" label="车辆所有人"/>
|
||||
<el-table-column prop="gxSsbmmc" align="center" label="管辖单位"/>
|
||||
<el-table-column prop="gkMjXm" align="center" label="管控民警"/>
|
||||
</el-table>
|
||||
<el-table ref="multipleUserRef" :key="keyTabel" v-loading="loading" @selection-change="handleSelectionChange"
|
||||
:data="tableData" border :row-key="keyid" style="width: 100%" height="450">
|
||||
<el-table-column type="selection" width="55" :reserve-selection="true" />
|
||||
<el-table-column prop="hphm" align="center" label="车牌号" />
|
||||
<el-table-column prop="clCjh" align="center" label="车架号" />
|
||||
<el-table-column prop="clYs" align="center" label="车辆颜色" />
|
||||
<el-table-column prop="clSyr" align="center" label="车辆所有人" />
|
||||
<el-table-column prop="gxSsbmmc" align="center" label="管辖单位" />
|
||||
<el-table-column prop="gkMjXm" align="center" label="管控民警" />
|
||||
<el-table-column prop="gxSsbmmc" align="center" label="预警等级">
|
||||
<template #default="scope">
|
||||
<DictTag :tag="false" :value="scope.row.yjdj" :options="D_GS_ZDR_YJDJ" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="yjbq" align="center" label="预警标签">
|
||||
<template #default="scope">
|
||||
<DictTag :tag="false" :value="scope.row.yjbq" :options="BD_BK_CLYJBQ" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="fenye flex just-end " :style="{ top: tableHeight + 'px' }">
|
||||
<el-pagination
|
||||
class="pagination"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="listQuery.pageCurrent"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="listQuery.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
<el-pagination class="pagination" @size-change="handleSizeChange" @current-change="handleCurrentChange"
|
||||
:current-page="listQuery.pageCurrent" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.pageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="total"></el-pagination>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="flex just-center">
|
||||
@ -56,14 +60,15 @@
|
||||
|
||||
<script setup>
|
||||
import AddPeo from './addPeo.vue'
|
||||
import { qcckGet} from "@/api/qcckApi.js";
|
||||
import { defineProps, ref ,getCurrentInstance, watch} from "vue";
|
||||
import { qcckGet } from "@/api/qcckApi.js";
|
||||
import { Dict } from 'core-js';
|
||||
import { defineProps, ref, getCurrentInstance, watch } from "vue";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { D_BZ_XB,D_BZ_MZ } = proxy.$dict("D_BZ_XB","D_BZ_MZ"); //获取字典数据
|
||||
const { BD_BK_CLYJBQ, D_GS_ZDR_YJDJ } = proxy.$dict("BD_BK_CLYJBQ", "D_GS_ZDR_YJDJ"); //获取字典数据
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Boolean,
|
||||
default:false
|
||||
default: false
|
||||
},
|
||||
LeaderType: {
|
||||
type: String,
|
||||
@ -89,7 +94,7 @@ const addPerson = ref()
|
||||
const multipleUserRef = ref(null);
|
||||
const multipleSelectionUser = ref([]);
|
||||
const tableData = ref([]);
|
||||
const emits = defineEmits(["update:modelValue", "choosed","choosedAdd"]);
|
||||
const emits = defineEmits(["update:modelValue", "choosed", "choosedAdd"]);
|
||||
const keyTabel = ref(0)
|
||||
const keyid = (row) => {
|
||||
return row.id;
|
||||
@ -99,7 +104,7 @@ const closed = () => {
|
||||
emits("update:modelValue", false);
|
||||
};
|
||||
const reset = () => {
|
||||
listQuery.value = { pageCurrent: 1, pageSize: 20, };
|
||||
listQuery.value = { pageCurrent: 1, pageSize: 20, };
|
||||
getListData();
|
||||
};
|
||||
|
||||
@ -140,14 +145,14 @@ const handleCurrentChange = (currentPage) => {
|
||||
};
|
||||
const getListData = () => {
|
||||
keyTabel.value++
|
||||
const params = {...listQuery.value}
|
||||
const params = { ...listQuery.value }
|
||||
loading.value = true;
|
||||
qcckGet(params,'/mosty-gsxt/tbGsxtZdcl/selectPage').then(res=>{
|
||||
qcckGet(params, '/mosty-gsxt/tbGsxtZdcl/selectPage').then(res => {
|
||||
loading.value = false;
|
||||
tableData.value = res.records || [];
|
||||
total.value = res.total;
|
||||
multipleUser();
|
||||
}).catch(()=>{
|
||||
}).catch(() => {
|
||||
loading.value = false;
|
||||
})
|
||||
};
|
||||
@ -155,7 +160,7 @@ const getListData = () => {
|
||||
//列表回显
|
||||
function multipleUser() {
|
||||
tableData.value.forEach((item) => {
|
||||
multipleUserRef.value.toggleRowSelection(item, false);
|
||||
multipleUserRef.value.toggleRowSelection(item, false);
|
||||
if (props.roleIds.some((id) => id == item.id)) {
|
||||
multipleUserRef.value.toggleRowSelection(item, true);
|
||||
}
|
||||
@ -183,9 +188,9 @@ const zdyaddPerson = () => {
|
||||
addPerson.value.init();
|
||||
};
|
||||
|
||||
watch(()=>props.modelValue,val=>{
|
||||
if(val) handleFilter();
|
||||
},{immediate:true})
|
||||
watch(() => props.modelValue, val => {
|
||||
if (val) handleFilter();
|
||||
}, { immediate: true })
|
||||
|
||||
</script>
|
||||
|
||||
@ -197,8 +202,8 @@ watch(()=>props.modelValue,val=>{
|
||||
.tabBoxRadio .el-checkbox__inner {
|
||||
border-radius: 50% !important;
|
||||
}
|
||||
|
||||
.tabBoxRadio .el-table__header-wrapper .el-checkbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user