|
|
|
@ -69,15 +69,27 @@
|
|
|
|
|
<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 :label="t('baseCar.car.team')" align="center" prop="carQueueId"/>
|
|
|
|
|
<el-table-column :label="t('baseCar.car.team')" align="center" prop="carQueue"/>
|
|
|
|
|
<el-table-column align="center" label="挂车" prop="carQueue">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
{{ scope.row.trailerNum === 0 ? '车头' : '挂' + scope.row.trailerNum }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<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"/>
|
|
|
|
|
<el-table-column :label="t('common.createBy')" align="center" prop="createName" width="150"/>
|
|
|
|
|
<el-table-column :label="t('option.option')" align="center" class-name="small-padding fixed-width" fixed="right"
|
|
|
|
|
width="160">
|
|
|
|
|
width="200">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
v-if="scope.row.trailerNum === 0"
|
|
|
|
|
type="text"
|
|
|
|
|
@click="SetTrailer(scope.row)"
|
|
|
|
|
>
|
|
|
|
|
设置挂车
|
|
|
|
|
</el-button>
|
|
|
|
|
<el-button
|
|
|
|
|
icon="Finished"
|
|
|
|
|
type="text"
|
|
|
|
@ -133,6 +145,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</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">
|
|
|
|
@ -144,7 +157,7 @@
|
|
|
|
|
<el-form-item :label="t('baseCar.car.team')" prop="carQueueId">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.carQueueId"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carQueueId')"
|
|
|
|
|
:placeholder="t('common.PleaseSelect')"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
>
|
|
|
|
@ -159,7 +172,7 @@
|
|
|
|
|
<el-form-item :label="t('baseCar.car.model')" prop="carTypeId">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="form.carTypeId"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carQueueId')"
|
|
|
|
|
:placeholder="t('common.PleaseSelect')"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
>
|
|
|
|
@ -179,6 +192,84 @@
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!--设置挂车-->
|
|
|
|
|
<el-dialog v-model="dialogOpen1" append-to-body title="设置挂车" width="1000px">
|
|
|
|
|
|
|
|
|
|
<el-form :inline="true" :label-width=" locale ? '110px':'170px'">
|
|
|
|
|
<el-form-item label="所属车型">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="SetTrailerForm.carTypeId"
|
|
|
|
|
:placeholder="t('common.PleaseSelect') "
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in carType"
|
|
|
|
|
:key="dict.id"
|
|
|
|
|
:label="dict.title"
|
|
|
|
|
:value="dict.id"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="布局挂数">
|
|
|
|
|
<el-select
|
|
|
|
|
v-model="SetTrailerForm.trailerNum"
|
|
|
|
|
:placeholder="t('common.PleaseSelect') "
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 240px"
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="dict in option1"
|
|
|
|
|
:key="dict.value"
|
|
|
|
|
:label="dict.label"
|
|
|
|
|
:value="dict.value"
|
|
|
|
|
/>
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="车牌号">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="SetTrailerForm.carLicense"
|
|
|
|
|
:placeholder="t('common.pleaseEnter') + t('baseCar.car.carLicense')"
|
|
|
|
|
clearable
|
|
|
|
|
style="width: 200px"
|
|
|
|
|
/>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label=" ">
|
|
|
|
|
<el-button icon="Search" type="primary" @click="saveTrailer">{{ t('option.save') }}</el-button>
|
|
|
|
|
<el-button icon="Refresh" @click="()=>{SetTrailerForm = {}}">{{ t('option.reset') }}</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<el-table :data="postList1">
|
|
|
|
|
<el-table-column align="center" fixed type="selection" width="55"/>
|
|
|
|
|
<el-table-column label="布局挂数" align="center" prop="carLicense" width="150">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
{{ scope.row.trailerNum === 0 ? '车头' : '挂' + scope.row.trailerNum }}
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="所属车型" align="center" prop="carTypeId"/>
|
|
|
|
|
<el-table-column label="车牌号" align="center" prop="carLicense"/>
|
|
|
|
|
<el-table-column label="车头牌号" align="center" prop="carLicenseParent" width="150"/>
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right"
|
|
|
|
|
width="200">
|
|
|
|
|
<template #default="scope">
|
|
|
|
|
<el-button
|
|
|
|
|
type="text"
|
|
|
|
|
@click="delTrailer(scope.row.id)"
|
|
|
|
|
v-if="scope.row.trailerNum !== 0"
|
|
|
|
|
>
|
|
|
|
|
删除
|
|
|
|
|
</el-button>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<template #footer>
|
|
|
|
|
<div class="dialog-footer">
|
|
|
|
|
<el-button @click="()=>{thisCarId ={};SetTrailerForm = {};dialogOpen1=false}">关闭</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -190,7 +281,7 @@ import {
|
|
|
|
|
listBaseCar,
|
|
|
|
|
updateBaseCar,
|
|
|
|
|
getCarQueueList,
|
|
|
|
|
getBindList
|
|
|
|
|
getBindList,
|
|
|
|
|
} from "@/api/carManagement/info";
|
|
|
|
|
|
|
|
|
|
import {useI18n} from 'vue-i18n';
|
|
|
|
@ -236,7 +327,30 @@ const bindValue = ref('')
|
|
|
|
|
const bindInput = ref('')
|
|
|
|
|
// 接收器筛选
|
|
|
|
|
const bindList = ref([])
|
|
|
|
|
// 设置挂车模态框是否显示
|
|
|
|
|
const dialogOpen1 = ref(false);
|
|
|
|
|
const postList1 = ref([])
|
|
|
|
|
const thisCarId = ref({})
|
|
|
|
|
|
|
|
|
|
const SetTrailerForm = ref({
|
|
|
|
|
carTypeId: '',
|
|
|
|
|
trailerNum: '',
|
|
|
|
|
carLicense: ''
|
|
|
|
|
})
|
|
|
|
|
const option1 = [
|
|
|
|
|
{
|
|
|
|
|
value: 1,
|
|
|
|
|
label: '挂1'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 2,
|
|
|
|
|
label: '挂2'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
value: 3,
|
|
|
|
|
label: '挂3'
|
|
|
|
|
},
|
|
|
|
|
]
|
|
|
|
|
// 搜索参数
|
|
|
|
|
const queryParams = ref({
|
|
|
|
|
pageNum: 1,
|
|
|
|
@ -317,6 +431,47 @@ function handleSelectionChange(selection) {
|
|
|
|
|
multiple.value = !selection.length;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 设置挂车模态框
|
|
|
|
|
const SetTrailer = (e) => {
|
|
|
|
|
dialogOpen1.value = true
|
|
|
|
|
|
|
|
|
|
getCarQueueList().then(response => {
|
|
|
|
|
carType.value = response.CarTypeList;
|
|
|
|
|
}).finally(() => {
|
|
|
|
|
loading.value = false;
|
|
|
|
|
});
|
|
|
|
|
listBaseCar({carLicenseParent:e.carLicense}).then(val => {
|
|
|
|
|
postList1.value = val.rows
|
|
|
|
|
})
|
|
|
|
|
thisCarId.value = e
|
|
|
|
|
}
|
|
|
|
|
const saveTrailer = () => {
|
|
|
|
|
addBaseCar({
|
|
|
|
|
carLicenseParent: thisCarId.value.carLicense,
|
|
|
|
|
carQueueId: thisCarId.value.carQueueId, ...SetTrailerForm.value,
|
|
|
|
|
}).then(val => {
|
|
|
|
|
proxy.$modal.msgSuccess('保存成功');
|
|
|
|
|
getList();
|
|
|
|
|
listBaseCar({carLicenseParent:thisCarId.value.carLicense}).then(val => {
|
|
|
|
|
postList1.value = val.rows
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
const delTrailer = (e) => {
|
|
|
|
|
proxy.$modal.confirm(t('option.confirmDeletion', {
|
|
|
|
|
key: t('baseCar.car.carLicense'), value: msg.value
|
|
|
|
|
})).then(function () {
|
|
|
|
|
return delBaseCar(e);
|
|
|
|
|
}).then(() => {
|
|
|
|
|
getList();
|
|
|
|
|
proxy.$modal.msgSuccess('删除成功');
|
|
|
|
|
listBaseCar({carLicenseParent:thisCarId.value.carLicense}).then(val => {
|
|
|
|
|
postList1.value = val.rows
|
|
|
|
|
})
|
|
|
|
|
}).catch(() => {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 绑定接收器单选
|
|
|
|
|
const bindHandleSelectionChange = (selection) => {
|
|
|
|
|
bindValue.value = selection
|
|
|
|
@ -324,7 +479,7 @@ const bindHandleSelectionChange = (selection) => {
|
|
|
|
|
|
|
|
|
|
// 搜索接收器
|
|
|
|
|
const bindSearch = () => {
|
|
|
|
|
let params = {deviceId: bindInput.value,...queryParams1.value}
|
|
|
|
|
let params = {deviceId: bindInput.value, ...queryParams1.value}
|
|
|
|
|
getBindList(params).then(response => {
|
|
|
|
|
bindList.value = response.rows;
|
|
|
|
|
total1.value = response.total;
|
|
|
|
@ -396,7 +551,7 @@ function submitForm() {
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
} else {
|
|
|
|
|
addBaseCar(form.value).then(response => {
|
|
|
|
|
addBaseCar({...form.value, trailerNum: 0,}).then(response => {
|
|
|
|
|
proxy.$modal.msgSuccess(t('option.addedSuccessfully'));
|
|
|
|
|
open.value = false;
|
|
|
|
|
getList();
|
|
|
|
|