1
|
1
|
<template>
|
2
|
2
|
<view class="status-page">
|
3
|
|
- <f-navbar navbarType="2" @leftClick="leftClick">
|
4
|
|
- <view class="u-flex search-top" slot="left">
|
|
3
|
+ <view style="margin-left:15rpx;background-color: #f8f9fa;position:fixed;top:0rpx;z-index: 99999;">
|
|
4
|
+ <view style="height:35rpx;background-color: #f8f9fa;"></view>
|
|
5
|
+ <view class="u-flex search-top">
|
5
|
6
|
<view class="search-main"><u--input @change="inputChanged" prefixIcon="search" placeholder="请输入组态名称" border="surround" shape="circle"></u--input></view>
|
6
|
7
|
</view>
|
7
|
|
- </f-navbar>
|
|
8
|
+ </view>
|
|
9
|
+ <view style="height:35rpx"></view>
|
8
|
10
|
<!-- 公共组件-每个页面必须引入 -->
|
9
|
11
|
<public-module></public-module>
|
|
12
|
+ <!-- 自带分页组件 -->
|
10
|
13
|
<mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback">
|
11
|
|
- <view class="status-container">
|
12
|
|
- <view @click="openConfigDetail(item.id)" v-for="(item, index) in list" :key="index" class="status-item u-flex">
|
13
|
|
- <view style="cursor: pointer;" class="item-image"><image class="image" :src="item.icon || defaultConfigImage"></image></view>
|
14
|
|
- <view class="item-text">
|
15
|
|
- <text class="text">{{ item.name }}</text>
|
|
14
|
+ <view class="configuation-container">
|
|
15
|
+ <view class="configuation-item">
|
|
16
|
+ <view @click="openConfigDetail(item.id)" v-for="(item, index) in list" :key="index" class="item">
|
|
17
|
+ <image class="image" :src="item.icon || defaultConfigImage"></image>
|
|
18
|
+ <text class="name">{{ item.name }}</text>
|
16
|
19
|
</view>
|
17
|
20
|
</view>
|
18
|
21
|
</view>
|
19
|
22
|
</mescroll-body>
|
|
23
|
+ <!-- 自带分页组件 -->
|
|
24
|
+ <view style="height: 60rpx;"></view>
|
20
|
25
|
</view>
|
21
|
26
|
</template>
|
22
|
27
|
|
23
|
28
|
<script>
|
24
|
|
-import fNavbar from '@/components/module/f-navbar/f-navbar';
|
25
|
29
|
import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
|
26
|
30
|
|
27
|
31
|
export default {
|
28
|
|
- components: {
|
29
|
|
- fNavbar
|
30
|
|
- },
|
31
|
32
|
mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
|
32
|
33
|
data() {
|
33
|
34
|
return {
|
|
35
|
+ defaultConfigImage: '../../../static/test.png',
|
34
|
36
|
page: {
|
35
|
37
|
num: 0,
|
36
|
38
|
size: 10
|
...
|
...
|
@@ -41,7 +43,6 @@ export default { |
41
|
43
|
upOption: {
|
42
|
44
|
auto: false // 不自动加载
|
43
|
45
|
},
|
44
|
|
- defaultConfigImage: '../../../static/test.png',
|
45
|
46
|
list: []
|
46
|
47
|
};
|
47
|
48
|
},
|
...
|
...
|
@@ -87,17 +88,18 @@ export default { |
87
|
88
|
this.page.num += 1;
|
88
|
89
|
this.loadData(this.page.num);
|
89
|
90
|
},
|
90
|
|
- loadData(pageNo, T) {
|
|
91
|
+ loadData(pageNo, organizationV) {
|
91
|
92
|
let httpData = {
|
92
|
93
|
page: pageNo,
|
93
|
94
|
pageSize: 10,
|
94
|
|
- name: T
|
|
95
|
+ name: organizationV
|
95
|
96
|
};
|
96
|
97
|
uni.$u.http
|
97
|
98
|
.get('/yt/configuration/center', { params: httpData, custom: { load: false } })
|
98
|
99
|
.then(res => {
|
99
|
100
|
uni.stopPullDownRefresh();
|
100
|
101
|
this.mescroll.endByPage(res.items.length, res.total);
|
|
102
|
+ this.cameraTotal = res.total;
|
101
|
103
|
if (pageNo == 1) {
|
102
|
104
|
this.list = res.items;
|
103
|
105
|
} else {
|
...
|
...
|
|