|
@@ -13,7 +13,7 @@
|
|
|
<van-search class='equipment-search' v-model='keyword' placeholder='请输入设备简称或设备内编码' @search='onSearch' @focus='focus'></van-search>
|
|
|
</div>
|
|
|
<!-- 设备列表 -->
|
|
|
- <div class='equipment-list' v-if='list.length'>
|
|
|
+ <div class='equipment-list' v-if='list.length' ref='wrapper'>
|
|
|
<van-list v-model='loading' :finished='finished' finished-text='没有更多了' :offset='20' :immediate-check='false' @load='onLoad'>
|
|
|
<!-- <van-cell v-for='item in list' :key='item' :title='item' /> -->
|
|
|
<van-cell is-link v-for='item in list' @click='goToDetail(item)' :key='item.classstructureid'>
|
|
@@ -134,8 +134,8 @@ export default {
|
|
|
...mapGetters(['plazaId', 'smsxt', 'categoryId']),
|
|
|
},
|
|
|
activated() {
|
|
|
- console.log('----------activated')
|
|
|
- console.log(this.$route)
|
|
|
+ // TODO: 记录滚动条位置
|
|
|
+ // this.$refs.wrapper && (this.$refs.wrapper.scrollTop = this.scroll)
|
|
|
if (this.$route.params.from === 'indexPage') {
|
|
|
this.initPage()
|
|
|
}
|
|
@@ -147,7 +147,6 @@ export default {
|
|
|
// let { title, category_code } = this.$route.query
|
|
|
// this.title = title
|
|
|
// this.category_code = category_code
|
|
|
-
|
|
|
// this.onLoad() --会与 activated 中查询重复
|
|
|
},
|
|
|
beforeMount() {},
|
|
@@ -284,6 +283,8 @@ export default {
|
|
|
* 跳转设备详情页
|
|
|
*/
|
|
|
goToDetail(item) {
|
|
|
+ // let wrapperScrollTop = this.$refs.wrapper.scrollTop
|
|
|
+ // this.scroll = wrapperScrollTop
|
|
|
const { assetid } = item
|
|
|
assetid && this.$router.push({ name: 'AssetDetail', query: { assetid } })
|
|
|
},
|