Commit d392d69229d4a8a80b8e4857bf7261af7083f661

Authored by xp.Huang
2 parents 5d16e648 1ef8fed8

Merge branch 'dev-ft' into 'main'

refractor:修改页面样式(告警,通知,摄像头,等)

See merge request huang/thingskit-app!31
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 </view> 38 </view>
39 <view class="column"> 39 <view class="column">
40 <text class="text-org-bold">告警状态:</text> 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 list.status == 'CLEARED_UNACK' 43 list.status == 'CLEARED_UNACK'
44 ? '清除未确认' 44 ? '清除未确认'
@@ -70,8 +70,8 @@ @@ -70,8 +70,8 @@
70 <view><u--textarea border="none" height="96" placeholder="请输入处理结果" v-model="formModel.result" count></u--textarea></view> 70 <view><u--textarea border="none" height="96" placeholder="请输入处理结果" v-model="formModel.result" count></u--textarea></view>
71 </view> 71 </view>
72 <!-- #endif --> 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 </view> 75 </view>
76 </view> 76 </view>
77 </template> 77 </template>
@@ -134,4 +134,8 @@ export default { @@ -134,4 +134,8 @@ export default {
134 134
135 <style lang="scss" scoped> 135 <style lang="scss" scoped>
136 @import './static/alarmDetail.scss'; 136 @import './static/alarmDetail.scss';
  137 +/deep/ .u-button--primary {
  138 + background-color: #377dff !important;
  139 + border-color: #377dff !important;
  140 +}
137 </style> 141 </style>
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 margin-top: 20rpx; 53 margin-top: 20rpx;
54 } 54 }
55 .hanle-main { 55 .hanle-main {
56 - margin-top: 20rpx; 56 + margin-top: 30rpx;
57 border-radius: 20px; 57 border-radius: 20px;
58 width: 688rpx; 58 width: 688rpx;
59 height: 273rpx; 59 height: 273rpx;
@@ -30,6 +30,7 @@ @@ -30,6 +30,7 @@
30 30
31 <script> 31 <script>
32 import base from '@/config/baseUrl.js'; 32 import base from '@/config/baseUrl.js';
  33 +import { mapState } from 'vuex';
33 34
34 export default { 35 export default {
35 name: 'f-tabbar', 36 name: 'f-tabbar',
@@ -108,7 +109,12 @@ export default { @@ -108,7 +109,12 @@ export default {
108 icon: '../../../static/my-un.png', 109 icon: '../../../static/my-un.png',
109 iconFill: '../../../static/my-yes.png' 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 onLoad() { 120 onLoad() {
@@ -119,8 +125,6 @@ export default { @@ -119,8 +125,6 @@ export default {
119 let currentPages = getCurrentPages(); 125 let currentPages = getCurrentPages();
120 let page = currentPages[currentPages.length - 1]; 126 let page = currentPages[currentPages.length - 1];
121 this.path = page.route; 127 this.path = page.route;
122 - //获取页面路径  
123 - console.log('页面路径', this.list);  
124 if (this.list.length > 0) { 128 if (this.list.length > 0) {
125 this.list?.forEach((item, index) => { 129 this.list?.forEach((item, index) => {
126 if (this.path == item.url) { 130 if (this.path == item.url) {
@@ -128,19 +132,20 @@ export default { @@ -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 methods: { 141 methods: {
134 loadData() { 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 onTabbar(index) { 145 onTabbar(index) {
  146 + setTimeout(() => {
  147 + this.loadData();
  148 + }, 100);
144 if (this.list[index].url) { 149 if (this.list[index].url) {
145 if (this.path !== this.list[index].url) { 150 if (this.path !== this.list[index].url) {
146 uni.switchTab({ 151 uni.switchTab({
@@ -104,13 +104,11 @@ uni.$u.http.interceptors.response.use( @@ -104,13 +104,11 @@ uni.$u.http.interceptors.response.use(
104 } else if (message == "request:fail timeout") { 104 } else if (message == "request:fail timeout") {
105 errorData = "请求超时:请检查网络"; 105 errorData = "请求超时:请检查网络";
106 } else if (message == "Token has expired") { 106 } else if (message == "Token has expired") {
107 - errorData = "Token失效,请重新登录";  
108 uni.reLaunch({ 107 uni.reLaunch({
109 url: "/publicLoginSubPage/public/login", 108 url: "/publicLoginSubPage/public/login",
110 }); 109 });
111 store.commit("emptyUserInfo"); 110 store.commit("emptyUserInfo");
112 } else if (message == "Invalid username or password") { 111 } else if (message == "Invalid username or password") {
113 - // errorData = "用户名或者密码无效";  
114 uni.reLaunch({ 112 uni.reLaunch({
115 url: "/publicLoginSubPage/public/login", 113 url: "/publicLoginSubPage/public/login",
116 }); 114 });
@@ -23,7 +23,6 @@ @@ -23,7 +23,6 @@
23 { 23 {
24 "path": "pages/alarm/alarm", 24 "path": "pages/alarm/alarm",
25 "style": { 25 "style": {
26 - "navigationStyle": "custom",  
27 "navigationBarTitleText": "告警" 26 "navigationBarTitleText": "告警"
28 } 27 }
29 }, 28 },
@@ -180,4 +179,4 @@ @@ -180,4 +179,4 @@
180 } 179 }
181 ] 180 ]
182 } 181 }
183 -} 182 +}
@@ -2,26 +2,32 @@ @@ -2,26 +2,32 @@
2 <view class="alert-page"> 2 <view class="alert-page">
3 <!-- 公共组件-每个页面必须引入 --> 3 <!-- 公共组件-每个页面必须引入 -->
4 <public-module></public-module> 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 </view> 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 </view> 27 </view>
22 </view> 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 <mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> 32 <mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback">
27 <view class="device-list"> 33 <view class="device-list">
@@ -157,7 +163,8 @@ @@ -157,7 +163,8 @@
157 </view> 163 </view>
158 </view> 164 </view>
159 </view> 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 <view style="width: 300rpx"><u-button @click="resetData" type="info" shape="circle" text="重置"></u-button></view> 168 <view style="width: 300rpx"><u-button @click="resetData" type="info" shape="circle" text="重置"></u-button></view>
162 <view style="width: 300rpx; margin-left: 46rpx"><u-button @click="queryData" type="primary" shape="circle" text="确认"></u-button></view> 169 <view style="width: 300rpx; margin-left: 46rpx"><u-button @click="queryData" type="primary" shape="circle" text="确认"></u-button></view>
163 </view> 170 </view>
@@ -188,6 +195,7 @@ import fTabbar from '@/components/module/f-tabbar/f-tabbar'; @@ -188,6 +195,7 @@ import fTabbar from '@/components/module/f-tabbar/f-tabbar';
188 import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js'; 195 import MescrollMixin from '@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js';
189 import { pageNumber, pageSize } from '@/config/constant.js'; 196 import { pageNumber, pageSize } from '@/config/constant.js';
190 import { alertStatus, deviceType, alertLevel, timeArea } from './static/data.js'; 197 import { alertStatus, deviceType, alertLevel, timeArea } from './static/data.js';
  198 +import { mapActions } from 'vuex';
191 199
192 export default { 200 export default {
193 mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件) 201 mixins: [MescrollMixin], // 使用mixin (在main.js注册全局组件)
@@ -255,8 +263,6 @@ export default { @@ -255,8 +263,6 @@ export default {
255 let type; 263 let type;
256 if (Array.isArray(params)) { 264 if (Array.isArray(params)) {
257 type = params.join(','); 265 type = params.join(',');
258 - // type = params[0];  
259 - console.log('Type', type);  
260 } else { 266 } else {
261 type = params; 267 type = params;
262 } 268 }
@@ -266,6 +272,10 @@ export default { @@ -266,6 +272,10 @@ export default {
266 } 272 }
267 }, 273 },
268 methods: { 274 methods: {
  275 + ...mapActions(['updateBadgeTotal']),
  276 + inputChanged(e) {
  277 + this.loadData(1, null, null, null, null, null, null, e);
  278 + },
269 getAlertStatus(e, i) { 279 getAlertStatus(e, i) {
270 this.current1 = i; 280 this.current1 = i;
271 this.alertStatusVal = e.value; 281 this.alertStatusVal = e.value;
@@ -343,7 +353,7 @@ export default { @@ -343,7 +353,7 @@ export default {
343 this.page.num += 1; 353 this.page.num += 1;
344 this.loadData(this.page.num); 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 let httpData = { 357 let httpData = {
348 page: pageNo, 358 page: pageNo,
349 pageSize: 10, 359 pageSize: 10,
@@ -352,13 +362,16 @@ export default { @@ -352,13 +362,16 @@ export default {
352 endTime: endTimeV, 362 endTime: endTimeV,
353 severity: severityV, 363 severity: severityV,
354 deviceType: deviceTypeV, 364 deviceType: deviceTypeV,
355 - organizationId: organizationV 365 + organizationId: organizationV,
  366 + alarmType: alarmName
356 }; 367 };
357 uni.$u.http 368 uni.$u.http
358 .get('/yt/alarm', { params: httpData, custom: { load: false } }) 369 .get('/yt/alarm', { params: httpData, custom: { load: false } })
359 .then(res => { 370 .then(res => {
360 uni.stopPullDownRefresh(); 371 uni.stopPullDownRefresh();
361 this.mescroll.endByPage(res.items.length, res.total); 372 this.mescroll.endByPage(res.items.length, res.total);
  373 + //异步实时更新告警徽标数
  374 + this.updateBadgeTotal(httpData);
362 this.alertTotal = res.total; 375 this.alertTotal = res.total;
363 if (pageNo == 1) { 376 if (pageNo == 1) {
364 this.list = res.items; 377 this.list = res.items;
@@ -367,7 +380,7 @@ export default { @@ -367,7 +380,7 @@ export default {
367 } 380 }
368 }) 381 })
369 .catch(e => { 382 .catch(e => {
370 - uni.$u.toast(e.data.message); 383 + uni.$u.toast(e.data?.message);
371 //联网失败, 结束加载 384 //联网失败, 结束加载
372 this.mescroll.endErr(); 385 this.mescroll.endErr();
373 }); 386 });
@@ -425,4 +438,15 @@ export default { @@ -425,4 +438,15 @@ export default {
425 438
426 <style lang="scss" scoped> 439 <style lang="scss" scoped>
427 @import './static/alarm.scss'; 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 </style> 452 </style>
1 .alert-page { 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 justify-content: space-between; 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,7 +63,7 @@
49 display: flex; 63 display: flex;
50 flex-direction: row; 64 flex-direction: row;
51 justify-content: space-between; 65 justify-content: space-between;
52 - margin-top: 229rpx; 66 + margin-top: 277rpx;
53 67
54 .org-item { 68 .org-item {
55 width: 350rpx; 69 width: 350rpx;
@@ -32,7 +32,7 @@ const alertStatus = [{ @@ -32,7 +32,7 @@ const alertStatus = [{
32 value: 'CLEARED_ACK', 32 value: 'CLEARED_ACK',
33 bgColor: '#F6F6F6', 33 bgColor: '#F6F6F6',
34 textColor: '#F6F6F6' 34 textColor: '#F6F6F6'
35 - } 35 + },
36 ] 36 ]
37 const deviceType = [{ 37 const deviceType = [{
38 index: 1, 38 index: 1,
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
12 </view> 12 </view>
13 <view class="org-item"><image class="image" src="../../../static/right-arrow.png"></image></view> 13 <view class="org-item"><image class="image" src="../../../static/right-arrow.png"></image></view>
14 </view> 14 </view>
  15 + <view style="height: 150rpx;"></view>
15 <!-- 自带分页组件 --> 16 <!-- 自带分页组件 -->
16 <mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback"> 17 <mescroll-body ref="mescrollRef" :up="upOption" @init="mescrollInit" :down="downOption" @down="downCallback" @up="upCallback">
17 <view class="camera-container"> 18 <view class="camera-container">
@@ -31,7 +32,7 @@ @@ -31,7 +32,7 @@
31 </view> 32 </view>
32 </mescroll-body> 33 </mescroll-body>
33 <!-- 自带分页组件 --> 34 <!-- 自带分页组件 -->
34 - <view style="height: 30rpx;"></view> 35 + <view style="height: 60rpx;"></view>
35 </view> 36 </view>
36 </template> 37 </template>
37 38
@@ -54,9 +55,20 @@ export default { @@ -54,9 +55,20 @@ export default {
54 }, 55 },
55 current: 0, 56 current: 0,
56 deviceTotal: 0, 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 onLoad() { 72 onLoad() {
61 // 隐藏原生的tabbar 73 // 隐藏原生的tabbar
62 uni.hideTabBar(); 74 uni.hideTabBar();
@@ -75,10 +87,11 @@ export default { @@ -75,10 +87,11 @@ export default {
75 this.page.num += 1; 87 this.page.num += 1;
76 this.loadData(this.page.num); 88 this.loadData(this.page.num);
77 }, 89 },
78 - loadData(pageNo) { 90 + loadData(pageNo, organizationV) {
79 let httpData = { 91 let httpData = {
80 page: pageNo, 92 page: pageNo,
81 - pageSize: 10 93 + pageSize: 10,
  94 + organizationId: organizationV
82 }; 95 };
83 uni.$u.http 96 uni.$u.http
84 .get('/yt/video', { params: httpData, custom: { load: false } }) 97 .get('/yt/video', { params: httpData, custom: { load: false } })
@@ -5,87 +5,87 @@ @@ -5,87 +5,87 @@
5 <view> 5 <view>
6 <!-- 基础统计 --> 6 <!-- 基础统计 -->
7 <view class="basic-sty"> 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 <view class="basic"> 9 <view class="basic">
10 <view class="basic-item"> 10 <view class="basic-item">
11 <view class="item-child-top u-flex"> 11 <view class="item-child-top u-flex">
12 <image class="item-image" src="../../static/device-total.png"></image> 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 </view> 14 </view>
15 <view class="item-child-bottom u-flex"> 15 <view class="item-child-bottom u-flex">
16 <view @click="navigatorDeviceStatus('ONLINE')" 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 class="home-text-total">{{ deviceData.onLine }}</text>
19 </view> 19 </view>
20 - <view class="sigle-value"><text>在线</text></view> 20 + <view class="sigle-value"><text class="home-text-total-bottom">在线</text></view>
21 </view> 21 </view>
22 <view @click="navigatorDeviceStatus('OFFLINE')" 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 class="home-text-total">{{ deviceData.unLine }}</text>
25 </view> 25 </view>
26 - <view class="sigle-value"><text>离线</text></view> 26 + <view class="sigle-value"><text class="home-text-total-bottom">离线</text></view>
27 </view> 27 </view>
28 <view @click="navigatorDeviceStatus('INACTIVE')" 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 class="home-text-total">{{ deviceData.noActive }}</text>
31 </view> 31 </view>
32 - <view class="sigle-value"><text>待激活</text></view> 32 + <view class="sigle-value"><text class="home-text-total-bottom">待激活</text></view>
33 </view> 33 </view>
34 </view> 34 </view>
35 </view> 35 </view>
36 <view class="basic-item"> 36 <view class="basic-item">
37 <view class="item-child-top u-flex"> 37 <view class="item-child-top u-flex">
38 <image class="item-image" src="../../static/alert.png"></image> 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 </view> 40 </view>
41 <view class="item-child-bottom u-flex"> 41 <view class="item-child-bottom u-flex">
42 <view @click="navatorAlertUnhandle()" class="u-flex sigle-child"> 42 <view @click="navatorAlertUnhandle()" class="u-flex sigle-child">
43 <view class="sigle-text"> 43 <view class="sigle-text">
44 - <text>{{ alertData.noHandle }}</text> 44 + <text class="home-text-total">{{ alertData.noHandle }}</text>
45 </view> 45 </view>
46 - <view class="sigle-value"><text>未处理</text></view> 46 + <view class="sigle-value"><text class="home-text-total-bottom">未处理</text></view>
47 </view> 47 </view>
48 <view @click="navatorAlertHandle('CLEARED_ACK')" class="u-flex sigle-child"> 48 <view @click="navatorAlertHandle('CLEARED_ACK')" class="u-flex sigle-child">
49 <view class="sigle-text"> 49 <view class="sigle-text">
50 - <text>{{ alertData.doneHandle }}</text> 50 + <text class="home-text-total">{{ alertData.doneHandle }}</text>
51 </view> 51 </view>
52 - <view class="sigle-value"><text>已处理</text></view> 52 + <view class="sigle-value"><text class="home-text-total-bottom">已处理</text></view>
53 </view> 53 </view>
54 <view @click="navatorAlertFalseAlarm('CLEARED_UNACK')" class="u-flex sigle-child"> 54 <view @click="navatorAlertFalseAlarm('CLEARED_UNACK')" class="u-flex sigle-child">
55 <view class="sigle-text"> 55 <view class="sigle-text">
56 - <text>{{ alertData.errorReport }}</text> 56 + <text class="home-text-total">{{ alertData.errorReport }}</text>
57 </view> 57 </view>
58 - <view class="sigle-value"><text>误报</text></view> 58 + <view class="sigle-value"><text class="home-text-total-bottom">误报</text></view>
59 </view> 59 </view>
60 </view> 60 </view>
61 </view> 61 </view>
62 </view> 62 </view>
63 </view> 63 </view>
64 <!-- 基础统计 --> 64 <!-- 基础统计 -->
65 - <!-- 四宫格 --> 65 + <!-- 四宫格CSS最新网格布局-->
66 <view class="grid-container"> 66 <view class="grid-container">
67 <view class="grid-item"> 67 <view class="grid-item">
68 <view class="item-center"> 68 <view class="item-center">
69 <view class="center"><image class="image" src="../../static/form.png"></image></view> 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 </view> 71 </view>
72 </view> 72 </view>
73 <view @click="openCamera" class="grid-item"> 73 <view @click="openCamera" class="grid-item">
74 <view class="item-center"> 74 <view class="item-center">
75 <view class="center"><image class="image" src="../../static/camer.png"></image></view> 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 </view> 77 </view>
78 </view> 78 </view>
79 <view class="grid-item"> 79 <view class="grid-item">
80 <view class="item-center"> 80 <view class="item-center">
81 <view class="center"><image class="image" src="../../static/device.png"></image></view> 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 </view> 83 </view>
84 </view> 84 </view>
85 <view @click="openOrgStatus" class="grid-item"> 85 <view @click="openOrgStatus" class="grid-item">
86 <view class="item-center"> 86 <view class="item-center">
87 <view class="center"><image class="image" src="../../static/status.png"></image></view> 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 </view> 89 </view>
90 </view> 90 </view>
91 </view> 91 </view>
@@ -10,6 +10,9 @@ @@ -10,6 +10,9 @@
10 display: flex; 10 display: flex;
11 flex-direction: row; 11 flex-direction: row;
12 justify-content: space-between; 12 justify-content: space-between;
  13 + position: fixed;
  14 + z-index: 999999;
  15 + top: -1rpx;
13 .org-item { 16 .org-item {
14 width: 350rpx; 17 width: 350rpx;
15 height: 200rpx; 18 height: 200rpx;
@@ -24,7 +27,7 @@ @@ -24,7 +27,7 @@
24 } 27 }
25 } 28 }
26 .org-device { 29 .org-device {
27 - margin-top: 5rpx; 30 + margin-top: 23rpx;
28 margin-left: 15rpx; 31 margin-left: 15rpx;
29 flex-direction: row; 32 flex-direction: row;
30 .device-image { 33 .device-image {
@@ -43,7 +46,7 @@ @@ -43,7 +46,7 @@
43 height: 10px; 46 height: 10px;
44 float: right; 47 float: right;
45 margin-right: 34rpx; 48 margin-right: 34rpx;
46 - margin-top: 58rpx; 49 + margin-top: 37rpx;
47 } 50 }
48 } 51 }
49 } 52 }
@@ -52,25 +55,24 @@ @@ -52,25 +55,24 @@
52 border: 0.1px solid gray; 55 border: 0.1px solid gray;
53 } 56 }
54 .camera-container { 57 .camera-container {
55 - padding: 0 28rpx;  
56 - margin-top: -27rpx;  
57 .container-item { 58 .container-item {
58 - width: 717rpx; 59 + width: 750rpx;
59 display: flex; 60 display: flex;
60 justify-content: space-between; 61 justify-content: space-between;
61 flex-direction: row; 62 flex-direction: row;
62 flex-wrap: wrap; 63 flex-wrap: wrap;
63 - margin-left: -42rpx; 64 + margin-top: -50rpx;
64 .item { 65 .item {
65 - margin-top: 83rpx;  
66 - width: 300rpx; 66 + margin-top: 80rpx;
  67 + width: 330rpx;
67 height: 200rpx; 68 height: 200rpx;
68 background-color: #fff; 69 background-color: #fff;
69 border-radius: 20px; 70 border-radius: 20px;
70 - margin-left: 58rpx; 71 + margin-left: 25rpx;
  72 + margin-right: 21rpx;
71 .video { 73 .video {
72 border-radius: 20px; 74 border-radius: 20px;
73 - width: 300rpx; 75 + width: 330rpx;
74 height: 200rpx; 76 height: 200rpx;
75 } 77 }
76 .bottom-text { 78 .bottom-text {
@@ -88,7 +90,7 @@ @@ -88,7 +90,7 @@
88 border: 0.1rpx splid #fff; 90 border: 0.1rpx splid #fff;
89 height: 200rpx; 91 height: 200rpx;
90 .image { 92 .image {
91 - width: 300rpx; 93 + width: 330rpx;
92 height: 200rpx; 94 height: 200rpx;
93 border-radius: 20px; 95 border-radius: 20px;
94 } 96 }
@@ -9,17 +9,18 @@ @@ -9,17 +9,18 @@
9 display: grid; 9 display: grid;
10 width: 750rpx; 10 width: 750rpx;
11 height: 400rpx; 11 height: 400rpx;
12 - grid-template-columns: repeat(2, 350rpx); 12 + grid-template-columns: repeat(2, 339rpx);
13 grid-template-rows: repeat(2, 200rpx); 13 grid-template-rows: repeat(2, 200rpx);
14 grid-gap: 20rpx; 14 grid-gap: 20rpx;
15 margin-top: 50rpx; 15 margin-top: 50rpx;
  16 + margin-left: 10rpx;
16 } 17 }
17 18
18 .grid-item { 19 .grid-item {
19 background-color: #fff; 20 background-color: #fff;
20 border: 0.01rpx solid #fff; 21 border: 0.01rpx solid #fff;
21 padding: 40rpx; 22 padding: 40rpx;
22 - border-radius: 7px; 23 + border-radius: 20px;
23 .item-center { 24 .item-center {
24 width: 290rpx; 25 width: 290rpx;
25 height: 150rpx; 26 height: 150rpx;
@@ -43,10 +44,14 @@ @@ -43,10 +44,14 @@
43 text-align: left; 44 text-align: left;
44 width: 140rpx; 45 width: 140rpx;
45 font-size: 13px; 46 font-size: 13px;
46 - line-height: 144rpx; 47 + height: 100rpx;
  48 + display: flex;
  49 + align-items: center;
  50 + top: -6rpx;
47 .text { 51 .text {
48 font-size: 13px; 52 font-size: 13px;
49 color: #333333; 53 color: #333333;
  54 + text-align: center;
50 } 55 }
51 } 56 }
52 } 57 }
@@ -75,6 +80,7 @@ @@ -75,6 +80,7 @@
75 justify-content: space-between; 80 justify-content: space-between;
76 align-items: flex-start; 81 align-items: flex-start;
77 flex-direction: column; 82 flex-direction: column;
  83 + border-radius: 20px;
78 .item-child-top { 84 .item-child-top {
79 justify-content: space-between; 85 justify-content: space-between;
80 padding: 30rpx; 86 padding: 30rpx;
@@ -14,8 +14,8 @@ @@ -14,8 +14,8 @@
14 <text style="#FFFFFF;font-size: 18px;">{{ userInfo.realName }}</text> 14 <text style="#FFFFFF;font-size: 18px;">{{ userInfo.realName }}</text>
15 </view> 15 </view>
16 </view> 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 </view> 19 </view>
20 </block> 20 </block>
21 <block v-else> 21 <block v-else>
@@ -23,11 +23,11 @@ @@ -23,11 +23,11 @@
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" @click="openLoginFunc"> 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 </view> 28 </view>
29 </block> 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 </view> 31 </view>
32 <!-- #endif --> 32 <!-- #endif -->
33 <!-- #ifndef MP --> 33 <!-- #ifndef MP -->
@@ -41,8 +41,8 @@ @@ -41,8 +41,8 @@
41 <text style="#FFFFFF;font-size: 18px;">{{ userInfo.realName }}</text> 41 <text style="#FFFFFF;font-size: 18px;">{{ userInfo.realName }}</text>
42 </view> 42 </view>
43 </view> 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 </view> 46 </view>
47 </block> 47 </block>
48 <block v-else> 48 <block v-else>
@@ -50,8 +50,8 @@ @@ -50,8 +50,8 @@
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" @click="openLoginFunc"> 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 </view> 55 </view>
56 </block> 56 </block>
57 <view><u-icon name="arrow-right" color="black" size="13"></u-icon></view> 57 <view><u-icon name="arrow-right" color="black" size="13"></u-icon></view>
@@ -72,14 +72,16 @@ @@ -72,14 +72,16 @@
72 </view> 72 </view>
73 </view> 73 </view>
74 <view v-if="userInfo.isToken" 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 + <button class="submit" size="default" @click.top="onLoginoutFunc"><text class="text">退出账号</text></button>
76 </view> 76 </view>
77 </view> 77 </view>
78 <!-- 绑定账号 --> 78 <!-- 绑定账号 -->
79 <view> 79 <view>
80 <u-modal :showConfirmButton="false" :show="show" :title="title"> 80 <u-modal :showConfirmButton="false" :show="show" :title="title">
81 <view v-if="!bindPhone" class="loginPhone"> 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 <view class="form-row item-bind"> 85 <view class="form-row item-bind">
84 <u--input 86 <u--input
85 class="input" 87 class="input"
@@ -88,7 +90,7 @@ @@ -88,7 +90,7 @@
88 suffixIconStyle="color: #909399" 90 suffixIconStyle="color: #909399"
89 type="password" 91 type="password"
90 placeholder="登录密码" 92 placeholder="登录密码"
91 - v-model="password" 93 + v-model="bindAccountObj.password"
92 @change="passwordChange" 94 @change="passwordChange"
93 ></u--input> 95 ></u--input>
94 </view> 96 </view>
@@ -103,7 +105,7 @@ @@ -103,7 +105,7 @@
103 shape="circle" 105 shape="circle"
104 class="input" 106 class="input"
105 type="text" 107 type="text"
106 - v-model="phone" 108 + v-model="bindPhoneObj.phoneNumber"
107 placeholder="请输入手机号码" 109 placeholder="请输入手机号码"
108 placeholder-style="font-weight:normal;color:#bbbbbb;" 110 placeholder-style="font-weight:normal;color:#bbbbbb;"
109 ></u--input> 111 ></u--input>
@@ -113,7 +115,7 @@ @@ -113,7 +115,7 @@
113 shape="circle" 115 shape="circle"
114 class="input" 116 class="input"
115 type="text" 117 type="text"
116 - v-model="vCode" 118 + v-model="bindPhoneObj.code"
117 placeholder="请输入验证码" 119 placeholder="请输入验证码"
118 placeholder-style="font-weight:normal;color:#bbbbbb;" 120 placeholder-style="font-weight:normal;color:#bbbbbb;"
119 ></u--input> 121 ></u--input>
@@ -138,7 +140,7 @@ @@ -138,7 +140,7 @@
138 <view class="u-flex logout-main"> 140 <view class="u-flex logout-main">
139 <view class="main"><text style="color: #999999">确定要退出当前账号?</text></view> 141 <view class="main"><text style="color: #999999">确定要退出当前账号?</text></view>
140 <view @click.top="logoutBtn" class="main"><text style="color: #f95e5a">退出登录</text></view> 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 </view> 144 </view>
143 </u-popup> 145 </u-popup>
144 </view> 146 </view>
@@ -166,13 +168,20 @@ export default { @@ -166,13 +168,20 @@ export default {
166 readonly: false, 168 readonly: false,
167 codeText: '获取验证码', 169 codeText: '获取验证码',
168 phone: '', //号码 170 phone: '', //号码
169 - vCode: '', //验证码  
170 tips: '验证码', 171 tips: '验证码',
171 bindPhone: false, 172 bindPhone: false,
172 show: false, 173 show: false,
173 title: '绑定账号', 174 title: '绑定账号',
174 systemInfo: base.systemInfo, 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 onLoad() { 187 onLoad() {
@@ -213,7 +222,13 @@ export default { @@ -213,7 +222,13 @@ export default {
213 clickAccountFunc() { 222 clickAccountFunc() {
214 this.show = true; 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 bindPhoneFunc() { 232 bindPhoneFunc() {
218 this.bindPhone = true; 233 this.bindPhone = true;
219 }, 234 },
@@ -15,8 +15,10 @@ @@ -15,8 +15,10 @@
15 justify-content: center; 15 justify-content: center;
16 } 16 }
17 .click-login { 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 .nickName { 24 .nickName {
@@ -93,6 +95,15 @@ @@ -93,6 +95,15 @@
93 justify-content: space-between; 95 justify-content: space-between;
94 height: 147rpx; 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 .nav-link { 107 .nav-link {
97 flex-direction: row; 108 flex-direction: row;
98 justify-content: space-between; 109 justify-content: space-between;
@@ -109,8 +120,10 @@ @@ -109,8 +120,10 @@
109 left: -58rpx; 120 left: -58rpx;
110 width: 420rpx; 121 width: 420rpx;
111 .text { 122 .text {
112 - color: #333333;  
113 font-size: 15px; 123 font-size: 15px;
  124 + font-family: PingFangSC-Medium, PingFang SC;
  125 + font-weight: 500;
  126 + color: #333333;
114 } 127 }
115 } 128 }
116 .nav-right { 129 .nav-right {
@@ -118,8 +131,8 @@ @@ -118,8 +131,8 @@
118 right: -112rpx; 131 right: -112rpx;
119 width: 100rpx; 132 width: 100rpx;
120 .image { 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,4 +254,10 @@
241 text-align: center; 254 text-align: center;
242 line-height: 86rpx; 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,7 +5,7 @@
5 <view class="f__login"> 5 <view class="f__login">
6 <view class="loginPhone"> 6 <view class="loginPhone">
7 <view class="phone-main" style="margin-top: 173rpx;"> 7 <view class="phone-main" style="margin-top: 173rpx;">
8 - <text class="text" style="">手机验证码登录</text> 8 + <text class="text">手机验证码登录</text>
9 <view class="circleStyle"></view> 9 <view class="circleStyle"></view>
10 </view> 10 </view>
11 <view class="form-row"> 11 <view class="form-row">
@@ -26,12 +26,12 @@ @@ -26,12 +26,12 @@
26 <view class="loginPhone"> 26 <view class="loginPhone">
27 <view style="margin-top:50rpx" class="form-row u-flex"> 27 <view style="margin-top:50rpx" class="form-row u-flex">
28 <view class="v-input"><input type="text" v-model="password" maxlength="32" placeholder="请设置6-20位新的登录密码" :password="!showPasswordF" /></view> 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 <u-icon></u-icon> 30 <u-icon></u-icon>
31 </view> 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 <view class="v-input"><input type="text" v-model="rePassword" maxlength="32" placeholder="请再次输入新的登录密码" :password="!showPasswordS" /></view> 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 <u-icon></u-icon> 35 <u-icon></u-icon>
36 </view> 36 </view>
37 <button class="submit" size="default" @click="onSubmit"> 37 <button class="submit" size="default" @click="onSubmit">
@@ -29,7 +29,6 @@ @@ -29,7 +29,6 @@
29 labelWidth="80px" 29 labelWidth="80px"
30 label="有效期" 30 label="有效期"
31 prop="userInfo.accountExpireTime" 31 prop="userInfo.accountExpireTime"
32 - borderBottom  
33 ref="item1" 32 ref="item1"
34 > 33 >
35 <u--input v-model="myInfoModel.userInfo.accountExpireTime" placeholder="请选择有效期" border="none"></u--input> 34 <u--input v-model="myInfoModel.userInfo.accountExpireTime" placeholder="请选择有效期" border="none"></u--input>
@@ -249,4 +248,10 @@ export default { @@ -249,4 +248,10 @@ export default {
249 248
250 <style lang="scss" scoped> 249 <style lang="scss" scoped>
251 @import './static/set.scss'; 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 </style> 257 </style>
@@ -15,6 +15,9 @@ @@ -15,6 +15,9 @@
15 font-size: 22px; 15 font-size: 22px;
16 color: #3a4759; 16 color: #3a4759;
17 position: relative; 17 position: relative;
  18 + z-index: 9999;
  19 + font-family: PingFangSC-Semibold, PingFang SC;
  20 + font-weight: 600;
18 } 21 }
19 .circleStyle { 22 .circleStyle {
20 position: absolute; 23 position: absolute;
@@ -31,6 +34,7 @@ @@ -31,6 +34,7 @@
31 .form-row { 34 .form-row {
32 position: relative; 35 position: relative;
33 border-bottom: 1rpx solid #e8e8e8; 36 border-bottom: 1rpx solid #e8e8e8;
  37 + margin-top: 30rpx;
34 .input { 38 .input {
35 font-size: 34rpx; 39 font-size: 34rpx;
36 line-height: 102rpx; 40 line-height: 102rpx;
@@ -43,7 +47,9 @@ @@ -43,7 +47,9 @@
43 } 47 }
44 48
45 .getvcode { 49 .getvcode {
46 - font-size: 26rpx; 50 + font-family: PingFangSC-Regular, PingFang SC;
  51 + font-weight: 400;
  52 + font-size: 15px;
47 height: 80rpx; 53 height: 80rpx;
48 color: #6299ff; 54 color: #6299ff;
49 line-height: 80rpx; 55 line-height: 80rpx;
@@ -90,7 +96,7 @@ @@ -90,7 +96,7 @@
90 } 96 }
91 .account-style { 97 .account-style {
92 flex-direction: row; 98 flex-direction: row;
93 - margin-top: 20rpx; 99 + margin-top: 48rpx;
94 justify-content: space-between; 100 justify-content: space-between;
95 .content { 101 .content {
96 color: #999999; 102 color: #999999;
@@ -21,7 +21,6 @@ @@ -21,7 +21,6 @@
21 border-radius: 50px; 21 border-radius: 50px;
22 width: 130rpx; 22 width: 130rpx;
23 height: 130rpx; 23 height: 130rpx;
24 - border: 0.1rpx solid #e5e5e5;  
25 } 24 }
26 } 25 }
27 .main-right-image { 26 .main-right-image {
@@ -34,8 +33,10 @@ @@ -34,8 +33,10 @@
34 } 33 }
35 .basic-text { 34 .basic-text {
36 .text { 35 .text {
37 - color: #8f9ca2;  
38 font-size: 14px; 36 font-size: 14px;
  37 + font-family: PingFangSC-Regular, PingFang SC;
  38 + font-weight: 400;
  39 + color: #666666;
39 } 40 }
40 } 41 }
41 .basic-main { 42 .basic-main {
@@ -4,33 +4,31 @@ @@ -4,33 +4,31 @@
4 <public-module></public-module> 4 <public-module></public-module>
5 <view class="u-flex login-main"> 5 <view class="u-flex login-main">
6 <view class="content"> 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 <view class="circleStyle"></view> 9 <view class="circleStyle"></view>
10 </view> 10 </view>
11 </view> 11 </view>
12 <view class="f__login"> 12 <view class="f__login">
13 <view class="loginPhone"> 13 <view class="loginPhone">
14 <view class="form-row u-flex"> 14 <view class="form-row u-flex">
15 - <u-icon name="account-fill"></u-icon>  
16 <view class="v-input"><input type="text" v-model="loginForm.username" maxlength="32" placeholder="请输入登录账号" /></view> 15 <view class="v-input"><input type="text" v-model="loginForm.username" maxlength="32" placeholder="请输入登录账号" /></view>
17 <u-icon></u-icon> 16 <u-icon></u-icon>
18 </view> 17 </view>
19 <view class="form-row u-flex"> 18 <view class="form-row u-flex">
20 - <u-icon name="lock-fill"></u-icon>  
21 <view class="v-input"><input type="text" v-model="loginForm.password" maxlength="32" placeholder="请输入登录密码" :password="!showPassword" /></view> 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 <u-icon></u-icon> 21 <u-icon></u-icon>
24 </view> 22 </view>
25 <button class="submit" size="default" @click="onSubmitFunc"><text class="text">登录</text></button> 23 <button class="submit" size="default" @click="onSubmitFunc"><text class="text">登录</text></button>
26 <view class="u-flex row-item"> 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 </view> 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 <view style="height:20rpx"></view> 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 <view class="circleStyleBottom"></view> 32 <view class="circleStyleBottom"></view>
35 </view> 33 </view>
36 </view> 34 </view>
@@ -41,6 +39,7 @@ @@ -41,6 +39,7 @@
41 <script> 39 <script>
42 import { mapMutations } from 'vuex'; 40 import { mapMutations } from 'vuex';
43 import { getUserInfo } from '@/components/module/f-login/f-login.js'; 41 import { getUserInfo } from '@/components/module/f-login/f-login.js';
  42 +import { loginApp } from '@/config/login';
44 43
45 export default { 44 export default {
46 data() { 45 data() {
@@ -49,39 +48,46 @@ export default { @@ -49,39 +48,46 @@ export default {
49 username: '', 48 username: '',
50 password: '' 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 methods: { 69 methods: {
56 ...mapMutations(['setUserInfo']), 70 ...mapMutations(['setUserInfo']),
  71 + //微信授权登录
57 onAuthorization(e) { 72 onAuthorization(e) {
58 getUserInfo( 73 getUserInfo(
59 info => { 74 info => {
60 - console.log(info, '授权信息'); 75 + console.log('授权信息', info);
61 let httpData = { 76 let httpData = {
62 code: this.code, 77 code: this.code,
63 nickName: info.nickName || '', //昵称 78 nickName: info.nickName || '', //昵称
64 avatarUrl: info.avatarUrl || '', //头像 79 avatarUrl: info.avatarUrl || '', //头像
65 gender: info.gender || '' //性别 0:未知 1:男 2:女 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 onSubmitFunc() { 93 onSubmitFunc() {
@@ -10,11 +10,14 @@ @@ -10,11 +10,14 @@
10 .hello { 10 .hello {
11 font-size: 30px; 11 font-size: 30px;
12 color: #3a4759; 12 color: #3a4759;
  13 + z-index: 9999;
  14 + position: relative;
13 } 15 }
14 .hello-welcome { 16 .hello-welcome {
15 position: relative; 17 position: relative;
16 font-size: 30px; 18 font-size: 30px;
17 color: #3a4759; 19 color: #3a4759;
  20 + z-index: 9999;
18 } 21 }
19 } 22 }
20 } 23 }
@@ -41,14 +44,14 @@ @@ -41,14 +44,14 @@
41 .form-row { 44 .form-row {
42 position: relative; 45 position: relative;
43 justify-content: space-between; 46 justify-content: space-between;
44 - margin-top: 30rpx; 47 + margin-top: 60rpx;
45 .v-input { 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 .v-password { 52 .v-password {
50 position: absolute; 53 position: absolute;
51 - right: 18rpx; 54 + right: 0rpx;
52 z-index: 66666; 55 z-index: 66666;
53 } 56 }
54 .input { 57 .input {
@@ -74,7 +77,7 @@ @@ -74,7 +77,7 @@
74 } 77 }
75 .row-item { 78 .row-item {
76 flex-direction: row; 79 flex-direction: row;
77 - margin-top: 20rpx; 80 + margin-top: 60rpx;
78 justify-content: space-between; 81 justify-content: space-between;
79 .row-phone { 82 .row-phone {
80 color: #999999; 83 color: #999999;
@@ -89,7 +92,7 @@ @@ -89,7 +92,7 @@
89 .link-login { 92 .link-login {
90 justify-content: center; 93 justify-content: center;
91 flex-direction: column; 94 flex-direction: column;
92 - margin-top: 220rpx; 95 + margin-top: 370rpx;
93 .link-text { 96 .link-text {
94 color: #999999; 97 color: #999999;
95 font-size: 13px; 98 font-size: 13px;
1 export const state = { 1 export const state = {
2 //用户数据 2 //用户数据
3 userInfo: {}, 3 userInfo: {},
  4 + //存储告警徽标数据
  5 + badgeInfo: 0
4 }; 6 };
5 export const mutations = { 7 export const mutations = {
6 //储存用户信息 8 //储存用户信息
@@ -27,5 +29,34 @@ export const mutations = { @@ -27,5 +29,34 @@ export const mutations = {
27 }, 29 },
28 }; 30 };
29 export const actions = { 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,7 +70,7 @@ button {
70 //(设备、告警,适用设备详情基础信息文本(右边的值的文本))第二个文本 70 //(设备、告警,适用设备详情基础信息文本(右边的值的文本))第二个文本
71 .text-device-muted { 71 .text-device-muted {
72 font-size: 14px; 72 font-size: 14px;
73 - font-family: PingFangSC-Regular, PingFang SC; 73 + font-family: PingFang SC-Regular, PingFang SC;
74 font-weight: 400; 74 font-weight: 400;
75 color: #666666; 75 color: #666666;
76 } 76 }
@@ -122,7 +122,50 @@ button { @@ -122,7 +122,50 @@ button {
122 .border-line { 122 .border-line {
123 border-radius: 20px; 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 // 定义flex等分 169 // 定义flex等分
127 @for $i from 0 through 12 { 170 @for $i from 0 through 12 {
128 .u-flex-#{$i} { 171 .u-flex-#{$i} {
@@ -3,9 +3,6 @@ @@ -3,9 +3,6 @@
3 <!-- 公共组件-每个页面必须引入 --> 3 <!-- 公共组件-每个页面必须引入 -->
4 <public-module></public-module> 4 <public-module></public-module>
5 <view class="notify-column"> 5 <view class="notify-column">
6 - <view class="u-flex column">  
7 - <text class="text">{{ notifyList.title }}</text>  
8 - </view>  
9 <view class="column-list"> 6 <view class="column-list">
10 <u-list height="140rpx"> 7 <u-list height="140rpx">
11 <u-list-item> 8 <u-list-item>
@@ -15,9 +12,14 @@ @@ -15,9 +12,14 @@
15 </u-list-item> 12 </u-list-item>
16 </u-list> 13 </u-list>
17 <view class="bottom-text"> 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 </view> 23 </view>
22 </view> 24 </view>
23 </view> 25 </view>
@@ -51,4 +53,9 @@ export default { @@ -51,4 +53,9 @@ export default {
51 53
52 <style lang="scss" scoped> 54 <style lang="scss" scoped>
53 @import './static/notifyDetail.scss'; 55 @import './static/notifyDetail.scss';
  56 +/deep/ .u-line {
  57 + position: relative !important;
  58 + width: 640rpx !important;
  59 + left: 31rpx !important;
  60 +}
54 </style> 61 </style>
@@ -5,14 +5,6 @@ @@ -5,14 +5,6 @@
5 padding-left: 27rpx; 5 padding-left: 27rpx;
6 } 6 }
7 .notify-column { 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 .column-list { 8 .column-list {
17 border-radius: 20px; 9 border-radius: 20px;
18 margin-top: 20rpx; 10 margin-top: 20rpx;
@@ -20,10 +12,20 @@ @@ -20,10 +12,20 @@
20 height: 1000rpx; 12 height: 1000rpx;
21 background-color: #ffffff; 13 background-color: #ffffff;
22 .bottom-text { 14 .bottom-text {
  15 + margin-left: 33rpx;
23 .text { 16 .text {
24 color: #2e384d; 17 color: #2e384d;
25 font-size: 15px; 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,13 +2,8 @@
2 <view class="notify-page"> 2 <view class="notify-page">
3 <!-- 公共组件-每个页面必须引入 --> 3 <!-- 公共组件-每个页面必须引入 -->
4 <public-module></public-module> 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 <u-action-sheet :show="showType" :actions="actions" title="请选择类型" @close="showType = false" @select="typeSelect"></u-action-sheet> 7 <u-action-sheet :show="showType" :actions="actions" title="请选择类型" @close="showType = false" @select="typeSelect"></u-action-sheet>
13 </view> 8 </view>
14 <view class="notify-main"> 9 <view class="notify-main">