EducationPromoteIndex.vue 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <!--
  2. * @Description: 学历提升
  3. * @Author: 空白格
  4. * @Date: 2022-08-12 13:47:26
  5. * @LastEditors: 空白格
  6. * @LastEditTime: 2022-08-29 09:41:28
  7. * @FilePath: \veterans_client_web\src\views\EducationPromote\EducationPromoteIndex.vue
  8. * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
  9. -->
  10. <template>
  11. <div class="app-main education-promote">
  12. <BannerBreadcrumb title="学历提升" />
  13. <div class="app-main-box">
  14. <!-- banner图 -->
  15. <div class="education-promote-banner">
  16. <el-image
  17. class="image"
  18. :src="require('@/assets/images/education-promote-banner.png')"
  19. fit="cover"
  20. ></el-image>
  21. </div>
  22. <!-- 特点 -->
  23. <div
  24. class="education-promote-effect"
  25. @click="jumpPage('/educationpromote/details')"
  26. >
  27. <div class="education-promote-effect-item">
  28. <p>提升作用</p>
  29. <p>学历提升</p>
  30. </div>
  31. <div class="education-promote-effect-item">
  32. <p>提升流程</p>
  33. <p>学历提升</p>
  34. </div>
  35. <div class="education-promote-effect-item">
  36. <p>提升方式</p>
  37. <p>学历提升</p>
  38. </div>
  39. </div>
  40. <!-- 热门活动 -->
  41. <div class="app-main-box-content education-promote-activity">
  42. <div class="education-promote-activity-header">
  43. <el-row :gutter="80">
  44. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  45. <div class="epah-left">
  46. <div class="epah-left-select">
  47. <el-select
  48. v-model="queryParams.schoolId"
  49. placeholder="请选择学院"
  50. style="width: 100%"
  51. filterable
  52. @change="schoolChange"
  53. >
  54. <el-option
  55. v-for="(item, index) in schoolList"
  56. :key="index"
  57. :label="item.school_name"
  58. :value="item.id"
  59. >
  60. </el-option>
  61. </el-select>
  62. </div>
  63. <div
  64. class="epah-left-btn"
  65. @click="
  66. jumpPage('/collegesdetails', {
  67. schoolId: queryParams.schoolId,
  68. })
  69. "
  70. >
  71. 学院详情
  72. </div>
  73. </div>
  74. </el-col>
  75. <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
  76. <div
  77. class="epah-right"
  78. @click="
  79. jumpPage('/educationpromote/recruitstudents', {
  80. id: currentSchool.id,
  81. name: currentSchool.school_name,
  82. })
  83. "
  84. >
  85. <div class="epah-right-text">招生简章</div>
  86. <div class="epah-right-btn">立即查看</div>
  87. </div>
  88. </el-col>
  89. </el-row>
  90. </div>
  91. <div
  92. class="education-promote-activity-list"
  93. v-if="activityList.length"
  94. v-loading="loading"
  95. >
  96. <el-row :gutter="24">
  97. <el-col
  98. :xs="24"
  99. :sm="12"
  100. :md="12"
  101. :lg="6"
  102. :xl="6"
  103. v-for="(item, index) in activityList"
  104. :key="index"
  105. >
  106. <div class="epal-item">
  107. <div class="epal-item-image">
  108. <el-image :src="item.img" class="image" fit="cover">
  109. <div slot="placeholder" class="image-slot">
  110. 加载中<span class="dot">...</span>
  111. </div>
  112. </el-image>
  113. </div>
  114. <p>{{ item.name || "-" }}</p>
  115. <p>{{ item.schoolName || "-" }}</p>
  116. </div>
  117. </el-col>
  118. </el-row>
  119. <div class="pagination" v-if="total">
  120. <el-pagination
  121. background
  122. layout="prev, pager, next"
  123. :page-size="queryParams.pageSize"
  124. :total="total"
  125. @current-change="currentChange"
  126. />
  127. </div>
  128. </div>
  129. <el-empty description="列表数据为空" v-else></el-empty>
  130. </div>
  131. </div>
  132. </div>
  133. </template>
  134. <script>
  135. import BannerBreadcrumb from "@/components/BannerBreadcrumb";
  136. import { getSchoolListData, getActivityBySchool } from "@/api/EducationPromote";
  137. export default {
  138. name: "EducationPromoteIndex",
  139. components: {
  140. BannerBreadcrumb,
  141. },
  142. data() {
  143. return {
  144. schoolList: [],
  145. queryParams: {
  146. schoolId: undefined,
  147. pageNum: 1,
  148. pageSize: 8,
  149. },
  150. activityList: [],
  151. total: 0,
  152. loading: false,
  153. currentSchool: {},
  154. };
  155. },
  156. created() {
  157. this.getSchoolList();
  158. },
  159. methods: {
  160. /**
  161. * 获取学院列表
  162. * @date 2022-08-12
  163. * @returns {any}
  164. */
  165. getSchoolList() {
  166. getSchoolListData().then((res) => {
  167. this.schoolList = res.data;
  168. this.queryParams.schoolId = res.data[0].id;
  169. this.currentSchool = res.data[0];
  170. this.getACtivityList();
  171. });
  172. },
  173. /**
  174. * 获取学院活动列表
  175. * @date 2022-08-12
  176. * @returns {any}
  177. */
  178. getACtivityList() {
  179. this.loading = true;
  180. getActivityBySchool(this.queryParams).then((res) => {
  181. this.activityList = res.rows;
  182. this.total = Number(res.total);
  183. this.loading = false;
  184. });
  185. },
  186. /**
  187. * 分页切换触发
  188. * @date 2022-08-12
  189. * @param {any} page
  190. * @returns {any}
  191. */
  192. currentChange(page) {
  193. this.queryParams.pageNum = page;
  194. this.getACtivityList();
  195. },
  196. /**
  197. * 学院切换
  198. * @date 2022-08-12
  199. * @param {any} val
  200. * @returns {any}
  201. */
  202. schoolChange(val) {
  203. this.schoolList.forEach((item) => {
  204. if (val === item.id) {
  205. this.currentSchool = item;
  206. }
  207. });
  208. this.queryParams.schoolId = val;
  209. this.queryParams.pageNum = 1;
  210. this.getACtivityList();
  211. },
  212. /**
  213. * 跳转到指定页面
  214. * @date 2022-08-11
  215. * @param {any} path
  216. * @returns {any}
  217. */
  218. jumpPage(path, query) {
  219. if (path) {
  220. this.$router.push({ path, query });
  221. }
  222. },
  223. },
  224. };
  225. </script>
  226. <style lang="scss" scoped>
  227. .education-promote {
  228. padding-bottom: 30px;
  229. &-banner {
  230. width: 100%;
  231. height: 295px;
  232. .image {
  233. width: 100%;
  234. height: 100%;
  235. }
  236. }
  237. &-effect {
  238. width: 100%;
  239. height: 160px;
  240. display: flex;
  241. justify-content: space-between;
  242. align-items: center;
  243. background: #fff;
  244. &-item {
  245. width: 33%;
  246. text-align: center;
  247. p {
  248. color: #3d5d4c;
  249. font-size: 34px;
  250. &:last-child {
  251. background-color: #8ead9c;
  252. color: #fff;
  253. font-size: 24px;
  254. width: 140px;
  255. height: 40px;
  256. line-height: 40px;
  257. text-align: center;
  258. margin: 10px auto 0;
  259. border-radius: 20px;
  260. font-weight: normal;
  261. }
  262. }
  263. }
  264. }
  265. &-activity {
  266. margin-top: 10px;
  267. &-header {
  268. margin-bottom: 40px;
  269. .epah-left {
  270. display: flex;
  271. &-select {
  272. width: calc(100% - 171px);
  273. :deep(.el-input__inner) {
  274. height: 50px;
  275. line-height: 50px;
  276. border-top-right-radius: 0;
  277. border-bottom-right-radius: 0;
  278. }
  279. }
  280. &-btn {
  281. width: 171px;
  282. height: 50px;
  283. line-height: 50px;
  284. text-align: center;
  285. background-color: #a4c5df;
  286. color: #fff;
  287. border-radius: 0 5px 5px 0;
  288. cursor: pointer;
  289. }
  290. }
  291. .epah-right {
  292. background-color: #678f7a;
  293. height: 50px;
  294. line-height: 50px;
  295. border-radius: 5px;
  296. display: flex;
  297. justify-content: space-between;
  298. align-items: center;
  299. padding: 0 27px;
  300. &-text {
  301. color: #fff;
  302. font-size: 20px;
  303. font-weight: 700;
  304. }
  305. &-btn {
  306. background-color: #fff;
  307. border-radius: 19px;
  308. width: 100px;
  309. height: 30px;
  310. line-height: 30px;
  311. text-align: center;
  312. font-size: 14px;
  313. color: #678f7a;
  314. cursor: pointer;
  315. }
  316. }
  317. }
  318. &-list {
  319. .epal-item {
  320. margin-bottom: 20px;
  321. cursor: pointer;
  322. &-image {
  323. height: 180px;
  324. width: 100%;
  325. margin-bottom: 5px;
  326. .image {
  327. width: 100%;
  328. height: 100%;
  329. border: solid 1px #e0e0e0;
  330. border-radius: 2px;
  331. }
  332. }
  333. p {
  334. font-size: 20px;
  335. color: #3f3f3f;
  336. margin-bottom: 5px;
  337. &:last-child {
  338. color: #a2a2a2;
  339. font-size: 16px;
  340. }
  341. }
  342. }
  343. .pagination {
  344. text-align: center;
  345. margin-top: 20px;
  346. :deep(.el-pager .active) {
  347. background-color: #ff3939;
  348. }
  349. :deep(.el-pagination.is-background .el-pager li:not(.disabled).active) {
  350. background-color: #ff3939;
  351. }
  352. }
  353. }
  354. }
  355. }
  356. </style>