@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,1482 @@
1
+ <!--试卷头部操作栏-->
2
+ <template>
3
+ <div class="exam-drawer">
4
+ <ft-drawer>
5
+ <ft-tabs
6
+ :options="tabList"
7
+ :activeName="activeTab"
8
+ @click="tabClick"
9
+ ></ft-tabs>
10
+ <div class="cascader" v-show="activeTab == 'course'">
11
+ <ft-cascader
12
+ :key="isResouceShow"
13
+ :value.sync="currentMaterials"
14
+ :options="materialsGradesList"
15
+ :disabled="materialsGradesList.length > 0 ? false : true"
16
+ :props="{
17
+ expandTrigger: 'click',
18
+ }"
19
+ :placeholder="
20
+ materialsGradesList.length > 0
21
+ ? i18n.qingXuanZeJiaoCaiBanBen
22
+ : i18n.zanWuJiaoCaiBanBenKeXuan
23
+ "
24
+ @change="materialChange"
25
+ ></ft-cascader>
26
+ <ft-cascader
27
+ ref="course"
28
+ selfRef="courseCascader"
29
+ :value.sync="currentCourse"
30
+ key="right"
31
+ :options="courseList"
32
+ :disabled="courseList.length > 0 ? false : true"
33
+ :props="{
34
+ expandTrigger: 'click',
35
+ value: 'courseId',
36
+ label: 'courseName',
37
+ children: 'courses',
38
+ checkStrictly: true,
39
+ }"
40
+ :placeholder="
41
+ materialsGradesList.length > 0 && courseList.length > 0
42
+ ? i18n.qingXuanZeZhangJie
43
+ : i18n.zanWuZhangJieKeXuan
44
+ "
45
+ @change="courseChange"
46
+ ></ft-cascader>
47
+ </div>
48
+ <div class="screen">
49
+ <ft-radio
50
+ v-show="itemBankTypeList.length"
51
+ :label="i18n.laiYuan"
52
+ :options="itemBankTypeList"
53
+ :defaultValue="indexParam.resourceSourceType"
54
+ :props="{
55
+ label: 'itemBankTypeName',
56
+ id: 'itemBankType',
57
+ }"
58
+ @radio-click="sourceClick"
59
+ ></ft-radio>
60
+ <ft-radio
61
+ v-show="
62
+ examTopicDtos.length > 0 &&
63
+ screenType == 2 &&
64
+ indexParam.resourceSourceType != 4 &&
65
+ indexParam.resourceType == 13
66
+ "
67
+ :label="i18n.zhuanTi"
68
+ :options="examTopicDtos"
69
+ :defaultValue="
70
+ indexParam.examTopicId ? indexParam.examTopicId : 'all'
71
+ "
72
+ :props="{
73
+ label: 'examTopicName',
74
+ id: 'examTopicId',
75
+ }"
76
+ @radio-click="topicClick"
77
+ ></ft-radio>
78
+ <ft-radio
79
+ v-show="
80
+ gradeList.length > 0 &&
81
+ screenType == 2 &&
82
+ indexParam.resourceSourceType != 4 &&
83
+ indexParam.resourceType == 13 &&
84
+ (indexParam.examTopicName == '单元测验' ||
85
+ indexParam.examTopicName == '月考试卷' ||
86
+ indexParam.examTopicName == '期中试卷' ||
87
+ indexParam.examTopicName == '期末试卷' ||
88
+ indexParam.examTopicName == '假期作业')
89
+ "
90
+ :label="i18n.ceBie"
91
+ :options="gradeList"
92
+ :defaultValue="defaultGradeId"
93
+ :props="{
94
+ label: 'gradeName',
95
+ id: 'gradeId',
96
+ }"
97
+ @radio-click="gradeClick"
98
+ ></ft-radio>
99
+ <ft-radio
100
+ v-show="yearList.length && indexParam.resourceSourceType != 4 &&
101
+ indexParam.resourceType == 13
102
+ "
103
+ :label="i18n.nianFen"
104
+ :options="yearList"
105
+ :defaultValue="indexParam.year ? indexParam.year : 'all'"
106
+ @radio-click="yearClick"
107
+ ></ft-radio>
108
+ <ft-radio
109
+ :label="i18n.diQu"
110
+ v-show="
111
+ provinceList.length > 0 &&
112
+ indexParam.resourceSourceType != 4 &&
113
+ indexParam.resourceType == 13
114
+ "
115
+ >
116
+ <ft-area
117
+ slot="area"
118
+ :provinceList="provinceList"
119
+ :areaList="areaList"
120
+ :districtList="districtList"
121
+ :indexParam="indexParam"
122
+ :defaultPosition="defaultPosition"
123
+ @change="areaChange"
124
+ @requestAreasData="requestAreasData"
125
+ ></ft-area>
126
+ </ft-radio>
127
+ <ft-radio
128
+ v-show="itemTypeList.length > 0 && indexParam.resourceType == 1"
129
+ label="类型"
130
+ :options="itemTypeList"
131
+ :defaultValue="
132
+ indexParam.resourceShareCategoryType
133
+ ? indexParam.resourceShareCategoryType
134
+ : 'all'
135
+ "
136
+ :props="{
137
+ label: 'value',
138
+ id: 'id',
139
+ }"
140
+ @radio-click="typeClick"
141
+ ></ft-radio>
142
+ <ft-radio
143
+ v-show="
144
+ currentZoneList.length > 0 &&
145
+ screenType == 2 &&
146
+ ((indexParam.resourceSourceType == 4 &&
147
+ indexParam.resourceType == 13) ||
148
+ indexParam.resourceType != 13)
149
+ "
150
+ :label="i18n.zhuanQu"
151
+ :options="currentZoneList"
152
+ :defaultValue="zoneId"
153
+ :props="{
154
+ label: 'zoneName',
155
+ id: 'zoneId',
156
+ }"
157
+ @radio-click="zoneClick"
158
+ ></ft-radio>
159
+ </div>
160
+ <div
161
+ v-infinite-scroll="changeCurrentPage"
162
+ :infinite-scroll-disabled="!hasMore"
163
+ infinite-scroll-distance="40"
164
+ >
165
+ <ft-header
166
+ v-show="itemInfoList.length"
167
+ :options="sortList"
168
+ @sort="headerSort"
169
+ default-sort="updateTime"
170
+ >
171
+ {{ i18n.gong }}{{ totalRecord }}{{ i18n.geZiYuan }}
172
+ </ft-header>
173
+ <ft-exam
174
+ v-for="item in itemInfoList"
175
+ :key="item.resourceId"
176
+ :itemInfo="item"
177
+ :defaultCategoryType="defaultCategoryType"
178
+ :resourceName="item.resourceName"
179
+ :countryShare="item.countryShare"
180
+ :directoryName="item.directoryName"
181
+ :updateTime="item.updateTime"
182
+ :resourceType="item.resourceType"
183
+ :convertStatus="item.convertStatus"
184
+ :itemCount="item.itemCount"
185
+ :userRealName="item.userRealName"
186
+ :domainName="item.domainName"
187
+ :year="item.year"
188
+ :provinceName="item.provinceName"
189
+ :areaName="item.areaName"
190
+ :districtName="item.districtName"
191
+ :referenceCount="item.referenceCount"
192
+ @click="goExamDetail"
193
+ :src="getShowIcon(item)"
194
+ >
195
+ </ft-exam>
196
+ <ft-empty
197
+ v-show="!loadingBankData && !loadingError && itemInfoList.length == 0"
198
+ :message="i18n.zanWuShuJu"
199
+ >
200
+ <img
201
+ class="empty-img"
202
+ :src="host + '/assets/prepare-course/list/img/empty.fcdd9ba5.png'"
203
+ alt=""
204
+ />
205
+ </ft-empty>
206
+ <ft-error
207
+ v-show="!loadingBankData && loadingError"
208
+ @retry="clickRetryBtn"
209
+ >
210
+ <img
211
+ class="error-img"
212
+ :src="host + '/assets/prepare-course/list/img/error.7e494464.png'"
213
+ alt=""
214
+ />
215
+ </ft-error>
216
+ <div v-show="loadingBankData" class="loading"></div>
217
+ </div>
218
+ <div class="page-contro" v-show="itemInfoList.length > 0">
219
+ {{
220
+ pageError
221
+ ? i18n.jiaZaiShiBai
222
+ : loading
223
+ ? i18n.jiaZaiZhong
224
+ : hasMore
225
+ ? ""
226
+ : i18n.jiaZaiWanBi
227
+ }}
228
+ </div>
229
+ </ft-drawer>
230
+ </div>
231
+ </template>
232
+
233
+ <script>
234
+ import FtTabs from "../../tabs/index";
235
+ import FtCascader from "../../cascader/index";
236
+ import FtHeader from "../../header/index";
237
+ import FtRadio from "../../radio/index";
238
+ import FtExam from "../../exam/index";
239
+ import FtDrawer from "../../drawer/index";
240
+ import FtEmpty from "../../empty/index";
241
+ import FtError from "../../error/index";
242
+ import FtArea from "../../area/index";
243
+ // import this from "../../core/event-bus";
244
+ import { Loading } from "element-ui";
245
+ import {
246
+ getResourcePoolIndex,
247
+ getResourcePoolList,
248
+ getMaterialsGrades,
249
+ getEditorCourse,
250
+ getProvince,
251
+ getUserOperate,
252
+ getClassifications,
253
+ getZoneList,
254
+ getAreas,
255
+ setUserOperate,
256
+ getQptkSubjectID,
257
+ } from "../../../api/index";
258
+ import { getIcon, getUrlKey } from "../../../utils/common";
259
+ import * as CONSTANTS from "../../../utils/Constants.js";
260
+ import infiniteScroll from "vue-infinite-scroll";
261
+ //父组件是paperEdit.vue
262
+ export default {
263
+ name: "FtExamDrawer",
264
+ components: {
265
+ [Loading.name]: Loading,
266
+ FtTabs,
267
+ FtCascader,
268
+ FtHeader,
269
+ FtRadio,
270
+ FtExam,
271
+ FtDrawer,
272
+ FtEmpty,
273
+ FtError,
274
+ FtArea,
275
+ },
276
+ directives: { infiniteScroll },
277
+ props: {
278
+ leftInfo: {
279
+ type: Object,
280
+ required: true,
281
+ },
282
+ itemList: {
283
+ type: Array,
284
+ default: () => [],
285
+ required: true,
286
+ },
287
+ i18n: {
288
+ type: Object,
289
+ required: true,
290
+ },
291
+ },
292
+
293
+ data() {
294
+ return {
295
+ host: window.location.origin,
296
+ sortList: [
297
+ {
298
+ label: "引用人数",
299
+ key: "count",
300
+ },
301
+ {
302
+ label: "更新时间",
303
+ key: "updateTime",
304
+ },
305
+ ],
306
+ activeTab: "course",
307
+ tabList: [
308
+ {
309
+ id: "course",
310
+ label: this.i18n.tongBuKeCheng,
311
+ },
312
+ {
313
+ id: "exam",
314
+ label: this.i18n.shiJuanZhuanQu,
315
+ },
316
+ ],
317
+ currentMaterials: "",
318
+ currentCourse: "",
319
+ //首次请求
320
+ isLoading: true,
321
+ //是否正在加载资源数据
322
+ loadingBankData: false,
323
+ //加载资源数据是否失败
324
+ loadingError: false,
325
+ //资源数据集合
326
+ itemInfoList: [],
327
+ //资源总数
328
+ totalRecord: undefined,
329
+ //分页信息
330
+ pageInfo: {},
331
+ //同步课程列表
332
+ courseList: [],
333
+ //教材版本列表
334
+ materialsGradesList: [],
335
+ //index接口请求参数
336
+ indexParam: {
337
+ teachMaterialId: "", //教材版本id
338
+ gradeId: "", //册别id
339
+ subjectId: "",
340
+ eduLevelId: "",
341
+ resourceSourceType: 3, //资源来源
342
+ resourceType: 13,
343
+ year: "",
344
+ provinceId: "",
345
+ areaId: "",
346
+ districtId: "",
347
+ resourceShareCategoryType: "", //资源分享类型
348
+ examTopicId: "",
349
+ examTopicName: "",
350
+ courseId: "", //课程id
351
+ orderType: 2, //排序方式:*默认 0:引用人数倒序、更新时间倒序;*1:引用人数倒序、更新时间正序;*2:引用人数正序,更新时间倒序;*3:引用人数正序、更新时间正序
352
+ page: 1, //页码
353
+ },
354
+ //默认的题库类型
355
+ defaultCategoryType: -1,
356
+ //当前选择的教材版本信息
357
+ currentCourseValue: [],
358
+ //来源列表
359
+ itemBankTypeList: [],
360
+ //年份列表
361
+ years: [],
362
+ //类型列表
363
+ itemTypeList: [],
364
+ //默认的试卷专题
365
+ examTopicDto: {},
366
+ //试卷专题
367
+ examTopicDtos: [],
368
+ //index接口请求参数
369
+ indexParam: {},
370
+ //当前引用的文件夹信息
371
+ currentDirectory: undefined,
372
+ //筛选视图类型
373
+ screenType: 1,
374
+ //专区id
375
+ zoneId: "",
376
+ currPage: 0, //当前页面
377
+ pageError: false,
378
+ loading: false,
379
+ hasMore: true,
380
+ //当前的教材版本等信息集合
381
+ currentParamInfo: {},
382
+ //默认地区(优先展示用户上次选择的地区,没有则展示用户所在地区)
383
+ defaultPosition: {
384
+ countryId: 1,
385
+ provinceId: "", //省
386
+ areaId: "", //市
387
+ districtId: "", //区
388
+ },
389
+ //省份数据
390
+ provinceList: [],
391
+ //默认的册别
392
+ defaultGradeId: "",
393
+ //册别G
394
+ gradeList: [],
395
+ //
396
+ currentZoneList: [],
397
+ isFirstIndex: true, //首次加载该题库
398
+ isResouceShow: 0,
399
+ firstRequestCourse: true, //是否首次加载课程
400
+ districtList: [],
401
+ areaList: [],
402
+ yearList: [],
403
+ };
404
+ },
405
+ watch: {
406
+ "$store.state.resourceInfo": function (n, o) {
407
+ if (this.isFirstIndex) {
408
+ this.isFirstIndex = false;
409
+ this.asyncGetUserOperateDataInfo();
410
+ }
411
+ if (!this.currentCourse || this.currentCourse.length == 0) {
412
+ this.currentCourse = n.courseId || (n.list && n.list.courseId);
413
+ }
414
+ },
415
+ materialsGradesList(newValue, oldValue) {
416
+ this.isResouceShow += 1;
417
+ if (newValue.length > 0) {
418
+ let firstV = "";
419
+ let secondV = "";
420
+ let thirdV = "";
421
+ newValue.forEach((element) => {
422
+ if (element.value == this.currentCourseValue[0]) {
423
+ firstV = element.value;
424
+ element.children.forEach((item) => {
425
+ if (item.value == this.currentCourseValue[1]) {
426
+ secondV = item.value;
427
+ item.children.forEach((option) => {
428
+ if (option.value == this.currentCourseValue[2]) {
429
+ thirdV = option.value;
430
+ }
431
+ });
432
+ }
433
+ });
434
+ }
435
+ });
436
+ this.currentMaterials = [firstV, secondV, thirdV];
437
+ }
438
+ },
439
+ courseList(newValue, oldValue) {
440
+ this.courseList = newValue;
441
+ if (
442
+ this.firstRequestCourse &&
443
+ this.courseList &&
444
+ this.courseList.length > 0
445
+ ) {
446
+ this.firstRequestCourse = false;
447
+ setTimeout(() => {
448
+ let checkedCourseArr = [];
449
+ let checkedNodes =
450
+ // this.$refs.courseCascaderOne.getCheckedNodes(false);
451
+ this.$refs.course.$refs.courseCascader.getCheckedNodes(false);
452
+ if (checkedNodes && checkedNodes.length > 0) {
453
+ let currentNode = checkedNodes[0];
454
+ this.getCurrentCheckedCourse(checkedCourseArr, currentNode);
455
+ this.currentCourse = checkedCourseArr;
456
+ }
457
+ }, 200);
458
+ }
459
+ },
460
+ years(newValue, oldValue) {
461
+ if (newValue && newValue.length) {
462
+ this.yearList = []
463
+ if(newValue.length > 6){
464
+ let temp = newValue.slice(0,6)
465
+ this.yearList = [...this.yearList, ...temp,{id: 'earlier', label: '更早'}]
466
+ }else {
467
+ newValue.forEach((element) => {
468
+ this.yearList.push(element);
469
+ });
470
+ }
471
+ } else {
472
+ this.yearList = [];
473
+ }
474
+ },
475
+ },
476
+ created() {},
477
+ mounted() {
478
+ let _this = this;
479
+ _this.setListener();
480
+ if (!this.host.includes("teach.focusteach.com")) {
481
+ this.host = "http://teach.focusteach.com:8085";
482
+ }
483
+ },
484
+ methods: {
485
+ tabClick(value) {
486
+ this.activeTab = value;
487
+ let dic = {
488
+ screenType: this.activeTab == "course" ? 1 : 2,
489
+ };
490
+ this.$emit("changeResourceParam", "changeTab", JSON.stringify(dic));
491
+ },
492
+ clickRetryBtn() {
493
+ this.$emit("changeIndexParam", "retryRequest", "retryRequest");
494
+ },
495
+ goExamDetail(itemInfo) {
496
+ let dic = {
497
+ activeIndex: 4,
498
+ currentIndexParam: this.indexParam,
499
+ currentPaperItem: itemInfo,
500
+ };
501
+ this.$emit(
502
+ "goExamDetail",
503
+ "changeDrawerType",
504
+ "changeDrawerType",
505
+ JSON.stringify(dic)
506
+ );
507
+ // this.$emit(
508
+ // "changeDrawerType",
509
+ // "changeDrawerType",
510
+ // JSON.stringify(dic)
511
+ // );
512
+ },
513
+ getShowIcon(paperInfo) {
514
+ switch (paperInfo.resourceType + "") {
515
+ case CONSTANTS.NET_RESOURCE:
516
+ return this.host + "/assets/prepare-course/list/img/web.41562e3b.svg";
517
+ case CONSTANTS.PRACTICE:
518
+ return getIcon(paperInfo.resourceFileName, this.host);
519
+ case CONSTANTS.EXAM:
520
+ return (
521
+ this.host +
522
+ "/assets/prepare-course/list/img/cloud_txt_24.87b9d2ae.svg"
523
+ );
524
+ case CONSTANTS.DESIGN:
525
+ return (
526
+ this.host +
527
+ "/assets/prepare-course/list/img/cloud_instructional_design_24.22b6584f.svg"
528
+ );
529
+ default:
530
+ return (
531
+ this.host +
532
+ "/assets/prepare-course/list/img/cloud_unknown_24.31e4ddb3.svg"
533
+ );
534
+ }
535
+ },
536
+ sourceClick(itemBankType) {
537
+ let _this = this;
538
+ if (itemBankType == 5) {
539
+ this.$emit("goQptk");
540
+ return;
541
+ }
542
+ // this.currentSourceType = itemBankType;
543
+ let dic = { resourceSourceType: itemBankType };
544
+ this.$emit("changeResourceParam", "changeSource", JSON.stringify(dic));
545
+ this.$emit(
546
+ "eventbus-emit",
547
+ "changeSource",
548
+ "changeSource",
549
+ JSON.stringify(dic)
550
+ );
551
+ },
552
+ topicClick(id, topicItem) {
553
+ let topicId = "";
554
+ let topicName = "";
555
+ if (topicItem.examTopicId == "all") {
556
+ topicId = "";
557
+ topicName = "";
558
+ } else {
559
+ topicId = topicItem.examTopicId;
560
+ topicName = topicItem.examTopicName;
561
+ }
562
+ let dic = {
563
+ examTopicId: topicId,
564
+ examTopicName: topicName,
565
+ };
566
+ this.$emit(
567
+ "changeResourceParam",
568
+ "changeExamTopicId",
569
+ JSON.stringify(dic)
570
+ );
571
+ },
572
+ gradeClick(gradeId) {
573
+ let dic = { gradeId: gradeId };
574
+ this.$emit("changeResourceParam", "changeGradeId", JSON.stringify(dic));
575
+ },
576
+ yearClick(year) {
577
+ if (year == "all") {
578
+ year = "";
579
+ }
580
+ let isEarly = year == "earlier" ? true : false;
581
+ let _lastYear = this.yearList.slice(-2,-1)[0].id
582
+ let lastYear = typeof _lastYear == 'number' ? _lastYear : 0;
583
+ let dic = { year: isEarly ? lastYear - 1 : year, isEarlier:isEarly ? -1 : 1 };
584
+ console.log('dic is...',dic)
585
+ this.$emit("changeResourceParam", "selectYear", JSON.stringify(dic));
586
+ },
587
+ typeClick(itemTypeId) {
588
+ if (itemTypeId == "all") {
589
+ itemTypeId = "";
590
+ }
591
+ let dic = { resourceShareCategoryType: itemTypeId };
592
+ this.$emit("changeResourceParam", "changeType", JSON.stringify(dic));
593
+ },
594
+ zoneClick(itemZoneId) {
595
+ if (itemZoneId == "all") {
596
+ itemZoneId = "";
597
+ }
598
+ let dic = { courseId: itemZoneId };
599
+ this.$emit("changeResourceParam", "changeType", JSON.stringify(dic));
600
+ },
601
+ areaChange(type, id, provinceId, areaId) {
602
+ switch (type) {
603
+ case "province":
604
+ let dic;
605
+ if (id != -1) {
606
+ this.requestAreasData(id);
607
+ dic = {
608
+ provinceId: id,
609
+ areaId: "",
610
+ districtId: "",
611
+ };
612
+ } else {
613
+ dic = {
614
+ provinceId: "",
615
+ areaId: "",
616
+ districtId: "",
617
+ };
618
+ }
619
+ this.$emit("changeResourceParam", "changeArea", JSON.stringify(dic));
620
+ this.setUserOperateDataInfo(dic);
621
+ break;
622
+ case "area":
623
+ if (id != -1) {
624
+ var tempDic = { id: -1, name: "不限" };
625
+ this.areaList.forEach((element) => {
626
+ if (element.id == id) {
627
+ this.districtList = [];
628
+ this.districtList = this.districtList.concat(
629
+ tempDic,
630
+ element.districtList
631
+ );
632
+ }
633
+ });
634
+ let dic = {
635
+ provinceId: provinceId,
636
+ areaId: id,
637
+ districtId: "",
638
+ };
639
+ this.$emit(
640
+ "changeResourceParam",
641
+ "changeArea",
642
+ JSON.stringify(dic)
643
+ );
644
+ this.setUserOperateDataInfo(dic);
645
+ } else {
646
+ let dic = {
647
+ provinceId: provinceId,
648
+ areaId: "",
649
+ districtId: "",
650
+ };
651
+ this.$emit(
652
+ "changeResourceParam",
653
+ "changeArea",
654
+ JSON.stringify(dic)
655
+ );
656
+ this.setUserOperateDataInfo(dic);
657
+ }
658
+ break;
659
+ case "district":
660
+ let tempDistrictId = "";
661
+ if (id != -1) {
662
+ tempDistrictId = id;
663
+ }
664
+ dic = {
665
+ provinceId: provinceId,
666
+ areaId: areaId,
667
+ districtId: tempDistrictId,
668
+ };
669
+ this.$emit("changeResourceParam", "changeArea", JSON.stringify(dic));
670
+ this.setUserOperateDataInfo(dic);
671
+ break;
672
+ }
673
+ },
674
+ //记录用户选择的地区,存入云端
675
+ setUserOperateDataInfo(obj) {
676
+ obj["countryId"] = 1;
677
+ var content = JSON.stringify(obj);
678
+ var params = {
679
+ operateLog: content,
680
+ operateLogType: 5,
681
+ };
682
+ setUserOperate(
683
+ params,
684
+ function (res) {
685
+ if (res && res.code == 0) {
686
+ }
687
+ },
688
+ function () {}
689
+ );
690
+ },
691
+ requestAreasData(provinceId, areaId) {
692
+ let _this = this;
693
+ getAreas({ provinceId: provinceId }, (res) => {
694
+ if (!res) {
695
+ return;
696
+ }
697
+ if (typeof res === "string") res = JSON.parse(res);
698
+ if (res.code == 0) {
699
+ _this.areaList = [];
700
+ var dic = { id: -1, name: "不限" };
701
+ _this.areaList = _this.areaList.concat(dic, res.value);
702
+ if (areaId && areaId > 0) {
703
+ _this.areaList.forEach((element) => {
704
+ if (element.id == areaId) {
705
+ _this.districtList = [];
706
+ _this.districtList = _this.districtList.concat(
707
+ dic,
708
+ element.districtList
709
+ );
710
+ return;
711
+ }
712
+ });
713
+ }
714
+ }
715
+ });
716
+ },
717
+ materialChange(value) {
718
+ let dic = {
719
+ teachMaterialId: value[0],
720
+ gradeId: value[1],
721
+ termIndex: value[2],
722
+ courseId: "",
723
+ page: 1,
724
+ };
725
+ this.$emit(
726
+ "changeResourceParam",
727
+ "changeMaterialId",
728
+ JSON.stringify(dic)
729
+ );
730
+ this.requestCourseListData(
731
+ this.indexParam["subjectId"],
732
+ value[0],
733
+ value[1],
734
+ value[2]
735
+ );
736
+ },
737
+ courseChange(value) {
738
+ let dic = { courseId: value[value.length - 1] };
739
+ this.$emit("changeResourceParam", "changeCourseId", JSON.stringify(dic));
740
+ },
741
+ headerSort(item) {
742
+ if (item.key == "updateTime") {
743
+ let dic = { orderType: item.sortOrder ? 3 : 2 };
744
+ this.$emit(
745
+ "changeResourceParam",
746
+ "changeOrderType",
747
+ JSON.stringify(dic)
748
+ );
749
+ } else {
750
+ let dic = { orderType: item.sortOrder ? 1 : 0 };
751
+ this.$emit(
752
+ "changeResourceParam",
753
+ "changeOrderType",
754
+ JSON.stringify(dic)
755
+ );
756
+ }
757
+ },
758
+ //递归获取当前选择的课程
759
+ getCurrentCheckedCourse(arr, node) {
760
+ if (node && node.value) {
761
+ arr.unshift(node.value);
762
+ if (node.parent) {
763
+ this.getCurrentCheckedCourse(arr, node.parent);
764
+ }
765
+ }
766
+ },
767
+ setListener() {
768
+ let _this = this;
769
+ //改变indexParam参数,重新请求 list 接口
770
+ this.$off("changeResourceParam"); //避免重复响应同一事件
771
+ this.$on("changeResourceParam", function (action, msg) {
772
+ if (action == "retryRequest") {
773
+ //加载失败后的重新请求 || 删除题目后刷新题目数据
774
+ _this.requestResourceListData();
775
+ return;
776
+ }
777
+ let dic = JSON.parse(msg);
778
+ if (action == "changeTab") {
779
+ _this.screenType = dic.screenType;
780
+ _this.requestResourceIndexWhenChangeTab();
781
+ return;
782
+ }
783
+ for (let key in dic) {
784
+ let value = dic[key];
785
+ // _this.indexParam[key] = value;
786
+ _this.$set(_this.indexParam, key, value);
787
+ }
788
+ if (action == "changeSource") {
789
+ _this.defaultCategoryType = dic["resourceSourceType"];
790
+ }
791
+ if (action == "changeArea") {
792
+ if (_this.indexParam.districtId == 0) {
793
+ _this.indexParam.districtId = "";
794
+ }
795
+ if (_this.indexParam.areaId == 0) {
796
+ _this.indexParam.areaId = "";
797
+ }
798
+ if (_this.indexParam.provinceId == 0) {
799
+ _this.indexParam.provinceId = "";
800
+ }
801
+ }
802
+ console.log("changeResourceParam---indexParam---", _this.indexParam);
803
+ //请求题目数据
804
+ _this.requestResourceListData();
805
+ });
806
+ //加载更多
807
+ this.$off("changeCurrentPageAndLoadMore"); //避免重复响应同一事件
808
+ this.$on("changeCurrentPageAndLoadMore", function (action, msg) {
809
+ if (action == "changeCurrentPageAndLoadMore") {
810
+ _this.changeCurrentPage();
811
+ return;
812
+ }
813
+ });
814
+ },
815
+ /*
816
+ **请求题库首页数据
817
+ * 只在首次进入该页面时请求
818
+ */
819
+ requestIndexData() {
820
+ let _this = this;
821
+ _this.loadingError = false;
822
+ _this.goRequestIndexData();
823
+ },
824
+ //首次进入该页面时请求获取用户信息
825
+ goRequestIndexData() {
826
+ let _this = this;
827
+ var prepareInfo = this.leftInfo;
828
+ if (prepareInfo && prepareInfo.eduLevelId) {
829
+ var eduLevelId = prepareInfo.eduLevelId;
830
+ var subjectId = prepareInfo.subjectId;
831
+ var courseSrc = prepareInfo.courseSrc;
832
+ if (courseSrc == 3) {
833
+ //专区
834
+ _this.screenType = 2;
835
+ } else {
836
+ //同步课程
837
+ _this.screenType = 1;
838
+ }
839
+ var courseId = prepareInfo.courseId;
840
+ _this.indexParam["courseSrc"] = courseSrc;
841
+ _this.indexParam["eduLevelId"] = eduLevelId;
842
+ _this.indexParam["subjectId"] = subjectId;
843
+ _this.indexParam["courseId"] = courseId;
844
+ var teachMaterialId = prepareInfo.teachMaterialId;
845
+ var gradeId = prepareInfo.gradeId;
846
+ _this.indexParam["teachMaterialId"] = teachMaterialId;
847
+ _this.indexParam["gradeId"] = gradeId;
848
+ _this.indexParam["resourceId"] = getUrlKey("resourceId");
849
+ let dom = document.getElementById("drawer-slot-id");
850
+ let loadingInstance = Loading.service({
851
+ target: dom,
852
+ text: _this.i18n.jiaZaiZhong,
853
+ });
854
+ //初始化index请求数据
855
+ _this.indexParam.resourceSourceType = 3;
856
+ _this.indexParam.resourceType = 13;
857
+ _this.indexParam.resourceShareCategoryType = "";
858
+ _this.defaultCategoryType = -1;
859
+ getResourcePoolIndex(_this.indexParam, (res) => {
860
+ this.$nextTick(() => {
861
+ // 以服务的方式调用的 Loading 需要异步关闭
862
+ loadingInstance.close();
863
+ });
864
+ _this.isLoading = false;
865
+ console.log("typeof res ===", typeof res, res);
866
+ if (typeof res === "string") res = JSON.parse(res);
867
+ if (res && res.code == 0) {
868
+ //
869
+ _this.requestClassifications(
870
+ teachMaterialId,
871
+ subjectId,
872
+ eduLevelId
873
+ );
874
+ //
875
+ _this.requestZones();
876
+ //取出默认的题库类型
877
+ _this.defaultCategoryType = res.value.defaultResourceSourceType;
878
+ _this.years = res.value.years.map((item) => {
879
+ return {
880
+ id: item,
881
+ label: item,
882
+ };
883
+ });
884
+ if (_this.years.length) {
885
+ _this.years.unshift({
886
+ id: "all",
887
+ label: _this.i18n.quanBu,
888
+ });
889
+ }
890
+
891
+ _this.itemBankTypeList = res.value.ResourceSourceTypeList;
892
+ _this.itemBankTypeList.unshift({
893
+ itemBankTypeName: "精品资源",
894
+ itemBankType: 5,
895
+ });
896
+ _this.indexParam.resourceSourceType =
897
+ res.value.defaultResourceSourceType;
898
+ _this.itemTypeList = res.value.resourceShareCategoryTypeList;
899
+ if (_this.itemTypeList.length) {
900
+ _this.itemTypeList.unshift({
901
+ id: "all",
902
+ value: "全部",
903
+ itemType: -1,
904
+ });
905
+ }
906
+ if (res.value.examTopicDto) {
907
+ _this.examTopicDto = {
908
+ examTopicId: "",
909
+ examTopicName: _this.i18n.quanBu,
910
+ }; //默认展示全部
911
+ // _this.examTopicDto = res.value.examTopicDto;
912
+ _this.indexParam.examTopicId = _this.examTopicDto.examTopicId;
913
+ _this.indexParam.examTopicName = _this.examTopicDto.examTopicName;
914
+ }
915
+ _this.examTopicDtos = res.value.examTopicDtos;
916
+ if (_this.examTopicDtos.length) {
917
+ _this.examTopicDtos.unshift({
918
+ examTopicId: "all",
919
+ examTopicName: this.i18n.quanBu,
920
+ });
921
+ }
922
+
923
+ _this.totalRecord = res.value.totalRecord;
924
+ _this.pageInfo = {
925
+ currPage: res.value.currPage,
926
+ totalPage: res.value.totalPage,
927
+ perPage: res.value.perPage,
928
+ };
929
+ if (
930
+ (_this.screenType == 2 &&
931
+ (_this.indexParam.examTopicName == _this.i18n.danYuanCeYan ||
932
+ _this.indexParam.examTopicName == _this.i18n.yueKaoShiJuan ||
933
+ _this.indexParam.examTopicName == _this.i18n.qiZhongShiJuan ||
934
+ _this.indexParam.examTopicName == _this.i18n.qiMoShiJuan ||
935
+ _this.indexParam.examTopicName == _this.i18n.jiaQiZuoYe)) ||
936
+ res.value.defaultResourceSourceType == 2
937
+ ) {
938
+ //需要重新请求数据
939
+ _this.requestResourceListData();
940
+ } else {
941
+ //取出资源数据
942
+ _this.itemInfoList = res.value.result;
943
+ }
944
+ _this.requestMaterialsGradesData(
945
+ eduLevelId,
946
+ subjectId,
947
+ teachMaterialId,
948
+ gradeId
949
+ );
950
+ } else {
951
+ _this.loadingError = true;
952
+ }
953
+ });
954
+ }
955
+ },
956
+ /*
957
+ **根据条件的变化请求index
958
+ */
959
+ requestResourceIndexWhenChangeTab() {
960
+ let _this = this;
961
+ _this.loadingError = false;
962
+ _this.loadingBankData = true;
963
+ let tempParams = _this.getCurrentParams();
964
+ getResourcePoolIndex(tempParams, (res) => {
965
+ _this.loadingBankData = false;
966
+ console.log("typeof res ===", typeof res, res);
967
+ if (typeof res === "string") res = JSON.parse(res);
968
+ if (res && res.code == 0) {
969
+ _this.loadingError = false;
970
+ //取出资源数据
971
+ if (res.value.examTopicDto) {
972
+ _this.examTopicDto = {
973
+ examTopicId: "",
974
+ examTopicName: _this.i18n.quanBu,
975
+ }; //默认展示全部
976
+ // _this.examTopicDto = res.value.examTopicDto;
977
+ _this.indexParam.examTopicId = _this.examTopicDto.examTopicId;
978
+ _this.indexParam.examTopicName = _this.examTopicDto.examTopicName;
979
+ }
980
+ _this.examTopicDtos = res.value.examTopicDtos;
981
+ if (_this.examTopicDtos.length) {
982
+ _this.examTopicDtos.unshift({
983
+ examTopicId: "all",
984
+ examTopicName: this.i18n.quanBu,
985
+ });
986
+ }
987
+
988
+ _this.totalRecord = res.value.totalRecord;
989
+ _this.pageInfo = {
990
+ currPage: res.value.currPage,
991
+ totalPage: res.value.totalPage,
992
+ perPage: res.value.perPage,
993
+ };
994
+ if (
995
+ _this.screenType == 2 &&
996
+ (_this.indexParam.examTopicName == _this.i18n.danYuanCeYan ||
997
+ _this.indexParam.examTopicName == _this.i18n.yueKaoShiJuan ||
998
+ _this.indexParam.examTopicName == _this.i18n.qiZhongShiJuan ||
999
+ _this.indexParam.examTopicName == _this.i18n.qiMoShiJuan ||
1000
+ _this.indexParam.examTopicName == _this.i18n.jiaQiZuoYe)
1001
+ ) {
1002
+ //需要重新请求数据
1003
+ _this.requestResourceListData();
1004
+ } else {
1005
+ //取出资源数据
1006
+ _this.itemInfoList = res.value.result;
1007
+ }
1008
+ } else {
1009
+ _this.loadingError = true;
1010
+ _this.itemInfoList = [];
1011
+ _this.pageInfo = {};
1012
+ }
1013
+ });
1014
+ },
1015
+ /*
1016
+ **请求题库数据
1017
+ * 筛选条件时请求
1018
+ */
1019
+ requestResourceListData() {
1020
+ let _this = this;
1021
+ _this.loadingError = false;
1022
+ _this.loadingBankData = true;
1023
+ let tempParams = _this.getCurrentParams();
1024
+ getResourcePoolList(tempParams, (res) => {
1025
+ _this.loadingBankData = false;
1026
+ if (typeof res === "string") res = JSON.parse(res);
1027
+ if (res && res.code == 0) {
1028
+ _this.loadingError = false;
1029
+ _this.itemInfoList = res.value.result;
1030
+ _this.totalRecord = res.value.totalRecord;
1031
+ _this.currPage = res.value.currPage;
1032
+ if (_this.itemInfoList.length >= _this.totalRecord) {
1033
+ _this.hasMore = false;
1034
+ } else {
1035
+ _this.hasMore = true;
1036
+ }
1037
+ _this.pageInfo = {
1038
+ currPage: res.value.currPage,
1039
+ totalPage: res.value.totalPage,
1040
+ perPage: res.value.perPage,
1041
+ };
1042
+ } else {
1043
+ //请求题目数据报错
1044
+ _this.loadingError = true;
1045
+ _this.itemInfoList = [];
1046
+ _this.pageInfo = {};
1047
+ }
1048
+ });
1049
+ },
1050
+ /*
1051
+ **获取符合当前条件的参数,过滤掉无效的参数,规则如下描述(奇葩的需求,搞个筛选条件弄了这么复杂的逻辑,无语。。。)
1052
+ *
1053
+ * ******************************************** 筛选字段含义如下 ********************************************
1054
+ * 01 teachMaterialId:教材版本
1055
+ * 02 gradeId:册别
1056
+ * 03 subjectId:科目
1057
+ * 04 eduLevelId:学段
1058
+ * 05 resourceSourceType:来源 (区本资源:2,校本资源:3,我的资源:4)
1059
+ * 06 resourceType:分类(试卷:13,教学设计:14,教学课件:1,网络资源:0)
1060
+ * 07 year:年份
1061
+ * 08 provinceId:省
1062
+ * 09 areaId:市
1063
+ * 10 districtId:区
1064
+ * 11 resourceShareCategoryType:类型
1065
+ * 12 examTopicId:试卷专题id
1066
+ * 13 examTopicName:试卷专题name (查询数据用examTopicId,逻辑判断用examTopicName。。。。。。大写的服!!!!!!)
1067
+ * 14 courseId:课程id || 专区id
1068
+ * 15 orderType:排序方式:*默认 0:引用人数倒序、更新时间倒序;*1:引用人数倒序、更新时间正序;*2:引用人数正序,更新时间倒序;*3:引用人数正序、更新时间正序
1069
+ * 16 page:页码
1070
+ * 17 courseSrc: 0是同步课程下的资源库,3是专区下的资源库
1071
+ *
1072
+ * ******************************************** 筛选规则如下 ********************************************
1073
+ * 公共条件:来源和分类
1074
+ * 同步课程 - 区本资源||校本资源 - 试卷 :则展示条件(年份、地区)
1075
+ * 同步课程 - 区本资源||校本资源||我的资源 - 教学课件 :则展示条件(类型)
1076
+ * 同步课程 - 区本资源||校本资源 - 教学设计||网络资源 :则不展示其他条件
1077
+ * 同步课程 - 我的资源 - 试卷||教学设计||网络资源 :则不展示其他条件
1078
+ * 专区 - 区本资源||校本资源 - 试卷 :则展示条件(试卷专题、年份、地区)---> 试卷专题若为单元测验、月考试卷、期中试卷、期末试卷、假期作业,还要显示册别
1079
+ * 专区 - 区本资源||校本资源||我的资源 - 教学课件 :则展示条件(类型、专区)
1080
+ * 专区 - 区本资源||校本资源||我的资源 - 教学设计||网络资源 :则展示条件(专区)
1081
+ * 专区 - 我的资源 - 试卷:则展示条件(专区)
1082
+ *
1083
+ */
1084
+ getCurrentParams() {
1085
+ let _this = this;
1086
+ let currentParams = {
1087
+ teachMaterialId: _this.indexParam.teachMaterialId,
1088
+ subjectId: _this.indexParam.subjectId,
1089
+ eduLevelId: _this.indexParam.eduLevelId,
1090
+ resourceSourceType: _this.indexParam.resourceSourceType,
1091
+ resourceType: _this.indexParam.resourceType,
1092
+ orderType: _this.indexParam.orderType ? _this.indexParam.orderType : 2,
1093
+ page: _this.indexParam.page,
1094
+ };
1095
+ if (_this.indexParam.resourceType == 1) {
1096
+ //只要“分类”选择的是“教学课件”,就一定有“类型”筛选条件
1097
+ currentParams["resourceShareCategoryType"] =
1098
+ _this.indexParam.resourceShareCategoryType;
1099
+ }
1100
+ if (_this.screenType == 1) {
1101
+ //同步课程
1102
+ currentParams["courseId"] = _this.indexParam.courseId;
1103
+ currentParams["courseSrc"] = 0;
1104
+ currentParams["gradeId"] = _this.indexParam.gradeId;
1105
+ if (_this.indexParam.resourceSourceType == 4) {
1106
+ //我的资源
1107
+ currentParams["year"] = "";
1108
+ currentParams["provinceId"] = "";
1109
+ currentParams["areaId"] = "";
1110
+ currentParams["districtId"] = "";
1111
+ } else {
1112
+ //区本资源||校本资源
1113
+ if (_this.indexParam.resourceType == 13) {
1114
+ //“分类”选择的是“试卷”,则有“年份”、“地区”
1115
+ currentParams["year"] = _this.indexParam.year;
1116
+ currentParams["isEarlier"] = _this.indexParam.isEarlier;
1117
+ currentParams["provinceId"] = _this.indexParam.provinceId == 0 ? "" : _this.indexParam.provinceId;
1118
+ currentParams["areaId"] = _this.indexParam.areaId == 0 ? "" : _this.indexParam.areaId;
1119
+ currentParams["districtId"] = _this.indexParam.districtId == 0 ? "" : _this.indexParam.districtId;
1120
+ }
1121
+ }
1122
+ } else {
1123
+ //专区
1124
+ currentParams["courseSrc"] = 3;
1125
+ if (_this.indexParam.resourceSourceType == 4) {
1126
+ //我的资源,则一定有“专区”
1127
+ currentParams["courseId"] = _this.indexParam.courseId;
1128
+ } else {
1129
+ //区本资源||校本资源
1130
+ if (_this.indexParam.resourceType == 13) {
1131
+ //“分类”选择的是“试卷”,则有“试卷专题”、“年份”、“地区”
1132
+ currentParams["examTopicId"] = _this.indexParam.examTopicId;
1133
+ currentParams["year"] = _this.indexParam.year;
1134
+ currentParams["provinceId"] =
1135
+ _this.indexParam.provinceId == 0
1136
+ ? ""
1137
+ : _this.indexParam.provinceId;
1138
+ currentParams["areaId"] =
1139
+ _this.indexParam.areaId == 0 ? "" : _this.indexParam.areaId;
1140
+ currentParams["districtId"] =
1141
+ _this.indexParam.districtId == 0
1142
+ ? ""
1143
+ : _this.indexParam.districtId;
1144
+ if (
1145
+ _this.indexParam.examTopicName == _this.i18n.danYuanCeYan ||
1146
+ _this.indexParam.examTopicName == _this.i18n.yueKaoShiJuan ||
1147
+ _this.indexParam.examTopicName == _this.i18n.qiZhongShiJuan ||
1148
+ _this.indexParam.examTopicName == _this.i18n.qiMoShiJuan ||
1149
+ _this.indexParam.examTopicName == _this.i18n.jiaQiZuoYe
1150
+ ) {
1151
+ //试卷专题若为单元测验、月考试卷、期中试卷、期末试卷、假期作业,还要"册别"
1152
+ currentParams["gradeId"] = _this.indexParam.gradeId;
1153
+ }
1154
+ } else {
1155
+ //其他分类则有“专区”
1156
+ currentParams["courseId"] = _this.indexParam.courseId;
1157
+ }
1158
+ }
1159
+ }
1160
+ return currentParams;
1161
+ },
1162
+ /*
1163
+ **获取教材版本数据
1164
+ */
1165
+ requestMaterialsGradesData(
1166
+ eduLevelId,
1167
+ subjectId,
1168
+ teachMaterialId,
1169
+ gradeId
1170
+ ) {
1171
+ let _this = this;
1172
+ _this.courseList = [];
1173
+ getMaterialsGrades(
1174
+ {
1175
+ eduLevelId: eduLevelId,
1176
+ subjectId: subjectId,
1177
+ teachMaterialId: teachMaterialId,
1178
+ gradeId: gradeId,
1179
+ },
1180
+ (res) => {
1181
+ if (!res) {
1182
+ return;
1183
+ }
1184
+ if (typeof res === "string") res = JSON.parse(res);
1185
+ if (res.code == 0) {
1186
+ _this.currentCourseValue = [
1187
+ res.value.checkTeachMaterialId,
1188
+ res.value.checkClassificationId,
1189
+ res.value.checkTermIndex,
1190
+ ];
1191
+ _this.materialsGradesList = res.value.list;
1192
+ _this.requestCourseListData(
1193
+ subjectId,
1194
+ res.value.checkTeachMaterialId,
1195
+ res.value.checkClassificationId,
1196
+ res.value.checkTermIndex
1197
+ );
1198
+ }
1199
+ }
1200
+ );
1201
+ },
1202
+ /*
1203
+ ** 获取课程数据
1204
+ * teachMaterialId:教材版本id
1205
+ * classificationId:册别id
1206
+ * termIndex:学期号
1207
+ */
1208
+ requestCourseListData(
1209
+ subjectId,
1210
+ teachMaterialId,
1211
+ classificationId,
1212
+ termIndex
1213
+ ) {
1214
+ let _this = this;
1215
+ getEditorCourse(
1216
+ {
1217
+ subjectId: subjectId,
1218
+ teachMaterialId: teachMaterialId,
1219
+ termIndex: termIndex,
1220
+ classificationId: classificationId,
1221
+ },
1222
+ (res) => {
1223
+ if (!res) {
1224
+ return;
1225
+ }
1226
+ if (typeof res === "string") res = JSON.parse(res);
1227
+ if (res.code == 0) {
1228
+ _this.courseList = res.value.list;
1229
+ }
1230
+ }
1231
+ );
1232
+ },
1233
+ /*
1234
+ ** 获取知识点数据
1235
+ */
1236
+ requestKnowledgeData() {
1237
+ let _this = this;
1238
+ getKnowledge(
1239
+ {
1240
+ eduLevelId: _this.indexParam.studySectionId,
1241
+ subjectId: _this.indexParam.subjectId,
1242
+ },
1243
+ (res) => {
1244
+ if (!res) {
1245
+ return;
1246
+ }
1247
+ if (typeof res === "string") res = JSON.parse(res);
1248
+ if (res.code == 0) {
1249
+ _this.klList = res.value;
1250
+ }
1251
+ }
1252
+ );
1253
+ },
1254
+ /*
1255
+ ** 获取考点数据
1256
+ */
1257
+ requestPointData() {
1258
+ let _this = this;
1259
+ getPoint(
1260
+ {
1261
+ eduLevelId: _this.indexParam.studySectionId,
1262
+ subjectId: _this.indexParam.subjectId,
1263
+ },
1264
+ (res) => {
1265
+ if (!res) {
1266
+ return;
1267
+ }
1268
+ if (typeof res === "string") res = JSON.parse(res);
1269
+ if (res.code == 0) {
1270
+ _this.examPointList = res.value;
1271
+ }
1272
+ }
1273
+ );
1274
+ },
1275
+ /*
1276
+ ** 获取册别数据
1277
+ */
1278
+ requestClassifications(teachMaterialId, subjectId, eduLevelId) {
1279
+ let _this = this;
1280
+ getClassifications(
1281
+ {
1282
+ teachMaterialId: teachMaterialId,
1283
+ subjectId: subjectId,
1284
+ eduLevelId: eduLevelId,
1285
+ },
1286
+ (res) => {
1287
+ if (!res) {
1288
+ return;
1289
+ }
1290
+ if (typeof res === "string") res = JSON.parse(res);
1291
+ if (res.code == 0) {
1292
+ _this.gradeList = res.value;
1293
+ if (
1294
+ _this.indexParam.gradeId &&
1295
+ _this.indexParam.gradeId.length > 0
1296
+ ) {
1297
+ _this.defaultGradeId = _this.indexParam.gradeId;
1298
+ } else {
1299
+ if (_this.gradeList && _this.gradeList.length > 0) {
1300
+ _this.defaultGradeId = _this.gradeList[0].gradeId;
1301
+ }
1302
+ }
1303
+ }
1304
+ }
1305
+ );
1306
+ },
1307
+ /*
1308
+ ** 获取专区数据
1309
+ */
1310
+ requestZones() {
1311
+ let _this = this;
1312
+ getZoneList({}, (res) => {
1313
+ if (!res) {
1314
+ return;
1315
+ }
1316
+ if (typeof res === "string") res = JSON.parse(res);
1317
+ if (res.code == 0) {
1318
+ _this.currentZoneList = res.value;
1319
+ _this.currentZoneList.unshift({
1320
+ zoneId: "all",
1321
+ zoneName: "全部",
1322
+ itemType: -1,
1323
+ });
1324
+ if (
1325
+ _this.screenType == 2 &&
1326
+ _this.indexParam.courseId &&
1327
+ _this.indexParam.courseId.length > 0
1328
+ ) {
1329
+ _this.zoneId = _this.indexParam.courseId;
1330
+ } else {
1331
+ if (_this.currentZoneList && _this.currentZoneList.length > 0) {
1332
+ _this.zoneId = _this.currentZoneList[0].zoneId;
1333
+ }
1334
+ }
1335
+ }
1336
+ });
1337
+ },
1338
+ //改变右侧栏宽度
1339
+ changeSize(e) {
1340
+ document.onmousemove = (e) => {
1341
+ e.stopPropagation();
1342
+ document.body.style.cursor = "w-resize";
1343
+ let addWidth = this.$refs.drawer.offsetLeft - e.clientX;
1344
+ let curWidth = this.$refs.drawer.offsetWidth;
1345
+ this.$refs.drawer.style.width = `${curWidth + addWidth}px`;
1346
+ };
1347
+ document.onmouseup = (e) => {
1348
+ e.stopPropagation();
1349
+ document.onmousemove = null;
1350
+ document.onmouseup = null;
1351
+ document.body.style.cursor = "default";
1352
+ };
1353
+ },
1354
+ //改变当前页
1355
+ changeCurrentPage() {
1356
+ let _this = this;
1357
+ console.log(
1358
+ "changeCurrentPage---",
1359
+ _this.itemInfoList.length,
1360
+ _this.totalRecord,
1361
+ _this.provinceList.length
1362
+ );
1363
+ if (
1364
+ _this.itemInfoList.length >= _this.totalRecord ||
1365
+ _this.provinceList.length <= 0
1366
+ ) {
1367
+ _this.hasMore = false;
1368
+ return;
1369
+ }
1370
+ // let dic = _this.indexParam;
1371
+ let dic = _this.getCurrentParams(); //获取当前参数;
1372
+ dic["page"] = _this.currPage + 1;
1373
+ _this.requestPageBank(dic);
1374
+ },
1375
+ /*
1376
+ **请求题库数据
1377
+ * 筛选条件时请求
1378
+ */
1379
+ requestPageBank(param) {
1380
+ let _this = this;
1381
+ _this.pageError = false;
1382
+ _this.loading = true;
1383
+ let query = JSON.parse(JSON.stringify(param));
1384
+ if (query.examTopicId) delete query.examTopicId;
1385
+ if (query.examTopicName) delete query.examTopicName;
1386
+ getResourcePoolList(query, (res) => {
1387
+ _this.loading = false;
1388
+ if (typeof res === "string") res = JSON.parse(res);
1389
+ if (res && res.code == 0) {
1390
+ //取出题目数据
1391
+ _this.pageError = false;
1392
+ _this.currPage = res.value.currPage;
1393
+ _this.itemInfoList = _this.itemInfoList.concat(res.value.result);
1394
+ if (_this.itemInfoList.length >= res.value.totalRecord) {
1395
+ _this.hasMore = false;
1396
+ } else {
1397
+ _this.hasMore = true;
1398
+ }
1399
+ } else {
1400
+ //请求题目数据报错
1401
+ _this.pageError = true;
1402
+ }
1403
+ });
1404
+ },
1405
+ //请求获取用户信息
1406
+ async asyncGetUserOperateDataInfo() {
1407
+ let _this = this;
1408
+ var operateString = undefined;
1409
+ let res = await getUserOperate({ operateLogType: 5 });
1410
+ if (res && res.code == 0) {
1411
+ operateString = res.value;
1412
+ if (operateString != undefined && operateString.length > 0) {
1413
+ var prepareInfo = JSON.parse(operateString);
1414
+ if (prepareInfo && prepareInfo.countryId) {
1415
+ _this.defaultPosition.countryId = prepareInfo.countryId;
1416
+ _this.defaultPosition.provinceId =
1417
+ prepareInfo.provinceId && prepareInfo.provinceId > 0
1418
+ ? prepareInfo.provinceId
1419
+ : 0;
1420
+ _this.defaultPosition.areaId =
1421
+ prepareInfo.areaId && prepareInfo.areaId > 0
1422
+ ? prepareInfo.areaId
1423
+ : 0;
1424
+ _this.defaultPosition.districtId =
1425
+ prepareInfo.districtId && prepareInfo.districtId > 0
1426
+ ? prepareInfo.districtId
1427
+ : 0;
1428
+ _this.requestProvinceData(true);
1429
+ } else {
1430
+ _this.requestProvinceData(false);
1431
+ }
1432
+ } else {
1433
+ _this.requestProvinceData(false);
1434
+ }
1435
+ } else {
1436
+ _this.requestProvinceData(false);
1437
+ }
1438
+ },
1439
+ /*
1440
+ **根据省份获取城市信息
1441
+ */
1442
+ requestProvinceData(isHistory) {
1443
+ let _this = this;
1444
+ getProvince({}, (res) => {
1445
+ if (!res) {
1446
+ return;
1447
+ }
1448
+ if (typeof res === "string") res = JSON.parse(res);
1449
+ if (res.code == 0) {
1450
+ if (!isHistory) {
1451
+ _this.defaultPosition.countryId = res.value.countryId;
1452
+ _this.defaultPosition.provinceId = res.value.provinceId;
1453
+ _this.defaultPosition.districtId = res.value.districtId;
1454
+ _this.defaultPosition.areaId = res.value.areaId;
1455
+ }
1456
+ res.value.countryList.forEach((element) => {
1457
+ if (element.id == _this.defaultPosition.countryId) {
1458
+ _this.provinceList = element.provinceList;
1459
+ _this.provinceList.unshift({ id: -1, name: "不限" });
1460
+ }
1461
+ });
1462
+ }
1463
+ _this.indexParam.provinceId =
1464
+ _this.defaultPosition.provinceId == 0
1465
+ ? ""
1466
+ : _this.defaultPosition.provinceId;
1467
+ _this.indexParam.districtId =
1468
+ _this.defaultPosition.districtId == 0
1469
+ ? ""
1470
+ : _this.defaultPosition.districtId;
1471
+ _this.indexParam.areaId =
1472
+ _this.defaultPosition.areaId == 0 ? "" : _this.defaultPosition.areaId;
1473
+ _this.requestIndexData();
1474
+ });
1475
+ },
1476
+ },
1477
+ computed: {},
1478
+ };
1479
+ </script>
1480
+ <style lang="scss" scoped>
1481
+ @import "./index.scss";
1482
+ </style>