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