当前位置: 首页 > news >正文

[免费]SpringBoot+Vue高考志愿填报系统【论文+源码+SQL脚本】

大家好,我是java1234_小锋老师,看到一个不错的SpringBoot+Vue高考志愿填报系统,分享下哈。

项目视频演示

【免费】Springboot+Vue高考志愿填报系统 Java毕业设计_哔哩哔哩_bilibili

项目介绍

随着高考制度的不断完善和高等教育资源的日益丰富,高考志愿填报成为考生和家长关注的焦点。本文旨在开发一个基于Spring Boot后端框架、Vue.js前端框架和MySQL数据库的高考志愿填报系统,提高志愿填报的效率和准确性,为考生和家长提供便捷的服务。

系统主要实现以下功能:考生信息管理、院校信息查询、专业信息查询、志愿填报、志愿评测等。通过Spring Boot框架构建后端服务,提供 API接口与前端进行交互;Vue.js框架用于构建前端用户界面,实现数据的动态展示和交互操作;MySQL数据库用于存储考生信息、院校信息、专业信息等数据。

在系统设计过程中,我们充分考虑了系统的易用性、可扩展性和安全性。通过合理的数据库设计和优化,提高了系统的查询效率。同时,采用Spring Security等安全框架对系统进行安全防护,确保数据的安全性。

本文详细阐述了系统的需求分析、设计、实现和测试过程,并对关键技术和实现难点进行了深入探讨。通过实验验证,本系统能够满足高考志愿填报的基本需求,为考生和家长提供了高效、便捷的服务。此外,本文还对系统未来的发展方向和改进空间进行了展望,以期进一步完善系统功能,提高用户体验。

系统展示

部分代码

package com.shanzhu.volunteer.modules.system.service;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.date.DateUtil;
import com.google.common.collect.Lists;
import com.shanzhu.volunteer.common.utils.DictUtil;
import com.shanzhu.volunteer.common.utils.EntityCopyUtil;
import com.shanzhu.volunteer.common.utils.SecurityUtil;
import com.shanzhu.volunteer.interfaces.body.system.dict.DictDataBody;
import com.shanzhu.volunteer.interfaces.vo.system.dict.DictDataVo;
import com.shanzhu.volunteer.interfaces.vo.system.dict.converter.DictVoConverter;
import com.shanzhu.volunteer.modules.system.entity.model.SysDictData;
import com.shanzhu.volunteer.modules.system.repository.ISysDictDataRepo;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 数字字典信息业务层
 *
 
 * @date: 2023-03-05 09:16:08
 */
@Slf4j
@Service
@RequiredArgsConstructor
public class SysDictDataService {

    private final ISysDictDataRepo dictDataRepository;

    /**
     * 根据条件分页查询字典数据
     *
     * @param dictDataBody 字典数据对象请求体
     * @return 字典类别
     */
    public List<SysDictData> selectDictDataList(DictDataBody dictDataBody) {
        return dictDataRepository.selectDictDataList(EntityCopyUtil.copyEntity(SysDictData.class, dictDataBody));
    }

    /**
     * 根据字典类型查询字典数据
     *
     * @param dictType 字典类型
     * @return 字典数据集合信息
     */
    public List<DictDataVo> selectDictDataByType(String dictType) {
        List<SysDictData> sysDictDataList = dictDataRepository.selectDictDataByType(dictType);
        if (CollUtil.isEmpty(sysDictDataList)) {
            return Lists.newArrayList();
        }
        return DictVoConverter.INSTANT.sysDictDataToDictDataVo(sysDictDataList);
    }

    /**
     * 查询字典数据详细
     *
     * @param dictCode 字典code
     * @return 字典详情
     */
    public DictDataVo selectDictDataById(Long dictCode) {
        SysDictData dictData = dictDataRepository.getById(dictCode);
        return EntityCopyUtil.copyEntity(DictDataVo.class, dictData);
    }

    /**
     * 新增字典类型
     *
     * @param dictDataBody 字典请求对象
     * @return 结果
     */
    public Boolean insertDictData(DictDataBody dictDataBody) {
        SysDictData sysDictData = EntityCopyUtil.copyEntity(SysDictData.class, dictDataBody);
        sysDictData.setCreateBy(SecurityUtil.getUsername());
        sysDictData.setCreateTime(DateUtil.date());

        dictDataRepository.save(sysDictData);

        // 更新缓存
        updateCache(sysDictData);

        return Boolean.TRUE;
    }

