|
@@ -1,294 +0,0 @@
|
|
|
-<template>
|
|
|
- <div id="simulate" ref="simulate">
|
|
|
- <div class="mx-flex-row mx-flex-center-center text-center">
|
|
|
- <el-image fit="cover" style="height:180px; width:80%" :src="require('@/assets/images/career/img_banner02.png')"></el-image>
|
|
|
- </div>
|
|
|
- <!-- 内容区域-->
|
|
|
- <div style="background-color: #ffffff; padding: 20px 10%">
|
|
|
- <!-- 步骤条-->
|
|
|
- <div class="step-list line">
|
|
|
- <div class="step-item right" v-for="(item, index) in topStep" :key="index">
|
|
|
- <div class="step-number" :class="active == item.index ? 'curindex' : ''" v-if="active <= item.index">
|
|
|
- {{ item.index }}
|
|
|
- </div>
|
|
|
- <i v-else class="el-icon-check"></i>
|
|
|
- <div class="step-label">{{ item.label }}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <!-- 内容展示-->
|
|
|
- <div style="min-height: 400px; font-family: PingFangSC-Regular, PingFang SC, Helvetica, serif;">
|
|
|
- <!-- <component :is="isComponent"></component> -->
|
|
|
- <div class="list-page">
|
|
|
- <component :is="isNewCollegeEntranceExam ? 'NewFillScore' : 'FillScore'" ref="score" :isDisIndex="isDisIndex" v-if="active == 1"></component>
|
|
|
- <fill-batch @onFillIn="onFillIn" ref="batch" :zytbBatchesList="zytbBatchesList" :subject="curSubject" :isNewCollegeEntranceExam="isNewCollegeEntranceExam" :firstSubject="firstSubject" :lastSubject="lastSubject" :score="curScore" v-if="active == 2"></fill-batch>
|
|
|
- <fill-major ref="major" :batch="curBatch" :batchInfo="curBatchInfo" :subject="curSubject" :score="curScore" :isNewCollegeEntranceExam="isNewCollegeEntranceExam" :firstSubject="firstSubject" :lastSubject="lastSubject" :year="curBatchInfo.year" v-if="active == 3"></fill-major>
|
|
|
-
|
|
|
- <div class="success-complete" v-if="active == 4">
|
|
|
- <div class="text">填报完成</div>
|
|
|
- <img src="@/assets/images/career/icon_data.png" alt="" />
|
|
|
- <div style="margin-top: 20px">
|
|
|
- <el-button type="primary" @click="goVolunteerList">查看报告</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <el-divider></el-divider>
|
|
|
- <!-- 底部按钮-->
|
|
|
- <div style="text-align: center; margin-top: 30px" v-if="active != 4">
|
|
|
- <el-button @click="goVolunteerList">查看记录</el-button>
|
|
|
- <el-button type="primary" @click="toBackPage" :disabled="active == 1">上一步</el-button>
|
|
|
- <el-button type="primary" v-if="active < 2" :disabled="active == 4" @click="nextStep">下一步</el-button>
|
|
|
- <el-button type="primary" v-if="active >= 2" @click="saveData()">保存志愿</el-button>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-</template>
|
|
|
-
|
|
|
-<script>
|
|
|
-import { zytbBatches, zytbSave } from "@/api/webApi/webQue";
|
|
|
-import { isNewCollegeExam } from "@/api/webApi/career-course";
|
|
|
-import { mapState } from "vuex";
|
|
|
-import SimulateNotice from "../components/SimulateNotice.vue";
|
|
|
-import FillScore from "../components/FillScore.vue";
|
|
|
-import NewFillScore from "../components/NewFillScore.vue";
|
|
|
-import FillBatch from "../components/FillBatch.vue";
|
|
|
-import FillMajor from "../components/FillMajor.vue";
|
|
|
-export default {
|
|
|
- name: "SimulatedVolunteer",
|
|
|
- components: { SimulateNotice, FillScore, FillBatch, FillMajor, NewFillScore },
|
|
|
- data() {
|
|
|
- return {
|
|
|
- curScore: 0,
|
|
|
- curIndex: 0,
|
|
|
- curSubject: "",
|
|
|
- curBatch: 0,
|
|
|
- isDisIndex: true,
|
|
|
- active: 1,
|
|
|
- isNewCollegeEntranceExam: false,
|
|
|
- zytbBatchesList: [],
|
|
|
- firstSubject: "",
|
|
|
- lastSubject: [],
|
|
|
- topStep: [
|
|
|
- // { index: 1, label: "填报须知" },
|
|
|
- { index: 1, label: "高考分数" },
|
|
|
- { index: 2, label: "填报批次" },
|
|
|
- { index: 3, label: "院校专业" },
|
|
|
- { index: 4, label: "保存志愿" },
|
|
|
- ],
|
|
|
- };
|
|
|
- },
|
|
|
- computed: {
|
|
|
- ...mapState({ theme: (state) => state.settings.theme }),
|
|
|
- },
|
|
|
- created() {
|
|
|
- isNewCollegeExam().then((res) => {
|
|
|
- this.isNewCollegeEntranceExam = res.data.isNewCollegeEntranceExam;
|
|
|
- console.log(res);
|
|
|
- });
|
|
|
- },
|
|
|
- watch: {
|
|
|
- theme: {
|
|
|
- immediate: true,
|
|
|
- handler(val) {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.simulate.style.setProperty("--themeColor", val);
|
|
|
- });
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- methods: {
|
|
|
- goVolunteerList() {
|
|
|
- this.$router.push({ name: "VolunteerList" });
|
|
|
- },
|
|
|
- onFillIn(item) {
|
|
|
- this.curBatch = item.batch;
|
|
|
- this.curBatchInfo = item;
|
|
|
- this.active = 3;
|
|
|
- },
|
|
|
- onChangeInputScore(e) {
|
|
|
- console.log(e);
|
|
|
- },
|
|
|
- toBackPage() {
|
|
|
- if (this.active <= 1) {
|
|
|
- return;
|
|
|
- }
|
|
|
- this.active--;
|
|
|
- },
|
|
|
- saveData() {
|
|
|
- if (this.curBatch == 0) {
|
|
|
- this.$message.error("请点击批次按钮进行填写!");
|
|
|
- return;
|
|
|
- }
|
|
|
- let detail = {
|
|
|
- batch: {
|
|
|
- batch: this.curBatchInfo.batch,
|
|
|
- name: this.curBatchInfo.name,
|
|
|
- recommand: this.curBatchInfo.recommand,
|
|
|
- scores: [
|
|
|
- this.curBatchInfo.year + "年投档分",
|
|
|
- "文科:" + this.curBatchInfo.score1,
|
|
|
- "理科:" + this.curBatchInfo.score2,
|
|
|
- ],
|
|
|
- wishes: [],
|
|
|
- },
|
|
|
- mode: this.curSubject || [this.firstSubject, ...this.lastSubject].toString(),
|
|
|
- score: this.curScore,
|
|
|
- };
|
|
|
- if (this.active == 3) {
|
|
|
- let wishe = [];
|
|
|
- let dataList = this.$refs.major.dataList;
|
|
|
- let len = dataList.length;
|
|
|
- for (let i = 0; i < len; i++) {
|
|
|
- let listData = dataList[i];
|
|
|
- if (listData["marjors"] && listData["marjors"].length > 0) {
|
|
|
- wishe.push({
|
|
|
- code: listData["schoolInfo"]["code"],
|
|
|
- marjors: listData["marjors"],
|
|
|
- name: listData["schoolInfo"]["name"],
|
|
|
- submitId: listData["schoolInfo"]["submitId"],
|
|
|
- universityId: listData["schoolInfo"]["universityId"],
|
|
|
- assignment: listData["obeyOrNot"]
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- detail.batch.wishes = wishe;
|
|
|
- }
|
|
|
- if (detail.batch.wishes.length == 0) {
|
|
|
- this.$message.error("请最少填写一个专业");
|
|
|
- return;
|
|
|
- }
|
|
|
- let req = {
|
|
|
- batch: this.curBatch,
|
|
|
- detail: detail,
|
|
|
- name: this.getName(),
|
|
|
- };
|
|
|
- this.httpSave(req);
|
|
|
- },
|
|
|
- getName() {
|
|
|
- var date = new Date();
|
|
|
- let month = date.getMonth() + 1;
|
|
|
- let day = date.getDate();
|
|
|
- return month + "月" + day + "日模拟志愿表";
|
|
|
- },
|
|
|
- httpSave(req) {
|
|
|
- zytbSave(req).then((res) => {
|
|
|
- this.active = 4;
|
|
|
- });
|
|
|
- },
|
|
|
- nextStep() {
|
|
|
- let self = this;
|
|
|
- if (this.active >= 4) {
|
|
|
- return;
|
|
|
- }
|
|
|
- switch (this.active) {
|
|
|
- case 1:
|
|
|
- let score = self.$refs.score;
|
|
|
- if (this.isNewCollegeEntranceExam) {
|
|
|
- //console.log(111111111);
|
|
|
- if (score.hasOwnProperty("firstSubject")) {
|
|
|
- if (score.firstSubject != "" && score.lastSubject.length == 2) {
|
|
|
- this.firstSubject = score.firstSubject;
|
|
|
- this.lastSubject = score.lastSubject;
|
|
|
- } else {
|
|
|
- this.$message.error("请选择科类");
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (score.hasOwnProperty("subject")) {
|
|
|
- this.curSubject = score.subject;
|
|
|
- }
|
|
|
- if (score.hasOwnProperty("inputScore")) {
|
|
|
- this.curScore = score.inputScore;
|
|
|
- }
|
|
|
- if (score.hasOwnProperty("inputIndex")) {
|
|
|
- this.curIndex = score.inputIndex;
|
|
|
- }
|
|
|
- if (this.curScore == 0) {
|
|
|
- this.$message.error("请输入总分!");
|
|
|
- return;
|
|
|
- }
|
|
|
- this.httpzytbBatches(() => {
|
|
|
- self.active = 2;
|
|
|
- });
|
|
|
- break;
|
|
|
- }
|
|
|
- },
|
|
|
- httpzytbBatches(cb) {
|
|
|
- const mode = this.isNewCollegeEntranceExam ? [this.firstSubject, ...this.lastSubject].toString() : this.curSubject;
|
|
|
- zytbBatches({
|
|
|
- score: this.curScore,
|
|
|
- mode: mode,
|
|
|
- }).then((res) => {
|
|
|
- this.zytbBatchesList = res.rows;
|
|
|
- cb && cb();
|
|
|
- });
|
|
|
- },
|
|
|
- },
|
|
|
-};
|
|
|
-</script>
|
|
|
-
|
|
|
-<style scoped>
|
|
|
-.step-list {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- position: relative;
|
|
|
- margin-bottom: 50px;
|
|
|
-}
|
|
|
-.step-list.line::before {
|
|
|
- position: absolute;
|
|
|
- content: "";
|
|
|
- width: 100%;
|
|
|
- height: 2px;
|
|
|
- top: 50%;
|
|
|
- background: #6cd1b5;
|
|
|
- z-index: 0;
|
|
|
-}
|
|
|
-.step-item {
|
|
|
- position: relative;
|
|
|
- background: #fff;
|
|
|
- z-index: 2;
|
|
|
- border: 1px solid #6cd1b5;
|
|
|
- border-radius: 50%;
|
|
|
- color: #6cd1b5;
|
|
|
- width: 48px;
|
|
|
- height: 48px;
|
|
|
- line-height: 46px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
-}
|
|
|
-.step-label {
|
|
|
- font-weight: bolder;
|
|
|
- color: #555555;
|
|
|
- width: 100px;
|
|
|
- text-align: center;
|
|
|
- font-size: 14px;
|
|
|
- position: absolute;
|
|
|
- bottom: -40px;
|
|
|
-}
|
|
|
-.step-number {
|
|
|
- line-height: 48px;
|
|
|
- text-align: center;
|
|
|
-}
|
|
|
-.step-number.curindex {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- background: #6cd1b5;
|
|
|
- border-radius: 50%;
|
|
|
- color: #fff;
|
|
|
-}
|
|
|
-.success-complete {
|
|
|
- font-size: 18px;
|
|
|
- color: #6cd1b5;
|
|
|
- padding: 50px 0;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
-}
|
|
|
-.success-complete .text {
|
|
|
- margin-bottom: 50px;
|
|
|
-}
|
|
|
-</style>
|
|
|
-
|