首先代码如下:
<view class="sear-title " v-for="(i,gindex) in inspection" :key="i.content">
<view class="sear-vie2">
<view class="sear-title1 ser-text">
<image class="ser-imgico" src="../../../static/scanico/0006.png"></image>
设备状况:
</view>
<view class="sear-title2 ser-text-wt">
<picker :range="i.state" @change="bindPickerChanges" :data-gindex="gindex">
<view class="">{{inspection[gIndex].state[indexs]}}</view>
</picker>
</view>
</view>
export default {
data() {
return {
indexs: 0,
gIndex: 0,
inspection: [{
cycle: '2小时',
image: '/static/scanico/01.png',
method: '测量',
content: '电机温度',
standdard: '温度小于等于60°',
state: ['设备状态正常1', '设备状态异常'],
},
{
cycle: '3小时',
image: '/static/scanico/02.png',
method: '目视对比',
content: '液位',
standdard: '液位计绿色区域内,差值在±10mm内',
state: ['设备状态正常2', '设备状态异常'],
},
{
cycle: '5小时',
image: '/static/scanico/04.png',
method: '目视对比',
content: '仪表',
standdard: '差值在±10mm内',
state: ['设备状态正常3', '设备状态异常'],
}
],
}
},
在页面上选择设备状况:后PICK栏选项时,页面上所有的PICK栏的数值都会改变为相同值,如何实现独立的选择。(如选择设备状态正常2,所有PICKER 栏的数值都会变成设备状态正常2)
0 个回复