    /**
     * 修改保存字典类型
     *
     * @param dictDataBody 字典请求对象
     * @return 结果
     */
    public Boolean updateDictData(DictDataBody dictDataBody) {
        SysDictData sysDictData = EntityCopyUtil.copyEntity(SysDictData.class, dictDataBody);
        sysDictData.setUpdateBy(SecurityUtil.getUsername());
        sysDictData.setUpdateTime(DateUtil.date());

        dictDataRepository.updateById(sysDictData);

        // 更新缓存
        updateCache(sysDictData);

        return Boolean.TRUE;
    }

    /**
     * 删除字典
     *
     * @param dictCodes 字典code集合
     * @return 结果
     */
    public Boolean deleteDictDatas(Long[] dictCodes) {
        for (Long dictCode : dictCodes) {
            SysDictData data = dictDataRepository.getById(dictCode);
            dictDataRepository.removeById(dictCode);

            List<SysDictData> dictDatas = dictDataRepository.selectDictDataByType(data.getDictType());
            DictUtil.setDictCache(data.getDictType(), dictDatas);
        }

        return Boolean.TRUE;
    }

    /**
     * 更新缓存
     *
     * @param sysDictData 字典类型
     */
    private void updateCache(SysDictData sysDictData) {
        List<SysDictData> dictDatas = dictDataRepository.selectDictDataByType(sysDictData.getDictType());
        DictUtil.setDictCache(sysDictData.getDictType(), dictDatas);
    }

}

<template>
  <div class="login">
    <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">

      <h3 class="title">
        <img src="../assets/logo/logo.png" style="width: 40px;position: relative; top: 13px;right: 6px">
        <span style="color: #e36842">高考志愿填报系统</span>
      </h3>
      <el-form-item prop="username">
        <el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
          <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
        </el-input>
      </el-form-item>
      <el-form-item prop="password">
        <el-input
          v-model="loginForm.password"
          type="password"
          auto-complete="off"
          placeholder="密码"
          @keyup.enter.native="handleLogin"
        >
          <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
        </el-input>
      </el-form-item>
      <el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
      <el-form-item style="width:100%;">
        <el-button
          :loading="loading"
          size="medium"
          type="primary"
          style="width:100%;"
          @click.native.prevent="handleLogin"
        >
          <span v-if="!loading">登 录</span>
          <span v-else>登 录 中...</span>
        </el-button>
        <div style="float: right;" v-if="register">
          <router-link class="link-type" :to="'/register'">立即注册</router-link>
        </div>
     
      </el-form-item>
    </el-form>
    <!--  底部  -->
  </div>
</template>

<script>
import { getCodeImg } from "@/api/login";
import Cookies from "js-cookie";
import { encrypt, decrypt } from '@/utils/jsencrypt'

export default {
  name: "Login",
  data() {
    return {
      codeUrl: "",
      cookiePassword: "",
      loginForm: {
        username: "admin",
        password: "admin123",
        rememberMe: false,
        code: "",
        uuid: ""
      },
      loginRules: {
        username: [
          { required: true, trigger: "blur", message: "请输入您的账号" }
        ],
        password: [
          { required: true, trigger: "blur", message: "请输入您的密码" }
        ]
      },
      loading: false,
      // 注册开关
      register: true,
      redirect: undefined
    };
  },
  watch: {
    $route: {
      handler: function(route) {
        this.redirect = route.query && route.query.redirect;
      },
      immediate: true
    }
  },
  created() {
    this.getCookie();
  },
  methods: {
    getCookie() {
      const username = Cookies.get("username");
      const password = Cookies.get("password");
      const rememberMe = Cookies.get('rememberMe')
      this.loginForm = {
        username: username === undefined ? this.loginForm.username : username,
        password: password === undefined ? this.loginForm.password : decrypt(password),
        rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
      };
    },
    handleLogin() {
      this.$refs.loginForm.validate(valid => {
        console.log("进行登录操作")
        if (valid) {
          this.loading = true;
          if (this.loginForm.rememberMe) {
            Cookies.set("username", this.loginForm.username, { expires: 30 });
            Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
            Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
          } else {
            Cookies.remove("username");
            Cookies.remove("password");
            Cookies.remove('rememberMe');
          }
          this.$store.dispatch("Login", this.loginForm).then(() => {
            this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
          }).catch(() => {
            this.loading = false;
          });
        }
      });
    }
  }
};
</script>

<style rel="stylesheet/scss" lang="scss">
.login {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  background-image: url("../assets/images/login-background.jpg");
  background-size: cover;

}
.title {
  margin: 0px auto 30px auto;
  text-align: center;
  color: #707070;
}

