From 6060a36d92b8bacd23125e1b7f43a620f8ce949a Mon Sep 17 00:00:00 2001 From: zhouxueli <2841188632@qq.com> Date: Wed, 23 Aug 2023 14:29:44 +0800 Subject: [PATCH] =?UTF-8?q?token=E9=97=AE=E9=A2=98=E4=BD=BF=E7=94=A8sotora?= =?UTF-8?q?ge=E6=96=B9=E5=BC=8F=E5=AD=98=E5=82=A8=E5=92=8C=E8=AF=BB?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/index/driverAdd.vue | 7 ------- src/views/index/driverManage.vue | 3 +-- src/views/index/vehicleAdd.vue | 20 +------------------- src/views/index/vehicleManage.vue | 25 +++++++++---------------- 4 files changed, 11 insertions(+), 44 deletions(-) diff --git a/src/views/index/driverAdd.vue b/src/views/index/driverAdd.vue index b41c4fbb..91c1ddda 100644 --- a/src/views/index/driverAdd.vue +++ b/src/views/index/driverAdd.vue @@ -101,12 +101,9 @@ export default { }, methods:{ isUse(e){ - console.log("是否启用",e) this.states=e }, async submitBtn(){ - this.$toast(1111) - try { let res = await saveDriver({ driverId:this.id ? this.id : '', driverName:this.driverName , @@ -127,16 +124,12 @@ export default { this.$router.back(); },2000) } - }catch (e){ - this.$toast(JSON.stringify(e), "eeeeeeee") - } }, cancelBtn(){//取消 this.$router.back() }, validatePhoneNumber() { const phoneNumberRegex = /^1[0-9]{10}$/; - if (!phoneNumberRegex.test(this.driverPhone)) { this.phoneNumberError = true; this.phoneNumberErrorMessage = '电话号码格式不正确,请输入有效的11位手机号码。'; diff --git a/src/views/index/driverManage.vue b/src/views/index/driverManage.vue index a2c1d7cf..ed316482 100644 --- a/src/views/index/driverManage.vue +++ b/src/views/index/driverManage.vue @@ -98,7 +98,7 @@ export default { await this.getDriverList(); setTimeout(()=>{ this.$toast('操作成功') - },) + },2000) console.log("item",res) }, updateDriver(item){ @@ -120,7 +120,6 @@ export default { if(num <= this.pageNum){ // console.log("不在加载数据") }else{ - console.log("111111111111") this.pageNum++; await this.getDriverList() } diff --git a/src/views/index/vehicleAdd.vue b/src/views/index/vehicleAdd.vue index 5fc5b64b..953076a1 100644 --- a/src/views/index/vehicleAdd.vue +++ b/src/views/index/vehicleAdd.vue @@ -12,7 +12,7 @@ />
- +
@@ -182,29 +182,18 @@ export default { } }, change(e) { - // console.log("拖车服务",e) this.trailerService=e }, change2(e) { - // console.log("小修服务",e) this.smallRepairService=e }, isChange(e){ - // console.log("是否参与",e) this.isJoin=e }, cancelBtn(){//取消车辆 this.$router.back() }, async submitBtn(){ - this.$toast(JSON.stringify({ - vehicleId:this.id ? this.id : '', - plateNumber:this.carNum ? this.carNum :'', - vehicleType:this.selectedOption ? this.selectedOption : '', - hasPolymerization:Number(this.isJoin ? this.isJoin : '') , - serviceIds:this.serviceIds ? this.serviceIds : [] - })) - console.log("提交车辆"); let res=await saveVehicle({ vehicleId:this.id ? this.id : '', plateNumber:this.carNum ? this.carNum :'', @@ -219,17 +208,10 @@ export default { }else{ this.$toast('添加成功') } - setTimeout(()=>{ this.$router.back(); },2000) - }else{ - this.$toast(res.msg) } - console.log("res",res) - }, - getPLateNum(e){ - console.log("e",e) }, }, components:{ diff --git a/src/views/index/vehicleManage.vue b/src/views/index/vehicleManage.vue index d85586af..b48b0f5f 100644 --- a/src/views/index/vehicleManage.vue +++ b/src/views/index/vehicleManage.vue @@ -53,25 +53,13 @@ export default { pageSize:10, total:'', loading:false, - items: [], // 当前页数 - token:'', } }, mounted() { - // this.$toast('window.location'+window.location) this.getVehicleList(); }, methods:{ - updateVehicle(item){ - this.$router.push({ - name:'vehicleAdd', - params:{ - // token:this.token, - id:item.vehicleId - } - }) - }, - async getVehicleList(){ + async getVehicleList(){ let result = await supplierVehicleList({ pageNum:this.pageNum, pageSize:this.pageSize @@ -98,10 +86,16 @@ export default { if(result.code === 200){ this.$toast('删除成功'); await this.getVehicleList(); - }else{ - this.$toast(result.msg) } }, + updateVehicle(item){//修改 + this.$router.push({ + name:'vehicleAdd', + params:{ + id:item.vehicleId + } + }) + }, async handleScroll(){ let num = Math.ceil( this.total / 10) if(num <= this.pageNum){ @@ -109,7 +103,6 @@ export default { }else{ this.pageNum++; await this.getVehicleList() - // console.log("111111111111") } },