{{ $t('addInspectionPoint.tip.addMachine') }}
@@ -157,9 +157,10 @@ export default {
open() {
this.dialogVisible = true
this.resetForm()
+ this.getDictData()
+
this.$nextTick(() => {
this.initMap()
- this.getDictData()
this._listAddInspectionItems()
})
},
@@ -168,6 +169,7 @@ export default {
try {
const data = await getDict('inspection_point', 'point_obj_type')
this.addInspectionPointInfo.pointObjTypes = data
+ console.log(this.addInspectionPointInfo.pointObjTypes)
} catch (error) {
console.error('获取字典数据失败:', error)
}
@@ -200,7 +202,9 @@ export default {
this.addInspectionPointInfo.pointObjName = ''
if (this.addInspectionPointInfo.pointObjType === '1001') {
- this.$refs.machineSelect.clearMachine()
+ setTimeout(() => {
+ this.$refs.machineSelect.searchMachines()
+ }, 500)
}
},
@@ -266,9 +270,11 @@ export default {
this.$refs.addForm.resetFields()
}
- if (this.$refs.machineSelect) {
- this.$refs.machineSelect.clearMachine()
- }
+ setTimeout(() => {
+ if (this.$refs.machineSelect) {
+ this.$refs.machineSelect.clearMachine()
+ }
+ }, 500)
},
handlePositionChange(data) {
this.addInspectionPointInfo.lng = data.lng
diff --git a/src/components/inspection/machineSelect2.vue b/src/components/inspection/machineSelect2.vue
index ff861c170..fdfb9088c 100644
--- a/src/components/inspection/machineSelect2.vue
+++ b/src/components/inspection/machineSelect2.vue
@@ -6,7 +6,7 @@