优化搜索接收器

master
夜笙歌 2 years ago
parent e8a59c6b13
commit e5e2a4d3d5

@ -81,7 +81,7 @@
<el-button <el-button
icon="Finished" icon="Finished"
type="text" type="text"
@click="handleBang()" @click="handleBang(scope.row.id)"
> >
绑定接收器 绑定接收器
</el-button> </el-button>
@ -98,19 +98,26 @@
@pagination="getList" @pagination="getList"
/> />
<el-dialog @close="()=>{bindValue='';bindInput=''}" v-model="bangOpen" append-to-body title="绑定接收器" width="500px"> <el-dialog v-model="bangOpen" append-to-body title="绑定接收器" width="500px" @close="()=>{bindValue='';bindInput=''}">
<el-input style="width:200px" v-model="bindInput" /> <el-button type="primary" @click="bindSearch" >搜索</el-button> <el-input v-model="bindInput" style="width:200px"/>
<el-button type="primary" @click="bindSearch"></el-button>
<el-table ref="bindRef" v-loading="loading" :data="bindList"> <el-table ref="bindRef" v-loading="loading" :data="bindList">
<el-table-column align="center" width="25"> <el-table-column align="center" width="25">
<template #default="scope"> <template #default="scope">
<el-radio-group v-model="bindValue"> <el-radio-group v-model="bindValue">
<el-radio @click="bindHandleSelectionChange(scope.row.id)" :label="scope.row.id"> </el-radio> <el-radio :label="scope.row.id" @click="bindHandleSelectionChange(scope.row.internetThingsNo)"></el-radio>
</el-radio-group> </el-radio-group>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="接收器编号" prop="carLicense" width="150"/> <el-table-column align="center" label="接收器编号" prop="internetThingsNo" width="150"/>
<el-table-column align="center" label="设备类型" prop="carQueueId"/> <el-table-column align="center" label="设备类型" prop="deviceType"/>
</el-table> </el-table>
<template #footer>
<div class="dialog-footer">
<el-button type="primary" @click="bindOk">{{ t('option.ok') }}</el-button>
<el-button @click="()=>{bindValue='';bindInput='';bangOpen=false}">{{ t('option.cancel') }}</el-button>
</div>
</template>
</el-dialog> </el-dialog>
<!-- 添加或修改岗位对话框 --> <!-- 添加或修改岗位对话框 -->
<el-dialog v-model="open" :title="title" append-to-body width="500px"> <el-dialog v-model="open" :title="title" append-to-body width="500px">
@ -162,7 +169,15 @@
</template> </template>
<script name="basetyre" setup> <script name="basetyre" setup>
import {addBaseCar, delBaseCar, getBaseCar, listBaseCar, updateBaseCar, getCarQueueList,getBindList} from "@/api/basecar/car"; import {
addBaseCar,
delBaseCar,
getBaseCar,
listBaseCar,
updateBaseCar,
getCarQueueList,
getBindList
} from "@/api/basecar/car";
import {useI18n} from 'vue-i18n'; import {useI18n} from 'vue-i18n';
import Cookies from "js-cookie"; import Cookies from "js-cookie";
@ -197,6 +212,8 @@ const multiple = ref(true);
const total = ref(0); const total = ref(0);
// //
const title = ref(""); const title = ref("");
//
const waitBind = ref('')
// //
const bindValue = ref('') const bindValue = ref('')
// //
@ -287,6 +304,14 @@ const bindSearch = () => {
bindList.value = response.rows; bindList.value = response.rows;
}) })
} }
//
const bindOk = () => {
let params = {
internetThingsNo: bindValue.value,
id: waitBind.value
}
console.log(params)
}
/** 新增按钮操作 */ /** 新增按钮操作 */
function handleAdd() { function handleAdd() {
@ -314,8 +339,8 @@ function handleUpdate(row) {
} }
function handleBang(row) { function handleBang(row) {
// console.log(row.id)
bangOpen.value = true; bangOpen.value = true;
waitBind.value = row
bindSearch() bindSearch()
} }

@ -31,8 +31,8 @@ export default defineConfig(({mode, command}) => {
proxy: { proxy: {
// https://cn.vitejs.dev/config/#server-proxy // https://cn.vitejs.dev/config/#server-proxy
'/dev-api': { '/dev-api': {
// target: 'http://10.11.41.249:8080', target: 'http://10.11.41.249:8080',
target: 'http://localhost:8080', // target: 'http://localhost:8080',
changeOrigin: true, changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '') rewrite: (p) => p.replace(/^\/dev-api/, '')
} }

Loading…
Cancel
Save