页面切图

This commit is contained in:
仲么了
2023-02-20 14:19:28 +08:00
parent 7d28b3476a
commit 5e69ab1da6
50 changed files with 1136 additions and 213 deletions

View File

@@ -27,7 +27,7 @@ export default {
</script>
<style lang='scss'>
.about {
padding: 34rpx;
padding: 34rpx;
.about-title {
font-size: 34rpx;
font-weight: bold;

View File

@@ -180,32 +180,32 @@ export default {
color: #999;
}
.nav {
position: sticky;
top: 0;
left: 0;
padding: 20rpx;
display: flex;
background: rgb(243, 244, 245);
// .nav {
// position: sticky;
// top: 0;
// left: 0;
// padding: 20rpx;
// display: flex;
// background: rgb(243, 244, 245);
.nav-menu {
padding: 10rpx 20rpx;
margin-left: 20rpx;
font-size: 28rpx;
border-radius: 8rpx;
background: $uni-theme-white;
// .nav-menu {
// padding: 10rpx 20rpx;
// margin-left: 20rpx;
// font-size: 28rpx;
// border-radius: 8rpx;
// background: $uni-theme-white;
&:first-of-type {
margin-left: 0;
}
// &:first-of-type {
// margin-left: 0;
// }
&-active {
background: $uni-theme-blue;
color: #fff;
}
}
// &-active {
// background: $uni-theme-blue;
// color: #fff;
// }
// }
}
// }
.content {
box-sizing: border-box;

View File

@@ -27,7 +27,7 @@ export default {
</script>
<style lang='scss'>
.about {
padding: 34rpx;
padding: 34rpx;
.about-title {
font-size: 34rpx;
font-weight: bold;

View File

@@ -174,31 +174,31 @@ export default {
color: #999;
}
.nav {
position: sticky;
top: 0;
left: 0;
padding-top: 20rpx;
display: flex;
flex-wrap: wrap;
background: rgb(243, 244, 245);
// .nav {
// position: sticky;
// top: 0;
// left: 0;
// padding-top: 20rpx;
// display: flex;
// flex-wrap: wrap;
// background: rgb(243, 244, 245);
.nav-menu {
padding: 10rpx 20rpx;
margin-left: 20rpx;
margin-bottom: 20rpx;
font-size: 28rpx;
border-radius: 8rpx;
background: $uni-theme-white;
// .nav-menu {
// padding: 10rpx 20rpx;
// margin-left: 20rpx;
// margin-bottom: 20rpx;
// font-size: 28rpx;
// border-radius: 8rpx;
// background: $uni-theme-white;
&-active {
background: $uni-theme-blue;
color: #fff;
}
}
// &-active {
// background: $uni-theme-blue;
// color: #fff;
// }
// }
}
// }
.content {
box-sizing: border-box;

View File

@@ -56,11 +56,11 @@ export default {
</script>
<style lang='scss'>
.index {
padding: 34rpx;
padding: 20rpx;
.content {
margin-bottom: 20rpx;
padding: 34rpx;
padding: 34rpx;
background: $uni-theme-white;
border-radius: 12rpx;
}
@@ -84,7 +84,4 @@ export default {
}
}
/deep/ .uni-forms-item:last-of-type {
margin-bottom: 0;
}
</style>

View File

@@ -3,16 +3,18 @@
<template v-if="type == 1">
<view class="content">
<uni-forms>
<uni-forms-item label="设备DID">
<uni-forms-item label="设备识别码">
<view style="display:flex">
<uni-easyinput type="number" v-model="code" placeholder="请输入设备DID" />
<uni-easyinput type="number" v-model="code" placeholder="请输入设备识别码" />
<uni-icons type="camera" color="#007aff" size="26" class="ml20"
@click="scanCode"></uni-icons>
</view>
</uni-forms-item>
</uni-forms>
</view>
<view class="new-btn" @click="register"> 发起注册 </view>
<view class="btn-wrap">
<view class="btn-wrap-item" @click="register"> 发起注册 </view>
</view>
</template>
<template v-else>
@@ -206,7 +208,7 @@ export default {
</script>
<style lang='scss'>
.new {
padding: 34rpx;
padding: 34rpx;
.new-btn {
display: flex;
@@ -228,7 +230,7 @@ export default {
}
margin-bottom: 20rpx;
padding: 34rpx;
padding: 34rpx;
background: $uni-theme-white;
border-radius: 12rpx;
}
@@ -300,9 +302,7 @@ export default {
}
/deep/ .uni-forms-item:last-of-type {
margin-bottom: 0;
}
/deep/ .uni-drawer__content {
width: 100vw !important;

View File

@@ -32,7 +32,7 @@ export default {
</script>
<style lang='scss'>
.index {
padding: 34rpx;
padding: 20rpx;
.footer-btn {
padding: 0 20rpx;

View File

@@ -3,9 +3,9 @@
<template v-if="type == 1">
<view class="content">
<uni-forms>
<uni-forms-item label="设备DID">
<uni-forms-item label="设备识别码">
<view style="display:flex">
<uni-easyinput type="number" v-model="code" placeholder="请输入设备NDID" />
<uni-easyinput type="number" v-model="code" placeholder="请输入设备识别码" />
<uni-icons type="camera" color="#007aff" size="26" class="ml20"
@click="scanCode"></uni-icons>
</view>
@@ -110,7 +110,7 @@ export default {
</script>
<style lang='scss'>
.new {
padding: 34rpx;
padding: 34rpx;
.new-btn {
display: flex;
@@ -132,7 +132,7 @@ export default {
}
margin-bottom: 20rpx;
padding: 34rpx;
padding: 34rpx;
background: $uni-theme-white;
border-radius: 12rpx;
}
@@ -204,10 +204,6 @@ export default {
}
/deep/ .uni-forms-item:last-of-type {
margin-bottom: 0;
}
/deep/ .uni-drawer__content {
width: 100vw !important;
}

View File

@@ -5,7 +5,8 @@
<view class="content" v-for="(item, index) in deviceList" :key="index">
<uni-forms :label-width="80">
<uni-forms-item label="类型">
<uni-data-select v-model="item.type" :localdata="range"></uni-data-select>
<uni-data-select v-model="item.type" :localdata="range"
@change="typeChange(item)"></uni-data-select>
</uni-forms-item>
<uni-forms-item label="MAC地址">
<uni-easyinput type="text" v-model="item.address" placeholder="请输入设备MAC地址" />
@@ -19,16 +20,12 @@
@click="chooseGplot(item)"></uni-icons>
</view>
</uni-forms-item>
<uni-forms-item label="监测点">
<view class="point-item" v-for="(item2, index2) in item.pointList" :key="index2">
<view style="flex:1">{{ item2.pointName }}</view>
<uni-icons type="trash" color="#007aff" size="26" class="ml20"
@click="deletePoint(item, index2)"></uni-icons>
<uni-icons type="compose" color="#007aff" size="26" class="ml20"
@click="editPoint(item, index2)"></uni-icons>
</view>
<view class="add-point" @click="addNewPoint(item)">
<uni-icons type="plusempty" color="#999" size="20" class="ml20"></uni-icons>
<uni-forms-item label="监测点" v-if="item.pointList.length">
<view class="point-item" v-for="(item2, index2) in item.pointList" :key="index2"
@click="editPoint(item, index2)">
<view style="flex:1" v-if="item2.pointName">{{ item2.pointName }}</view>
<view style="flex:1;color:#999" v-else>请选择监测点</view>
<uni-icons type="compose" color="#007aff" size="26" class="ml20"></uni-icons>
</view>
</uni-forms-item>
</uni-forms>
@@ -40,9 +37,9 @@
<uni-drawer ref="gplot" mode="right" :mask-click="false">
<scroll-view style="height: 100%;" scroll-y="true">
<view class="content">
<image class="gplot gplot-box" mode="aspectFill"
:class="{ 'gplot-active': key == activeGplot }" src="/static/test2.pic.jpg"
@click="activeGplot = key" v-for="(item, key) in 3" :key="key" />
<image class="gplot gplot-box" mode="aspectFill" :class="{ 'gplot-active': key == activeGplot }"
src="/static/test2.pic.jpg" @click="activeGplot = key" v-for="(item, key) in 3"
:key="key" />
<view class="btn-wrap">
<view class="btn-wrap-item" @click="closeDrawer"> 取消 </view>
<view class="btn-wrap-item ml20" @click="confirmGplot"> 确定 </view>
@@ -95,8 +92,27 @@ export default {
}
],
range: [
{ value: 0, text: "DVR" },
{ value: 1, text: "APF" },
{ value: 1, text: "POS-882AX", point: 1 },
{ value: 2, text: "NPOS-681", point: 2 },
{ value: 3, text: "NPOS-681", point: 1 },
{ value: 4, text: "POV-500", point: 2 },
{ value: 5, text: "PQV-300", point: 1 },
{ value: 6, text: "NPOS-571W", point: 3 },
{ value: 7, text: "NPQS-572W", point: 3 },
{ value: 8, text: "POS-882B6", point: 2 },
{ value: 9, text: "PQS-882B5", point: 1 },
{ value: 10, text: "POS-882B4", point: 2 },
{ value: 11, text: "PQS-882B2", point: 1 },
{ value: 12, text: "POS-882A", point: 2 },
{ value: 13, text: "POS-883A", point: 1 },
{ value: 14, text: "NPOS-581", point: 2 },
{ value: 15, text: "PQS-681", point: 1 },
{ value: 16, text: "POS-8825", point: 3 },
{ value: 17, text: "PQS-782", point: 1 },
{ value: 18, text: "POS-880X", point: 3 },
{ value: 19, text: "NPQS-580", point: 1 },
{ value: 20, text: "NPOS-572", point: 2 },
],
point: {
x: 170,
@@ -109,6 +125,21 @@ export default {
}
},
methods: {
typeChange (item) {
console.log(item.type);
setTimeout(() => {
if (!item.type) return
let rangeIndex = this.range.findIndex((v) => v.value == item.type)
item.pointList = []
for (let index = 0; index < this.range[rangeIndex].point; index++) {
item.pointList.push({
name: '',
x: 170,
y: 100,
})
}
}, 100);
},
addDevice () {
console.log(this.formData);
this.deviceList.push({
@@ -214,11 +245,11 @@ export default {
</script>
<style lang='scss'>
.index {
padding: 34rpx;
padding: 20rpx;
.content {
margin-bottom: 20rpx;
padding: 34rpx;
padding: 34rpx;
background: $uni-theme-white;
border-radius: 12rpx;
}
@@ -242,12 +273,10 @@ export default {
}
}
/deep/ .uni-forms-item:last-of-type {
margin-bottom: 0;
}
.index {
padding: 34rpx;
padding: 20rpx;
.new-btn {
display: flex;
@@ -269,7 +298,7 @@ export default {
}
margin-bottom: 20rpx;
padding: 34rpx;
padding: 34rpx;
background: $uni-theme-white;
border-radius: 12rpx;
}
@@ -341,9 +370,7 @@ export default {
}
/deep/ .uni-forms-item:last-of-type {
margin-bottom: 0;
}
/deep/ .uni-drawer__content {
width: 100vw !important;

View File

@@ -14,10 +14,10 @@
<div class="header-item-label">离线设备</div>
</div>
</div>
<view style="padding:30rpx 30rpx 0">
<view style="padding:20rpx 20rpx 0">
<Cn-grid title="注册">
<Cn-grid-item src="/static/device2.png" text="设备"></Cn-grid-item>
<Cn-grid-item src="/static/gateway2.png" text="网关"></Cn-grid-item>
<Cn-grid-item src="/static/device2.png" text="设备" @click="registerDevice"></Cn-grid-item>
<Cn-grid-item src="/static/gateway2.png" text="网关" @click="registerGateway"></Cn-grid-item>
<Cn-grid-item background="#fff"></Cn-grid-item>
<Cn-grid-item background="#fff"></Cn-grid-item>
</Cn-grid>
@@ -27,12 +27,14 @@
v-for="(item, index) in navMenuList" :key="index" @click="navMenuClick(index)">{{ item.text }}
</view>
</view>
<uni-card :title="item.name" :sub-title="item.project" :extra="item.type" v-for="item in deviceListFilter"
:key="item" style="margin-top:4rpx" @click="jump(item)" thumbnail="/static/device.png">
<text>{{ item.project }} {{ item.type }}</text>
</uni-card>
<uni-load-more status="nomore"></uni-load-more>
<view class="content" :style="{ minHeight: minHeight }">
<uni-card :title="item.name" :sub-title="item.project" :extra="item.type"
v-for="(item, index) in deviceListFilter" :key="index" style="margin-top:4rpx" @click="jump(item)"
thumbnail="/static/device.png">
<text>{{ item.project }} {{ item.type }}</text>
</uni-card>
<uni-load-more status="nomore"></uni-load-more>
</view>
</view>
</template>
<script>
@@ -48,6 +50,8 @@ export default {
text: '治理'
}],
navMenuActive: 0,
navHeight: 0,
minHeight: '',
deviceList: [
{
name: '设备1',
@@ -60,6 +64,30 @@ export default {
des: '设备描述2',
type: 'DVR',
project: '治理'
},
{
name: '设备3',
des: '设备描述3',
type: 'DVR',
project: '治理'
},
{
name: '设备4',
des: '设备描述4',
type: 'DVR',
project: '治理'
},
{
name: '设备5',
des: '设备描述5',
type: 'APF',
project: '治理'
},
{
name: '设备6',
des: '设备描述6',
type: 'APF',
project: '治理'
}
]
}
@@ -74,11 +102,36 @@ export default {
}
},
methods: {
registerDevice () {
uni.showModal({
title: '提示',
content: '请选择设备类型',
confirmText: '直连装置',
cancelText: '网关接入',
cancelColor: '#007aff',
success: ({ confirm, cancel }) => {
if (confirm) {
uni.navigateTo({
url: '/pages/device/new'
})
} else if (cancel) {
uni.navigateTo({
url: '/pages/gateway/list'
})
}
}
})
},
registerGateway () {
uni.navigateTo({
url: '/pages/gateway/new'
})
},
navMenuClick (index) {
this.navMenuActive = index
},
jump (item) {
if (item % 2) {
if (item.type == 'APF') {
uni.navigateTo({
url: '/pages/device/APF/detail'
})
@@ -88,6 +141,21 @@ export default {
})
}
},
},
mounted () {
setTimeout(() => {
// 获取nav高度
uni.createSelectorQuery().select('.nav').boundingClientRect((rect) => {
this.navHeight = rect.height
// #ifdef H5
this.minHeight = 'calc(100vh - env(safe-area-inset-bottom) - ' + (50 + this.navHeight) + 'px)'
// #endif
// #ifdef APP-PLUS
this.minHeight = 'calc(100vh - ' + this.navHeight + 'px)'
// #endif
}).exec()
}, 1000);
}
}
</script>

View File

@@ -1,5 +1,5 @@
<template>
<Cn-page :loading="loading">
<Cn-page :loading="loading" noPadding>
<view slot="body">
<view class="index">
<!-- 运维 -->
@@ -12,12 +12,11 @@
<ZhuYongHu v-if="userInfo.role == 4" />
<!-- 子用户 -->
<ZiYongHu v-if="userInfo.role == 5" />
<uni-fab ref="fab" direction="vertical" horizontal="right" vertical="bottom" :content="content"
@trigger="trigger" />
</view>
</view>
</Cn-page>
</Cn-page>
</template>
<script>
import YunWei from "./comp/indexYunWei.vue";
@@ -37,7 +36,7 @@ export default {
return {
loading: false,
userInfo: {
role: 1
role: 4
}
}
},
@@ -61,15 +60,15 @@ export default {
text: '子用户',
}
]
if (arr.indexOf(this.userInfo.role) > -1) {
content.push({
iconPath: '/static/device.png',
text: '添加设备',
}, {
iconPath: '/static/gateway.png',
text: '添加网关',
})
}
// if (arr.indexOf(this.userInfo.role) > -1) {
// content.push({
// iconPath: '/static/device.png',
// text: '添加设备',
// }, {
// iconPath: '/static/gateway.png',
// text: '添加网关',
// })
// }
return content
}
},
@@ -128,13 +127,13 @@ export default {
this.loading = false
},
onShow () {
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo) || { role: 1 }
this.userInfo = uni.getStorageSync(this.$cacheKey.userInfo) || { role: 4 }
}
}
</script>
<style lang="scss">
.index {
padding: 34rpx 0;
padding: 34rpx 0 0;
}
/deep/ .uni-card {

View File

@@ -108,7 +108,7 @@ export default {
}
.message-nav {
padding: 34rpx;
padding: 34rpx;
display: flex;
align-items: center;
background: $uni-theme-white;

View File

@@ -7,6 +7,11 @@
<view>灿能电力</view>
<view class="tag">{{ roleName }}</view>
</view>
<image
src="/static/erweima.png"
style="height: 50rpx;width: 50rpx;border-radius:12rpx"
mode="scaleToFill"
/>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
<!-- <view class="mine-nav" @click="jump('upgrade')">
@@ -15,13 +20,13 @@
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view> -->
<view class="mine-nav" @click="jump('user')" v-if="userInfo.role == 4">
<!-- <view class="mine-nav" @click="jump('user')" v-if="userInfo.role == 4">
<image mode="aspectFill" class="mine-nav-icon" src="/static/subordinate.png" />
<view class="mine-nav-label">子用户列表</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
</view> -->
<view class="mine-nav" @click="jump('project')" v-if="userInfo.role == 4">
<image mode="aspectFill" class="mine-nav-icon" src="/static/subordinate.png" />
<image mode="aspectFill" class="mine-nav-icon" src="/static/project.png" />
<view class="mine-nav-label">项目管理</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
@@ -109,6 +114,11 @@ export default {
url: `/pages/user/basic`
})
break;
case 'project':
uni.navigateTo({
url: `/pages/project/list`
})
break;
break;
default:
uni.navigateTo({
@@ -158,7 +168,7 @@ export default {
}
.mine-nav {
padding: 34rpx;
padding: 34rpx;
display: flex;
align-items: center;
background: $uni-theme-white;

View File

@@ -24,7 +24,7 @@ export default {
.about {
box-sizing: border-box;
height: 100vh;
padding: 34rpx;
padding: 34rpx;
display: flex;
flex-direction: column;
align-items: center;

View File

@@ -20,6 +20,6 @@ export default {
</script>
<style lang='scss'>
.index {
padding: 34rpx;
padding: 20rpx;
}
</style>

View File

@@ -20,6 +20,6 @@ export default {
</script>
<style lang='scss'>
.index {
padding: 34rpx;
padding: 20rpx;
}
</style>

View File

@@ -7,8 +7,8 @@
<uni-forms-item label="类型">
<uni-data-select v-model="item.type" :localdata="range"></uni-data-select>
</uni-forms-item>
<uni-forms-item label="标题">
<uni-easyinput type="text" v-model="item.title" placeholder="请输入问题简要" />
<uni-forms-item label="区域">
<uni-easyinput type="textarea" v-model="item.title" placeholder="请输入问题简要" />
</uni-forms-item>
<uni-forms-item label="描述">
<uni-easyinput type="textarea" v-model="item.des" placeholder="请输入详细描述" />
@@ -55,11 +55,11 @@ export default {
</script>
<style lang='scss'>
.index {
padding: 34rpx;
padding: 20rpx;
.content {
margin-bottom: 20rpx;
padding: 34rpx;
padding: 34rpx;
background: $uni-theme-white;
border-radius: 12rpx;
}
@@ -82,8 +82,4 @@ export default {
}
}
}
/deep/ .uni-forms-item:last-of-type {
margin-bottom: 0;
}
</style>

View File

@@ -20,6 +20,6 @@ export default {
</script>
<style lang='scss'>
.index {
padding: 34rpx;
padding: 20rpx;
}
</style>

View File

@@ -83,6 +83,7 @@ export default {
<style lang="scss">
.mine {
padding-top: 20rpx;
.mine-header {
padding: 200rpx 34rpx 34rpx;
display: flex;
@@ -109,7 +110,7 @@ export default {
}
.mine-nav {
padding: 34rpx;
padding: 34rpx;
display: flex;
align-items: center;
background: $uni-theme-white;

View File

@@ -78,7 +78,7 @@ export default {
}
.mine-nav {
padding: 34rpx;
padding: 34rpx;
display: flex;
align-items: center;
background: $uni-theme-white;

View File

@@ -19,6 +19,6 @@ export default {
</script>
<style lang='scss'>
.index {
padding: 34rpx;
padding: 20rpx;
}
</style>

View File

@@ -20,6 +20,6 @@ export default {
</script>
<style lang='scss'>
.index {
padding: 34rpx;
padding: 20rpx;
}
</style>

View File

@@ -32,7 +32,7 @@ export default {
</script>
<style lang="scss">
.index {
padding: 34rpx;
padding: 20rpx;
.submit-btn {
background: $uni-theme-blue;

View File

@@ -53,7 +53,7 @@ export default {
</script>
<style lang='scss'>
.index {
padding: 34rpx;
padding: 20rpx;
.footer-btn {
padding: 0 20rpx;

126
pages/project/detail.vue Normal file
View File

@@ -0,0 +1,126 @@
<template>
<Cn-page :loading='loading' noPadding>
<view slot='body'>
<view class='detail'>
<view class="header">
<view class="header-title">{{ project }}</view>
<view class="header-des">项目详情</view>
</view>
<view class="nav">
<view class="nav-menu " :class="{ 'nav-menu-active': navMenuActive == index }"
v-for="(item, index) in navMenuList" :key="index" @click="navMenuClick(index)">{{ item.text }}
</view>
</view>
<view class="content" :style="{ minHeight: 'calc(100vh - ' + navHeight + 'px)' }">
<view v-show="navMenuActive == 0">
<uni-card title="基础设备" sub-title="副标题" extra="APF" v-for="item in 10" :key="item" @click="jump"
thumbnail="/static/real_time_data.png">
<text>设备基础信息 </text>
</uni-card>
</view>
<view style="padding: 0 20rpx" v-show="navMenuActive == 1">
<uni-list>
<uni-list-item title="张三" note="2023-02-10 14:55" thumb="/static/head.png" thumb-size="lg">
<template v-slot:footer>
<view class="footer-btn mt20" style="background:#e47470" @click="del">移除</view>
<!-- <view class="footer-btn mt20 ml10" @click="goUserDetail">查看</view> -->
</template>
</uni-list-item>
<uni-list-item title="李四" note="2023-02-10 14:55" thumb="/static/head.png" thumb-size="lg">
<template v-slot:footer>
<view class="footer-btn mt20" style="background:#e47470" @click="del">移除</view>
<!-- <view class="footer-btn mt20 ml10" @click="goUserDetail">查看</view> -->
</template>
</uni-list-item>
</uni-list>
</view>
<uni-load-more status="nomore"></uni-load-more>
</view>
</view>
</view>
</Cn-page>
</template>
<script>
export default {
data () {
return {
loading: false,
project: '',
navMenuList: [{
text: '设备列表'
}, {
text: '子用户列表'
}],
navMenuActive: 0
}
},
methods: {
navMenuClick (index) {
this.navMenuActive = index
},
goUserDetail () {
uni.navigateTo({
url: '/pages/mine/userDetail'
})
},
del () {
console.log('del');
uni.showModal({
title: '提示',
content: '确定要移除该成员吗?',
success: function (res) {
if (res.confirm) {
console.log('用户点击确定')
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
}
},
onLoad (option) {
this.project = option.project
setTimeout(() => {
// 获取nav高度
uni.createSelectorQuery().select('.nav').boundingClientRect((rect) => {
this.navHeight = rect.height
}).exec()
}, 1000);
// uni.setNavigationBarTitle({ title: this.project })
}
}
</script>
<style lang='scss'>
.detail {
.content {
box-sizing: border-box;
padding-bottom: 20rpx;
}
.header {
padding: 20rpx 20rpx 0;
.header-title {
font-size: 40rpx;
margin-bottom: 10rpx;
}
.header-des {
font-size: 28rpx;
color: #666;
}
}
.footer-btn {
padding: 0 20rpx;
height: 50rpx;
background-color: #007aff;
font-size: 24rpx;
color: #fff;
text-align: center;
line-height: 50rpx;
border-radius: 10rpx;
}
}
</style>

View File

@@ -1,20 +1,23 @@
<template>
<view :loading="loading">
<!-- <uni-nav-bar left-icon="left" right-icon="cart" title="标题" /> -->
<uni-nav-bar dark :fixed="true" status-bar left-icon="left" rightIcon="plusempty" background-color="#fff"
color="#111" title="项目管理" @clickLeft="back" @clickRight="add" />
<view class="message">
<view class="message-nav" @click="jump('system')">
<view class="message-nav" @click="jump('监测')">
<view class="message-nav-label">监测</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
<view class="message-nav" @click="jump('feedback')">
<view class="message-nav" @click="jump('治理')">
<view class="message-nav-label">治理</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
<view class="message-nav" @click="jump('report')">
<view class="message-nav" @click="jump('用能')">
<view class="message-nav-label">用能</view>
<uni-badge text="3"></uni-badge>
<!-- <uni-badge text="3"></uni-badge> -->
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
</view>
</view>
</template>
@@ -29,6 +32,14 @@ export default {
methods: {
init () {
},
back () {
uni.navigateBack()
},
add () {
uni.navigateTo({
url: `/pages/project/new`
})
},
upgrade (code) {
console.log(code);
uni.showToast({
@@ -38,8 +49,8 @@ export default {
},
jump (type) {
uni.navigateTo({
url: `/pages/device/list`
})
url: `/pages/project/detail?project=${type}`
})
}
},
onLoad () {
@@ -51,6 +62,7 @@ export default {
<style lang="scss">
.message {
padding-top: 20rpx;
.message-header {
padding: 200rpx 34rpx 34rpx;
display: flex;

102
pages/project/new.vue Normal file
View File

@@ -0,0 +1,102 @@
<template>
<Cn-page :loading='loading'>
<view slot='body'>
<view class='new'>
<view class="content">
<uni-forms :label-width="80">
<uni-forms-item label="项目名称">
<uni-easyinput type="number" v-model="formData.name" placeholder="请输入项目名称" />
</uni-forms-item>
<uni-forms-item label="区域">
<view style="display:flex;">
<uni-easyinput :clearable="false" type="textarea" autoHeight v-model="formData.address"
placeholder="请输入区域信息" />
<uni-icons type="location" color="#007aff" size="26" class="ml20"
@click="chooseLocation"></uni-icons>
</view>
</uni-forms-item>
<uni-forms-item label="描述">
<uni-easyinput type="textarea" v-model="formData.name" placeholder="请输入项目描述" />
</uni-forms-item>
<uni-file-picker title="请上传拓扑图" :sourceType="['album']"></uni-file-picker>
</uni-forms>
</view>
<view class="btn-wrap">
<view class="btn-wrap-item" @click="submit"> 提交 </view>
</view>
</view>
</view>
</Cn-page>
</template>
<script>
export default {
data () {
return {
loading: false,
formData: {
name: '',
gplot: ''
},
}
},
methods: {
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('项目创建成功')
setTimeout(() => {
uni.navigateBack({ delta: 1 })
}, 1500);
}
}
}
</script>
<style lang='scss'>
.new {
padding: 34rpx;
.content {
.content-des {
font-size: 28rpx;
color: #666;
margin-bottom: 20rpx;
}
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-drawer__content {
width: 100vw !important;
}
</style>

View File

@@ -8,11 +8,20 @@
mode="scaleToFill" />
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
<view class="mine-nav" @click="jump('changeName')" style="border-bottom: none; ">
<view class="mine-nav" @click="jump('changeName')" >
<view class="mine-nav-label">名字</view>
<view class="mine-nav-des">灿能电力</view>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
<view class="mine-nav" @click="jump('erweima')" style="border-bottom: none; ">
<view class="mine-nav-label">我的二维码</view>
<image
src="/static/erweima.png"
style="height: 50rpx;width: 50rpx;border-radius:12rpx"
mode="scaleToFill"
/>
<uni-icons type="forward" color="#aaa" size="20"></uni-icons>
</view>
</view>
</view>
</Cn-page>
@@ -39,10 +48,10 @@ export default {
</script>
<style lang='scss'>
.index {
padding: 34rpx;
padding: 20rpx;
.mine-nav {
padding: 34rpx;
padding: 34rpx;
display: flex;
align-items: center;
background: $uni-theme-white;

View File

@@ -31,11 +31,11 @@ export default {
</script>
<style lang='scss'>
.change-name {
padding: 34rpx;
padding: 34rpx;
.content {
margin-bottom: 20rpx;
padding: 34rpx;
padding: 34rpx;
background: $uni-theme-white;
border-radius: 12rpx;
}

View File

@@ -116,7 +116,7 @@ export default {
</script>
<style lang="scss">
.index {
padding: 34rpx;
padding: 20rpx;
.submit-btn {
background: $uni-theme-blue;

View File

@@ -106,7 +106,7 @@ export default {
</script>
<style lang="scss">
.index {
padding: 34rpx;
padding: 20rpx;
.submit-btn {
background: $uni-theme-blue;

25
pages/user/erweima.vue Normal file
View File

@@ -0,0 +1,25 @@
<template>
<Cn-page :loading='loading'>
<view slot='body'>
<view class='erweima'>
二维码
</view>
</view>
</Cn-page>
</template>
<script>
export default {
data () {
return {
loading: false
}
},
methods: {
}
}
</script>
<style lang='scss'>
.index {
padding: 20rpx;
}
</style>

View File

@@ -110,7 +110,7 @@ export default {
</script>
<style lang="scss">
.index {
padding: 34rpx;
padding: 20rpx;
.submit-btn {
background: $uni-theme-blue;

View File

@@ -118,7 +118,7 @@ export default {
</script>
<style lang="scss">
.index {
padding: 34rpx;
padding: 20rpx;
.submit-btn {
background: $uni-theme-blue;