getters.js 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. import api from '@/api/api'
  2. const getters = {
  3. downLoadlist: state => state.user.downLoadlist,//档案任务列表
  4. modulePage: state => state.dataCache.modulePage,//模块变化
  5. festivalPage: state => state.dataCache.festivalPage,//章变化
  6. chapterExamPage: state => state.dataCache.chapterExamPage,//章卷变化
  7. testPaperPage: state => state.dataCache.testPaperPage,//试卷变化
  8. sidebar: state => state.app.sidebar,
  9. size: state => state.app.size,
  10. device: state => state.app.device,
  11. visitedViews: state => state.tagsView.visitedViews,
  12. cachedViews: state => state.tagsView.cachedViews,
  13. token: state => state.user.token,
  14. avatar: state => state.user.avatar,
  15. name: state => state.user.name,
  16. introduction: state => state.user.introduction,
  17. userId: state => state.user.userId,
  18. roles: state => state.user.roles,
  19. permissions: state => state.user.permissions,
  20. permission_routes: state => state.permission.routes,
  21. topbarRouters: state => state.permission.topbarRouters,
  22. defaultRoutes: state => state.permission.defaultRoutes,
  23. sidebarRouters: state => state.permission.sidebarRouters,
  24. distributionList(state) {
  25. if (!state.dict.distributionList) {
  26. api.distributiontemplist({ status: 1 }).then(res => {
  27. state.dict.distributionList = res.rows
  28. })
  29. }
  30. return state.dict.distributionList
  31. },
  32. indexnum(state) {
  33. if (!state.dict.indexnum) {
  34. api.inquireGradegradelistUserPeriod({ status: 1, periodStatus: 2, pageSize: 1, pageNum: 1 }).then(res => {
  35. state.dict.indexnum = res.total
  36. })
  37. }
  38. return state.dict.indexnum
  39. },
  40. roleList(state) {
  41. if (!state.dict.roleList) {
  42. api.obtainRoleList({ status: 1 }).then(res => {
  43. state.dict.roleList = res.rows
  44. })
  45. }
  46. return state.dict.roleList
  47. },
  48. educationType(state) {
  49. if (!state.dict.educationType) {
  50. api.inquireCourseEducationType({ status: 1 }).then(res => {
  51. state.dict.educationType = res.rows
  52. })
  53. }
  54. return state.dict.educationType
  55. },
  56. projectType(state) {
  57. if (!state.dict.projectType) {
  58. api.inquireCourseProjectType({ status: 1 }).then(res => {
  59. state.dict.projectType = res.rows
  60. })
  61. }
  62. return state.dict.projectType
  63. },
  64. businessLevel(state) {
  65. if (!state.dict.businessLevel) {
  66. api.inquirebusinessList({ status: 1 }).then(res => {
  67. state.dict.businessLevel = res.rows
  68. })
  69. }
  70. return state.dict.businessLevel
  71. },
  72. sujectType(state) {
  73. if (!state.dict.sujectType) {
  74. api.inquireCourseSubject({ status: 1 }).then(res => {
  75. state.dict.sujectType = res.rows
  76. })
  77. }
  78. return state.dict.sujectType
  79. },
  80. Professional(state) {
  81. if (!state.dict.Professional) {
  82. api.inquireCourseMajor({ status: 1 }).then(res => {
  83. state.dict.Professional = res.rows
  84. })
  85. }
  86. return state.dict.Professional
  87. },
  88. schoolList(state) {
  89. if (!state.dict.schoolList) {
  90. api.inquireUserSchool({ status: 1 }).then(res => {
  91. state.dict.schoolList = res.rows
  92. })
  93. }
  94. return state.dict.schoolList
  95. },
  96. courseExamine(state) {
  97. if (!state.dict.courseExamine) {
  98. api.inquireCourseExamine({ status: 1 }).then(res => {
  99. state.dict.courseExamine = res.rows
  100. })
  101. }
  102. return state.dict.courseExamine
  103. },
  104. certificate(state) {
  105. if (!state.dict.certificate) {
  106. api.inquireBaseCertificate({ status: 1 }).then(res => {
  107. state.dict.certificate = res.rows
  108. })
  109. }
  110. return state.dict.certificate
  111. },
  112. certificateName(state) {
  113. if (!state.dict.certificateName) {
  114. api.inquireBaseCertificatecommon({ status: 1 }).then(res => {
  115. state.dict.certificateName = res.rows
  116. })
  117. }
  118. return state.dict.certificateName
  119. },
  120. certificateTp(state) {
  121. if (!state.dict.certificateTp) {
  122. api.inquireBaseCertificatetp({ status: 1 }).then(res => {
  123. state.dict.certificateTp = res.rows
  124. })
  125. }
  126. return state.dict.certificateTp
  127. },
  128. labelList(state) {
  129. if (!state.dict.labelList) {
  130. api.inquireCourseLabelList({ status: 1 }).then(res => {
  131. state.dict.labelList = res.rows
  132. })
  133. }
  134. return state.dict.labelList
  135. },
  136. payList(state) {
  137. if (!state.dict.payList) {
  138. api.inquirepayaislelist({ status: 1 }).then(res => {
  139. state.dict.payList = res.rows
  140. })
  141. }
  142. return state.dict.payList
  143. },
  144. paypayee(state) {
  145. if (!state.dict.paypayee) {
  146. api.inquirepaypayee({ status: 1 }).then(res => {
  147. state.dict.paypayee = res.rows
  148. })
  149. }
  150. return state.dict.paypayee
  151. },
  152. paysource(state) {
  153. if (!state.dict.paysource) {
  154. api.inquirepaysource({ status: 1 }).then(res => {
  155. state.dict.paysource = res.rows
  156. })
  157. }
  158. return state.dict.paysource
  159. },
  160. payvisit(state) {
  161. if (!state.dict.payvisit) {
  162. api.inquirepayvisit({ status: 1 }).then(res => {
  163. state.dict.payvisit = res.rows
  164. })
  165. }
  166. return state.dict.payvisit
  167. },
  168. payserve(state) {
  169. if (!state.dict.payserve) {
  170. api.inquirepayserve({ status: 1 }).then(res => {
  171. state.dict.payserve = res.rows
  172. })
  173. }
  174. return state.dict.payserve
  175. },
  176. paysupply(state) {
  177. if (!state.dict.paysupply) {
  178. api.inquirepaysupply({ status: 1 }).then(res => {
  179. state.dict.paysupply = res.rows
  180. })
  181. }
  182. return state.dict.paysupply
  183. },
  184. paynature(state) {
  185. if (!state.dict.paynature) {
  186. api.inquirepaynature({ status: 1 }).then(res => {
  187. state.dict.paynature = res.rows
  188. })
  189. }
  190. return state.dict.paynature
  191. },
  192. paycost(state) {
  193. if (!state.dict.paycost) {
  194. api.inquirepaycost({ status: 1 }).then(res => {
  195. state.dict.paycost = res.rows
  196. })
  197. }
  198. return state.dict.paycost
  199. },
  200. paperexam(state) {
  201. if (!state.dict.paperexam) {
  202. api.inquirepaperexamList({ status: 1 }).then(res => {
  203. state.dict.paperexam = res.rows
  204. })
  205. }
  206. return state.dict.paperexam
  207. },
  208. areas(state) {
  209. if (!state.dict.areas) {
  210. api.inquireapplyAreas({ status: 1, areaType: 1 }).then(res => {
  211. state.dict.areas = res.rows
  212. })
  213. }
  214. return state.dict.areas
  215. },
  216. cityList(state) {
  217. if (!state.dict.cityList) {
  218. api.inquireapplyCityList({ status: 1, areaType: 2 }).then(res => {
  219. state.dict.cityList = res.rows
  220. })
  221. }
  222. return state.dict.cityList
  223. },
  224. classList(state) {
  225. if (!state.dict.classList) {
  226. api.inquireGradegradeList({ status: 1 }).then(res => {
  227. state.dict.classList = res.rows
  228. })
  229. }
  230. return state.dict.classList
  231. },
  232. examLists(state) {
  233. if (!state.dict.examLists) {
  234. api.inquiresystemapplyList({ status: "0,1,2" }).then(res => {
  235. state.dict.examLists = res.rows
  236. })
  237. }
  238. return state.dict.examLists
  239. },
  240. examList(state) {
  241. if (!state.dict.examList) {
  242. api.inquiresystemapplyList({ status: 1 }).then(res => {
  243. state.dict.examList = res.rows
  244. })
  245. }
  246. return state.dict.examList
  247. },
  248. applySiteAddress(state) {
  249. if (!state.dict.applySiteAddress) {
  250. api.inquiresystemsite({ status: 1 }).then(res => {
  251. state.dict.applySiteAddress = res.rows
  252. })
  253. }
  254. return state.dict.applySiteAddress
  255. },
  256. beforeList(state) {
  257. if (!state.dict.beforeList) {
  258. api.inquiresystembefore({ status: 1 }).then(res => {
  259. state.dict.beforeList = res.rows
  260. })
  261. }
  262. return state.dict.beforeList
  263. },
  264. beforeLists(state) {
  265. if (!state.dict.beforeLists) {
  266. api.inquiresystembefore({ status: '0,1,2' }).then(res => {
  267. state.dict.beforeLists = res.rows
  268. })
  269. }
  270. return state.dict.beforeLists
  271. },
  272. }
  273. export default getters