question_detail.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <template>
  2. <view>
  3. <view class="top">
  4. <navigator url="/pages2/bank/question_statistics">
  5. <view class="left">
  6. <view class="title">做题统计</view>
  7. <view class="progress">
  8. <view class="item-left">
  9. <view class="desc">
  10. <text>总进度</text>
  11. </view>
  12. <view class="percent">
  13. 68
  14. <text class="per">%</text>
  15. </view>
  16. </view>
  17. <view class="item-right">
  18. <view class='up'>
  19. <text class="orange">58</text>
  20. <text>/100</text>
  21. </view>
  22. <view class='down'>
  23. <text class="orange">已答</text>
  24. <text>/未答</text>
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. </navigator>
  30. <view class="right">
  31. <view class="title">
  32. 错题集 >
  33. </view>
  34. <view class="number">
  35. 35
  36. </view>
  37. </view>
  38. <view class="right">
  39. <view class="title">
  40. 收藏集 >
  41. </view>
  42. <view class="number">
  43. 1
  44. </view>
  45. </view>
  46. </view>
  47. <view class="title-list">
  48. <view class="content">
  49. <view class="list" v-for="(item1,index) in outline">
  50. <view class="section" :data-index="index" @click="changeItem" :class="{up:!item1.showList}">
  51. 2Z106010 施工承发包的模式-2Z106020 施工合同...
  52. </view>
  53. <view class="article" v-if="item1.showList" :class="{active:index1 == 0}" v-for="(article,index1) in item1.list">
  54. 施工承发包模式-施工合同与物资采购合同二
  55. <navigator url="/pages2/bank/questionBank">
  56. <view v-if="index1 == 0" class="btn">做题</view>
  57. <view v-if="index1 == 1" class="btn">继续</view>
  58. <view v-if="index1 == 2" class="btn">重做</view>
  59. </navigator>
  60. </view>
  61. </view>
  62. </view>
  63. </view>
  64. </view>
  65. </template>
  66. <script>
  67. import { mapGetters } from 'vuex';
  68. export default {
  69. data() {
  70. return {
  71. outline:[{
  72. list:[1,2,3],
  73. showList:false,
  74. },{
  75. list:[1,2,3],
  76. showList:false,
  77. },{
  78. list:[1,2,3],
  79. showList:false,
  80. },{
  81. list:[1,2,3],
  82. showList:false,
  83. }]
  84. };
  85. },
  86. onUnload() {
  87. },
  88. computed: { ...mapGetters(['userInfo']) },
  89. onLoad(option) {
  90. },
  91. onShow() {
  92. },
  93. methods: {
  94. changeItem(e) {
  95. let index = e.currentTarget.dataset.index
  96. this.outline.forEach((arrItem,i) => {
  97. if(i == index) {
  98. arrItem.showList = !arrItem.showList
  99. }
  100. })
  101. }
  102. }
  103. };
  104. </script>
  105. <style >
  106. page{
  107. background-color: #EAEEF1;
  108. }
  109. </style>
  110. <style lang="scss" scope>
  111. .top {
  112. padding:16rpx 16rpx 0;
  113. display: flex;
  114. justify-content: space-between;
  115. .left {
  116. width: 326rpx;
  117. height: 180rpx;
  118. background: #FFFFFF;
  119. box-shadow: 0px 0px 16rpx 4rpx rgba(145, 156, 178, 0.1);
  120. border-radius: 16rpx;
  121. background:#fff;
  122. padding:20rpx;
  123. .title {
  124. font-size: 24rpx;
  125. line-height: 24rpx;
  126. color: #333333;
  127. }
  128. .progress {
  129. margin-top:10rpx;
  130. display: flex;
  131. .item-left {
  132. flex:1;
  133. border-right:1rpx solid #EEEEEE;
  134. .desc {
  135. text {
  136. line-height: 24rpx;
  137. font-size: 24rpx;
  138. color: #999999;
  139. }
  140. }
  141. .percent {
  142. margin-top:10rpx;
  143. line-height: 64rpx;
  144. font-size: 64rpx;
  145. font-weight: bold;
  146. color: #007AFF;
  147. }
  148. .per {
  149. font-size: 30rpx;
  150. color: #007AFF;
  151. }
  152. }
  153. .item-right {
  154. padding-left:10rpx;
  155. flex:1;
  156. text {
  157. line-height: 24rpx;
  158. font-size: 24rpx;
  159. color: #999999;
  160. }
  161. .orange {
  162. line-height: 24rpx;
  163. font-size: 24rpx;
  164. font-weight: bold;
  165. color: #FF9500;
  166. }
  167. .down {
  168. margin-top:40rpx;
  169. }
  170. }
  171. }
  172. }
  173. .right {
  174. width: 180rpx;
  175. height: 180rpx;
  176. background: #FFFFFF;
  177. box-shadow: 0px 0px 16rpx 4rpx rgba(145, 156, 178, 0.1);
  178. background:#fff;
  179. padding:20rpx;
  180. .title {
  181. font-size: 24rpx;
  182. line-height: 24rpx;
  183. color: #333333;
  184. }
  185. .number {
  186. font-weight: bold;
  187. text-align: center;
  188. margin-top:46rpx;
  189. font-size: 64rpx;
  190. line-height: 64rpx;
  191. color: #007AFF;
  192. }
  193. }
  194. }
  195. .title-list {
  196. background: #EAEEF1;
  197. padding:16rpx 16rpx 124rpx;
  198. .content {
  199. .list {
  200. background:#fff;
  201. margin-bottom:30rpx;
  202. overflow: hidden;
  203. border-radius: 16rpx;
  204. padding:10rpx 16rpx;
  205. .section {
  206. padding:30rpx 0;
  207. border-bottom: 1rpx solid #EEEEEE;
  208. font-size: 24rpx;
  209. color: #666666;
  210. &::before {
  211. content:'^';
  212. display: inline-block;
  213. margin-right:20rpx;
  214. }
  215. &.up {
  216. border:0;
  217. &::before {
  218. transform: rotate(180deg);
  219. }
  220. }
  221. }
  222. .article {
  223. height:80rpx;
  224. display: flex;
  225. align-items: center;
  226. margin-left:88rpx;
  227. font-size: 24rpx;
  228. color: #666666;
  229. border-bottom: 1rpx solid #EEEEEE;
  230. .btn {
  231. width: 96rpx;
  232. height: 48rpx;
  233. line-height: 48rpx;
  234. text-align: center;
  235. color:#fff;
  236. font-size: 30rpx;
  237. border-radius:24rpx;
  238. background: #007AFF;
  239. margin-left:36rpx;
  240. border-radius: 24rpx;
  241. }
  242. &:nth-last-of-type(1) {
  243. border:0;
  244. }
  245. &.active {
  246. color:#007AFF;
  247. }
  248. }
  249. }
  250. }
  251. }
  252. </style>