车辆管理,司机管理代码优化
This commit is contained in:
@@ -83,7 +83,6 @@ export default {
|
||||
mounted() {
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
this.supplierType = urlParams.get('supplierType');
|
||||
// this.$toast('页面supplierType:'+this.supplierType)
|
||||
this.getDriverList()
|
||||
},
|
||||
methods:{
|
||||
@@ -105,7 +104,6 @@ export default {
|
||||
}, 1000);
|
||||
},
|
||||
addDriver(){
|
||||
// this.$toast('supplierType的值为:'+this.supplierType)
|
||||
if(this.supplierType == 1){
|
||||
this.$toast("无权添加")
|
||||
}else{
|
||||
@@ -136,16 +134,12 @@ export default {
|
||||
}else{
|
||||
this.states = 0
|
||||
}
|
||||
let res = await enableAction({
|
||||
await enableAction({
|
||||
driverId:item.driverId,
|
||||
states:this.states
|
||||
})
|
||||
|
||||
this.pageNum = 1;
|
||||
await this.getDriverList();
|
||||
// setTimeout(()=>{
|
||||
// this.$toast('操作成功')
|
||||
// },2000)
|
||||
console.log("item",res)
|
||||
},
|
||||
updateDriver(item){
|
||||
// 在当前组件中进行路由跳转并传递参数对象
|
||||
@@ -163,16 +157,6 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
// async handleScroll(){
|
||||
// let num = Math.ceil( this.total / 10)
|
||||
// if(num <= this.pageNum){
|
||||
// // console.log("不在加载数据")
|
||||
// }else{
|
||||
// this.pageNum++;
|
||||
// await this.getDriverList()
|
||||
// }
|
||||
// },
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -183,8 +167,7 @@ export default {
|
||||
|
||||
.wrap {
|
||||
background: #F4F5F7;
|
||||
box-sizing: border-box;
|
||||
padding: 13px;
|
||||
@include sizingPadding(13px,13px);
|
||||
@include wh(100%, 100%);
|
||||
overflow-y: auto;
|
||||
}
|
||||
@@ -195,53 +178,43 @@ export default {
|
||||
border-radius: 10px;
|
||||
opacity: 0.7;
|
||||
border: 1px solid #FFFFFF;
|
||||
@include flexCenter;
|
||||
justify-content: center;
|
||||
@include flexTwoCenter;
|
||||
img{
|
||||
@include widHeiMar(9px,8px,4px);
|
||||
}
|
||||
.addTxt{
|
||||
@include fontWeightSize(bolder,11px);
|
||||
opacity: .7;
|
||||
color: #FFFFFF;
|
||||
@include colorOpa( #FFFFFF,0.7);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.itemWrap {
|
||||
@include wh(100%, 104px);
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 2px 10px 0px rgba(216, 216, 216, 0.5);
|
||||
border-radius: 6px;
|
||||
margin-bottom: 10px;
|
||||
box-sizing: border-box;
|
||||
padding: 11px 13px 9px 15px;
|
||||
@include radiusSizing(6px);
|
||||
@include fontWeightSize(400, 12px);
|
||||
@include flexBetween;
|
||||
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 2px 10px 0px rgba(216, 216, 216, 0.5);
|
||||
margin-bottom: 10px;
|
||||
padding: 11px 13px 9px 15px;
|
||||
.halfOpci {
|
||||
opacity: .5;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.allOpci {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.statusNo {
|
||||
color: #FF0000;
|
||||
}
|
||||
|
||||
.statusYes {
|
||||
color: #09B820
|
||||
}
|
||||
}
|
||||
|
||||
.name-status {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@include flexColBet;
|
||||
.namephone {
|
||||
@include fontWeightSize(bold, 14px)
|
||||
}
|
||||
@@ -250,26 +223,19 @@ export default {
|
||||
display: flex;
|
||||
button {
|
||||
border: none;
|
||||
//width: 48px;
|
||||
//padding: 2px;
|
||||
//@include all-height(20px);
|
||||
padding: 4px 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-radius: 3px;
|
||||
@include flexTwoCenter;
|
||||
@include fontWeightSize(bold, 12px)
|
||||
}
|
||||
|
||||
.del {
|
||||
border: 1px solid #DDDDDD;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
|
||||
.revise {
|
||||
color: #FFFFFF;
|
||||
@include bgFontColor( #FFFFFF,#354D93);
|
||||
margin-left: 15px;
|
||||
background: #354D93;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user