Commit 1d33ddab4f1bb3afbb7dd6aa839d1f5618abd5af
1 parent
6d21390a
开发完成车辆详情页面
Showing
12 changed files
with
227 additions
and
215 deletions
src/api/car/carDetailTransactionCarApi.js
| @@ -8,11 +8,8 @@ export function getMachineTranslates(params) { | @@ -8,11 +8,8 @@ export function getMachineTranslates(params) { | ||
| 8 | params | 8 | params |
| 9 | }).then(response => { | 9 | }).then(response => { |
| 10 | const res = response.data | 10 | const res = response.data |
| 11 | - if (res.code === 0) { | ||
| 12 | resolve(res) | 11 | resolve(res) |
| 13 | - } else { | ||
| 14 | - reject(new Error(res.msg || '获取同步记录失败')) | ||
| 15 | - } | 12 | + |
| 16 | }).catch(error => { | 13 | }).catch(error => { |
| 17 | reject(error) | 14 | reject(error) |
| 18 | }) | 15 | }) |
src/api/owner/ownerDetailRoomApi.js
| @@ -8,11 +8,7 @@ export function queryRoomsByOwner(params) { | @@ -8,11 +8,7 @@ export function queryRoomsByOwner(params) { | ||
| 8 | params | 8 | params |
| 9 | }).then(response => { | 9 | }).then(response => { |
| 10 | const res = response.data | 10 | const res = response.data |
| 11 | - if (res.code === 0) { | ||
| 12 | resolve(res) | 11 | resolve(res) |
| 13 | - } else { | ||
| 14 | - reject(new Error(res.msg || 'Failed to query rooms by owner')) | ||
| 15 | - } | ||
| 16 | }).catch(error => { | 12 | }).catch(error => { |
| 17 | reject(error) | 13 | reject(error) |
| 18 | }) | 14 | }) |
src/components/car/addCarModal.vue
| 1 | <template> | 1 | <template> |
| 2 | <el-dialog :title="$t('addCarModal.addCar')" :visible.sync="visible" width="50%"> | 2 | <el-dialog :title="$t('addCarModal.addCar')" :visible.sync="visible" width="50%"> |
| 3 | <el-form :model="addCarModelInfo" :rules="rules" ref="addCarForm"> | 3 | <el-form :model="addCarModelInfo" :rules="rules" ref="addCarForm"> |
| 4 | - <el-form-item :label="$t('addCarModal.licensePlate')" prop="carNum"> | ||
| 5 | - <el-input v-model="addCarModelInfo.carNum" :placeholder="$t('addCarModal.licensePlateRequired')"></el-input> | 4 | + <el-form-item :label="$t('listOwnerCar.carNum')" prop="carNum"> |
| 5 | + <el-input v-model="addCarModelInfo.carNum" :placeholder="$t('listOwnerCar.carNum')"></el-input> | ||
| 6 | </el-form-item> | 6 | </el-form-item> |
| 7 | - <el-form-item :label="$t('addCarModal.carBrand')" prop="carBrand"> | ||
| 8 | - <el-input v-model="addCarModelInfo.carBrand" :placeholder="$t('addCarModal.carBrandRequired')"></el-input> | 7 | + <el-form-item :label="$t('listOwnerCar.carBrand')" prop="carBrand"> |
| 8 | + <el-input v-model="addCarModelInfo.carBrand" :placeholder="$t('listOwnerCar.carBrand')"></el-input> | ||
| 9 | </el-form-item> | 9 | </el-form-item> |
| 10 | - <el-form-item :label="$t('addCarModal.carType')" prop="carType"> | ||
| 11 | - <el-select v-model="addCarModelInfo.carType" :placeholder="$t('addCarModal.carTypeRequired')" | 10 | + <el-form-item :label="$t('listOwnerCar.carType')" prop="carType"> |
| 11 | + <el-select v-model="addCarModelInfo.carType" :placeholder="$t('listOwnerCar.carType')" | ||
| 12 | style="width:100%"> | 12 | style="width:100%"> |
| 13 | <el-option v-for="carType in carTypes" :key="carType.statusCd" :label="carType.name" | 13 | <el-option v-for="carType in carTypes" :key="carType.statusCd" :label="carType.name" |
| 14 | :value="carType.statusCd"></el-option> | 14 | :value="carType.statusCd"></el-option> |
| 15 | </el-select> | 15 | </el-select> |
| 16 | </el-form-item> | 16 | </el-form-item> |
| 17 | - <el-form-item :label="$t('addCarModal.color')" prop="carColor"> | ||
| 18 | - <el-input v-model="addCarModelInfo.carColor" :placeholder="$t('addCarModal.colorRequired')"></el-input> | 17 | + <el-form-item :label="$t('listOwnerCar.color')" prop="carColor"> |
| 18 | + <el-input v-model="addCarModelInfo.carColor" :placeholder="$t('listOwnerCar.carColor')"></el-input> | ||
| 19 | </el-form-item> | 19 | </el-form-item> |
| 20 | - <el-form-item :label="$t('addCarModal.remark')"> | ||
| 21 | - <el-input type="textarea" v-model="addCarModelInfo.remark" :placeholder="$t('addCarModal.remarkPlaceholder')" | 20 | + <el-form-item :label="$t('listOwnerCar.remark')"> |
| 21 | + <el-input type="textarea" v-model="addCarModelInfo.remark" :placeholder="$t('listOwnerCar.remark')" | ||
| 22 | rows="3"></el-input> | 22 | rows="3"></el-input> |
| 23 | </el-form-item> | 23 | </el-form-item> |
| 24 | </el-form> | 24 | </el-form> |
src/components/car/carDetailApplyParkingSpace.vue
| @@ -3,49 +3,59 @@ | @@ -3,49 +3,59 @@ | ||
| 3 | <el-row> | 3 | <el-row> |
| 4 | <el-col :span="24" class="text-right"> | 4 | <el-col :span="24" class="text-right"> |
| 5 | <el-button type="primary" size="small" @click="_openAddParkingSpaceApplyModal"> | 5 | <el-button type="primary" size="small" @click="_openAddParkingSpaceApplyModal"> |
| 6 | - {{$t('carDetailApplyParkingSpace.applyParkingSpace')}} | 6 | + {{ $t('carDetailApplyParkingSpace.applyParkingSpace') }} |
| 7 | </el-button> | 7 | </el-button> |
| 8 | </el-col> | 8 | </el-col> |
| 9 | </el-row> | 9 | </el-row> |
| 10 | 10 | ||
| 11 | <div class="margin-top"> | 11 | <div class="margin-top"> |
| 12 | <el-table :data="carDetailApplyParkingSpaceInfo.parkingSpaceApplys" border style="width: 100%"> | 12 | <el-table :data="carDetailApplyParkingSpaceInfo.parkingSpaceApplys" border style="width: 100%"> |
| 13 | - <el-table-column prop="applyId" :label="$t('carDetailApplyParkingSpace.applyId')" align="center"></el-table-column> | ||
| 14 | - <el-table-column prop="carNum" :label="$t('carDetailApplyParkingSpace.carNum')" align="center"></el-table-column> | 13 | + <el-table-column prop="applyId" :label="$t('carDetailApplyParkingSpace.applyId')" |
| 14 | + align="center"></el-table-column> | ||
| 15 | + <el-table-column prop="carNum" :label="$t('carDetailApplyParkingSpace.carNum')" | ||
| 16 | + align="center"></el-table-column> | ||
| 15 | <el-table-column :label="$t('carDetailApplyParkingSpace.parkingSpace')" align="center"> | 17 | <el-table-column :label="$t('carDetailApplyParkingSpace.parkingSpace')" align="center"> |
| 16 | <template slot-scope="scope"> | 18 | <template slot-scope="scope"> |
| 17 | - {{scope.row.psId ? `${scope.row.areaNum}停车场 - ${scope.row.num}停车位` : $t('carDetailApplyParkingSpace.none')}} | 19 | + {{ scope.row.psId ? `${scope.row.areaNum}停车场 - ${scope.row.num}停车位` : $t('carDetailApplyParkingSpace.none') }} |
| 18 | </template> | 20 | </template> |
| 19 | </el-table-column> | 21 | </el-table-column> |
| 20 | - <el-table-column prop="carBrand" :label="$t('carDetailApplyParkingSpace.carBrand')" align="center"></el-table-column> | 22 | + <el-table-column prop="carBrand" :label="$t('carDetailApplyParkingSpace.carBrand')" |
| 23 | + align="center"></el-table-column> | ||
| 21 | <el-table-column :label="$t('carDetailApplyParkingSpace.carType')" align="center"> | 24 | <el-table-column :label="$t('carDetailApplyParkingSpace.carType')" align="center"> |
| 22 | <template slot-scope="scope"> | 25 | <template slot-scope="scope"> |
| 23 | - {{_getParkingSpaceApplyCatType(scope.row.carType)}} | 26 | + {{ _getParkingSpaceApplyCatType(scope.row.carType) }} |
| 24 | </template> | 27 | </template> |
| 25 | </el-table-column> | 28 | </el-table-column> |
| 26 | - <el-table-column prop="carColor" :label="$t('carDetailApplyParkingSpace.color')" align="center"></el-table-column> | ||
| 27 | - <el-table-column prop="startTime" :label="$t('carDetailApplyParkingSpace.startTime')" align="center"></el-table-column> | ||
| 28 | - <el-table-column prop="endTime" :label="$t('carDetailApplyParkingSpace.endTime')" align="center"></el-table-column> | ||
| 29 | - <el-table-column prop="applyPersonName" :label="$t('carDetailApplyParkingSpace.applicant')" align="center"></el-table-column> | ||
| 30 | - <el-table-column prop="applyPersonLink" :label="$t('carDetailApplyParkingSpace.phone')" align="center"></el-table-column> | 29 | + <el-table-column prop="carColor" :label="$t('carDetailApplyParkingSpace.color')" |
| 30 | + align="center"></el-table-column> | ||
| 31 | + <el-table-column prop="startTime" :label="$t('carDetailApplyParkingSpace.startTime')" | ||
| 32 | + align="center"></el-table-column> | ||
| 33 | + <el-table-column prop="endTime" :label="$t('carDetailApplyParkingSpace.endTime')" | ||
| 34 | + align="center"></el-table-column> | ||
| 35 | + <el-table-column prop="applyPersonName" :label="$t('carDetailApplyParkingSpace.applicant')" | ||
| 36 | + align="center"></el-table-column> | ||
| 37 | + <el-table-column prop="applyPersonLink" :label="$t('carDetailApplyParkingSpace.phone')" | ||
| 38 | + align="center"></el-table-column> | ||
| 31 | <el-table-column :label="$t('carDetailApplyParkingSpace.auditResult')" align="center"> | 39 | <el-table-column :label="$t('carDetailApplyParkingSpace.auditResult')" align="center"> |
| 32 | <template slot-scope="scope"> | 40 | <template slot-scope="scope"> |
| 33 | <el-tag :type="getStateTagType(scope.row.state)"> | 41 | <el-tag :type="getStateTagType(scope.row.state)"> |
| 34 | - {{_getParkingSpaceApplyState(scope.row.state)}} | 42 | + {{ _getParkingSpaceApplyState(scope.row.state) }} |
| 35 | </el-tag> | 43 | </el-tag> |
| 36 | </template> | 44 | </template> |
| 37 | </el-table-column> | 45 | </el-table-column> |
| 38 | <el-table-column :label="$t('carDetailApplyParkingSpace.operation')" align="center"> | 46 | <el-table-column :label="$t('carDetailApplyParkingSpace.operation')" align="center"> |
| 39 | <template slot-scope="scope"> | 47 | <template slot-scope="scope"> |
| 40 | <el-button-group> | 48 | <el-button-group> |
| 41 | - <el-button v-if="scope.row.state == '1001'" size="mini" @click="_openAuditParkingSpaceApplyModal(scope.row)"> | ||
| 42 | - {{$t('carDetailApplyParkingSpace.audit')}} | 49 | + <el-button v-if="scope.row.state == '1001'" size="mini" |
| 50 | + @click="_openAuditParkingSpaceApplyModal(scope.row)"> | ||
| 51 | + {{ $t('carDetailApplyParkingSpace.audit') }} | ||
| 43 | </el-button> | 52 | </el-button> |
| 44 | - <el-button v-if="scope.row.state == '1001'" size="mini" @click="_openEditParkingSpaceApplyModel(scope.row)"> | ||
| 45 | - {{$t('carDetailApplyParkingSpace.edit')}} | 53 | + <el-button v-if="scope.row.state == '1001'" size="mini" |
| 54 | + @click="_openEditParkingSpaceApplyModel(scope.row)"> | ||
| 55 | + {{ $t('carDetailApplyParkingSpace.edit') }} | ||
| 46 | </el-button> | 56 | </el-button> |
| 47 | <el-button size="mini" @click="_openDeleteParkingSpaceApplyModel(scope.row)"> | 57 | <el-button size="mini" @click="_openDeleteParkingSpaceApplyModel(scope.row)"> |
| 48 | - {{$t('carDetailApplyParkingSpace.delete')}} | 58 | + {{ $t('carDetailApplyParkingSpace.delete') }} |
| 49 | </el-button> | 59 | </el-button> |
| 50 | </el-button-group> | 60 | </el-button-group> |
| 51 | </template> | 61 | </template> |
| @@ -54,17 +64,13 @@ | @@ -54,17 +64,13 @@ | ||
| 54 | 64 | ||
| 55 | <el-row> | 65 | <el-row> |
| 56 | <el-col :span="16" :offset="8"> | 66 | <el-col :span="16" :offset="8"> |
| 57 | - <el-pagination | ||
| 58 | - @current-change="handleCurrentChange" | ||
| 59 | - :current-page="currentPage" | ||
| 60 | - :page-size="pageSize" | ||
| 61 | - layout="total, prev, pager, next, jumper" | ||
| 62 | - :total="total"> | 67 | + <el-pagination @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize" |
| 68 | + layout="total, prev, pager, next, jumper" :total="total"> | ||
| 63 | </el-pagination> | 69 | </el-pagination> |
| 64 | </el-col> | 70 | </el-col> |
| 65 | </el-row> | 71 | </el-row> |
| 66 | </div> | 72 | </div> |
| 67 | - | 73 | + |
| 68 | <edit-parking-space-apply ref="editParkingSpaceApply"></edit-parking-space-apply> | 74 | <edit-parking-space-apply ref="editParkingSpaceApply"></edit-parking-space-apply> |
| 69 | <delete-parking-space-apply ref="deleteParkingSpaceApply"></delete-parking-space-apply> | 75 | <delete-parking-space-apply ref="deleteParkingSpaceApply"></delete-parking-space-apply> |
| 70 | </div> | 76 | </div> |
| @@ -74,6 +80,7 @@ | @@ -74,6 +80,7 @@ | ||
| 74 | import { listParkingSpaceApply } from '@/api/car/carDetailApplyParkingSpaceApi' | 80 | import { listParkingSpaceApply } from '@/api/car/carDetailApplyParkingSpaceApi' |
| 75 | import EditParkingSpaceApply from '@/components/property/editParkingSpaceApply' | 81 | import EditParkingSpaceApply from '@/components/property/editParkingSpaceApply' |
| 76 | import DeleteParkingSpaceApply from '@/components/property/deleteParkingSpaceApply' | 82 | import DeleteParkingSpaceApply from '@/components/property/deleteParkingSpaceApply' |
| 83 | +import { getCommunityId } from '@/api/community/communityApi' | ||
| 77 | 84 | ||
| 78 | export default { | 85 | export default { |
| 79 | name: 'CarDetailApplyParkingSpace', | 86 | name: 'CarDetailApplyParkingSpace', |
| @@ -95,6 +102,12 @@ export default { | @@ -95,6 +102,12 @@ export default { | ||
| 95 | } | 102 | } |
| 96 | }, | 103 | }, |
| 97 | methods: { | 104 | methods: { |
| 105 | + open(data) { | ||
| 106 | + this.carDetailApplyParkingSpaceInfo.carId = data.carId | ||
| 107 | + this.carDetailApplyParkingSpaceInfo.carNum = data.carNum | ||
| 108 | + this.carDetailApplyParkingSpaceInfo.memberId = data.memberId | ||
| 109 | + this._loadCarDetailApplyParkingSpaceData(this.currentPage, this.pageSize) | ||
| 110 | + }, | ||
| 98 | switch(data) { | 111 | switch(data) { |
| 99 | this.carDetailApplyParkingSpaceInfo.carId = data.carId | 112 | this.carDetailApplyParkingSpaceInfo.carId = data.carId |
| 100 | this.carDetailApplyParkingSpaceInfo.carNum = data.carNum | 113 | this.carDetailApplyParkingSpaceInfo.carNum = data.carNum |
| @@ -103,15 +116,15 @@ export default { | @@ -103,15 +116,15 @@ export default { | ||
| 103 | }, | 116 | }, |
| 104 | _loadCarDetailApplyParkingSpaceData(page, row) { | 117 | _loadCarDetailApplyParkingSpaceData(page, row) { |
| 105 | const params = { | 118 | const params = { |
| 106 | - communityId: this.$store.state.community.communityId, | 119 | + communityId: getCommunityId(), |
| 107 | carNum: this.carDetailApplyParkingSpaceInfo.carNum, | 120 | carNum: this.carDetailApplyParkingSpaceInfo.carNum, |
| 108 | page, | 121 | page, |
| 109 | row | 122 | row |
| 110 | } | 123 | } |
| 111 | 124 | ||
| 112 | listParkingSpaceApply(params).then(response => { | 125 | listParkingSpaceApply(params).then(response => { |
| 113 | - this.carDetailApplyParkingSpaceInfo.parkingSpaceApplys = response.data.data | ||
| 114 | - this.total = response.data.total | 126 | + this.carDetailApplyParkingSpaceInfo.parkingSpaceApplys = response.data |
| 127 | + this.total = response.total | ||
| 115 | }).catch(error => { | 128 | }).catch(error => { |
| 116 | console.error('请求失败:', error) | 129 | console.error('请求失败:', error) |
| 117 | }) | 130 | }) |
src/components/car/carDetailCarInout.vue
| @@ -58,6 +58,7 @@ | @@ -58,6 +58,7 @@ | ||
| 58 | 58 | ||
| 59 | <script> | 59 | <script> |
| 60 | import { getCarInoutDetail } from '@/api/car/carDetailCarInoutApi' | 60 | import { getCarInoutDetail } from '@/api/car/carDetailCarInoutApi' |
| 61 | +import { getCommunityId } from '@/api/community/communityApi' | ||
| 61 | 62 | ||
| 62 | export default { | 63 | export default { |
| 63 | name: 'CarDetailCarInout', | 64 | name: 'CarDetailCarInout', |
| @@ -76,6 +77,13 @@ export default { | @@ -76,6 +77,13 @@ export default { | ||
| 76 | } | 77 | } |
| 77 | }, | 78 | }, |
| 78 | methods: { | 79 | methods: { |
| 80 | + open(data) { | ||
| 81 | + this.carDetailCarInoutInfo.carId = data.carId | ||
| 82 | + this.carDetailCarInoutInfo.carNum = data.carNum | ||
| 83 | + this.carDetailCarInoutInfo.areaNum = data.areaNum | ||
| 84 | + this.carDetailCarInoutInfo.memberId = data.memberId | ||
| 85 | + this._loadCarDetailCarInoutData(this.currentPage, this.pageSize) | ||
| 86 | + }, | ||
| 79 | switch(data) { | 87 | switch(data) { |
| 80 | this.carDetailCarInoutInfo.carId = data.carId | 88 | this.carDetailCarInoutInfo.carId = data.carId |
| 81 | this.carDetailCarInoutInfo.carNum = data.carNum | 89 | this.carDetailCarInoutInfo.carNum = data.carNum |
| @@ -85,7 +93,7 @@ export default { | @@ -85,7 +93,7 @@ export default { | ||
| 85 | }, | 93 | }, |
| 86 | _loadCarDetailCarInoutData(page, row) { | 94 | _loadCarDetailCarInoutData(page, row) { |
| 87 | const params = { | 95 | const params = { |
| 88 | - communityId: this.$store.state.community.communityId, | 96 | + communityId: getCommunityId(), |
| 89 | carNum: this.carDetailCarInoutInfo.carNum, | 97 | carNum: this.carDetailCarInoutInfo.carNum, |
| 90 | paNum: this.carDetailCarInoutInfo.areaNum, | 98 | paNum: this.carDetailCarInoutInfo.areaNum, |
| 91 | iotApiCode: 'listCarInoutDetailBmoImpl', | 99 | iotApiCode: 'listCarInoutDetailBmoImpl', |
| @@ -94,8 +102,8 @@ export default { | @@ -94,8 +102,8 @@ export default { | ||
| 94 | } | 102 | } |
| 95 | 103 | ||
| 96 | getCarInoutDetail(params).then(response => { | 104 | getCarInoutDetail(params).then(response => { |
| 97 | - this.carDetailCarInoutInfo.carIns = response.data.data | ||
| 98 | - this.total = response.data.total | 105 | + this.carDetailCarInoutInfo.carIns = response.data |
| 106 | + this.total = response.total | ||
| 99 | }).catch(error => { | 107 | }).catch(error => { |
| 100 | console.error('请求失败:', error) | 108 | console.error('请求失败:', error) |
| 101 | }) | 109 | }) |
src/components/car/carDetailCoupon.vue
| @@ -33,6 +33,7 @@ | @@ -33,6 +33,7 @@ | ||
| 33 | 33 | ||
| 34 | <script> | 34 | <script> |
| 35 | import { listParkingCouponCar } from '@/api/car/carDetailCouponApi' | 35 | import { listParkingCouponCar } from '@/api/car/carDetailCouponApi' |
| 36 | +import { getCommunityId } from '@/api/community/communityApi' | ||
| 36 | 37 | ||
| 37 | export default { | 38 | export default { |
| 38 | name: 'CarDetailCoupon', | 39 | name: 'CarDetailCoupon', |
| @@ -51,6 +52,13 @@ export default { | @@ -51,6 +52,13 @@ export default { | ||
| 51 | } | 52 | } |
| 52 | }, | 53 | }, |
| 53 | methods: { | 54 | methods: { |
| 55 | + open(data) { | ||
| 56 | + this.carDetailCouponInfo.carId = data.carId | ||
| 57 | + this.carDetailCouponInfo.carNum = data.carNum | ||
| 58 | + this.carDetailCouponInfo.paId = data.paId | ||
| 59 | + this.carDetailCouponInfo.memberId = data.memberId | ||
| 60 | + this._loadCarDetailCouponData(this.currentPage, this.pageSize) | ||
| 61 | + }, | ||
| 54 | switch(data) { | 62 | switch(data) { |
| 55 | this.carDetailCouponInfo.carId = data.carId | 63 | this.carDetailCouponInfo.carId = data.carId |
| 56 | this.carDetailCouponInfo.carNum = data.carNum | 64 | this.carDetailCouponInfo.carNum = data.carNum |
| @@ -60,7 +68,7 @@ export default { | @@ -60,7 +68,7 @@ export default { | ||
| 60 | }, | 68 | }, |
| 61 | _loadCarDetailCouponData(page, row) { | 69 | _loadCarDetailCouponData(page, row) { |
| 62 | const params = { | 70 | const params = { |
| 63 | - communityId: this.$store.state.community.communityId, | 71 | + communityId: getCommunityId(), |
| 64 | carNum: this.carDetailCouponInfo.carNum, | 72 | carNum: this.carDetailCouponInfo.carNum, |
| 65 | iotApiCode: 'listParkingCouponCarBmoImpl', | 73 | iotApiCode: 'listParkingCouponCarBmoImpl', |
| 66 | page, | 74 | page, |
| @@ -68,8 +76,8 @@ export default { | @@ -68,8 +76,8 @@ export default { | ||
| 68 | } | 76 | } |
| 69 | 77 | ||
| 70 | listParkingCouponCar(params).then(response => { | 78 | listParkingCouponCar(params).then(response => { |
| 71 | - this.carDetailCouponInfo.carDetailCoupons = response.data.data | ||
| 72 | - this.total = response.data.total | 79 | + this.carDetailCouponInfo.carDetailCoupons = response.data |
| 80 | + this.total = response.total | ||
| 73 | }).catch(error => { | 81 | }).catch(error => { |
| 74 | console.error('请求失败:', error) | 82 | console.error('请求失败:', error) |
| 75 | }) | 83 | }) |
src/components/car/carDetailCouponOrder.vue
| @@ -7,19 +7,17 @@ | @@ -7,19 +7,17 @@ | ||
| 7 | <el-table-column prop="couponName" :label="$t('carDetailCouponOrder.coupon')" align="center"></el-table-column> | 7 | <el-table-column prop="couponName" :label="$t('carDetailCouponOrder.coupon')" align="center"></el-table-column> |
| 8 | <el-table-column prop="shopName" :label="$t('carDetailCouponOrder.shop')" align="center"></el-table-column> | 8 | <el-table-column prop="shopName" :label="$t('carDetailCouponOrder.shop')" align="center"></el-table-column> |
| 9 | <el-table-column prop="paName" :label="$t('carDetailCouponOrder.parkingLot')" align="center"></el-table-column> | 9 | <el-table-column prop="paName" :label="$t('carDetailCouponOrder.parkingLot')" align="center"></el-table-column> |
| 10 | - <el-table-column prop="machineName" :label="$t('carDetailCouponOrder.machine')" align="center"></el-table-column> | ||
| 11 | - <el-table-column prop="createTime" :label="$t('carDetailCouponOrder.verifyTime')" align="center"></el-table-column> | 10 | + <el-table-column prop="machineName" :label="$t('carDetailCouponOrder.machine')" |
| 11 | + align="center"></el-table-column> | ||
| 12 | + <el-table-column prop="createTime" :label="$t('carDetailCouponOrder.verifyTime')" | ||
| 13 | + align="center"></el-table-column> | ||
| 12 | <el-table-column prop="remark" :label="$t('carDetailCouponOrder.remark')" align="center"></el-table-column> | 14 | <el-table-column prop="remark" :label="$t('carDetailCouponOrder.remark')" align="center"></el-table-column> |
| 13 | </el-table> | 15 | </el-table> |
| 14 | 16 | ||
| 15 | <el-row> | 17 | <el-row> |
| 16 | <el-col :span="16" :offset="8"> | 18 | <el-col :span="16" :offset="8"> |
| 17 | - <el-pagination | ||
| 18 | - @current-change="handleCurrentChange" | ||
| 19 | - :current-page="currentPage" | ||
| 20 | - :page-size="pageSize" | ||
| 21 | - layout="total, prev, pager, next, jumper" | ||
| 22 | - :total="total"> | 19 | + <el-pagination @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize" |
| 20 | + layout="total, prev, pager, next, jumper" :total="total"> | ||
| 23 | </el-pagination> | 21 | </el-pagination> |
| 24 | </el-col> | 22 | </el-col> |
| 25 | </el-row> | 23 | </el-row> |
| @@ -29,6 +27,7 @@ | @@ -29,6 +27,7 @@ | ||
| 29 | 27 | ||
| 30 | <script> | 28 | <script> |
| 31 | import { listParkingCouponCarOrder } from '@/api/car/carDetailCouponOrderApi' | 29 | import { listParkingCouponCarOrder } from '@/api/car/carDetailCouponOrderApi' |
| 30 | +import { getCommunityId } from '@/api/community/communityApi' | ||
| 32 | 31 | ||
| 33 | export default { | 32 | export default { |
| 34 | name: 'CarDetailCouponOrder', | 33 | name: 'CarDetailCouponOrder', |
| @@ -47,6 +46,13 @@ export default { | @@ -47,6 +46,13 @@ export default { | ||
| 47 | } | 46 | } |
| 48 | }, | 47 | }, |
| 49 | methods: { | 48 | methods: { |
| 49 | + open(data) { | ||
| 50 | + this.carDetailCouponOrderInfo.carId = data.carId | ||
| 51 | + this.carDetailCouponOrderInfo.carNum = data.carNum | ||
| 52 | + this.carDetailCouponOrderInfo.paId = data.paId | ||
| 53 | + this.carDetailCouponOrderInfo.memberId = data.memberId | ||
| 54 | + this._loadCarDetailCouponOrderData(this.currentPage, this.pageSize) | ||
| 55 | + }, | ||
| 50 | switch(data) { | 56 | switch(data) { |
| 51 | this.carDetailCouponOrderInfo.carId = data.carId | 57 | this.carDetailCouponOrderInfo.carId = data.carId |
| 52 | this.carDetailCouponOrderInfo.carNum = data.carNum | 58 | this.carDetailCouponOrderInfo.carNum = data.carNum |
| @@ -56,7 +62,7 @@ export default { | @@ -56,7 +62,7 @@ export default { | ||
| 56 | }, | 62 | }, |
| 57 | _loadCarDetailCouponOrderData(page, row) { | 63 | _loadCarDetailCouponOrderData(page, row) { |
| 58 | const params = { | 64 | const params = { |
| 59 | - communityId: this.$store.state.community.communityId, | 65 | + communityId: getCommunityId(), |
| 60 | carNum: this.carDetailCouponOrderInfo.carNum, | 66 | carNum: this.carDetailCouponOrderInfo.carNum, |
| 61 | iotApiCode: 'listParkingCouponCarOrderBmoImpl', | 67 | iotApiCode: 'listParkingCouponCarOrderBmoImpl', |
| 62 | page, | 68 | page, |
| @@ -64,8 +70,8 @@ export default { | @@ -64,8 +70,8 @@ export default { | ||
| 64 | } | 70 | } |
| 65 | 71 | ||
| 66 | listParkingCouponCarOrder(params).then(response => { | 72 | listParkingCouponCarOrder(params).then(response => { |
| 67 | - this.carDetailCouponOrderInfo.orders = response.data.data | ||
| 68 | - this.total = response.data.total | 73 | + this.carDetailCouponOrderInfo.orders = response.data |
| 74 | + this.total = response.total | ||
| 69 | }).catch(error => { | 75 | }).catch(error => { |
| 70 | console.error('请求失败:', error) | 76 | console.error('请求失败:', error) |
| 71 | }) | 77 | }) |
src/components/car/carDetailMember.vue
| @@ -10,29 +10,30 @@ | @@ -10,29 +10,30 @@ | ||
| 10 | 10 | ||
| 11 | <div class="margin-top"> | 11 | <div class="margin-top"> |
| 12 | <el-table :data="carDetailMemberInfo.ownerCars" style="width: 100%"> | 12 | <el-table :data="carDetailMemberInfo.ownerCars" style="width: 100%"> |
| 13 | - <el-table-column prop="carNum" :label="$t('carDetailMember.licensePlate')" align="center"></el-table-column> | ||
| 14 | - <el-table-column prop="roomName" :label="$t('carDetailMember.roomNumber')" align="center"></el-table-column> | ||
| 15 | - <el-table-column prop="carBrand" :label="$t('carDetailMember.carBrand')" align="center"></el-table-column> | ||
| 16 | - <el-table-column prop="carTypeName" :label="$t('carDetailMember.carType')" align="center"></el-table-column> | ||
| 17 | - <el-table-column prop="carColor" :label="$t('carDetailMember.color')" align="center"></el-table-column> | ||
| 18 | - <el-table-column :label="$t('carDetailMember.owner')" align="center"> | 13 | + <el-table-column prop="carNum" :label="$t('listOwnerCar.carNum')" align="center"></el-table-column> |
| 14 | + <el-table-column prop="roomName" :label="$t('listOwnerCar.roomNum')" align="center"></el-table-column> | ||
| 15 | + <el-table-column prop="carBrand" :label="$t('listOwnerCar.carBrand')" align="center"></el-table-column> | ||
| 16 | + <el-table-column prop="carTypeName" :label="$t('listOwnerCar.carType')" align="center"></el-table-column> | ||
| 17 | + <el-table-column prop="carColor" :label="$t('listOwnerCar.color')" align="center"></el-table-column> | ||
| 18 | + <el-table-column :label="$t('listOwnerCar.owner')" align="center"> | ||
| 19 | <template #default="{ row }"> | 19 | <template #default="{ row }"> |
| 20 | {{ row.ownerName }}({{ row.link }}) | 20 | {{ row.ownerName }}({{ row.link }}) |
| 21 | </template> | 21 | </template> |
| 22 | </el-table-column> | 22 | </el-table-column> |
| 23 | - <el-table-column :label="$t('carDetailMember.parkingSpace')" align="center"> | 23 | + <el-table-column :label="$t('listOwnerCar.parkingSpace')" align="center"> |
| 24 | <template #default="{ row }"> | 24 | <template #default="{ row }"> |
| 25 | <span v-if="row.areaNum"> | 25 | <span v-if="row.areaNum"> |
| 26 | - {{ row.areaNum }}{{ $t('carDetailMember.parkingLot') }}{{ row.num }}{{ $t('carDetailMember.parkingSpace') }} | 26 | + {{ row.areaNum }}{{ $t('listOwnerCar.parkingLot') }}{{ row.num }}{{ $t('listOwnerCar.parkingSpace') |
| 27 | + }} | ||
| 27 | </span> | 28 | </span> |
| 28 | <span v-else> | 29 | <span v-else> |
| 29 | - {{ $t('carDetailMember.none') }} | 30 | + {{ $t('listOwnerCar.none') }} |
| 30 | </span> | 31 | </span> |
| 31 | </template> | 32 | </template> |
| 32 | </el-table-column> | 33 | </el-table-column> |
| 33 | - <el-table-column prop="startTime" :label="$t('carDetailMember.startTime')" align="center"></el-table-column> | ||
| 34 | - <el-table-column prop="endTime" :label="$t('carDetailMember.endTime')" align="center"></el-table-column> | ||
| 35 | - <el-table-column :label="$t('carDetailMember.status')" align="center"> | 34 | + <el-table-column prop="startTime" :label="$t('listOwnerCar.startRentTime')" align="center"></el-table-column> |
| 35 | + <el-table-column prop="endTime" :label="$t('listOwnerCar.endRentTime')" align="center"></el-table-column> | ||
| 36 | + <el-table-column :label="$t('listOwnerCar.status')" align="center"> | ||
| 36 | <template #default="{ row }"> | 37 | <template #default="{ row }"> |
| 37 | {{ row.stateName }} | 38 | {{ row.stateName }} |
| 38 | <span v-if="row.iotStateName"> | 39 | <span v-if="row.iotStateName"> |
| @@ -40,7 +41,7 @@ | @@ -40,7 +41,7 @@ | ||
| 40 | </span> | 41 | </span> |
| 41 | </template> | 42 | </template> |
| 42 | </el-table-column> | 43 | </el-table-column> |
| 43 | - <el-table-column :label="$t('carDetailMember.operation')" align="center"> | 44 | + <el-table-column :label="$t('common.operation')" align="center"> |
| 44 | <template #default="{ row }"> | 45 | <template #default="{ row }"> |
| 45 | <el-button type="text" @click="_openEditOwnerCar(row)"> | 46 | <el-button type="text" @click="_openEditOwnerCar(row)"> |
| 46 | {{ $t('common.edit') }} | 47 | {{ $t('common.edit') }} |
src/components/car/carDetailTransactionCar.vue
| @@ -3,36 +3,40 @@ | @@ -3,36 +3,40 @@ | ||
| 3 | <div class="margin-top-lg"></div> | 3 | <div class="margin-top-lg"></div> |
| 4 | <div class="margin-top"> | 4 | <div class="margin-top"> |
| 5 | <el-table :data="carDetailTransactionCarInfo.machineTranslates" border style="width: 100%"> | 5 | <el-table :data="carDetailTransactionCarInfo.machineTranslates" border style="width: 100%"> |
| 6 | - <el-table-column prop="machineTranslateId" :label="$t('carDetailTransactionCar.syncId')" align="center"></el-table-column> | ||
| 7 | - <el-table-column prop="machineCode" :label="$t('carDetailTransactionCar.deviceCode')" align="center"></el-table-column> | ||
| 8 | - <el-table-column prop="typeCdName" :label="$t('carDetailTransactionCar.objectType')" align="center"></el-table-column> | ||
| 9 | - <el-table-column prop="objName" :label="$t('carDetailTransactionCar.objectName')" align="center"></el-table-column> | ||
| 10 | - <el-table-column prop="machineCmdName" :label="$t('carDetailTransactionCar.command')" align="center"></el-table-column> | ||
| 11 | - <el-table-column prop="stateName" :label="$t('carDetailTransactionCar.status')" align="center"></el-table-column> | ||
| 12 | - <el-table-column prop="remark" :label="$t('carDetailTransactionCar.remark')" align="center" width="80px"></el-table-column> | ||
| 13 | - <el-table-column prop="updateTime" :label="$t('carDetailTransactionCar.syncTime')" align="center"></el-table-column> | 6 | + <el-table-column prop="machineTranslateId" :label="$t('carDetailTransactionCar.syncId')" |
| 7 | + align="center"></el-table-column> | ||
| 8 | + <el-table-column prop="machineCode" :label="$t('carDetailTransactionCar.deviceCode')" | ||
| 9 | + align="center"></el-table-column> | ||
| 10 | + <el-table-column prop="typeCdName" :label="$t('carDetailTransactionCar.objectType')" | ||
| 11 | + align="center"></el-table-column> | ||
| 12 | + <el-table-column prop="objName" :label="$t('carDetailTransactionCar.objectName')" | ||
| 13 | + align="center"></el-table-column> | ||
| 14 | + <el-table-column prop="machineCmdName" :label="$t('carDetailTransactionCar.command')" | ||
| 15 | + align="center"></el-table-column> | ||
| 16 | + <el-table-column prop="stateName" :label="$t('carDetailTransactionCar.status')" | ||
| 17 | + align="center"></el-table-column> | ||
| 18 | + <el-table-column prop="remark" :label="$t('carDetailTransactionCar.remark')" align="center" | ||
| 19 | + width="80px"></el-table-column> | ||
| 20 | + <el-table-column prop="updateTime" :label="$t('carDetailTransactionCar.syncTime')" | ||
| 21 | + align="center"></el-table-column> | ||
| 14 | <el-table-column :label="$t('carDetailTransactionCar.operation')" align="center"> | 22 | <el-table-column :label="$t('carDetailTransactionCar.operation')" align="center"> |
| 15 | <template slot-scope="scope"> | 23 | <template slot-scope="scope"> |
| 16 | <el-button size="mini" @click="_openEditMachineTranslateModel(scope.row)"> | 24 | <el-button size="mini" @click="_openEditMachineTranslateModel(scope.row)"> |
| 17 | - {{$t('carDetailTransactionCar.resync')}} | 25 | + {{ $t('carDetailTransactionCar.resync') }} |
| 18 | </el-button> | 26 | </el-button> |
| 19 | </template> | 27 | </template> |
| 20 | </el-table-column> | 28 | </el-table-column> |
| 21 | </el-table> | 29 | </el-table> |
| 22 | - | 30 | + |
| 23 | <el-row> | 31 | <el-row> |
| 24 | <el-col :span="16" :offset="8"> | 32 | <el-col :span="16" :offset="8"> |
| 25 | - <el-pagination | ||
| 26 | - @current-change="handleCurrentChange" | ||
| 27 | - :current-page="currentPage" | ||
| 28 | - :page-size="pageSize" | ||
| 29 | - layout="total, prev, pager, next, jumper" | ||
| 30 | - :total="total"> | 33 | + <el-pagination @current-change="handleCurrentChange" :current-page="currentPage" :page-size="pageSize" |
| 34 | + layout="total, prev, pager, next, jumper" :total="total"> | ||
| 31 | </el-pagination> | 35 | </el-pagination> |
| 32 | </el-col> | 36 | </el-col> |
| 33 | </el-row> | 37 | </el-row> |
| 34 | </div> | 38 | </div> |
| 35 | - | 39 | + |
| 36 | <edit-machine-translate ref="editMachineTranslate"></edit-machine-translate> | 40 | <edit-machine-translate ref="editMachineTranslate"></edit-machine-translate> |
| 37 | </div> | 41 | </div> |
| 38 | </template> | 42 | </template> |
| @@ -40,6 +44,7 @@ | @@ -40,6 +44,7 @@ | ||
| 40 | <script> | 44 | <script> |
| 41 | import { getMachineTranslates } from '@/api/car/carDetailTransactionCarApi' | 45 | import { getMachineTranslates } from '@/api/car/carDetailTransactionCarApi' |
| 42 | import EditMachineTranslate from '@/components/property/editMachineTranslate' | 46 | import EditMachineTranslate from '@/components/property/editMachineTranslate' |
| 47 | +import { getCommunityId } from '@/api/community/communityApi' | ||
| 43 | 48 | ||
| 44 | export default { | 49 | export default { |
| 45 | name: 'CarDetailTransactionCar', | 50 | name: 'CarDetailTransactionCar', |
| @@ -60,6 +65,12 @@ export default { | @@ -60,6 +65,12 @@ export default { | ||
| 60 | } | 65 | } |
| 61 | }, | 66 | }, |
| 62 | methods: { | 67 | methods: { |
| 68 | + open(data) { | ||
| 69 | + this.carDetailTransactionCarInfo.ownerId = data.ownerId | ||
| 70 | + this.carDetailTransactionCarInfo.carId = data.carId | ||
| 71 | + this.carDetailTransactionCarInfo.memberId = data.memberId | ||
| 72 | + this._loadCarDetailTransactionCarData(this.currentPage, this.pageSize) | ||
| 73 | + }, | ||
| 63 | switch(data) { | 74 | switch(data) { |
| 64 | this.carDetailTransactionCarInfo.carId = data.carId | 75 | this.carDetailTransactionCarInfo.carId = data.carId |
| 65 | this.carDetailTransactionCarInfo.memberId = data.memberId | 76 | this.carDetailTransactionCarInfo.memberId = data.memberId |
| @@ -69,14 +80,14 @@ export default { | @@ -69,14 +80,14 @@ export default { | ||
| 69 | const params = { | 80 | const params = { |
| 70 | page, | 81 | page, |
| 71 | row, | 82 | row, |
| 72 | - communityId: this.$store.state.community.communityId, | 83 | + communityId: getCommunityId(), |
| 73 | objId: this.carDetailTransactionCarInfo.memberId, | 84 | objId: this.carDetailTransactionCarInfo.memberId, |
| 74 | typeCd: '4455' | 85 | typeCd: '4455' |
| 75 | } | 86 | } |
| 76 | 87 | ||
| 77 | getMachineTranslates(params).then(response => { | 88 | getMachineTranslates(params).then(response => { |
| 78 | - this.carDetailTransactionCarInfo.machineTranslates = response.data.machineTranslates | ||
| 79 | - this.total = response.data.total | 89 | + this.carDetailTransactionCarInfo.machineTranslates = response.machineTranslates |
| 90 | + this.total = response.total | ||
| 80 | }).catch(error => { | 91 | }).catch(error => { |
| 81 | console.error('请求失败:', error) | 92 | console.error('请求失败:', error) |
| 82 | }) | 93 | }) |
src/components/owner/ownerDetailRoom.vue
| @@ -127,8 +127,8 @@ export default { | @@ -127,8 +127,8 @@ export default { | ||
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | const response = await queryRoomsByOwner(params) | 129 | const response = await queryRoomsByOwner(params) |
| 130 | - this.ownerDetailRoomInfo.rooms = response.data.rooms | ||
| 131 | - this.pagination.total = response.data.total | 130 | + this.ownerDetailRoomInfo.rooms = response.rooms |
| 131 | + this.pagination.total = response.total | ||
| 132 | this._computeOwnerRoomOweFeeAmount() | 132 | this._computeOwnerRoomOweFeeAmount() |
| 133 | } catch (error) { | 133 | } catch (error) { |
| 134 | console.error('Failed to load owner room data:', error) | 134 | console.error('Failed to load owner room data:', error) |
src/components/system/carDetailHis.vue
| 1 | <template> | 1 | <template> |
| 2 | <div class="car-detail-his"> | 2 | <div class="car-detail-his"> |
| 3 | - <el-table | ||
| 4 | - :data="carDetailHisInfo.cars" | ||
| 5 | - border | ||
| 6 | - style="width: 100%" | ||
| 7 | - v-loading="loading"> | ||
| 8 | - <el-table-column | ||
| 9 | - prop="carNum" | ||
| 10 | - :label="$t('carDetailHis.carNum')" | ||
| 11 | - align="center"> | 3 | + <el-table :data="carDetailHisInfo.cars" border style="width: 100%" v-loading="loading"> |
| 4 | + <el-table-column prop="carNum" :label="$t('carDetailHis.carNum')" align="center"> | ||
| 12 | </el-table-column> | 5 | </el-table-column> |
| 13 | - <el-table-column | ||
| 14 | - :label="$t('carDetailHis.leaseType')" | ||
| 15 | - align="center"> | 6 | + <el-table-column :label="$t('carDetailHis.leaseType')" align="center"> |
| 16 | <template slot-scope="scope"> | 7 | <template slot-scope="scope"> |
| 17 | <span v-if="scope.row.leaseType === 'T'">{{ $t('carDetailHis.tempCar') }}</span> | 8 | <span v-if="scope.row.leaseType === 'T'">{{ $t('carDetailHis.tempCar') }}</span> |
| 18 | <span v-else>{{ scope.row.leaseTypeName }}</span> | 9 | <span v-else>{{ scope.row.leaseTypeName }}</span> |
| 19 | </template> | 10 | </template> |
| 20 | </el-table-column> | 11 | </el-table-column> |
| 21 | - <el-table-column | ||
| 22 | - :label="$t('carDetailHis.carTypeName')" | ||
| 23 | - align="center"> | 12 | + <el-table-column :label="$t('carDetailHis.carTypeName')" align="center"> |
| 24 | <template slot-scope="scope"> | 13 | <template slot-scope="scope"> |
| 25 | {{ scope.row.carTypeName || '-' }} | 14 | {{ scope.row.carTypeName || '-' }} |
| 26 | </template> | 15 | </template> |
| 27 | </el-table-column> | 16 | </el-table-column> |
| 28 | - <el-table-column | ||
| 29 | - :label="$t('carDetailHis.carColor')" | ||
| 30 | - align="center"> | 17 | + <el-table-column :label="$t('carDetailHis.carColor')" align="center"> |
| 31 | <template slot-scope="scope"> | 18 | <template slot-scope="scope"> |
| 32 | {{ scope.row.carColor || '-' }} | 19 | {{ scope.row.carColor || '-' }} |
| 33 | </template> | 20 | </template> |
| 34 | </el-table-column> | 21 | </el-table-column> |
| 35 | - <el-table-column | ||
| 36 | - :label="$t('carDetailHis.owner')" | ||
| 37 | - align="center"> | 22 | + <el-table-column :label="$t('carDetailHis.owner')" align="center"> |
| 38 | <template slot-scope="scope"> | 23 | <template slot-scope="scope"> |
| 39 | <div class="hand"> | 24 | <div class="hand"> |
| 40 | {{ scope.row.ownerName }}({{ scope.row.link }}) | 25 | {{ scope.row.ownerName }}({{ scope.row.link }}) |
| 41 | </div> | 26 | </div> |
| 42 | </template> | 27 | </template> |
| 43 | </el-table-column> | 28 | </el-table-column> |
| 44 | - <el-table-column | ||
| 45 | - :label="$t('carDetailHis.parkingSpace')" | ||
| 46 | - align="center"> | 29 | + <el-table-column :label="$t('carDetailHis.parkingSpace')" align="center"> |
| 47 | <template slot-scope="scope"> | 30 | <template slot-scope="scope"> |
| 48 | <span v-if="scope.row.areaNum && scope.row.state === '1001'"> | 31 | <span v-if="scope.row.areaNum && scope.row.state === '1001'"> |
| 49 | {{ scope.row.areaNum }}-{{ scope.row.num }} | 32 | {{ scope.row.areaNum }}-{{ scope.row.num }} |
| @@ -53,9 +36,7 @@ | @@ -53,9 +36,7 @@ | ||
| 53 | </span> | 36 | </span> |
| 54 | </template> | 37 | </template> |
| 55 | </el-table-column> | 38 | </el-table-column> |
| 56 | - <el-table-column | ||
| 57 | - :label="$t('carDetailHis.validityPeriod')" | ||
| 58 | - align="center"> | 39 | + <el-table-column :label="$t('carDetailHis.validityPeriod')" align="center"> |
| 59 | <template slot-scope="scope"> | 40 | <template slot-scope="scope"> |
| 60 | <div v-if="scope.row.leaseType === 'H'"> | 41 | <div v-if="scope.row.leaseType === 'H'"> |
| 61 | {{ scope.row.startTime }}<br>~{{ scope.row.endTime }} | 42 | {{ scope.row.startTime }}<br>~{{ scope.row.endTime }} |
| @@ -63,36 +44,25 @@ | @@ -63,36 +44,25 @@ | ||
| 63 | <div v-else>--</div> | 44 | <div v-else>--</div> |
| 64 | </template> | 45 | </template> |
| 65 | </el-table-column> | 46 | </el-table-column> |
| 66 | - <el-table-column | ||
| 67 | - :label="$t('carDetailHis.operate')" | ||
| 68 | - align="center"> | 47 | + <el-table-column :label="$t('carDetailHis.operate')" align="center"> |
| 69 | <template slot-scope="scope"> | 48 | <template slot-scope="scope"> |
| 70 | {{ _getHisOperate(scope.row) }} | 49 | {{ _getHisOperate(scope.row) }} |
| 71 | </template> | 50 | </template> |
| 72 | </el-table-column> | 51 | </el-table-column> |
| 73 | - <el-table-column | ||
| 74 | - :label="$t('carDetailHis.userName')" | ||
| 75 | - align="center"> | 52 | + <el-table-column :label="$t('carDetailHis.userName')" align="center"> |
| 76 | <template slot-scope="scope"> | 53 | <template slot-scope="scope"> |
| 77 | {{ scope.row.userName || '-' }} | 54 | {{ scope.row.userName || '-' }} |
| 78 | </template> | 55 | </template> |
| 79 | </el-table-column> | 56 | </el-table-column> |
| 80 | - <el-table-column | ||
| 81 | - :label="$t('carDetailHis.createTime')" | ||
| 82 | - align="center"> | 57 | + <el-table-column :label="$t('carDetailHis.createTime')" align="center"> |
| 83 | <template slot-scope="scope"> | 58 | <template slot-scope="scope"> |
| 84 | {{ scope.row.createTime }} | 59 | {{ scope.row.createTime }} |
| 85 | </template> | 60 | </template> |
| 86 | </el-table-column> | 61 | </el-table-column> |
| 87 | </el-table> | 62 | </el-table> |
| 88 | 63 | ||
| 89 | - <el-pagination | ||
| 90 | - @size-change="handleSizeChange" | ||
| 91 | - @current-change="handleCurrentChange" | ||
| 92 | - :current-page="page.current" | ||
| 93 | - :page-sizes="[10, 20, 30, 50]" | ||
| 94 | - :page-size="page.size" | ||
| 95 | - layout="total, sizes, prev, pager, next, jumper" | 64 | + <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.current" |
| 65 | + :page-sizes="[10, 20, 30, 50]" :page-size="page.size" layout="total, sizes, prev, pager, next, jumper" | ||
| 96 | :total="page.total"> | 66 | :total="page.total"> |
| 97 | </el-pagination> | 67 | </el-pagination> |
| 98 | </div> | 68 | </div> |
| @@ -100,6 +70,7 @@ | @@ -100,6 +70,7 @@ | ||
| 100 | 70 | ||
| 101 | <script> | 71 | <script> |
| 102 | import { queryHisOwnerCar } from '@/api/system/operateDataLogApi' | 72 | import { queryHisOwnerCar } from '@/api/system/operateDataLogApi' |
| 73 | +import { getCommunityId } from '@/api/community/communityApi' | ||
| 103 | 74 | ||
| 104 | export default { | 75 | export default { |
| 105 | name: 'CarDetailHis', | 76 | name: 'CarDetailHis', |
| @@ -140,9 +111,10 @@ export default { | @@ -140,9 +111,10 @@ export default { | ||
| 140 | carNum: this.carDetailHisInfo.carNum, | 111 | carNum: this.carDetailHisInfo.carNum, |
| 141 | carNumLike: this.carDetailHisInfo.carNumLike, | 112 | carNumLike: this.carDetailHisInfo.carNumLike, |
| 142 | logStartTime: this.carDetailHisInfo.logStartTime, | 113 | logStartTime: this.carDetailHisInfo.logStartTime, |
| 143 | - logEndTime: this.carDetailHisInfo.logEndTime | 114 | + logEndTime: this.carDetailHisInfo.logEndTime, |
| 115 | + communityId: getCommunityId() | ||
| 144 | } | 116 | } |
| 145 | - | 117 | + |
| 146 | const { data, total } = await queryHisOwnerCar(params) | 118 | const { data, total } = await queryHisOwnerCar(params) |
| 147 | this.carDetailHisInfo.cars = data | 119 | this.carDetailHisInfo.cars = data |
| 148 | this.page.total = total | 120 | this.page.total = total |
| @@ -154,13 +126,13 @@ export default { | @@ -154,13 +126,13 @@ export default { | ||
| 154 | }, | 126 | }, |
| 155 | _getHisOperate(car) { | 127 | _getHisOperate(car) { |
| 156 | const carCount = this.carDetailHisInfo.cars.filter(item => item.bId === car.bId).length | 128 | const carCount = this.carDetailHisInfo.cars.filter(item => item.bId === car.bId).length |
| 157 | - | 129 | + |
| 158 | if (carCount <= 1) { | 130 | if (carCount <= 1) { |
| 159 | if (car.operate === 'ADD') return this.$t('carDetailHis.add') | 131 | if (car.operate === 'ADD') return this.$t('carDetailHis.add') |
| 160 | if (car.operate === 'DEL') return this.$t('carDetailHis.delete') | 132 | if (car.operate === 'DEL') return this.$t('carDetailHis.delete') |
| 161 | return '-' | 133 | return '-' |
| 162 | } | 134 | } |
| 163 | - | 135 | + |
| 164 | if (car.operate === 'ADD') return this.$t('carDetailHis.modifyNew') | 136 | if (car.operate === 'ADD') return this.$t('carDetailHis.modifyNew') |
| 165 | if (car.operate === 'DEL') return this.$t('carDetailHis.modifyOld') | 137 | if (car.operate === 'DEL') return this.$t('carDetailHis.modifyOld') |
| 166 | return '-' | 138 | return '-' |
src/views/car/carDetail.vue
| @@ -16,78 +16,78 @@ | @@ -16,78 +16,78 @@ | ||
| 16 | <!-- Vehicle Information --> | 16 | <!-- Vehicle Information --> |
| 17 | <div class="margin-top"> | 17 | <div class="margin-top"> |
| 18 | <el-form class="text-left"> | 18 | <el-form class="text-left"> |
| 19 | - <el-row :gutter="20"> | ||
| 20 | - <el-col :span="6"> | ||
| 21 | - <el-form-item :label="$t('carDetail.licensePlate')"> | ||
| 22 | - <label>{{ carDetailInfo.carNum || '-' }}</label> | ||
| 23 | - </el-form-item> | ||
| 24 | - </el-col> | ||
| 25 | - <el-col :span="6"> | ||
| 26 | - <el-form-item :label="$t('carDetail.carBrand')"> | ||
| 27 | - <label>{{ carDetailInfo.carBrand || '-' }}</label> | ||
| 28 | - </el-form-item> | ||
| 29 | - </el-col> | ||
| 30 | - <el-col :span="6"> | ||
| 31 | - <el-form-item :label="$t('carDetail.carType')"> | ||
| 32 | - <label>{{ carDetailInfo.leaseTypeName || '-' }}</label> | ||
| 33 | - </el-form-item> | ||
| 34 | - </el-col> | ||
| 35 | - <el-col :span="6"> | ||
| 36 | - <el-form-item :label="$t('carDetail.color')"> | ||
| 37 | - <label>{{ carDetailInfo.carColor || '-' }}</label> | ||
| 38 | - </el-form-item> | ||
| 39 | - </el-col> | ||
| 40 | - </el-row> | 19 | + <el-row :gutter="20"> |
| 20 | + <el-col :span="6"> | ||
| 21 | + <el-form-item :label="$t('carDetail.licensePlate')"> | ||
| 22 | + <label>{{ carDetailInfo.carNum || '-' }}</label> | ||
| 23 | + </el-form-item> | ||
| 24 | + </el-col> | ||
| 25 | + <el-col :span="6"> | ||
| 26 | + <el-form-item :label="$t('carDetail.carBrand')"> | ||
| 27 | + <label>{{ carDetailInfo.carBrand || '-' }}</label> | ||
| 28 | + </el-form-item> | ||
| 29 | + </el-col> | ||
| 30 | + <el-col :span="6"> | ||
| 31 | + <el-form-item :label="$t('carDetail.carType')"> | ||
| 32 | + <label>{{ carDetailInfo.leaseTypeName || '-' }}</label> | ||
| 33 | + </el-form-item> | ||
| 34 | + </el-col> | ||
| 35 | + <el-col :span="6"> | ||
| 36 | + <el-form-item :label="$t('carDetail.color')"> | ||
| 37 | + <label>{{ carDetailInfo.carColor || '-' }}</label> | ||
| 38 | + </el-form-item> | ||
| 39 | + </el-col> | ||
| 40 | + </el-row> | ||
| 41 | 41 | ||
| 42 | - <el-row :gutter="20"> | ||
| 43 | - <el-col :span="6"> | ||
| 44 | - <el-form-item :label="$t('carDetail.licenseType')"> | ||
| 45 | - <label>{{ carDetailInfo.carTypeName || '-' }}</label> | ||
| 46 | - </el-form-item> | ||
| 47 | - </el-col> | ||
| 48 | - <el-col :span="6"> | ||
| 49 | - <el-form-item :label="$t('carDetail.leaseStart')"> | ||
| 50 | - <label>{{ carDetailInfo.startTime || '-' }}</label> | ||
| 51 | - </el-form-item> | ||
| 52 | - </el-col> | ||
| 53 | - <el-col :span="6"> | ||
| 54 | - <el-form-item :label="$t('carDetail.leaseEnd')"> | ||
| 55 | - <label>{{ carDetailInfo.endTime || '-' }}</label> | ||
| 56 | - </el-form-item> | ||
| 57 | - </el-col> | ||
| 58 | - <el-col :span="6"> | ||
| 59 | - <el-form-item :label="$t('carDetail.remark')"> | ||
| 60 | - <label>{{ carDetailInfo.remark || '-' }}</label> | ||
| 61 | - </el-form-item> | ||
| 62 | - </el-col> | ||
| 63 | - </el-row> | 42 | + <el-row :gutter="20"> |
| 43 | + <el-col :span="6"> | ||
| 44 | + <el-form-item :label="$t('carDetail.licenseType')"> | ||
| 45 | + <label>{{ carDetailInfo.carTypeName || '-' }}</label> | ||
| 46 | + </el-form-item> | ||
| 47 | + </el-col> | ||
| 48 | + <el-col :span="6"> | ||
| 49 | + <el-form-item :label="$t('carDetail.leaseStart')"> | ||
| 50 | + <label>{{ carDetailInfo.startTime || '-' }}</label> | ||
| 51 | + </el-form-item> | ||
| 52 | + </el-col> | ||
| 53 | + <el-col :span="6"> | ||
| 54 | + <el-form-item :label="$t('carDetail.leaseEnd')"> | ||
| 55 | + <label>{{ carDetailInfo.endTime || '-' }}</label> | ||
| 56 | + </el-form-item> | ||
| 57 | + </el-col> | ||
| 58 | + <el-col :span="6"> | ||
| 59 | + <el-form-item :label="$t('carDetail.remark')"> | ||
| 60 | + <label>{{ carDetailInfo.remark || '-' }}</label> | ||
| 61 | + </el-form-item> | ||
| 62 | + </el-col> | ||
| 63 | + </el-row> | ||
| 64 | 64 | ||
| 65 | - <el-row :gutter="20"> | ||
| 66 | - <el-col :span="6"> | ||
| 67 | - <el-form-item :label="$t('carDetail.parkingLot')"> | ||
| 68 | - <label>{{ carDetailInfo.areaNum || '-' }}</label> | ||
| 69 | - </el-form-item> | ||
| 70 | - </el-col> | ||
| 71 | - <el-col :span="6"> | ||
| 72 | - <el-form-item :label="$t('carDetail.parkingSpace')"> | ||
| 73 | - <label>{{ carDetailInfo.num || '-' }}</label> | ||
| 74 | - </el-form-item> | ||
| 75 | - </el-col> | ||
| 76 | - <el-col :span="6"> | ||
| 77 | - <el-form-item :label="$t('carDetail.status')"> | ||
| 78 | - <label>{{ carDetailInfo.stateName || '-' }}</label> | ||
| 79 | - </el-form-item> | ||
| 80 | - </el-col> | ||
| 81 | - <el-col :span="6"> | ||
| 82 | - <el-form-item :label="$t('carDetail.relatedHouse')"> | ||
| 83 | - <label>{{ carDetailInfo.roomName || '-' }}</label> | ||
| 84 | - </el-form-item> | ||
| 85 | - </el-col> | ||
| 86 | - </el-row> | ||
| 87 | - </el-form> | 65 | + <el-row :gutter="20"> |
| 66 | + <el-col :span="6"> | ||
| 67 | + <el-form-item :label="$t('carDetail.parkingLot')"> | ||
| 68 | + <label>{{ carDetailInfo.areaNum || '-' }}</label> | ||
| 69 | + </el-form-item> | ||
| 70 | + </el-col> | ||
| 71 | + <el-col :span="6"> | ||
| 72 | + <el-form-item :label="$t('carDetail.parkingSpace')"> | ||
| 73 | + <label>{{ carDetailInfo.num || '-' }}</label> | ||
| 74 | + </el-form-item> | ||
| 75 | + </el-col> | ||
| 76 | + <el-col :span="6"> | ||
| 77 | + <el-form-item :label="$t('carDetail.status')"> | ||
| 78 | + <label>{{ carDetailInfo.stateName || '-' }}</label> | ||
| 79 | + </el-form-item> | ||
| 80 | + </el-col> | ||
| 81 | + <el-col :span="6"> | ||
| 82 | + <el-form-item :label="$t('carDetail.relatedHouse')"> | ||
| 83 | + <label>{{ carDetailInfo.roomName || '-' }}</label> | ||
| 84 | + </el-form-item> | ||
| 85 | + </el-col> | ||
| 86 | + </el-row> | ||
| 87 | + </el-form> | ||
| 88 | </div> | 88 | </div> |
| 89 | 89 | ||
| 90 | - <divider/> | 90 | + <divider /> |
| 91 | 91 | ||
| 92 | <div class="margin-top-sm"> | 92 | <div class="margin-top-sm"> |
| 93 | <el-tabs v-model="carDetailInfo._currentTab" @tab-click="changeTab(carDetailInfo._currentTab)"> | 93 | <el-tabs v-model="carDetailInfo._currentTab" @tab-click="changeTab(carDetailInfo._currentTab)"> |
| @@ -243,14 +243,14 @@ export default { | @@ -243,14 +243,14 @@ export default { | ||
| 243 | } | 243 | } |
| 244 | setTimeout(() => { | 244 | setTimeout(() => { |
| 245 | if (this.$refs[tab]) { | 245 | if (this.$refs[tab]) { |
| 246 | - if(tab === 'ownerDetailHisFee'){ | 246 | + if (tab === 'ownerDetailHisFee' || tab == 'ownerDetailRoom' || tab == 'ownerDetailCar') { |
| 247 | this.$refs[tab].open(this.carDetailInfo.ownerId) | 247 | this.$refs[tab].open(this.carDetailInfo.ownerId) |
| 248 | - }else{ | 248 | + } else { |
| 249 | this.$refs[tab].open(tabData) | 249 | this.$refs[tab].open(tabData) |
| 250 | } | 250 | } |
| 251 | } | 251 | } |
| 252 | }, 100) | 252 | }, 100) |
| 253 | - | 253 | + |
| 254 | }, | 254 | }, |
| 255 | _openEditDetailOwnerCar() { | 255 | _openEditDetailOwnerCar() { |
| 256 | this.$refs.editCar.open(this.carDetailInfo) | 256 | this.$refs.editCar.open(this.carDetailInfo) |