优化搜索接收器

master
夜笙歌 2 years ago
parent f9fe8b8f97
commit 324251864c

@ -98,12 +98,13 @@
@pagination="getList"
/>
<el-dialog v-model="bangOpen" append-to-body title="绑定接收器" width="500px">
<el-table ref="bindRef" v-loading="loading" :data="postList">
<el-dialog @close="()=>{bindValue='';bindInput=''}" v-model="bangOpen" append-to-body title="绑定接收器" width="500px">
<el-input style="width:200px" v-model="bindInput" /> <el-button type="primary" @click="bindSearch" >搜索</el-button>
<el-table ref="bindRef" v-loading="loading" :data="bindList">
<el-table-column align="center" width="25">
<template #default="scope">
<el-radio-group v-model="bindValue">
<el-radio @click.native="bindHandleSelectionChange(scope.row.id)" :label="scope.row.id"> </el-radio>
<el-radio @click="bindHandleSelectionChange(scope.row.id)" :label="scope.row.id"> </el-radio>
</el-radio-group>
</template>
</el-table-column>
@ -198,6 +199,10 @@ const total = ref(0);
const title = ref("");
//
const bindValue = ref('')
//
const bindInput = ref('')
//
const bindList = ref([])
//
const queryParams = ref({
@ -270,11 +275,20 @@ function handleSelectionChange(selection) {
multiple.value = !selection.length;
}
//
const bindHandleSelectionChange = (selection) => {
bindValue.value = selection
console.log(bindValue.value)
}
//
const bindSearch = () => {
console.log(bindInput.value)
listBaseCar(queryParams.value).then(response => {
bindList.value = response.rows;
})
}
/** 新增按钮操作 */
function handleAdd() {
reset();
@ -303,6 +317,7 @@ function handleUpdate(row) {
function handleBang(row) {
// console.log(row.id)
bangOpen.value = true;
bindSearch()
}
/** 提交按钮 */

Loading…
Cancel
Save