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