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