修改巡检模块状态错误问题
This commit is contained in:
parent
aee000cd6b
commit
1c01a7dcb7
@ -15,7 +15,7 @@
|
||||
<!-- 有选项时显示选项列表 -->
|
||||
<view v-else>
|
||||
<view v-for="option in pointsList"
|
||||
:key="option.point_id"
|
||||
:key="option.id"
|
||||
class="option-item"
|
||||
@click="selectPointHandler(option)">
|
||||
{{ option.point_info.point_name }}
|
||||
@ -87,12 +87,11 @@ export default {
|
||||
this.pointsList = res.task_point_info
|
||||
},
|
||||
selectPointHandler(option) {
|
||||
console.log("🚀 ~ selectPointHandler ~ option:", option)
|
||||
// 安全检查,确保必要的属性存在
|
||||
if (option && option.point_info && option.point_info.point_name) {
|
||||
// 根据实际数据结构选择正确的id属性
|
||||
this.selectedPoint = option.location_info && option.point_id
|
||||
? option.point_id
|
||||
this.selectedPoint = option.location_info && option.id
|
||||
? option.id
|
||||
: option.id || option.point_info.point_name
|
||||
this.selectedPointInfo = option // 保存完整的点位信息
|
||||
this.searchKeyword = option.point_info.point_name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user