@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,1725 @@
1
+ <!--右侧题目题库抽屉-->
2
+ <template>
3
+ <div class="question-drawer">
4
+ <ft-drawer>
5
+ <ft-tabs
6
+ :options="
7
+ examPointEnableFlag == 1 && examPointList && examPointList.length > 0
8
+ ? tabListWithPoint
9
+ : tabList
10
+ "
11
+ :activeName="activeTab"
12
+ @click="tabClick"
13
+ ></ft-tabs>
14
+ <div class="cascader course" v-show="activeTab == 'course'">
15
+ <ft-cascader
16
+ :options="materialsGradesList"
17
+ :value.sync="currentMaterials"
18
+ @change="changeMaterials"
19
+ ></ft-cascader>
20
+ <ft-cascader
21
+ :options="courseCascaderList"
22
+ :value.sync="currentCourse"
23
+ :props="{
24
+ value: 'courseId',
25
+ label: 'courseName',
26
+ children: 'courses',
27
+ checkStrictly: true,
28
+ }"
29
+ ref="course"
30
+ selfRef="courseCascader"
31
+ @change="changeCourse"
32
+ ></ft-cascader>
33
+ </div>
34
+ <div class="cascader knowledge" v-show="activeTab == 'knowledge'">
35
+ <el-popover
36
+ ref="knowledgePopover"
37
+ style="padding: 0; margin-top: 40px"
38
+ placement="bottom-start"
39
+ width="492"
40
+ trigger="click"
41
+ v-model="knowledgeVisible"
42
+ popper-class="knowledge-popover"
43
+ >
44
+ <div class="knowledge-popover">
45
+ <el-input
46
+ v-model="filterText"
47
+ placeholder="搜索知识点"
48
+ clearable
49
+ size="small"
50
+ style="width: calc(100% - 20px); margin: 5px 10px"
51
+ ></el-input>
52
+ <div class="catalog-tool">
53
+ <el-switch
54
+ class="self-switch"
55
+ v-model="switchValue"
56
+ active-color="#E2E2E2"
57
+ inactive-color="#E2E2E2"
58
+ :active-text="i18n.duoXuan"
59
+ :inactive-text="i18n.danXuan"
60
+ >
61
+ </el-switch>
62
+ <div class="tool-btn-tab" v-show="switchValue">
63
+ <div
64
+ :class="[
65
+ 'knowledge-btn',
66
+ knowledgeType == 0
67
+ ? 'knowledge-btn-select'
68
+ : 'knowledge-btn-normal',
69
+ ]"
70
+ @click="choiseKnowledgeType(0)"
71
+ >
72
+ {{ i18n.zhiShiDianJiaoJi }}
73
+ </div>
74
+ <div
75
+ :class="[
76
+ 'knowledge-btn',
77
+ knowledgeType == 1
78
+ ? 'knowledge-btn-select'
79
+ : 'knowledge-btn-normal',
80
+ ]"
81
+ @click="choiseKnowledgeType(1)"
82
+ >
83
+ {{ i18n.zhiShiDianBingJi }}
84
+ </div>
85
+ </div>
86
+ </div>
87
+ <el-tree
88
+ class="self-tree"
89
+ :data="klList"
90
+ :show-checkbox="switchValue"
91
+ :props="{
92
+ label: 'klname',
93
+ children: 'knowledgeDtoList',
94
+ }"
95
+ :empty-text="i18n.zanWuShuJu"
96
+ node-key="klId"
97
+ ref="secondTree"
98
+ highlight-current
99
+ :filter-node-method="knowledgeFilterNode"
100
+ @node-click="clickKnowledgeNode"
101
+ @check="checkKnowledgeNode"
102
+ >
103
+ <span class="span-ellipsis" slot-scope="{ node }">
104
+ <span :title="node.label">{{ decode(node.label) }}</span>
105
+ </span>
106
+ </el-tree>
107
+ <div class="tool-btn" v-show="switchValue">
108
+ <div class="btn-title">
109
+ {{ i18n.yiXuanZeZhiShiDian
110
+ }}<span class="btn-count">{{ klArr.length }}</span>
111
+ </div>
112
+ <div
113
+ :class="[
114
+ 'btn',
115
+ klArr.length > 0 && klArr.length <= 100
116
+ ? 'btn-sure'
117
+ : 'btn-disable',
118
+ ]"
119
+ @click="toQueryWithKnowledges"
120
+ >
121
+ {{ i18n.queDing }}
122
+ </div>
123
+ <div
124
+ :class="['btn', klArr.length > 0 ? 'btn-clear' : 'btn-disable']"
125
+ @click="clearKnowledges"
126
+ >
127
+ {{ i18n.qingKong }}
128
+ </div>
129
+ </div>
130
+ <toast
131
+ style="
132
+ position: fixed;
133
+ top: 300px;
134
+ right: 120px;
135
+ width: 278px;
136
+ z-index: 10000;
137
+ "
138
+ :toastOptions="toastOptions"
139
+ ></toast>
140
+ </div>
141
+ </el-popover>
142
+ <div class="knowledge-back">
143
+ <div v-popover:knowledgePopover class="knowledge-back-pop">
144
+ <el-tooltip
145
+ :class="
146
+ knowledgeName.length > 0 ? 'item' : 'knowledge-title-item'
147
+ "
148
+ style="margin-top: 0"
149
+ effect="dark"
150
+ :disabled="isShowTooltip"
151
+ :content="allKnowledgeName"
152
+ placement="bottom"
153
+ >
154
+ <input
155
+ :class="[
156
+ 'knowledge-input',
157
+ knowledgeVisible
158
+ ? 'knowledge-input-show'
159
+ : 'knowledge-input-normal',
160
+ knowledgeName.length > 0 ? 'knowledge-input-value' : '',
161
+ ]"
162
+ type="button"
163
+ :value="
164
+ knowledgeName.length > 0
165
+ ? knowledgeName
166
+ : knowledgePlaceholder
167
+ "
168
+ />
169
+ </el-tooltip>
170
+ <i
171
+ :class="
172
+ knowledgeVisible ? 'icon-drop-up-btn' : 'icon-drop-down-btn'
173
+ "
174
+ ></i>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ <div class="cascader point" v-show="activeTab == 'point'">
179
+ <ft-cascader
180
+ :options="pointData"
181
+ :value.sync="currentPointId"
182
+ @change="handlePointChange"
183
+ :props="{
184
+ value: 'pointId',
185
+ label: 'pointName',
186
+ children: 'subExamPointDto',
187
+ checkStrictly: true,
188
+ }"
189
+ >
190
+ </ft-cascader>
191
+ </div>
192
+ <div class="screen">
193
+ <ft-radio
194
+ v-show="itemBankTypeList.length"
195
+ :label="i18n.laiYuan"
196
+ :options="itemBankTypeList"
197
+ :defaultValue="indexParam.itemBankType"
198
+ :props="{
199
+ label: 'itemBankTypeName',
200
+ id: 'itemBankType',
201
+ }"
202
+ @radio-click="sourceClick"
203
+ ></ft-radio>
204
+ <ft-radio
205
+ v-show="topicList.length && defaultCategoryType != 4"
206
+ :label="i18n.zhuanTi"
207
+ :options="topicList"
208
+ :defaultValue="indexParam.topicId ? indexParam.topicId : 'all'"
209
+ :props="{
210
+ label: 'topicName',
211
+ id: 'topicId',
212
+ }"
213
+ @radio-click="topicClick"
214
+ ></ft-radio>
215
+ <ft-radio
216
+ v-show="itemCategoryList.length"
217
+ :label="i18n.tiXing"
218
+ :options="itemCategoryList"
219
+ :defaultValue="
220
+ indexParam.itemCategoryId ? indexParam.itemCategoryId : 'all'
221
+ "
222
+ :props="{
223
+ label: 'itemCategoryName',
224
+ id: 'itemCategoryId',
225
+ }"
226
+ @radio-click="categoryClick"
227
+ ></ft-radio>
228
+ <ft-radio
229
+ v-show="difficultyList.length"
230
+ :label="i18n.nanDu"
231
+ :options="difficultyList"
232
+ :defaultValue="
233
+ indexParam.difficultyId ? indexParam.difficultyId : 'all'
234
+ "
235
+ :props="{
236
+ label: 'difficultyName',
237
+ id: 'difficultyId',
238
+ }"
239
+ @radio-click="difficultyClick"
240
+ ></ft-radio>
241
+ <ft-radio
242
+ v-show="basicSkillsList.length"
243
+ :label="i18n.jiNeng"
244
+ :options="basicSkillsList"
245
+ :defaultValue="
246
+ indexParam.basicSkillsId ? indexParam.basicSkillsId : 'all'
247
+ "
248
+ :props="{
249
+ label: 'basicName',
250
+ id: 'basicSkillsId',
251
+ }"
252
+ @radio-click="basicSkillClick"
253
+ ></ft-radio>
254
+ <ft-radio
255
+ v-if="coreLiteracyFlag && coreLiteracyList.length"
256
+ label="素养"
257
+ :options="coreLiteracyList"
258
+ :defaultValue="indexParam.literacyId ? indexParam.literacyId : 'all'"
259
+ :props="{
260
+ label: 'literacyName',
261
+ id: 'literacyId',
262
+ }"
263
+ @radio-click="coreLiteracyClick"
264
+ :isHtml="true"
265
+ :collapse="true"
266
+ ></ft-radio>
267
+ <ft-radio
268
+ v-show="yearList.length && defaultCategoryType != 4"
269
+ :label="i18n.nianFen"
270
+ :options="yearList"
271
+ :defaultValue="indexParam.year ? indexParam.year : 'all'"
272
+ @radio-click="yearClick"
273
+ ></ft-radio>
274
+ <!-- <ft-radio
275
+ v-show="coreLiteracyList.length"
276
+ label="核心素养"
277
+ :options="coreLiteracyList"
278
+ :defaultValue="indexParam.year ? indexParam.year : 'all'"
279
+ @radio-click="yearClick"
280
+ ></ft-radio> -->
281
+ </div>
282
+ <div
283
+ class="question"
284
+ id="tk-detail-drawer-slot-id"
285
+ v-infinite-scroll="changeCurrentPage"
286
+ :infinite-scroll-disabled="!hasMore"
287
+ infinite-scroll-distance="40"
288
+ >
289
+ <ft-header
290
+ :options="sortList"
291
+ @sort="headerSort"
292
+ default-sort="updateTime"
293
+ v-show="itemInfoList.length"
294
+ >
295
+ {{ i18n.gong }}{{ itemInfoList.length }}{{ i18n.daoTiMu }}
296
+ </ft-header>
297
+ <div id="bankData-drawer-slot-id">
298
+ <ft-question
299
+ v-show=" !loadingBankData && !loadingError && itemInfoList.length > 0 "
300
+ v-for="(item, index) in itemInfoList"
301
+ :key="item.itemInfoId"
302
+ :itemInfo="item"
303
+ :itemIndex="index + 1"
304
+ :examItemList="itemList"
305
+ :variantList="itemList"
306
+ :pointNames="item.pointNames || '--'"
307
+ :klNames="item.klNames || '--'"
308
+ :skill="item.basicSkillNames || '--'"
309
+ :answer="item.answer || '--'"
310
+ :analysis="item.analysis || '--'"
311
+ :itemCategoryName="item.itemCategoryName"
312
+ :topicName="item.topicName"
313
+ :difficultyId="item.difficultyId"
314
+ :difficultyName="item.difficultyName"
315
+ :audioFileId="item.audioFileId"
316
+ :itemFromType="item.itemFromType"
317
+ :content="item.content"
318
+ :updateTime="item.updateTime"
319
+ :referenceCount="item.referenceCount"
320
+ :itemInfoId="item.itemInfoId"
321
+ :provinceId="item.provinceId"
322
+ :provinceName="item.provinceName"
323
+ :areaId="item.areaId"
324
+ :districtId="item.districtId"
325
+ :areaName="item.areaName"
326
+ :districtName="item.districtName"
327
+ :year="item.year"
328
+ :rootItemInfoId="item.rootItemInfoId"
329
+ :itemSourceType="item.itemSourceType"
330
+ @showAnswer="getAnswer"
331
+ @getContent="getContent"
332
+ @choiceOrRemoveQuestion="choiceOrRemoveQuestion"
333
+ @toShowAudio="toShowAudio"
334
+ :fromType="fromType"
335
+ ></ft-question>
336
+ </div>
337
+ <ft-empty v-show="!loadingBankData && !loadingError && itemInfoList.length == 0" :message="i18n.zanWuTiMu">
338
+ <img
339
+ class="empty-img"
340
+ :src="host + '/assets/prepare-course/list/img/empty.fcdd9ba5.png'"
341
+ alt=""
342
+ />
343
+ </ft-empty>
344
+ <ft-error v-show="!loadingBankData && loadingError"
345
+ @retry="clickRetryBtn"
346
+ >
347
+ <img
348
+ class="error-img"
349
+ :src="host + '/assets/prepare-course/list/img/error.7e494464.png'"
350
+ alt=""
351
+ />
352
+ </ft-error>
353
+ <div v-show="loadingBankData" class="loading"></div>
354
+ </div>
355
+ <div class="page-contro" v-show="itemInfoList.length > 0">
356
+ {{
357
+ drawerPageError
358
+ ? this.i18n.jiaZaiShiBai
359
+ : loading
360
+ ? this.i18n.jiaZaiZhong
361
+ : hasMore
362
+ ? ""
363
+ : this.i18n.jiaZaiWanBi
364
+ }}
365
+ </div>
366
+ </ft-drawer>
367
+ </div>
368
+ </template>
369
+
370
+ <script>
371
+ import {
372
+ Tabs,
373
+ TabPane,
374
+ Cascader,
375
+ Popover,
376
+ Tooltip,
377
+ Loading,
378
+ Tree,
379
+ Input,
380
+ } from "element-ui";
381
+ import FtTabs from "../../tabs/index";
382
+ import FtCascader from "../../cascader/index";
383
+ import FtQuestion from "../../question/index";
384
+ import FtHeader from "../../header/index";
385
+ import FtRadio from "../../radio/index";
386
+ import FtDrawer from "../../drawer/index";
387
+ import FtEmpty from "../../empty/index";
388
+ import FtError from "../../error/index";
389
+ import {
390
+ getBankIndex,
391
+ getBankData,
392
+ getMaterialsGrades,
393
+ getKnowledge,
394
+ getEditorCourse,
395
+ getTopic,
396
+ getKldftNecessary,
397
+ getQuestion,
398
+ getAnswer,
399
+ } from "../../../api/index";
400
+ import { decodeEntities } from "../../../utils/common";
401
+ import Toast from "./Toast";
402
+ import infiniteScroll from "vue-infinite-scroll";
403
+ export default {
404
+ name: "FtQuestionDrawer",
405
+ // import引入的组件需要注入到对象中才能使用
406
+ components: {
407
+ Toast,
408
+ [Tabs.name]: Tabs,
409
+ [TabPane.name]: TabPane,
410
+ [Cascader.name]: Cascader,
411
+ [Popover.name]: Popover,
412
+ [Tooltip.name]: Tooltip,
413
+ [Tree.name]: Tree,
414
+ [Input.name]: Input,
415
+ FtTabs,
416
+ FtCascader,
417
+ FtQuestion,
418
+ FtHeader,
419
+ FtRadio,
420
+ FtDrawer,
421
+ FtError,
422
+ FtEmpty,
423
+ },
424
+ directives: { infiniteScroll },
425
+ props: {
426
+ itemList: {
427
+ type: Array,
428
+ default: () => [],
429
+ },
430
+ leftInfo: {
431
+ type: Object,
432
+ default: () => {
433
+ return {
434
+ eduLevelId: "",
435
+ subjectId: "",
436
+ courseSrc: "",
437
+ courseId: "",
438
+ };
439
+ },
440
+ },
441
+ fromType: {
442
+ type: String,
443
+ default: "",
444
+ },
445
+ klidsList: {
446
+ type: String,
447
+ default: "",
448
+ },
449
+ i18n: {
450
+ type: Object,
451
+ },
452
+ },
453
+ data() {
454
+ return {
455
+ host: window.location.origin,
456
+ currentPointId: [],
457
+ pointData: [],
458
+ filterText: "",
459
+ activeTab: "course",
460
+ tabList: [
461
+ {
462
+ id: "course",
463
+ label: this.i18n.anTongBuKeCheng,
464
+ },
465
+ {
466
+ id: "knowledge",
467
+ label: this.i18n.anZhiShiDian,
468
+ },
469
+ ],
470
+ tabListWithPoint: [
471
+ {
472
+ id: "course",
473
+ label: this.i18n.anTongBuKeCheng,
474
+ },
475
+ {
476
+ id: "knowledge",
477
+ label: this.i18n.anZhiShiDian,
478
+ },
479
+ {
480
+ id: "point",
481
+ label: this.i18n.anKaoDian,
482
+ },
483
+ ],
484
+ examPointEnableFlag: 0,
485
+ examPointList: [],
486
+ materialsGradesList: [],
487
+ currentMaterials: [],
488
+ courseCascaderList: [],
489
+ currentCourse: [],
490
+ loadingError: false,
491
+ indexParam: {
492
+ itemBackQueryType: 2, //1 按课程 2 按知识点 3 按考点
493
+ page: 1, //页码
494
+ studySectionId: "", //学段id
495
+ subjectId: "", //科目id
496
+ klIds: "", //知识点id集合,多个id以逗号分隔
497
+ klUnionFlag: 1, //知识点交并集标识,0交集,1并集,默认1
498
+ courseId: "", //课程id
499
+ examPointId: "", //考点id
500
+ year: "", //年份
501
+ topicId: "", //专题id
502
+ itemBasicSkillId: "", //基础技能id
503
+ itemCategoryId: "", //题目类型idrtList
504
+ itemDifficultyId: "", //难度id
505
+ order: 0, //排序,0:更新时间倒序,1:更新时间正序
506
+ },
507
+ //首次请求
508
+ isLoading: true,
509
+ defaultCategoryType: 0,
510
+ //题目总数
511
+ totalRecord: 0,
512
+ isFirstIndex: true, //首次加载该题库
513
+ firstRequestCourse: true, //是否首次加载课程
514
+ itemBankTypeList: [],
515
+ topicList: [],
516
+ itemCategoryList: [],
517
+ difficultyList: [],
518
+ basicSkillsList: [],
519
+ coreLiteracyFlag: false,//是否展示核心素养
520
+ coreLiteracyList: [],//核心素养
521
+ years: [],
522
+ itemInfoList: [],
523
+ sortList: [
524
+ {
525
+ label: "使用次数",
526
+ key: "count",
527
+ },
528
+ {
529
+ label: "更新时间",
530
+ key: "updateTime",
531
+ },
532
+ ],
533
+ currentCourseId: "",
534
+ allDifficultyList: [],
535
+ undefinedDifficultyInfo: {
536
+ difficultyCoefficient: "0.0",
537
+ difficultyId: "JPO-tJbAJqc",
538
+ difficultyName: "未定义",
539
+ },
540
+ drawerPageError: false,
541
+ loading: false,
542
+ hasMore: true,
543
+ //是否正在加载题目数据
544
+ loadingBankData: true,
545
+ //加载题目数据是否失败
546
+ loadingError: false,
547
+ currentKlIds: "",
548
+ knowledgeType: 1, //知识点交集:0 || 知识点并集:1
549
+ knowledgeVisible: false,
550
+ currentPointId: [], //考点-当前选择的考点id
551
+ knowledgeName: "", //知识点内容
552
+ isShowTooltip: true,
553
+ allKnowledgeName: "", //没被截取的知识点内容
554
+ switchValue: true, //单选:false || 多选:true
555
+ klList: [],
556
+ klArr: [], //知识点多选时,选择的知识点集合
557
+ knowledgePlaceholder: "",
558
+ inputTempStr: "", //临时存取输入框内容
559
+ toastOptions: { show: false, value: "最多支持100个知识点的查询~" }, //toast的参数
560
+ localKlIds: "",
561
+ firstEnter: true,
562
+ yearList: [],
563
+ };
564
+ },
565
+ //监控data中的数据变化
566
+ watch: {
567
+ "$store.state.resourceInfo": function (n, o) {
568
+ if (this.isFirstIndex) {
569
+ console.log("组件库监听到$store变化", n);
570
+ this.isFirstIndex = false;
571
+ this.requestIndexData();
572
+ if (!n.action) this.currentCourse = n.courseId || (n.list && n.list.courseId);
573
+ }
574
+ },
575
+ materialsGradesList(newValue, oldValue) {
576
+ let firstV = "";
577
+ let secondV = "";
578
+ let thirdV = "";
579
+ newValue.forEach((element) => {
580
+ if (element.value == this.currentCourseValue[0]) {
581
+ firstV = element.value;
582
+ element.children.forEach((item) => {
583
+ if (item.value == this.currentCourseValue[1]) {
584
+ secondV = item.value;
585
+ item.children.forEach((option) => {
586
+ if (option.value == this.currentCourseValue[2]) {
587
+ thirdV = option.value;
588
+ }
589
+ });
590
+ }
591
+ });
592
+ }
593
+ });
594
+ this.currentMaterials = [firstV, secondV, thirdV];
595
+ },
596
+ courseCascaderList(newValue, oldValue) {
597
+ this.courseCascaderList = newValue;
598
+ if (
599
+ this.firstRequestCourse &&
600
+ this.courseCascaderList &&
601
+ this.courseCascaderList.length > 0
602
+ ) {
603
+ this.firstRequestCourse = false;
604
+ setTimeout(() => {
605
+ let checkedCourseArr = [];
606
+ let checkedNodes =
607
+ this.$refs.course.$refs.courseCascader.getCheckedNodes(false);
608
+ if (checkedNodes && checkedNodes.length > 0) {
609
+ let currentNode = checkedNodes[0];
610
+ this.getCurrentCheckedCourse(checkedCourseArr, currentNode);
611
+ this.currentCourse = checkedCourseArr;
612
+ }
613
+ }, 200);
614
+ }
615
+ },
616
+ localKlIds: {
617
+ handler() {
618
+ this.currentKlIds = this.localKlIds;
619
+ this.initTreeValue();
620
+ console.log("watch", this.currentKlIds);
621
+ },
622
+ immediate: true,
623
+ },
624
+ filterText(val) {
625
+ if (this.knowledgeVisible) {
626
+ this.$refs.secondTree.filter(val);
627
+ }
628
+ },
629
+ knowledgeVisible(newVal) {
630
+ if (!newVal) {
631
+ this.filterText = "";
632
+ let length = this.$refs.secondTree.$children.length;
633
+ for (let i = 0; i < length; i++) {
634
+ this.$refs.secondTree.$children[i].node.parent.childNodes[
635
+ i
636
+ ].expanded = false;
637
+ }
638
+ }
639
+ },
640
+ examPointList(newValue, oldValue) {
641
+ this.pointData = newValue;
642
+ if (
643
+ this.pointData &&
644
+ this.pointData.length > 0 &&
645
+ (!this.currentPointId || this.currentPointId.length == 0)
646
+ ) {
647
+ this.currentPointId = [this.pointData[0].pointId];
648
+ }
649
+ },
650
+ klidsList(newValue, oldValue) {
651
+ if (!this.firstEnter) {
652
+ this.localKlIds = newValue;
653
+ }
654
+ this.firstEnter = false;
655
+ this.requestBankData();
656
+ },
657
+ years(newValue, oldValue) {
658
+ if (newValue && newValue.length) {
659
+ this.yearList = []
660
+ if(newValue.length > 6){
661
+ let temp = newValue.slice(0,6)
662
+ this.yearList = [...this.yearList, ...temp,{id: 'earlier', label: '更早'}]
663
+ }else {
664
+ newValue.forEach((element) => {
665
+ this.yearList.push(element);
666
+ });
667
+ }
668
+ } else {
669
+ this.yearList = [];
670
+ }
671
+ },
672
+ },
673
+ methods: {
674
+ changeCurrentPage() {
675
+ console.log(this.indexParam);
676
+ if (this.itemInfoList.length >= this.totalRecord) {
677
+ this.hasMore = false;
678
+ return;
679
+ }
680
+ this.indexParam.page = this.currPage + 1;
681
+ this.requestPageBank(this.indexParam);
682
+ },
683
+ handlePointChange(value) {
684
+ var pointId = value[value.length - 1];
685
+ let dic = { examPointId: pointId };
686
+ this.$emit("changeIndexParam", "changePointId", JSON.stringify(dic));
687
+ },
688
+ setListener() {
689
+ let _this = this;
690
+ //改变indexParam参数,重新请求index接口
691
+ this.$off("changeIndexParam"); //避免重复响应同一事件
692
+ this.$on("changeIndexParam", function (action, msg) {
693
+ if (action == "retryRequest") {
694
+ //加载失败后的重新请求 || 删除题目后刷新题目数据
695
+ _this.requestBankData();
696
+ return;
697
+ }
698
+ let dic = JSON.parse(msg);
699
+ for (let key in dic) {
700
+ let value = dic[key];
701
+ _this.indexParam[key] = value;
702
+ }
703
+ if (action == "changeSource") {
704
+ _this.defaultCategoryType = dic["itemBankType"];
705
+ if (_this.defaultCategoryType == 4) {
706
+ _this.indexParam.topicId = "";
707
+ _this.indexParam.year = "";
708
+ let dic = { selectedTopicId: "", currentYear: "" };
709
+
710
+ this.$emit(
711
+ "toChangeSelectedTopicId",
712
+ "toChangeSelectedTopicId",
713
+ JSON.stringify(dic)
714
+ );
715
+ this.$emit(
716
+ "toChangeCurrentYear",
717
+ "toChangeCurrentYear",
718
+ JSON.stringify(dic)
719
+ );
720
+
721
+ this.$emit(
722
+ "eventbus-emit",
723
+ "toChangeSelectedTopicId",
724
+ "toChangeSelectedTopicId",
725
+ JSON.stringify(dic)
726
+ );
727
+ this.$emit(
728
+ "eventbus-emit",
729
+ "toChangeCurrentYear",
730
+ "toChangeCurrentYear",
731
+ JSON.stringify(dic)
732
+ );
733
+ _this.allDifficultyList = JSON.parse(
734
+ JSON.stringify(_this.difficultyList)
735
+ );
736
+ _this.allDifficultyList.push(_this.undefinedDifficultyInfo);
737
+ } else {
738
+ _this.allDifficultyList = JSON.parse(
739
+ JSON.stringify(_this.difficultyList)
740
+ );
741
+ if (_this.indexParam.itemDifficultyId == "JPO-tJbAJqc") {
742
+ _this.indexParam.itemDifficultyId = "";
743
+ let diffDic = { itemDifficultyId: "" };
744
+ this.$emit(
745
+ "toChangeSelectedDifficultyId",
746
+ "toChangeSelectedDifficultyId",
747
+ JSON.stringify(diffDic)
748
+ );
749
+ this.$emit(
750
+ "eventbus-emit",
751
+ "toChangeSelectedDifficultyId",
752
+ "toChangeSelectedDifficultyId",
753
+ JSON.stringify(diffDic)
754
+ );
755
+ }
756
+ //请求专题
757
+ _this.requestTopicData();
758
+ }
759
+ }
760
+ //
761
+ if (action == "changeOrder") {
762
+ delete _this.indexParam.orderQuote;
763
+ }
764
+ if (action == "changeOrderQuote") {
765
+ delete _this.indexParam.order;
766
+ }
767
+ //请求题目数据
768
+ _this.requestBankData();
769
+ });
770
+ //编辑单题成功,若当前来源是我的题库,则刷新题目列表数据
771
+ this.$on("editItemSuccess", async (newItemObj) => {
772
+ if (_this.indexParam.itemBankType == 4) {
773
+ _this.requestBankData();
774
+ }
775
+ });
776
+ },
777
+ tabClick(value) {
778
+ console.log(value);
779
+ this.activeTab = value;
780
+ let _this = this;
781
+ let dic = {};
782
+ switch (this.activeTab) {
783
+ case "course":
784
+ _this.knowledgeVisible = false;
785
+ dic = {
786
+ itemBackQueryType: 1,
787
+ courseId: _this.currentCourseId,
788
+ klIds: "",
789
+ klUnionFlag: 1,
790
+ examPointId: "",
791
+ };
792
+ break;
793
+ case "knowledge":
794
+ dic = {
795
+ itemBackQueryType: 2,
796
+ courseId: _this.currentCourseId,
797
+ klIds: _this.currentKlIds,
798
+ klUnionFlag: _this.knowledgeType,
799
+ examPointId: "",
800
+ };
801
+ break;
802
+ case "point":
803
+ _this.knowledgeVisible = false;
804
+ dic = {
805
+ itemBackQueryType: 3,
806
+ courseId: "",
807
+ klIds: "",
808
+ klUnionFlag: 1,
809
+ examPointId:
810
+ _this.currentPointId.length > 0
811
+ ? _this.currentPointId[_this.currentPointId.length - 1]
812
+ : "",
813
+ };
814
+ break;
815
+ }
816
+ this.$emit("changeIndexParam", "changeTab", JSON.stringify(dic));
817
+ },
818
+ //初始化tree默认值
819
+ initTreeValue() {
820
+ console.log("initTree");
821
+ // debugger
822
+ if (this.switchValue) {
823
+ //多选
824
+ if (this.currentKlIds.length == 0) {
825
+ return;
826
+ }
827
+ this.klArr = this.currentKlIds.split(",");
828
+ this.$nextTick(() => {
829
+ this.$refs.secondTree.setCheckedKeys(this.klArr);
830
+ this.klArr = this.$refs.secondTree.getCheckedKeys(true);
831
+ var nodesArr = this.$refs.secondTree.getCheckedNodes();
832
+ let tempStr = "";
833
+ if (nodesArr.length == 0) {
834
+ tempStr = "";
835
+ } else if (nodesArr.length > 1) {
836
+ nodesArr.forEach((element) => {
837
+ if (!element.hasChild) {
838
+ tempStr += element.klname + ",";
839
+ }
840
+ });
841
+ } else {
842
+ tempStr = nodesArr[0].klname;
843
+ }
844
+ this.inputTempStr = tempStr;
845
+ this.clickKnowledgeItem(true, tempStr);
846
+ });
847
+ } else {
848
+ this.$nextTick(() => {
849
+ this.$refs.secondTree.setCurrentKey(this.currentKlIds);
850
+ var nodeData = this.$refs.secondTree.getCurrentNode();
851
+ if (nodeData) {
852
+ this.clickKnowledgeItem(true, nodeData.klname);
853
+ }
854
+ });
855
+ }
856
+ },
857
+ //树状结构过滤器
858
+ knowledgeFilterNode(value, data, node) {
859
+ // 如果什么都没填就直接返回
860
+ console.log("进行了过滤");
861
+ if (!value) return true;
862
+ // 如果传入的value和data中的label相同说明是匹配到了
863
+ if (data.klname.indexOf(value) !== -1) {
864
+ return true;
865
+ }
866
+ // 否则要去判断它是不是选中节点的子节点
867
+ return this.checkBelongToChooseNode(value, data, node);
868
+ },
869
+ // 判断传入的节点是不是选中节点的子节点
870
+ checkBelongToChooseNode(value, data, node) {
871
+ const level = node.level;
872
+ // 如果传入的节点本身就是一级节点就不用校验了
873
+ if (level === 1) {
874
+ return false;
875
+ }
876
+ // 先取当前节点的父节点
877
+ var parentData = node.parent;
878
+ // 遍历当前节点的父节点
879
+ var index = 0;
880
+ while (index < level - 1) {
881
+ // 如果匹配到直接返回
882
+ if (parentData.data.klname.indexOf(value) !== -1) {
883
+ return true;
884
+ }
885
+ // 否则的话再往上一层做匹配
886
+ parentData = parentData.parent;
887
+ index++;
888
+ }
889
+ // 没匹配到返回false
890
+ return false;
891
+ },
892
+ choiseKnowledgeType(value) {
893
+ this.knowledgeType = value;
894
+ },
895
+ clickKnowledgeNode(object) {
896
+ if (!this.switchValue) {
897
+ this.currentKlIds = object.klId;
898
+ let dic = { klIds: object.klId, klUnionFlag: 1 };
899
+ this.clickKnowledgeItem(true, object.klname);
900
+ this.$emit("changeIndexParam", "changeKnowledge", JSON.stringify(dic));
901
+ let tempDic = {
902
+ klIds: object.klId,
903
+ switch: this.switchValue,
904
+ knowledgeType: 1,
905
+ };
906
+ this.$emit("changeKLIds", "changeKLIds", JSON.stringify(tempDic));
907
+ }
908
+ },
909
+ checkKnowledgeNode(object, compo) {
910
+ this.klArr = this.$refs.secondTree.getCheckedKeys(true);
911
+ let tempStr = "";
912
+ if (compo.checkedNodes.length == 0) {
913
+ tempStr = "";
914
+ } else if (compo.checkedNodes.length > 1) {
915
+ compo.checkedNodes.forEach((element) => {
916
+ if (!element.hasChild) {
917
+ tempStr += element.klname + ",";
918
+ }
919
+ });
920
+ } else {
921
+ tempStr = compo.checkedNodes[0].klname;
922
+ }
923
+ this.inputTempStr = tempStr;
924
+ this.clickKnowledgeItem(false, tempStr);
925
+ if (this.klArr.length > 100) {
926
+ this.toastOptions.show = true;
927
+ setTimeout(() => {
928
+ this.toastOptions.show = false;
929
+ }, 2000);
930
+ }
931
+ },
932
+ clearKnowledges() {
933
+ let _this = this;
934
+ _this.currentKlIds = "";
935
+ if (_this.klArr.length == 0) {
936
+ return;
937
+ }
938
+ _this.klArr = [];
939
+ _this.inputTempStr = "";
940
+ _this.clickKnowledgeItem(false, _this.inputTempStr);
941
+ this.$nextTick(() => {
942
+ _this.$refs.secondTree.setCheckedKeys([]);
943
+ _this.klArr = [];
944
+ let dic = {
945
+ klIds: "",
946
+ klUnionFlag: _this.knowledgeType,
947
+ };
948
+ this.$emit("changeIndexParam", "changeKnowledge", JSON.stringify(dic));
949
+ let tempDic = {
950
+ klIds: "",
951
+ switch: _this.switchValue,
952
+ knowledgeType: _this.knowledgeType,
953
+ };
954
+ this.$emit("changeKLIds", "changeKLIds", JSON.stringify(tempDic));
955
+ });
956
+ },
957
+ toQueryWithKnowledges() {
958
+ let _this = this;
959
+ if (_this.klArr.length == 0 || _this.klArr.length > 100) {
960
+ return;
961
+ }
962
+ _this.clickKnowledgeItem(true, _this.inputTempStr);
963
+ _this.currentKlIds = _this.klArr.join();
964
+ let dic = { klIds: _this.currentKlIds, klUnionFlag: _this.knowledgeType };
965
+ this.$emit("changeIndexParam", "changeKnowledge", JSON.stringify(dic));
966
+ let tempDic = {
967
+ klIds: _this.currentKlIds,
968
+ switch: _this.switchValue,
969
+ knowledgeType: _this.knowledgeType,
970
+ };
971
+ this.$emit("changeKLIds", "changeKLIds", JSON.stringify(tempDic));
972
+ },
973
+ clickKnowledgeItem(isDisplay, name) {
974
+ console.log("clickKnowledgeItem", name);
975
+ name = this.decode(name);
976
+ this.knowledgeVisible = !isDisplay;
977
+ this.allKnowledgeName = name;
978
+ this.isShowTooltip = true;
979
+ if (name.length > 30) {
980
+ this.isShowTooltip = false;
981
+ name = name.slice(0, 30) + "...";
982
+ }
983
+ this.knowledgeName = name;
984
+ },
985
+ decode(str) {
986
+ return decodeEntities(str);
987
+ },
988
+ getAnswer(itemInfo) {
989
+ let currentItem = this.itemInfoList.find(
990
+ (item) => item.itemInfoId == itemInfo.itemInfoId
991
+ );
992
+ getAnswer(
993
+ {
994
+ itemId: itemInfo.itemInfoId,
995
+ itemBankType: this.indexParam.itemBankType,
996
+ itemSourceType: itemInfo.itemSourceType,
997
+ rootSourceId: itemInfo.rootItemInfoId,
998
+ },
999
+ (res) => {
1000
+ // this.$set(currentItem, "answerDic", res.value);
1001
+ // getQuestion({ itemId: res.value.itemAnalysis }, (result) => {
1002
+ // if (!result) {
1003
+ // return;
1004
+ // }
1005
+ // currentItem.answerDic = {
1006
+ // ...currentItem.answerDic,
1007
+ // analysis: result.data,
1008
+ // };
1009
+ // this.$set(currentItem, "answerDic", currentItem.answerDic);
1010
+ // });
1011
+ if (!res) {
1012
+ return;
1013
+ }
1014
+ if (typeof res === "string") res = JSON.parse(res);
1015
+ if (res.code == 0) {
1016
+ //取出答案与解析
1017
+ // _this.answerDic = res.value;
1018
+ this.$set(currentItem, "pointNames", res.value.pointNames);
1019
+ this.$set(currentItem, "klNames", res.value.klNames);
1020
+ this.$set(currentItem, "answer", res.value.correctAnswer);
1021
+ this.$set(
1022
+ currentItem,
1023
+ "basicSkillNames",
1024
+ res.value.basicSkillNames
1025
+ );
1026
+ if (
1027
+ (res.value.itemType == 3 || res.value.itemType == 6) &&
1028
+ res.value.correctAnswer &&
1029
+ res.value.correctAnswer.length > 0
1030
+ ) {
1031
+ getQuestion({ itemId: res.value.correctAnswer }, (res) => {
1032
+ if (!res) {
1033
+ return;
1034
+ }
1035
+ if (typeof res === "string") res = JSON.parse(res);
1036
+ //取出题目数据
1037
+ this.$set(currentItem, "answer", res.data);
1038
+ });
1039
+ } else if (res.value.itemType == 7) {
1040
+ //组合单选题
1041
+ var answerArr = res.value.correctAnswer.split(",");
1042
+ var fiveArr = [],tempStr = ""; //将组合单选题答案五五放到一个数组展示
1043
+ answerArr && answerArr.length && answerArr.map(function (item, idx) {
1044
+ if (idx % 5 !== 0 || idx == 0) {
1045
+ tempStr += item;
1046
+ } else {
1047
+ fiveArr.push(tempStr);
1048
+ tempStr = item;
1049
+ }
1050
+ if (idx == answerArr.length - 1) {
1051
+ fiveArr.push(tempStr);
1052
+ }
1053
+ });
1054
+ this.$set(currentItem, "answer", fiveArr.join(";"));
1055
+ } else {
1056
+ this.$set(currentItem, "answer", res.value.correctAnswer);
1057
+ }
1058
+ if (res.value.itemAnalysis && res.value.itemAnalysis.length > 0) {
1059
+ getQuestion({ itemId: res.value.itemAnalysis }, (res) => {
1060
+ if (!res) {
1061
+ return;
1062
+ }
1063
+ //取出题目数据
1064
+ this.$set(currentItem, "analysis", res.data);
1065
+ });
1066
+ }
1067
+ }
1068
+ }
1069
+ );
1070
+ },
1071
+ getContent(itemInfo) {
1072
+ let currentItem = this.itemInfoList.find(
1073
+ (item) => item.itemInfoId == itemInfo.itemInfoId
1074
+ );
1075
+ getQuestion({ itemId: itemInfo.itemFileId }, (res) => {
1076
+ this.$set(currentItem, "content", res.data);
1077
+ });
1078
+ },
1079
+ choiceOrRemoveQuestion(itemInfo, isAdd) {
1080
+ this.$emit(
1081
+ "choiceOrRemoveQuestion",
1082
+ itemInfo,
1083
+ isAdd,
1084
+ this.defaultCategoryType
1085
+ );
1086
+ },
1087
+ headerSort(item) {
1088
+ console.log(item);
1089
+ if (item.key == "updateTime") {
1090
+ let dic = { order: item.sortOrder ? 1 : 0 };
1091
+ this.$emit("changeIndexParam", "changeOrder", JSON.stringify(dic));
1092
+ } else {
1093
+ let dic = { orderQuote: item.sortOrder ? 1 : 0 };
1094
+ this.$emit("changeIndexParam", "changeOrderQuote", JSON.stringify(dic));
1095
+ }
1096
+ },
1097
+ toShowAudio(itemInfo, itemIndex) {
1098
+ let dic = {
1099
+ questionIndex: itemIndex,
1100
+ fileId: itemInfo.audioFileId,
1101
+ };
1102
+ this.$emit("toShowAudio", "toShowAudio", JSON.stringify(dic));
1103
+ },
1104
+ // 来源点击
1105
+ sourceClick(itemBankType) {
1106
+ if (itemBankType == 5) {
1107
+ this.$emit("goQptk");
1108
+ return;
1109
+ }
1110
+ // this.currentSourceType = itemBankType;
1111
+ let dic = { itemBankType: itemBankType };
1112
+ // this.$emit('eventbus-emit', "changeIndexParam", "changeSource", JSON.stringify(dic))
1113
+ this.$emit(
1114
+ "eventbus-emit",
1115
+ "changeSource",
1116
+ "changeSource",
1117
+ JSON.stringify(dic)
1118
+ );
1119
+ this.$emit("changeIndexParam", "changeSource", JSON.stringify(dic));
1120
+ // this.$emit("changeSource", "changeSource", JSON.stringify(dic));
1121
+ },
1122
+ // 专题点击
1123
+ topicClick(topicId) {
1124
+ if (topicId == "all") {
1125
+ topicId = "";
1126
+ }
1127
+ this.selectedTopicId = topicId;
1128
+ let dic = { topicId: topicId };
1129
+ this.$emit("changeIndexParam", "changeTopic", JSON.stringify(dic));
1130
+ },
1131
+ // 题型点击
1132
+ categoryClick(itemCategoryId) {
1133
+ if (itemCategoryId == "all") {
1134
+ itemCategoryId = "";
1135
+ }
1136
+ this.selectedCategoryId = itemCategoryId;
1137
+ let dic = { itemCategoryId: itemCategoryId };
1138
+ this.$emit("changeIndexParam", "changeCategory", JSON.stringify(dic));
1139
+ },
1140
+ // 难度点击
1141
+ difficultyClick(difficultyId) {
1142
+ if (difficultyId == "all") {
1143
+ difficultyId = "";
1144
+ }
1145
+ this.selectedDifficultId = difficultyId;
1146
+ let dic = { itemDifficultyId: difficultyId };
1147
+ this.$emit("changeIndexParam", "changeDifficulty", JSON.stringify(dic));
1148
+ },
1149
+ // 年份
1150
+ yearClick(year) {
1151
+ if (year == "all") {
1152
+ year = "";
1153
+ }
1154
+ this.currentYear = year;
1155
+ let isEarly = year == "earlier" ? true : false;
1156
+ let _lastYear = this.yearList.slice(-2,-1)[0].id
1157
+ let lastYear = typeof _lastYear == 'number' ? _lastYear : 0;
1158
+ let dic = { year: isEarly ? lastYear - 1 : year, isEarlier:isEarly ? -1 : 1 };
1159
+ this.$emit("changeIndexParam", "selectYear", JSON.stringify(dic));
1160
+ },
1161
+ // 技能
1162
+ basicSkillClick(basicSkillsId) {
1163
+ if (basicSkillsId == "all") {
1164
+ basicSkillsId = "";
1165
+ }
1166
+ this.selectedSkillId = basicSkillsId;
1167
+ let dic = { itemBasicSkillId: basicSkillsId };
1168
+ this.$emit("changeIndexParam", "changeSkill", JSON.stringify(dic));
1169
+ },
1170
+ // 核心素养
1171
+ coreLiteracyClick(literacyId) {
1172
+ if (literacyId == "all") {
1173
+ literacyId = "";
1174
+ }
1175
+ let dic = { literacyId: literacyId };
1176
+ this.$emit("changeIndexParam", "changeLiteracy", JSON.stringify(dic));
1177
+ },
1178
+ changeMaterials(value) {
1179
+ console.log(value);
1180
+ this.currentCourse = []; //重置
1181
+ this.requestCourseListData(
1182
+ this.indexParam.subjectId,
1183
+ value[0],
1184
+ value[1],
1185
+ value[2]
1186
+ );
1187
+ },
1188
+ //递归获取当前选择的课程
1189
+ getCurrentCheckedCourse(arr, node) {
1190
+ if (node && node.value) {
1191
+ arr.unshift(node.value);
1192
+ if (node.parent) {
1193
+ this.getCurrentCheckedCourse(arr, node.parent);
1194
+ }
1195
+ }
1196
+ },
1197
+ changeCourse(value) {
1198
+ this.currentCourseId = value[value.length - 1];
1199
+ let dic = { courseId: this.currentCourseId };
1200
+ this.$emit("changeIndexParam", "changeCourseId", JSON.stringify(dic));
1201
+ },
1202
+ /*
1203
+ **请求题库首页数据
1204
+ * 只在首次进入该页面时请求
1205
+ */
1206
+ requestIndexData() {
1207
+ this.loadingError = false;
1208
+ this.goRequestIndexData();
1209
+ },
1210
+ // 首次进入该页面时请求获取用户信息
1211
+ goRequestIndexData() {
1212
+ let _this = this;
1213
+ console.log("getBank", this);
1214
+ var prepareInfo = this.leftInfo;
1215
+ console.log(prepareInfo, "prepareInfo1");
1216
+ if (prepareInfo && prepareInfo.eduLevelId) {
1217
+ var eduLevelId = prepareInfo.eduLevelId;
1218
+ var subjectId = prepareInfo.subjectId;
1219
+ var courseSrc = prepareInfo.courseSrc;
1220
+ var courseId = prepareInfo.courseId;
1221
+ _this.indexParam["courseSrc"] = courseSrc;
1222
+ _this.indexParam["studySectionId"] = eduLevelId;
1223
+ _this.indexParam["subjectId"] = subjectId;
1224
+ _this.indexParam["courseId"] = courseId;
1225
+ _this.currentCourseId = courseId;
1226
+ var teachMaterialId = prepareInfo.teachMaterialId;
1227
+ var gradeId = prepareInfo.gradeId;
1228
+
1229
+ let dom = document.getElementById("tk-detail-drawer-slot-id");
1230
+ let loadingInstance = Loading.service({
1231
+ target: dom,
1232
+ text: this.i18n.jiaZaiZhong,
1233
+ });
1234
+ console.log(prepareInfo, "prepareInfo");
1235
+ getBankIndex(
1236
+ {
1237
+ eduLevelId: eduLevelId,
1238
+ subjectId: subjectId,
1239
+ gradeId: gradeId,
1240
+ teachMaterialId: teachMaterialId,
1241
+ courseId: courseId,
1242
+ courseSrc: courseSrc,
1243
+ },
1244
+ (res) => {
1245
+ this.$nextTick(() => {
1246
+ // 以服务的方式调用的 Loading 需要异步关闭
1247
+ loadingInstance.close();
1248
+ });
1249
+ _this.isLoading = false;
1250
+ if (typeof res === "string") res = JSON.parse(res);
1251
+ if (res && res.code == 0) {
1252
+ console.log("getBank", res);
1253
+ //处理indexParam
1254
+ _this.indexParam.studySectionId = eduLevelId;
1255
+ _this.indexParam.subjectId = subjectId;
1256
+ _this.indexParam.itemBankType =
1257
+ res.value.itemBankQueryDto.itemBankType;
1258
+ _this.requestBankData();
1259
+ _this.totalRecord = res.value.totalRecord;
1260
+ // _this.pageInfo = {
1261
+ // currPage: res.value.currPage,
1262
+ // totalPage: res.value.totalPage,
1263
+ // perPage: res.value.perPage,
1264
+ // };
1265
+ //取出默认的题库类型
1266
+ _this.defaultCategoryType = res.value.itemBankQueryDto.itemBankType;
1267
+
1268
+ // _this.defaultSubjectList = res.value.defaultSubjectList;
1269
+ //请求教材版本
1270
+ _this.requestMaterialsGradesData(
1271
+ eduLevelId,
1272
+ subjectId,
1273
+ teachMaterialId,
1274
+ gradeId
1275
+ );
1276
+ //难度知识点是否必填
1277
+ _this.requestDifficultyAndKnowledgeSettingInfo(
1278
+ eduLevelId,
1279
+ subjectId
1280
+ );
1281
+ //请求专题数据
1282
+ _this.requestTopicData();
1283
+
1284
+ //判断是否展示“考点”tab
1285
+ _this.examPointEnableFlag = res.value.examPointEnableFlag;
1286
+ //取学年数组
1287
+ _this.years = res.value && res.value.yearList && res.value.yearList.length && res.value.yearList.map((item) => {
1288
+ return {
1289
+ id: item,
1290
+ label: item,
1291
+ };
1292
+ });
1293
+ if (_this.years.length) {
1294
+ _this.years.unshift({
1295
+ id: "all",
1296
+ label: _this.i18n.quanBu,
1297
+ });
1298
+ }
1299
+ //取来源数据
1300
+ _this.itemBankTypeList = res.value.itemBankTypeList;
1301
+ _this.itemBankTypeList.unshift({
1302
+ itemBankType: 5,
1303
+ itemBankTypeName: "精品题库",
1304
+ });
1305
+ //取技能数据
1306
+ _this.basicSkillsList = res.value.basicSkillsList;
1307
+ if (_this.basicSkillsList.length) {
1308
+ _this.basicSkillsList.unshift({
1309
+ basicSkillsId: "all",
1310
+ basicName: this.i18n.quanBu,
1311
+ });
1312
+ }
1313
+ //取核心素养数据
1314
+ _this.coreLiteracyFlag = res.value.coreLiteracyFlag;
1315
+ _this.coreLiteracyList = res.value && res.value.coreLiteracyList && res.value.coreLiteracyList.length && res.value.coreLiteracyList.map(item=>{
1316
+ return {
1317
+ literacyId: item.literacyId,
1318
+ literacyName: item.literacyName
1319
+ }
1320
+ }) || [];
1321
+ if (_this.coreLiteracyList && _this.coreLiteracyList.length) {
1322
+ _this.coreLiteracyList.unshift({
1323
+ literacyId: "all",
1324
+ literacyName: this.i18n.quanBu,
1325
+ });
1326
+ }
1327
+ console.log('_this.coreLiteracyList',_this.coreLiteracyList)
1328
+ //取题型数据
1329
+ _this.itemCategoryList = res.value.itemCategoryList;
1330
+ if (_this.itemCategoryList.length) {
1331
+ _this.itemCategoryList.unshift({
1332
+ itemCategoryId: "all",
1333
+ itemCategoryName: this.i18n.quanBu,
1334
+ itemType: -1,
1335
+ });
1336
+ }
1337
+
1338
+ //取难度数据
1339
+ _this.difficultyList = JSON.parse(
1340
+ JSON.stringify(res.value.cfgDifficultyList)
1341
+ );
1342
+ if (_this.difficultyList.length) {
1343
+ _this.difficultyList.unshift({
1344
+ difficultyId: "all",
1345
+ difficultyName: this.i18n.quanBu,
1346
+ });
1347
+ }
1348
+
1349
+ if (_this.indexParam.itemBankType == 4) {
1350
+ _this.allDifficultyList = JSON.parse(
1351
+ JSON.stringify(res.value.cfgDifficultyList)
1352
+ );
1353
+ _this.allDifficultyList.push(_this.undefinedDifficultyInfo);
1354
+ } else {
1355
+ _this.allDifficultyList = JSON.parse(
1356
+ JSON.stringify(res.value.cfgDifficultyList)
1357
+ );
1358
+ }
1359
+ //知识点
1360
+ _this.klList = res.value.knowledgeList;
1361
+ //考点
1362
+ _this.examPointList = res.value.examPointList;
1363
+ //获取该课程下关联的知识点
1364
+ //变式题默认当前原题的知识点
1365
+ if (_this.fromType == "variant") {
1366
+ if (_this.klidsList == "") {
1367
+ if (
1368
+ res.value &&
1369
+ res.value.klIds &&
1370
+ res.value.klIds.length > 0
1371
+ ) {
1372
+ _this.localKlIds = res.value.klIds;
1373
+ _this.$store.commit(
1374
+ "saveCurrentKnowledgeIds",
1375
+ res.value.klIds
1376
+ );
1377
+ } else if (_this.klList.length > 0) {
1378
+ _this.localKlIds = _this.getFirstKnowledgeId(_this.klList);
1379
+ }
1380
+ } else {
1381
+ _this.localKlIds = _this.klidsList;
1382
+ }
1383
+ } else {
1384
+ if (
1385
+ res.value &&
1386
+ res.value.klIds &&
1387
+ res.value.klIds.length > 0
1388
+ ) {
1389
+ _this.localKlIds = res.value.klIds;
1390
+ _this.$store.commit(
1391
+ "saveCurrentKnowledgeIds",
1392
+ res.value.klIds
1393
+ );
1394
+ } else if (_this.klList.length > 0) {
1395
+ _this.localKlIds = _this.getFirstKnowledgeId(_this.klList);
1396
+ }
1397
+ }
1398
+ //提供数据给Vuex
1399
+ _this.$store.commit("changeValue", {
1400
+ type: "itemCategory",
1401
+ val: _this.itemCategoryList || [],
1402
+ });
1403
+ _this.$store.commit("changeValue", {
1404
+ type: "difficults",
1405
+ val: _this.difficultyList || [],
1406
+ });
1407
+ _this.$store.commit("changeValue", {
1408
+ type: "basicSkillIdList",
1409
+ val: _this.basicSkillsList || [],
1410
+ });
1411
+ _this.$store.commit("changeValue", {
1412
+ type: "klIdList",
1413
+ val: _this.klList || [],
1414
+ });
1415
+ _this.$store.commit("changeValue", {
1416
+ type: "pointIdList",
1417
+ val: _this.examPointList || [],
1418
+ });
1419
+ _this.$store.commit("changeValue", {
1420
+ type: "enableShowPoint",
1421
+ val: _this.examPointEnableFlag || false,
1422
+ });
1423
+ } else {
1424
+ _this.loadingError = true;
1425
+ }
1426
+ }
1427
+ );
1428
+ }
1429
+ },
1430
+ /*
1431
+ **请求题库数据
1432
+ * 筛选条件时请求
1433
+ */
1434
+ requestBankData() {
1435
+ let _this = this;
1436
+ _this.loadingError = false;
1437
+ _this.loadingBankData = true;
1438
+ _this.goRequestBankData();
1439
+ },
1440
+ //筛选条件时请求获取用户信息
1441
+ goRequestBankData() {
1442
+ let dom = document.getElementById("bankData-drawer-slot-id");
1443
+ let loadingInstance = Loading.service({
1444
+ target: dom,
1445
+ text: this.i18n.jiaZaiZhong,
1446
+ });
1447
+ let _this = this;
1448
+ var prepareInfo = this.leftInfo;
1449
+ if (prepareInfo && prepareInfo.eduLevelId) {
1450
+ var eduLevelId = prepareInfo.eduLevelId;
1451
+ var subjectId = prepareInfo.subjectId;
1452
+ var courseSrc = prepareInfo.courseSrc;
1453
+ _this.indexParam["courseSrc"] = courseSrc;
1454
+ _this.indexParam["studySectionId"] = eduLevelId;
1455
+ _this.indexParam["subjectId"] = subjectId;
1456
+ _this.indexParam["klIds"] = this.localKlIds;
1457
+ getBankData(_this.indexParam, (res) => {
1458
+ _this.loadingBankData = false;
1459
+ if (typeof res === "string") res = JSON.parse(res);
1460
+ if (res && res.code == 0) {
1461
+ //判断是否展示“考点”tab
1462
+ // _this.examPointEnableFlag = res.value.examPointEnableFlag;
1463
+ //取出题目数据
1464
+ _this.loadingError = false;
1465
+ _this.itemInfoList = res.value && res.value.itemInfoList && res.value.itemInfoList.length && res.value.itemInfoList.map((item) => {
1466
+ return { ...item, answerDic: {} };
1467
+ });
1468
+
1469
+ _this.totalRecord = res.value.totalRecord;
1470
+ _this.currPage = res.value.currPage;
1471
+ if (_this.itemInfoList.length >= _this.totalRecord) {
1472
+ _this.hasMore = false;
1473
+ } else {
1474
+ _this.hasMore = true;
1475
+ }
1476
+ _this.pageInfo = {
1477
+ currPage: res.value.currPage,
1478
+ totalPage: res.value.totalPage,
1479
+ perPage: res.value.perPage,
1480
+ };
1481
+ loadingInstance.close();
1482
+ } else {
1483
+ //请求题目数据报错
1484
+ _this.loadingError = true;
1485
+ _this.itemInfoList = [];
1486
+ _this.pageInfo = {};
1487
+ }
1488
+ });
1489
+ }
1490
+ },
1491
+ /*
1492
+ **获取教材版本数据
1493
+ */
1494
+ requestMaterialsGradesData(
1495
+ eduLevelId,
1496
+ subjectId,
1497
+ teachMaterialId,
1498
+ gradeId
1499
+ ) {
1500
+ console.log("请求教材");
1501
+ let _this = this;
1502
+ _this.courseCascaderList = [];
1503
+ getMaterialsGrades(
1504
+ {
1505
+ eduLevelId: eduLevelId,
1506
+ subjectId: subjectId,
1507
+ teachMaterialId: teachMaterialId,
1508
+ gradeId: gradeId,
1509
+ },
1510
+ (res) => {
1511
+ if (!res) {
1512
+ return;
1513
+ }
1514
+ if (typeof res === "string") res = JSON.parse(res);
1515
+ if (res.code == 0) {
1516
+ _this.currentCourseValue = [
1517
+ res.value.checkTeachMaterialId,
1518
+ res.value.checkClassificationId,
1519
+ res.value.checkTermIndex,
1520
+ ];
1521
+ _this.currentMaterials = [];
1522
+ _this.materialsGradesList = res.value.list;
1523
+
1524
+ _this.requestCourseListData(
1525
+ subjectId,
1526
+ res.value.checkTeachMaterialId,
1527
+ res.value.checkClassificationId,
1528
+ res.value.checkTermIndex
1529
+ );
1530
+ }
1531
+ }
1532
+ );
1533
+ },
1534
+ /*
1535
+ **获取知识点、难度配置,是否必填
1536
+ */
1537
+ requestDifficultyAndKnowledgeSettingInfo(eduLevelId, subjectId) {
1538
+ let _this = this;
1539
+ getKldftNecessary(
1540
+ {
1541
+ eduLevelId: eduLevelId,
1542
+ subjectId: subjectId,
1543
+ },
1544
+ (res) => {
1545
+ if (!res) {
1546
+ return;
1547
+ }
1548
+ if (typeof res === "string") res = JSON.parse(res);
1549
+ if (res.code == 0) {
1550
+ if (res.value && res.value == 2) {
1551
+ _this.$store.commit("changeValue", {
1552
+ type: "knowledgeIsRequired",
1553
+ val: false,
1554
+ });
1555
+ }
1556
+ }
1557
+ }
1558
+ );
1559
+ },
1560
+ /*
1561
+ ** 获取知识点数据
1562
+ */
1563
+ requestKnowledgeData() {
1564
+ let _this = this;
1565
+ getKnowledge(
1566
+ {
1567
+ eduLevelId: _this.indexParam.studySectionId,
1568
+ subjectId: _this.indexParam.subjectId,
1569
+ },
1570
+ (res) => {
1571
+ if (!res) {
1572
+ return;
1573
+ }
1574
+ if (typeof res === "string") res = JSON.parse(res);
1575
+ if (res.code == 0) {
1576
+ _this.klList = res.value;
1577
+ }
1578
+ }
1579
+ );
1580
+ },
1581
+ /*
1582
+ ** 获取专题数据
1583
+ */
1584
+ requestTopicData() {
1585
+ let _this = this;
1586
+ getTopic(
1587
+ {
1588
+ eduLevelId: _this.indexParam.studySectionId,
1589
+ topicSource: _this.indexParam.itemBankType == 2 ? 1 : "",
1590
+ },
1591
+ (res) => {
1592
+ if (!res) {
1593
+ return;
1594
+ }
1595
+ if (typeof res === "string") res = JSON.parse(res);
1596
+ if (res.code == 0) {
1597
+ _this.topicList = res.value;
1598
+ if (_this.topicList.length) {
1599
+ _this.topicList.unshift({
1600
+ topicId: "all",
1601
+ topicName: this.i18n.quanBu,
1602
+ });
1603
+ }
1604
+
1605
+ var hasTopic = false;
1606
+ for (var i = 0; i < _this.topicList.length; i++) {
1607
+ var topicItem = _this.topicList[i];
1608
+ if (topicItem.topicId == _this.indexParam.topicId) {
1609
+ hasTopic = true;
1610
+ break;
1611
+ }
1612
+ }
1613
+ if (!hasTopic) {
1614
+ _this.indexParam.topicId = "";
1615
+ let dic = { selectedTopicId: "" };
1616
+ this.$emit(
1617
+ "toChangeSelectedTopicId",
1618
+ "toChangeSelectedTopicId",
1619
+ JSON.stringify(dic)
1620
+ );
1621
+ }
1622
+ }
1623
+ }
1624
+ );
1625
+ },
1626
+ /*
1627
+ **获取默认的第一个子知识点
1628
+ */
1629
+ getFirstKnowledgeId(knowledgeList) {
1630
+ var tempKL = knowledgeList[0];
1631
+ if (
1632
+ tempKL.hasChild &&
1633
+ tempKL.knowledgeDtoList &&
1634
+ tempKL.knowledgeDtoList.length > 0
1635
+ ) {
1636
+ return this.getFirstKnowledgeId(tempKL.knowledgeDtoList);
1637
+ } else {
1638
+ return tempKL.klId;
1639
+ }
1640
+ },
1641
+ /*
1642
+ ** 获取课程数据
1643
+ * teachMaterialId:教材版本id
1644
+ * classificationId:册别id
1645
+ * termIndex:学期号
1646
+ */
1647
+ requestCourseListData(
1648
+ subjectId,
1649
+ teachMaterialId,
1650
+ classificationId,
1651
+ termIndex
1652
+ ) {
1653
+ let _this = this;
1654
+ getEditorCourse(
1655
+ {
1656
+ subjectId: subjectId,
1657
+ teachMaterialId: teachMaterialId,
1658
+ termIndex: termIndex,
1659
+ classificationId: classificationId,
1660
+ },
1661
+ (res) => {
1662
+ if (!res) {
1663
+ return;
1664
+ }
1665
+ if (typeof res === "string") res = JSON.parse(res);
1666
+ if (res.code == 0) {
1667
+ _this.courseCascaderList = res.value.list;
1668
+ }
1669
+ }
1670
+ );
1671
+ },
1672
+ /*
1673
+ **请求题库数据
1674
+ * 筛选条件时请求
1675
+ */
1676
+ requestPageBank(param) {
1677
+ let _this = this;
1678
+ if (!param["itemBankType"]) {
1679
+ return;
1680
+ }
1681
+ _this.pageError = false;
1682
+ _this.drawerPageError = false;
1683
+ _this.loading = true;
1684
+ getBankData(param, (res) => {
1685
+ _this.loading = false;
1686
+ if (typeof res === "string") res = JSON.parse(res);
1687
+ if (res && res.code == 0) {
1688
+ //取出题目数据
1689
+ _this.drawerPageError = false;
1690
+ _this.currPage = res.value.currPage;
1691
+ _this.itemInfoList = _this.itemInfoList.concat(
1692
+ res.value.itemInfoList
1693
+ );
1694
+ if (_this.itemInfoList.length >= res.value.totalRecord) {
1695
+ _this.hasMore = false;
1696
+ } else {
1697
+ _this.hasMore = true;
1698
+ }
1699
+ } else {
1700
+ //请求题目数据报错
1701
+ _this.drawerPageError = true;
1702
+ }
1703
+ });
1704
+ },
1705
+ clickRetryBtn() {
1706
+ this.$emit("changeIndexParam", "retryRequest", "retryRequest");
1707
+ },
1708
+ },
1709
+ computed: {},
1710
+ created() {},
1711
+ mounted() {
1712
+ this.setListener();
1713
+ this.requestIndexData();
1714
+ if (!this.host.includes("teach.focusteach.com")) {
1715
+ this.host = "http://teach.focusteach.com:8085";
1716
+ }
1717
+ },
1718
+ };
1719
+ </script>
1720
+
1721
+ <style lang="scss" scoped>
1722
+ @import "../../../style/icon/style.css";
1723
+ @import "./index.scss";
1724
+ </style>
1725
+