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