.login-form {
  opacity: 0.95;
  border-radius: 6px;
  background: #ffffff;
  width: 450px;
  margin-left: 60%;
  padding: 25px 25px 5px 25px;
  .el-input {
    height: 38px;
    input {
      height: 38px;
    }
  }
  .input-icon {
    height: 39px;
    width: 14px;
    margin-left: 2px;
  }
}
.login-tip {
  font-size: 13px;
  text-align: center;
  color: #bfbfbf;
}
.login-code {
  width: 33%;
  height: 38px;
  float: right;
  img {
    cursor: pointer;
    vertical-align: middle;
  }
}
.el-login-footer {
  height: 40px;
  line-height: 40px;
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  color: #fff;
  font-family: Arial;
  font-size: 12px;
  letter-spacing: 1px;
}
.login-code-img {
  height: 38px;
}
</style>
<!--<template>
  <div>
    <el-input v-model="url" type="text" style="width: 20%" /> &nbsp; &nbsp;
    <el-button @click="join" type="primary">连接</el-button>
    <el-button @click="exit" type="danger">断开</el-button>

    <br />
    <el-input type="textarea" v-model="message" :rows="9" />
    <el-button type="info" @click="send">发送消息</el-button>
    <br />
    <br />
    <el-input type="textarea" v-model="text_content" :rows="9" /> 返回内容
    <br />
    <br />
  </div>
</template>

<script>
export default {
  data() {
    return {
      url: "ws://127.0.0.1:8080/websocket/message",
      message: "",
      text_content: "",
      ws: null,
    };
  },
  methods: {
    join() {
      const wsuri = this.url;
      this.ws = new WebSocket(wsuri);
      const self = this;
      this.ws.onopen = function (event) {
        self.text_content = self.text_content + "已经打开连接!" + "\n";
      };
      this.ws.onmessage = function (event) {
        self.text_content += event.data + "\n";
      };
      this.ws.onclose = function (event) {
        self.text_content = self.text_content + "已经关闭连接!" + "\n";
      };
    },
    exit() {
      if (this.ws) {
        this.ws.close();
        this.ws = null;
      }
    },
    send() {
      if (this.ws) {
        this.ws.send(this.message);
      } else {
        alert("未连接到服务器");
      }
    },
  },
};
</script>-->

源码下载

链接:https://pan.baidu.com/s/1Be7Ff2V7AJNb64IFpO1-5Q
提取码:1234

http://www.dtcms.com/a/122395.html

相关文章:

  • MySQL | 三大日志文件
  • KHARPA币:结合传统与区块链技术的DeFi DAO革命
  • Houdini20.5apex绑定模块入门学习笔记
  • 参考平面跨分割情况下的信号回流
  • 落地DevOps文化:运维变革的正确打开方式
  • C#里设计Modbus-RTU(Remote Terminal Unit)协议
  • STM32——RTC实时时钟
  • Windows 部署项目 apache + mod_wsgi,nginx + waitress
  • 栈与堆的本质区别:深入理解 Rust 的内存管理模型
  • Xilinx虚拟输入/输出(VIO)IP核详细介绍及使用示例
  • Smith-Waterman 算法(C++实现)
  • SpringBoot 接口限流Lua脚本接合Redis 服务熔断 自定义注解 接口保护
  • postman 安装及使用 [软件测试工具]
  • 如何根据不同文字内容批量生产手写的图片,模拟真人写的笔记(待验证)
  • 代码随想录算法训练营Day24
  • 第1章 对大型语言模型的介绍
  • SQL优化技术分享:从 321 秒到 0.2 秒的性能飞跃 —— 基于 PawSQL 的 TPCH 查询优化实战
  • 栈与队列及其基础应用
  • 【Kafka基础】topic命令行工具kafka-topics.sh:基础操作命令解析
  • STM32低功耗
  • 数据结构--堆
  • 软件测试之功能测试详解
  • C++语法学习之路
  • Mac监控新风尚:酷炫界面,性能监控更直观!
  • 数字图像处理作业4
  • SQLite 中日期型数据定义及处理(Delphi 版本)
  • IDEA :物联网ThingsBoard-gateway配置,运行Python版本,连接thingsboard,接入 MQTT 设备
  • [ACM_1] 输入输出 | 多行 | 多组 | getline(cin,s) | cin处理
  • 【MySQL】——事务的隔离性
  • Dubbo的简单介绍