inspectionFunc.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <template>
  2. <!-- 巡查管护功能区 -->
  3. <view class="inspection-func-box">
  4. <view class="inspection-func-title">
  5. 巡查管护
  6. </view>
  7. <view class="inspection-func-items">
  8. <view class="inspection-func-item" v-for="(item,index) in inspectionFuncList" :key="index"
  9. @tap="handleClick(item)">
  10. <view class="icon">
  11. <image style="width: 120rpx; height: 120rpx" :src="`/static/images/index/${item.icon}.svg`"
  12. mode="scaleToFill"></image>
  13. </view>
  14. <view class="title">
  15. {{item.title}}
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </template>
  21. <script setup>
  22. const inspectionFuncList = [{
  23. title: "考勤打卡",
  24. icon: "考勤打卡",
  25. bgc: 0
  26. },
  27. {
  28. title: "巡检任务",
  29. icon: "巡检任务",
  30. bgc: 0
  31. },
  32. {
  33. title: "临时巡检",
  34. icon: "临时巡检",
  35. bgc: 0
  36. },
  37. {
  38. title: "备用发电",
  39. icon: "备用发电",
  40. bgc: 0
  41. },
  42. {
  43. title: "指标记录",
  44. icon: "指标记录",
  45. bgc: 0
  46. },
  47. {
  48. title: "工程检查",
  49. icon: "工程检查",
  50. bgc: 1
  51. },
  52. {
  53. title: "安全检查",
  54. icon: "安全检查",
  55. bgc: 1
  56. },
  57. {
  58. title: "河湖长巡河",
  59. icon: "河湖长巡河",
  60. bgc: 1
  61. },
  62. {
  63. title: "水库管理",
  64. icon: "水库管理",
  65. bgc: 1
  66. }
  67. ]
  68. const handleClick = (item) => {
  69. uni.switchTab({
  70. url: '/pages/map/index'
  71. })
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .inspection-func-box {
  76. margin-top: 24rpx;
  77. .inspection-func-title {
  78. font-family: Source Han Sans;
  79. font-size: 40rpx;
  80. font-weight: 500;
  81. font-feature-settings: "kern" on;
  82. color: $uni-text-color;
  83. margin-bottom: 16rpx;
  84. }
  85. .inspection-func-items {
  86. padding: 40rpx;
  87. border-radius: 24rpx;
  88. background: #FFFFFF;
  89. display: flex;
  90. flex-wrap: wrap;
  91. justify-content: space-between;
  92. .inspection-func-item {
  93. display: flex;
  94. flex-direction: column;
  95. margin-bottom: 40rpx;
  96. align-items: center;
  97. flex: 0 0 33%;
  98. &:nth-last-of-type(-n+3) {
  99. margin-bottom: 0;
  100. }
  101. .icon {
  102. width: 120rpx;
  103. height: 120rpx;
  104. }
  105. .title {
  106. font-family: Source Han Sans;
  107. font-size: 36rpx;
  108. font-weight: 500;
  109. font-feature-settings: "kern" on;
  110. color: $uni-text-color;
  111. }
  112. }
  113. }
  114. }
  115. </style>