优化代码

This commit is contained in:
wuxw 2025-09-24 17:27:13 +08:00
parent e9417fb07f
commit 829c544e72

View File

@ -44,7 +44,7 @@
<el-form-item :label="$t('addInspectionPoint.itemId')" prop="itemId">
<el-select v-model="addInspectionPointInfo.itemId"
:placeholder="$t('addInspectionPoint.placeholder.itemId')" style="width: 100%;">
<el-option v-for="item in addInspectionPointInfo.items" :key="item.itemId" :label="item.itemName"
<el-option v-for="(item, index) in addInspectionPointInfo.items" :key="index" :label="item.itemName"
:value="item.itemId" />
</el-select>
</el-form-item>
@ -158,10 +158,10 @@ export default {
this.dialogVisible = true
this.resetForm()
this.getDictData()
this._listAddInspectionItems()
this.$nextTick(() => {
this.initMap()
this._listAddInspectionItems()
})
},