Commit b8ac379c1bbce57d18ae6f5891111b98b21e3592
1 parent
c6bec22b
v1.9 优化缴费页面扫码缴费
Showing
2 changed files
with
14 additions
and
8 deletions
src/components/inspection/addInspectionPoint.vue
| 1 | <template> | 1 | <template> |
| 2 | <el-dialog :title="$t('addInspectionPoint.title')" :visible.sync="dialogVisible" width="60%" top="5vh" | 2 | <el-dialog :title="$t('addInspectionPoint.title')" :visible.sync="dialogVisible" width="60%" top="5vh" |
| 3 | @close="resetForm"> | 3 | @close="resetForm"> |
| 4 | - <el-form ref="addForm" :model="addInspectionPointInfo" :rules="rules" label-width="120px" label-position="right"> | 4 | + <el-form ref="addForm" :model="addInspectionPointInfo" class="text-left" :rules="rules" label-width="120px" label-position="right"> |
| 5 | <el-row :gutter="20"> | 5 | <el-row :gutter="20"> |
| 6 | <el-col :span="12"> | 6 | <el-col :span="12"> |
| 7 | <el-form-item :label="$t('addInspectionPoint.inspectionName')" prop="inspectionName"> | 7 | <el-form-item :label="$t('addInspectionPoint.inspectionName')" prop="inspectionName"> |
| @@ -31,7 +31,7 @@ | @@ -31,7 +31,7 @@ | ||
| 31 | </el-row> | 31 | </el-row> |
| 32 | 32 | ||
| 33 | <el-row :gutter="20" v-if="addInspectionPointInfo.pointObjType === '1001'"> | 33 | <el-row :gutter="20" v-if="addInspectionPointInfo.pointObjType === '1001'"> |
| 34 | - <el-col :span="24"> | 34 | + <el-col :span="12"> |
| 35 | <el-form-item :label="$t('addInspectionPoint.machine')" prop="pointObjId"> | 35 | <el-form-item :label="$t('addInspectionPoint.machine')" prop="pointObjId"> |
| 36 | <machine-select2 ref="machineSelect" :parent-modal="true" @notify="handleMachineSelect" /> | 36 | <machine-select2 ref="machineSelect" :parent-modal="true" @notify="handleMachineSelect" /> |
| 37 | <div class="tip-text">{{ $t('addInspectionPoint.tip.addMachine') }}</div> | 37 | <div class="tip-text">{{ $t('addInspectionPoint.tip.addMachine') }}</div> |
| @@ -157,9 +157,10 @@ export default { | @@ -157,9 +157,10 @@ export default { | ||
| 157 | open() { | 157 | open() { |
| 158 | this.dialogVisible = true | 158 | this.dialogVisible = true |
| 159 | this.resetForm() | 159 | this.resetForm() |
| 160 | + this.getDictData() | ||
| 161 | + | ||
| 160 | this.$nextTick(() => { | 162 | this.$nextTick(() => { |
| 161 | this.initMap() | 163 | this.initMap() |
| 162 | - this.getDictData() | ||
| 163 | this._listAddInspectionItems() | 164 | this._listAddInspectionItems() |
| 164 | }) | 165 | }) |
| 165 | }, | 166 | }, |
| @@ -168,6 +169,7 @@ export default { | @@ -168,6 +169,7 @@ export default { | ||
| 168 | try { | 169 | try { |
| 169 | const data = await getDict('inspection_point', 'point_obj_type') | 170 | const data = await getDict('inspection_point', 'point_obj_type') |
| 170 | this.addInspectionPointInfo.pointObjTypes = data | 171 | this.addInspectionPointInfo.pointObjTypes = data |
| 172 | + console.log(this.addInspectionPointInfo.pointObjTypes) | ||
| 171 | } catch (error) { | 173 | } catch (error) { |
| 172 | console.error('获取字典数据失败:', error) | 174 | console.error('获取字典数据失败:', error) |
| 173 | } | 175 | } |
| @@ -200,7 +202,9 @@ export default { | @@ -200,7 +202,9 @@ export default { | ||
| 200 | this.addInspectionPointInfo.pointObjName = '' | 202 | this.addInspectionPointInfo.pointObjName = '' |
| 201 | 203 | ||
| 202 | if (this.addInspectionPointInfo.pointObjType === '1001') { | 204 | if (this.addInspectionPointInfo.pointObjType === '1001') { |
| 203 | - this.$refs.machineSelect.clearMachine() | 205 | + setTimeout(() => { |
| 206 | + this.$refs.machineSelect.searchMachines() | ||
| 207 | + }, 500) | ||
| 204 | } | 208 | } |
| 205 | }, | 209 | }, |
| 206 | 210 | ||
| @@ -266,9 +270,11 @@ export default { | @@ -266,9 +270,11 @@ export default { | ||
| 266 | this.$refs.addForm.resetFields() | 270 | this.$refs.addForm.resetFields() |
| 267 | } | 271 | } |
| 268 | 272 | ||
| 269 | - if (this.$refs.machineSelect) { | ||
| 270 | - this.$refs.machineSelect.clearMachine() | ||
| 271 | - } | 273 | + setTimeout(() => { |
| 274 | + if (this.$refs.machineSelect) { | ||
| 275 | + this.$refs.machineSelect.clearMachine() | ||
| 276 | + } | ||
| 277 | + }, 500) | ||
| 272 | }, | 278 | }, |
| 273 | handlePositionChange(data) { | 279 | handlePositionChange(data) { |
| 274 | this.addInspectionPointInfo.lng = data.lng | 280 | this.addInspectionPointInfo.lng = data.lng |
src/components/inspection/machineSelect2.vue
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | </template> | 6 | </template> |
| 7 | 7 | ||
| 8 | <script> | 8 | <script> |
| 9 | -import { listEquipmentAccount } from '@/api/inspection/inspectionPointApi' | 9 | +import { listEquipmentAccount } from '@/api/inspection/addMaintainancePlanApi' |
| 10 | import { getCommunityId } from '@/api/community/communityApi' | 10 | import { getCommunityId } from '@/api/community/communityApi' |
| 11 | 11 | ||
| 12 | export default { | 12 | export default { |