@focus-teach/ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (286) hide show
  1. package/.browserslistrc +2 -0
  2. package/.history/package_20230625121458.json +45 -0
  3. package/.history/package_20230626100440.json +45 -0
  4. package/.history/package_20230626100445.json +45 -0
  5. package/.history/package_20230626100447.json +45 -0
  6. package/.history/package_20230626100636.json +45 -0
  7. package/.history/package_20230626100801.json +45 -0
  8. package/.history/package_20230626100803.json +45 -0
  9. package/.history/package_20230626100838.json +45 -0
  10. package/.history/package_20230626103314.json +45 -0
  11. package/.history/package_20230626103317.json +45 -0
  12. package/.history/packages/assets/css/reset-element_20230605134721.scss +167 -0
  13. package/.history/packages/assets/css/reset-element_20230614205652.scss +173 -0
  14. package/.history/packages/assets/css/reset-element_20230614205654.scss +173 -0
  15. package/.history/packages/assets/css/reset-element_20230614211242.scss +169 -0
  16. package/.history/packages/assets/css/reset-element_20230614211245.scss +167 -0
  17. package/.history/packages/exam-detail/src/index_20230607220441.vue +548 -0
  18. package/.history/packages/exam-detail/src/index_20230613115618.vue +548 -0
  19. package/.history/packages/exam-detail/src/index_20230613115623.vue +548 -0
  20. package/.history/packages/exam-detail/src/index_20230613115629.vue +548 -0
  21. package/.history/packages/exam-detail/src/index_20230613115631.vue +548 -0
  22. package/.history/packages/exam-detail/src/index_20230613115640.vue +548 -0
  23. package/.history/packages/exam-detail/src/index_20230613115651.vue +548 -0
  24. package/.history/packages/exam-detail/src/index_20230613115659.vue +548 -0
  25. package/.history/packages/exam-detail/src/index_20230613115750.vue +548 -0
  26. package/.history/packages/exam-detail/src/index_20230613115806.vue +548 -0
  27. package/.history/packages/exam-detail/src/index_20230613115811.vue +548 -0
  28. package/.history/packages/exam-detail/src/index_20230613115815.vue +548 -0
  29. package/.history/packages/exam-detail/src/index_20230613120250.vue +548 -0
  30. package/.history/packages/exam-detail/src/index_20230613120252.vue +548 -0
  31. package/.history/packages/exam-detail/src/index_20230613120257.vue +547 -0
  32. package/.history/packages/exam-detail/src/index_20230613120323.vue +547 -0
  33. package/.history/packages/exam-detail/src/index_20230613120327.vue +547 -0
  34. package/.history/packages/exam-detail/src/index_20230613120328.vue +547 -0
  35. package/.history/packages/exam-detail/src/index_20230613120915.vue +548 -0
  36. package/.history/packages/exam-detail/src/index_20230613120917.vue +548 -0
  37. package/.history/packages/exam-detail/src/index_20230613120922.vue +549 -0
  38. package/.history/packages/exam-detail/src/index_20230613120924.vue +549 -0
  39. package/.history/packages/exam-detail/src/index_20230613120928.vue +550 -0
  40. package/.history/packages/exam-detail/src/index_20230613120930.vue +550 -0
  41. package/.history/packages/exam-detail/src/index_20230613120936.vue +549 -0
  42. package/.history/packages/exam-detail/src/index_20230613120938.vue +550 -0
  43. package/.history/packages/exam-detail/src/index_20230613120942.vue +550 -0
  44. package/.history/packages/exam-detail/src/index_20230613120944.vue +550 -0
  45. package/.history/packages/exam-detail/src/index_20230613121331.vue +549 -0
  46. package/.history/packages/exam-detail/src/index_20230613121333.vue +548 -0
  47. package/.history/packages/exam-detail/src/index_20230613121335.vue +547 -0
  48. package/.history/packages/exam-detail/src/index_20230613121341.vue +547 -0
  49. package/.history/packages/exam-detail/src/index_20230613121344.vue +546 -0
  50. package/.history/packages/exam-detail/src/index_20230613153022.vue +546 -0
  51. package/.history/packages/exam-detail/src/index_20230613153027.vue +546 -0
  52. package/.history/packages/exam-detail/src/index_20230613153620.vue +546 -0
  53. package/.history/packages/exam-detail/src/index_20230613164734.vue +546 -0
  54. package/.history/packages/exam-detail/src/index_20230613164746.vue +546 -0
  55. package/.history/packages/exam-detail/src/index_20230613164756.vue +546 -0
  56. package/.history/packages/exam-drawer/src/index_20230607103301.vue +1470 -0
  57. package/.history/packages/exam-drawer/src/index_20230613090746.vue +1469 -0
  58. package/.history/packages/exam-drawer/src/index_20230613090759.vue +1469 -0
  59. package/.history/packages/exam-drawer/src/index_20230613090802.vue +1469 -0
  60. package/.history/packages/exam-drawer/src/index_20230613090809.vue +1469 -0
  61. package/.history/packages/exam-drawer/src/index_20230613090850.vue +1470 -0
  62. package/.history/packages/exam-drawer/src/index_20230613090919.vue +1487 -0
  63. package/.history/packages/exam-drawer/src/index_20230613090930.vue +1486 -0
  64. package/.history/packages/exam-drawer/src/index_20230613090935.vue +1485 -0
  65. package/.history/packages/exam-drawer/src/index_20230613091124.vue +1488 -0
  66. package/.history/packages/exam-drawer/src/index_20230613091140.vue +1488 -0
  67. package/.history/packages/exam-drawer/src/index_20230613091141.vue +1488 -0
  68. package/.history/packages/exam-drawer/src/index_20230613092108.vue +1489 -0
  69. package/.history/packages/exam-drawer/src/index_20230613092111.vue +1489 -0
  70. package/.history/packages/exam-drawer/src/index_20230613093130.vue +1490 -0
  71. package/.history/packages/exam-drawer/src/index_20230613093135.vue +1489 -0
  72. package/.history/packages/exam-drawer/src/index_20230613093149.vue +1488 -0
  73. package/.history/packages/exam-drawer/src/index_20230613093156.vue +1487 -0
  74. package/.history/packages/exam-drawer/src/index_20230613093159.vue +1486 -0
  75. package/.history/packages/exam-drawer/src/index_20230613093202.vue +1485 -0
  76. package/.history/packages/exam-drawer/src/index_20230613093204.vue +1484 -0
  77. package/.history/packages/exam-drawer/src/index_20230613093207.vue +1483 -0
  78. package/.history/packages/exam-drawer/src/index_20230613093209.vue +1482 -0
  79. package/.history/packages/exam-drawer/src/index_20230613093212.vue +1483 -0
  80. package/.history/packages/exam-drawer/src/index_20230613093217.vue +1483 -0
  81. package/.history/packages/exam-drawer/src/index_20230613093228.vue +1483 -0
  82. package/.history/packages/exam-drawer/src/index_20230613093229.vue +1483 -0
  83. package/.history/packages/exam-drawer/src/index_20230613093843.vue +1482 -0
  84. package/.history/packages/exam-drawer/src/index_20230613093847.vue +1481 -0
  85. package/.history/packages/exam-drawer/src/index_20230613093851.vue +1480 -0
  86. package/.history/packages/exam-drawer/src/index_20230613115708.vue +1480 -0
  87. package/.history/packages/exam-drawer/src/index_20230613115823.vue +1480 -0
  88. package/.history/packages/exam-drawer/src/index_20230613115825.vue +1480 -0
  89. package/.history/packages/exam-drawer/src/index_20230613115827.vue +1480 -0
  90. package/.history/packages/exam-drawer/src/index_20230613120908.vue +1481 -0
  91. package/.history/packages/exam-drawer/src/index_20230613120910.vue +1481 -0
  92. package/.history/packages/exam-drawer/src/index_20230613121320.vue +1480 -0
  93. package/.history/packages/exam-drawer/src/index_20230613121326.vue +1480 -0
  94. package/.history/packages/exam-drawer/src/index_20230613144244.vue +1479 -0
  95. package/.history/packages/exam-drawer/src/index_20230613144246.vue +1478 -0
  96. package/.history/packages/exam-drawer/src/index_20230613144248.vue +1477 -0
  97. package/.history/packages/exam-drawer/src/index_20230613144251.vue +1476 -0
  98. package/.history/packages/exam-drawer/src/index_20230613152608.vue +1476 -0
  99. package/.history/packages/header/src/index_20230605134719.vue +59 -0
  100. package/.history/packages/header/src/index_20230613115723.vue +59 -0
  101. package/.history/packages/header/src/index_20230613115727.vue +59 -0
  102. package/.history/packages/header/src/index_20230613115733.vue +59 -0
  103. package/.history/packages/header/src/index_20230613115736.vue +59 -0
  104. package/.history/packages/header/src/index_20230613120901.vue +60 -0
  105. package/.history/packages/header/src/index_20230613120903.vue +60 -0
  106. package/.history/packages/header/src/index_20230613121316.vue +59 -0
  107. package/.history/packages/question-drawer/src/index_20230607160653.vue +1735 -0
  108. package/.history/packages/question-drawer/src/index_20230607160720.scss +265 -0
  109. package/.history/packages/question-drawer/src/index_20230613090910.vue +1735 -0
  110. package/.history/packages/question-drawer/src/index_20230613090928.vue +1734 -0
  111. package/.history/packages/question-drawer/src/index_20230613090937.vue +1733 -0
  112. package/.history/packages/question-drawer/src/index_20230613115842.vue +1733 -0
  113. package/.history/packages/question-drawer/src/index_20230613115844.vue +1733 -0
  114. package/.history/packages/question-drawer/src/index_20230613115848.vue +1733 -0
  115. package/.history/packages/question-drawer/src/index_20230613115902.vue +1733 -0
  116. package/.history/packages/question-drawer/src/index_20230613115911.vue +1733 -0
  117. package/.history/packages/question-drawer/src/index_20230613115914.vue +1733 -0
  118. package/.history/packages/question-drawer/src/index_20230613115922.vue +1733 -0
  119. package/.history/packages/question-drawer/src/index_20230613120356.vue +1733 -0
  120. package/.history/packages/question-drawer/src/index_20230613120359.vue +1732 -0
  121. package/.history/packages/question-drawer/src/index_20230613120710.vue +1731 -0
  122. package/.history/packages/question-drawer/src/index_20230613120839.vue +1732 -0
  123. package/.history/packages/question-drawer/src/index_20230613120841.vue +1732 -0
  124. package/.history/packages/question-drawer/src/index_20230613120844.vue +1733 -0
  125. package/.history/packages/question-drawer/src/index_20230613120846.vue +1733 -0
  126. package/.history/packages/question-drawer/src/index_20230613120850.vue +1734 -0
  127. package/.history/packages/question-drawer/src/index_20230613120852.vue +1734 -0
  128. package/.history/packages/question-drawer/src/index_20230613120856.vue +1735 -0
  129. package/.history/packages/question-drawer/src/index_20230613120858.vue +1735 -0
  130. package/.history/packages/question-drawer/src/index_20230613121150.vue +1735 -0
  131. package/.history/packages/question-drawer/src/index_20230613121238.vue +1734 -0
  132. package/.history/packages/question-drawer/src/index_20230613121252.vue +1734 -0
  133. package/.history/packages/question-drawer/src/index_20230613121256.vue +1734 -0
  134. package/.history/packages/question-drawer/src/index_20230613121258.vue +1733 -0
  135. package/.history/packages/question-drawer/src/index_20230613121303.vue +1733 -0
  136. package/.history/packages/question-drawer/src/index_20230613121307.vue +1733 -0
  137. package/.history/packages/question-drawer/src/index_20230613121310.vue +1732 -0
  138. package/.history/packages/question-drawer/src/index_20230613121313.vue +1731 -0
  139. package/.history/packages/question-drawer/src/index_20230613121549.vue +1731 -0
  140. package/.history/packages/question-drawer/src/index_20230613121623.vue +1731 -0
  141. package/.history/packages/question-drawer/src/index_20230613151515.vue +1730 -0
  142. package/.history/packages/question-drawer/src/index_20230613151517.vue +1729 -0
  143. package/.history/packages/question-drawer/src/index_20230613151612.vue +1729 -0
  144. package/.history/packages/question-drawer/src/index_20230613151618.vue +1729 -0
  145. package/.history/packages/question-drawer/src/index_20230613151928.vue +1729 -0
  146. package/.history/packages/question-drawer/src/index_20230613151929.vue +1729 -0
  147. package/.history/packages/question-drawer/src/index_20230613152233.vue +1728 -0
  148. package/.history/packages/question-drawer/src/index_20230613152235.vue +1727 -0
  149. package/.history/packages/question-drawer/src/index_20230613152237.vue +1726 -0
  150. package/.history/packages/question-drawer/src/index_20230613152239.vue +1726 -0
  151. package/.history/packages/question-drawer/src/index_20230613152243.vue +1725 -0
  152. package/.history/packages/question-drawer/src/index_20230613152245.vue +1724 -0
  153. package/.history/packages/question-drawer/src/index_20230613152247.vue +1723 -0
  154. package/.history/packages/question-drawer/src/index_20230613152248.vue +1723 -0
  155. package/.history/packages/question-drawer/src/index_20230613152543.vue +1723 -0
  156. package/.history/packages/question-drawer/src/index_20230613152613.vue +1723 -0
  157. package/.history/packages/question-drawer/src/index_20230614203619.vue +1725 -0
  158. package/.history/packages/question-drawer/src/index_20230614203633.vue +1729 -0
  159. package/.history/packages/question-drawer/src/index_20230614203637.vue +1729 -0
  160. package/.history/packages/question-drawer/src/index_20230614203912.vue +1729 -0
  161. package/.history/packages/question-drawer/src/index_20230614211516.scss +270 -0
  162. package/.history/packages/question-drawer/src/index_20230614212057.scss +265 -0
  163. package/.history/packages/question-drawer/src/index_20230614212140.scss +270 -0
  164. package/.history/packages/question-drawer/src/index_20230614212146.scss +270 -0
  165. package/.history/packages/question-drawer/src/index_20230614212158.scss +270 -0
  166. package/.history/packages/question-drawer/src/index_20230614212613.scss +270 -0
  167. package/.history/packages/question-drawer/src/index_20230614212615.scss +270 -0
  168. package/.history/packages/question-drawer/src/index_20230614212841.scss +270 -0
  169. package/.history/packages/question-drawer/src/index_20230614212939.scss +270 -0
  170. package/.history/packages/question-drawer/src/index_20230614213141.scss +270 -0
  171. package/.history/packages/question-drawer/src/index_20230614213255.scss +270 -0
  172. package/.history/packages/question-drawer/src/index_20230614213349.scss +265 -0
  173. package/.history/packages/question-drawer/src/index_20230614213350.scss +265 -0
  174. package/.history/packages/question-drawer/src/index_20230614213400.scss +265 -0
  175. package/.history/packages/question-drawer/src/index_20230614213401.scss +270 -0
  176. package/.history/packages/question-drawer/src/index_20230614213431.scss +265 -0
  177. package/.history/packages/question-drawer/src/index_20230615100944.vue +1730 -0
  178. package/.history/packages/question-drawer/src/index_20230615100946.vue +1730 -0
  179. package/.history/packages/question-drawer/src/index_20230615100952.vue +1730 -0
  180. package/.history/packages/question-drawer/src/index_20230615100957.vue +1730 -0
  181. package/.history/packages/question-drawer/src/index_20230615104839.vue +1730 -0
  182. package/.history/packages/tabs/src/index_20230607165331.scss +60 -0
  183. package/.history/packages/tabs/src/index_20230614211226.scss +60 -0
  184. package/.history/packages/tabs/src/index_20230614211227.scss +61 -0
  185. package/.history/packages/tabs/src/index_20230614211253.scss +65 -0
  186. package/.history/packages/tabs/src/index_20230614211332.scss +60 -0
  187. package/.history/packages/wrong-detail/src/index_20230607221202.vue +570 -0
  188. package/.history/packages/wrong-detail/src/index_20230613120416.vue +570 -0
  189. package/.history/packages/wrong-detail/src/index_20230613120418.vue +569 -0
  190. package/.history/packages/wrong-detail/src/index_20230613120738.vue +568 -0
  191. package/.history/packages/wrong-detail/src/index_20230613120800.vue +568 -0
  192. package/.history/packages/wrong-detail/src/index_20230613120803.vue +568 -0
  193. package/.history/packages/wrong-detail/src/index_20230613120825.vue +568 -0
  194. package/.history/packages/wrong-detail/src/index_20230613120834.vue +569 -0
  195. package/.history/packages/wrong-detail/src/index_20230613121246.vue +568 -0
  196. package/.history/packages/wrong-detail/src/index_20230613155421.vue +574 -0
  197. package/.history/packages/wrong-detail/src/index_20230613155423.vue +574 -0
  198. package/.history/packages/wrong-detail/src/index_20230613155426.vue +574 -0
  199. package/.history/packages/wrong-drawer/src/index_20230607213124.vue +450 -0
  200. package/.history/packages/wrong-drawer/src/index_20230613104307.vue +450 -0
  201. package/.history/packages/wrong-drawer/src/index_20230613104315.vue +451 -0
  202. package/.history/packages/wrong-drawer/src/index_20230613104317.vue +451 -0
  203. package/.history/packages/wrong-drawer/src/index_20230613104334.vue +451 -0
  204. package/.history/packages/wrong-drawer/src/index_20230613104403.vue +450 -0
  205. package/.history/packages/wrong-drawer/src/index_20230613104405.vue +449 -0
  206. package/.history/packages/wrong-drawer/src/index_20230613104621.vue +458 -0
  207. package/.history/packages/wrong-drawer/src/index_20230613104626.vue +459 -0
  208. package/.history/packages/wrong-drawer/src/index_20230613104629.vue +457 -0
  209. package/.history/packages/wrong-drawer/src/index_20230613104630.vue +457 -0
  210. package/.history/packages/wrong-drawer/src/index_20230613104747.vue +464 -0
  211. package/.history/packages/wrong-drawer/src/index_20230613104749.vue +464 -0
  212. package/.history/packages/wrong-drawer/src/index_20230613104753.vue +464 -0
  213. package/.history/packages/wrong-drawer/src/index_20230613111237.vue +464 -0
  214. package/.history/packages/wrong-drawer/src/index_20230613111314.vue +464 -0
  215. package/.history/packages/wrong-drawer/src/index_20230613114319.vue +464 -0
  216. package/.history/packages/wrong-drawer/src/index_20230613114322.vue +464 -0
  217. package/.history/packages/wrong-drawer/src/index_20230613114901.vue +463 -0
  218. package/.history/packages/wrong-drawer/src/index_20230613114903.vue +462 -0
  219. package/.history/packages/wrong-drawer/src/index_20230613114904.vue +462 -0
  220. package/.history/packages/wrong-drawer/src/index_20230613114909.vue +462 -0
  221. package/.history/packages/wrong-drawer/src/index_20230613114936.vue +463 -0
  222. package/.history/packages/wrong-drawer/src/index_20230613114940.vue +463 -0
  223. package/.history/packages/wrong-drawer/src/index_20230613114942.vue +463 -0
  224. package/.history/packages/wrong-drawer/src/index_20230613115348.vue +487 -0
  225. package/.history/packages/wrong-drawer/src/index_20230613115352.vue +487 -0
  226. package/.history/packages/wrong-drawer/src/index_20230613115356.vue +487 -0
  227. package/.history/packages/wrong-drawer/src/index_20230613115408.vue +500 -0
  228. package/.history/packages/wrong-drawer/src/index_20230613115411.vue +500 -0
  229. package/.history/packages/wrong-drawer/src/index_20230613115414.vue +500 -0
  230. package/.history/packages/wrong-drawer/src/index_20230613144213.vue +499 -0
  231. package/.history/packages/wrong-drawer/src/index_20230613144215.vue +498 -0
  232. package/.history/packages/wrong-drawer/src/index_20230613144218.vue +497 -0
  233. package/.history/packages/wrong-drawer/src/index_20230613144223.vue +497 -0
  234. package/.history/packages/wrong-drawer/src/index_20230613144225.vue +497 -0
  235. package/.history/packages/wrong-drawer/src/index_20230613144229.vue +498 -0
  236. package/.history/packages/wrong-drawer/src/index_20230613144232.vue +498 -0
  237. package/.history/packages/wrong-drawer/src/index_20230613144316.vue +500 -0
  238. package/.history/packages/wrong-drawer/src/index_20230613144345.vue +500 -0
  239. package/.history/packages/wrong-drawer/src/index_20230613144346.vue +500 -0
  240. package/.history/packages/wrong-drawer/src/index_20230613145546.vue +498 -0
  241. package/.history/packages/wrong-drawer/src/index_20230613145548.vue +501 -0
  242. package/.history/packages/wrong-drawer/src/index_20230613145550.vue +500 -0
  243. package/.history/packages/wrong-drawer/src/index_20230613145602.vue +500 -0
  244. package/.history/packages/wrong-drawer/src/index_20230613145611.vue +500 -0
  245. package/.history/packages/wrong-drawer/src/index_20230613145625.vue +500 -0
  246. package/.history/packages/wrong-drawer/src/index_20230613145634.vue +500 -0
  247. package/.history/packages/wrong-drawer/src/index_20230613150805.vue +500 -0
  248. package/.history/packages/wrong-drawer/src/index_20230613150806.vue +501 -0
  249. package/.history/packages/wrong-drawer/src/index_20230613150809.vue +501 -0
  250. package/.history/packages/wrong-drawer/src/index_20230613150810.vue +501 -0
  251. package/README.md +14 -0
  252. package/api/index.js +388 -0
  253. package/dist/@focus-teach/ui.common.js +93058 -0
  254. package/dist/@focus-teach/ui.css +1 -0
  255. package/dist/@focus-teach/ui.umd.js +93068 -0
  256. package/dist/@focus-teach/ui.umd.min.js +25 -0
  257. package/dist/demo.html +10 -0
  258. package/dist/fonts/icomoon.356dc15f.woff +0 -0
  259. package/dist/fonts/icomoon.71d64f31.woff +0 -0
  260. package/dist/fonts/icomoon.7c9a60d9.eot +0 -0
  261. package/dist/fonts/icomoon.ba18ad87.eot +0 -0
  262. package/dist/fonts/icomoon.de76432e.ttf +0 -0
  263. package/dist/fonts/icomoon.ec37e716.ttf +0 -0
  264. package/dist/img/cloud_txt_24.87b9d2ae.svg +1 -0
  265. package/dist/img/icomoon.428f3063.svg +346 -0
  266. package/dist/img/icomoon.532b3795.svg +345 -0
  267. package/dist/img/icon_question.e931b16c.svg +14 -0
  268. package/mixins/emitter.js +33 -0
  269. package/package.json +45 -0
  270. package/postcss.config.js +19 -0
  271. package/style/icon/Read Me.txt +7 -0
  272. package/style/icon/demo-files/demo.css +152 -0
  273. package/style/icon/demo-files/demo.js +30 -0
  274. package/style/icon/demo.html +4042 -0
  275. package/style/icon/fonts/icomoon.eot +0 -0
  276. package/style/icon/fonts/icomoon.svg +346 -0
  277. package/style/icon/fonts/icomoon.ttf +0 -0
  278. package/style/icon/fonts/icomoon.woff +0 -0
  279. package/style/icon/selection.json +1 -0
  280. package/style/icon/style.css +1191 -0
  281. package/tests/unit/example.spec.js +13 -0
  282. package/utils/Constants.js +59 -0
  283. package/utils/assist.js +100 -0
  284. package/utils/changNumber.js +26 -0
  285. package/utils/common.js +109 -0
  286. package/utils/random_str.js +9 -0
