wrong.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <view class="safeArea">
  3. <view class="sceenBox">
  4. <view :class="['item', {'active':sceenType===1} ]" @click="showSceen(1)">全部题库记录<u-icon class="icon" name="arrow-down"></u-icon></view>
  5. <view :class="['item', {'active':sceenType===2} ]" @click="showSceen(2)">全部试卷类型<u-icon class="icon" name="arrow-down"></u-icon></view>
  6. </view>
  7. <view class="sceenModel" v-if="sceenType">
  8. <view class="sceenModelBg" @click="hideSceen"></view>
  9. <view class="sceenMain">
  10. <template v-if="sceenType===1">
  11. <view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList1" :key="index" @click="choSceen(index,'tk')">{{item.name}}</view>
  12. </template>
  13. <template v-if="sceenType===2">
  14. <view :class="['item',{'active':item.checked}]" v-for="(item, index) in scennList2" :key="index" @click="choSceen(index,'sj')">{{item.name}}</view>
  15. </template>
  16. </view>
  17. </view>
  18. <view class="wrap">
  19. <view class="wrongHead">
  20. <view class="title">错题统计<text class="sub">(不含简答和案例题)</text></view>
  21. <view class="progress">
  22. </view>
  23. </view>
  24. <view class="wrongTab">
  25. <view class="item active">试卷归类</view>
  26. <view class="item">题型归类</view>
  27. </view>
  28. <view class="wrongList">
  29. <view class="item" v-for="(item,index) in 5" :key="index">
  30. <view class="title">试卷名称可换行我也不知道最多多少个字总之可以换行就对了</view>
  31. <view class="bt">
  32. <view class="left">错题数<text class="num">23</text></view>
  33. <view class="right">
  34. <view class="btn">重做</view>
  35. <view class="btn">解析</view>
  36. </view>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. </view>
  42. </template>
  43. <script>
  44. import { mapGetters } from 'vuex';
  45. export default {
  46. components: {},
  47. data() {
  48. return {
  49. sceenType: null,
  50. scennList1:[
  51. {id: 1, name: '全部题库记录', checked: true},{id: 1, name: '试卷名称可换行并完整显示'},{id: 1, name: '试卷名称可换行并完整显示'},{id: 1, name: '试卷名称可换行并完整显示'}
  52. ],
  53. scennList2:[
  54. {id: 1, name: '全部试卷类型', checked: true},{id: 1, name: '模拟卷'},{id: 1, name: '真题'},{id: 1, name: '练习'}
  55. ],
  56. };
  57. },
  58. onPullDownRefresh() {},
  59. onLoad(option) {},
  60. methods: {
  61. showSceen(type){
  62. this.sceenType = type
  63. },
  64. hideSceen(){
  65. this.sceenType = null
  66. },
  67. choSceen(index,type){
  68. if(type==='tk'){
  69. this.scennList1.forEach((item,idx)=>{
  70. this.$set(item, 'checked',false)
  71. if(index===idx){
  72. this.$set(item, 'checked',true)
  73. }
  74. })
  75. }
  76. if(type==='sj'){
  77. this.scennList2.forEach((item,idx)=>{
  78. this.$set(item, 'checked',false)
  79. if(index===idx){
  80. this.$set(item, 'checked',true)
  81. }
  82. })
  83. }
  84. this.sceenType = null
  85. }
  86. }
  87. };
  88. </script>
  89. <style lang="scss">
  90. page {
  91. background: #EAEEF1;
  92. }
  93. </style>
  94. <style scoped lang="scss">
  95. .sceenBox {
  96. width:100%;
  97. height: 80rpx;
  98. background: #FFFFFF;
  99. display: flex;
  100. justify-content: center;
  101. align-items: center;
  102. font-size: 32rpx;
  103. font-family: PingFang SC;
  104. font-weight: 500;
  105. color: #999999;
  106. position: fixed;
  107. z-index: 999;
  108. border-bottom: 1px solid #eee;
  109. .item{
  110. flex:1;
  111. text-align: center;
  112. &.active{
  113. color:#333;
  114. font-weight: bold;
  115. .icon{
  116. transform: rotate(180deg);
  117. }
  118. }
  119. }
  120. }
  121. .sceenModel{
  122. width:100%;
  123. height:100%;
  124. position: fixed;
  125. z-index: 998;
  126. .sceenModelBg{
  127. width:100%;
  128. height:100%;
  129. position: fixed;
  130. background: rgba(0,0,0,.3);
  131. z-index: 998;
  132. }
  133. .sceenMain{
  134. position: relative;
  135. z-index: 999;
  136. background: #fff;
  137. margin-top: 80rpx;
  138. display: flex;
  139. flex-wrap: wrap;
  140. padding: 8rpx;
  141. justify-content: space-between;
  142. .item{
  143. width: 350rpx;
  144. background: #F5F5F5;
  145. border-radius: 16rpx;
  146. padding: 25rpx 19rpx;
  147. margin: 8rpx;
  148. font-size: 32rpx;
  149. font-family: PingFang SC;
  150. font-weight: bold;
  151. color: #666666;
  152. &.active{
  153. background: #007AFF;
  154. color:#fff;
  155. }
  156. &:first-child{
  157. width:100%;
  158. text-align: center;
  159. }
  160. }
  161. }
  162. }
  163. .wrap{
  164. padding:96rpx 16rpx 16rpx;
  165. }
  166. .wrongHead{
  167. background: #FFFFFF;
  168. border-radius: 16px;
  169. padding:24rpx;
  170. .title{
  171. font-size: 30rpx;
  172. font-family: PingFang SC;
  173. font-weight: bold;
  174. color: #333333;
  175. .sub{
  176. font-size: 20rpx;
  177. font-weight: 500;
  178. color: #999999;
  179. }
  180. }
  181. .progress{
  182. width: 180rpx;
  183. height: 180rpx;
  184. border: 20rpx solid #EEEEEE;
  185. border-radius: 50%;
  186. margin: 24rpx auto;
  187. }
  188. }
  189. .wrongTab{
  190. display: flex;
  191. margin: 24rpx 0;
  192. .item{
  193. width: 144rpx;
  194. height: 48rpx;
  195. line-height: 48rpx;
  196. text-align: center;
  197. background: #fff;
  198. border-radius: 16px;
  199. font-size: 28rpx;
  200. font-family: PingFang SC;
  201. font-weight: 500;
  202. color: #666666;
  203. margin-left: 15rpx;
  204. &.active{
  205. background: #007AFF;
  206. color: #fff;
  207. }
  208. }
  209. }
  210. .wrongList{
  211. .item{;
  212. background: #FFFFFF;
  213. border-radius: 16rpx;
  214. padding: 0 30rpx;
  215. margin-bottom: 16rpx;
  216. overflow: hidden;
  217. .title{
  218. font-size: 32rpx;
  219. font-family: PingFang SC;
  220. font-weight: bold;
  221. color: #333333;
  222. margin: 40rpx 0 17rpx;
  223. }
  224. .bt{
  225. display: flex;
  226. justify-content: space-between;
  227. align-items: center;
  228. padding-bottom: 24rpx;
  229. .left{
  230. width: 176rpx;
  231. height: 40rpx;
  232. background: #FFFFFF;
  233. border: 1px solid #EEEEEE;
  234. border-radius: 16rpx;
  235. font-size: 26rpx;
  236. font-family: PingFang SC;
  237. font-weight: 500;
  238. color: #999999;
  239. display: flex;
  240. justify-content: center;
  241. align-items: center;
  242. .num{
  243. font-size: 26rpx;
  244. font-weight: bold;
  245. color: #FF3B30;
  246. margin-left: 16rpx;
  247. }
  248. }
  249. .right{
  250. display: flex;
  251. .btn{
  252. width: 100rpx;
  253. height: 48rpx;
  254. background: #FFFFFF;
  255. border: 1px solid #007AFF;
  256. border-radius: 16px;
  257. font-size: 24rpx;
  258. font-family: PingFang SC;
  259. font-weight: 500;
  260. color: #007AFF;
  261. margin-left:9rpx;
  262. display: flex;
  263. align-items: center;
  264. justify-content: center;
  265. }
  266. }
  267. }
  268. }
  269. }
  270. </style>