| | |
| | | <view |
| | | class="spot_item" |
| | | v-for="item in spotList" |
| | | :key="item.id" |
| | | @click="navgetToDetail(item)"> |
| | | :key="item.id"> |
| | | <view class="spot_item_title"> |
| | | <span>设备编号:{{item.bigNumber}}</span> |
| | | <span>详情</span> |
| | | <span @click="navgetToDetail(item)">详情</span> |
| | | </view> |
| | | <view class="spot_item_content"> |
| | | <view class=""> |
| | |
| | | </view> |
| | | <view class=""> |
| | | <span class="label">设备类型:</span> |
| | | <span>{{item.bigTypeStr}}</span> |
| | | <span>{{item.bigType == 1 ? '特殊设备' : '一般设备'}}</span> |
| | | </view> |
| | | <view class=""> |
| | | <span class="label">点检时间:</span> |
| | |
| | | pageNum: 1, |
| | | pageSize: 10, |
| | | loadPage: '', |
| | | spotList: [{id: 1}, {id: 2}, {id: 3}], |
| | | spotList: [], |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.searchData(); |
| | | }, |
| | | onUnload() { |
| | | // 移除监听事件 |
| | | uni.$off('scancodedate'); |
| | | }, |
| | | methods: { |
| | | // 查询模具质检列表 |
| | |
| | | pageNum: this.pageNum, |
| | | pageSize: this.pageSize |
| | | }) |
| | | console.log(data); |
| | | return data; |
| | | }, |
| | | // 查询信息 |
| | |
| | | uni.$on('scancodedate', function(data) { |
| | | console.log(data.code); |
| | | if(data.code) { |
| | | uni.navigateTo({ |
| | | url: './deviceSpot' |
| | | const list = data.code ? data.code.split('bigDeviceId=') : []; |
| | | const codeStr = list.length > 0 ? list[list.length - 1] : ''; |
| | | that.$api.spot.getDeviceDetails({ |
| | | bigDeviceId: codeStr |
| | | }).then((res) => { |
| | | if(res.success) { |
| | | uni.$u.toast('扫描完成!'); |
| | | uni.navigateTo({ |
| | | url: './deviceSpot?deviceId=' + codeStr |
| | | }) |
| | | } else { |
| | | uni.$u.toast(res.statusMsg); |
| | | } |
| | | }) |
| | | uni.$off('scancodedate'); |
| | | } |
| | | // that.$api.spot.scanCheckMould({ |
| | | // mouldNum: data.code |
| | | // }).then((res) => { |
| | | // if(res.success) { |
| | | // uni.$u.toast('扫描完成!'); |
| | | // console.log(res,'==='); |
| | | // } else { |
| | | // uni.$u.toast(res.statusMsg); |
| | | // } |
| | | // }) |
| | | uni.$off('scancodedate'); |
| | | }) |
| | | }, |
| | | // 跳转详情 |
| | |
| | | url: './spotDetail?id=' + item.id |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |