1
|
<template>
|
1
|
<template>
|
2
|
<view class="device-page">
|
2
|
<view class="device-page">
|
3
|
- <f-navbar>
|
|
|
4
|
- <view slot="left">
|
|
|
5
|
- <view style="width: 580rpx">
|
|
|
6
|
- <u--input prefixIcon="search" placeholder="输入设备SN或名称搜索" border="surround" shape="circle" @change="inputChanged"></u--input>
|
|
|
7
|
- </view>
|
|
|
8
|
- </view>
|
|
|
9
|
- <view @click="openSearchDialog" slot="right" class="u-flex">
|
|
|
10
|
- <text style="color: #333; font-size: 14px">筛选</text>
|
|
|
11
|
- <image style="width: 40rpx; height: 40rpx" src="../../static/shaixuan.png" />
|
|
|
12
|
- </view>
|
|
|
13
|
- </f-navbar>
|
|
|
14
|
<!-- 公共组件-每个页面必须引入 -->
|
3
|
<!-- 公共组件-每个页面必须引入 -->
|
15
|
<public-module></public-module>
|
4
|
<public-module></public-module>
|
16
|
- <view class="org-sty" @click="openOrg">
|
|
|
17
|
- <view class="org-item">
|
|
|
18
|
- <view class="u-flex" style="margin-top: 26rpx; margin-left: 15rpx"><text style="color: #333; font-size: 15px; margin-left: 14rpx">组织关系</text></view>
|
|
|
19
|
- <view style="margin-top: 20rpx; margin-left: 15rpx" class="u-flex" v-if="total">
|
|
|
20
|
- <image style="margin-left: 14rpx; width: 30rpx; height: 30rpx" src="../../static/org.png" />
|
|
|
21
|
- <text style="margin-left: 10rpx; color: #666; font-size: 12px">设备数 : {{ total }}</text>
|
5
|
+ <u-sticky>
|
|
|
6
|
+ <view class="device-top">
|
|
|
7
|
+ <view class="search">
|
|
|
8
|
+ <view>
|
|
|
9
|
+ <view class="search-left"><u--input prefixIcon="search" placeholder="输入设备SN或名称搜索" shape="circle" @change="inputChanged"></u--input></view>
|
|
|
10
|
+ </view>
|
|
|
11
|
+ <view @click="openSearchDialog" class="search-right">
|
|
|
12
|
+ <text>筛选</text>
|
|
|
13
|
+ <image src="../../static/shaixuan.png" />
|
|
|
14
|
+ </view>
|
|
|
15
|
+ </view>
|
|
|
16
|
+ <view class="org">
|
|
|
17
|
+ <u-cell @click="openOrg" isLink title="组织关系" :border="false">
|
|
|
18
|
+ <view slot="label" class="label" style="display: flex; align-items: center;margin-top: 20rpx;">
|
|
|
19
|
+ <image src="../../static/org.png" style="width: 24rpx;height: 28rpx;"></image>
|
|
|
20
|
+ <view style="margin-left: 10rpx; color: #666;">
|
|
|
21
|
+ 设备数:
|
|
|
22
|
+ <text style="margin-left: 20rpx;">{{ total }}</text>
|
|
|
23
|
+ </view>
|
|
|
24
|
+ </view>
|
|
|
25
|
+ </u-cell>
|
22
|
</view>
|
26
|
</view>
|
23
|
</view>
|
27
|
</view>
|
24
|
- <view class="org-item">
|
|
|
25
|
- <image
|
|
|
26
|
- style="
|
|
|
27
|
- width: 6px;
|
|
|
28
|
- height: 10px;
|
|
|
29
|
- float: right;
|
|
|
30
|
- margin-right: 34rpx;
|
|
|
31
|
- margin-top: 58rpx;
|
|
|
32
|
- "
|
|
|
33
|
- src="../../static/right-arrow.png"
|
|
|
34
|
- />
|
|
|
35
|
- </view>
|
|
|
36
|
- </view>
|
|
|
37
|
- <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback" @up="upCallback">
|
28
|
+ </u-sticky>
|
|
|
29
|
+ <mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback">
|
38
|
<view class="device-list">
|
30
|
<view class="device-list">
|
39
|
<view @click="openDeviceDetail(item.id, item.alarmStatus, item.lastOnlineTime, item.tbDeviceId)" class="list-item" v-for="item in list" :key="item.id">
|
31
|
<view @click="openDeviceDetail(item.id, item.alarmStatus, item.lastOnlineTime, item.tbDeviceId)" class="list-item" v-for="item in list" :key="item.id">
|
40
|
<view
|
32
|
<view
|
|
@@ -70,13 +62,7 @@ |
|
@@ -70,13 +62,7 @@ |
70
|
margin-top: 5rpx;
|
62
|
margin-top: 5rpx;
|
71
|
margin-right: 5rpx;
|
63
|
margin-right: 5rpx;
|
72
|
"
|
64
|
"
|
73
|
- :src="
|
|
|
74
|
- item.deviceState === 'ONLINE'
|
|
|
75
|
- ? '../../static/online.png'
|
|
|
76
|
- : item.deviceState === 'INACTIVE'
|
|
|
77
|
- ? '../../static/unonline.png'
|
|
|
78
|
- : '../../static/baojing.png'
|
|
|
79
|
- "
|
65
|
+ :src="item.deviceState === 'ONLINE' ? '../../static/online.png' : item.deviceState === 'INACTIVE' ? '../../static/unonline.png' : '../../static/baojing.png'"
|
80
|
/>
|
66
|
/>
|
81
|
|
67
|
|
82
|
<view>
|
68
|
<view>
|
|
@@ -120,6 +106,7 @@ import fTabbar from '@/components/module/f-tabbar/f-tabbar'; |
|
@@ -120,6 +106,7 @@ import fTabbar from '@/components/module/f-tabbar/f-tabbar'; |
120
|
import fNavbar from '@/components/module/f-navbar/f-navbar';
|
106
|
import fNavbar from '@/components/module/f-navbar/f-navbar';
|
121
|
import FilterItem from './FilterItem.vue';
|
107
|
import FilterItem from './FilterItem.vue';
|
122
|
import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
|
108
|
import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
|
|
|
109
|
+
|
123
|
import { debounce } from '@/plugins/throttle.js';
|
110
|
import { debounce } from '@/plugins/throttle.js';
|
124
|
export default {
|
111
|
export default {
|
125
|
mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
|
112
|
mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
|
|
@@ -358,4 +345,4 @@ export default { |
|
@@ -358,4 +345,4 @@ export default { |
358
|
}
|
345
|
}
|
359
|
}
|
346
|
}
|
360
|
}
|
347
|
}
|
361
|
-</style> |
348
|
+</style> |