作者 王勇

修改列表框,样式

... ... @@ -46,27 +46,25 @@
</el-select>
</el-form-item>
</el-col>
<el-button type="primary" style="margin-left: 50px"
@click="getDispatchNodeList">查询调度记录
</el-button>
<el-button type="success" style="margin-left: 15px" @click="dispatchFormVisible = true">
我要调度车辆
</el-button>
<el-button type="primary" style="margin-left: 50px"
@click="getDispatchNodeList">查询调度记录
</el-button>
<el-button type="success" style="margin-left: 15px" @click="dispatchFormVisible = true">
我要调度车辆
</el-button>
</el-form-item>
</el-form>
<el-row style="margin-top: 20px;">
</el-row>
</div>
<!--调度记录列表区域-->
<div style="margin-top: 20px;">
<el-table :data="DispatchNoteList" stripe highlight-current-row v-loading="listLoading" element-loading-text="拼命加载中">
<el-table-column type="index"></el-table-column>
<el-table-column label="用户名称" prop="userName" width="100"></el-table-column>
<el-table-column label="联系方式" prop="userMobile" width="120"></el-table-column>
<el-table-column label="状态" prop="status" width="120">
<el-table :data="DispatchNoteList" border stripe highlight-current-row v-loading="listLoading"
element-loading-text="拼命加载中">
<el-table-column type="index" align="center"></el-table-column>
<el-table-column label="用户名称" prop="userName" align="center" width="100"></el-table-column>
<el-table-column label="联系方式" prop="userMobile" align="center" width="120"></el-table-column>
<el-table-column label="状态" prop="status" align="center" width="120">
<template slot-scope="scope">
<span v-if="scope.row.status ==='1'">完成状态</span>
<span v-if="scope.row.status ==='2'">执行状态</span>
... ... @@ -74,7 +72,7 @@
<span v-if="scope.row.status ==='4'">待执行状态</span>
</template>
</el-table-column>
<el-table-column label="业务类型" prop="dispatchType" width="120">
<el-table-column label="业务类型" prop="dispatchType" align="center" width="120">
<template slot-scope="scope">
<span v-if="scope.row.dispatchType ==='1'">进站送货</span>
<span v-if="scope.row.dispatchType ==='2'">出站提货</span>
... ... @@ -82,8 +80,9 @@
<span v-if="scope.row.dispatchType ==='4'">货物流转</span>
</template>
</el-table-column>
<el-table-column label="车牌号码" prop="licensePlateNumber" width="120"></el-table-column>
<el-table-column label="车辆类型" prop="vehicleType" width="120">
<el-table-column label="车牌号码" prop="licensePlateNumber" align="center"
width="120"></el-table-column>
<el-table-column label="车辆类型" prop="vehicleType" align="center" width="120">
<template slot-scope="scope">
<span v-if="scope.row.vehicleType ==='1'">重型货车</span>
<span v-if="scope.row.vehicleType ==='2'">中型货车</span>
... ... @@ -93,7 +92,7 @@
<span v-if="scope.row.vehicleType ==='6'">叉车</span>
</template>
</el-table-column>
<el-table-column label="场站位置" prop="station" width="120">
<el-table-column label="场站位置" prop="station" align="center" width="120">
<template slot-scope="scope">
<span v-if="scope.row.station ==='1'">西货站</span>
<span v-if="scope.row.station ==='2'">综保区</span>
... ... @@ -101,10 +100,10 @@
<span v-if="scope.row.station ==='4'">快邮</span>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="gmtCreate" width="160"></el-table-column>
<el-table-column label="开始时间" prop="beginTime" width="160"></el-table-column>
<el-table-column label="完成时间" prop="endTime" width="160"></el-table-column>
<el-table-column label="操作" width="220px" fixed="right">
<el-table-column label="创建时间" prop="gmtCreate" align="center" width="160"></el-table-column>
<el-table-column label="开始时间" prop="beginTime" align="center" width="160"></el-table-column>
<el-table-column label="完成时间" prop="endTime" align="center" width="160"></el-table-column>
<el-table-column label="操作" width="220px" fixed="right" align="center">
<template slot-scope="scope">
<!--查看按钮-->
<el-tooltip effect="dark" content="查看" placement="top-start" :enterable="false">
... ... @@ -115,7 +114,7 @@
<!--取消调度按钮-->
<el-tooltip effect="dark" content="取消调度" placement="top-start" :enterable="false">
<el-button type="danger" icon="el-icon-delete" size="mini"
:disabled="scope.row.endTime"
:disabled="scope.row.endTime!==''&&scope.row.endTime!==null"
@click="cancelDispatch(scope.row)" :loading="cancelLoading">取消调度
</el-button>
</el-tooltip>
... ... @@ -127,9 +126,9 @@
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryInfo.pageNum"
:page-sizes="[10,20,30,50]"
:page-size="queryInfo.pageSize"
:current-page="this.queryInfo.pageNum"
:page-sizes="[3,5,10,20,30,50]"
:page-size="this.queryInfo.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
</el-pagination>
... ... @@ -541,7 +540,7 @@
* 监听pageSize改变的事件
*/
handleSizeChange(newSize) {
this.queryInfo.pagesize = newSize;
this.queryInfo.pageSize = newSize;
//刷新调度记录列表
this.getDispatchNodeList();
},
... ... @@ -549,7 +548,7 @@
* 监听当前页码值改变的事件
*/
handleCurrentChange(newPage) {
this.queryInfo.pagenum = newPage;
this.queryInfo.pageNum = newPage;
//刷新调度记录列表
this.getDispatchNodeList();
},
... ... @@ -570,7 +569,7 @@
this.listLoading = false;
this.$message.error(error.toString());
});
if (res.code !== '200'){
if (res.code !== '200') {
this.listLoading = false;
return this.$message.error('获取车辆调度列表失败');
}
... ...
... ... @@ -61,11 +61,12 @@
</div>
<!--调度记录列表区域-->
<div style="margin-top: 20px;">
<el-table :data="DispatchNoteList" stripe v-loading="listLoading" element-loading-text="拼命加载中">
<el-table-column type="index"></el-table-column>
<el-table-column label="用户名称" prop="userName" width="100"></el-table-column>
<el-table-column label="联系方式" prop="userMobile" width="120"></el-table-column>
<el-table-column label="状态" prop="status" width="120">
<el-table :data="DispatchNoteList" border stripe v-loading="listLoading"
element-loading-text="拼命加载中">
<el-table-column type="index" align="center"></el-table-column>
<el-table-column label="用户名称" prop="userName" align="center" width="100"></el-table-column>
<el-table-column label="联系方式" prop="userMobile" align="center" width="120"></el-table-column>
<el-table-column label="状态" prop="status" align="center" width="120">
<template slot-scope="scope">
<span v-if="scope.row.status ==='1'">完成状态</span>
<span v-if="scope.row.status ==='2'">执行状态</span>
... ... @@ -73,7 +74,7 @@
<span v-if="scope.row.status ==='4'">待执行状态</span>
</template>
</el-table-column>
<el-table-column label="业务类型" prop="dispatchType" width="120">
<el-table-column label="业务类型" align="center" prop="dispatchType" width="120">
<template slot-scope="scope">
<span v-if="scope.row.dispatchType ==='1'">进站送货</span>
<span v-if="scope.row.dispatchType ==='2'">出站提货</span>
... ... @@ -81,9 +82,15 @@
<span v-if="scope.row.dispatchType ==='4'">货物流转</span>
</template>
</el-table-column>
<el-table-column label="创建时间" prop="gmtCreate" width="160"></el-table-column>
<el-table-column label="车牌号" prop="licensePlateNumber" width="120"></el-table-column>
<el-table-column label="车辆类型" prop="vehicleType" width="120">
<el-table-column label="场站位置" align="center" prop="station" width="120">
<template slot-scope="scope">
<span v-if="scope.row.station ==='1'">西货站</span>
<span v-if="scope.row.station ==='2'">综保区</span>
<span v-if="scope.row.station ==='3'">军投</span>
<span v-if="scope.row.station ==='4'">快邮</span>
</template>
</el-table-column>
<el-table-column label="车辆类型" align="center" prop="vehicleType" width="120">
<template slot-scope="scope">
<span v-if="scope.row.vehicleType ==='1'">重型货车</span>
<span v-if="scope.row.vehicleType ==='2'">中型货车</span>
... ... @@ -93,16 +100,11 @@
<span v-if="scope.row.vehicleType ==='6'">叉车</span>
</template>
</el-table-column>
<el-table-column label="场站位置" prop="station" width="120">
<template slot-scope="scope">
<span v-if="scope.row.station ==='1'">西货站</span>
<span v-if="scope.row.station ==='2'">综保区</span>
<span v-if="scope.row.station ==='3'">军投</span>
<span v-if="scope.row.station ==='4'">快邮</span>
</template>
</el-table-column>
<el-table-column label="开始时间" prop="beginTime" width="160"></el-table-column>
<el-table-column label="完成时间" prop="endTime" width="160"></el-table-column>
<el-table-column label="车牌号" prop="licensePlateNumber" align="center"
width="120"></el-table-column>
<el-table-column label="创建时间" prop="gmtCreate" align="center" width="160"></el-table-column>
<el-table-column label="开始时间" prop="beginTime" align="center" width="160"></el-table-column>
<el-table-column label="完成时间" prop="endTime" align="center" width="160"></el-table-column>
<el-table-column label="操作" width="230px" align="center" fixed="right">
<template slot-scope="scope">
<!--编辑按钮-->
... ... @@ -124,8 +126,8 @@
<el-tooltip effect="dark" content="开始任务" placement="top-start" :enterable="false"
style="margin-left: 1px;">
<el-button type="warning" icon="el-icon-star-off" size="mini"
style="margin-top: 1px;"
:disabled="scope.row.beginTime || scope.row.endTime"
style="margin-top: 3px;"
:disabled="scope.row.beginTime!=='' || scope.row.endTime!==''"
:loading="beginLoading"
@click="startDispatch(scope.$index,scope.row)">开始任务
</el-button>
... ... @@ -134,7 +136,7 @@
<el-tooltip effect="dark" content="结束任务" placement="top-start" :enterable="false"
style="margin-left: 1px;">
<el-button type="info" icon="el-icon-message" size="mini"
:disabled="scope.row.endTime"
:disabled="scope.row.endTime!==''&&scope.row.endTime!==null"
:loading="endLoading"
@click="completeDispatch(scope.$index,scope.row)">结束任务
</el-button>
... ... @@ -149,7 +151,7 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryInfo.pageNum"
:page-sizes="[10,20,30,50]"
:page-sizes="[10,15,20,50]"
:page-size="queryInfo.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
... ... @@ -728,9 +730,9 @@
/**
* 管理员端,手动,开始调度任务
*/
async startDispatch(index,row) {
async startDispatch(index, row) {
//开启加载
this.beginLoading=true;
this.beginLoading = true;
const {data: res} = await startTask(row).catch(error => {
this.beginLoading = false;
this.$message.error(error.toString());
... ... @@ -747,7 +749,7 @@
/**
* 管理员端,手动,完成调度任务
*/
async completeDispatch(index,row) {
async completeDispatch(index, row) {
//开启加载
this.endLoading = true;
const {data: res} = await completeTask(row).catch(error => {
... ... @@ -775,13 +777,13 @@
},
//监听pageSize改变的事件
handleSizeChange(newSize) {
this.queryInfo.pagesize = newSize;
this.queryInfo.pageSize = newSize;
//刷新车辆调度记录列表
this.getDispatchNodeList();
},
//监听当前页码值改变的事件
handleCurrentChange(newPage) {
this.queryInfo.pagenum = newPage;
this.queryInfo.pageNum = newPage;
//刷新车辆调度记录列表
this.getDispatchNodeList();
},
... ...
... ... @@ -90,7 +90,7 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryInfo.pageNum"
:page-sizes="[10,20,30,50]"
:page-sizes="[1,2,10,20,30,50]"
:page-size="queryInfo.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
... ... @@ -541,7 +541,7 @@
* 监听pageSize改变的事件
*/
handleSizeChange(newSize) {
this.queryInfo.pagesize = newSize;
this.queryInfo.pageSize = newSize;
//刷新驾驶员信息列表
this.getDriverInfoList();
},
... ... @@ -549,7 +549,7 @@
* 监听当前页码值改变的事件
*/
handleCurrentChange(newPage) {
this.queryInfo.pagenum = newPage;
this.queryInfo.pageNum = newPage;
//刷新驾驶员信息列表
this.getDriverInfoList();
},
... ...
... ... @@ -105,7 +105,7 @@
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="queryInfo.pageNum"
:page-sizes="[10,20,30,50]"
:page-sizes="[3,6,10,20,30,50]"
:page-size="queryInfo.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="total">
... ... @@ -575,7 +575,7 @@
* 监听pageSize改变的事件
*/
handleSizeChange(newSize) {
this.queryInfo.pagesize = newSize;
this.queryInfo.pageSize = newSize;
//刷新车辆信息列表
this.getVehicleInfoList();
... ... @@ -584,7 +584,7 @@
* 监听当前页码值改变的事件
*/
handleCurrentChange(newPage) {
this.queryInfo.pagenum = newPage;
this.queryInfo.pageNum = newPage;
//刷新车辆信息列表
this.getVehicleInfoList();
},
... ...
... ... @@ -41,11 +41,11 @@
</el-table-column>
<el-table-column prop="mqcode" label="海关通道编号" min-width="150" >
</el-table-column>
<el-table-column label="操作" min-width="260">
<el-table-column label="操作" min-width="230" fixed="right" align="center">
<template slot-scope="scope">
<el-button type="primary" size="small" @click="handleAdd(scope.$index, scope.row)">新增下级</el-button>
<el-button type="primary" size="small" @click="handleAdd(scope.$index, scope.row)">新增下级</el-button>
<el-button size="small" @click="setPerm(scope.$index, scope.row)">设置权限</el-button>
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button style="margin-top: 5px;" size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button type="danger" size="small" @click="handleDel(scope.$index, scope.row)">删除</el-button>
</template>
</el-table-column>
... ... @@ -563,4 +563,4 @@
<style scoped>
</style>
\ No newline at end of file
</style>
... ...
... ... @@ -45,7 +45,7 @@
</el-table-column>
<el-table-column prop="state" label="启用" width="100" :formatter="formatState" sortable>
</el-table-column>
<el-table-column label="操作" width="250">
<el-table-column label="操作" width="250" fixed="right" align="center">
<template slot-scope="scope">
<el-button size="small" @click="roleEdit(scope.$index, scope.row)">角色配置</el-button>
<el-button size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
... ...