Commit 924b061083bde5d35b2ba367e2f43a207603a072
Merge branch 'ft-dev' into 'main'
fix:修改告警查询,显示所属组织,设备跳转查询 See merge request huang/thingskit-app!28
Showing
13 changed files
with
270 additions
and
222 deletions
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | </view> | 26 | </view> |
27 | <view class="column"> | 27 | <view class="column"> |
28 | <text class="text-org-bold">所属组织:</text> | 28 | <text class="text-org-bold">所属组织:</text> |
29 | - <text class="text-device-muted">{{ list.organizationName }}</text> | 29 | + <text class="text-device-muted">{{ list.organizationName == null ? '暂无数据' : list.organizationName }}</text> |
30 | </view> | 30 | </view> |
31 | <view class="column"> | 31 | <view class="column"> |
32 | <text class="text-org-bold">告警值:</text> | 32 | <text class="text-org-bold">告警值:</text> |
@@ -120,11 +120,15 @@ export default { | @@ -120,11 +120,15 @@ export default { | ||
120 | let page = currentPages[currentPages.length - 1]; | 120 | let page = currentPages[currentPages.length - 1]; |
121 | this.path = page.route; | 121 | this.path = page.route; |
122 | //获取页面路径 | 122 | //获取页面路径 |
123 | - this.list.forEach((item, index) => { | ||
124 | - if (this.path == item.url) { | ||
125 | - this.tabIndex = index; | ||
126 | - } | ||
127 | - }); | 123 | + console.log('页面路径', this.list); |
124 | + if (this.list.length > 0) { | ||
125 | + this.list?.forEach((item, index) => { | ||
126 | + if (this.path == item.url) { | ||
127 | + this.tabIndex = index; | ||
128 | + } | ||
129 | + }); | ||
130 | + } | ||
131 | + this.loadData(); | ||
128 | }, | 132 | }, |
129 | methods: { | 133 | methods: { |
130 | loadData() { | 134 | loadData() { |
@@ -4,6 +4,7 @@ import { | @@ -4,6 +4,7 @@ import { | ||
4 | let baseUrl = ""; | 4 | let baseUrl = ""; |
5 | if (process.env.NODE_ENV === 'development') { | 5 | if (process.env.NODE_ENV === 'development') { |
6 | // 开发环境 | 6 | // 开发环境 |
7 | + // baseUrl = 'http://192.168.10.115:8080/api' | ||
7 | baseUrl = 'https://dev.thingskit.com/api' | 8 | baseUrl = 'https://dev.thingskit.com/api' |
8 | } else if (process.env.NODE_ENV === 'production') { | 9 | } else if (process.env.NODE_ENV === 'production') { |
9 | // 生产环境 | 10 | // 生产环境 |
@@ -110,7 +110,7 @@ uni.$u.http.interceptors.response.use( | @@ -110,7 +110,7 @@ uni.$u.http.interceptors.response.use( | ||
110 | }); | 110 | }); |
111 | store.commit("emptyUserInfo"); | 111 | store.commit("emptyUserInfo"); |
112 | } else if (message == "Invalid username or password") { | 112 | } else if (message == "Invalid username or password") { |
113 | - errorData = "用户名或者密码无效"; | 113 | + // errorData = "用户名或者密码无效"; |
114 | uni.reLaunch({ | 114 | uni.reLaunch({ |
115 | url: "/publicLoginSubPage/public/login", | 115 | url: "/publicLoginSubPage/public/login", |
116 | }); | 116 | }); |
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | <u--input placeholder="请输入邮箱" v-model="feedbackData.feedbackInfo.email" border="none"></u--input> | 20 | <u--input placeholder="请输入邮箱" v-model="feedbackData.feedbackInfo.email" border="none"></u--input> |
21 | </u-form-item> | 21 | </u-form-item> |
22 | <u-form-item label="图片" prop="feedbackInfo.images" borderBottom ref="item1"> | 22 | <u-form-item label="图片" prop="feedbackInfo.images" borderBottom ref="item1"> |
23 | - <u-upload :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="6"></u-upload> | 23 | + <u-upload :sizeType="compressed" :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="6"></u-upload> |
24 | </u-form-item> | 24 | </u-form-item> |
25 | <u-form-item required label="反馈" prop="feedbackInfo.message" borderBottom ref="item1"> | 25 | <u-form-item required label="反馈" prop="feedbackInfo.message" borderBottom ref="item1"> |
26 | <u--textarea placeholder="请输入反馈信息" v-model="feedbackData.feedbackInfo.message" count></u--textarea> | 26 | <u--textarea placeholder="请输入反馈信息" v-model="feedbackData.feedbackInfo.message" count></u--textarea> |
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 | + "navigationStyle": "custom", // 隐藏系统导航栏 | ||
27 | + "navigationBarTitleText": "告警" | ||
28 | + } | ||
29 | + }, | ||
30 | + { | ||
31 | + "path": "pages/alarm/org/org", | ||
32 | + "style": { | ||
33 | + "navigationBarTitleText": "组织筛选" | ||
34 | + } | ||
35 | + }, | ||
36 | + { | ||
37 | + "path": "pages/personal/personal", | ||
38 | + "style": { | ||
39 | + "navigationBarTitleText": "个人中心" | ||
40 | + } | ||
41 | + }, | ||
42 | + { | ||
43 | + "path": "pages/index/camera/camera", | ||
44 | + "style": { | ||
45 | + "navigationBarTitleText": "查看摄像头" | ||
46 | + } | ||
47 | + }, | ||
48 | + { | ||
49 | + "path": "pages/index/camera/org/org", | ||
50 | + "style": { | ||
51 | + "navigationBarTitleText": "组织筛选" | ||
52 | + } | ||
53 | + }, { | ||
54 | + "path": "pages/index/configuration/configuration", | ||
55 | + "style": { | ||
56 | + "navigationBarTitleText": "查看组态" | ||
57 | + } | ||
58 | + | ||
59 | + }, | ||
60 | + { | ||
61 | + "path": "pages/index/configuration/configurationDetail", | ||
62 | + "style": { | ||
63 | + "navigationBarTitleText": "组态详情" | ||
64 | + } | ||
65 | + } | ||
66 | + ], | ||
67 | + "subPackages": [{ | ||
68 | + "root": "alarmSubPage", | ||
69 | + "pages": [{ | ||
70 | + "path": "alarmDetailPage/alarmDetail", | ||
85 | "style": { | 71 | "style": { |
86 | - "navigationBarTitleText": "命令详情" | 72 | + "navigationBarTitleText": "告警详情" |
73 | + } | ||
74 | + }] | ||
75 | + }, | ||
76 | + { | ||
77 | + "root": "deviceSubPage", | ||
78 | + "pages": [{ | ||
79 | + "path": "deviceDetailPage/deviceDetail", | ||
80 | + "style": { | ||
81 | + "navigationBarTitleText": "设备详情" | ||
82 | + } | ||
83 | + }, | ||
84 | + { | ||
85 | + "path": "deviceDetailPage/tabDetail/CommandDetail", | ||
86 | + "style": { | ||
87 | + "navigationBarTitleText": "命令详情" | ||
88 | + } | ||
89 | + } | ||
90 | + ] | ||
91 | + }, | ||
92 | + { | ||
93 | + "root": "sysNotifySubPage", | ||
94 | + "pages": [{ | ||
95 | + "path": "sysNotifyPage/systemNotify", | ||
96 | + "style": { | ||
97 | + "navigationBarTitleText": "系统通知" | ||
98 | + } | ||
99 | + }, | ||
100 | + { | ||
101 | + "path": "sysNotifyPage/notifyDetail", | ||
102 | + "style": { | ||
103 | + "navigationBarTitleText": "通知详情" | ||
104 | + } | ||
105 | + } | ||
106 | + ] | ||
107 | + }, | ||
108 | + { | ||
109 | + "root": "feedBackSubPage", | ||
110 | + "pages": [{ | ||
111 | + "path": "feedback/feedback", | ||
112 | + "style": { | ||
113 | + "navigationBarTitleText": "意见反馈" | ||
114 | + } | ||
115 | + }] | ||
116 | + }, | ||
117 | + { | ||
118 | + "root": "publicLoginSubPage", | ||
119 | + "pages": [{ | ||
120 | + "path": "public/login", | ||
121 | + "style": { | ||
122 | + "navigationBarTitleText": "登录" | ||
123 | + } | ||
124 | + }, | ||
125 | + { | ||
126 | + "path": "other/set", | ||
127 | + "style": { | ||
128 | + "navigationBarTitleText": "个人资料" | ||
129 | + } | ||
130 | + }, | ||
131 | + { | ||
132 | + "path": "other/code", | ||
133 | + "style": { | ||
134 | + "navigationBarTitleText": "验证码登录" | ||
135 | + } | ||
136 | + }, | ||
137 | + { | ||
138 | + "path": "other/findPassword", | ||
139 | + "style": { | ||
140 | + "navigationBarTitleText": "忘记密码" | ||
141 | + } | ||
87 | } | 142 | } |
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 | - } | 143 | + ] |
144 | + } | ||
145 | + ], | ||
146 | + "globalStyle": { | ||
147 | + "navigationBarTextStyle": "black", | ||
148 | + "navigationBarTitleText": "云腾app", | ||
149 | + "navigationBarBackgroundColor": "#FFFFFF", | ||
150 | + "backgroundColor": "#FFFFFF" | ||
151 | + }, | ||
152 | + "tabBar": { | ||
153 | + "color": "#ffffff", | ||
154 | + "selectedColor": "#ffffff", | ||
155 | + "borderStyle": "black", | ||
156 | + "backgroundColor": "#ffffff", | ||
157 | + "list": [{ | ||
158 | + "pagePath": "pages/index/index", | ||
159 | + "iconPath": "static/basics.png", | ||
160 | + "selectedIconPath": "static/basics.png", | ||
161 | + "text": "首页" | ||
162 | + }, | ||
163 | + { | ||
164 | + "pagePath": "pages/device/device", | ||
165 | + "iconPath": "static/basics.png", | ||
166 | + "selectedIconPath": "static/basics.png", | ||
167 | + "text": "设备" | ||
168 | + }, | ||
169 | + { | ||
170 | + "pagePath": "pages/alarm/alarm", | ||
171 | + "iconPath": "static/basics.png", | ||
172 | + "selectedIconPath": "static/basics.png", | ||
173 | + "text": "告警" | ||
174 | + }, | ||
175 | + { | ||
176 | + "pagePath": "pages/personal/personal", | ||
177 | + "iconPath": "static/basics.png", | ||
178 | + "selectedIconPath": "static/basics.png", | ||
179 | + "text": "我的" | ||
180 | + } | ||
181 | + ] | ||
182 | + } | ||
181 | } | 183 | } |
@@ -2,19 +2,16 @@ | @@ -2,19 +2,16 @@ | ||
2 | <view class="alert-page"> | 2 | <view class="alert-page"> |
3 | <!-- 公共组件-每个页面必须引入 --> | 3 | <!-- 公共组件-每个页面必须引入 --> |
4 | <public-module></public-module> | 4 | <public-module></public-module> |
5 | - <f-navbar> | ||
6 | - <view class="u-flex" slot="left"> | ||
7 | - <u-icon color="#fff"></u-icon> | ||
8 | - <view class="actName u-line-1"></view> | ||
9 | - </view> | ||
10 | - <view class="u-flex filter" slot="right"> | ||
11 | - <view class="filter-input"><u--input prefixIcon="search" placeholder="输入设备SN或名称搜索" border="surround" shape="circle"></u--input></view> | ||
12 | - <view class="filter-text"> | ||
13 | - <view><text class="text">筛选</text></view> | 5 | + <!-- 自定义导航栏 --> |
6 | + <u-navbar :safeAreaInsetTop="false" height="115" border="false" title="告警" :fixed="true" left-text="返回" rightIcon="map"> | ||
7 | + <view class="u-nav-slot" slot="right"> | ||
8 | + <view @click="openSearchDialog" class="u-flex navbar-sty"> | ||
9 | + <view><text class="text-muted">筛选</text></view> | ||
10 | + <view><image class="img" src="../../static/shaixuan.png"></image></view> | ||
14 | </view> | 11 | </view> |
15 | - <view class="filter-icon"><image class="image" @click="openSearchDialog" src="../../static/shaixuan.png"></image></view> | ||
16 | </view> | 12 | </view> |
17 | - </f-navbar> | 13 | + </u-navbar> |
14 | + <!-- 自定义导航栏 --> | ||
18 | <view @click="openOrg" class="org-sty"> | 15 | <view @click="openOrg" class="org-sty"> |
19 | <view class="org-item"> | 16 | <view class="org-item"> |
20 | <view class="u-flex item"><text class="text-bold">组织关系</text></view> | 17 | <view class="u-flex item"><text class="text-bold">组织关系</text></view> |
@@ -188,7 +185,6 @@ | @@ -188,7 +185,6 @@ | ||
188 | 185 | ||
189 | <script> | 186 | <script> |
190 | import fTabbar from '@/components/module/f-tabbar/f-tabbar'; | 187 | import fTabbar from '@/components/module/f-tabbar/f-tabbar'; |
191 | -import fNavbar from '@/components/module/f-navbar/f-navbar'; | ||
192 | import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js'; | 188 | import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js'; |
193 | import { pageNumber, pageSize } from '@/config/constant.js'; | 189 | import { pageNumber, pageSize } from '@/config/constant.js'; |
194 | import { alertStatus, deviceType, alertLevel, timeArea } from './static/data.js'; | 190 | import { alertStatus, deviceType, alertLevel, timeArea } from './static/data.js'; |
@@ -196,8 +192,7 @@ import { alertStatus, deviceType, alertLevel, timeArea } from './static/data.js' | @@ -196,8 +192,7 @@ import { alertStatus, deviceType, alertLevel, timeArea } from './static/data.js' | ||
196 | export default { | 192 | export default { |
197 | mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件) | 193 | mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件) |
198 | components: { | 194 | components: { |
199 | - fTabbar, | ||
200 | - fNavbar | 195 | + fTabbar |
201 | }, | 196 | }, |
202 | data() { | 197 | data() { |
203 | return { | 198 | return { |
@@ -259,8 +254,9 @@ export default { | @@ -259,8 +254,9 @@ export default { | ||
259 | let params = JSON.parse(e.type); | 254 | let params = JSON.parse(e.type); |
260 | let type; | 255 | let type; |
261 | if (Array.isArray(params)) { | 256 | if (Array.isArray(params)) { |
262 | - // type = params.join(','); | ||
263 | - type = params[0]; | 257 | + type = params.join(','); |
258 | + // type = params[0]; | ||
259 | + console.log('Type', type); | ||
264 | } else { | 260 | } else { |
265 | type = params; | 261 | type = params; |
266 | } | 262 | } |
@@ -407,14 +403,13 @@ export default { | @@ -407,14 +403,13 @@ export default { | ||
407 | id: e.id, | 403 | id: e.id, |
408 | deviceName: e.deviceName, | 404 | deviceName: e.deviceName, |
409 | severity: e.severity, | 405 | severity: e.severity, |
410 | - originatorType: e.originatorType, | 406 | + organizationName: e.organizationName, |
411 | details: e.details, | 407 | details: e.details, |
412 | createdTime: e.createdTime, | 408 | createdTime: e.createdTime, |
413 | status: e.status | 409 | status: e.status |
414 | }; | 410 | }; |
415 | uni.navigateTo({ | 411 | uni.navigateTo({ |
416 | url: '/alarmSubPage/alarmDetailPage/alarmDetail?data=' + JSON.stringify(obj) | 412 | url: '/alarmSubPage/alarmDetailPage/alarmDetail?data=' + JSON.stringify(obj) |
417 | - // url: '/' + JSON.stringify(obj) | ||
418 | }); | 413 | }); |
419 | }, | 414 | }, |
420 | formatDetailText(e) { | 415 | formatDetailText(e) { |
1 | .alert-page { | 1 | .alert-page { |
2 | margin-top: 5rpx; | 2 | margin-top: 5rpx; |
3 | + .u-nav-slot { | ||
4 | + .navbar-sty { | ||
5 | + position: relative; | ||
6 | + top: 86rpx; | ||
7 | + justify-content: space-between; | ||
8 | + align-items: center; | ||
9 | + .img { | ||
10 | + width: 40rpx; | ||
11 | + height: 40rpx; | ||
12 | + } | ||
13 | + } | ||
14 | + } | ||
3 | 15 | ||
4 | .filter { | 16 | .filter { |
5 | justify-content: space-between; | 17 | justify-content: space-between; |
@@ -37,6 +49,7 @@ | @@ -37,6 +49,7 @@ | ||
37 | display: flex; | 49 | display: flex; |
38 | flex-direction: row; | 50 | flex-direction: row; |
39 | justify-content: space-between; | 51 | justify-content: space-between; |
52 | + margin-top: 229rpx; | ||
40 | 53 | ||
41 | .org-item { | 54 | .org-item { |
42 | width: 350rpx; | 55 | width: 350rpx; |
@@ -2,7 +2,9 @@ | @@ -2,7 +2,9 @@ | ||
2 | <view class="device-page"> | 2 | <view class="device-page"> |
3 | <f-navbar> | 3 | <f-navbar> |
4 | <view slot="left"> | 4 | <view slot="left"> |
5 | - <view style="width: 580rpx"><u--input prefixIcon="search" placeholder="输入设备SN或名称搜索" border="surround" shape="circle" @change="inputChanged"></u--input></view> | 5 | + <view style="width: 580rpx"> |
6 | + <u--input prefixIcon="search" placeholder="输入设备SN或名称搜索" border="surround" shape="circle" @change="inputChanged"></u--input> | ||
7 | + </view> | ||
6 | </view> | 8 | </view> |
7 | <view @click="openSearchDialog" slot="right" class="u-flex"> | 9 | <view @click="openSearchDialog" slot="right" class="u-flex"> |
8 | <text style="color: #333; font-size: 14px">筛选</text> | 10 | <text style="color: #333; font-size: 14px">筛选</text> |
@@ -32,7 +34,7 @@ | @@ -32,7 +34,7 @@ | ||
32 | /> | 34 | /> |
33 | </view> | 35 | </view> |
34 | </view> | 36 | </view> |
35 | - <mescroll-body ref="mescrollRef" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> | 37 | + <mescroll-body ref="mescrollRef" @init="mescrollInit" :up="upOption" :down="downOption" @down="downCallback" @up="upCallback"> |
36 | <view class="device-list"> | 38 | <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"> | 39 | <view @click="openDeviceDetail(item.id, item.alarmStatus, item.lastOnlineTime, item.tbDeviceId)" class="list-item" v-for="item in list" :key="item.id"> |
38 | <view | 40 | <view |
@@ -68,7 +70,13 @@ | @@ -68,7 +70,13 @@ | ||
68 | margin-top: 5rpx; | 70 | margin-top: 5rpx; |
69 | margin-right: 5rpx; | 71 | margin-right: 5rpx; |
70 | " | 72 | " |
71 | - :src="item.deviceState === 'ONLINE' ? '../../static/online.png' : item.deviceState === 'INACTIVE' ? '../../static/unonline.png' : '../../static/baojing.png'" | 73 | + :src=" |
74 | + item.deviceState === 'ONLINE' | ||
75 | + ? '../../static/online.png' | ||
76 | + : item.deviceState === 'INACTIVE' | ||
77 | + ? '../../static/unonline.png' | ||
78 | + : '../../static/baojing.png' | ||
79 | + " | ||
72 | /> | 80 | /> |
73 | 81 | ||
74 | <view> | 82 | <view> |
@@ -125,6 +133,9 @@ export default { | @@ -125,6 +133,9 @@ export default { | ||
125 | downOption: { | 133 | downOption: { |
126 | auto: false //是否在初始化后,自动执行downCallback; 默认true | 134 | auto: false //是否在初始化后,自动执行downCallback; 默认true |
127 | }, | 135 | }, |
136 | + upOption: { | ||
137 | + auto: false // 不自动加载 | ||
138 | + }, | ||
128 | show: false, | 139 | show: false, |
129 | deviceStatus: [ | 140 | deviceStatus: [ |
130 | { | 141 | { |
@@ -195,9 +206,17 @@ export default { | @@ -195,9 +206,17 @@ export default { | ||
195 | } | 206 | } |
196 | }; | 207 | }; |
197 | }, | 208 | }, |
198 | - onLoad() { | 209 | + onLoad(e) { |
199 | // 隐藏原生的tabbar | 210 | // 隐藏原生的tabbar |
200 | uni.hideTabBar(); | 211 | uni.hideTabBar(); |
212 | + if (e.type !== undefined) { | ||
213 | + const statusT = JSON.parse(e.type); | ||
214 | + this.loadData(1, { | ||
215 | + deviceState: statusT | ||
216 | + }); | ||
217 | + } else { | ||
218 | + this.loadData(1); | ||
219 | + } | ||
201 | }, | 220 | }, |
202 | onShow() { | 221 | onShow() { |
203 | if (this.orgId) { | 222 | if (this.orgId) { |
@@ -13,23 +13,23 @@ | @@ -13,23 +13,23 @@ | ||
13 | <text class="item-text" style="">设备统计</text> | 13 | <text class="item-text" style="">设备统计</text> |
14 | </view> | 14 | </view> |
15 | <view class="item-child-bottom u-flex"> | 15 | <view class="item-child-bottom u-flex"> |
16 | - <view class="u-flex sigle-child"> | 16 | + <view @click="navigatorDeviceStatus('ONLINE')" class="u-flex sigle-child"> |
17 | <view class="sigle-text"> | 17 | <view class="sigle-text"> |
18 | <text>{{ deviceData.onLine }}</text> | 18 | <text>{{ deviceData.onLine }}</text> |
19 | </view> | 19 | </view> |
20 | <view class="sigle-value"><text>在线</text></view> | 20 | <view class="sigle-value"><text>在线</text></view> |
21 | </view> | 21 | </view> |
22 | - <view class="u-flex sigle-child"> | 22 | + <view @click="navigatorDeviceStatus('OFFLINE')" class="u-flex sigle-child"> |
23 | <view class="sigle-text"> | 23 | <view class="sigle-text"> |
24 | <text>{{ deviceData.unLine }}</text> | 24 | <text>{{ deviceData.unLine }}</text> |
25 | </view> | 25 | </view> |
26 | <view class="sigle-value"><text>离线</text></view> | 26 | <view class="sigle-value"><text>离线</text></view> |
27 | </view> | 27 | </view> |
28 | - <view class="u-flex sigle-child"> | 28 | + <view @click="navigatorDeviceStatus('INACTIVE')" class="u-flex sigle-child"> |
29 | <view class="sigle-text"> | 29 | <view class="sigle-text"> |
30 | <text>{{ deviceData.noActive }}</text> | 30 | <text>{{ deviceData.noActive }}</text> |
31 | </view> | 31 | </view> |
32 | - <view class="sigle-value"><text>未激活</text></view> | 32 | + <view class="sigle-value"><text>待激活</text></view> |
33 | </view> | 33 | </view> |
34 | </view> | 34 | </view> |
35 | </view> | 35 | </view> |
@@ -164,6 +164,12 @@ export default { | @@ -164,6 +164,12 @@ export default { | ||
164 | uni.reLaunch({ | 164 | uni.reLaunch({ |
165 | url: '../alarm/alarm?type=' + JSON.stringify(e) | 165 | url: '../alarm/alarm?type=' + JSON.stringify(e) |
166 | }); | 166 | }); |
167 | + }, | ||
168 | + //设备状态查询 | ||
169 | + navigatorDeviceStatus(e) { | ||
170 | + uni.reLaunch({ | ||
171 | + url: '../device/device?type=' + JSON.stringify(e) | ||
172 | + }); | ||
167 | } | 173 | } |
168 | } | 174 | } |
169 | }; | 175 | }; |
@@ -2,6 +2,8 @@ | @@ -2,6 +2,8 @@ | ||
2 | padding: 27rpx 15rpx; | 2 | padding: 27rpx 15rpx; |
3 | min-height: 100vh; | 3 | min-height: 100vh; |
4 | background-color: #f8f9fa; | 4 | background-color: #f8f9fa; |
5 | + overflow-x: hidden; | ||
6 | + overflow-y: hidden; | ||
5 | } | 7 | } |
6 | .grid-container { | 8 | .grid-container { |
7 | display: grid; | 9 | display: grid; |
@@ -19,11 +19,11 @@ | @@ -19,11 +19,11 @@ | ||
19 | </view> | 19 | </view> |
20 | </block> | 20 | </block> |
21 | <block v-else> | 21 | <block v-else> |
22 | - <view class="u-m-r-20"> | 22 | + <view class="u-m-r-20" @click="openLoginFunc"> |
23 | <view class="avatar u-flex"><u-icon name="account-fill" color="black" size="30"></u-icon></view> | 23 | <view class="avatar u-flex"><u-icon name="account-fill" color="black" size="30"></u-icon></view> |
24 | </view> | 24 | </view> |
25 | - <view class="u-flex-1"> | ||
26 | - <view @click="openLoginFunc" class="u-font-lg click-login">请点击登录</view> | 25 | + <view class="u-flex-1" @click="openLoginFunc"> |
26 | + <view class="u-font-lg click-login">请点击登录</view> | ||
27 | <view @click="clickAccountFunc" class="detail"><text class="text">绑定账号</text></view> | 27 | <view @click="clickAccountFunc" class="detail"><text class="text">绑定账号</text></view> |
28 | </view> | 28 | </view> |
29 | </block> | 29 | </block> |
@@ -46,11 +46,11 @@ | @@ -46,11 +46,11 @@ | ||
46 | </view> | 46 | </view> |
47 | </block> | 47 | </block> |
48 | <block v-else> | 48 | <block v-else> |
49 | - <view class="u-m-r-20"> | 49 | + <view class="u-m-r-20" @click="openLoginFunc"> |
50 | <view class="avatar u-flex" style="justify-content: center"><u-icon name="account-fill" color="black" size="30"></u-icon></view> | 50 | <view class="avatar u-flex" style="justify-content: center"><u-icon name="account-fill" color="black" size="30"></u-icon></view> |
51 | </view> | 51 | </view> |
52 | - <view class="u-flex-1"> | ||
53 | - <view @click="openLoginFunc" class="u-font-lg" style="color: black; font-weight: bold">登录</view> | 52 | + <view class="u-flex-1" @click="openLoginFunc"> |
53 | + <view class="u-font-lg" style="color: black; font-weight: bold">登录</view> | ||
54 | <view @click="clickAccountFunc" style="color: black" class="detail">绑定账号</view> | 54 | <view @click="clickAccountFunc" style="color: black" class="detail">绑定账号</view> |
55 | </view> | 55 | </view> |
56 | </block> | 56 | </block> |
@@ -71,7 +71,7 @@ | @@ -71,7 +71,7 @@ | ||
71 | <view class="nav-right"><image class="image" src="../../static/arrow-right.png"></image></view> | 71 | <view class="nav-right"><image class="image" src="../../static/arrow-right.png"></image></view> |
72 | </view> | 72 | </view> |
73 | </view> | 73 | </view> |
74 | - <view v-if="userInfo.isToken || userInfo" class="u-flex" style="justify-content: center; width: 600rpx"> | 74 | + <view v-if="userInfo.isToken" class="u-flex" style="justify-content: center; width: 600rpx"> |
75 | <u-button @click.top="onLoginoutFunc" type="primary" shape="circle" text="退出账号"></u-button> | 75 | <u-button @click.top="onLoginoutFunc" type="primary" shape="circle" text="退出账号"></u-button> |
76 | </view> | 76 | </view> |
77 | </view> | 77 | </view> |
@@ -165,9 +165,15 @@ | @@ -165,9 +165,15 @@ | ||
165 | title: '重置密码成功~', | 165 | title: '重置密码成功~', |
166 | icon: 'none' | 166 | icon: 'none' |
167 | }).then(res=>{ | 167 | }).then(res=>{ |
168 | - uni.navigateBack({ | ||
169 | - delta:2 | ||
170 | - }) | 168 | + uni.reLaunch({ |
169 | + url: '/pages/personal/personal' | ||
170 | + }); | ||
171 | + /** | ||
172 | + * 有些时候不起作用 | ||
173 | + */ | ||
174 | + // uni.navigateBack({ | ||
175 | + // delta:2 | ||
176 | + // }) | ||
171 | }) | 177 | }) |
172 | }); | 178 | }); |
173 | }, | 179 | }, |