From 3f50cca6db2b68bbe938c2fe175f5c884dabbcde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=B2=E4=B9=88=E4=BA=86?= Date: Tue, 7 Feb 2023 17:59:54 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=87=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 2 + common/css/base.scss | 16 +- components/Cn-grid-item/Cn-grid-item.vue | 2 +- components/Cn-grid/Cn-grid.vue | 2 +- manifest.json | 84 +++++++-- pages.json | 45 ++++- pages/device/APF/IO.vue | 41 +++++ pages/device/APF/oscillogram.vue | 163 ++++++++++++++++++ pages/device/APF/power.vue | 67 +++++++ pages/device/APF/xieBo.vue | 2 +- pages/device/about.vue | 44 +++++ pages/device/detailAPF.vue | 95 +++++++--- pages/device/new.vue | 71 +++++++- pages/device/record.vue | 43 +++++ pages/device/report.vue | 51 ++++++ pages/gateway/list.vue | 63 +++++++ pages/gateway/new.vue | 68 ++++++++ pages/gateway/newDevice.vue | 88 ++++++++++ pages/index/index.vue | 21 ++- pages/index/mine.vue | 11 +- pages/index/report.vue | 10 +- pages/mine/message.vue | 3 + pages/mine/setupMessage.vue | 8 - pages/user/login.vue | 91 +--------- static/about.png | Bin 0 -> 9353 bytes static/delate.png | Bin 0 -> 4146 bytes static/download.png | Bin 0 -> 3565 bytes static/{wangguan.png => gateway.png} | Bin static/message2.png | Bin 9409 -> 5153 bytes static/record.png | Bin 0 -> 8135 bytes static/share.png | Bin 0 -> 7100 bytes static/test.pic.jpg | Bin 0 -> 18196 bytes static/我的服务.png | Bin 6493 -> 0 bytes uni.scss | 2 +- .../zero-loading/static/loading-gear.vue | 4 +- 35 files changed, 933 insertions(+), 164 deletions(-) create mode 100644 pages/device/APF/IO.vue create mode 100644 pages/device/APF/oscillogram.vue create mode 100644 pages/device/APF/power.vue create mode 100644 pages/device/about.vue create mode 100644 pages/device/record.vue create mode 100644 pages/device/report.vue create mode 100644 pages/gateway/list.vue create mode 100644 pages/gateway/new.vue create mode 100644 pages/gateway/newDevice.vue create mode 100644 static/about.png create mode 100644 static/delate.png create mode 100644 static/download.png rename static/{wangguan.png => gateway.png} (100%) create mode 100644 static/record.png create mode 100644 static/share.png create mode 100644 static/test.pic.jpg delete mode 100644 static/我的服务.png diff --git a/App.vue b/App.vue index bb5edb9..3b08fca 100644 --- a/App.vue +++ b/App.vue @@ -15,4 +15,6 @@ export default { diff --git a/common/css/base.scss b/common/css/base.scss index 2b8b203..5f42551 100644 --- a/common/css/base.scss +++ b/common/css/base.scss @@ -59,7 +59,7 @@ page { bottom: 200rpx; width: 126rpx; height: 126rpx; - background: #fff; + background: $uni-theme-white; border-radius: 50%; display: flex; align-items: center; @@ -74,10 +74,11 @@ page { .grid-card { - background: #fff; + background: $uni-theme-white; border-radius: 12rpx; padding: 20rpx; margin-bottom: 20rpx; + .grid-card-title { font-size: 28rpx; color: #111; @@ -86,10 +87,12 @@ page { } .grid-card-content-4, - .grid-card-content-3 { + .grid-card-content-3, + .grid-card-content-5 { display: grid; font-size: 24rpx; grid-template-columns: 1fr 1fr 1fr 1fr; + .item { display: flex; align-items: center; @@ -100,4 +103,9 @@ page { .grid-card-content-3 { grid-template-columns: 1fr 1fr 1fr; } -} \ No newline at end of file + + .grid-card-content-5 { + grid-template-columns: 1fr 1fr 1fr 1fr 1fr; + } +} + diff --git a/components/Cn-grid-item/Cn-grid-item.vue b/components/Cn-grid-item/Cn-grid-item.vue index 6a65ea5..f4a4017 100644 --- a/components/Cn-grid-item/Cn-grid-item.vue +++ b/components/Cn-grid-item/Cn-grid-item.vue @@ -23,7 +23,7 @@ export default { flex-direction: column; justify-content: center; align-items: center; - background: #fff; + background: $uni-theme-white; height: 236rpx; .grid-card-content-item-icon { diff --git a/components/Cn-grid/Cn-grid.vue b/components/Cn-grid/Cn-grid.vue index cefb844..18edc36 100644 --- a/components/Cn-grid/Cn-grid.vue +++ b/components/Cn-grid/Cn-grid.vue @@ -33,7 +33,7 @@ export default { .grid-card { border-radius: 12rpx; overflow: hidden; - background: #fff; + background: $uni-theme-white; .grid-card-title { height: 80rpx; line-height: 80rpx; diff --git a/manifest.json b/manifest.json index d3a4678..62a9954 100644 --- a/manifest.json +++ b/manifest.json @@ -7,6 +7,11 @@ "transformPx" : false, /* 5+App特有相关 */ "app-plus" : { + "safearea" : { + "bottom" : { + "offset" : "none" + } + }, "usingComponents" : true, "nvueStyleCompiler" : "uni-app", "compilerVersion" : 3, @@ -17,26 +22,34 @@ "delay" : 0 }, /* 模块配置 */ - "modules" : {}, + "modules" : { + "Maps" : {}, + "Barcode" : {}, + "Camera" : {} + }, /* 应用发布信息 */ "distribute" : { /* android打包配置 */ "android" : { "permissions" : [ - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", - "", "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", "" ] }, @@ -46,7 +59,48 @@ }, /* SDK配置 */ "sdkConfigs" : { - "ad" : {} + "ad" : {}, + "maps" : { + "amap" : { + "appkey_ios" : "73262624599d79ee4ad8bba2ab4a0958", + "appkey_android" : "c93dd87e087f3686a9d4463ce5ebcbe1" + } + }, + "push" : { + "unipush" : null + } + }, + "icons" : { + "android" : { + "hdpi" : "unpackage/res/icons/72x72.png", + "xhdpi" : "unpackage/res/icons/96x96.png", + "xxhdpi" : "unpackage/res/icons/144x144.png", + "xxxhdpi" : "unpackage/res/icons/192x192.png" + }, + "ios" : { + "appstore" : "unpackage/res/icons/1024x1024.png", + "ipad" : { + "app" : "unpackage/res/icons/76x76.png", + "app@2x" : "unpackage/res/icons/152x152.png", + "notification" : "unpackage/res/icons/20x20.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "proapp@2x" : "unpackage/res/icons/167x167.png", + "settings" : "unpackage/res/icons/29x29.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "spotlight" : "unpackage/res/icons/40x40.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png" + }, + "iphone" : { + "app@2x" : "unpackage/res/icons/120x120.png", + "app@3x" : "unpackage/res/icons/180x180.png", + "notification@2x" : "unpackage/res/icons/40x40.png", + "notification@3x" : "unpackage/res/icons/60x60.png", + "settings@2x" : "unpackage/res/icons/58x58.png", + "settings@3x" : "unpackage/res/icons/87x87.png", + "spotlight@2x" : "unpackage/res/icons/80x80.png", + "spotlight@3x" : "unpackage/res/icons/120x120.png" + } + } } } }, diff --git a/pages.json b/pages.json index 07922d8..bc6a77e 100644 --- a/pages.json +++ b/pages.json @@ -16,7 +16,7 @@ { "path": "pages/index/mine", "style": { - "navigationBarTitleText": "个人" + "navigationStyle": "custom" } }, { @@ -120,13 +120,49 @@ "style": { "navigationBarTitleText": "APF设备详情" } + }, + { + "path": "pages/device/record", + "style": { + "navigationBarTitleText": "操作记录" + } + }, + { + "path": "pages/device/report", + "style": { + "navigationBarTitleText": "告警情况" + } + }, + { + "path": "pages/device/about", + "style": { + "navigationBarTitleText": "关于" + } + }, + { + "path": "pages/gateway/list", + "style": { + "navigationBarTitleText": "网关列表" + } + }, + { + "path": "pages/gateway/new", + "style": { + "navigationBarTitleText": "添加网关" + } + }, + { + "path": "pages/gateway/newDevice", + "style": { + "navigationBarTitleText": "通过网关添加设备" + } } ], "tabBar": { "color": "#979797", "selectedColor": "#376cf3", "borderStyle": "black", - "backgroundColor": "#ffffff", + "backgroundColor": "#fff", "spacing": "5px", "iconWidth": "20px", "list": [ @@ -153,9 +189,10 @@ "globalStyle": { "navigationBarTextStyle": "black", "navigationBarTitleText": "灿能电力", - "navigationBarBackgroundColor": "#F8F8F8", - "backgroundColor": "#F8F8F8", + "navigationBarBackgroundColor": "#fff", + "backgroundColor": "#fff" // #ifdef H5 + , "navigationStyle": "custom" // #endif }, diff --git a/pages/device/APF/IO.vue b/pages/device/APF/IO.vue new file mode 100644 index 0000000..a1da63a --- /dev/null +++ b/pages/device/APF/IO.vue @@ -0,0 +1,41 @@ + + + \ No newline at end of file diff --git a/pages/device/APF/oscillogram.vue b/pages/device/APF/oscillogram.vue new file mode 100644 index 0000000..bf1341d --- /dev/null +++ b/pages/device/APF/oscillogram.vue @@ -0,0 +1,163 @@ + + + + + + \ No newline at end of file diff --git a/pages/device/APF/power.vue b/pages/device/APF/power.vue new file mode 100644 index 0000000..ebbc8aa --- /dev/null +++ b/pages/device/APF/power.vue @@ -0,0 +1,67 @@ + + + \ No newline at end of file diff --git a/pages/device/APF/xieBo.vue b/pages/device/APF/xieBo.vue index 4807e57..1926ba5 100644 --- a/pages/device/APF/xieBo.vue +++ b/pages/device/APF/xieBo.vue @@ -74,7 +74,7 @@ export default { ] }; this.chartData = JSON.parse(JSON.stringify(res)); - }, 1500); + }, 500); }, } }; diff --git a/pages/device/about.vue b/pages/device/about.vue new file mode 100644 index 0000000..62ec701 --- /dev/null +++ b/pages/device/about.vue @@ -0,0 +1,44 @@ + + + \ No newline at end of file diff --git a/pages/device/detailAPF.vue b/pages/device/detailAPF.vue index 3ee23f2..e4e6a0e 100644 --- a/pages/device/detailAPF.vue +++ b/pages/device/detailAPF.vue @@ -2,7 +2,9 @@ - + + + 设备基础信息 设备状态 @@ -13,29 +15,28 @@ - + - + - - - 设备功率信息 - + + - - - 设备波形信息 - + + - - - 设备I/O信息 - + + + + + + @@ -43,11 +44,17 @@ \ No newline at end of file diff --git a/pages/device/record.vue b/pages/device/record.vue new file mode 100644 index 0000000..6b2edf0 --- /dev/null +++ b/pages/device/record.vue @@ -0,0 +1,43 @@ + + + \ No newline at end of file diff --git a/pages/device/report.vue b/pages/device/report.vue new file mode 100644 index 0000000..ce742df --- /dev/null +++ b/pages/device/report.vue @@ -0,0 +1,51 @@ + + + \ No newline at end of file diff --git a/pages/gateway/list.vue b/pages/gateway/list.vue new file mode 100644 index 0000000..43a53a0 --- /dev/null +++ b/pages/gateway/list.vue @@ -0,0 +1,63 @@ + + + \ No newline at end of file diff --git a/pages/gateway/new.vue b/pages/gateway/new.vue new file mode 100644 index 0000000..b72a5d2 --- /dev/null +++ b/pages/gateway/new.vue @@ -0,0 +1,68 @@ + + + \ No newline at end of file diff --git a/pages/gateway/newDevice.vue b/pages/gateway/newDevice.vue new file mode 100644 index 0000000..605bae6 --- /dev/null +++ b/pages/gateway/newDevice.vue @@ -0,0 +1,88 @@ + + + \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index f12c7f7..63c7a35 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -5,15 +5,15 @@
-
38
+
3
正常设备
-
5
+
1
报警设备
-
3
+
0
离线设备
@@ -23,7 +23,8 @@ 设备基础信息 - + @@ -37,7 +38,7 @@ export default { iconPath: '/static/device.png', text: '添加设备', }, { - iconPath: '/static/wangguan.png', + iconPath: '/static/gateway.png', text: '添加网关', }, ] @@ -66,6 +67,10 @@ export default { uni.navigateTo({ url: '/pages/device/new' }) + }else if(e.index === 1){ + uni.navigateTo({ + url: '/pages/gateway/new' + }) } } }, @@ -82,7 +87,7 @@ export default { .header { margin: 0 30rpx; - background: #fff; + background: $uni-theme-white; border-radius: 12rpx; background: $uni-color-primary; padding: 30rpx 10rpx 40rpx; @@ -105,4 +110,8 @@ export default { } } } + +/deep/ .uni-card { + background: $uni-theme-white; +} diff --git a/pages/index/mine.vue b/pages/index/mine.vue index e817268..315c925 100644 --- a/pages/index/mine.vue +++ b/pages/index/mine.vue @@ -20,10 +20,10 @@ 个人消息 - - - 网关管理 + + 网关列表 @@ -63,6 +63,11 @@ export default { url: `/pages/user/login` }) break; + case 'gateway': + uni.navigateTo({ + url: `/pages/gateway/list` + }) + break; case 'upgrade': this.$refs.inputDialog.open() break; diff --git a/pages/index/report.vue b/pages/index/report.vue index f952006..0f7dcce 100644 --- a/pages/index/report.vue +++ b/pages/index/report.vue @@ -1,8 +1,9 @@ @@ -22,6 +23,11 @@ export default { } - diff --git a/pages/mine/message.vue b/pages/mine/message.vue index 44d576c..34a69cb 100644 --- a/pages/mine/message.vue +++ b/pages/mine/message.vue @@ -25,4 +25,7 @@ export default { \ No newline at end of file diff --git a/pages/mine/setupMessage.vue b/pages/mine/setupMessage.vue index 968cbf6..fe053b0 100644 --- a/pages/mine/setupMessage.vue +++ b/pages/mine/setupMessage.vue @@ -2,14 +2,6 @@ - 暂态消息 - - - - 稳态越限消息 - - - 终端消息 diff --git a/pages/user/login.vue b/pages/user/login.vue index 6a4fb01..bf53db4 100644 --- a/pages/user/login.vue +++ b/pages/user/login.vue @@ -6,7 +6,7 @@