wrong.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  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. this.questionRecordList();
  61. },
  62. methods: {
  63. questionRecordList() {
  64. this.$api.questionRecordList({
  65. isRight:0,
  66. }).then(res => {
  67. console.log(res)
  68. })
  69. },
  70. showSceen(type){
  71. this.sceenType = type
  72. },
  73. hideSceen(){
  74. this.sceenType = null
  75. },
  76. choSceen(index,type){
  77. if(type==='tk'){
  78. this.scennList1.forEach((item,idx)=>{
  79. this.$set(item, 'checked',false)
  80. if(index===idx){
  81. this.$set(item, 'checked',true)
  82. }
  83. })
  84. }
  85. if(type==='sj'){
  86. this.scennList2.forEach((item,idx)=>{
  87. this.$set(item, 'checked',false)
  88. if(index===idx){
  89. this.$set(item, 'checked',true)
  90. }
  91. })
  92. }
  93. this.sceenType = null
  94. }
  95. }
  96. };
  97. </script>
  98. <style lang="scss">
  99. page {
  100. background: #EAEEF1;
  101. }
  102. </style>
  103. <style scoped lang="scss">
  104. .sceenBox {
  105. width:100%;
  106. height: 80rpx;
  107. background: #FFFFFF;
  108. display: flex;
  109. justify-content: center;
  110. align-items: center;
  111. font-size: 32rpx;
  112. font-family: PingFang SC;
  113. font-weight: 500;
  114. color: #999999;
  115. position: fixed;
  116. z-index: 999;
  117. border-bottom: 1px solid #eee;
  118. .item{
  119. flex:1;
  120. text-align: center;
  121. &.active{
  122. color:#333;
  123. font-weight: bold;
  124. .icon{
  125. transform: rotate(180deg);
  126. }
  127. }
  128. }
  129. }
  130. .sceenModel{
  131. width:100%;
  132. height:100%;
  133. position: fixed;
  134. z-index: 998;
  135. .sceenModelBg{
  136. width:100%;
  137. height:100%;
  138. position: fixed;
  139. background: rgba(0,0,0,.3);
  140. z-index: 998;
  141. }
  142. .sceenMain{
  143. position: relative;
  144. z-index: 999;
  145. background: #fff;
  146. margin-top: 80rpx;
  147. display: flex;
  148. flex-wrap: wrap;
  149. padding: 8rpx;
  150. justify-content: space-between;
  151. .item{
  152. width: 350rpx;
  153. background: #F5F5F5;
  154. border-radius: 16rpx;
  155. padding: 25rpx 19rpx;
  156. margin: 8rpx;
  157. font-size: 32rpx;
  158. font-family: PingFang SC;
  159. font-weight: bold;
  160. color: #666666;
  161. &.active{
  162. background: #007AFF;
  163. color:#fff;
  164. }
  165. &:first-child{
  166. width:100%;
  167. text-align: center;
  168. }
  169. }
  170. }
  171. }
  172. .wrap{
  173. padding:96rpx 16rpx 16rpx;
  174. }
  175. .wrongHead{
  176. background: #FFFFFF;
  177. border-radius: 16px;
  178. padding:24rpx;
  179. .title{
  180. font-size: 30rpx;
  181. font-family: PingFang SC;
  182. font-weight: bold;
  183. color: #333333;
  184. .sub{
  185. font-size: 20rpx;
  186. font-weight: 500;
  187. color: #999999;
  188. }
  189. }
  190. .progress{
  191. width: 180rpx;
  192. height: 180rpx;
  193. border: 20rpx solid #EEEEEE;
  194. border-radius: 50%;
  195. margin: 24rpx auto;
  196. }
  197. }
  198. .wrongTab{
  199. display: flex;
  200. margin: 24rpx 0;
  201. .item{
  202. width: 144rpx;
  203. height: 48rpx;
  204. line-height: 48rpx;
  205. text-align: center;
  206. background: #fff;
  207. border-radius: 16px;
  208. font-size: 28rpx;
  209. font-family: PingFang SC;
  210. font-weight: 500;
  211. color: #666666;
  212. margin-left: 15rpx;
  213. &.active{
  214. background: #007AFF;
  215. color: #fff;
  216. }
  217. }
  218. }
  219. .wrongList{
  220. .item{;
  221. background: #FFFFFF;
  222. border-radius: 16rpx;
  223. padding: 0 30rpx;
  224. margin-bottom: 16rpx;
  225. overflow: hidden;
  226. .title{
  227. font-size: 32rpx;
  228. font-family: PingFang SC;
  229. font-weight: bold;
  230. color: #333333;
  231. margin: 40rpx 0 17rpx;
  232. }
  233. .bt{
  234. display: flex;
  235. justify-content: space-between;
  236. align-items: center;
  237. padding-bottom: 24rpx;
  238. .left{
  239. width: 176rpx;
  240. height: 40rpx;
  241. background: #FFFFFF;
  242. border: 1px solid #EEEEEE;
  243. border-radius: 16rpx;
  244. font-size: 26rpx;
  245. font-family: PingFang SC;
  246. font-weight: 500;
  247. color: #999999;
  248. display: flex;
  249. justify-content: center;
  250. align-items: center;
  251. .num{
  252. font-size: 26rpx;
  253. font-weight: bold;
  254. color: #FF3B30;
  255. margin-left: 16rpx;
  256. }
  257. }
  258. .right{
  259. display: flex;
  260. .btn{
  261. width: 100rpx;
  262. height: 48rpx;
  263. background: #FFFFFF;
  264. border: 1px solid #007AFF;
  265. border-radius: 16px;
  266. font-size: 24rpx;
  267. font-family: PingFang SC;
  268. font-weight: 500;
  269. color: #007AFF;
  270. margin-left:9rpx;
  271. display: flex;
  272. align-items: center;
  273. justify-content: center;
  274. }
  275. }
  276. }
  277. }
  278. }
  279. </style>