页面切图
This commit is contained in:
@@ -3,7 +3,9 @@
|
||||
<view slot='body'>
|
||||
<view class='detail'>
|
||||
<view class="header">
|
||||
<view class="header-title">{{ project }}</view>
|
||||
<view class="header-title">{{ project }}
|
||||
<view class="header-title-extra">用能</view>
|
||||
</view>
|
||||
<view class="header-des">项目详情。。。。。。。。</view>
|
||||
</view>
|
||||
<view class="nav">
|
||||
@@ -13,8 +15,8 @@
|
||||
</view>
|
||||
<view class="content device" :style="{ minHeight: 'calc(100vh - ' + navHeight + 'px)' }">
|
||||
<view v-show="navMenuActive == 0">
|
||||
<uni-card title="用能设备" sub-title="设备" extra="APF" v-for="item in 2" :key="item" @click="goDevice"
|
||||
padding="0" thumbnail="/static/real_time_data.png">
|
||||
<uni-card :title="'设备' + item" :sub-title="project" extra="用能" v-for="item in 2" :key="item"
|
||||
@click="goDevice" padding="0" thumbnail="/static/device.png">
|
||||
</uni-card>
|
||||
</view>
|
||||
<view style="padding: 0 20rpx" v-show="navMenuActive == 1">
|
||||
@@ -36,7 +38,7 @@
|
||||
<uni-load-more status="nomore"></uni-load-more>
|
||||
</view>
|
||||
<uni-fab ref="fab" direction="vertical" horizontal="right" vertical="bottom" :content="content"
|
||||
@trigger="trigger" />
|
||||
@trigger="trigger" v-if="content.length" />
|
||||
<uni-popup ref="share" type="share" background-color="#fff">
|
||||
<uni-popup-share title="分享到"></uni-popup-share>
|
||||
</uni-popup>
|
||||
@@ -55,18 +57,21 @@ export default {
|
||||
}, {
|
||||
text: '子用户列表'
|
||||
}],
|
||||
content: [{
|
||||
iconPath: '/static/share.png',
|
||||
text: '分享',
|
||||
}],
|
||||
content: [],
|
||||
navHeight: 0,
|
||||
navMenuActive: 0
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
trigger () {
|
||||
trigger (e) {
|
||||
console.log(this.$refs);
|
||||
this.$refs.share.open()
|
||||
if (e.item.text == '移交') {
|
||||
uni.navigateTo({
|
||||
url: '/pages/project/transfer'
|
||||
})
|
||||
} else if (e.item.text == '分享') {
|
||||
this.$refs.share.open()
|
||||
}
|
||||
},
|
||||
navMenuClick (index) {
|
||||
this.navMenuActive = index
|
||||
@@ -99,6 +104,18 @@ export default {
|
||||
},
|
||||
onLoad (option) {
|
||||
this.project = option.project
|
||||
let userInfo = uni.getStorageSync('userInfo')
|
||||
if (userInfo.role == '3') {
|
||||
this.content.push({
|
||||
iconPath: '/static/transfer.png',
|
||||
text: '移交',
|
||||
})
|
||||
} else if (userInfo.role == '4') {
|
||||
this.content.push({
|
||||
iconPath: '/static/share.png',
|
||||
text: '分享',
|
||||
})
|
||||
}
|
||||
setTimeout(() => {
|
||||
// 获取nav高度
|
||||
uni.createSelectorQuery().select('.nav').boundingClientRect((rect) => {
|
||||
@@ -120,8 +137,17 @@ export default {
|
||||
padding: 20rpx 20rpx 0;
|
||||
|
||||
.header-title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 40rpx;
|
||||
margin-bottom: 10rpx;
|
||||
|
||||
.header-title-extra {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
padding-right: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.header-des {
|
||||
|
||||
Reference in New Issue
Block a user