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