...
|
...
|
@@ -51,7 +51,9 @@ |
|
|
<!--车辆信息列表区域-->
|
|
|
<div style="margin-top: 20px;">
|
|
|
<el-table :data="vehicleInfoList" border stripe highlight-current-row v-loading="listLoading"
|
|
|
@selection-change="selsChange"
|
|
|
element-loading-text="拼命加载中">
|
|
|
<el-table-column type="selection" width="55" align="center"></el-table-column>
|
|
|
<el-table-column type="index" align="center"></el-table-column>
|
|
|
<el-table-column label="车辆类型" prop="vehicleType" align="center" width="120">
|
|
|
<template slot-scope="scope">
|
...
|
...
|
@@ -107,15 +109,24 @@ |
|
|
</el-table>
|
|
|
<!--分页区域-->
|
|
|
<div style="margin-top: 10px">
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
:current-page="queryInfo.pageNum"
|
|
|
:page-sizes="[10,20,30,50]"
|
|
|
:page-size="queryInfo.pageSize"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="total">
|
|
|
</el-pagination>
|
|
|
<el-row :gutter="24">
|
|
|
<el-col :span="5">
|
|
|
<el-button type="danger" icon="el-icon-delete" @click="batchRemove"
|
|
|
:disabled="this.sels.length===0">批量删除
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="10" style="margin-top: 5px">
|
|
|
<el-pagination
|
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
|
:current-page="queryInfo.pageNum"
|
|
|
:page-sizes="[10,20,30,50]"
|
|
|
:page-size="queryInfo.pageSize"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
:total="total">
|
|
|
</el-pagination>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-card>
|
...
|
...
|
@@ -192,9 +203,9 @@ |
|
|
width="60%" @close="editVehicleInfoDialogClosed">
|
|
|
<el-form :model="editVehicleInfoForm" label-width="100px" status-icon
|
|
|
:rules="editVehicleInfoFormRules" ref="editVehicleInfoFormRef"
|
|
|
:inline="true" align="center"
|
|
|
:inline="true" align="center"
|
|
|
style="background-color: #F5F7FA">
|
|
|
<div >
|
|
|
<div>
|
|
|
<br>
|
|
|
<el-form-item label="车牌号码:" prop="licensePlateNumber">
|
|
|
<el-input v-model="editVehicleInfoForm.licensePlateNumber" clearable
|
...
|
...
|
@@ -207,7 +218,7 @@ |
|
|
placeholder="请输入车辆行驶证号"></el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="车辆类型:" prop="vehicleType">
|
|
|
<el-select v-model="editVehicleInfoForm.vehicleType" clearable
|
|
|
<el-select v-model="editVehicleInfoForm.vehicleType" clearable
|
|
|
style="width:250px"
|
|
|
placeholder="请选择车辆类型">
|
|
|
<el-option
|
...
|
...
|
@@ -239,7 +250,7 @@ |
|
|
</el-form-item>
|
|
|
<el-form-item label="有无挂车:" prop="vehicleType">
|
|
|
<el-select v-model="editVehicleInfoForm.isTrailer" clearable
|
|
|
style="width:250px" clearable
|
|
|
style="width:250px" clearable
|
|
|
placeholder="请选择有无挂车">
|
|
|
<el-option
|
|
|
v-for="item in isTrailerList"
|
...
|
...
|
@@ -278,6 +289,7 @@ |
|
|
selectVehicleInfoList,
|
|
|
insertVehicleInfo,
|
|
|
updateVehicleInfo,
|
|
|
batchRemoveVehicleInfo,
|
|
|
deleteVehicleInfo, deleteDispatchNote
|
|
|
} from "../../api/dispatch_api";
|
|
|
|
...
|
...
|
@@ -311,6 +323,10 @@ |
|
|
*/
|
|
|
total: 0,
|
|
|
/**
|
|
|
* 批量删除,选中列表
|
|
|
*/
|
|
|
sels: [],
|
|
|
/**
|
|
|
* 车辆信息列表
|
|
|
*/
|
|
|
vehicleInfoList: [],
|
...
|
...
|
@@ -543,10 +559,50 @@ |
|
|
this.delLoading = false;
|
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
}).catch();
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
|
|
|
/**
|
|
|
* 批量删除,之前的选中
|
|
|
*/
|
|
|
selsChange: function (sels) {
|
|
|
this.sels = sels;
|
|
|
},
|
|
|
/**
|
|
|
* 批量删除功能
|
|
|
*/
|
|
|
batchRemove() {
|
|
|
var ids = this.sels.map(item => item.id).toString();
|
|
|
console.log(ids);
|
|
|
//弹框询问是否批量删除选中的车辆调度记录
|
|
|
this.$confirm('此操作永久删除选中的车辆信息, 是否继续?', '警告', {
|
|
|
confirmButtonText: '确定删除',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}
|
|
|
).then(() => {
|
|
|
//开启加载
|
|
|
this.listLoading = true;
|
|
|
let params = {ids: ids};
|
|
|
batchRemoveVehicleInfo(params).then(response => {
|
|
|
let res = response.data;
|
|
|
if (res.code !== '200') {
|
|
|
this.listLoading = false;
|
|
|
return this.$message.error('批量删除车辆信息,失败');
|
|
|
}
|
|
|
this.$message.success('批量删除车辆信息,成功!');
|
|
|
this.listLoading = false;
|
|
|
//刷新车辆信息列表
|
|
|
this.getVehicleInfoList();
|
|
|
}).catch(error => {
|
|
|
this.delLoading = false;
|
|
|
this.$message.error(error.toString());
|
|
|
});
|
|
|
}).catch(() => {
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
|
* 管理员端,编辑车辆信息
|
|
|
*/
|
|
|
editVehicleInfo() {
|
...
|
...
|
|