mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-23 21:36:37 +08:00
v1.9 停车位页面无法选择停车bug
This commit is contained in:
parent
0e772b97f1
commit
e9417fb07f
@ -28,8 +28,8 @@
|
||||
:rules="[{ required: true, message: $t('batchAddParkingSpace.parkingSpaceTypePlaceholder'), trigger: 'change' }]">
|
||||
<el-select v-model="form.parkingType" :placeholder="$t('batchAddParkingSpace.parkingSpaceTypePlaceholder')"
|
||||
style="width:100%">
|
||||
<template slot="prepend" v-for="item in parkingTypes" >
|
||||
<el-option :label="item.name" :key="item.statusCd" :value="item.statusCd" v-if="item.statusCd !== '2'"></el-option>
|
||||
<template v-for="(item,index) in parkingTypes" >
|
||||
<el-option :label="item.name" :key="index" :value="item.statusCd" v-if="item.statusCd != '2'"></el-option>
|
||||
</template>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -80,6 +80,7 @@ export default {
|
||||
try {
|
||||
const data = await getDict('parking_space', 'parking_type')
|
||||
this.parkingTypes = data
|
||||
|
||||
} catch (error) {
|
||||
this.$message.error(this.$t('common.loadDictError'))
|
||||
}
|
||||
|
||||
@ -1,65 +1,40 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
:title="$t('chooseParkingArea.title')"
|
||||
:visible.sync="visible"
|
||||
width="70%"
|
||||
>
|
||||
<el-card>
|
||||
<el-dialog :title="$t('chooseParkingArea.title')" :visible.sync="visible" width="70%">
|
||||
|
||||
<div slot="header">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="18"></el-col>
|
||||
<el-col :span="6">
|
||||
<el-input-group>
|
||||
<el-input
|
||||
v-model="searchForm.num"
|
||||
:placeholder="$t('chooseParkingArea.parkingLotNumPlaceholder')"
|
||||
></el-input>
|
||||
<el-button
|
||||
slot="append"
|
||||
type="primary"
|
||||
@click="queryParkingAreas"
|
||||
>
|
||||
<el-input v-model="searchForm.num"
|
||||
:placeholder="$t('chooseParkingArea.parkingLotNumPlaceholder')"></el-input>
|
||||
<el-button slot="append" type="primary" @click="queryParkingAreas">
|
||||
{{ $t('chooseParkingArea.query') }}
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="resetParkingAreas"
|
||||
>
|
||||
<el-button type="primary" @click="resetParkingAreas">
|
||||
{{ $t('chooseParkingArea.reset') }}
|
||||
</el-button>
|
||||
</el-input-group>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
|
||||
<el-table :data="parkingAreas" border>
|
||||
<el-table-column prop="paId" :label="$t('chooseParkingArea.parkingLotId')" align="center"></el-table-column>
|
||||
<el-table-column prop="num" :label="$t('chooseParkingArea.parkingLotNum')" align="center"></el-table-column>
|
||||
<el-table-column prop="typeCd" :label="$t('chooseParkingArea.parkingLotType')" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('chooseParkingArea.operation')" align="center" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click="selectParkingArea(scope.row)"
|
||||
>
|
||||
<el-button type="primary" size="mini" @click="selectParkingArea(scope.row)">
|
||||
{{ $t('chooseParkingArea.select') }}
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handlePageChange"
|
||||
:current-page="pagination.current"
|
||||
:page-sizes="[10, 20, 30, 50]"
|
||||
:page-size="pagination.size"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="pagination.total"
|
||||
style="margin-top:20px;text-align:right"
|
||||
></el-pagination>
|
||||
</el-card>
|
||||
|
||||
<el-pagination @size-change="handleSizeChange" @current-change="handlePageChange"
|
||||
:current-page="pagination.current" :page-sizes="[10, 20, 30, 50]" :page-size="pagination.size"
|
||||
layout="total, sizes, prev, pager, next, jumper" :total="pagination.total"
|
||||
style="margin-top:20px;text-align:right"></el-pagination>
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@ -88,7 +63,7 @@ export default {
|
||||
this.visible = true
|
||||
this.loadParkingAreas()
|
||||
},
|
||||
|
||||
|
||||
async loadParkingAreas() {
|
||||
try {
|
||||
const params = {
|
||||
@ -97,35 +72,35 @@ export default {
|
||||
communityId: getCommunityId(),
|
||||
num: this.searchForm.num
|
||||
}
|
||||
|
||||
|
||||
const res = await listParkingAreas(params)
|
||||
this.parkingAreas = res.data.parkingAreas
|
||||
this.pagination.total = res.data.total
|
||||
this.parkingAreas = res.parkingAreas
|
||||
this.pagination.total = res.total
|
||||
} catch (error) {
|
||||
this.$message.error(this.$t('common.loadError'))
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
selectParkingArea(row) {
|
||||
this.$emit('choose', row)
|
||||
this.visible = false
|
||||
},
|
||||
|
||||
|
||||
queryParkingAreas() {
|
||||
this.pagination.current = 1
|
||||
this.loadParkingAreas()
|
||||
},
|
||||
|
||||
|
||||
resetParkingAreas() {
|
||||
this.searchForm.num = ''
|
||||
this.queryParkingAreas()
|
||||
},
|
||||
|
||||
|
||||
handlePageChange(page) {
|
||||
this.pagination.current = page
|
||||
this.loadParkingAreas()
|
||||
},
|
||||
|
||||
|
||||
handleSizeChange(size) {
|
||||
this.pagination.size = size
|
||||
this.loadParkingAreas()
|
||||
|
||||
@ -14,24 +14,20 @@
|
||||
<div class="search-content">
|
||||
<el-row :gutter="20">
|
||||
<el-col :sm="4">
|
||||
<el-input-group>
|
||||
<el-input v-model="listParkingSpaceInfo.conditions.areaNum"
|
||||
:placeholder="$t('listParkingSpace.parkingLotPlaceholder')"></el-input>
|
||||
</el-input-group>
|
||||
</el-col>
|
||||
<el-col :sm="2">
|
||||
<el-input-group>
|
||||
<el-button slot="append" type="primary" @click="openChooseParkingArea">
|
||||
<el-button type="primary" @click="openChooseParkingArea">
|
||||
<i class="el-icon-search"></i>
|
||||
{{ $t('listParkingSpace.select') }}
|
||||
</el-button>
|
||||
</el-input-group>
|
||||
</el-col>
|
||||
<el-col :sm="6">
|
||||
<el-col :sm="4">
|
||||
<el-input v-model.trim="listParkingSpaceInfo.num"
|
||||
:placeholder="$t('listParkingSpace.parkingSpaceNumPlaceholder')"></el-input>
|
||||
</el-col>
|
||||
<el-col :sm="6">
|
||||
<el-col :sm="4">
|
||||
<el-select v-model="listParkingSpaceInfo.conditions.state"
|
||||
:placeholder="$t('listParkingSpace.parkingSpaceStatePlaceholder')" style="width:100%">
|
||||
<el-option value="" :label="$t('listParkingSpace.parkingSpaceStatePlaceholder')"></el-option>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user