@@ -0,0 +1,499 @@
1
+ <template>
2
+ <div class="wrong-drawer">
3
+ <ft-drawer>
4
+ <div class="screen">
5
+ <ft-radio
6
+ v-show="termList.length"
7
+ label="学期"
8
+ :options="termList"
9
+ :defaultValue="indexParam.termType"
10
+ :props="{
11
+ label: 'label',
12
+ id: 'termType',
13
+ }"
14
+ @radio-click="termClick"
15
+ ></ft-radio>
16
+ <ft-radio
17
+ v-show="clazzGradeList.length"
18
+ :label="i18n.banJi"
19
+ :options="clazzGradeList"
20
+ :defaultValue="indexParam.classId"
21
+ :props="{
22
+ label: 'className',
23
+ id: 'classId',
24
+ }"
25
+ @radio-click="classClick"
26
+ ></ft-radio>
27
+ <ft-radio
28
+ v-show="errorRateList.length"
29
+ :label="i18n.deFenLv"
30
+ :options="errorRateList"
31
+ :defaultValue="indexParam.errorRate"
32
+ :props="{
33
+ label: 'name',
34
+ id: 'id',
35
+ }"
36
+ @radio-click="rateClick"
37
+ ></ft-radio>
38
+ </div>
39
+ <div>
40
+ <ft-tabs
41
+ :options="tabList"
42
+ :activeName="activeTab"
43
+ @click="tabClick"
44
+ type="border-card"
45
+ ></ft-tabs>
46
+ <div v-if="chapterList && chapterList.length">
47
+ <el-table
48
+ :key="activeTab"
49
+ :data="chapterList"
50
+ style="width: 100%; margin-bottom: 20px"
51
+ :row-key="
52
+ indexParam.knowledgeSource == 'RESOURCE' ? 'paperResourceId' : (indexParam.knowledgeSource == 'CHAPTER' ? 'courseId' : 'klId')
53
+ "
54
+ border
55
+ stripe
56
+ :default-expand-all="
57
+ (indexParam.knowledgeSource == 'RESOURCE' || indexParam.knowledgeSource == 'CHAPTER') ? true : false
58
+ "
59
+ :tree-props="{
60
+ children:
61
+ indexParam.knowledgeSource == 'RESOURCE'
62
+ ? 'semesterNodeDtoList'
63
+ : (indexParam.knowledgeSource == 'CHAPTER'
64
+ ? 'chapters'
65
+ : 'knowledgeList'),
66
+ hasChildren:
67
+ indexParam.knowledgeSource == 'RESOURCE'
68
+ ? 'semesterNodeDtoList.length>0'
69
+ : (indexParam.knowledgeSource == 'CHAPTER'
70
+ ? 'chapters.length>0'
71
+ : 'knowledgeList.length>0'),
72
+ }"
73
+ >
74
+ <el-table-column
75
+ :prop="
76
+ indexParam.knowledgeSource == 'RESOURCE'
77
+ ? 'semesterNodeName'
78
+ : (indexParam.knowledgeSource == 'CHAPTER'
79
+ ? 'courseName'
80
+ : 'klName')
81
+ "
82
+ :label="
83
+ indexParam.knowledgeSource == 'RESOURCE' ? i18n.shiJuan : (indexParam.knowledgeSource == 'CHAPTER' ? i18n.zhangJie : i18n.zhiShiDian)
84
+ "
85
+ >
86
+ </el-table-column>
87
+ <el-table-column prop="mistakeCount" :label="i18n.cuoTiShu" width="92">
88
+ </el-table-column>
89
+ <el-table-column :label="i18n.caoZuo" width="88">
90
+ <template slot-scope="scope">
91
+ <div class="check-wrong-detail" @click="clickCell(scope.row)">
92
+ {{ i18n.chaKan }}
93
+ </div>
94
+ </template>
95
+ </el-table-column>
96
+ </el-table>
97
+ </div>
98
+ <ft-empty v-show="chapterList.length == 0"
99
+ :message="i18n.zanWuShuJu"
100
+ >
101
+ <img class="empty-img" :src="host +'/assets/prepare-course/list/img/empty.fcdd9ba5.png'" alt="" />
102
+ </ft-empty>
103
+ </div>
104
+ </ft-drawer>
105
+ </div>
106
+ </template>
107
+ <script>
108
+ import infiniteScroll from "vue-infinite-scroll";
109
+ import {
110
+ Loading,
111
+ Tabs,
112
+ TabPane,
113
+ Table,
114
+ TableColumn,
115
+ Tooltip,
116
+ } from "element-ui";
117
+ import {
118
+ getUserOperate,
119
+ getMistakeIndex,
120
+ getMistakeData,
121
+ } from "../../../api/index";
122
+
123
+ export default {
124
+ name: "FtWrongDrawer",
125
+ // import引入的组件需要注入到对象中才能使用
126
+ components: {
127
+ [Loading.name]: Loading,
128
+ [Tabs.name]: Tabs,
129
+ [TabPane.name]: TabPane,
130
+ [Table.name]: Table,
131
+ [TableColumn.name]: TableColumn,
132
+ [Tooltip.name]: Tooltip,
133
+ },
134
+ directives: { infiniteScroll },
135
+ props:{
136
+ leftInfo:{
137
+ type: Object
138
+ },
139
+ i18n:{
140
+ type: Object
141
+ },
142
+ },
143
+ data() {
144
+ // 这里存放数据
145
+ return {
146
+ host: window.location.origin,
147
+ activeTab: "RESOURCE",
148
+ tabList: [
149
+ { id: "RESOURCE", label: this.i18n.anShiJuan},
150
+ { id: "CHAPTER", label: this.i18n.anZhangJie },
151
+ { id: "KNOWLEDGE", label: this.i18n.anZhiShiDian },
152
+ ],
153
+ //首次请求
154
+ isLoading: true,
155
+ //是否正在加载题目数据
156
+ loadingBankData: false,
157
+ //加载题目数据是否失败
158
+ loadingError: false,
159
+ //数据集合
160
+ chapterList: [],
161
+ //班级列表
162
+ clazzGradeList: [],
163
+ //错误率列表
164
+ errorRateList: [],
165
+ termList: [], //学期列表
166
+ //index接口请求参数
167
+ defaultIndexParam: {
168
+ subjectId: "", //科目id
169
+ gradeId: "", //年级id
170
+ classId: "", //班级id
171
+ errorRate: 0, //错误率id,默认全部
172
+ knowledgeSource: "RESOURCE", //当前错题集查询类型,默认为 CHAPTER
173
+ // order: 0, //排序,0:更新时间倒序,1:更新时间正序
174
+ // orderQuote: 0, //排序,0:使用次数倒序,1:使用次数正序
175
+ },
176
+ //index接口请求参数
177
+ indexParam: {},
178
+ isFirstIndex: true, //首次加载该题库
179
+ //按试卷开始时间
180
+ paperStartTime: "",
181
+ //按试卷结束时间
182
+ paperEndTime: "",
183
+ };
184
+ },
185
+ //监控data中的数据变化
186
+ watch: {
187
+ "$store.state.resourceInfo": function (n, o) {
188
+ if (this.isFirstIndex) {
189
+ this.isFirstIndex = false;
190
+ this.requestMistakeIndexData();
191
+ }
192
+ },
193
+ },
194
+ methods: {
195
+ tabClick(value) {
196
+ this.activeTab = value
197
+ //处理indexParam
198
+ this.indexParam.knowledgeSource = value;
199
+ this.requestBankData();
200
+ },
201
+ termClick(termType, item) {
202
+ console.log('termClick', termType, item)
203
+ let dic = {
204
+ termType: item.termType,
205
+ termBeginTime: item.termBeginTime || "",
206
+ termEndTime: item.termEndTime || "",
207
+ };
208
+ this.$emit(
209
+ "changeMistakeIndexParam",
210
+ "selectedTermType",
211
+ JSON.stringify(dic)
212
+ );
213
+ },
214
+ classClick(classId) {
215
+ let dic = { classId: classId };
216
+ this.$emit(
217
+ "changeMistakeIndexParam",
218
+ "selectedClazz",
219
+ JSON.stringify(dic)
220
+ );
221
+ },
222
+ rateClick(id) {
223
+ let dic = { errorRate: id };
224
+ this.$emit(
225
+ "changeMistakeIndexParam",
226
+ "selectedRate",
227
+ JSON.stringify(dic)
228
+ );
229
+ },
230
+ formatter(data) {
231
+ console.log("formater", data);
232
+ data.klName = data.klName && data.klName.replace(/&amp;/g, "&");
233
+ console.log(data.klName);
234
+ return data.klName;
235
+ },
236
+ //
237
+ setListener() {
238
+ let _this = this;
239
+ //改变indexParam参数,重新请求index接口
240
+ this.$off("changeMistakeIndexParam"); //避免重复响应同一事件
241
+ this.$on("changeMistakeIndexParam", function (action, msg) {
242
+ console.log("action is...", msg);
243
+ if (action == "retryRequest") {
244
+ //加载失败后的重新请求 || 删除题目后刷新题目数据
245
+ _this.requestBankData();
246
+ return;
247
+ }
248
+ let dic = JSON.parse(msg);
249
+ for (let key in dic) {
250
+ let value = dic[key];
251
+ _this.indexParam[key] = value;
252
+ }
253
+ //请求题目数据
254
+ _this.requestBankData();
255
+ });
256
+ },
257
+ //切换tab
258
+ clickResourceTab() {
259
+ let _this = this;
260
+ //处理indexParam
261
+ _this.indexParam.knowledgeSource = _this.activeTab;
262
+ _this.requestBankData();
263
+ },
264
+ /*
265
+ **请求题库首页数据
266
+ * 只在首次进入该页面时请求
267
+ */
268
+ requestMistakeIndexData() {
269
+ let _this = this;
270
+ _this.loadingError = false;
271
+ _this.goRequestMistakeIndexData();
272
+ },
273
+ //首次进入该页面时请求获取用户信息
274
+ goRequestMistakeIndexData() {
275
+ let _this = this;
276
+ var prepareInfo = this.leftInfo;
277
+ if (prepareInfo && prepareInfo.subjectId) {
278
+ var subjectId = prepareInfo.subjectId;
279
+ _this.indexParam["subjectId"] = subjectId;
280
+ let dom = document.getElementById("wrong-drawer-slot-id");
281
+ let loadingInstance = Loading.service({
282
+ target: dom,
283
+ text: _this.i18n.jiaZaiZhong,
284
+ });
285
+ getMistakeIndex(
286
+ {
287
+ subjectId: subjectId,
288
+ },
289
+ (res) => {
290
+ this.$nextTick(() => {
291
+ // 以服务的方式调用的 Loading 需要异步关闭
292
+ loadingInstance.close();
293
+ });
294
+ _this.isLoading = false;
295
+ if (typeof res === "string") res = JSON.parse(res);
296
+ if (res && res.code == 0) {
297
+ //取班级数组
298
+ _this.clazzGradeList = res.value.clazzGradeList;
299
+ //首次默认取第一个班级数据
300
+ if (_this.indexParam.classId.length == 0) {
301
+ _this.indexParam.classId =
302
+ (_this.clazzGradeList.length &&
303
+ _this.clazzGradeList[0].classId) ||
304
+ "";
305
+ _this.indexParam.gradeId =
306
+ (_this.clazzGradeList.length &&
307
+ _this.clazzGradeList[0].gradeId) ||
308
+ "";
309
+ }
310
+ //取错误率数组
311
+ _this.errorRateList = res.value.errorRateList;
312
+ _this.termList = res.value.termList?res.value.termList:[]; //学期列表
313
+ _this.setPaperTime();//按试卷查看需要获取学期的开始和结束时间
314
+ _this.termList.forEach((item) => {
315
+ item.label = item.termType == "-1"
316
+ ? "全部"
317
+ : item.termType == "1"
318
+ ? "第一学期"
319
+ : item.termType == "2"
320
+ ? "第二学期"
321
+ : "";
322
+ });
323
+ let curTerm = this.termList.filter((item) => item.checked)[0] || {}; //当前学期
324
+ _this.indexParam.termType = curTerm.termType;
325
+ _this.indexParam.termBeginTime = curTerm.termBeginTime;
326
+ _this.indexParam.termEndTime = curTerm.termEndTime;
327
+ //处理indexParam
328
+ _this.indexParam.subjectId = subjectId;
329
+ _this.requestBankData();
330
+ } else {
331
+ _this.loadingError = true;
332
+ }
333
+ }
334
+ );
335
+ }
336
+ },
337
+ //按试卷查看,学期选择全部的时候,需要开始时间和结束时间
338
+ setPaperTime(){
339
+ if(this.termList && this.termList.length > 0){
340
+ this.termList.forEach(item => {
341
+ if(item.termType == 1){
342
+ this.paperStartTime = item.termBeginTime;
343
+ }else if(item.termType == 2){
344
+ this.paperEndTime = item.termEndTime;
345
+ }
346
+ });
347
+ }
348
+ },
349
+ /*
350
+ **请求题库数据
351
+ * 筛选条件时请求
352
+ */
353
+ requestBankData() {
354
+ let _this = this;
355
+ let dom = document.getElementById("wrong-drawer-slot-id");
356
+ let loadingInstance = Loading.service({
357
+ target: dom,
358
+ text: _this.i18n.jiaZaiZhong,
359
+ });
360
+ _this.loadingError = false;
361
+ _this.loadingBankData = true;
362
+ const { teachMaterialId = ""} = this.leftInfo;
363
+ _this.indexParam.teachMaterialId = teachMaterialId;
364
+ if(_this.indexParam.termType == -1){//如果是整个学期
365
+ if(_this.indexParam.knowledgeSource == 'RESOURCE'){//如果是按试卷
366
+ _this.indexParam.termBeginTime = _this.paperStartTime
367
+ _this.indexParam.termEndTime = _this.paperEndTime
368
+ }else{//如果不是按试卷
369
+ _this.indexParam.termBeginTime = ""
370
+ _this.indexParam.termEndTime = ""
371
+ }
372
+ }
373
+ getMistakeData(_this.indexParam, (res) => {
374
+ _this.$nextTick(() => {
375
+ // 以服务的方式调用的 Loading 需要异步关闭
376
+ loadingInstance.close();
377
+ });
378
+ _this.loadingBankData = false;
379
+ if (typeof res === "string") res = JSON.parse(res);
380
+ if (res && res.code == 0) {
381
+ //取出题目数据
382
+ _this.loadingError = false;
383
+ var tempChapterList = res.value.chapterList || [];
384
+ tempChapterList = JSON.parse(JSON.stringify(tempChapterList).replace(/&amp;/g, "&"));
385
+ if (_this.indexParam.knowledgeSource == "CHAPTER") {
386
+ for (let index = 0; index < tempChapterList.length; index++) {
387
+ const element = tempChapterList[index];
388
+ element["courseId"] = "temp" + index;
389
+ element["courseName"] =
390
+ element.teachMaterialName + " " + element.classificationName;
391
+ element["mistakeCount"] = element.misCount;
392
+ if (
393
+ element.enTeachMaterialId &&
394
+ element.chapters &&
395
+ element.chapters.length > 0
396
+ ) {
397
+ //递归将chapters里面的item都赋上 enTeachMaterialId
398
+ _this.addTeachMaterialIdForData(
399
+ element.chapters,
400
+ element.enTeachMaterialId
401
+ );
402
+ }
403
+ }
404
+ }
405
+ if (_this.indexParam.knowledgeSource == "RESOURCE") {
406
+ if(tempChapterList && tempChapterList.length > 0){
407
+ this.addPaperListForData(tempChapterList)
408
+ }else{
409
+ _this.chapterList = [];
410
+ }
411
+ }
412
+ _this.chapterList = tempChapterList;
413
+ console.log('_this.chapterList',_this.chapterList)
414
+ } else {
415
+ //请求题目数据报错
416
+ _this.loadingError = true;
417
+ _this.chapterList = [];
418
+ }
419
+ });
420
+ },
421
+ //为试卷数据组合添加字段
422
+ addPaperListForData(arr) {
423
+ arr.sort(function (a, b) {
424
+ return b.sort - a.sort;
425
+ })
426
+ for (let index = 0; index < arr.length; index++) {
427
+ if (arr[index] && arr[index].semesterNodeDtoList && arr[index].semesterNodeDtoList.length > 0) {
428
+ arr[index].semesterNodeDtoList.sort(function (a, b) {
429
+ return b.sort - a.sort;
430
+ })
431
+ const element = arr[index];
432
+ element["mistakeCount"] = element.nodeValue;
433
+ element["paperResourceId"] = "paper1" + index;
434
+ for (let childIndex = 0; childIndex < element.semesterNodeDtoList.length; childIndex++) {
435
+ const childElement = element.semesterNodeDtoList[childIndex];
436
+ childElement["paperResourceId"] = "paper2" + childIndex;
437
+ childElement["mistakeCount"] = childElement.nodeValue;
438
+ if (childElement.semesterNodeDtoList && childElement.semesterNodeDtoList.length > 0) {
439
+ this.addPaperMistakeCountForData(childElement.semesterNodeDtoList, childElement.sort, childElement.monthTime);
440
+ }
441
+ }
442
+ }
443
+ }
444
+ },
445
+ //为子试卷元素添加 mistakeCount
446
+ addPaperMistakeCountForData(arr, sort, monthTime) {
447
+ for (let index = 0; index < arr.length; index++) {
448
+ const paperElement = arr[index];
449
+ paperElement["paperResourceId"] = paperElement.resourceId;
450
+ paperElement["mistakeCount"] = paperElement.nodeValue;
451
+ paperElement["sort"] = sort;
452
+ paperElement["monthTime"] = monthTime;
453
+ if (paperElement.semesterNodeDtoList && paperElement.semesterNodeDtoList.length > 0) {
454
+ this.addPaperMistakeCountForData(paperElement.semesterNodeDtoList, sort);
455
+ }
456
+ }
457
+ },
458
+ //为子元素添加 enTeachMaterialId
459
+ addTeachMaterialIdForData(arr, currentTeachMaterialId) {
460
+ for (let index = 0; index < arr.length; index++) {
461
+ const element = arr[index];
462
+ element["enTeachMaterialId"] = currentTeachMaterialId;
463
+ if (element.chapters && element.chapters.length > 0) {
464
+ this.addTeachMaterialIdForData(
465
+ element.chapters,
466
+ currentTeachMaterialId
467
+ );
468
+ }
469
+ }
470
+ },
471
+ //点击查看按钮
472
+ clickCell(row) {
473
+ console.log("clickCell---", row);
474
+ let dic = {
475
+ activeIndex: 2,
476
+ currentIndexParam: this.indexParam,
477
+ currentSearchItem: row,
478
+ };
479
+ this.$emit("eventbus-emit", "changeDrawerType","changeDrawerType",JSON.stringify(dic))
480
+ },
481
+ },
482
+ computed: {},
483
+ created() {
484
+ let _this = this;
485
+ _this.indexParam = _this.defaultIndexParam;
486
+ },
487
+ mounted() {
488
+ let _this = this;
489
+ if (!this.host.includes("teach.focusteach.com")) {
490
+ this.host = "http://teach.focusteach.com:8085"
491
+ }
492
+ _this.setListener();
493
+ _this.requestMistakeIndexData();
494
+ },
495
+ };
496
+ </script>
497
+ <style scoped lang="scss">
498
+ @import "./index.scss";
499
+ </style>