|
|
|
@ -22,22 +22,22 @@
|
|
|
|
|
<el-row :gutter="10" class="mb8">
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
v-hasPermi="['basecar:car:add']"
|
|
|
|
|
icon="Plus"
|
|
|
|
|
plain
|
|
|
|
|
type="primary"
|
|
|
|
|
@click="handleAdd"
|
|
|
|
|
v-hasPermi="['basecar:car:add']"
|
|
|
|
|
>{{ t('option.add') }}
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<el-button
|
|
|
|
|
v-hasPermi="['basecar:car:edit']"
|
|
|
|
|
:disabled="single"
|
|
|
|
|
icon="Edit"
|
|
|
|
|
plain
|
|
|
|
|
type="success"
|
|
|
|
|
@click="handleUpdate"
|
|
|
|
|
v-hasPermi="['basecar:car:edit']"
|
|
|
|
|
>{{ t('option.edit') }}
|
|
|
|
|
</el-button>
|
|
|
|
|
</el-col>
|
|
|
|
@ -69,8 +69,8 @@
|
|
|
|
|
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column align="center" fixed type="selection" width="55"/>
|
|
|
|
|
<el-table-column :label="t('baseCar.car.carLicense')" align="center" prop="carLicense" width="150"/>
|
|
|
|
|
<el-table-column align="center" label="所属车队" prop="carQueueId" />
|
|
|
|
|
<el-table-column align="center" label="所属车型" prop="carTypeId" />
|
|
|
|
|
<el-table-column :label="t('baseCar.car.team')" align="center" prop="carQueueId"/>
|
|
|
|
|
<el-table-column :label="t('baseCar.car.model')" align="center" prop="carTypeId"/>
|
|
|
|
|
<el-table-column :label="t('baseCar.car.deviceId')" align="center" prop="deviceId" width="150"/>
|
|
|
|
|
<el-table-column :label="t('baseCar.car.deviceBindTime')" align="center" prop="deviceBindTime" width="150"/>
|
|
|
|
|
<el-table-column :label="t('common.createTime')" align="center" prop="createTime" width="160"/>
|
|
|
|
@ -79,11 +79,11 @@
|
|
|
|
|
width="160">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
icon="Finished"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="handleBang()"
|
|
|
|
|
>
|
|
|
|
|
绑定接收器
|
|
|
|
|
>
|
|
|
|
|
绑定接收器
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
@ -98,15 +98,19 @@
|
|
|
|
|
@pagination="getList"
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
<el-dialog title="绑定接收器" v-model="bangOpen" width="500px" append-to-body>
|
|
|
|
|
<el-form ref="postRef" :label-width=" locale ? '120px':'140px'" :model="form" :rules="rules">
|
|
|
|
|
<el-table v-loading="loading" :data="postList" @selection-change="handleSelectionChange">
|
|
|
|
|
<el-table-column align="center" fixed type="selection" width="10"></el-table-column>
|
|
|
|
|
<el-table-column label="接收器编号" align="center" prop="carLicense" width="150"/>
|
|
|
|
|
<el-table-column align="center" label="设备类型" prop="carQueueId" />
|
|
|
|
|
</el-table>
|
|
|
|
|
</el-form>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<el-dialog v-model="bangOpen" append-to-body title="绑定接收器" width="500px">
|
|
|
|
|
<el-table ref="bindRef" v-loading="loading" :data="postList">
|
|
|
|
|
<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-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>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
<!-- 添加或修改岗位对话框 -->
|
|
|
|
|
<el-dialog v-model="open" :title="title" append-to-body width="500px">
|
|
|
|
|
<el-form ref="postRef" :label-width=" locale ? '120px':'140px'" :model="form" :rules="rules">
|
|
|
|
@ -115,7 +119,7 @@
|
|
|
|
|
v-model="form.carLicense"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicense')"/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="所属车队" prop="carQueueId">
|
|
|
|
|
<el-form-item :label="t('baseCar.car.team')" prop="carQueueId">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.carQueueId"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carQueueId')"
|
|
|
|
@ -130,7 +134,7 @@
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="所属车型" prop="carTypeId">
|
|
|
|
|
<el-form-item :label="t('baseCar.car.model')" prop="carTypeId">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.carTypeId"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carQueueId')"
|
|
|
|
@ -156,8 +160,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup name="basetyre">
|
|
|
|
|
import {addBaseCar, delBaseCar, getBaseCar, listBaseCar, updateBaseCar,getCarQueueList} from "@/api/basecar/car";
|
|
|
|
|
<script name="basetyre" setup>
|
|
|
|
|
import {addBaseCar, delBaseCar, getBaseCar, listBaseCar, updateBaseCar, getCarQueueList} from "@/api/basecar/car";
|
|
|
|
|
|
|
|
|
|
import {useI18n} from 'vue-i18n';
|
|
|
|
|
import Cookies from "js-cookie";
|
|
|
|
@ -192,6 +196,8 @@ const multiple = ref(true);
|
|
|
|
|
const total = ref(0);
|
|
|
|
|
// 模态框标题
|
|
|
|
|
const title = ref("");
|
|
|
|
|
// 绑定接收器选择行
|
|
|
|
|
const bindValue = ref('')
|
|
|
|
|
|
|
|
|
|
// 搜索参数
|
|
|
|
|
const queryParams = ref({
|
|
|
|
@ -264,6 +270,11 @@ function handleSelectionChange(selection) {
|
|
|
|
|
multiple.value = !selection.length;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const bindHandleSelectionChange = (selection) => {
|
|
|
|
|
bindValue.value = selection
|
|
|
|
|
console.log(bindValue.value)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
|
function handleAdd() {
|
|
|
|
|
reset();
|
|
|
|
@ -288,9 +299,10 @@ function handleUpdate(row) {
|
|
|
|
|
title.value = t('baseCar.car.editTitle');
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
function handleBang(row){
|
|
|
|
|
// console.log(row.id)
|
|
|
|
|
bangOpen.value = true;
|
|
|
|
|
|
|
|
|
|
function handleBang(row) {
|
|
|
|
|
// console.log(row.id)
|
|
|
|
|
bangOpen.value = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 提交按钮 */
|
|
|
|
|