页面切图
2
App.vue
@@ -15,4 +15,6 @@ export default {
|
|||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
/*每个页面公共css */
|
/*每个页面公共css */
|
||||||
@import './common/css/base.scss';
|
@import './common/css/base.scss';
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ page {
|
|||||||
bottom: 200rpx;
|
bottom: 200rpx;
|
||||||
width: 126rpx;
|
width: 126rpx;
|
||||||
height: 126rpx;
|
height: 126rpx;
|
||||||
background: #fff;
|
background: $uni-theme-white;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -74,10 +74,11 @@ page {
|
|||||||
|
|
||||||
|
|
||||||
.grid-card {
|
.grid-card {
|
||||||
background: #fff;
|
background: $uni-theme-white;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
|
||||||
.grid-card-title {
|
.grid-card-title {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #111;
|
color: #111;
|
||||||
@@ -86,10 +87,12 @@ page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.grid-card-content-4,
|
.grid-card-content-4,
|
||||||
.grid-card-content-3 {
|
.grid-card-content-3,
|
||||||
|
.grid-card-content-5 {
|
||||||
display: grid;
|
display: grid;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
grid-template-columns: 1fr 1fr 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -100,4 +103,9 @@ page {
|
|||||||
.grid-card-content-3 {
|
.grid-card-content-3 {
|
||||||
grid-template-columns: 1fr 1fr 1fr;
|
grid-template-columns: 1fr 1fr 1fr;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
.grid-card-content-5 {
|
||||||
|
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: #fff;
|
background: $uni-theme-white;
|
||||||
height: 236rpx;
|
height: 236rpx;
|
||||||
|
|
||||||
.grid-card-content-item-icon {
|
.grid-card-content-item-icon {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ export default {
|
|||||||
.grid-card {
|
.grid-card {
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background: #fff;
|
background: $uni-theme-white;
|
||||||
.grid-card-title {
|
.grid-card-title {
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
|
|||||||
@@ -7,6 +7,11 @@
|
|||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
"safearea" : {
|
||||||
|
"bottom" : {
|
||||||
|
"offset" : "none"
|
||||||
|
}
|
||||||
|
},
|
||||||
"usingComponents" : true,
|
"usingComponents" : true,
|
||||||
"nvueStyleCompiler" : "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion" : 3,
|
"compilerVersion" : 3,
|
||||||
@@ -17,26 +22,34 @@
|
|||||||
"delay" : 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"modules" : {},
|
"modules" : {
|
||||||
|
"Maps" : {},
|
||||||
|
"Barcode" : {},
|
||||||
|
"Camera" : {}
|
||||||
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute" : {
|
"distribute" : {
|
||||||
/* android打包配置 */
|
/* android打包配置 */
|
||||||
"android" : {
|
"android" : {
|
||||||
"permissions" : [
|
"permissions" : [
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.INTERNET\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
|
"<uses-permission android:name=\"android.permission.WRITE_EXTERNAL_STORAGE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -46,7 +59,48 @@
|
|||||||
},
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs" : {
|
"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"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
45
pages.json
@@ -16,7 +16,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/index/mine",
|
"path": "pages/index/mine",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "个人"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -120,13 +120,49 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "APF设备详情"
|
"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": {
|
"tabBar": {
|
||||||
"color": "#979797",
|
"color": "#979797",
|
||||||
"selectedColor": "#376cf3",
|
"selectedColor": "#376cf3",
|
||||||
"borderStyle": "black",
|
"borderStyle": "black",
|
||||||
"backgroundColor": "#ffffff",
|
"backgroundColor": "#fff",
|
||||||
"spacing": "5px",
|
"spacing": "5px",
|
||||||
"iconWidth": "20px",
|
"iconWidth": "20px",
|
||||||
"list": [
|
"list": [
|
||||||
@@ -153,9 +189,10 @@
|
|||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
"navigationBarTextStyle": "black",
|
"navigationBarTextStyle": "black",
|
||||||
"navigationBarTitleText": "灿能电力",
|
"navigationBarTitleText": "灿能电力",
|
||||||
"navigationBarBackgroundColor": "#F8F8F8",
|
"navigationBarBackgroundColor": "#fff",
|
||||||
"backgroundColor": "#F8F8F8",
|
"backgroundColor": "#fff"
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
|
,
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
|
|||||||
41
pages/device/APF/IO.vue
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
<template>
|
||||||
|
<view class='basic'>
|
||||||
|
<view class="grid-card">
|
||||||
|
<view class="grid-card-title">温度</view>
|
||||||
|
<view class="grid-card-content-4">
|
||||||
|
<view class="item">温度1(°C)</view>
|
||||||
|
<view class="item">温度2(°C)</view>
|
||||||
|
<view class="item">温度3(°C)</view>
|
||||||
|
<view class="item">温度4(°C)</view>
|
||||||
|
<view class="item">20.0</view>
|
||||||
|
<view class="item">20.0</view>
|
||||||
|
<view class="item">20.0</view>
|
||||||
|
<view class="item">20.0</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="grid-card">
|
||||||
|
<view class="grid-card-title">干接点</view>
|
||||||
|
<view class="grid-card-content-4">
|
||||||
|
<view class="item">干接点1</view>
|
||||||
|
<view class="item">干接点2</view>
|
||||||
|
<view class="item"></view>
|
||||||
|
<view class="item"></view>
|
||||||
|
<view class="item">正常</view>
|
||||||
|
<view class="item">正常</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang='scss'>
|
||||||
|
.basic {}
|
||||||
|
</style>
|
||||||
163
pages/device/APF/oscillogram.vue
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
|
||||||
|
<template>
|
||||||
|
<view>
|
||||||
|
<uni-data-checkbox multiple v-model="checkbox" :localdata="hobby"></uni-data-checkbox>
|
||||||
|
<view class="charts-box">
|
||||||
|
<qiun-data-charts type="line" :opts="opts" :chartData="chartData" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
checkbox: [0,1,2],
|
||||||
|
hobby: [{
|
||||||
|
text: '电网电压1',
|
||||||
|
value: 0
|
||||||
|
}, {
|
||||||
|
text: '电网电压2',
|
||||||
|
value: 1
|
||||||
|
}, {
|
||||||
|
text: '电网电压3',
|
||||||
|
value: 2
|
||||||
|
}, {
|
||||||
|
text: '电网电压3',
|
||||||
|
value: 4
|
||||||
|
}],
|
||||||
|
chartData: {},
|
||||||
|
//您可以通过修改 config-ucharts.js 文件中下标为 ['line'] 的节点来配置全局默认参数,如都是默认参数,此处可以不传 opts 。实际应用过程中 opts 只需传入与全局默认参数中不一致的【某一个属性】即可实现同类型的图表显示不同的样式,达到页面简洁的需求。
|
||||||
|
opts: {
|
||||||
|
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
|
||||||
|
padding: [15, 15, 0, 0],
|
||||||
|
dataLabel: false,
|
||||||
|
dataPointShape: false,
|
||||||
|
enableScroll: false,
|
||||||
|
legend: {},
|
||||||
|
xAxis: {
|
||||||
|
disableGrid: true
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
gridType: "dash",
|
||||||
|
dashLength: 2,
|
||||||
|
data: [
|
||||||
|
{
|
||||||
|
min: -100,
|
||||||
|
max: 100
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
extra: {
|
||||||
|
line: {
|
||||||
|
type: "curve",
|
||||||
|
width: 2,
|
||||||
|
activeType: "hollow",
|
||||||
|
linearType: "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
this.getServerData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getServerData () {
|
||||||
|
//模拟从服务器获取数据时的延时
|
||||||
|
setTimeout(() => {
|
||||||
|
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
||||||
|
let res = {
|
||||||
|
categories: ["0", "90", "180", "270", "360"],
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
name: "成交量A",
|
||||||
|
linearColor: [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
"#1890FF"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0.25,
|
||||||
|
"#00B5FF"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0.5,
|
||||||
|
"#00D1ED"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0.75,
|
||||||
|
"#00E6BB"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
"#90F489"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
data: [-50, 60, 15, 45, 15]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "成交量B",
|
||||||
|
linearColor: [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
"#91CB74"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0.25,
|
||||||
|
"#2BDCA8"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0.5,
|
||||||
|
"#2AE3A0"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0.75,
|
||||||
|
"#C4D06E"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
"#F2D375"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
data: [-50, -80, 55, 85, 55]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "成交量C",
|
||||||
|
linearColor: [
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
"#FAC858"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0.33,
|
||||||
|
"#FFC371"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
0.66,
|
||||||
|
"#FFC2B2"
|
||||||
|
],
|
||||||
|
[
|
||||||
|
1,
|
||||||
|
"#FA7D8D"
|
||||||
|
]
|
||||||
|
],
|
||||||
|
data: [80, 60, 95, 50, 95]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
this.chartData = JSON.parse(JSON.stringify(res));
|
||||||
|
}, 500);
|
||||||
|
},
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/* 请根据实际需求修改父元素尺寸,组件自动识别宽高 */
|
||||||
|
.charts-box {
|
||||||
|
margin-top: 20rpx;
|
||||||
|
width: 100%;
|
||||||
|
height: 300px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
67
pages/device/APF/power.vue
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<template>
|
||||||
|
<view class='basic'>
|
||||||
|
<view class="grid-card">
|
||||||
|
<view class="grid-card-title">电网侧</view>
|
||||||
|
<view class="grid-card-content-5">
|
||||||
|
<view class="item">名称</view>
|
||||||
|
<view class="item">有功功率(kw)</view>
|
||||||
|
<view class="item">无功功率(kVar)</view>
|
||||||
|
<view class="item">视在功率(kVA)</view>
|
||||||
|
<view class="item">功率因数</view>
|
||||||
|
<view class="item">L1</view>
|
||||||
|
<view class="item">226.8</view>
|
||||||
|
<view class="item">50.0</view>
|
||||||
|
<view class="item">4.6</view>
|
||||||
|
<view class="item">4.6</view>
|
||||||
|
<view class="item">L2</view>
|
||||||
|
<view class="item">226.8</view>
|
||||||
|
<view class="item">50.0</view>
|
||||||
|
<view class="item">50.0</view>
|
||||||
|
<view class="item">4.6</view>
|
||||||
|
<view class="item">L3</view>
|
||||||
|
<view class="item">226.8</view>
|
||||||
|
<view class="item">50.0</view>
|
||||||
|
<view class="item">4.6</view>
|
||||||
|
<view class="item">4.6</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="grid-card">
|
||||||
|
<view class="grid-card-title">负载侧</view>
|
||||||
|
<view class="grid-card-content-5">
|
||||||
|
<view class="item">名称</view>
|
||||||
|
<view class="item">有功功率(kw)</view>
|
||||||
|
<view class="item">无功功率(kVar)</view>
|
||||||
|
<view class="item">视在功率(kVA)</view>
|
||||||
|
<view class="item">功率因数</view>
|
||||||
|
<view class="item">L1</view>
|
||||||
|
<view class="item">226.8</view>
|
||||||
|
<view class="item">50.0</view>
|
||||||
|
<view class="item">4.6</view>
|
||||||
|
<view class="item">4.6</view>
|
||||||
|
<view class="item">L2</view>
|
||||||
|
<view class="item">226.8</view>
|
||||||
|
<view class="item">50.0</view>
|
||||||
|
<view class="item">50.0</view>
|
||||||
|
<view class="item">4.6</view>
|
||||||
|
<view class="item">L3</view>
|
||||||
|
<view class="item">226.8</view>
|
||||||
|
<view class="item">50.0</view>
|
||||||
|
<view class="item">4.6</view>
|
||||||
|
<view class="item">4.6</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang='scss'>
|
||||||
|
.basic {}
|
||||||
|
</style>
|
||||||
@@ -74,7 +74,7 @@ export default {
|
|||||||
]
|
]
|
||||||
};
|
};
|
||||||
this.chartData = JSON.parse(JSON.stringify(res));
|
this.chartData = JSON.parse(JSON.stringify(res));
|
||||||
}, 1500);
|
}, 500);
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
44
pages/device/about.vue
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<template>
|
||||||
|
<Cn-page :loading='loading'>
|
||||||
|
<view slot='body'>
|
||||||
|
<view class='about'>
|
||||||
|
<view class='about-title'>盛弘APF</view>
|
||||||
|
<view class='about-text'>杋器码:0000000</view>
|
||||||
|
<view class='about-text'>软件版本:1.0.0</view>
|
||||||
|
<view class='about-text'>使用期限:永久使用</view>
|
||||||
|
<view class='about-text'>软件版本:380-250/250-4-0-1</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</Cn-page>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang='scss'>
|
||||||
|
.about {
|
||||||
|
padding: 34rpx;
|
||||||
|
.about-title {
|
||||||
|
font-size: 34rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #333333;
|
||||||
|
margin-bottom: 34rpx;
|
||||||
|
}
|
||||||
|
.about-text {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666666;
|
||||||
|
margin-bottom: 34rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -2,7 +2,9 @@
|
|||||||
<Cn-page :loading='loading' noPadding>
|
<Cn-page :loading='loading' noPadding>
|
||||||
<view slot='body'>
|
<view slot='body'>
|
||||||
<view class='detail'>
|
<view class='detail'>
|
||||||
<view class="header"> </view>
|
<view class="header">
|
||||||
|
<image src="/static/test.pic.jpg" mode="widthFix" style="width: 100%;" />
|
||||||
|
</view>
|
||||||
<view class="des">
|
<view class="des">
|
||||||
<text>设备基础信息</text>
|
<text>设备基础信息</text>
|
||||||
<text class="ml10">设备状态</text>
|
<text class="ml10">设备状态</text>
|
||||||
@@ -13,29 +15,28 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="content" :style="{ minHeight: 'calc(100vh - ' + navHeight + 'px)' }">
|
<view class="content" :style="{ minHeight: 'calc(100vh - ' + navHeight + 'px)' }">
|
||||||
<view v-show="navMenuActive == 0">
|
<view v-if="navMenuActive == 0">
|
||||||
<basic></basic>
|
<basic></basic>
|
||||||
</view>
|
</view>
|
||||||
<view v-show="navMenuActive == 1">
|
<view v-else-if="navMenuActive == 1">
|
||||||
<xieBo></xieBo>
|
<xieBo></xieBo>
|
||||||
</view>
|
</view>
|
||||||
<view v-show="navMenuActive == 2">
|
<view v-else-if="navMenuActive == 2">
|
||||||
<view>
|
<power></power>
|
||||||
<text>设备功率信息</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view v-show="navMenuActive == 3">
|
<view v-else-if="navMenuActive == 3">
|
||||||
<view>
|
<oscillogram></oscillogram>
|
||||||
<text>设备波形信息</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view v-show="navMenuActive == 4">
|
<view v-else-if="navMenuActive == 4">
|
||||||
<view>
|
<IO></IO>
|
||||||
<text>设备I/O信息</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
<view style="height:20rpx"></view>
|
<view style="height:20rpx"></view>
|
||||||
</view>
|
</view>
|
||||||
|
<uni-fab ref="fab" direction="vertical" horizontal="right" vertical="bottom" :content="content"
|
||||||
|
@trigger="trigger" />
|
||||||
|
<uni-popup ref="share" type="share" background-color="#fff">
|
||||||
|
<uni-popup-share title="分享到"></uni-popup-share>
|
||||||
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</Cn-page>
|
</Cn-page>
|
||||||
@@ -43,11 +44,17 @@
|
|||||||
<script>
|
<script>
|
||||||
import basic from "./APF/basic.vue";
|
import basic from "./APF/basic.vue";
|
||||||
import xieBo from "./APF/xieBo.vue";
|
import xieBo from "./APF/xieBo.vue";
|
||||||
|
import power from "./APF/power.vue";
|
||||||
|
import oscillogram from "./APF/oscillogram.vue";
|
||||||
|
import IO from "./APF/IO.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
basic,
|
basic,
|
||||||
xieBo
|
xieBo,
|
||||||
|
power,
|
||||||
|
oscillogram,
|
||||||
|
IO
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -64,10 +71,55 @@ export default {
|
|||||||
text: '波形'
|
text: '波形'
|
||||||
}, {
|
}, {
|
||||||
text: 'I/O'
|
text: 'I/O'
|
||||||
}]
|
}],
|
||||||
|
content: [{
|
||||||
|
iconPath: '/static/share.png',
|
||||||
|
text: '分享',
|
||||||
|
}, {
|
||||||
|
iconPath: '/static/delate.png',
|
||||||
|
text: '删除',
|
||||||
|
}, {
|
||||||
|
iconPath: '/static/download.png',
|
||||||
|
text: '下载',
|
||||||
|
}, {
|
||||||
|
iconPath: '/static/record.png',
|
||||||
|
text: '记录',
|
||||||
|
}, {
|
||||||
|
iconPath: '/static/report2.png',
|
||||||
|
text: '告警',
|
||||||
|
}, {
|
||||||
|
iconPath: '/static/about.png',
|
||||||
|
text: '关于',
|
||||||
|
},
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
trigger (e) {
|
||||||
|
if (e.index === 0) {
|
||||||
|
this.$refs.share.open()
|
||||||
|
} else if (e.index === 1) {
|
||||||
|
uni.showModal({
|
||||||
|
title: '提示',
|
||||||
|
content: '确定删除该设备吗?',
|
||||||
|
success: function (res) {
|
||||||
|
if (res.confirm) {
|
||||||
|
console.log('用户点击确定')
|
||||||
|
} else if (res.cancel) {
|
||||||
|
console.log('用户点击取消')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (e.index === 2) {
|
||||||
|
this.$util.toast('下载成功')
|
||||||
|
} else if (e.index === 3) {
|
||||||
|
uni.navigateTo({ url: '/pages/device/record' })
|
||||||
|
} else if (e.index === 4) {
|
||||||
|
uni.navigateTo({ url: '/pages/device/report' })
|
||||||
|
} else if (e.index === 5) {
|
||||||
|
uni.navigateTo({ url: '/pages/device/about' })
|
||||||
|
}
|
||||||
|
},
|
||||||
navMenuClick (idx) {
|
navMenuClick (idx) {
|
||||||
this.navMenuActive = idx
|
this.navMenuActive = idx
|
||||||
},
|
},
|
||||||
@@ -89,11 +141,8 @@ export default {
|
|||||||
<style lang='scss'>
|
<style lang='scss'>
|
||||||
.detail {
|
.detail {
|
||||||
|
|
||||||
// background: #fff;
|
// background: $uni-theme-white;
|
||||||
.header {
|
.header {}
|
||||||
height: 400rpx;
|
|
||||||
background: $uni-color-primary;
|
|
||||||
}
|
|
||||||
|
|
||||||
.des {
|
.des {
|
||||||
padding: 20rpx 20rpx 0;
|
padding: 20rpx 20rpx 0;
|
||||||
@@ -114,7 +163,7 @@ export default {
|
|||||||
margin-left: 20rpx;
|
margin-left: 20rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
border-radius: 8rpx;
|
border-radius: 8rpx;
|
||||||
background: #fff;
|
background: $uni-theme-white;
|
||||||
|
|
||||||
&:first-of-type {
|
&:first-of-type {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
|
|||||||
@@ -1,25 +1,78 @@
|
|||||||
<template>
|
<template>
|
||||||
<Cn-page :loading='loading'>
|
<view class='new'>
|
||||||
<view slot='body'>
|
<template v-if="type == 1">
|
||||||
<view class='index'>
|
<view style="display:flex">
|
||||||
添加新设备
|
<uni-easyinput type="number" v-model="code" placeholder="请输入设备DID" />
|
||||||
|
|
||||||
|
<uni-icons type="camera" color="#007aff" size="30" class="ml20" @click="scanCode"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="new-btn" @click="register"> 发起注册 </view>
|
||||||
</Cn-page>
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<view style="display:flex;">
|
||||||
|
<uni-easyinput :clearable="false" type="text" v-model="address" placeholder="请输入地址" />
|
||||||
|
<uni-icons type="location" color="#007aff" size="30" class="ml20" @click="chooseLocation"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="new-btn" @click="submit"> 提交 </view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
loading: false
|
loading: false,
|
||||||
|
code: '',
|
||||||
|
type: 1,
|
||||||
|
formData: {
|
||||||
|
address: '',
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
scanCode () {
|
||||||
|
uni.scanCode({
|
||||||
|
success: function (res) {
|
||||||
|
console.log('条码类型:' + res.scanType);
|
||||||
|
console.log('条码内容:' + res.result);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
register () {
|
||||||
|
this.type = 2
|
||||||
|
},
|
||||||
|
chooseLocation () {
|
||||||
|
uni.chooseLocation({
|
||||||
|
success: function (res) {
|
||||||
|
this.address = res.name
|
||||||
|
console.log('位置名称:' + res.name);
|
||||||
|
console.log('详细地址:' + res.address);
|
||||||
|
console.log('纬度:' + res.latitude);
|
||||||
|
console.log('经度:' + res.longitude);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submit(){
|
||||||
|
this.$util.toast('提交成功')
|
||||||
|
uni.navigateBack({ delta: 1 })
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang='scss'>
|
||||||
.index {
|
.new {
|
||||||
padding: 34rpx;
|
padding: 100rpx 100rpx 0;
|
||||||
|
|
||||||
|
.new-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 80rpx auto 0;
|
||||||
|
width: 320rpx;
|
||||||
|
background: $uni-theme-blue;
|
||||||
|
color: #fff;
|
||||||
|
height: 80rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
43
pages/device/record.vue
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
<template>
|
||||||
|
<Cn-page :loading='loading'>
|
||||||
|
<view slot='body'>
|
||||||
|
<view class='record'>
|
||||||
|
|
||||||
|
<uni-list :border="false">
|
||||||
|
<uni-list-item title="操作记录" note="0.20->0.20" rightText="2023-02-01 15:10:29" v-for="item in 5" />
|
||||||
|
</uni-list>
|
||||||
|
<uni-load-more status="nomore"></uni-load-more>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</Cn-page>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang='scss'>
|
||||||
|
.record {
|
||||||
|
.header {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 10;
|
||||||
|
background: $uni-theme-white;
|
||||||
|
padding: 10rpx 20rpx 20rpx;
|
||||||
|
box-shadow: 0 0 10rpx #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-list-item {
|
||||||
|
background-color: $uni-theme-white !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
51
pages/device/report.vue
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<template>
|
||||||
|
<Cn-page :loading='loading'>
|
||||||
|
<view slot='body'>
|
||||||
|
<view class='record'>
|
||||||
|
<div class="header">
|
||||||
|
<uni-segmented-control :current="current" :values="items" :style-type="styleType"
|
||||||
|
:active-color="activeColor" @clickItem="onClickItem" />
|
||||||
|
</div>
|
||||||
|
<uni-list :border="false">
|
||||||
|
<uni-list-item title="输入电压异常" rightText="2023-02-01 15:10:29" v-for="item in 5" />
|
||||||
|
</uni-list>
|
||||||
|
<uni-load-more status="nomore"></uni-load-more>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</Cn-page>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
current: 0,
|
||||||
|
items: ['当前告警', '历史告警'],
|
||||||
|
styleType: 'text',
|
||||||
|
activeColor: '#007aff',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onClickItem (e) {
|
||||||
|
this.current = e.currentIndex
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang='scss'>
|
||||||
|
.record {
|
||||||
|
.header {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 10;
|
||||||
|
background: $uni-theme-white;
|
||||||
|
padding: 10rpx 20rpx 20rpx;
|
||||||
|
box-shadow: 0 0 10rpx #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-list-item {
|
||||||
|
background-color: $uni-theme-white !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
63
pages/gateway/list.vue
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
<template>
|
||||||
|
<Cn-page :loading='loading'>
|
||||||
|
<view slot='body'>
|
||||||
|
<view class='index'>
|
||||||
|
<uni-card title="网关信息" sub-title="副标题" v-for="item in 3" :key="item" @click="jump"
|
||||||
|
thumbnail="/static/gateway.png">
|
||||||
|
<view class="footer">
|
||||||
|
<text>设备基础信息 </text>
|
||||||
|
<view class="footer-btn" @click="newDevice">注册设备</view>
|
||||||
|
</view>
|
||||||
|
</uni-card>
|
||||||
|
<uni-load-more status="nomore"></uni-load-more>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</Cn-page>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
loading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
newDevice () {
|
||||||
|
uni.scanCode({
|
||||||
|
success: function (res) {
|
||||||
|
console.log('条码类型:' + res.scanType);
|
||||||
|
console.log('条码内容:' + res.result);
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/gateway/newDevice'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang='scss'>
|
||||||
|
.index {
|
||||||
|
.footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.footer-btn {
|
||||||
|
padding: 0 20rpx;
|
||||||
|
height: 50rpx;
|
||||||
|
background-color: #007aff;
|
||||||
|
font-size: 24rpx;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 50rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-list-item {
|
||||||
|
background-color: $uni-theme-white !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
68
pages/gateway/new.vue
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
<template>
|
||||||
|
<view class='new'>
|
||||||
|
<view style="display:flex">
|
||||||
|
<uni-easyinput type="number" v-model="code" placeholder="请输入设备NDID" />
|
||||||
|
<uni-icons type="camera" color="#007aff" size="30" class="ml20" @click="scanCode"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="new-btn" @click="submit"> 提交 </view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
code: '',
|
||||||
|
type: 1,
|
||||||
|
formData: {
|
||||||
|
address: '',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
scanCode () {
|
||||||
|
uni.scanCode({
|
||||||
|
success: function (res) {
|
||||||
|
console.log('条码类型:' + res.scanType);
|
||||||
|
console.log('条码内容:' + res.result);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
register () {
|
||||||
|
this.type = 2
|
||||||
|
},
|
||||||
|
chooseLocation () {
|
||||||
|
uni.chooseLocation({
|
||||||
|
success: function (res) {
|
||||||
|
this.address = res.name
|
||||||
|
console.log('位置名称:' + res.name);
|
||||||
|
console.log('详细地址:' + res.address);
|
||||||
|
console.log('纬度:' + res.latitude);
|
||||||
|
console.log('经度:' + res.longitude);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
submit () {
|
||||||
|
this.$util.toast('提交成功')
|
||||||
|
uni.navigateBack({ delta: 1 })
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang='scss'>
|
||||||
|
.new {
|
||||||
|
padding: 100rpx 100rpx 0;
|
||||||
|
|
||||||
|
.new-btn {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 80rpx auto 0;
|
||||||
|
width: 320rpx;
|
||||||
|
background: $uni-theme-blue;
|
||||||
|
color: #fff;
|
||||||
|
height: 80rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
88
pages/gateway/newDevice.vue
Normal file
@@ -0,0 +1,88 @@
|
|||||||
|
<template>
|
||||||
|
<Cn-page :loading='loading'>
|
||||||
|
<view slot='body'>
|
||||||
|
<view class='index'>
|
||||||
|
<view class="content" v-for="(item, index) in formData" :key="index">
|
||||||
|
<uni-forms :label-width="80">
|
||||||
|
<uni-forms-item label="类型">
|
||||||
|
<uni-data-select v-model="item.type" :localdata="range"></uni-data-select>
|
||||||
|
</uni-forms-item>
|
||||||
|
<uni-forms-item label="MAC地址">
|
||||||
|
<uni-easyinput type="number" v-model="item.address" placeholder="请输入设备MAC地址" />
|
||||||
|
</uni-forms-item>
|
||||||
|
</uni-forms>
|
||||||
|
</view>
|
||||||
|
<view class="btn-wrap">
|
||||||
|
<view class="btn-wrap-item" @click="add"> 添加 </view>
|
||||||
|
<view class="btn-wrap-item ml20" @click="submit"> 提交 </view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</Cn-page>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
formData: [
|
||||||
|
{
|
||||||
|
type: '',
|
||||||
|
address: '',
|
||||||
|
}
|
||||||
|
],
|
||||||
|
range: [
|
||||||
|
{ value: 0, text: "DVR" },
|
||||||
|
{ value: 1, text: "APF" },
|
||||||
|
],
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.formData.push({
|
||||||
|
type: '',
|
||||||
|
address: '',
|
||||||
|
})
|
||||||
|
},
|
||||||
|
submit () {
|
||||||
|
console.log(this.formData)
|
||||||
|
// uni.navigateBack({ delta: 1 })
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang='scss'>
|
||||||
|
.index {
|
||||||
|
padding: 34rpx;
|
||||||
|
|
||||||
|
.content {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
padding: 34rpx;
|
||||||
|
background: $uni-theme-white;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-wrap {
|
||||||
|
margin-top: 40rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
.btn-wrap-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex: 1;
|
||||||
|
background: $uni-theme-blue;
|
||||||
|
color: #fff;
|
||||||
|
height: 80rpx;
|
||||||
|
border-radius: 12rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-forms-item:last-of-type {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -5,15 +5,15 @@
|
|||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="header-content">
|
<div class="header-content">
|
||||||
<div class="header-content-item">
|
<div class="header-content-item">
|
||||||
<div class="header-content-item-value">38</div>
|
<div class="header-content-item-value">3</div>
|
||||||
<div class="header-content-item-label">正常设备</div>
|
<div class="header-content-item-label">正常设备</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-content-item">
|
<div class="header-content-item">
|
||||||
<div class="header-content-item-value">5</div>
|
<div class="header-content-item-value">1</div>
|
||||||
<div class="header-content-item-label">报警设备</div>
|
<div class="header-content-item-label">报警设备</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-content-item">
|
<div class="header-content-item">
|
||||||
<div class="header-content-item-value">3</div>
|
<div class="header-content-item-value">0</div>
|
||||||
<div class="header-content-item-label">离线设备</div>
|
<div class="header-content-item-label">离线设备</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -23,7 +23,8 @@
|
|||||||
<text>设备基础信息 </text>
|
<text>设备基础信息 </text>
|
||||||
</uni-card>
|
</uni-card>
|
||||||
<uni-load-more status="nomore"></uni-load-more>
|
<uni-load-more status="nomore"></uni-load-more>
|
||||||
<uni-fab ref="fab" horizontal="right" vertical="bottom" :content="content" @trigger="trigger" />
|
<uni-fab ref="fab" direction="vertical" horizontal="right" vertical="bottom" :content="content"
|
||||||
|
@trigger="trigger" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</Cn-page>
|
</Cn-page>
|
||||||
@@ -37,7 +38,7 @@ export default {
|
|||||||
iconPath: '/static/device.png',
|
iconPath: '/static/device.png',
|
||||||
text: '添加设备',
|
text: '添加设备',
|
||||||
}, {
|
}, {
|
||||||
iconPath: '/static/wangguan.png',
|
iconPath: '/static/gateway.png',
|
||||||
text: '添加网关',
|
text: '添加网关',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
@@ -66,6 +67,10 @@ export default {
|
|||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/device/new'
|
url: '/pages/device/new'
|
||||||
})
|
})
|
||||||
|
}else if(e.index === 1){
|
||||||
|
uni.navigateTo({
|
||||||
|
url: '/pages/gateway/new'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -82,7 +87,7 @@ export default {
|
|||||||
|
|
||||||
.header {
|
.header {
|
||||||
margin: 0 30rpx;
|
margin: 0 30rpx;
|
||||||
background: #fff;
|
background: $uni-theme-white;
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
background: $uni-color-primary;
|
background: $uni-color-primary;
|
||||||
padding: 30rpx 10rpx 40rpx;
|
padding: 30rpx 10rpx 40rpx;
|
||||||
@@ -105,4 +110,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/deep/ .uni-card {
|
||||||
|
background: $uni-theme-white;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -20,10 +20,10 @@
|
|||||||
<view class="mine-nav-label">个人消息</view>
|
<view class="mine-nav-label">个人消息</view>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="mine-nav" @click="jump('message')"
|
<view class="mine-nav" @click="jump('gateway')"
|
||||||
style="border-bottom: none; box-shadow: 0 4rpx 8rpx #e7e7e74c;">
|
style="border-bottom: none; box-shadow: 0 4rpx 8rpx #e7e7e74c;">
|
||||||
<image mode="aspectFill" class="mine-nav-icon" src="/static/message2.png" />
|
<image mode="aspectFill" class="mine-nav-icon" src="/static/gateway.png" />
|
||||||
<view class="mine-nav-label">网关管理</view>
|
<view class="mine-nav-label">网关列表</view>
|
||||||
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view class="mine-nav" @click="jump('setup')" style="margin-top:20rpx;border-bottom: none; ">
|
<view class="mine-nav" @click="jump('setup')" style="margin-top:20rpx;border-bottom: none; ">
|
||||||
@@ -63,6 +63,11 @@ export default {
|
|||||||
url: `/pages/user/login`
|
url: `/pages/user/login`
|
||||||
})
|
})
|
||||||
break;
|
break;
|
||||||
|
case 'gateway':
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/gateway/list`
|
||||||
|
})
|
||||||
|
break;
|
||||||
case 'upgrade':
|
case 'upgrade':
|
||||||
this.$refs.inputDialog.open()
|
this.$refs.inputDialog.open()
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<uni-list :border="false">
|
<uni-list :border="false">
|
||||||
<uni-list-item title="输入电压异常" rightText="2023-02-01 15:10:29" v-for="item in 5" />
|
<uni-list-item title="输入电压异常" rightText="2023-02-01 15:10:29" v-for="item in 5" />
|
||||||
</uni-list>
|
</uni-list>
|
||||||
|
<uni-load-more status="nomore"></uni-load-more>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -22,6 +23,11 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style lang="scss">
|
||||||
.content {}
|
.content {}
|
||||||
|
|
||||||
|
/deep/ .uni-list-item {
|
||||||
|
background-color: $uni-theme-white !important;
|
||||||
|
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -25,4 +25,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang='scss'>
|
<style lang='scss'>
|
||||||
.index {}
|
.index {}
|
||||||
|
/deep/ .uni-list-item {
|
||||||
|
background-color: $uni-theme-white !important;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -2,14 +2,6 @@
|
|||||||
<view :loading="loading">
|
<view :loading="loading">
|
||||||
<view class="mine">
|
<view class="mine">
|
||||||
<view class="mine-nav" style="margin-top:20rpx;">
|
<view class="mine-nav" style="margin-top:20rpx;">
|
||||||
<view class="mine-nav-label">暂态消息</view>
|
|
||||||
<switch color="#376cf3" />
|
|
||||||
</view>
|
|
||||||
<view class="mine-nav">
|
|
||||||
<view class="mine-nav-label">稳态越限消息</view>
|
|
||||||
<switch color="#376cf3" />
|
|
||||||
</view>
|
|
||||||
<view class="mine-nav">
|
|
||||||
<view class="mine-nav-label">终端消息</view>
|
<view class="mine-nav-label">终端消息</view>
|
||||||
<switch color="#376cf3" />
|
<switch color="#376cf3" />
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<view class="login-des">{{ companyName }}</view>
|
<view class="login-des">{{ companyName }}</view>
|
||||||
<view class="login-box">
|
<view class="login-box">
|
||||||
<!-- <image class="login-box-logo" mode="widthFix" src="/static/logo.png"></image> -->
|
<!-- <image class="login-box-logo" mode="widthFix" src="/static/logo.png"></image> -->
|
||||||
<image class="login-box-logo" mode="widthFix" src="/static/logo2.png"></image>
|
<image class="login-box-logo" mode="widthFix" src="/static/logo.png"></image>
|
||||||
<template v-if="loginType == 'yzm'">
|
<template v-if="loginType == 'yzm'">
|
||||||
<view class="login-box-input mt100">
|
<view class="login-box-input mt100">
|
||||||
<input class="login-box-input-main" v-model="yzmForm.phone" placeholder="请输入手机号" />
|
<input class="login-box-input-main" v-model="yzmForm.phone" placeholder="请输入手机号" />
|
||||||
@@ -100,98 +100,21 @@ export default {
|
|||||||
if (!this.pwdForm.account && !this.pwdForm.pwd) {
|
if (!this.pwdForm.account && !this.pwdForm.pwd) {
|
||||||
return this.$util.toast('请填写登录信息!')
|
return this.$util.toast('请填写登录信息!')
|
||||||
}
|
}
|
||||||
this.$request({
|
uni.reLaunch({
|
||||||
url: '/org/login/valid',
|
url: '/pages/index/index',
|
||||||
data: {
|
|
||||||
account: this.pwdForm.account.trim(),
|
|
||||||
password: this.pwdForm.pwd,
|
|
||||||
tenantId: this.tenantId,
|
|
||||||
},
|
|
||||||
method: 'POST',
|
|
||||||
}).then(res => {
|
|
||||||
uni.setStorageSync('login', true)
|
|
||||||
uni.setStorageSync('Authorization', res.data)
|
|
||||||
uni.setStorageSync('password', this.pwdForm.pwd)
|
|
||||||
uni.setStorageSync('account', this.pwdForm.account.trim())
|
|
||||||
this.$util.toast('登录成功!')
|
|
||||||
// #ifndef MP
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/index/index',
|
|
||||||
})
|
|
||||||
}, 100);
|
|
||||||
// #endif
|
|
||||||
this.$util.loadConfig(() => { }, true)
|
|
||||||
// #ifdef MP
|
|
||||||
uni.login({
|
|
||||||
provider: 'weixin',
|
|
||||||
success: loginRes => {
|
|
||||||
console.log(loginRes)
|
|
||||||
this.$request({
|
|
||||||
url: '/org/wxxcx/login',
|
|
||||||
data: {
|
|
||||||
code: loginRes.code,
|
|
||||||
tenantId: this.tenantId,
|
|
||||||
},
|
|
||||||
method: 'POST',
|
|
||||||
}).then(res => {
|
|
||||||
this.$request({
|
|
||||||
url: '/org/wxxcx/bindUser',
|
|
||||||
data: {
|
|
||||||
account: this.pwdForm.account.trim(),
|
|
||||||
password: this.pwdForm.pwd,
|
|
||||||
openid: res.data.openid,
|
|
||||||
tenantId: this.tenantId,
|
|
||||||
},
|
|
||||||
method: 'POST'
|
|
||||||
}).then(res => {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/index/index',
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
},
|
|
||||||
})
|
|
||||||
// #endif
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
yzmLogin () {
|
yzmLogin () {
|
||||||
if (!this.yzmForm.phone && !this.yzmForm.code) {
|
if (!this.yzmForm.phone && !this.yzmForm.code) {
|
||||||
return this.$util.toast('请填写登录信息!')
|
return this.$util.toast('请填写登录信息!')
|
||||||
}
|
}
|
||||||
this.$request({
|
uni.reLaunch({
|
||||||
url: '/org/login/valid',
|
url: '/pages/index/index',
|
||||||
data: {
|
|
||||||
account: this.yzmForm.phone.trim(),
|
|
||||||
code: this.yzmForm.code,
|
|
||||||
tenantId: this.tenantId,
|
|
||||||
},
|
|
||||||
method: 'POST',
|
|
||||||
}).then(res => {
|
|
||||||
uni.setStorageSync('Authorization', res.data)
|
|
||||||
this.$util.toast('登录成功!')
|
|
||||||
setTimeout(() => {
|
|
||||||
uni.reLaunch({
|
|
||||||
url: '/pages/index/index',
|
|
||||||
})
|
|
||||||
}, 1500)
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
onLoad (o) {
|
onLoad (o) {
|
||||||
uni.removeStorageSync('Authorization')
|
|
||||||
if (o.alias) {
|
|
||||||
this.tenantId = o.alias
|
|
||||||
this.companyName = o.name
|
|
||||||
this.pwdForm.account = o.account
|
|
||||||
uni.setStorageSync('tenantId', this.tenantId)
|
|
||||||
uni.setStorageSync('companyName', this.companyName)
|
|
||||||
uni.setStorageSync('account', this.pwdForm.account)
|
|
||||||
} else {
|
|
||||||
this.tenantId = uni.getStorageSync('tenantId')
|
|
||||||
this.companyName = uni.getStorageSync('companyName')
|
|
||||||
this.pwdForm.account = uni.getStorageSync('account')
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -220,7 +143,7 @@ export default {
|
|||||||
width: 680rpx;
|
width: 680rpx;
|
||||||
padding: 100rpx 40rpx;
|
padding: 100rpx 40rpx;
|
||||||
border-radius: 40rpx;
|
border-radius: 40rpx;
|
||||||
background: #fff;
|
background: $uni-theme-white;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.login-box-logo {
|
.login-box-logo {
|
||||||
|
|||||||
BIN
static/about.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
static/delate.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
static/download.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 5.0 KiB |
BIN
static/record.png
Normal file
|
After Width: | Height: | Size: 7.9 KiB |
BIN
static/share.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
BIN
static/test.pic.jpg
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
static/我的服务.png
|
Before Width: | Height: | Size: 6.3 KiB |
2
uni.scss
@@ -82,5 +82,5 @@ $uni-font-size-paragraph:15px;
|
|||||||
|
|
||||||
$uni-theme-blue: #376cf3; // 全局主题色
|
$uni-theme-blue: #376cf3; // 全局主题色
|
||||||
$uni-theme-yellow: #f2c867; // 全局主题色
|
$uni-theme-yellow: #f2c867; // 全局主题色
|
||||||
$uni-theme-white: #fffefa; // 全局主题色
|
$uni-theme-white: #fff; // 全局主题色
|
||||||
$uni-theme-radius: 12rpx; // 全局主题色
|
$uni-theme-radius: 12rpx; // 全局主题色
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
// &:after {
|
// &:after {
|
||||||
// position: absolute;
|
// position: absolute;
|
||||||
// content: '';
|
// content: '';
|
||||||
// background: #fff;
|
// background: $uni-theme-white;
|
||||||
// width: $size / 1.8;
|
// width: $size / 1.8;
|
||||||
// height: $size / 1.8;
|
// height: $size / 1.8;
|
||||||
// border-radius: 100%;
|
// border-radius: 100%;
|
||||||
@@ -123,4 +123,4 @@
|
|||||||
transform: rotate(-360deg)
|
transform: rotate(-360deg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||