From 681f3cf93c805f78d58addbe62fef0f322a82944 Mon Sep 17 00:00:00 2001 From: huangyuxuan Date: Mon, 20 Jan 2025 17:09:37 +0800 Subject: [PATCH] =?UTF-8?q?[=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D](hyx=5F?= =?UTF-8?q?=E9=97=A8=E5=8F=A3=E9=97=A8=E7=A6=81):=20=20=20-=20bug=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/carList.vue | 158 ++++++------ .../longCarPort/CarInfo/components/list.vue | 234 +++++++++++++++--- .../personPortInfo/PersonInfo/index.vue | 5 +- 3 files changed, 298 insertions(+), 99 deletions(-) diff --git a/src/views/firstLevelDoor/freightVehiclesPort/freightVehicleMaintenance/components/carList.vue b/src/views/firstLevelDoor/freightVehiclesPort/freightVehicleMaintenance/components/carList.vue index d92cb6d..794eae1 100644 --- a/src/views/firstLevelDoor/freightVehiclesPort/freightVehicleMaintenance/components/carList.vue +++ b/src/views/firstLevelDoor/freightVehiclesPort/freightVehicleMaintenance/components/carList.vue @@ -9,7 +9,8 @@ - 搜索 + 搜索 + 重置 @@ -34,7 +35,7 @@ type="selection" width="55" align="center"/> - + @@ -59,15 +60,17 @@ 新增
- +
- - - + + + - + - + - + - + - - + + - + - - + + - + + - + + - + + - + + - - - + + + - + - + - + - + - - + + - + - - + + - + + - + + - + + - + + import Pagination from '@/components/Pagination' // 通过 el-pagination二次打包 -import { requestFN } from '@/utils/request' +import {requestFN} from '@/utils/request' import SelectTree from '@/components/SelectTree' -export default{ - components: { Pagination, SelectTree}, + +export default { + components: {Pagination, SelectTree}, data() { return { listQuery: { @@ -330,22 +344,22 @@ export default{ }, // 车牌类型列表 licenceTypeList: [ - { ID: '0', NAME: '白牌' }, - { ID: '1', NAME: '蓝牌' }, - { ID: '2', NAME: '黄牌' }, - { ID: '3', NAME: '绿牌' }, - { ID: '4', NAME: '黑牌' } + {ID: '0', NAME: '白牌'}, + {ID: '1', NAME: '蓝牌'}, + {ID: '2', NAME: '黄牌'}, + {ID: '3', NAME: '绿牌'}, + {ID: '4', NAME: '黑牌'} ], // 车辆类型列表 vehicleTypeList: [ // { ID: '', NAME: '请选择' }, - { ID: '0', NAME: '货车' }, - { ID: '1', NAME: '轿车' }, - { ID: '2', NAME: '大巴客车' } + {ID: '0', NAME: '货车'}, + {ID: '1', NAME: '轿车'}, + {ID: '2', NAME: '大巴客车'} ], DANGEROUS_CAR_LIST: [ - { ID: '0', NAME: '否' }, - { ID: '1', NAME: '是' }, + {ID: '0', NAME: '否'}, + {ID: '1', NAME: '是'}, ], // 车辆下拉树默认属性 vehicleDefaultProps: { @@ -439,7 +453,7 @@ export default{ this.ISCHECK = false }, reSetAddDialog() { - this.addForm.VEHICLE_ID = '', + this.addForm.VEHICLE_ID = '', this.addForm.LICENCE_NO = '', this.addForm.LICENCE_TYPE = '', this.addForm.VEHICLE_TYPE = '', @@ -480,18 +494,24 @@ export default{ this.addDialogVisible = false; }, addDialogConfirmBtn() { - requestFN( - '/mkmj/management/carInfoMaintenance' , - this.addForm - ).then((data) => { - this.addDialogVisible = false - this.reSetAddDialog() - this.getList() - }).catch((e) => { - this.addDialogVisible = false + this.$refs.addForm.validate(valid => { + if (valid) { + requestFN( + '/mkmj/management/carInfoMaintenance', + this.addForm + ).then((data) => { + this.addDialogVisible = false + this.reSetAddDialog() + this.getList() + }).catch((e) => { + this.addDialogVisible = false + }) + } else { + return false + } }) }, - goDelete(row){ + goDelete(row) { this.$confirm('确定要删除吗?', { confirmButtonText: '确定', cancelButtonText: '取消', @@ -500,7 +520,7 @@ export default{ requestFN( '/mkmj/management/deleteCarInfo', { - VEHICLE_ID : row.VEHICLE_ID + VEHICLE_ID: row.VEHICLE_ID } ).then((data) => { this.listLoading = false @@ -511,16 +531,16 @@ export default{ }).catch(() => { }) }, - goEdit(row){ + goEdit(row) { this.editDialogVisible = true - this.addForm = { ...row }; + this.addForm = {...row}; }, - editDialogCancelBtn(){ + editDialogCancelBtn() { this.editDialogVisible = false }, - editDialogConfirmBtn(){ + editDialogConfirmBtn() { requestFN( - '/mkmj/management/carInfoMaintenance' , + '/mkmj/management/carInfoMaintenance', this.addForm ).then((data) => { this.editDialogVisible = false @@ -530,7 +550,7 @@ export default{ this.editDialogVisible = false }) }, - goBack(){ + goBack() { this.$parent.activeName = 'List' } } diff --git a/src/views/firstLevelDoor/longCarPort/CarInfo/components/list.vue b/src/views/firstLevelDoor/longCarPort/CarInfo/components/list.vue index 23d619e..75d7011 100644 --- a/src/views/firstLevelDoor/longCarPort/CarInfo/components/list.vue +++ b/src/views/firstLevelDoor/longCarPort/CarInfo/components/list.vue @@ -99,7 +99,9 @@ @@ -110,12 +112,11 @@
- - - + + + - - + - - + - + - + @@ -159,14 +159,14 @@ - + - + 确 定 + + + + + + + + + + 关闭 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +