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