Showing
8 changed files
with
75 additions
and
32 deletions
... | ... | @@ -93,7 +93,7 @@ export default { |
93 | 93 | background-color: #fff; |
94 | 94 | color: #333; |
95 | 95 | border-radius: 20rpx; |
96 | - font-size: 30rpx; | |
96 | + font-size: 15px; | |
97 | 97 | margin-top: 30rpx; |
98 | 98 | padding: 30rpx; |
99 | 99 | } |
... | ... | @@ -108,11 +108,11 @@ export default { |
108 | 108 | align-items: center; |
109 | 109 | .detail-label { |
110 | 110 | color: #333; |
111 | - font-size: 30rpx; | |
111 | + font-size: 15px; | |
112 | 112 | } |
113 | 113 | .detail-value { |
114 | 114 | color: #666; |
115 | - font-size: 28rpx; | |
115 | + font-size: 14px; | |
116 | 116 | margin-left: 30rpx; |
117 | 117 | } |
118 | 118 | } | ... | ... |
... | ... | @@ -236,7 +236,7 @@ export default { |
236 | 236 | .item { |
237 | 237 | padding: 30rpx; |
238 | 238 | view { |
239 | - font-size: 28rpx; | |
239 | + font-size: 14px; | |
240 | 240 | margin-bottom: 10rpx; |
241 | 241 | } |
242 | 242 | .time { |
... | ... | @@ -247,7 +247,7 @@ export default { |
247 | 247 | display: flex; |
248 | 248 | justify-content: space-between; |
249 | 249 | align-items: center; |
250 | - font-size: 30rpx; | |
250 | + font-size: 15px; | |
251 | 251 | font-weight: 500; |
252 | 252 | align-items: center; |
253 | 253 | .item-right { |
... | ... | @@ -256,7 +256,7 @@ export default { |
256 | 256 | align-items: center; |
257 | 257 | width: 104rpx; |
258 | 258 | height: 36rpx; |
259 | - font-size: 20rpx; | |
259 | + font-size: 10px; | |
260 | 260 | border-radius: 20rpx; |
261 | 261 | } |
262 | 262 | .item-fail { |
... | ... | @@ -276,7 +276,7 @@ export default { |
276 | 276 | .filter-title { |
277 | 277 | text-align: center; |
278 | 278 | margin-top: 14px; |
279 | - font-size: 32rpx; | |
279 | + font-size: 16px; | |
280 | 280 | font-weight: 700; |
281 | 281 | } |
282 | 282 | .button-group { | ... | ... |
... | ... | @@ -44,7 +44,10 @@ |
44 | 44 | </text> |
45 | 45 | </view> |
46 | 46 | </view> |
47 | - <view>{{ Object.entries(item.details.data)[0][0] }} : <text style="font-weight: bold; margin-left:4rpx;">{{ Object.entries(item.details.data)[0][1] }}</text></view> | |
47 | + <view> | |
48 | + {{ Object.entries(item.details.data)[0][0] }} : | |
49 | + <text style="font-weight: bold; margin-left:4rpx;">{{ Object.entries(item.details.data)[0][1] }}</text> | |
50 | + </view> | |
48 | 51 | <view v-if="item.status"> |
49 | 52 | 告警状态:{{ |
50 | 53 | item.status === 'CLEARED_UNACK' ? '清除未确认' : item.status === 'CLEARED_ACK' ? '清除已确认' : item.status === 'ACTIVE_UNACK' ? '激活未确认' : '激活已确认' |
... | ... | @@ -55,8 +58,8 @@ |
55 | 58 | </view> |
56 | 59 | </mescroll-body> |
57 | 60 | <!-- 告警筛选 --> |
58 | - <u-popup @close="close" closeable bgColor="#fff" :show="show" mode="bottom" :round="20"> | |
59 | - <view class="filter"> | |
61 | + <u-popup @close="close" closeable bgColor="#fff" :show="show" mode="bottom" :round="20" @touchmove.stop.prevent="disabledScroll"> | |
62 | + <view class="filter" @touchmove.stop.prevent="disabledScroll"> | |
60 | 63 | <view class="filter-title"><text>筛选条件</text></view> |
61 | 64 | <FilterItem :filterList="alarmStatus" title="告警状态" @clickTag="currentIndex => handleClickTag(currentIndex, alarmStatus)"></FilterItem> |
62 | 65 | <FilterItem :filterList="typeStatus" title="设备类型" @clickTag="currentIndex => handleClickTag(currentIndex, typeStatus)"></FilterItem> |
... | ... | @@ -208,7 +211,7 @@ export default { |
208 | 211 | { |
209 | 212 | checked: false, |
210 | 213 | name: '近一天', |
211 | - type: '1440000' | |
214 | + type: '86400000' | |
212 | 215 | } |
213 | 216 | ], |
214 | 217 | downOption: { |
... | ... | @@ -221,6 +224,9 @@ export default { |
221 | 224 | }; |
222 | 225 | }, |
223 | 226 | methods: { |
227 | + disabledScroll(){ | |
228 | + return; | |
229 | + }, | |
224 | 230 | /*下拉刷新的回调 */ |
225 | 231 | downCallback() { |
226 | 232 | //联网加载数据 |
... | ... | @@ -333,7 +339,7 @@ export default { |
333 | 339 | |
334 | 340 | <style lang="scss" scoped> |
335 | 341 | .filter-button { |
336 | - font-size: 24rpx; | |
342 | + font-size: 12px; | |
337 | 343 | width: 160rpx; |
338 | 344 | height: 64rpx; |
339 | 345 | border-radius: 32rpx; |
... | ... | @@ -360,7 +366,7 @@ export default { |
360 | 366 | .item { |
361 | 367 | padding: 30rpx; |
362 | 368 | view { |
363 | - font-size: 28rpx; | |
369 | + font-size: 14px; | |
364 | 370 | margin-bottom: 10rpx; |
365 | 371 | } |
366 | 372 | .time { |
... | ... | @@ -369,7 +375,7 @@ export default { |
369 | 375 | .item-first { |
370 | 376 | display: flex; |
371 | 377 | justify-content: space-between; |
372 | - font-size: 30rpx; | |
378 | + font-size: 15px; | |
373 | 379 | font-weight: 500; |
374 | 380 | align-items: center; |
375 | 381 | .item-right { |
... | ... | @@ -391,7 +397,7 @@ export default { |
391 | 397 | .filter-title { |
392 | 398 | text-align: center; |
393 | 399 | margin-top: 14px; |
394 | - font-size: 32rpx; | |
400 | + font-size: 16px; | |
395 | 401 | font-weight: 700; |
396 | 402 | } |
397 | 403 | .button-group { | ... | ... |
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | <view style="width: 100%; padding: 0 30rpx;"> |
54 | 54 | <view style="text-align: center; font-weight:700;margin-bottom: 40rpx;">命令下发</view> |
55 | 55 | <view class="u-flex"> |
56 | - <text style="color: #333; font-size: 28rpx;font-weight:700;margin-right: 30rpx;">下发类型:</text> | |
56 | + <text style="color: #333; font-size: 14px;font-weight:700;margin-right: 30rpx;">下发类型:</text> | |
57 | 57 | |
58 | 58 | <u-radio-group v-model="commandType" placement="row"> |
59 | 59 | <u-radio activeColor="#3388FF" label="OneWay" name="OneWay"></u-radio> |
... | ... | @@ -138,6 +138,7 @@ export default { |
138 | 138 | }; |
139 | 139 | await issueCommand(this.commandType, this.deviceDetail.tbDeviceId, commandValue); |
140 | 140 | this.hiddenModal(); |
141 | + uni.$u.toast('下发成功~'); | |
141 | 142 | } catch (e) { |
142 | 143 | uni.$u.toast('下发失败~'); |
143 | 144 | } |
... | ... | @@ -171,11 +172,11 @@ export default { |
171 | 172 | align-items: center; |
172 | 173 | .detail-label { |
173 | 174 | color: #333; |
174 | - font-size: 30rpx; | |
175 | + font-size: 15px; | |
175 | 176 | } |
176 | 177 | .detail-value { |
177 | 178 | color: #666; |
178 | - font-size: 28rpx; | |
179 | + font-size: 14px; | |
179 | 180 | margin-left: 30rpx; |
180 | 181 | } |
181 | 182 | } | ... | ... |
... | ... | @@ -35,7 +35,7 @@ export default { |
35 | 35 | display: flex; |
36 | 36 | justify-content: space-between; |
37 | 37 | color: #333; |
38 | - font-size: 32rpx; | |
38 | + font-size: 16px; | |
39 | 39 | font-family: PingFangSC-Medium, PingFang SC; |
40 | 40 | font-weight: bold; |
41 | 41 | .item-value { |
... | ... | @@ -44,7 +44,7 @@ export default { |
44 | 44 | } |
45 | 45 | .item-time { |
46 | 46 | margin-top: 4rpx; |
47 | - font-size: 26rpx; | |
47 | + font-size: 13px; | |
48 | 48 | color: #999; |
49 | 49 | } |
50 | 50 | } | ... | ... |
... | ... | @@ -37,7 +37,7 @@ |
37 | 37 | " |
38 | 38 | > |
39 | 39 | <view style="width: 450rpx; text-align: left"> |
40 | - <text style="color: #333; font-size: 30rpx;font-weight: bold;">{{ item.name }}</text> | |
40 | + <text style="color: #333; font-size: 15px;font-weight: bold;">{{ item.name }}</text> | |
41 | 41 | </view> |
42 | 42 | <view style="width: 450rpx; text-align: left; margin-top: 10rpx"> |
43 | 43 | <view style="color: #666; font-size: 14px;display: flex;"> |
... | ... | @@ -194,6 +194,7 @@ export default { |
194 | 194 | async onLoad(options) { |
195 | 195 | // 隐藏原生的tabbar |
196 | 196 | uni.hideTabBar(); |
197 | + this.page.num = 1; | |
197 | 198 | const { deviceState } = options; |
198 | 199 | this.deviceState = deviceState; |
199 | 200 | if (deviceState) { |
... | ... | @@ -371,7 +372,7 @@ export default { |
371 | 372 | .filter-title { |
372 | 373 | text-align: center; |
373 | 374 | margin-top: 14px; |
374 | - font-size: 32rpx; | |
375 | + font-size: 16px; | |
375 | 376 | font-weight: 700; |
376 | 377 | } |
377 | 378 | .button-group { |
... | ... | @@ -383,4 +384,4 @@ export default { |
383 | 384 | } |
384 | 385 | } |
385 | 386 | } |
386 | -</style> | |
387 | +</style> | ... | ... |
... | ... | @@ -64,7 +64,7 @@ |
64 | 64 | <!-- 基础统计 --> |
65 | 65 | <!-- 四宫格CSS最新网格布局--> |
66 | 66 | <view class="grid-container"> |
67 | - <view class="grid-item"> | |
67 | + <view class="grid-item" @click="showToastWip()"> | |
68 | 68 | <view class="item-center"> |
69 | 69 | <view class="center"><image class="image" src="../../static/form.png"></image></view> |
70 | 70 | <view class="center-text"><text class="text text-muted">维修工单</text></view> |
... | ... | @@ -76,7 +76,7 @@ |
76 | 76 | <view class="center-text"><text class="text text-muted" style="">摄像头管理</text></view> |
77 | 77 | </view> |
78 | 78 | </view> |
79 | - <view class="grid-item"> | |
79 | + <view class="grid-item" @click="showToastWip()"> | |
80 | 80 | <view class="item-center"> |
81 | 81 | <view class="center"><image class="image" src="../../static/device.png"></image></view> |
82 | 82 | <view class="center-text"><text class="text text-muted">设备接入</text></view> |
... | ... | @@ -138,15 +138,21 @@ export default { |
138 | 138 | } |
139 | 139 | }); |
140 | 140 | }, |
141 | + showToastWip(){ | |
142 | + uni.$u.toast('拼命开发中 ...') | |
143 | + }, | |
141 | 144 | openCamera() { |
142 | - uni.navigateTo({ | |
143 | - url: 'camera/camera' | |
144 | - }); | |
145 | + // uni.navigateTo({ | |
146 | + // url: 'camera/camera' | |
147 | + // }); | |
148 | + this.showToastWip() | |
145 | 149 | }, |
146 | 150 | openOrgStatus() { |
147 | 151 | // uni.navigateTo({ |
148 | 152 | // url: 'configuration/configuration' |
149 | 153 | // }); |
154 | + this.showToastWip() | |
155 | + | |
150 | 156 | }, |
151 | 157 | //告警状态查询 |
152 | 158 | navigatorAlarmStatus(e) { | ... | ... |
... | ... | @@ -5,6 +5,7 @@ |
5 | 5 | <view class="u-flex login-main"> |
6 | 6 | <view class="content"> |
7 | 7 | <view class="hello login-text-muted">您好,</view> |
8 | + | |
8 | 9 | <view class="hello-welcome login-text-muted">欢迎来到ThingsKit!</view> |
9 | 10 | </view> |
10 | 11 | </view> |
... | ... | @@ -16,19 +17,26 @@ |
16 | 17 | </view> |
17 | 18 | <view class="form-row u-flex"> |
18 | 19 | <view class="v-input"><input type="text" v-model="loginForm.password" maxlength="32" placeholder="请输入登录密码" :password="!showPassword" /></view> |
19 | - <view class="v-password" @click.stop="showPasswordMode"> | |
20 | - <u-icon color="#9a9a9a" width="18" height="15" :name="showPassword ? '/static/eye.png' : '/static/eye-hide.png'"></u-icon> | |
20 | + <view class="v-password" style="padding: 30rpx" @click="showPasswordMode"> | |
21 | + <u-icon color="#9a9a9a" :name="showPassword ? '/static/eye.png' : '/static/eye-hide.png'"></u-icon> | |
21 | 22 | </view> |
23 | + | |
22 | 24 | <u-icon></u-icon> |
23 | 25 | </view> |
26 | + | |
24 | 27 | <button class="submit" size="default" @click="onSubmitFunc"><text class="text">登录</text></button> |
28 | + | |
25 | 29 | <view class="u-flex row-item"> |
26 | 30 | <view class="row-phone login-text-gray" @click="openCodeFunc">手机验证码登录</view> |
31 | + | |
27 | 32 | <view class="row-reset login-text-gray" @click="findPassrordFunc">忘记密码</view> |
28 | 33 | </view> |
34 | + | |
29 | 35 | <view class="u-flex link-login"> |
30 | 36 | <view class="link-text login-text-gray">第三方账号登录</view> |
37 | + | |
31 | 38 | <view style="height: 20rpx"></view> |
39 | + | |
32 | 40 | <button class="link-image" @tap="onWenxinAuthorization"><image class="image" src="../../static/weixin.png" mode="aspectFill"></image></button> |
33 | 41 | </view> |
34 | 42 | </view> |
... | ... | @@ -129,20 +137,26 @@ export default { |
129 | 137 | }); |
130 | 138 | } |
131 | 139 | }) |
140 | + | |
132 | 141 | .catch(e => { |
133 | - // uni.$u.toast(e.data?.message); | |
142 | + uni.$u.toast(e.data?.message); | |
134 | 143 | }); |
135 | 144 | } |
136 | 145 | }, |
146 | + | |
137 | 147 | fail: res => { |
138 | 148 | //拒绝授权 |
149 | + | |
139 | 150 | return; |
140 | 151 | } |
141 | 152 | }); |
142 | 153 | }, |
154 | + | |
143 | 155 | //#endif |
156 | + | |
144 | 157 | saveUserInfo() { |
145 | 158 | //储存个人信息 |
159 | + | |
146 | 160 | uni.$u.http.get('/yt/user/me/info').then(res => { |
147 | 161 | if (res) { |
148 | 162 | this.setUserInfo(res); |
... | ... | @@ -161,39 +175,53 @@ export default { |
161 | 175 | return uni.$u.toast('请输入登录账号~'); |
162 | 176 | } |
163 | 177 | const passReg = /^(?=.*?[A-Z])(?=(.*[a-z]){1,})(?=(.*[\d]){1,})(?=(.*[\W]){1,})(?!.*\s).{8,}$/; |
178 | + | |
164 | 179 | if (this.loginForm.password == '') { |
165 | 180 | uni.showToast({ |
166 | 181 | title: '请输入登录密码~', |
182 | + | |
167 | 183 | icon: 'none' |
168 | 184 | }); |
169 | 185 | return; |
170 | 186 | } else if (!passReg.test(this.loginForm.password)) { |
171 | 187 | uni.showToast({ |
172 | 188 | title: '密码格式不正确(至少一个大写英文字母、至少一个小写英文字母、至少一位数字、至少一个特殊字符、最少八个字符)~', |
189 | + | |
173 | 190 | icon: 'none', |
191 | + | |
174 | 192 | duration: 3000 |
175 | 193 | }); |
194 | + | |
176 | 195 | return; |
177 | 196 | } |
178 | 197 | uni.$u.http |
179 | 198 | .post('/auth/login', this.loginForm) |
199 | + | |
180 | 200 | .then(res => { |
181 | 201 | if (res) { |
182 | 202 | // 储存登录信息 |
203 | + | |
183 | 204 | let resObj = { |
184 | 205 | refreshToken: res.refreshToken, |
206 | + | |
185 | 207 | isToken: res.token |
186 | 208 | }; |
209 | + | |
187 | 210 | let userInfo = { |
188 | 211 | ...resObj, |
212 | + | |
189 | 213 | token: true, //token用于判断是否登录 |
214 | + | |
190 | 215 | isThirdLogin: false |
191 | 216 | }; |
217 | + | |
192 | 218 | if (userInfo.token) { |
193 | 219 | this.setUserInfo(userInfo); |
194 | 220 | } |
221 | + | |
195 | 222 | uni.showToast({ |
196 | 223 | title: '登录成功~', |
224 | + | |
197 | 225 | icon: 'none' |
198 | 226 | }).then(async res => { |
199 | 227 | this.saveUserInfo(); |
... | ... | @@ -204,6 +232,7 @@ export default { |
204 | 232 | }); |
205 | 233 | } |
206 | 234 | }) |
235 | + | |
207 | 236 | .catch(e => { |
208 | 237 | uni.$u.toast(e.data?.message); |
209 | 238 | }); |
... | ... | @@ -231,4 +260,4 @@ export default { |
231 | 260 | /deep/ button { |
232 | 261 | background: rgba(0, 0, 0, 0); |
233 | 262 | } |
234 | -</style> | |
263 | +</style> | ... | ... |