| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- <!-- 实验室绑定申请 -->
- <template>
- <view class="labBinding-component">
- <!-- <view class="card mob-admin-only" @click="goToApproval" hover-class="card-hover" hover-stay-time="100"> -->
- <view class="card mob-admin-only" @click="goToApproval">
- <view class="card-content">
- <view class="icon-box">🏛️</view>
- <view class="info-box">
- <view class="title">实验室绑定申请</view>
- <view class="subtitle">待审批申请需及时处理</view>
- </view>
- <view class="right-box">
- <text class="badge" v-if="pendingCount>0">{{ pendingCount }}</text>
- <text class="arrow">›</text>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- examElLabEduRelationAuditList
- } from '@/pages_safetyEducationExamination/api/index.js'
- export default {
- data() {
- return {
- pendingCount: 0,
- }
- },
- mounted() {
- // this.loadPendingCount();
- },
- methods: {
- resetMethod(){
- this.loadPendingCount();
- },
- async loadPendingCount() {
- try {
- const { data } = await examElLabEduRelationAuditList({
- page: 1,
- pageSize: 1,
- statusCode:0,
- });
- if (data.code === 200) {
- this.pendingCount = data.data.total || 0;
- }
- } catch (e) {
- console.error('获取待审批数量失败', e);
- }
- },
- goToApproval() {
- uni.navigateTo({
- url: '/pages_safetyEducationExamination/views/approval/index'
- });
- },
- },
- }
- </script>
- <style lang="stylus" scoped>
- .labBinding-component {
- margin: 0 32rpx 24rpx;
- .card {
- background-color: #fff;
- border-radius: 24rpx;
- padding: 0;
- overflow: hidden;
- position: relative;
- box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.03);
- border: 1px solid #dde3ed;
- }
- .card-hover {
- background-color: #f5f5f5;
- }
- .card-content {
- display: flex;
- align-items: center;
- padding: 28rpx 32rpx;
- cursor: pointer;
- }
- .icon-box {
- width: 80rpx;
- height: 80rpx;
- border-radius: 20rpx;
- background: #e6f4ff;
- display: flex;
- align-items: center;
- justify-content: center;
- font-size: 40rpx;
- flex-shrink: 0;
- margin-right: 24rpx;
- }
- .info-box {
- flex: 1;
- .title {
- font-size: 28rpx;
- font-weight: 600;
- color: #333;
- }
- .subtitle {
- font-size: 24rpx;
- color: #999;
- margin-top: 4rpx;
- }
- }
- .right-box {
- display: flex;
- align-items: center;
- .badge {
- background: #ff4d4f;
- color: #fff;
- font-size: 22rpx;
- font-weight: 600;
- border-radius: 20rpx;
- min-width: 40rpx;
- text-align: center;
- margin-right: 12rpx;
- }
- .arrow {
- font-size: 32rpx;
- color: #999;
- }
- }
- }
- </style>
|