|
|
|
@ -81,7 +81,7 @@
|
|
|
|
|
<el-button
|
|
|
|
|
icon="Finished"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="handleBang()"
|
|
|
|
|
@click="handleBang(scope.row.id)"
|
|
|
|
|
>
|
|
|
|
|
绑定接收器
|
|
|
|
|
</el-button>
|
|
|
|
@ -98,19 +98,26 @@
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<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-dialog v-model="bangOpen" append-to-body title="绑定接收器" width="500px" @close="()=>{bindValue='';bindInput=''}">
|
|
|
|
|
<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-column align="center" width="25">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<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>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column align="center" label="接收器编号" prop="carLicense" width="150"/>
|
|
|
|
|
<el-table-column align="center" label="设备类型" prop="carQueueId"/>
|
|
|
|
|
<el-table-column align="center" label="接收器编号" prop="internetThingsNo" width="150"/>
|
|
|
|
|
<el-table-column align="center" label="设备类型" prop="deviceType"/>
|
|
|
|
|
</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 v-model="open" :title="title" append-to-body width="500px">
|
|
|
|
@ -162,7 +169,15 @@
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<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 Cookies from "js-cookie";
|
|
|
|
@ -197,6 +212,8 @@ const multiple = ref(true);
|
|
|
|
|
const total = ref(0);
|
|
|
|
|
// 模态框标题
|
|
|
|
|
const title = ref("");
|
|
|
|
|
// 要绑定的行信息
|
|
|
|
|
const waitBind = ref('')
|
|
|
|
|
// 绑定接收器选择行
|
|
|
|
|
const bindValue = ref('')
|
|
|
|
|
// 搜索接收器
|
|
|
|
@ -287,6 +304,14 @@ const bindSearch = () => {
|
|
|
|
|
bindList.value = response.rows;
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
// 绑定接收器确定
|
|
|
|
|
const bindOk = () => {
|
|
|
|
|
let params = {
|
|
|
|
|
internetThingsNo: bindValue.value,
|
|
|
|
|
id: waitBind.value
|
|
|
|
|
}
|
|
|
|
|
console.log(params)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
function handleAdd() {
|
|
|
|
@ -314,8 +339,8 @@ function handleUpdate(row) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function handleBang(row) {
|
|
|
|
|
// console.log(row.id)
|
|
|
|
|
bangOpen.value = true;
|
|
|
|
|
waitBind.value = row
|
|
|
|
|
bindSearch()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|