|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view>
|
|
|
|
|
<view :style="{ paddingTop: top + 'px' }">
|
|
|
|
|
<!-- //导航栏 -->
|
|
|
|
|
<u-navbar bgColor="#ffffff" :placeholder="true" titleStyle="font-weight:600" title="重大危险源" :autoBack="true">
|
|
|
|
|
|
|
|
|
@ -16,7 +16,7 @@
|
|
|
|
|
</u-sticky> -->
|
|
|
|
|
<!-- <swiper :current="tabIndex" @change="tabChange" style="height: calc(100vh - 176rpx);margin-top: 10rpx;">
|
|
|
|
|
<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="head">
|
|
|
|
@ -144,33 +144,15 @@
|
|
|
|
|
beianStatusList: [], //是否备案字典数组
|
|
|
|
|
countList: [], //数量数组
|
|
|
|
|
// 导航栏高度(动态计算)
|
|
|
|
|
navbarHeight: 0,
|
|
|
|
|
// web-view 的高度(动态计算)
|
|
|
|
|
webViewHeight: 0,
|
|
|
|
|
top: 0,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
this.getDict();
|
|
|
|
|
this.setNavbarHeight()
|
|
|
|
|
this.top = uni.getSystemInfoSync().safeAreaInsets.top
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
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) {
|
|
|
|
|
uni.downloadFile({
|
|
|
|
|