labBinding.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <!-- 实验室绑定申请 -->
  2. <template>
  3. <view class="labBinding-component">
  4. <!-- <view class="card mob-admin-only" @click="goToApproval" hover-class="card-hover" hover-stay-time="100"> -->
  5. <view class="card mob-admin-only" @click="goToApproval">
  6. <view class="card-content">
  7. <view class="icon-box">🏛️</view>
  8. <view class="info-box">
  9. <view class="title">实验室绑定申请</view>
  10. <view class="subtitle">待审批申请需及时处理</view>
  11. </view>
  12. <view class="right-box">
  13. <text class="badge" v-if="pendingCount>0">{{ pendingCount }}</text>
  14. <text class="arrow">›</text>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </template>
  20. <script>
  21. import {
  22. examElLabEduRelationAuditList
  23. } from '@/pages_safetyEducationExamination/api/index.js'
  24. export default {
  25. data() {
  26. return {
  27. pendingCount: 0,
  28. }
  29. },
  30. mounted() {
  31. // this.loadPendingCount();
  32. },
  33. methods: {
  34. resetMethod(){
  35. this.loadPendingCount();
  36. },
  37. async loadPendingCount() {
  38. try {
  39. const { data } = await examElLabEduRelationAuditList({
  40. page: 1,
  41. pageSize: 1,
  42. statusCode:0,
  43. });
  44. if (data.code === 200) {
  45. this.pendingCount = data.data.total || 0;
  46. }
  47. } catch (e) {
  48. console.error('获取待审批数量失败', e);
  49. }
  50. },
  51. goToApproval() {
  52. uni.navigateTo({
  53. url: '/pages_safetyEducationExamination/views/approval/index'
  54. });
  55. },
  56. },
  57. }
  58. </script>
  59. <style lang="stylus" scoped>
  60. .labBinding-component {
  61. margin: 0 32rpx 24rpx;
  62. .card {
  63. background-color: #fff;
  64. border-radius: 24rpx;
  65. padding: 0;
  66. overflow: hidden;
  67. position: relative;
  68. box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.03);
  69. border: 1px solid #dde3ed;
  70. }
  71. .card-hover {
  72. background-color: #f5f5f5;
  73. }
  74. .card-content {
  75. display: flex;
  76. align-items: center;
  77. padding: 28rpx 32rpx;
  78. cursor: pointer;
  79. }
  80. .icon-box {
  81. width: 80rpx;
  82. height: 80rpx;
  83. border-radius: 20rpx;
  84. background: #e6f4ff;
  85. display: flex;
  86. align-items: center;
  87. justify-content: center;
  88. font-size: 40rpx;
  89. flex-shrink: 0;
  90. margin-right: 24rpx;
  91. }
  92. .info-box {
  93. flex: 1;
  94. .title {
  95. font-size: 28rpx;
  96. font-weight: 600;
  97. color: #333;
  98. }
  99. .subtitle {
  100. font-size: 24rpx;
  101. color: #999;
  102. margin-top: 4rpx;
  103. }
  104. }
  105. .right-box {
  106. display: flex;
  107. align-items: center;
  108. .badge {
  109. background: #ff4d4f;
  110. color: #fff;
  111. font-size: 22rpx;
  112. font-weight: 600;
  113. border-radius: 20rpx;
  114. min-width: 40rpx;
  115. text-align: center;
  116. margin-right: 12rpx;
  117. }
  118. .arrow {
  119. font-size: 32rpx;
  120. color: #999;
  121. }
  122. }
  123. }
  124. </style>