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

[免费]微信小程序问卷调查系统(SpringBoot后端+Vue管理端)【论文+源码+SQL脚本】

大家好,我是java1234_小锋老师,看到一个不错的微信小程序问卷调查系统(SpringBoot后端+Vue管理端)【论文+源码+SQL脚本】,分享下哈。

项目视频演示

【免费】微信小程序问卷调查系统(SpringBoot后端+Vue管理端) Java毕业设计_哔哩哔哩_bilibili

项目介绍

问卷调查系统设计的目的是为用户提供公告信息、问卷调查等方面的平台。

与PC端应用程序相比,问卷调查系统的设计主要面向于用户,旨在为管理员用户、调查人提供一个问卷调查系统用户可以通过APP及时查看问卷调查信息等。

问卷调查系统是在安卓操作系统下的应用平台。为防止出现兼容性及稳定性问题,编辑器选择的是Hbuildex用户与后台之间的数据存储主要通过MySQL。用户在使用应用时产生的数据通过 java等语言传递给数据库。通过此方式促进问卷调查系统信息流动和数据传输效率,提供一个内容丰富、功能多样、易于操作的问卷调查系统

系统展示

部分代码


package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UsersEntity;
import com.service.TokenService;
import com.service.UsersService;
import com.utils.CommonUtil;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UsersController{@Autowiredprivate UsersService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@RequestMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UsersEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UsersEntity user = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UsersEntity user){EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UsersEntity user){EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UsersEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UsersEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UsersEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UsersEntity user){
//        ValidatorUtils.validateEntity(user);UsersEntity u = userService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername()));if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {return R.error("用户名已存在。");}userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}
<template><div><div class="container" :style='{"minHeight":"100vh","alignItems":"flex-end","background":"url(http://codegen.caihongy.cn/20231023/53250f7f1f2540f7a640c243c9d668aa.png)","display":"flex","width":"100%","backgroundSize":"100% 100%","backgroundPosition":"center center","backgroundRepeat":"no-repeat","justifyContent":"center"}'><el-form :style='{"padding":"20px 20px 20px","boxShadow":"0 0px 0px rgba(64, 158, 255, .8)","margin":"0","borderRadius":"10px","flexWrap":"wrap","background":"transparent","display":"flex","width":"30%","position":"relative","height":"49vh"}'><div v-if="true" :style='{"margin":"0 0 200px 0","color":"#fff","top":"33%","textAlign":"center","left":"0","width":"100%","lineHeight":"44px","fontSize":"48px","position":"fixed","textShadow":"none"}' class="title-container">问卷调查系统的设计与实现登录</div><div v-if="loginType==1" class="list-item" :style='{"width":"80%","margin":"0 auto 10px","alignItems":"center","flexWrap":"wrap","display":"flex"}'><div v-if="false" class="lable" :style='{"width":"64px","lineHeight":"44px","fontSize":"14px","color":"rgba(64, 158, 255, 1)"}'>用户名:</div><input :style='{"border":"4px solid #9B9B9B","padding":"0 30px","boxShadow":"0 0 0px rgba(64, 158, 255, .5)","outline":"0px solid #efefef","color":"#000","borderRadius":"10px","width":"100%","fontSize":"16px","height":"60px"}' placeholder="请输入用户名" name="username" type="text" v-model="rulesForm.username"></div><div v-if="loginType==1" class="list-item" :style='{"width":"80%","margin":"0 auto 10px","alignItems":"center","flexWrap":"wrap","display":"flex"}'><div v-if="false" class="lable" :style='{"width":"64px","lineHeight":"44px","fontSize":"14px","color":"rgba(64, 158, 255, 1)"}'>密码:</div><input :style='{"border":"4px solid #9B9B9B","padding":"0 30px","boxShadow":"0 0 0px rgba(64, 158, 255, .5)","outline":"0px solid #efefef","color":"#000","borderRadius":"10px","width":"100%","fontSize":"16px","height":"60px"}' placeholder="请输入密码" name="password" type="password" v-model="rulesForm.password"></div><div :style='{"width":"80%","margin":"20px auto 40px"}' v-if="roles.length>1" prop="loginInRole" class="list-type"><el-radio v-if="loginType==1||(loginType==2&&item.roleName!='管理员')" v-for="item in roles" v-bind:key="item.roleName" v-model="rulesForm.role" :label="item.roleName">{{item.roleName}}</el-radio></div><div :style='{"width":"auto","margin":"0 auto","display":"flex"}'><el-button v-if="loginType==1" :style='{"border":"1px solid #0E9BD3","cursor":"pointer","padding":"0 0","margin":"0 10px","color":"#0E9BD3","borderRadius":"0","background":"transparent","borderWidth":"0 0 4px","width":"auto","fontSize":"30px","fontWeight":"bold","height":"44px"}' type="primary" @click="login()" class="loginInBt">登录</el-button><el-button :style='{"border":"1px solid #9B9B9B","cursor":"pointer","padding":"0 20px","margin":"0 10px 10px","color":"#9B9B9B","borderRadius":"10px","background":"#fff","width":"auto","fontSize":"14px","height":"44px"}' type="primary" @click="register('diaocharen')" class="register">注册调查人</el-button></div></el-form></div></div>
</template>
<script>
import menu from "@/utils/menu";
export default {data() {return {verifyCheck2: false,flag: false,baseUrl:this.$base.url,loginType: 1,rulesForm: {username: "",password: "",role: "",},menus: [],roles: [],tableName: "",};},mounted() {let menus = menu.list();this.menus = menus;for (let i = 0; i < this.menus.length; i++) {if (this.menus[i].hasBackLogin=='是') {this.roles.push(this.menus[i])}}},created() {},destroyed() {},components: {},methods: {//注册register(tableName){this.$storage.set("loginTable", tableName);this.$router.push({path:'/register',query:{pageFlag:'register'}})},// 登陆login() {if (!this.rulesForm.username) {this.$message.error("请输入用户名");return;}if (!this.rulesForm.password) {this.$message.error("请输入密码");return;}if(this.roles.length>1) {if (!this.rulesForm.role) {this.$message.error("请选择角色");return;}let menus = this.menus;for (let i = 0; i < menus.length; i++) {if (menus[i].roleName == this.rulesForm.role) {this.tableName = menus[i].tableName;}}} else {this.tableName = this.roles[0].tableName;this.rulesForm.role = this.roles[0].roleName;}this.loginPost()},loginPost() {this.$http({url: `${this.tableName}/login?username=${this.rulesForm.username}&password=${this.rulesForm.password}`,method: "post"}).then(({ data }) => {if (data && data.code === 0) {this.$storage.set("Token", data.token);this.$storage.set("role", this.rulesForm.role);this.$storage.set("sessionTable", this.tableName);this.$storage.set("adminName", this.rulesForm.username);this.$router.replace({ path: "/" });} else {this.$message.error(data.msg);}});},}
}
</script><style lang="scss" scoped>
.container {min-height: 100vh;position: relative;background-repeat: no-repeat;background-position: center center;background-size: cover;background: url(http://codegen.caihongy.cn/20231023/53250f7f1f2540f7a640c243c9d668aa.png);.list-item /deep/ .el-input .el-input__inner {border: 4px solid #9B9B9B;border-radius: 10px;padding: 0 30px;box-shadow: 0 0 0px rgba(64, 158, 255, .5);outline: 0px solid #efefef;color: #000;width: 100%;font-size: 16px;height: 60px;}.list-item.select /deep/ .el-select .el-input__inner {border: 1px solid rgba(64, 158, 255, 1);padding: 0 10px;box-shadow: 0 0 6px rgba(64, 158, 255, .5);outline: 1px solid #efefef;color: rgba(64, 158, 255, 1);width: 288px;font-size: 14px;outline-offset: 4px;height: 44px;}.list-code /deep/ .el-input .el-input__inner {border: 0px solid rgba(64, 158, 255, 1);padding: 0 10px;outline: none;color: #000;width: calc(100% - 80px);font-size: 16px;height: 100%;}.list-type /deep/ .el-radio__input .el-radio__inner {background: rgba(53, 53, 53, 0);border-color: #9B9B9B;}.list-type /deep/ .el-radio__input.is-checked .el-radio__inner {background: #00ACEE;border-color: #00ACEE;}.list-type /deep/ .el-radio__label {color: #9B9B9B;font-size: 14px;}.list-type /deep/ .el-radio__input.is-checked+.el-radio__label {color: #00ACEE;font-size: 14px;}
}</style>

源码下载

链接:https://pan.baidu.com/s/1JK2eyS-nnaFNpwRtTgoeRg
提取码:1234

相关文章:

  • 设计模式-抽象工厂模式
  • C/Python/Go示例 | Socket Programing与RPC
  • 云原生时代的系统设计:架构转型的战略支点
  • GO语言---init函数
  • Go 语言底层(四) : 深入 Context 上下文
  • 鸿蒙 Stege模型 多模块应用
  • GO 基础语法和数据类型面试题及参考答案(下)
  • 解密鸿蒙系统的隐私护城河:从权限动态管控到生物数据加密的全链路防护
  • FreeRTOS任务基础知识
  • VLLM : RuntimeError: NCCL error: invalid usage
  • RT_Thread——线程管理(下)
  • 高端性能封装正在突破性能壁垒,其芯片集成技术助力人工智能革命。
  • window 显示驱动开发-如何查询视频处理功能(三)
  • 从零手写Java版本的LSM Tree (八):LSM Tree 主程序实现
  • 华为云Flexus+DeepSeek征文 | MaaS平台避坑指南:DeepSeek商用服务开通与成本控制
  • HTML5实现简洁的体育赛事网站源码
  • Nosql之Redis集群
  • 多元隐函数 偏导公式
  • 【微服务基石篇】服务间的对话:RestTemplate、WebClient与OpenFeign对比与实战
  • 我的世界Java版1.21.4的Fabric模组开发教程(十二)方块状态
  • 做产品推广有网站比较好的/网站策划是干什么的
  • 欧美简约风格网站设计/免费自助建站平台
  • wordpress文章显示标签/电脑优化大师哪个好
  • 商城网站建设如何交谈/营销技巧和营销方法视频
  • 信息化建设 公司网站/百度关键字优化价格
  • 软件系统定制开发/安卓优化大师旧版本