Showing
27 changed files
with
380 additions
and
182 deletions
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | </view> |
| 39 | 39 | <view class="column"> |
| 40 | 40 | <text class="text-org-bold">告警状态:</text> |
| 41 | - <text class="text-device-muted"> | |
| 41 | + <text class="text-device-muted" style="color: #DE4437;"> | |
| 42 | 42 | {{ |
| 43 | 43 | list.status == 'CLEARED_UNACK' |
| 44 | 44 | ? '清除未确认' |
| ... | ... | @@ -70,8 +70,8 @@ |
| 70 | 70 | <view><u--textarea border="none" height="96" placeholder="请输入处理结果" v-model="formModel.result" count></u--textarea></view> |
| 71 | 71 | </view> |
| 72 | 72 | <!-- #endif --> |
| 73 | - <view v-if="list.status !== 'CLEARED_ACK'" style="margin-top: 44rpx;"> | |
| 74 | - <view class="u-flex" style="justify-content: center;align-items: center;"><u-button @click="handleSubmit" type="primary" shape="circle" text="处理"></u-button></view> | |
| 73 | + <view v-if="list.status !== 'CLEARED_ACK'" style="margin-top: 44rpx;display: flex;align-items: center;justify-content: center;"> | |
| 74 | + <view class="u-flex" style="width: 400rpx"><u-button @click="handleSubmit" type="primary" shape="circle" text="处理"></u-button></view> | |
| 75 | 75 | </view> |
| 76 | 76 | </view> |
| 77 | 77 | </template> |
| ... | ... | @@ -134,4 +134,8 @@ export default { |
| 134 | 134 | |
| 135 | 135 | <style lang="scss" scoped> |
| 136 | 136 | @import './static/alarmDetail.scss'; |
| 137 | +/deep/ .u-button--primary { | |
| 138 | + background-color: #377dff !important; | |
| 139 | + border-color: #377dff !important; | |
| 140 | +} | |
| 137 | 141 | </style> | ... | ... |
| ... | ... | @@ -30,6 +30,7 @@ |
| 30 | 30 | |
| 31 | 31 | <script> |
| 32 | 32 | import base from '@/config/baseUrl.js'; |
| 33 | +import { mapState } from 'vuex'; | |
| 33 | 34 | |
| 34 | 35 | export default { |
| 35 | 36 | name: 'f-tabbar', |
| ... | ... | @@ -108,7 +109,12 @@ export default { |
| 108 | 109 | icon: '../../../static/my-un.png', |
| 109 | 110 | iconFill: '../../../static/my-yes.png' |
| 110 | 111 | } |
| 111 | - ] | |
| 112 | + ], | |
| 113 | + badgeTotal: { | |
| 114 | + t1: 0, | |
| 115 | + t2: 0, | |
| 116 | + t3: 0 | |
| 117 | + } | |
| 112 | 118 | }; |
| 113 | 119 | }, |
| 114 | 120 | onLoad() { |
| ... | ... | @@ -119,8 +125,6 @@ export default { |
| 119 | 125 | let currentPages = getCurrentPages(); |
| 120 | 126 | let page = currentPages[currentPages.length - 1]; |
| 121 | 127 | this.path = page.route; |
| 122 | - //获取页面路径 | |
| 123 | - console.log('页面路径', this.list); | |
| 124 | 128 | if (this.list.length > 0) { |
| 125 | 129 | this.list?.forEach((item, index) => { |
| 126 | 130 | if (this.path == item.url) { |
| ... | ... | @@ -128,19 +132,20 @@ export default { |
| 128 | 132 | } |
| 129 | 133 | }); |
| 130 | 134 | } |
| 131 | - this.loadData(); | |
| 135 | + }, | |
| 136 | + computed: { | |
| 137 | + ...mapState({ | |
| 138 | + info: state => state.badgeInfo | |
| 139 | + }) | |
| 132 | 140 | }, |
| 133 | 141 | methods: { |
| 134 | 142 | loadData() { |
| 135 | - let httpData = { | |
| 136 | - page: 1, | |
| 137 | - pageSize: 10 | |
| 138 | - }; | |
| 139 | - uni.$u.http.get('/yt/alarm', { params: httpData }).then(res => { | |
| 140 | - this.list[2].badge = res.total; | |
| 141 | - }); | |
| 143 | + this.list[2].badge = this.info; | |
| 142 | 144 | }, |
| 143 | 145 | onTabbar(index) { |
| 146 | + setTimeout(() => { | |
| 147 | + this.loadData(); | |
| 148 | + }, 100); | |
| 144 | 149 | if (this.list[index].url) { |
| 145 | 150 | if (this.path !== this.list[index].url) { |
| 146 | 151 | uni.switchTab({ | ... | ... |
| ... | ... | @@ -104,13 +104,11 @@ uni.$u.http.interceptors.response.use( |
| 104 | 104 | } else if (message == "request:fail timeout") { |
| 105 | 105 | errorData = "请求超时:请检查网络"; |
| 106 | 106 | } else if (message == "Token has expired") { |
| 107 | - errorData = "Token失效,请重新登录"; | |
| 108 | 107 | uni.reLaunch({ |
| 109 | 108 | url: "/publicLoginSubPage/public/login", |
| 110 | 109 | }); |
| 111 | 110 | store.commit("emptyUserInfo"); |
| 112 | 111 | } else if (message == "Invalid username or password") { |
| 113 | - // errorData = "用户名或者密码无效"; | |
| 114 | 112 | uni.reLaunch({ |
| 115 | 113 | url: "/publicLoginSubPage/public/login", |
| 116 | 114 | }); | ... | ... |
| ... | ... | @@ -2,26 +2,32 @@ |
| 2 | 2 | <view class="alert-page"> |
| 3 | 3 | <!-- 公共组件-每个页面必须引入 --> |
| 4 | 4 | <public-module></public-module> |
| 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> | |
| 5 | + <!-- 吸顶组件 --> | |
| 6 | + <u-sticky> | |
| 7 | + <view class="device-top"> | |
| 8 | + <view class="search"> | |
| 9 | + <view> | |
| 10 | + <view class="search-left"><u--input prefixIcon="search" placeholder="请输入告警名字" shape="circle" @change="inputChanged"></u--input></view> | |
| 11 | + </view> | |
| 12 | + <view @click="openSearchDialog" class="search-right"> | |
| 13 | + <text>筛选</text> | |
| 14 | + <image src="../../static/shaixuan.png" /> | |
| 15 | + </view> | |
| 11 | 16 | </view> |
| 12 | - </view> | |
| 13 | - </u-navbar> | |
| 14 | - <!-- 自定义导航栏 --> | |
| 15 | - <view @click="openOrg" class="org-sty"> | |
| 16 | - <view class="org-item"> | |
| 17 | - <view class="u-flex item"><text class="text-bold">组织关系</text></view> | |
| 18 | - <view class="u-flex item-child"> | |
| 19 | - <image class="image" src="../../static/org.png" mode=""></image> | |
| 20 | - <text class="text-12">告警数:{{ alertTotal }}</text> | |
| 17 | + <view class="org"> | |
| 18 | + <u-cell @click="openOrg" isLink title="组织关系" :border="false"> | |
| 19 | + <view slot="label" class="label" style="display: flex; align-items: center;margin-top: 20rpx;"> | |
| 20 | + <image src="../../static/org.png" style="width: 24rpx;height: 28rpx;top: -30rpx;"></image> | |
| 21 | + <view style="margin-left: 10rpx; color: #666;"> | |
| 22 | + 告警数: | |
| 23 | + <text class="text-org-total" style="margin-left: 20rpx;">{{ alertTotal }}</text> | |
| 24 | + </view> | |
| 25 | + </view> | |
| 26 | + </u-cell> | |
| 21 | 27 | </view> |
| 22 | 28 | </view> |
| 23 | - <view class="org-item "><image class="org-image" src="../../static/right-arrow.png"></image></view> | |
| 24 | - </view> | |
| 29 | + </u-sticky> | |
| 30 | + <!-- 吸顶组件 --> | |
| 25 | 31 | <!-- 自带分页组件 --> |
| 26 | 32 | <mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> |
| 27 | 33 | <view class="device-list"> |
| ... | ... | @@ -157,7 +163,8 @@ |
| 157 | 163 | </view> |
| 158 | 164 | </view> |
| 159 | 165 | </view> |
| 160 | - <view class="u-flex" style="flex-direction: row; margin-top: 128rpx; margin-left: 10rpx"> | |
| 166 | + <view style="height: 130rpx;"></view> | |
| 167 | + <view class="u-flex" style="position: fixed;bottom: 10rpx;z-index: 9999;flex-direction: row; margin-top: 128rpx; margin-left: 10rpx"> | |
| 161 | 168 | <view style="width: 300rpx"><u-button @click="resetData" type="info" shape="circle" text="重置"></u-button></view> |
| 162 | 169 | <view style="width: 300rpx; margin-left: 46rpx"><u-button @click="queryData" type="primary" shape="circle" text="确认"></u-button></view> |
| 163 | 170 | </view> |
| ... | ... | @@ -188,6 +195,7 @@ import fTabbar from '@/components/module/f-tabbar/f-tabbar'; |
| 188 | 195 | import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js'; |
| 189 | 196 | import { pageNumber, pageSize } from '@/config/constant.js'; |
| 190 | 197 | import { alertStatus, deviceType, alertLevel, timeArea } from './static/data.js'; |
| 198 | +import { mapActions } from 'vuex'; | |
| 191 | 199 | |
| 192 | 200 | export default { |
| 193 | 201 | mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件) |
| ... | ... | @@ -255,8 +263,6 @@ export default { |
| 255 | 263 | let type; |
| 256 | 264 | if (Array.isArray(params)) { |
| 257 | 265 | type = params.join(','); |
| 258 | - // type = params[0]; | |
| 259 | - console.log('Type', type); | |
| 260 | 266 | } else { |
| 261 | 267 | type = params; |
| 262 | 268 | } |
| ... | ... | @@ -266,6 +272,10 @@ export default { |
| 266 | 272 | } |
| 267 | 273 | }, |
| 268 | 274 | methods: { |
| 275 | + ...mapActions(['updateBadgeTotal']), | |
| 276 | + inputChanged(e) { | |
| 277 | + this.loadData(1, null, null, null, null, null, null, e); | |
| 278 | + }, | |
| 269 | 279 | getAlertStatus(e, i) { |
| 270 | 280 | this.current1 = i; |
| 271 | 281 | this.alertStatusVal = e.value; |
| ... | ... | @@ -343,7 +353,7 @@ export default { |
| 343 | 353 | this.page.num += 1; |
| 344 | 354 | this.loadData(this.page.num); |
| 345 | 355 | }, |
| 346 | - loadData(pageNo, statusV, startTimeV, endTimeV, severityV, deviceTypeV, organizationV) { | |
| 356 | + loadData(pageNo, statusV, startTimeV, endTimeV, severityV, deviceTypeV, organizationV, alarmName) { | |
| 347 | 357 | let httpData = { |
| 348 | 358 | page: pageNo, |
| 349 | 359 | pageSize: 10, |
| ... | ... | @@ -352,13 +362,16 @@ export default { |
| 352 | 362 | endTime: endTimeV, |
| 353 | 363 | severity: severityV, |
| 354 | 364 | deviceType: deviceTypeV, |
| 355 | - organizationId: organizationV | |
| 365 | + organizationId: organizationV, | |
| 366 | + alarmType: alarmName | |
| 356 | 367 | }; |
| 357 | 368 | uni.$u.http |
| 358 | 369 | .get('/yt/alarm', { params: httpData, custom: { load: false } }) |
| 359 | 370 | .then(res => { |
| 360 | 371 | uni.stopPullDownRefresh(); |
| 361 | 372 | this.mescroll.endByPage(res.items.length, res.total); |
| 373 | + //异步实时更新告警徽标数 | |
| 374 | + this.updateBadgeTotal(httpData); | |
| 362 | 375 | this.alertTotal = res.total; |
| 363 | 376 | if (pageNo == 1) { |
| 364 | 377 | this.list = res.items; |
| ... | ... | @@ -367,7 +380,7 @@ export default { |
| 367 | 380 | } |
| 368 | 381 | }) |
| 369 | 382 | .catch(e => { |
| 370 | - uni.$u.toast(e.data.message); | |
| 383 | + uni.$u.toast(e.data?.message); | |
| 371 | 384 | //联网失败, 结束加载 |
| 372 | 385 | this.mescroll.endErr(); |
| 373 | 386 | }); |
| ... | ... | @@ -425,4 +438,15 @@ export default { |
| 425 | 438 | |
| 426 | 439 | <style lang="scss" scoped> |
| 427 | 440 | @import './static/alarm.scss'; |
| 441 | +/deep/ .u-button--primary { | |
| 442 | + background-color: #377dff !important; | |
| 443 | + border-color: #377dff !important; | |
| 444 | +} | |
| 445 | +/deep/ .u-button--info { | |
| 446 | + background-color: #e3e3e5 !important; | |
| 447 | + border-color: #e3e3e5 !important; | |
| 448 | +} | |
| 449 | +/deep/ .u-cell__right-icon-wrap { | |
| 450 | + margin-top: -55rpx !important; | |
| 451 | +} | |
| 428 | 452 | </style> | ... | ... |
| 1 | 1 | .alert-page { |
| 2 | - margin-top: 5rpx; | |
| 3 | - .u-nav-slot { | |
| 4 | - .navbar-sty { | |
| 5 | - position: relative; | |
| 6 | - top: 86rpx; | |
| 2 | + .device-top { | |
| 3 | + padding: 10rpx 30rpx; | |
| 4 | + background-color: #fff; | |
| 5 | + .search { | |
| 6 | + display: flex; | |
| 7 | 7 | justify-content: space-between; |
| 8 | - align-items: center; | |
| 9 | - .img { | |
| 10 | - width: 40rpx; | |
| 11 | - height: 40rpx; | |
| 8 | + padding-bottom: 10rpx; | |
| 9 | + border-bottom: 1px solid #f5f5f5; | |
| 10 | + .search-left { | |
| 11 | + width: 580rpx; | |
| 12 | + background-color: #f8f9fa; | |
| 13 | + border-radius: 200rpx; | |
| 14 | + } | |
| 15 | + .search-right { | |
| 16 | + display: flex; | |
| 17 | + align-items: center; | |
| 18 | + text { | |
| 19 | + color: #333; | |
| 20 | + font-size: 14px; | |
| 21 | + } | |
| 22 | + image { | |
| 23 | + width: 40rpx; | |
| 24 | + height: 40rpx; | |
| 25 | + } | |
| 12 | 26 | } |
| 13 | 27 | } |
| 14 | 28 | } |
| ... | ... | @@ -49,7 +63,7 @@ |
| 49 | 63 | display: flex; |
| 50 | 64 | flex-direction: row; |
| 51 | 65 | justify-content: space-between; |
| 52 | - margin-top: 229rpx; | |
| 66 | + margin-top: 277rpx; | |
| 53 | 67 | |
| 54 | 68 | .org-item { |
| 55 | 69 | width: 350rpx; | ... | ... |
| ... | ... | @@ -12,6 +12,7 @@ |
| 12 | 12 | </view> |
| 13 | 13 | <view class="org-item"><image class="image" src="../../../static/right-arrow.png"></image></view> |
| 14 | 14 | </view> |
| 15 | + <view style="height: 150rpx;"></view> | |
| 15 | 16 | <!-- 自带分页组件 --> |
| 16 | 17 | <mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> |
| 17 | 18 | <view class="camera-container"> |
| ... | ... | @@ -31,7 +32,7 @@ |
| 31 | 32 | </view> |
| 32 | 33 | </mescroll-body> |
| 33 | 34 | <!-- 自带分页组件 --> |
| 34 | - <view style="height: 30rpx;"></view> | |
| 35 | + <view style="height: 60rpx;"></view> | |
| 35 | 36 | </view> |
| 36 | 37 | </template> |
| 37 | 38 | |
| ... | ... | @@ -54,9 +55,20 @@ export default { |
| 54 | 55 | }, |
| 55 | 56 | current: 0, |
| 56 | 57 | deviceTotal: 0, |
| 57 | - list: [] | |
| 58 | + list: [], | |
| 59 | + ordId: '' | |
| 58 | 60 | }; |
| 59 | 61 | }, |
| 62 | + onShow() { | |
| 63 | + if (this.ordId == '') { | |
| 64 | + } else { | |
| 65 | + this.loadData(1, this.ordId); | |
| 66 | + } | |
| 67 | + }, | |
| 68 | + onHide() { | |
| 69 | + this.ordId = ''; | |
| 70 | + this.loadData(1, null); | |
| 71 | + }, | |
| 60 | 72 | onLoad() { |
| 61 | 73 | // 隐藏原生的tabbar |
| 62 | 74 | uni.hideTabBar(); |
| ... | ... | @@ -75,10 +87,11 @@ export default { |
| 75 | 87 | this.page.num += 1; |
| 76 | 88 | this.loadData(this.page.num); |
| 77 | 89 | }, |
| 78 | - loadData(pageNo) { | |
| 90 | + loadData(pageNo, organizationV) { | |
| 79 | 91 | let httpData = { |
| 80 | 92 | page: pageNo, |
| 81 | - pageSize: 10 | |
| 93 | + pageSize: 10, | |
| 94 | + organizationId: organizationV | |
| 82 | 95 | }; |
| 83 | 96 | uni.$u.http |
| 84 | 97 | .get('/yt/video', { params: httpData, custom: { load: false } }) | ... | ... |
| ... | ... | @@ -5,87 +5,87 @@ |
| 5 | 5 | <view> |
| 6 | 6 | <!-- 基础统计 --> |
| 7 | 7 | <view class="basic-sty"> |
| 8 | - <view class="basic-text"><text class="text">基础统计</text></view> | |
| 8 | + <view class="basic-text"><text class="text text-bold">基础统计</text></view> | |
| 9 | 9 | <view class="basic"> |
| 10 | 10 | <view class="basic-item"> |
| 11 | 11 | <view class="item-child-top u-flex"> |
| 12 | 12 | <image class="item-image" src="../../static/device-total.png"></image> |
| 13 | - <text class="item-text" style="">设备统计</text> | |
| 13 | + <text class="item-text home-text-muted">设备统计</text> | |
| 14 | 14 | </view> |
| 15 | 15 | <view class="item-child-bottom u-flex"> |
| 16 | 16 | <view @click="navigatorDeviceStatus('ONLINE')" class="u-flex sigle-child"> |
| 17 | 17 | <view class="sigle-text"> |
| 18 | - <text>{{ deviceData.onLine }}</text> | |
| 18 | + <text class="home-text-total">{{ deviceData.onLine }}</text> | |
| 19 | 19 | </view> |
| 20 | - <view class="sigle-value"><text>在线</text></view> | |
| 20 | + <view class="sigle-value"><text class="home-text-total-bottom">在线</text></view> | |
| 21 | 21 | </view> |
| 22 | 22 | <view @click="navigatorDeviceStatus('OFFLINE')" class="u-flex sigle-child"> |
| 23 | 23 | <view class="sigle-text"> |
| 24 | - <text>{{ deviceData.unLine }}</text> | |
| 24 | + <text class="home-text-total">{{ deviceData.unLine }}</text> | |
| 25 | 25 | </view> |
| 26 | - <view class="sigle-value"><text>离线</text></view> | |
| 26 | + <view class="sigle-value"><text class="home-text-total-bottom">离线</text></view> | |
| 27 | 27 | </view> |
| 28 | 28 | <view @click="navigatorDeviceStatus('INACTIVE')" class="u-flex sigle-child"> |
| 29 | 29 | <view class="sigle-text"> |
| 30 | - <text>{{ deviceData.noActive }}</text> | |
| 30 | + <text class="home-text-total">{{ deviceData.noActive }}</text> | |
| 31 | 31 | </view> |
| 32 | - <view class="sigle-value"><text>待激活</text></view> | |
| 32 | + <view class="sigle-value"><text class="home-text-total-bottom">待激活</text></view> | |
| 33 | 33 | </view> |
| 34 | 34 | </view> |
| 35 | 35 | </view> |
| 36 | 36 | <view class="basic-item"> |
| 37 | 37 | <view class="item-child-top u-flex"> |
| 38 | 38 | <image class="item-image" src="../../static/alert.png"></image> |
| 39 | - <text class="item-text">告警统计</text> | |
| 39 | + <text class="item-text home-text-muted">告警统计</text> | |
| 40 | 40 | </view> |
| 41 | 41 | <view class="item-child-bottom u-flex"> |
| 42 | 42 | <view @click="navatorAlertUnhandle()" class="u-flex sigle-child"> |
| 43 | 43 | <view class="sigle-text"> |
| 44 | - <text>{{ alertData.noHandle }}</text> | |
| 44 | + <text class="home-text-total">{{ alertData.noHandle }}</text> | |
| 45 | 45 | </view> |
| 46 | - <view class="sigle-value"><text>未处理</text></view> | |
| 46 | + <view class="sigle-value"><text class="home-text-total-bottom">未处理</text></view> | |
| 47 | 47 | </view> |
| 48 | 48 | <view @click="navatorAlertHandle('CLEARED_ACK')" class="u-flex sigle-child"> |
| 49 | 49 | <view class="sigle-text"> |
| 50 | - <text>{{ alertData.doneHandle }}</text> | |
| 50 | + <text class="home-text-total">{{ alertData.doneHandle }}</text> | |
| 51 | 51 | </view> |
| 52 | - <view class="sigle-value"><text>已处理</text></view> | |
| 52 | + <view class="sigle-value"><text class="home-text-total-bottom">已处理</text></view> | |
| 53 | 53 | </view> |
| 54 | 54 | <view @click="navatorAlertFalseAlarm('CLEARED_UNACK')" class="u-flex sigle-child"> |
| 55 | 55 | <view class="sigle-text"> |
| 56 | - <text>{{ alertData.errorReport }}</text> | |
| 56 | + <text class="home-text-total">{{ alertData.errorReport }}</text> | |
| 57 | 57 | </view> |
| 58 | - <view class="sigle-value"><text>误报</text></view> | |
| 58 | + <view class="sigle-value"><text class="home-text-total-bottom">误报</text></view> | |
| 59 | 59 | </view> |
| 60 | 60 | </view> |
| 61 | 61 | </view> |
| 62 | 62 | </view> |
| 63 | 63 | </view> |
| 64 | 64 | <!-- 基础统计 --> |
| 65 | - <!-- 四宫格 --> | |
| 65 | + <!-- 四宫格CSS最新网格布局--> | |
| 66 | 66 | <view class="grid-container"> |
| 67 | 67 | <view class="grid-item"> |
| 68 | 68 | <view class="item-center"> |
| 69 | 69 | <view class="center"><image class="image" src="../../static/form.png"></image></view> |
| 70 | - <view class="center-text"><text class="text">维修工单</text></view> | |
| 70 | + <view class="center-text"><text class="text text-muted">维修工单</text></view> | |
| 71 | 71 | </view> |
| 72 | 72 | </view> |
| 73 | 73 | <view @click="openCamera" class="grid-item"> |
| 74 | 74 | <view class="item-center"> |
| 75 | 75 | <view class="center"><image class="image" src="../../static/camer.png"></image></view> |
| 76 | - <view class="center-text"><text class="text" style="">摄像头管理</text></view> | |
| 76 | + <view class="center-text"><text class="text text-muted" style="">摄像头管理</text></view> | |
| 77 | 77 | </view> |
| 78 | 78 | </view> |
| 79 | 79 | <view class="grid-item"> |
| 80 | 80 | <view class="item-center"> |
| 81 | 81 | <view class="center"><image class="image" src="../../static/device.png"></image></view> |
| 82 | - <view class="center-text"><text class="text">设备接入</text></view> | |
| 82 | + <view class="center-text"><text class="text text-muted">设备接入</text></view> | |
| 83 | 83 | </view> |
| 84 | 84 | </view> |
| 85 | 85 | <view @click="openOrgStatus" class="grid-item"> |
| 86 | 86 | <view class="item-center"> |
| 87 | 87 | <view class="center"><image class="image" src="../../static/status.png"></image></view> |
| 88 | - <view class="center-text"><text class="text">组态</text></view> | |
| 88 | + <view class="center-text"><text class="text text-muted">组态</text></view> | |
| 89 | 89 | </view> |
| 90 | 90 | </view> |
| 91 | 91 | </view> | ... | ... |
| ... | ... | @@ -10,6 +10,9 @@ |
| 10 | 10 | display: flex; |
| 11 | 11 | flex-direction: row; |
| 12 | 12 | justify-content: space-between; |
| 13 | + position: fixed; | |
| 14 | + z-index: 999999; | |
| 15 | + top: -1rpx; | |
| 13 | 16 | .org-item { |
| 14 | 17 | width: 350rpx; |
| 15 | 18 | height: 200rpx; |
| ... | ... | @@ -24,7 +27,7 @@ |
| 24 | 27 | } |
| 25 | 28 | } |
| 26 | 29 | .org-device { |
| 27 | - margin-top: 5rpx; | |
| 30 | + margin-top: 23rpx; | |
| 28 | 31 | margin-left: 15rpx; |
| 29 | 32 | flex-direction: row; |
| 30 | 33 | .device-image { |
| ... | ... | @@ -43,7 +46,7 @@ |
| 43 | 46 | height: 10px; |
| 44 | 47 | float: right; |
| 45 | 48 | margin-right: 34rpx; |
| 46 | - margin-top: 58rpx; | |
| 49 | + margin-top: 37rpx; | |
| 47 | 50 | } |
| 48 | 51 | } |
| 49 | 52 | } |
| ... | ... | @@ -52,25 +55,24 @@ |
| 52 | 55 | border: 0.1px solid gray; |
| 53 | 56 | } |
| 54 | 57 | .camera-container { |
| 55 | - padding: 0 28rpx; | |
| 56 | - margin-top: -27rpx; | |
| 57 | 58 | .container-item { |
| 58 | - width: 717rpx; | |
| 59 | + width: 750rpx; | |
| 59 | 60 | display: flex; |
| 60 | 61 | justify-content: space-between; |
| 61 | 62 | flex-direction: row; |
| 62 | 63 | flex-wrap: wrap; |
| 63 | - margin-left: -42rpx; | |
| 64 | + margin-top: -50rpx; | |
| 64 | 65 | .item { |
| 65 | - margin-top: 83rpx; | |
| 66 | - width: 300rpx; | |
| 66 | + margin-top: 80rpx; | |
| 67 | + width: 330rpx; | |
| 67 | 68 | height: 200rpx; |
| 68 | 69 | background-color: #fff; |
| 69 | 70 | border-radius: 20px; |
| 70 | - margin-left: 58rpx; | |
| 71 | + margin-left: 25rpx; | |
| 72 | + margin-right: 21rpx; | |
| 71 | 73 | .video { |
| 72 | 74 | border-radius: 20px; |
| 73 | - width: 300rpx; | |
| 75 | + width: 330rpx; | |
| 74 | 76 | height: 200rpx; |
| 75 | 77 | } |
| 76 | 78 | .bottom-text { |
| ... | ... | @@ -88,7 +90,7 @@ |
| 88 | 90 | border: 0.1rpx splid #fff; |
| 89 | 91 | height: 200rpx; |
| 90 | 92 | .image { |
| 91 | - width: 300rpx; | |
| 93 | + width: 330rpx; | |
| 92 | 94 | height: 200rpx; |
| 93 | 95 | border-radius: 20px; |
| 94 | 96 | } | ... | ... |
| ... | ... | @@ -9,17 +9,18 @@ |
| 9 | 9 | display: grid; |
| 10 | 10 | width: 750rpx; |
| 11 | 11 | height: 400rpx; |
| 12 | - grid-template-columns: repeat(2, 350rpx); | |
| 12 | + grid-template-columns: repeat(2, 339rpx); | |
| 13 | 13 | grid-template-rows: repeat(2, 200rpx); |
| 14 | 14 | grid-gap: 20rpx; |
| 15 | 15 | margin-top: 50rpx; |
| 16 | + margin-left: 10rpx; | |
| 16 | 17 | } |
| 17 | 18 | |
| 18 | 19 | .grid-item { |
| 19 | 20 | background-color: #fff; |
| 20 | 21 | border: 0.01rpx solid #fff; |
| 21 | 22 | padding: 40rpx; |
| 22 | - border-radius: 7px; | |
| 23 | + border-radius: 20px; | |
| 23 | 24 | .item-center { |
| 24 | 25 | width: 290rpx; |
| 25 | 26 | height: 150rpx; |
| ... | ... | @@ -43,10 +44,14 @@ |
| 43 | 44 | text-align: left; |
| 44 | 45 | width: 140rpx; |
| 45 | 46 | font-size: 13px; |
| 46 | - line-height: 144rpx; | |
| 47 | + height: 100rpx; | |
| 48 | + display: flex; | |
| 49 | + align-items: center; | |
| 50 | + top: -6rpx; | |
| 47 | 51 | .text { |
| 48 | 52 | font-size: 13px; |
| 49 | 53 | color: #333333; |
| 54 | + text-align: center; | |
| 50 | 55 | } |
| 51 | 56 | } |
| 52 | 57 | } |
| ... | ... | @@ -75,6 +80,7 @@ |
| 75 | 80 | justify-content: space-between; |
| 76 | 81 | align-items: flex-start; |
| 77 | 82 | flex-direction: column; |
| 83 | + border-radius: 20px; | |
| 78 | 84 | .item-child-top { |
| 79 | 85 | justify-content: space-between; |
| 80 | 86 | padding: 30rpx; | ... | ... |
| ... | ... | @@ -14,8 +14,8 @@ |
| 14 | 14 | <text style="#FFFFFF;font-size: 18px;">{{ userInfo.realName }}</text> |
| 15 | 15 | </view> |
| 16 | 16 | </view> |
| 17 | - <view style="#FFFFFF;font-size: 14px;" v-if="userInfo.phoneNumber">手机号:{{ userInfo.phoneNumber | phone }}</view> | |
| 18 | - <view v-else><text style="#FFFFFF;font-size: 14px;">手机号:未绑定</text></view> | |
| 17 | + <view style="color:#FFFFFF;font-size: 14px;" v-if="userInfo.phoneNumber">{{ userInfo.phoneNumber | phone }}</view> | |
| 18 | + <view v-else><text style="color:#FFFFFF;font-size: 14px;">手机号:未绑定</text></view> | |
| 19 | 19 | </view> |
| 20 | 20 | </block> |
| 21 | 21 | <block v-else> |
| ... | ... | @@ -23,11 +23,11 @@ |
| 23 | 23 | <view class="avatar u-flex"><u-icon name="account-fill" color="black" size="30"></u-icon></view> |
| 24 | 24 | </view> |
| 25 | 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> | |
| 26 | + <view class="u-font-lg click-login login-btn ">请点击登录</view> | |
| 27 | + <view v-if="userInfo.isToken" @click="clickAccountFunc" class="detail"><text class="text">绑定账号</text></view> | |
| 28 | 28 | </view> |
| 29 | 29 | </block> |
| 30 | - <view><u-icon name="arrow-right" color="black" size="13"></u-icon></view> | |
| 30 | + <view v-if="userInfo.isToken"><u-icon name="arrow-right" color="white" size="13"></u-icon></view> | |
| 31 | 31 | </view> |
| 32 | 32 | <!-- #endif --> |
| 33 | 33 | <!-- #ifndef MP --> |
| ... | ... | @@ -41,8 +41,8 @@ |
| 41 | 41 | <text style="#FFFFFF;font-size: 18px;">{{ userInfo.realName }}</text> |
| 42 | 42 | </view> |
| 43 | 43 | </view> |
| 44 | - <view style="#FFFFFF;font-size: 14px;" v-if="userInfo.phoneNumber">手机号:{{ userInfo.phoneNumber | phone }}</view> | |
| 45 | - <view v-else><text style="#FFFFFF;font-size: 14px;">手机号:未绑定</text></view> | |
| 44 | + <view style="color:#FFFFFF;font-size: 14px;" v-if="userInfo.phoneNumber">{{ userInfo.phoneNumber | phone }}</view> | |
| 45 | + <view v-else><text style="color:#FFFFFF;font-size: 14px;">手机号:未绑定</text></view> | |
| 46 | 46 | </view> |
| 47 | 47 | </block> |
| 48 | 48 | <block v-else> |
| ... | ... | @@ -50,8 +50,8 @@ |
| 50 | 50 | <view class="avatar u-flex" style="justify-content: center"><u-icon name="account-fill" color="black" size="30"></u-icon></view> |
| 51 | 51 | </view> |
| 52 | 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> | |
| 53 | + <view class="u-font-lg login-btn">登录</view> | |
| 54 | + <view v-if="userInfo.isToken" @click="clickAccountFunc" style="color: black" class="detail">绑定账号</view> | |
| 55 | 55 | </view> |
| 56 | 56 | </block> |
| 57 | 57 | <view><u-icon name="arrow-right" color="black" size="13"></u-icon></view> |
| ... | ... | @@ -72,14 +72,16 @@ |
| 72 | 72 | </view> |
| 73 | 73 | </view> |
| 74 | 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 | + <button class="submit" size="default" @click.top="onLoginoutFunc"><text class="text">退出账号</text></button> | |
| 76 | 76 | </view> |
| 77 | 77 | </view> |
| 78 | 78 | <!-- 绑定账号 --> |
| 79 | 79 | <view> |
| 80 | 80 | <u-modal :showConfirmButton="false" :show="show" :title="title"> |
| 81 | 81 | <view v-if="!bindPhone" class="loginPhone"> |
| 82 | - <view class="form-row"><u--input shape="circle" class="input" prefixIcon="account-fill" type="text" placeholder="登录账号" v-model="account"></u--input></view> | |
| 82 | + <view class="form-row"> | |
| 83 | + <u--input shape="circle" class="input" prefixIcon="account-fill" type="text" placeholder="登录账号" v-model="bindAccountObj.account"></u--input> | |
| 84 | + </view> | |
| 83 | 85 | <view class="form-row item-bind"> |
| 84 | 86 | <u--input |
| 85 | 87 | class="input" |
| ... | ... | @@ -88,7 +90,7 @@ |
| 88 | 90 | suffixIconStyle="color: #909399" |
| 89 | 91 | type="password" |
| 90 | 92 | placeholder="登录密码" |
| 91 | - v-model="password" | |
| 93 | + v-model="bindAccountObj.password" | |
| 92 | 94 | @change="passwordChange" |
| 93 | 95 | ></u--input> |
| 94 | 96 | </view> |
| ... | ... | @@ -103,7 +105,7 @@ |
| 103 | 105 | shape="circle" |
| 104 | 106 | class="input" |
| 105 | 107 | type="text" |
| 106 | - v-model="phone" | |
| 108 | + v-model="bindPhoneObj.phoneNumber" | |
| 107 | 109 | placeholder="请输入手机号码" |
| 108 | 110 | placeholder-style="font-weight:normal;color:#bbbbbb;" |
| 109 | 111 | ></u--input> |
| ... | ... | @@ -113,7 +115,7 @@ |
| 113 | 115 | shape="circle" |
| 114 | 116 | class="input" |
| 115 | 117 | type="text" |
| 116 | - v-model="vCode" | |
| 118 | + v-model="bindPhoneObj.code" | |
| 117 | 119 | placeholder="请输入验证码" |
| 118 | 120 | placeholder-style="font-weight:normal;color:#bbbbbb;" |
| 119 | 121 | ></u--input> |
| ... | ... | @@ -138,7 +140,7 @@ |
| 138 | 140 | <view class="u-flex logout-main"> |
| 139 | 141 | <view class="main"><text style="color: #999999">确定要退出当前账号?</text></view> |
| 140 | 142 | <view @click.top="logoutBtn" class="main"><text style="color: #f95e5a">退出登录</text></view> |
| 141 | - <view class="main"><text @click.top="closeLogout" style="color: #3478f7">取消</text></view> | |
| 143 | + <view class="main1"><text @click.top="closeLogout" style="color: #3478f7">取消</text></view> | |
| 142 | 144 | </view> |
| 143 | 145 | </u-popup> |
| 144 | 146 | </view> |
| ... | ... | @@ -166,13 +168,20 @@ export default { |
| 166 | 168 | readonly: false, |
| 167 | 169 | codeText: '获取验证码', |
| 168 | 170 | phone: '', //号码 |
| 169 | - vCode: '', //验证码 | |
| 170 | 171 | tips: '验证码', |
| 171 | 172 | bindPhone: false, |
| 172 | 173 | show: false, |
| 173 | 174 | title: '绑定账号', |
| 174 | 175 | systemInfo: base.systemInfo, |
| 175 | - PrimaryButtonColor: '#0079fe' //主题色 | |
| 176 | + PrimaryButtonColor: '#0079fe', //主题色 | |
| 177 | + bindAccountObj: { | |
| 178 | + username: '', | |
| 179 | + password: '' | |
| 180 | + }, | |
| 181 | + bindPhoneObj: { | |
| 182 | + phoneNumber: '', | |
| 183 | + code: '' | |
| 184 | + } | |
| 176 | 185 | }; |
| 177 | 186 | }, |
| 178 | 187 | onLoad() { |
| ... | ... | @@ -213,7 +222,13 @@ export default { |
| 213 | 222 | clickAccountFunc() { |
| 214 | 223 | this.show = true; |
| 215 | 224 | }, |
| 216 | - bindConfirm() {}, | |
| 225 | + bindConfirm() { | |
| 226 | + if (!this.bindPhone) { | |
| 227 | + console.log('Account submit', this.bindAccountObj); | |
| 228 | + } else { | |
| 229 | + console.log('Phone submit', this.bindPhoneObj); | |
| 230 | + } | |
| 231 | + }, | |
| 217 | 232 | bindPhoneFunc() { |
| 218 | 233 | this.bindPhone = true; |
| 219 | 234 | }, | ... | ... |
| ... | ... | @@ -15,8 +15,10 @@ |
| 15 | 15 | justify-content: center; |
| 16 | 16 | } |
| 17 | 17 | .click-login { |
| 18 | - color: black; | |
| 19 | - font-weight: bold; | |
| 18 | + font-size: 18px; | |
| 19 | + font-family: PingFangSC-Regular, PingFang SC; | |
| 20 | + font-weight: 500; | |
| 21 | + color: #ffffff; | |
| 20 | 22 | } |
| 21 | 23 | |
| 22 | 24 | .nickName { |
| ... | ... | @@ -93,6 +95,15 @@ |
| 93 | 95 | justify-content: space-between; |
| 94 | 96 | height: 147rpx; |
| 95 | 97 | } |
| 98 | + .submit { | |
| 99 | + margin-top: 60rpx; | |
| 100 | + background: linear-gradient(90deg, #5dc2fc 0%, #377dff 100%); | |
| 101 | + width: 100%; | |
| 102 | + border-radius: 46px; | |
| 103 | + .text { | |
| 104 | + color: #ffffff; | |
| 105 | + } | |
| 106 | + } | |
| 96 | 107 | .nav-link { |
| 97 | 108 | flex-direction: row; |
| 98 | 109 | justify-content: space-between; |
| ... | ... | @@ -109,8 +120,10 @@ |
| 109 | 120 | left: -58rpx; |
| 110 | 121 | width: 420rpx; |
| 111 | 122 | .text { |
| 112 | - color: #333333; | |
| 113 | 123 | font-size: 15px; |
| 124 | + font-family: PingFangSC-Medium, PingFang SC; | |
| 125 | + font-weight: 500; | |
| 126 | + color: #333333; | |
| 114 | 127 | } |
| 115 | 128 | } |
| 116 | 129 | .nav-right { |
| ... | ... | @@ -118,8 +131,8 @@ |
| 118 | 131 | right: -112rpx; |
| 119 | 132 | width: 100rpx; |
| 120 | 133 | .image { |
| 121 | - width: 13rpx; | |
| 122 | - height: 17rpx; | |
| 134 | + width: 12rpx; | |
| 135 | + height: 20rpx; | |
| 123 | 136 | } |
| 124 | 137 | } |
| 125 | 138 | } |
| ... | ... | @@ -241,4 +254,10 @@ |
| 241 | 254 | text-align: center; |
| 242 | 255 | line-height: 86rpx; |
| 243 | 256 | } |
| 257 | + .main1 { | |
| 258 | + width: 669rpx; | |
| 259 | + height: 100rpx; | |
| 260 | + text-align: center; | |
| 261 | + line-height: 86rpx; | |
| 262 | + } | |
| 244 | 263 | } | ... | ... |
| ... | ... | @@ -5,7 +5,7 @@ |
| 5 | 5 | <view class="f__login"> |
| 6 | 6 | <view class="loginPhone"> |
| 7 | 7 | <view class="phone-main" style="margin-top: 173rpx;"> |
| 8 | - <text class="text" style="">手机验证码登录</text> | |
| 8 | + <text class="text">手机验证码登录</text> | |
| 9 | 9 | <view class="circleStyle"></view> |
| 10 | 10 | </view> |
| 11 | 11 | <view class="form-row"> | ... | ... |
| ... | ... | @@ -26,12 +26,12 @@ |
| 26 | 26 | <view class="loginPhone"> |
| 27 | 27 | <view style="margin-top:50rpx" class="form-row u-flex"> |
| 28 | 28 | <view class="v-input"><input type="text" v-model="password" maxlength="32" placeholder="请设置6-20位新的登录密码" :password="!showPasswordF" /></view> |
| 29 | - <view class="v-password"><u-icon @click="showPasswordModeF" :name="showPasswordF ? 'eye-fill' : 'eye-off'"></u-icon></view> | |
| 29 | + <view class="v-password"><u-icon size="25" @click="showPasswordModeF" :name="showPasswordF ? 'eye-fill' : 'eye-off'"></u-icon></view> | |
| 30 | 30 | <u-icon></u-icon> |
| 31 | 31 | </view> |
| 32 | - <view style="margin-top:50rpx" class="form-row u-flex"> | |
| 32 | + <view style="margin-top:70rpx" class="form-row u-flex"> | |
| 33 | 33 | <view class="v-input"><input type="text" v-model="rePassword" maxlength="32" placeholder="请再次输入新的登录密码" :password="!showPasswordS" /></view> |
| 34 | - <view class="v-password"><u-icon @click="showPasswordModeS" :name="showPasswordS ? 'eye-fill' : 'eye-off'"></u-icon></view> | |
| 34 | + <view class="v-password"><u-icon size="25" @click="showPasswordModeS" :name="showPasswordS ? 'eye-fill' : 'eye-off'"></u-icon></view> | |
| 35 | 35 | <u-icon></u-icon> |
| 36 | 36 | </view> |
| 37 | 37 | <button class="submit" size="default" @click="onSubmit"> | ... | ... |
| ... | ... | @@ -29,7 +29,6 @@ |
| 29 | 29 | labelWidth="80px" |
| 30 | 30 | label="有效期" |
| 31 | 31 | prop="userInfo.accountExpireTime" |
| 32 | - borderBottom | |
| 33 | 32 | ref="item1" |
| 34 | 33 | > |
| 35 | 34 | <u--input v-model="myInfoModel.userInfo.accountExpireTime" placeholder="请选择有效期" border="none"></u--input> |
| ... | ... | @@ -249,4 +248,10 @@ export default { |
| 249 | 248 | |
| 250 | 249 | <style lang="scss" scoped> |
| 251 | 250 | @import './static/set.scss'; |
| 251 | +/deep/ .u-line { | |
| 252 | + width: 662rpx !important; | |
| 253 | +} | |
| 254 | +/deep/ .u-form-item { | |
| 255 | + height: 100rpx !important; | |
| 256 | +} | |
| 252 | 257 | </style> | ... | ... |
| ... | ... | @@ -15,6 +15,9 @@ |
| 15 | 15 | font-size: 22px; |
| 16 | 16 | color: #3a4759; |
| 17 | 17 | position: relative; |
| 18 | + z-index: 9999; | |
| 19 | + font-family: PingFangSC-Semibold, PingFang SC; | |
| 20 | + font-weight: 600; | |
| 18 | 21 | } |
| 19 | 22 | .circleStyle { |
| 20 | 23 | position: absolute; |
| ... | ... | @@ -31,6 +34,7 @@ |
| 31 | 34 | .form-row { |
| 32 | 35 | position: relative; |
| 33 | 36 | border-bottom: 1rpx solid #e8e8e8; |
| 37 | + margin-top: 30rpx; | |
| 34 | 38 | .input { |
| 35 | 39 | font-size: 34rpx; |
| 36 | 40 | line-height: 102rpx; |
| ... | ... | @@ -43,7 +47,9 @@ |
| 43 | 47 | } |
| 44 | 48 | |
| 45 | 49 | .getvcode { |
| 46 | - font-size: 26rpx; | |
| 50 | + font-family: PingFangSC-Regular, PingFang SC; | |
| 51 | + font-weight: 400; | |
| 52 | + font-size: 15px; | |
| 47 | 53 | height: 80rpx; |
| 48 | 54 | color: #6299ff; |
| 49 | 55 | line-height: 80rpx; |
| ... | ... | @@ -90,7 +96,7 @@ |
| 90 | 96 | } |
| 91 | 97 | .account-style { |
| 92 | 98 | flex-direction: row; |
| 93 | - margin-top: 20rpx; | |
| 99 | + margin-top: 48rpx; | |
| 94 | 100 | justify-content: space-between; |
| 95 | 101 | .content { |
| 96 | 102 | color: #999999; | ... | ... |
| ... | ... | @@ -21,7 +21,6 @@ |
| 21 | 21 | border-radius: 50px; |
| 22 | 22 | width: 130rpx; |
| 23 | 23 | height: 130rpx; |
| 24 | - border: 0.1rpx solid #e5e5e5; | |
| 25 | 24 | } |
| 26 | 25 | } |
| 27 | 26 | .main-right-image { |
| ... | ... | @@ -34,8 +33,10 @@ |
| 34 | 33 | } |
| 35 | 34 | .basic-text { |
| 36 | 35 | .text { |
| 37 | - color: #8f9ca2; | |
| 38 | 36 | font-size: 14px; |
| 37 | + font-family: PingFangSC-Regular, PingFang SC; | |
| 38 | + font-weight: 400; | |
| 39 | + color: #666666; | |
| 39 | 40 | } |
| 40 | 41 | } |
| 41 | 42 | .basic-main { | ... | ... |
| ... | ... | @@ -4,33 +4,31 @@ |
| 4 | 4 | <public-module></public-module> |
| 5 | 5 | <view class="u-flex login-main"> |
| 6 | 6 | <view class="content"> |
| 7 | - <view class="hello">您好,</view> | |
| 8 | - <view class="hello-welcome">欢迎来到ThingsKit!</view> | |
| 7 | + <view class="hello login-text-muted">您好,</view> | |
| 8 | + <view class="hello-welcome login-text-muted">欢迎来到ThingsKit!</view> | |
| 9 | 9 | <view class="circleStyle"></view> |
| 10 | 10 | </view> |
| 11 | 11 | </view> |
| 12 | 12 | <view class="f__login"> |
| 13 | 13 | <view class="loginPhone"> |
| 14 | 14 | <view class="form-row u-flex"> |
| 15 | - <u-icon name="account-fill"></u-icon> | |
| 16 | 15 | <view class="v-input"><input type="text" v-model="loginForm.username" maxlength="32" placeholder="请输入登录账号" /></view> |
| 17 | 16 | <u-icon></u-icon> |
| 18 | 17 | </view> |
| 19 | 18 | <view class="form-row u-flex"> |
| 20 | - <u-icon name="lock-fill"></u-icon> | |
| 21 | 19 | <view class="v-input"><input type="text" v-model="loginForm.password" maxlength="32" placeholder="请输入登录密码" :password="!showPassword" /></view> |
| 22 | - <view class="v-password" @click="showPasswordMode"><u-icon :name="showPassword ? 'eye-fill' : 'eye-off'"></u-icon></view> | |
| 20 | + <view class="v-password" @click="showPasswordMode"><u-icon size="25" :name="showPassword ? 'eye-fill' : 'eye-off'"></u-icon></view> | |
| 23 | 21 | <u-icon></u-icon> |
| 24 | 22 | </view> |
| 25 | 23 | <button class="submit" size="default" @click="onSubmitFunc"><text class="text">登录</text></button> |
| 26 | 24 | <view class="u-flex row-item"> |
| 27 | - <view class="row-phone" @click="openCodeFunc">手机验证码登录</view> | |
| 28 | - <view class="row-reset" @click="findPassrordFunc">忘记密码</view> | |
| 25 | + <view class="row-phone login-text-gray" @click="openCodeFunc">手机验证码登录</view> | |
| 26 | + <view class="row-reset login-text-gray" @click="findPassrordFunc">忘记密码</view> | |
| 29 | 27 | </view> |
| 30 | - <view @click="onAuthorization" class="u-flex link-login"> | |
| 31 | - <view class="link-text">第三方账号登录</view> | |
| 28 | + <view class="u-flex link-login"> | |
| 29 | + <view class="link-text login-text-gray">第三方账号登录</view> | |
| 32 | 30 | <view style="height:20rpx"></view> |
| 33 | - <view class="link-image"><image class="image" src="../../static/weixin.png" mode="aspectFill"></image></view> | |
| 31 | + <view @click="onAuthorization" class="link-image"><image class="image" src="../../static/weixin.png" mode="aspectFill"></image></view> | |
| 34 | 32 | <view class="circleStyleBottom"></view> |
| 35 | 33 | </view> |
| 36 | 34 | </view> |
| ... | ... | @@ -41,6 +39,7 @@ |
| 41 | 39 | <script> |
| 42 | 40 | import { mapMutations } from 'vuex'; |
| 43 | 41 | import { getUserInfo } from '@/components/module/f-login/f-login.js'; |
| 42 | +import { loginApp } from '@/config/login'; | |
| 44 | 43 | |
| 45 | 44 | export default { |
| 46 | 45 | data() { |
| ... | ... | @@ -49,39 +48,46 @@ export default { |
| 49 | 48 | username: '', |
| 50 | 49 | password: '' |
| 51 | 50 | }, |
| 52 | - showPassword: false | |
| 51 | + showPassword: false, | |
| 52 | + code: '' | |
| 53 | 53 | }; |
| 54 | 54 | }, |
| 55 | + onLoad() { | |
| 56 | + uni.login({ | |
| 57 | + success: res => { | |
| 58 | + if (res.errMsg == 'login:ok') { | |
| 59 | + this.code = res.code; | |
| 60 | + console.log('This code', this.code); | |
| 61 | + } else { | |
| 62 | + uni.showToast({ | |
| 63 | + title: '系统异常' | |
| 64 | + }); | |
| 65 | + } | |
| 66 | + } | |
| 67 | + }); | |
| 68 | + }, | |
| 55 | 69 | methods: { |
| 56 | 70 | ...mapMutations(['setUserInfo']), |
| 71 | + //微信授权登录 | |
| 57 | 72 | onAuthorization(e) { |
| 58 | 73 | getUserInfo( |
| 59 | 74 | info => { |
| 60 | - console.log(info, '授权信息'); | |
| 75 | + console.log('授权信息', info); | |
| 61 | 76 | let httpData = { |
| 62 | 77 | code: this.code, |
| 63 | 78 | nickName: info.nickName || '', //昵称 |
| 64 | 79 | avatarUrl: info.avatarUrl || '', //头像 |
| 65 | 80 | gender: info.gender || '' //性别 0:未知 1:男 2:女 |
| 66 | 81 | }; |
| 67 | - // uni.$u.http.post('您的接口', httpData).then(res => { | |
| 68 | - let userInfo = { | |
| 69 | - // ...res, | |
| 70 | - token: true //token用于判断是否登录 | |
| 71 | - }; | |
| 72 | - // this.setUserInfo(userInfo) | |
| 73 | - // setTimeout(()=>{ | |
| 74 | - // uni.showToast({ | |
| 75 | - // title: '登录成功', | |
| 76 | - // icon: 'none' | |
| 77 | - // }); | |
| 78 | - // this.closeLogin(); | |
| 79 | - // },100) | |
| 80 | - // }) | |
| 82 | + // #ifdef APP-PLUS||MP | |
| 83 | + setTimeout(() => { | |
| 84 | + uni.reLaunch({ | |
| 85 | + url: '/pages/personal/personal' | |
| 86 | + }); | |
| 87 | + }, 500); | |
| 88 | + // #endif | |
| 81 | 89 | }, |
| 82 | - err => { | |
| 83 | - // this.closeLogin(); | |
| 84 | - } | |
| 90 | + err => {} | |
| 85 | 91 | ); |
| 86 | 92 | }, |
| 87 | 93 | onSubmitFunc() { | ... | ... |
| ... | ... | @@ -10,11 +10,14 @@ |
| 10 | 10 | .hello { |
| 11 | 11 | font-size: 30px; |
| 12 | 12 | color: #3a4759; |
| 13 | + z-index: 9999; | |
| 14 | + position: relative; | |
| 13 | 15 | } |
| 14 | 16 | .hello-welcome { |
| 15 | 17 | position: relative; |
| 16 | 18 | font-size: 30px; |
| 17 | 19 | color: #3a4759; |
| 20 | + z-index: 9999; | |
| 18 | 21 | } |
| 19 | 22 | } |
| 20 | 23 | } |
| ... | ... | @@ -41,14 +44,14 @@ |
| 41 | 44 | .form-row { |
| 42 | 45 | position: relative; |
| 43 | 46 | justify-content: space-between; |
| 44 | - margin-top: 30rpx; | |
| 47 | + margin-top: 60rpx; | |
| 45 | 48 | .v-input { |
| 46 | - width: 620rpx; | |
| 47 | - border-bottom: 0.1rpx solid #e5e5e5; | |
| 49 | + width: 690rpx; | |
| 50 | + border-bottom: 2px solid #e5e5e5; | |
| 48 | 51 | } |
| 49 | 52 | .v-password { |
| 50 | 53 | position: absolute; |
| 51 | - right: 18rpx; | |
| 54 | + right: 0rpx; | |
| 52 | 55 | z-index: 66666; |
| 53 | 56 | } |
| 54 | 57 | .input { |
| ... | ... | @@ -74,7 +77,7 @@ |
| 74 | 77 | } |
| 75 | 78 | .row-item { |
| 76 | 79 | flex-direction: row; |
| 77 | - margin-top: 20rpx; | |
| 80 | + margin-top: 60rpx; | |
| 78 | 81 | justify-content: space-between; |
| 79 | 82 | .row-phone { |
| 80 | 83 | color: #999999; |
| ... | ... | @@ -89,7 +92,7 @@ |
| 89 | 92 | .link-login { |
| 90 | 93 | justify-content: center; |
| 91 | 94 | flex-direction: column; |
| 92 | - margin-top: 220rpx; | |
| 95 | + margin-top: 370rpx; | |
| 93 | 96 | .link-text { |
| 94 | 97 | color: #999999; |
| 95 | 98 | font-size: 13px; | ... | ... |
static/btn-bg.png
0 → 100644
34.3 KB
| 1 | 1 | export const state = { |
| 2 | 2 | //用户数据 |
| 3 | 3 | userInfo: {}, |
| 4 | + //存储告警徽标数据 | |
| 5 | + badgeInfo: 0 | |
| 4 | 6 | }; |
| 5 | 7 | export const mutations = { |
| 6 | 8 | //储存用户信息 |
| ... | ... | @@ -27,5 +29,34 @@ export const mutations = { |
| 27 | 29 | }, |
| 28 | 30 | }; |
| 29 | 31 | export const actions = { |
| 30 | - | |
| 32 | + //更新告警徽标数 | |
| 33 | + updateBadgeTotal({ | |
| 34 | + state, | |
| 35 | + commit | |
| 36 | + }, data) { | |
| 37 | + let httpData = { | |
| 38 | + page: 1, | |
| 39 | + pageSize: 10, | |
| 40 | + status: data.status == 'CLEARED_ACK' ? null : data.status, | |
| 41 | + startTime: data.startTime, | |
| 42 | + endTime: data.endTime, | |
| 43 | + severity: data.severity, | |
| 44 | + deviceType: data.deviceType, | |
| 45 | + organizationId: data.organizationId, | |
| 46 | + alarmType: data.alarmType | |
| 47 | + }; | |
| 48 | + uni.$u.http | |
| 49 | + .get('/yt/alarm', { | |
| 50 | + params: httpData, | |
| 51 | + custom: { | |
| 52 | + load: false | |
| 53 | + } | |
| 54 | + }) | |
| 55 | + .then(res => { | |
| 56 | + state.badgeInfo = res.total | |
| 57 | + }) | |
| 58 | + .catch(e => { | |
| 59 | + uni.$u.toast(e.data?.message); | |
| 60 | + }); | |
| 61 | + } | |
| 31 | 62 | }; | ... | ... |
| ... | ... | @@ -70,7 +70,7 @@ button { |
| 70 | 70 | //(设备、告警,适用设备详情基础信息文本(右边的值的文本))第二个文本 |
| 71 | 71 | .text-device-muted { |
| 72 | 72 | font-size: 14px; |
| 73 | - font-family: PingFangSC-Regular, PingFang SC; | |
| 73 | + font-family: PingFang SC-Regular, PingFang SC; | |
| 74 | 74 | font-weight: 400; |
| 75 | 75 | color: #666666; |
| 76 | 76 | } |
| ... | ... | @@ -122,7 +122,50 @@ button { |
| 122 | 122 | .border-line { |
| 123 | 123 | border-radius: 20px; |
| 124 | 124 | } |
| 125 | - | |
| 125 | +//首页 | |
| 126 | +.home-text-muted { | |
| 127 | + font-size: 14px; | |
| 128 | + font-family: PingFangSC-Regular, PingFang SC; | |
| 129 | + font-weight: 500; | |
| 130 | + color: #333333; | |
| 131 | +} | |
| 132 | +.home-text-total { | |
| 133 | + font-size: 17px; | |
| 134 | + font-family: PingFangSC-Regular, PingFang SC; | |
| 135 | + font-weight: 500; | |
| 136 | + color: #333333; | |
| 137 | +} | |
| 138 | +.home-text-total-bottom { | |
| 139 | + font-size: 12px; | |
| 140 | + font-family: PingFangSC-Regular, PingFang SC; | |
| 141 | + font-weight: 400; | |
| 142 | + color: #999999; | |
| 143 | +} | |
| 144 | +//登录 | |
| 145 | +.login-text-muted { | |
| 146 | + font-size: 30px; | |
| 147 | + font-family: PingFangSC-Regular, PingFang SC; | |
| 148 | + font-weight: 600; | |
| 149 | + color: #3a4759; | |
| 150 | +} | |
| 151 | +.login-text-gray { | |
| 152 | + font-size: 13px; | |
| 153 | + font-family: PingFangSC-Regular, PingFang SC; | |
| 154 | + font-weight: 400; | |
| 155 | + color: #999999; | |
| 156 | +} | |
| 157 | +.login-btn { | |
| 158 | + font-size: 18px; | |
| 159 | + font-family: PingFangSC-Regular, PingFang SC; | |
| 160 | + font-weight: 500; | |
| 161 | + color: #ffffff; | |
| 162 | +} | |
| 163 | +.login-phone { | |
| 164 | + font-size: 14px; | |
| 165 | + font-family: PingFangSC-Regular, PingFang SC; | |
| 166 | + font-weight: 400; | |
| 167 | + color: #ffffff; | |
| 168 | +} | |
| 126 | 169 | // 定义flex等分 |
| 127 | 170 | @for $i from 0 through 12 { |
| 128 | 171 | .u-flex-#{$i} { | ... | ... |
| ... | ... | @@ -3,9 +3,6 @@ |
| 3 | 3 | <!-- 公共组件-每个页面必须引入 --> |
| 4 | 4 | <public-module></public-module> |
| 5 | 5 | <view class="notify-column"> |
| 6 | - <view class="u-flex column"> | |
| 7 | - <text class="text">{{ notifyList.title }}</text> | |
| 8 | - </view> | |
| 9 | 6 | <view class="column-list"> |
| 10 | 7 | <u-list height="140rpx"> |
| 11 | 8 | <u-list-item> |
| ... | ... | @@ -15,9 +12,14 @@ |
| 15 | 12 | </u-list-item> |
| 16 | 13 | </u-list> |
| 17 | 14 | <view class="bottom-text"> |
| 18 | - <!-- 富文本解析 --> | |
| 19 | - <u-parse :content="notifyList.content"></u-parse> | |
| 20 | - <!-- 富文本解析 --> | |
| 15 | + <view class="u-flex column"> | |
| 16 | + <text class="text">{{ notifyList.title }}</text> | |
| 17 | + </view> | |
| 18 | + <view style="margin-top: 20rpx;"> | |
| 19 | + <!-- 富文本解析 --> | |
| 20 | + <u-parse :content="notifyList.content"></u-parse> | |
| 21 | + <!-- 富文本解析 --> | |
| 22 | + </view> | |
| 21 | 23 | </view> |
| 22 | 24 | </view> |
| 23 | 25 | </view> |
| ... | ... | @@ -51,4 +53,9 @@ export default { |
| 51 | 53 | |
| 52 | 54 | <style lang="scss" scoped> |
| 53 | 55 | @import './static/notifyDetail.scss'; |
| 56 | +/deep/ .u-line { | |
| 57 | + position: relative !important; | |
| 58 | + width: 640rpx !important; | |
| 59 | + left: 31rpx !important; | |
| 60 | +} | |
| 54 | 61 | </style> | ... | ... |
| ... | ... | @@ -5,14 +5,6 @@ |
| 5 | 5 | padding-left: 27rpx; |
| 6 | 6 | } |
| 7 | 7 | .notify-column { |
| 8 | - .column { | |
| 9 | - margin-top: 10rpx; | |
| 10 | - justify-content: center; | |
| 11 | - .text { | |
| 12 | - color: #2e384d; | |
| 13 | - font-size: 18px; | |
| 14 | - } | |
| 15 | - } | |
| 16 | 8 | .column-list { |
| 17 | 9 | border-radius: 20px; |
| 18 | 10 | margin-top: 20rpx; |
| ... | ... | @@ -20,10 +12,20 @@ |
| 20 | 12 | height: 1000rpx; |
| 21 | 13 | background-color: #ffffff; |
| 22 | 14 | .bottom-text { |
| 15 | + margin-left: 33rpx; | |
| 23 | 16 | .text { |
| 24 | 17 | color: #2e384d; |
| 25 | 18 | font-size: 15px; |
| 26 | 19 | } |
| 20 | + .column { | |
| 21 | + margin-top: 20rpx; | |
| 22 | + .text { | |
| 23 | + font-size: 16px; | |
| 24 | + font-family: PingFangSC-Medium, PingFang SC; | |
| 25 | + font-weight: 500; | |
| 26 | + color: #2e384d; | |
| 27 | + } | |
| 28 | + } | |
| 27 | 29 | } |
| 28 | 30 | } |
| 29 | 31 | } | ... | ... |
| ... | ... | @@ -2,13 +2,8 @@ |
| 2 | 2 | <view class="notify-page"> |
| 3 | 3 | <!-- 公共组件-每个页面必须引入 --> |
| 4 | 4 | <public-module></public-module> |
| 5 | - <view> | |
| 6 | - <u--form labelPosition="left" :model="model1" ref="form1"> | |
| 7 | - <u-form-item label="类型" prop="userInfo.sex" @click="openTypeClick" ref="item1"> | |
| 8 | - <u--input v-model="model1.userInfo.type" placeholder="请选择类型" border="surround"></u--input> | |
| 9 | - <u-icon slot="right" name="arrow-right"></u-icon> | |
| 10 | - </u-form-item> | |
| 11 | - </u--form> | |
| 5 | + <view @click="openTypeClick" style="width: 700rpx;"> | |
| 6 | + <u--input suffixIcon="arrow-down" shape="circle" v-model="model1.userInfo.type" placeholder="请选择类型" border="surround"></u--input> | |
| 12 | 7 | <u-action-sheet :show="showType" :actions="actions" title="请选择类型" @close="showType = false" @select="typeSelect"></u-action-sheet> |
| 13 | 8 | </view> |
| 14 | 9 | <view class="notify-main"> | ... | ... |