Ldy20010130 2 months ago
parent 90cef735f6
commit 9f2cd0796d

@ -1,5 +1,5 @@
<template> <template>
<view> <view :style="{ paddingTop: top + 'px' }">
<!-- // --> <!-- // -->
<u-navbar bgColor="#ffffff" :placeholder="true" titleStyle="font-weight:600" title="重大危险源" :autoBack="true"> <u-navbar bgColor="#ffffff" :placeholder="true" titleStyle="font-weight:600" title="重大危险源" :autoBack="true">
@ -16,7 +16,7 @@
</u-sticky> --> </u-sticky> -->
<!-- <swiper :current="tabIndex" @change="tabChange" style="height: calc(100vh - 176rpx);margin-top: 10rpx;"> <!-- <swiper :current="tabIndex" @change="tabChange" style="height: calc(100vh - 176rpx);margin-top: 10rpx;">
<swiper-item> --> <swiper-item> -->
<view class="content" :style="{ top: navbarHeight + 'px', height: webViewHeight + 'px' }"> <view class="content">
<!-- 危险源统计 --> <!-- 危险源统计 -->
<view class="tongji" v-for="(item,index) in countList" :key="index"> <view class="tongji" v-for="(item,index) in countList" :key="index">
<view class="head"> <view class="head">
@ -144,33 +144,15 @@
beianStatusList: [], // beianStatusList: [], //
countList: [], // countList: [], //
// //
navbarHeight: 0, top: 0,
// web-view
webViewHeight: 0,
}; };
}, },
mounted() { mounted() {
this.getDict(); this.getDict();
this.setNavbarHeight() this.top = uni.getSystemInfoSync().safeAreaInsets.top
}, },
methods: { methods: {
setNavbarHeight() {
//
const systemInfo = uni.getSystemInfoSync();
//
const statusBarHeight = systemInfo.statusBarHeight;
// 44px
const customNavbarHeight = 44;
//
this.navbarHeight = statusBarHeight + customNavbarHeight;
// web-view
this.webViewHeight = systemInfo.windowHeight - this.navbarHeight;
},
// //
prefile(e) { prefile(e) {
uni.downloadFile({ uni.downloadFile({

Loading…
Cancel
Save