页面切图

This commit is contained in:
仲么了
2023-02-07 17:59:54 +08:00
parent 6cd009f621
commit 3f50cca6db
35 changed files with 933 additions and 164 deletions

View File

@@ -15,4 +15,6 @@ export default {
<style lang="scss">
/*每个页面公共css */
@import './common/css/base.scss';
</style>

View File

@@ -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;
}
.grid-card-content-5 {
grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}
}

View File

@@ -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 {

View File

@@ -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;

View File

@@ -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" : [
"<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.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\"/>"
]
},
@@ -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"
}
}
}
}
},

View File

@@ -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
},

41
pages/device/APF/IO.vue Normal file
View 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>

View 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>

View 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>

View File

@@ -74,7 +74,7 @@ export default {
]
};
this.chartData = JSON.parse(JSON.stringify(res));
}, 1500);
}, 500);
},
}
};

44
pages/device/about.vue Normal file
View 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>

View File

@@ -2,7 +2,9 @@
<Cn-page :loading='loading' noPadding>
<view slot='body'>
<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">
<text>设备基础信息</text>
<text class="ml10">设备状态</text>
@@ -13,29 +15,28 @@
</view>
</view>
<view class="content" :style="{ minHeight: 'calc(100vh - ' + navHeight + 'px)' }">
<view v-show="navMenuActive == 0">
<view v-if="navMenuActive == 0">
<basic></basic>
</view>
<view v-show="navMenuActive == 1">
<view v-else-if="navMenuActive == 1">
<xieBo></xieBo>
</view>
<view v-show="navMenuActive == 2">
<view>
<text>设备功率信息</text>
<view v-else-if="navMenuActive == 2">
<power></power>
</view>
<view v-else-if="navMenuActive == 3">
<oscillogram></oscillogram>
</view>
<view v-show="navMenuActive == 3">
<view>
<text>设备波形信息</text>
</view>
</view>
<view v-show="navMenuActive == 4">
<view>
<text>设备I/O信息</text>
</view>
<view v-else-if="navMenuActive == 4">
<IO></IO>
</view>
<view style="height:20rpx"></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>
</Cn-page>
@@ -43,11 +44,17 @@
<script>
import basic from "./APF/basic.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 {
components: {
basic,
xieBo
xieBo,
power,
oscillogram,
IO
},
data () {
return {
@@ -64,10 +71,55 @@ export default {
text: '波形'
}, {
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: {
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) {
this.navMenuActive = idx
},
@@ -89,11 +141,8 @@ export default {
<style lang='scss'>
.detail {
// background: #fff;
.header {
height: 400rpx;
background: $uni-color-primary;
}
// background: $uni-theme-white;
.header {}
.des {
padding: 20rpx 20rpx 0;
@@ -114,7 +163,7 @@ export default {
margin-left: 20rpx;
font-size: 28rpx;
border-radius: 8rpx;
background: #fff;
background: $uni-theme-white;
&:first-of-type {
margin-left: 0;

View File

@@ -1,25 +1,78 @@
<template>
<Cn-page :loading='loading'>
<view slot='body'>
<view class='index'>
添加新设备
<view class='new'>
<template v-if="type == 1">
<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 class="new-btn" @click="register"> 发起注册 </view>
</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>
</Cn-page>
</template>
<script>
export default {
data () {
return {
loading: false
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'>
.index {
padding: 34rpx;
.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>

43
pages/device/record.vue Normal file
View 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
View 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
View 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
View 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>

View 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>

View File

@@ -5,15 +5,15 @@
<div class="header">
<div class="header-content">
<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>
<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>
<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>
</div>
@@ -23,7 +23,8 @@
<text>设备基础信息 </text>
</uni-card>
<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>
</Cn-page>
@@ -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;
}
</style>

View File

@@ -20,10 +20,10 @@
<view class="mine-nav-label">个人消息</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</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;">
<image mode="aspectFill" class="mine-nav-icon" src="/static/message2.png" />
<view class="mine-nav-label">网关管理</view>
<image mode="aspectFill" class="mine-nav-icon" src="/static/gateway.png" />
<view class="mine-nav-label">网关列表</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
<view class="mine-nav" @click="jump('setup')" style="margin-top:20rpx;border-bottom: none; ">
@@ -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;

View File

@@ -3,6 +3,7 @@
<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>
</template>
@@ -22,6 +23,11 @@ export default {
}
</script>
<style>
<style lang="scss">
.content {}
/deep/ .uni-list-item {
background-color: $uni-theme-white !important;
}
</style>

View File

@@ -25,4 +25,7 @@ export default {
</script>
<style lang='scss'>
.index {}
/deep/ .uni-list-item {
background-color: $uni-theme-white !important;
}
</style>

View File

@@ -2,14 +2,6 @@
<view :loading="loading">
<view class="mine">
<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>
<switch color="#376cf3" />
</view>

View File

@@ -6,7 +6,7 @@
<view class="login-des">{{ companyName }}</view>
<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/logo2.png"></image>
<image class="login-box-logo" mode="widthFix" src="/static/logo.png"></image>
<template v-if="loginType == 'yzm'">
<view class="login-box-input mt100">
<input class="login-box-input-main" v-model="yzmForm.phone" placeholder="请输入手机号" />
@@ -100,98 +100,21 @@ export default {
if (!this.pwdForm.account && !this.pwdForm.pwd) {
return this.$util.toast('请填写登录信息!')
}
this.$request({
url: '/org/login/valid',
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 () {
if (!this.yzmForm.phone && !this.yzmForm.code) {
return this.$util.toast('请填写登录信息!')
}
this.$request({
url: '/org/login/valid',
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) {
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>
@@ -220,7 +143,7 @@ export default {
width: 680rpx;
padding: 100rpx 40rpx;
border-radius: 40rpx;
background: #fff;
background: $uni-theme-white;
overflow: hidden;
.login-box-logo {

BIN
static/about.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
static/delate.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

BIN
static/download.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

BIN
static/record.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

BIN
static/share.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
static/test.pic.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

View File

@@ -82,5 +82,5 @@ $uni-font-size-paragraph:15px;
$uni-theme-blue: #376cf3; // 全局主题色
$uni-theme-yellow: #f2c867; // 全局主题色
$uni-theme-white: #fffefa; // 全局主题色
$uni-theme-white: #fff; // 全局主题色
$uni-theme-radius: 12rpx; // 全局主题色

View File

@@ -71,7 +71,7 @@
// &:after {
// position: absolute;
// content: '';
// background: #fff;
// background: $uni-theme-white;
// width: $size / 1.8;
// height: $size / 1.8;
// border-radius: 100%;