Commit 6831c157031e2a3d6dfeac8050894b4254528a93

Authored by wuxw
1 parent 0606c3d8

v1.9 优化不能连续添加小区bug

src/components/community/addCommunity.vue
@@ -2,26 +2,26 @@ @@ -2,26 +2,26 @@
2 <el-dialog :title="$t('addCommunity.title')" :visible.sync="visible" width="40%" @close="clearAddCommunityInfo"> 2 <el-dialog :title="$t('addCommunity.title')" :visible.sync="visible" width="40%" @close="clearAddCommunityInfo">
3 <el-form ref="form" :model="addCommunityInfo" label-width="120px" class="text-left"> 3 <el-form ref="form" :model="addCommunityInfo" label-width="120px" class="text-left">
4 <el-form-item :label="$t('addCommunity.name')" prop="name" required> 4 <el-form-item :label="$t('addCommunity.name')" prop="name" required>
5 - <el-input v-model="addCommunityInfo.name" :placeholder="$t('addCommunity.namePlaceholder')" /> 5 + <el-input v-model="addCommunityInfo.name" :placeholder="$t('addCommunity.name')" />
6 </el-form-item> 6 </el-form-item>
7 <el-form-item :label="$t('addCommunity.area')" prop="area"> 7 <el-form-item :label="$t('addCommunity.area')" prop="area">
8 - <area-select @selectArea="selectArea" /> 8 + <area-select ref="areaSelectRef" @selectArea="selectArea" />
9 </el-form-item> 9 </el-form-item>
10 <el-form-item :label="$t('addCommunity.address')" prop="tmpAddress" required> 10 <el-form-item :label="$t('addCommunity.address')" prop="tmpAddress" required>
11 - <el-input v-model="addCommunityInfo.tmpAddress" :placeholder="$t('addCommunity.addressPlaceholder')" /> 11 + <el-input v-model="addCommunityInfo.tmpAddress" :placeholder="$t('addCommunity.address')" />
12 </el-form-item> 12 </el-form-item>
13 <el-form-item :label="$t('addCommunity.nearbyLandmarks')" prop="nearbyLandmarks" required> 13 <el-form-item :label="$t('addCommunity.nearbyLandmarks')" prop="nearbyLandmarks" required>
14 <el-input v-model="addCommunityInfo.nearbyLandmarks" 14 <el-input v-model="addCommunityInfo.nearbyLandmarks"
15 - :placeholder="$t('addCommunity.nearbyLandmarksPlaceholder')" /> 15 + :placeholder="$t('addCommunity.nearbyLandmarks')" />
16 </el-form-item> 16 </el-form-item>
17 <el-form-item :label="$t('addCommunity.tel')" prop="tel" required> 17 <el-form-item :label="$t('addCommunity.tel')" prop="tel" required>
18 - <el-input v-model="addCommunityInfo.tel" :placeholder="$t('addCommunity.telPlaceholder')" /> 18 + <el-input v-model="addCommunityInfo.tel" :placeholder="$t('addCommunity.tel')" />
19 </el-form-item> 19 </el-form-item>
20 <el-form-item :label="$t('addCommunity.payFeeMonth')" prop="payFeeMonth" required> 20 <el-form-item :label="$t('addCommunity.payFeeMonth')" prop="payFeeMonth" required>
21 - <el-input v-model="addCommunityInfo.payFeeMonth" :placeholder="$t('addCommunity.payFeeMonthPlaceholder')" /> 21 + <el-input v-model="addCommunityInfo.payFeeMonth" :placeholder="$t('addCommunity.payFeeMonth')" />
22 </el-form-item> 22 </el-form-item>
23 <el-form-item :label="$t('addCommunity.feePrice')" prop="feePrice" required> 23 <el-form-item :label="$t('addCommunity.feePrice')" prop="feePrice" required>
24 - <el-input v-model="addCommunityInfo.feePrice" :placeholder="$t('addCommunity.feePricePlaceholder')" /> 24 + <el-input v-model="addCommunityInfo.feePrice" :placeholder="$t('addCommunity.feePrice')" />
25 </el-form-item> 25 </el-form-item>
26 <el-form-item v-for="(item, index) in addCommunityInfo.attrs" :key="index" :label="item.specName" 26 <el-form-item v-for="(item, index) in addCommunityInfo.attrs" :key="index" :label="item.specName"
27 :prop="'attrs.' + index + '.value'"> 27 :prop="'attrs.' + index + '.value'">
@@ -70,6 +70,9 @@ export default { @@ -70,6 +70,9 @@ export default {
70 methods: { 70 methods: {
71 openModal() { 71 openModal() {
72 this._loadCommunityAttrSpec() 72 this._loadCommunityAttrSpec()
  73 + setTimeout(() => {
  74 + this.$refs.areaSelectRef.clearArea()
  75 + }, 100)
73 this.visible = true 76 this.visible = true
74 }, 77 },
75 selectArea(area) { 78 selectArea(area) {