Showing
5 changed files
with
230 additions
and
222 deletions
@@ -46,7 +46,7 @@ export default { | @@ -46,7 +46,7 @@ export default { | ||
46 | data() { | 46 | data() { |
47 | return { | 47 | return { |
48 | list: [{ name: '基础信息' }, { name: '实时数据' }, { name: '历史数据' }, { name: '告警记录' }, { name: '命令记录' }], | 48 | list: [{ name: '基础信息' }, { name: '实时数据' }, { name: '历史数据' }, { name: '告警记录' }, { name: '命令记录' }], |
49 | - currentTab: 3, | 49 | + currentTab: 0, |
50 | deviceId: '', | 50 | deviceId: '', |
51 | deviceDetail: {}, | 51 | deviceDetail: {}, |
52 | keys: [], | 52 | keys: [], |
@@ -20,8 +20,9 @@ | @@ -20,8 +20,9 @@ | ||
20 | </u-form-item> | 20 | </u-form-item> |
21 | <u-form-item @click="openType"><u-input shape="circle" v-model="timeData.getType" placeholder="请选择属性" disabled disabledColor="#377DFF0D" /></u-form-item> | 21 | <u-form-item @click="openType"><u-input shape="circle" v-model="timeData.getType" placeholder="请选择属性" disabled disabledColor="#377DFF0D" /></u-form-item> |
22 | </u-form> | 22 | </u-form> |
23 | - <view class="charts-box" v-if="historyData.length"><qiun-data-charts type="area" :chartData="chartData" :opts="{ xAxis: { disabled: true }, legend: { show: false } }" /></view> | ||
24 | - <view v-else style="display: flex;justify-content: center; align-items: center;"> | 23 | + <view class="charts-box" v-show="historyData.length"><qiun-data-charts type="area" canvas2d canvasId="daskujdhasljkdcnzjkdfhuoqwlqwjhkdsamjczxnmdasd123321" :chartData="chartData" :opts="{ xAxis: { disabled: true }, legend: { show: false } }" /></view> |
24 | + <view v-if="!historyData.length" style="display: flex;justify-content: center; align-items: center;"> | ||
25 | + {{historyData.length}} | ||
25 | <view> | 26 | <view> |
26 | <image src="../../../static/empty.png" style="width: 160rpx;height: 160rpx;" /> | 27 | <image src="../../../static/empty.png" style="width: 160rpx;height: 160rpx;" /> |
27 | <view style="text-align: center; color:#e8e8e8;padding-bottom: 30rpx;">暂无数据</view> | 28 | <view style="text-align: center; color:#e8e8e8;padding-bottom: 30rpx;">暂无数据</view> |
1 | -{ | ||
2 | - "easycom": { | ||
3 | - "^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue" | ||
4 | - }, | ||
5 | - "pages": [{ | ||
6 | - "path": "pages/index/index", | ||
7 | - "style": { | ||
8 | - "navigationBarTitleText": "首页" | ||
9 | - } | ||
10 | - }, | ||
11 | - { | ||
12 | - "path": "pages/device/device", | ||
13 | - "style": { | ||
14 | - "navigationBarTitleText": "设备" | ||
15 | - } | ||
16 | - }, | ||
17 | - { | ||
18 | - "path": "pages/device/org/org", | ||
19 | - "style": { | ||
20 | - "navigationBarTitleText": "组织筛选" | ||
21 | - } | ||
22 | - }, | ||
23 | - { | ||
24 | - "path": "pages/alarm/alarm", | ||
25 | - "style": { | ||
26 | - "navigationBarTitleText": "告警" | ||
27 | - } | ||
28 | - }, | ||
29 | - { | ||
30 | - "path": "pages/alarm/org/org", | ||
31 | - "style": { | ||
32 | - "navigationBarTitleText": "组织筛选" | ||
33 | - } | ||
34 | - }, | ||
35 | - { | ||
36 | - "path": "pages/personal/personal", | ||
37 | - "style": { | ||
38 | - "navigationBarTitleText": "个人中心" | ||
39 | - } | ||
40 | - }, | ||
41 | - { | ||
42 | - "path": "pages/index/camera/camera", | ||
43 | - "style": { | ||
44 | - "navigationBarTitleText": "查看摄像头" | ||
45 | - } | ||
46 | - }, | ||
47 | - { | ||
48 | - "path": "pages/index/camera/org/org", | ||
49 | - "style": { | ||
50 | - "navigationBarTitleText": "组织筛选" | ||
51 | - } | ||
52 | - }, { | ||
53 | - "path": "pages/index/configuration/configuration", | ||
54 | - "style": { | ||
55 | - "navigationBarTitleText": "查看组态" | ||
56 | - } | ||
57 | - | ||
58 | - }, | ||
59 | - { | ||
60 | - "path": "pages/index/configuration/configurationDetail", | ||
61 | - "style": { | ||
62 | - "navigationBarTitleText": "组态详情" | ||
63 | - } | ||
64 | - } | ||
65 | - ], | ||
66 | - "subPackages": [{ | ||
67 | - "root": "alarmSubPage", | ||
68 | - "pages": [{ | ||
69 | - "path": "alarmDetailPage/alarmDetail", | ||
70 | - "style": { | ||
71 | - "navigationBarTitleText": "告警详情" | ||
72 | - } | ||
73 | - }] | ||
74 | - }, | ||
75 | - { | ||
76 | - "root": "deviceSubPage", | ||
77 | - "pages": [{ | ||
78 | - "path": "deviceDetailPage/deviceDetail", | ||
79 | - "style": { | ||
80 | - "navigationBarTitleText": "设备详情" | ||
81 | - } | ||
82 | - }, | ||
83 | - { | ||
84 | - "path": "deviceDetailPage/tabDetail/CommandDetail", | 1 | +{ |
2 | + "easycom": { | ||
3 | + "^u-(.*)": "@/uni_modules/uview-ui/components/u-$1/u-$1.vue" | ||
4 | + }, | ||
5 | + "pages": [{ | ||
6 | + "path": "pages/index/index", | ||
7 | + "style": { | ||
8 | + "navigationBarTitleText": "首页" | ||
9 | + } | ||
10 | + }, | ||
11 | + { | ||
12 | + "path": "pages/device/device", | ||
13 | + "style": { | ||
14 | + "navigationBarTitleText": "设备" | ||
15 | + } | ||
16 | + }, | ||
17 | + { | ||
18 | + "path": "pages/device/org/org", | ||
19 | + "style": { | ||
20 | + "navigationBarTitleText": "组织筛选" | ||
21 | + } | ||
22 | + }, | ||
23 | + { | ||
24 | + "path": "pages/alarm/alarm", | ||
25 | + "style": { | ||
26 | + "navigationBarTitleText": "告警" | ||
27 | + } | ||
28 | + }, | ||
29 | + { | ||
30 | + "path": "pages/alarm/org/org", | ||
31 | + "style": { | ||
32 | + "navigationBarTitleText": "组织筛选" | ||
33 | + } | ||
34 | + }, | ||
35 | + { | ||
36 | + "path": "pages/personal/personal", | ||
37 | + "style": { | ||
38 | + "navigationBarTitleText": "个人中心" | ||
39 | + } | ||
40 | + }, | ||
41 | + { | ||
42 | + "path": "pages/index/camera/camera", | ||
43 | + "style": { | ||
44 | + "navigationBarTitleText": "查看摄像头" | ||
45 | + } | ||
46 | + }, | ||
47 | + { | ||
48 | + "path": "pages/index/camera/org/org", | ||
49 | + "style": { | ||
50 | + "navigationBarTitleText": "组织筛选" | ||
51 | + } | ||
52 | + }, { | ||
53 | + "path": "pages/index/configuration/configuration", | ||
54 | + "style": { | ||
55 | + "navigationBarTitleText": "查看组态" | ||
56 | + } | ||
57 | + | ||
58 | + }, | ||
59 | + { | ||
60 | + "path": "pages/index/configuration/configurationDetail", | ||
61 | + "style": { | ||
62 | + "navigationBarTitleText": "组态详情" | ||
63 | + } | ||
64 | + } | ||
65 | + ], | ||
66 | + "subPackages": [{ | ||
67 | + "root": "alarmSubPage", | ||
68 | + "pages": [{ | ||
69 | + "path": "alarmDetailPage/alarmDetail", | ||
85 | "style": { | 70 | "style": { |
86 | - "navigationBarTitleText": "命令详情" | 71 | + "navigationBarTitleText": "告警详情" |
72 | + } | ||
73 | + }] | ||
74 | + }, | ||
75 | + { | ||
76 | + "root": "deviceSubPage", | ||
77 | + "pages": [{ | ||
78 | + "path": "deviceDetailPage/deviceDetail", | ||
79 | + "style": { | ||
80 | + "navigationBarTitleText": "设备详情" | ||
81 | + } | ||
82 | + }, | ||
83 | + { | ||
84 | + "path": "deviceDetailPage/tabDetail/CommandDetail", | ||
85 | + "style": { | ||
86 | + "navigationBarTitleText": "命令详情" | ||
87 | + } | ||
88 | + } | ||
89 | + ] | ||
90 | + }, | ||
91 | + { | ||
92 | + "root": "sysNotifySubPage", | ||
93 | + "pages": [{ | ||
94 | + "path": "sysNotifyPage/systemNotify", | ||
95 | + "style": { | ||
96 | + "navigationBarTitleText": "系统通知" | ||
97 | + } | ||
98 | + }, | ||
99 | + { | ||
100 | + "path": "sysNotifyPage/notifyDetail", | ||
101 | + "style": { | ||
102 | + "navigationBarTitleText": "通知详情" | ||
103 | + } | ||
104 | + } | ||
105 | + ] | ||
106 | + }, | ||
107 | + { | ||
108 | + "root": "feedBackSubPage", | ||
109 | + "pages": [{ | ||
110 | + "path": "feedback/feedback", | ||
111 | + "style": { | ||
112 | + "navigationBarTitleText": "意见反馈" | ||
113 | + } | ||
114 | + }] | ||
115 | + }, | ||
116 | + { | ||
117 | + "root": "publicLoginSubPage", | ||
118 | + "pages": [{ | ||
119 | + "path": "public/login", | ||
120 | + "style": { | ||
121 | + "navigationBarTitleText": "登录" | ||
122 | + } | ||
123 | + }, | ||
124 | + { | ||
125 | + "path": "other/set", | ||
126 | + "style": { | ||
127 | + "navigationBarTitleText": "个人资料" | ||
128 | + } | ||
129 | + }, | ||
130 | + { | ||
131 | + "path": "other/code", | ||
132 | + "style": { | ||
133 | + "navigationBarTitleText": "验证码登录" | ||
134 | + } | ||
135 | + }, | ||
136 | + { | ||
137 | + "path": "other/findPassword", | ||
138 | + "style": { | ||
139 | + "navigationBarTitleText": "忘记密码" | ||
140 | + } | ||
87 | } | 141 | } |
88 | - }] | ||
89 | - }, | ||
90 | - { | ||
91 | - "root": "sysNotifySubPage", | ||
92 | - "pages": [{ | ||
93 | - "path": "sysNotifyPage/systemNotify", | ||
94 | - "style": { | ||
95 | - "navigationBarTitleText": "系统通知" | ||
96 | - } | ||
97 | - }, | ||
98 | - { | ||
99 | - "path": "sysNotifyPage/notifyDetail", | ||
100 | - "style": { | ||
101 | - "navigationBarTitleText": "通知详情" | ||
102 | - } | ||
103 | - } | ||
104 | - ] | ||
105 | - }, | ||
106 | - { | ||
107 | - "root": "feedBackSubPage", | ||
108 | - "pages": [{ | ||
109 | - "path": "feedback/feedback", | ||
110 | - "style": { | ||
111 | - "navigationBarTitleText": "意见反馈" | ||
112 | - } | ||
113 | - }] | ||
114 | - }, | ||
115 | - { | ||
116 | - "root": "publicLoginSubPage", | ||
117 | - "pages": [{ | ||
118 | - "path": "public/login", | ||
119 | - "style": { | ||
120 | - "navigationBarTitleText": "登录" | ||
121 | - } | ||
122 | - }, | ||
123 | - { | ||
124 | - "path": "other/set", | ||
125 | - "style": { | ||
126 | - "navigationBarTitleText": "个人资料" | ||
127 | - } | ||
128 | - }, | ||
129 | - { | ||
130 | - "path": "other/code", | ||
131 | - "style": { | ||
132 | - "navigationBarTitleText": "验证码登录" | ||
133 | - } | ||
134 | - }, | ||
135 | - { | ||
136 | - "path": "other/findPassword", | ||
137 | - "style": { | ||
138 | - "navigationBarTitleText": "忘记密码" | ||
139 | - } | ||
140 | - } | ||
141 | - ] | ||
142 | - } | ||
143 | - ], | ||
144 | - "globalStyle": { | ||
145 | - "navigationBarTextStyle": "black", | ||
146 | - "navigationBarTitleText": "云腾app", | ||
147 | - "navigationBarBackgroundColor": "#FFFFFF", | ||
148 | - "backgroundColor": "#FFFFFF" | ||
149 | - }, | ||
150 | - "tabBar": { | ||
151 | - "color": "#ffffff", | ||
152 | - "selectedColor": "#ffffff", | ||
153 | - "borderStyle": "black", | ||
154 | - "backgroundColor": "#ffffff", | ||
155 | - "list": [{ | ||
156 | - "pagePath": "pages/index/index", | ||
157 | - "iconPath": "static/basics.png", | ||
158 | - "selectedIconPath": "static/basics.png", | ||
159 | - "text": "首页" | ||
160 | - }, | ||
161 | - { | ||
162 | - "pagePath": "pages/device/device", | ||
163 | - "iconPath": "static/basics.png", | ||
164 | - "selectedIconPath": "static/basics.png", | ||
165 | - "text": "设备" | ||
166 | - }, | ||
167 | - { | ||
168 | - "pagePath": "pages/alarm/alarm", | ||
169 | - "iconPath": "static/basics.png", | ||
170 | - "selectedIconPath": "static/basics.png", | ||
171 | - "text": "告警" | ||
172 | - }, | ||
173 | - { | ||
174 | - "pagePath": "pages/personal/personal", | ||
175 | - "iconPath": "static/basics.png", | ||
176 | - "selectedIconPath": "static/basics.png", | ||
177 | - "text": "我的" | ||
178 | - } | ||
179 | - ] | ||
180 | - } | 142 | + ] |
143 | + } | ||
144 | + ], | ||
145 | + "globalStyle": { | ||
146 | + "navigationBarTextStyle": "black", | ||
147 | + "navigationBarTitleText": "云腾app", | ||
148 | + "navigationBarBackgroundColor": "#FFFFFF", | ||
149 | + "backgroundColor": "#FFFFFF" | ||
150 | + }, | ||
151 | + "tabBar": { | ||
152 | + "color": "#ffffff", | ||
153 | + "selectedColor": "#ffffff", | ||
154 | + "borderStyle": "black", | ||
155 | + "backgroundColor": "#ffffff", | ||
156 | + "list": [{ | ||
157 | + "pagePath": "pages/index/index", | ||
158 | + "iconPath": "static/basics.png", | ||
159 | + "selectedIconPath": "static/basics.png", | ||
160 | + "text": "首页" | ||
161 | + }, | ||
162 | + { | ||
163 | + "pagePath": "pages/device/device", | ||
164 | + "iconPath": "static/basics.png", | ||
165 | + "selectedIconPath": "static/basics.png", | ||
166 | + "text": "设备" | ||
167 | + }, | ||
168 | + { | ||
169 | + "pagePath": "pages/alarm/alarm", | ||
170 | + "iconPath": "static/basics.png", | ||
171 | + "selectedIconPath": "static/basics.png", | ||
172 | + "text": "告警" | ||
173 | + }, | ||
174 | + { | ||
175 | + "pagePath": "pages/personal/personal", | ||
176 | + "iconPath": "static/basics.png", | ||
177 | + "selectedIconPath": "static/basics.png", | ||
178 | + "text": "我的" | ||
179 | + } | ||
180 | + ] | ||
181 | + } | ||
181 | } | 182 | } |
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"><u--input prefixIcon="search" placeholder="输入设备SN或名称搜索" border="surround" shape="circle" @change="inputChanged"></u--input></view> | ||
6 | - </view> | ||
7 | - <view @click="openSearchDialog" slot="right" class="u-flex"> | ||
8 | - <text style="color: #333; font-size: 14px">筛选</text> | ||
9 | - <image style="width: 40rpx; height: 40rpx" src="../../static/shaixuan.png" /> | ||
10 | - </view> | ||
11 | - </f-navbar> | ||
12 | <!-- 公共组件-每个页面必须引入 --> | 3 | <!-- 公共组件-每个页面必须引入 --> |
13 | <public-module></public-module> | 4 | <public-module></public-module> |
14 | - <view class="org-sty" @click="openOrg"> | ||
15 | - <view class="org-item"> | ||
16 | - <view class="u-flex" style="margin-top: 26rpx; margin-left: 15rpx"><text style="color: #333; font-size: 15px; margin-left: 14rpx">组织关系</text></view> | ||
17 | - <view style="margin-top: 20rpx; margin-left: 15rpx" class="u-flex" v-if="total"> | ||
18 | - <image style="margin-left: 14rpx; width: 30rpx; height: 30rpx" src="../../static/org.png" /> | ||
19 | - <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> | ||
20 | </view> | 26 | </view> |
21 | </view> | 27 | </view> |
22 | - <view class="org-item"> | ||
23 | - <image | ||
24 | - style=" | ||
25 | - width: 6px; | ||
26 | - height: 10px; | ||
27 | - float: right; | ||
28 | - margin-right: 34rpx; | ||
29 | - margin-top: 58rpx; | ||
30 | - " | ||
31 | - src="../../static/right-arrow.png" | ||
32 | - /> | ||
33 | - </view> | ||
34 | - </view> | 28 | + </u-sticky> |
35 | <mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> | 29 | <mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> |
36 | <view class="device-list"> | 30 | <view class="device-list"> |
37 | <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"> |
@@ -112,6 +106,7 @@ import fTabbar from '@/components/module/f-tabbar/f-tabbar'; | @@ -112,6 +106,7 @@ import fTabbar from '@/components/module/f-tabbar/f-tabbar'; | ||
112 | import fNavbar from '@/components/module/f-navbar/f-navbar'; | 106 | import fNavbar from '@/components/module/f-navbar/f-navbar'; |
113 | import FilterItem from './FilterItem.vue'; | 107 | import FilterItem from './FilterItem.vue'; |
114 | 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 | + | ||
115 | import { debounce } from '@/plugins/throttle.js'; | 110 | import { debounce } from '@/plugins/throttle.js'; |
116 | export default { | 111 | export default { |
117 | mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件) | 112 | mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件) |
@@ -305,18 +300,31 @@ export default { | @@ -305,18 +300,31 @@ export default { | ||
305 | min-height: 100vh; | 300 | min-height: 100vh; |
306 | background-color: #f8f9fa; | 301 | background-color: #f8f9fa; |
307 | } | 302 | } |
308 | - | ||
309 | -.org-sty { | ||
310 | - width: 750rpx; | ||
311 | - height: 150rpx; | ||
312 | - margin-top: 1rpx; | 303 | +.device-top { |
304 | + padding: 10rpx 30rpx; | ||
313 | background-color: #fff; | 305 | background-color: #fff; |
314 | - display: flex; | ||
315 | - justify-content: space-between; | ||
316 | - | ||
317 | - .org-item { | ||
318 | - width: 350rpx; | ||
319 | - height: 200rpx; | 306 | + .search { |
307 | + display: flex; | ||
308 | + justify-content: space-between; | ||
309 | + padding-bottom: 10rpx; | ||
310 | + border-bottom: 1px solid #f5f5f5; | ||
311 | + .search-left { | ||
312 | + width: 580rpx; | ||
313 | + background-color: #f8f9fa; | ||
314 | + border-radius: 200rpx; | ||
315 | + } | ||
316 | + .search-right { | ||
317 | + display: flex; | ||
318 | + align-items: center; | ||
319 | + text { | ||
320 | + color: #333; | ||
321 | + font-size: 14px; | ||
322 | + } | ||
323 | + image { | ||
324 | + width: 40rpx; | ||
325 | + height: 40rpx; | ||
326 | + } | ||
327 | + } | ||
320 | } | 328 | } |
321 | } | 329 | } |
322 | 330 | ||
@@ -324,7 +332,6 @@ export default { | @@ -324,7 +332,6 @@ export default { | ||
324 | display: flex; | 332 | display: flex; |
325 | flex-direction: column; | 333 | flex-direction: column; |
326 | padding-left: 20rpx; | 334 | padding-left: 20rpx; |
327 | - | ||
328 | .list-item { | 335 | .list-item { |
329 | width: 713rpx; | 336 | width: 713rpx; |
330 | height: 200rpx; | 337 | height: 200rpx; |
@@ -333,7 +340,6 @@ export default { | @@ -333,7 +340,6 @@ export default { | ||
333 | display: flex; | 340 | display: flex; |
334 | border-radius: 10px; | 341 | border-radius: 10px; |
335 | justify-content: space-between; | 342 | justify-content: space-between; |
336 | - | ||
337 | .item { | 343 | .item { |
338 | margin: 30rpx; | 344 | margin: 30rpx; |
339 | } | 345 | } |