123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358 |
- <!--
- * @Description: 学历提升
- * @Author: 空白格
- * @Date: 2022-08-12 13:47:26
- * @LastEditors: 空白格
- * @LastEditTime: 2022-08-29 09:41:28
- * @FilePath: \veterans_client_web\src\views\EducationPromote\EducationPromoteIndex.vue
- * @Copyright: Copyright (c) 2016~2022 by 空白格, All Rights Reserved.
- -->
- <template>
- <div class="app-main education-promote">
- <BannerBreadcrumb title="学历提升" />
- <div class="app-main-box">
- <!-- banner图 -->
- <div class="education-promote-banner">
- <el-image
- class="image"
- :src="require('@/assets/images/education-promote-banner.png')"
- fit="cover"
- ></el-image>
- </div>
- <!-- 特点 -->
- <div
- class="education-promote-effect"
- @click="jumpPage('/educationpromote/details')"
- >
- <div class="education-promote-effect-item">
- <p>提升作用</p>
- <p>学历提升</p>
- </div>
- <div class="education-promote-effect-item">
- <p>提升流程</p>
- <p>学历提升</p>
- </div>
- <div class="education-promote-effect-item">
- <p>提升方式</p>
- <p>学历提升</p>
- </div>
- </div>
- <!-- 热门活动 -->
- <div class="app-main-box-content education-promote-activity">
- <div class="education-promote-activity-header">
- <el-row :gutter="80">
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
- <div class="epah-left">
- <div class="epah-left-select">
- <el-select
- v-model="queryParams.schoolId"
- placeholder="请选择学院"
- style="width: 100%"
- filterable
- @change="schoolChange"
- >
- <el-option
- v-for="(item, index) in schoolList"
- :key="index"
- :label="item.school_name"
- :value="item.id"
- >
- </el-option>
- </el-select>
- </div>
- <div
- class="epah-left-btn"
- @click="
- jumpPage('/collegesdetails', {
- schoolId: queryParams.schoolId,
- })
- "
- >
- 学院详情
- </div>
- </div>
- </el-col>
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
- <div
- class="epah-right"
- @click="
- jumpPage('/educationpromote/recruitstudents', {
- id: currentSchool.id,
- name: currentSchool.school_name,
- })
- "
- >
- <div class="epah-right-text">招生简章</div>
- <div class="epah-right-btn">立即查看</div>
- </div>
- </el-col>
- </el-row>
- </div>
- <div
- class="education-promote-activity-list"
- v-if="activityList.length"
- v-loading="loading"
- >
- <el-row :gutter="24">
- <el-col
- :xs="24"
- :sm="12"
- :md="12"
- :lg="6"
- :xl="6"
- v-for="(item, index) in activityList"
- :key="index"
- >
- <div class="epal-item">
- <div class="epal-item-image">
- <el-image :src="item.img" class="image" fit="cover">
- <div slot="placeholder" class="image-slot">
- 加载中<span class="dot">...</span>
- </div>
- </el-image>
- </div>
- <p>{{ item.name || "-" }}</p>
- <p>{{ item.schoolName || "-" }}</p>
- </div>
- </el-col>
- </el-row>
- <div class="pagination" v-if="total">
- <el-pagination
- background
- layout="prev, pager, next"
- :page-size="queryParams.pageSize"
- :total="total"
- @current-change="currentChange"
- />
- </div>
- </div>
- <el-empty description="列表数据为空" v-else></el-empty>
- </div>
- </div>
- </div>
- </template>
- <script>
- import BannerBreadcrumb from "@/components/BannerBreadcrumb";
- import { getSchoolListData, getActivityBySchool } from "@/api/EducationPromote";
- export default {
- name: "EducationPromoteIndex",
- components: {
- BannerBreadcrumb,
- },
- data() {
- return {
- schoolList: [],
- queryParams: {
- schoolId: undefined,
- pageNum: 1,
- pageSize: 8,
- },
- activityList: [],
- total: 0,
- loading: false,
- currentSchool: {},
- };
- },
- created() {
- this.getSchoolList();
- },
- methods: {
- /**
- * 获取学院列表
- * @date 2022-08-12
- * @returns {any}
- */
- getSchoolList() {
- getSchoolListData().then((res) => {
- this.schoolList = res.data;
- this.queryParams.schoolId = res.data[0].id;
- this.currentSchool = res.data[0];
- this.getACtivityList();
- });
- },
- /**
- * 获取学院活动列表
- * @date 2022-08-12
- * @returns {any}
- */
- getACtivityList() {
- this.loading = true;
- getActivityBySchool(this.queryParams).then((res) => {
- this.activityList = res.rows;
- this.total = Number(res.total);
- this.loading = false;
- });
- },
- /**
- * 分页切换触发
- * @date 2022-08-12
- * @param {any} page
- * @returns {any}
- */
- currentChange(page) {
- this.queryParams.pageNum = page;
- this.getACtivityList();
- },
- /**
- * 学院切换
- * @date 2022-08-12
- * @param {any} val
- * @returns {any}
- */
- schoolChange(val) {
- this.schoolList.forEach((item) => {
- if (val === item.id) {
- this.currentSchool = item;
- }
- });
- this.queryParams.schoolId = val;
- this.queryParams.pageNum = 1;
- this.getACtivityList();
- },
- /**
- * 跳转到指定页面
- * @date 2022-08-11
- * @param {any} path
- * @returns {any}
- */
- jumpPage(path, query) {
- if (path) {
- this.$router.push({ path, query });
- }
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .education-promote {
- padding-bottom: 30px;
- &-banner {
- width: 100%;
- height: 295px;
- .image {
- width: 100%;
- height: 100%;
- }
- }
- &-effect {
- width: 100%;
- height: 160px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- background: #fff;
- &-item {
- width: 33%;
- text-align: center;
- p {
- color: #3d5d4c;
- font-size: 34px;
- &:last-child {
- background-color: #8ead9c;
- color: #fff;
- font-size: 24px;
- width: 140px;
- height: 40px;
- line-height: 40px;
- text-align: center;
- margin: 10px auto 0;
- border-radius: 20px;
- font-weight: normal;
- }
- }
- }
- }
- &-activity {
- margin-top: 10px;
- &-header {
- margin-bottom: 40px;
- .epah-left {
- display: flex;
- &-select {
- width: calc(100% - 171px);
- :deep(.el-input__inner) {
- height: 50px;
- line-height: 50px;
- border-top-right-radius: 0;
- border-bottom-right-radius: 0;
- }
- }
- &-btn {
- width: 171px;
- height: 50px;
- line-height: 50px;
- text-align: center;
- background-color: #a4c5df;
- color: #fff;
- border-radius: 0 5px 5px 0;
- cursor: pointer;
- }
- }
- .epah-right {
- background-color: #678f7a;
- height: 50px;
- line-height: 50px;
- border-radius: 5px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- padding: 0 27px;
- &-text {
- color: #fff;
- font-size: 20px;
- font-weight: 700;
- }
- &-btn {
- background-color: #fff;
- border-radius: 19px;
- width: 100px;
- height: 30px;
- line-height: 30px;
- text-align: center;
- font-size: 14px;
- color: #678f7a;
- cursor: pointer;
- }
- }
- }
- &-list {
- .epal-item {
- margin-bottom: 20px;
- cursor: pointer;
- &-image {
- height: 180px;
- width: 100%;
- margin-bottom: 5px;
- .image {
- width: 100%;
- height: 100%;
- border: solid 1px #e0e0e0;
- border-radius: 2px;
- }
- }
- p {
- font-size: 20px;
- color: #3f3f3f;
- margin-bottom: 5px;
- &:last-child {
- color: #a2a2a2;
- font-size: 16px;
- }
- }
- }
- .pagination {
- text-align: center;
- margin-top: 20px;
- :deep(.el-pager .active) {
- background-color: #ff3939;
- }
- :deep(.el-pagination.is-background .el-pager li:not(.disabled).active) {
- background-color: #ff3939;
- }
- }
- }
- }
- }
- </style>
|