ruleSet.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <template>
  2. <view class="container">
  3. <!-- 头部新增规则区域 -->
  4. <view class="add" @click="toPageAddRules">
  5. <view class="icon">
  6. <img src="./imgs/add.png">
  7. </view>
  8. <view class="title">
  9. 新增规则
  10. </view>
  11. </view>
  12. <!-- 具体规则区域 -->
  13. <view class="rules">
  14. <!-- 每一个规则区域 -->
  15. <view class="box" v-for="item in list" :key="item.id" @click="toPageEditRules(item)">
  16. <view class="box_title">
  17. <view class="icon">
  18. <img src="../../static/my1.png">
  19. </view>
  20. <view class="msg">
  21. {{item.ruleName}}
  22. </view>
  23. <view class="right">
  24. <img src="../../static/right.png">
  25. </view>
  26. </view>
  27. <view class="box_info">
  28. 考勤组:{{item.group}}
  29. </view>
  30. <view class="box_info">
  31. 时 间:{{item.time}}
  32. </view>
  33. <view class="box_info">
  34. 打卡地点:{{item.place}}
  35. </view>
  36. <view class="box_info">
  37. 提前通知:{{item.notes}}
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. export default {
  45. data() {
  46. return {
  47. list: [{
  48. id: 1,
  49. group: "全体老师",
  50. time: "周一、周二、周三、...,09:00-17:00",
  51. place: "新建区南昌交通学院",
  52. notes: "提前15分钟通知",
  53. ruleName:"课间操打卡规则"
  54. },
  55. {
  56. id: 2,
  57. group: "全体同学",
  58. time: "周一、周二、周三、...,09:00-17:00",
  59. place: "高新区南昌交通学院",
  60. notes: "提前10分钟通知",
  61. ruleName:"课间操打卡规则"
  62. },
  63. {
  64. id: 3,
  65. group: "全体老师同学",
  66. time: "周一、周二、周三、...,09:00-17:00",
  67. place: "红谷滩区南昌交通学院",
  68. notes: "提前5分钟通知",
  69. ruleName:"课间操打卡规则"
  70. },
  71. ]
  72. };
  73. },
  74. methods: {
  75. // 点击每一项跳转编辑规则页面
  76. toPageEditRules(item) {
  77. // console.log(item);
  78. let info = JSON.stringify(item)
  79. uni.navigateTo({
  80. url: `/pages/editRules/editRules?info=${info}`
  81. })
  82. },
  83. // 新增规则跳转页面回调
  84. toPageAddRules() {
  85. uni.navigateTo({
  86. url: "/pages/addRules/addRules"
  87. })
  88. }
  89. }
  90. }
  91. </script>
  92. <style lang="scss" scoped>
  93. .container {
  94. padding-top: 30rpx;
  95. .add {
  96. margin-bottom: 30rpx;
  97. display: flex;
  98. width: 750rpx;
  99. height: 110rpx;
  100. background-color: #fff;
  101. .icon {
  102. display: flex;
  103. justify-content: center;
  104. align-items: center;
  105. width: 88rpx;
  106. img {
  107. width: 50rpx;
  108. height: 50rpx;
  109. }
  110. }
  111. .title {
  112. line-height: 110rpx;
  113. font-size: 30rpx;
  114. font-weight: 400;
  115. color: #0082FC;
  116. }
  117. }
  118. .rules {
  119. width: 750rpx;
  120. .box {
  121. padding: 0 30rpx;
  122. margin-bottom: 20rpx;
  123. height: 348rpx;
  124. background-color: #fff;
  125. .box_title {
  126. display: flex;
  127. height: 90rpx;
  128. .icon {
  129. flex: 1;
  130. display: flex;
  131. justify-content: center;
  132. align-items: center;
  133. img {
  134. width: 35rpx;
  135. height: 35rpx;
  136. }
  137. }
  138. .msg {
  139. flex: 10;
  140. line-height: 90rpx;
  141. font-size: 30rpx;
  142. font-weight: 400;
  143. }
  144. .right {
  145. flex: 1;
  146. display: flex;
  147. justify-content: center;
  148. align-items: center;
  149. img {
  150. width: 16rpx;
  151. height: 25rpx;
  152. }
  153. }
  154. }
  155. .box_info {
  156. margin: 15rpx 0;
  157. height: 44rpx;
  158. font-size: 30rpx;
  159. font-weight: 400;
  160. color: #808080;
  161. }
  162. }
  163. }
  164. }
  165. </style>