116 lines
2.6 KiB
Vue
116 lines
2.6 KiB
Vue
<template>
|
|
<view class="work-container">
|
|
|
|
|
|
<!-- 宫格组件 -->
|
|
<uni-section title="统计分析" v-show="auth.hasPermi('health:person:list')" type="line"></uni-section>
|
|
<view class="grid-body">
|
|
<uni-grid :column="4" :showBorder="false">
|
|
<uni-grid-item v-for="(item, index) in healthGridList" :key="index" v-show="auth.hasPermi(item.permission)" @click="navigateTo(item.path)">
|
|
<view class="grid-item-box">
|
|
<uni-icons :type="item.icon" size="30"></uni-icons>
|
|
<text class="text">{{ item.text }}</text>
|
|
</view>
|
|
</uni-grid-item>
|
|
</uni-grid>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
<script setup>
|
|
import auth from "@/plugins/auth"; // 建议使用auth进行鉴权操作
|
|
|
|
// 也可以使用下面的方式
|
|
import { ref } from "vue";
|
|
|
|
const healthGridList=ref([
|
|
{ path: '/pages/health/statistic/healthStatistic/index', text: '档案统计', icon: 'map', permission: 'health:healthRecord:list' },
|
|
{ path: '/pages/health/statistic/doctorStatistic/index', text: '就医统计', icon: 'person', permission: 'health:doctorRecord:list' },
|
|
{ path: '/pages/health/statistic/marStatistic/index', text: '用药统计', icon: 'shop-filled', permission: 'health:marRecord:list' },
|
|
{ path: '/pages/health/statistic/temperatureStatistic/index', text: '体温统计', icon: 'spinner-cycle', permission: 'health:temperatureRecord:list' }
|
|
])
|
|
function navigateTo(path) {
|
|
uni.navigateTo({
|
|
url: path
|
|
});
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
/* #ifndef APP-NVUE */
|
|
page {
|
|
display: flex;
|
|
flex-direction: column;
|
|
box-sizing: border-box;
|
|
background-color: #fff;
|
|
min-height: 100%;
|
|
height: auto;
|
|
}
|
|
|
|
view {
|
|
font-size: 14px;
|
|
line-height: inherit;
|
|
}
|
|
|
|
/* #endif */
|
|
|
|
.text {
|
|
text-align: center;
|
|
font-size: 22rpx;
|
|
margin-top: 10rpx;
|
|
}
|
|
|
|
.grid-item-box {
|
|
flex: 1;
|
|
/* #ifndef APP-NVUE */
|
|
display: flex;
|
|
/* #endif */
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 15px 0;
|
|
}
|
|
|
|
.uni-margin-wrap {
|
|
width: 690rpx;
|
|
width: 100%;
|
|
;
|
|
}
|
|
|
|
.swiper {
|
|
height: 300rpx;
|
|
}
|
|
|
|
.swiper-box {
|
|
height: 150px;
|
|
}
|
|
|
|
.swiper-item {
|
|
/* #ifndef APP-NVUE */
|
|
display: flex;
|
|
/* #endif */
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
color: #fff;
|
|
height: 300rpx;
|
|
line-height: 300rpx;
|
|
}
|
|
|
|
@media screen and (min-width: 500px) {
|
|
.uni-swiper-dot-box {
|
|
width: 400px;
|
|
/* #ifndef APP-NVUE */
|
|
margin: 0 auto;
|
|
/* #endif */
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.image {
|
|
width: 100%;
|
|
}
|
|
}
|
|
</style>
|