若依前后端分离版本项目总结笔记

若依前后端分离学习笔试

1.路由问题

在这里插入图片描述

注意这个是前端找到你的路由的路径

2.表格开关按钮快速实现

在这里插入图片描述

  <el-table-column label="状态" align="center" key="status"><template slot-scope="scope"><el-switchv-model="scope.row.status"active-value="0"inactive-value="1"@change="handleStatusChange(scope.row)"></el-switch></template></el-table-column>//methods add this method// 状态修改handleStatusChange(row) {  let text = row.status === "0" ? "启用" : "停用";this.$modal.confirm('确认要"' + text + '""' + row.title + '"量表吗?').then(function() {return changeStatus(row.scaleId,row.status);}).then(() => {this.$modal.msgSuccess(text + "成功");}).catch(function() {row.status = row.status === "0" ? "1" : "0";});},
// import this
import { listScaleInfo, getScaleInfo, delScaleInfo, addScaleInfo, updateScaleInfo, changeStatus } from "@/api/businessManagement/scaleBaseinfo";// 修改分类状态
export function changeStatus(scaleId,status) {const data = {scaleId,status}return request({url: '/businessManage/scaleInfo/changeStatus',method: 'put',data: data})}@Log(title = "修改状态", businessType = BusinessType.UPDATE)@PutMapping("/changeStatus")public  AjaxResult  changeStatus(@RequestBody ScaleBaseinfo scaleBaseinfo){return toAjax(scaleBaseinfoService.changeStatus(scaleBaseinfo));}//interface generate this method automatically@Overridepublic int changeStatus(ScaleBaseinfo scaleBaseinfo) {return scaleBaseinfoMapper.updateScaleBaseinfo(scaleBaseinfo);}

3.选中指定的导出和批量导出

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-DzSR5QCH-1692860445254)(C:\Users\My Windows pc\AppData\Roaming\Typora\typora-user-images\image-20230805105954569.png)]

      <el-col :span="1.5"><template><div><el-button type="primary" icon="el-icon-download" @click="handleExport"  size="mini">批量导出<el-dropdown @command="handleExportCommand"><span class="el-dropdown-link"><i class="el-icon-arrow-down el-icon--right"></i></span><el-dropdown-menu slot="dropdown"><el-dropdown-item command="selected">当前选中</el-dropdown-item><el-dropdown-item command="search">当前搜索</el-dropdown-item></el-dropdown-menu></el-dropdown></el-button></div></template></el-col>/** 导出按钮操作 */handleExport() {// 根据不同的导出选项执行不同的导出逻辑if (this.exportOption === 'selected') {// 导出当前选中的数据// 执行导出逻辑if(this.queryParams.stuIds.length === 0){// alert("请选中学生数据进行导出!");this.$modal.msgWarning("请选中学生数据进行导出!");return;}this.download('usersManage/student/export', {...this.queryParams }, `Student_${new Date().getTime()}.xlsx`)} else if (this.exportOption === 'search') {// 导出当前搜索的数据// 执行导出逻辑this.download('usersManage/student/export', {...this.queryParams  }, `Student_${new Date().getTime()}.xlsx`)} else {// 默认导出全部数据// 执行导出逻辑this.$modal.msgWarning("请选中导出的类型!");}},handleExportCommand(command) {this.exportOption = command;this.handleExport();},

后端code

    /*** 导出学生基本信息列表*/@PreAuthorize("@ss.hasPermi('usersManage:student:export')")@Log(title = "学生基本信息", businessType = BusinessType.EXPORT)@PostMapping("/export")public void export(HttpServletResponse response, BasicStudent basicStudent){List<BasicStudent> list = bStudentService.selectStudentVoList(basicStudent);ExcelUtil<BasicStudent> util = new ExcelUtil<BasicStudent>(BasicStudent.class);util.exportExcel(response, list, "学生基本信息数据");}//注意这里第一行实现的东西,直接可以batchExport<select id="selectBStudentList" parameterType="BasicStudent" resultMap="BStudentResult"><include refid="selectBStudentVo"/><where><if test="stuIds != null">AND stu_id IN<foreach collection="stuIds" item="stuId" separator="," open="(" close=")">#{stuId}</foreach></if><if test="studentId != null  and studentId != ''"> and stu_id = #{studentId}</if><if test="stuName != null  and stuName != ''"> and stu_name like concat('%', #{stuName}, '%')</if><if test="sessionId != null "> and session_id = #{sessionId}</if><if test="schId != null "> and b.sch_id = #{schId}</if><if test="cId != null "> and clazz_id = #{cId}</if><if test="pId != null "> and parent_id = #{pId}</if><if test="schoolName != null  and schoolName != ''"> and sch.school_name = #{schoolName}</if><if test="area != null  and area != ''"> and sch.area = #{area}</if><if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->and date_format(s.createTime,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')</if><if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->and date_format(s.createTime,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')</if><if test="createBy != null  and createBy != ''"> and s.createBy = #{createBy}</if><if test="updateBy != null "> and s.updateBy = #{updateBy}</if></where></select>

4.生产环境打包前端问题

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-obqn1viz-1692860445254)(C:\Users\My Windows pc\AppData\Roaming\Typora\typora-user-images\image-20230814151450666.png)]

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-FCuPRfsS-1692860445255)(C:\Users\My Windows pc\AppData\Roaming\Typora\typora-user-images\image-20230814145627399.png)]

[{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"areaId": 1,"areaName": "南校区","schId": 2,"basicSchool": null,"basicGradeList": [{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 1,"gradeName": "一年级","areaId": 1,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 2,"gradeName": "二年级","areaId": 1,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 3,"gradeName": "三年级","areaId": 1,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 4,"gradeName": "一年级","areaId": 2,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 5,"gradeName": "二年级","areaId": 2,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 6,"gradeName": "一年级","areaId": 3,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 7,"gradeName": "一年级","areaId": 3,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 9,"gradeName": "二年级","areaId": 4,"basicSchoolArea": null,"basicClassList": null}]},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"areaId": 2,"areaName": "北校区","schId": 2,"basicSchool": null,"basicGradeList": [{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 1,"gradeName": "一年级","areaId": 1,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 2,"gradeName": "二年级","areaId": 1,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 3,"gradeName": "三年级","areaId": 1,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 4,"gradeName": "一年级","areaId": 2,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 5,"gradeName": "二年级","areaId": 2,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 6,"gradeName": "一年级","areaId": 3,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 7,"gradeName": "一年级","areaId": 3,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 9,"gradeName": "二年级","areaId": 4,"basicSchoolArea": null,"basicClassList": null}]},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"areaId": 3,"areaName": "东校区","schId": 2,"basicSchool": null,"basicGradeList": [{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 1,"gradeName": "一年级","areaId": 1,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 2,"gradeName": "二年级","areaId": 1,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 3,"gradeName": "三年级","areaId": 1,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 4,"gradeName": "一年级","areaId": 2,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 5,"gradeName": "二年级","areaId": 2,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 6,"gradeName": "一年级","areaId": 3,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 7,"gradeName": "一年级","areaId": 3,"basicSchoolArea": null,"basicClassList": null},{"createBy": null,"createTime": null,"updateBy": null,"updateTime": null,"remark": null,"gradeId": 9,"gradeName": "二年级","areaId": 4,"basicSchoolArea": null,"basicClassList": null}]这个数据 怎么用elmentUI层级表示,一级显示的label是areaName, children: 'basicGradeList',二级显示的label是gradeName, children: 'basicClassList',三级显示的是className,没有children,怎么用elmentUI表示

5.路由跳转问题

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-m54viF4f-1692860445256)(C:\Users\My Windows pc\AppData\Roaming\Typora\typora-user-images\image-20230815164743889.png)]

  viewGrade(row){const areaId = row.areaId;this.$router.push({path: "/schoolManage/grade/",query: {areaId:  areaId}});},

代办问题:

查询的一些列表没有加上 学校id

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/51558.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

VS+Qt 自定义Dialog

与QtCreator不同&#xff0c;刚用VS添加Qt Dialog界面有点懵&#xff0c;后整理了下&#xff1a; 1.右击项目&#xff0c;选择“添加-模块”&#xff0c;然后选择“Qt-Qt Widgets Class” 2.选择基类[1]QDialog,更改[2]ui文件名称&#xff0c;修改定义Dialog[3]对应类名&#…

【面试题系列】(一)

Redis有哪些数据结构&#xff1f;其底层是怎么实现的&#xff1f; Redis 系列&#xff08;一&#xff09;&#xff1a;深入了解 Redis 数据类型和底层数据结构 字符串&#xff08;String&#xff09;&#xff1a; 用于存储文本或二进制数据。可以执行字符串的基本操作&#xf…

每日一题 113路径总和||(递归)

题目 给你二叉树的根节点 root 和一个整数目标和 targetSum &#xff0c;找出所有 从根节点到叶子节点 路径总和等于给定目标和的路径。 叶子节点 是指没有子节点的节点。 示例 1&#xff1a; 输入&#xff1a;root [5,4,8,11,null,13,4,7,2,null,null,5,1], targetSum 22…

【Mybatis源码分析】Mybatis 是如何实现预编译的?

Mybatis 是如何实现预编译的&#xff1f; 一、前言二、源码分析三、总结 一、前言 在介绍 Mybatis 是如何实现预编译之前&#xff0c;需提前知道俩个预备知识&#xff1a; MySQL的运行流程&#xff08;对应的 SQL 会成为一个文本-》查询缓存&#xff08;8.0后没了&#xff09…

CSS中如何实现多列布局?

聚沙成塔每天进步一点点 ⭐ 专栏简介⭐ 多列布局&#xff08;Multi-column Layout&#xff09;⭐ column-count⭐ column-width⭐ column-gap⭐ column-rule⭐ column-span⭐ 示例⭐ 写在最后 ⭐ 专栏简介 前端入门之旅&#xff1a;探索Web开发的奇妙世界 记得点击上方或者右侧…

力扣--数组类题目1.两数之和

1.两数之和 给定一个整数数组 nums 和一个整数目标值 target&#xff0c;请你在该数组中找出 和为目标值 target 的那 两个 整数&#xff0c;并返回它们的数组下标。 你可以假设每种输入只会对应一个答案。但是&#xff0c;数组中同一个元素在答案里不能重复出现。 你可以按任…

JavaWeb_LeadNews_Day7-ElasticSearch, Mongodb

JavaWeb_LeadNews_Day7-ElasticSearch, Mongodb elasticsearch安装配置 app文章搜索创建索引库app文章搜索思路分析具体实现 新增文章创建索引思路分析具体实现 MongoDB安装配置SpringBoot集成MongoDB app文章搜索记录保存搜索记录思路分析具体实现 查询搜索历史删除搜索历史 搜…

时序分解 | MATLAB实现基于SGMD辛几何模态分解的信号分解分量可视化

时序分解 | MATLAB实现基于SGMD辛几何模态分解的信号分解分量可视化 目录 时序分解 | MATLAB实现基于SGMD辛几何模态分解的信号分解分量可视化效果一览基本介绍程序设计参考资料 效果一览 基本介绍 SGMD分解算法&#xff08;辛几何模态分解&#xff09;&#xff0c;分解结果可视…

再学http-为什么文件上传要转成Base64?

1 前言 最近在开发中遇到文件上传采用Base64的方式上传&#xff0c;记得以前刚开始学http上传文件的时候&#xff0c;都是通过content-type为multipart/form-data方式直接上传二进制文件&#xff0c;我们知道都通过网络传输最终只能传输二进制流&#xff0c;所以毫无疑问他们本…

超越界限:大模型应用领域扩展,探索文本分类、文本匹配、信息抽取和性格测试等多领域应用

超越界限&#xff1a;大模型应用领域扩展&#xff0c;探索文本分类、文本匹配、信息抽取和性格测试等多领域应用 随着 ChatGPT 和 GPT-4 等强大生成模型出现&#xff0c;自然语言处理任务方式正在逐步发生改变。鉴于大模型强大的任务处理能力&#xff0c;未来我们或将不再为每…

33、在SpringBoot项目添加Web组件(Servlet、Filter 和 Listener) 的三种方法

通过Spring Bean 来添加 Servlet、Filter 和 Listener ★ 添加Web组件&#xff08;Servlet、Filter、Listener&#xff09;的三种方式&#xff1a; - 使用Spring Bean添加Servlet、Filter或Listener。- 使用XxxRegistrationBean手动添加Servlet、Filter或Listener。- 使用Clas…

QT6安装完成后,再安装低版本的MinGW或其他组件方式

首先进入点击安装的uinstall Qt 并不是真的卸载 通过下面几步 1&#xff0c;首先登录自己账户 2&#xff0c;然后进入欢迎中&#xff0c;点击“添加和移除组件” 3&#xff0c;然后检索自己需要的安装内容

jpa里IdentityGenerator和IncrementGenerator的区别

IdentityGenerator 和 IncrementGenerator 的区别 IdentityGenerator 和 IncrementGenerator 都是 JPA 中可用的主键生成策略&#xff08;GenerationType&#xff09;之一。它们的区别如下&#xff1a; IdentityGenerator: IDENTITY 主键生成策略利用数据库自动生成的主键。在…

Unity实现广告滚动播放、循环播放、鼠标切换的效果

效果&#xff1a; 场景结构&#xff1a; 特殊物体&#xff1a;panel下面用排列组件horizent layout group放置多个需要显示的面板&#xff0c;用mask遮罩好。 using System.Collections; using System.Collections.Generic; using DG.Tweening; using UnityEngine; using Unity…

第4篇:vscode+platformio搭建esp32 arduino开发环境

第1篇:Arduino与ESP32开发板的安装方法 第2篇:ESP32 helloword第一个程序示范点亮板载LED 第3篇:vscode搭建esp32 arduino开发环境 1.配置默认安装路径&#xff0c;安装到D盘。 打开环境变量&#xff0c;点击新建 输入变量名PLATFORMIO_CORE_DIR与路径&#xff1a;D:\PLATF…

linux服务TCP参数配置

Linux TCP参数配置 阿里云规范 1.【推荐】高并发服务器建议调小 TCP 协议的 time_wait 超时时间。 说明&#xff1a;操作系统默认 240 秒后&#xff0c;才会关闭处于 time_wait 状态的连接&#xff0c;在高并发访问下&#xff0c;服务器端会因为处于 time_wait 的连接数太多&am…

Python|Pyppeteer检测应对方法(18)

前言 本文是该专栏的第18篇,结合优质项目案例持续分享Pyppeteer的干货知识,记得关注。 做过selenium项目的同学应该都知道,多数平台在面对selenium的突袭请求时,会被网站检测到存在webdriver或者是其他自动化工具的属性,而网站检测到这些目标属性之后,就会自动触发屏蔽机…

SpringBoot--解决空字符串转枚举异常

原文网址&#xff1a;SpringBoot--解决空字符串转枚举异常_IT利刃出鞘的博客-CSDN博客 简介 本文介绍如何解决Java的SpringBoot中空字符串转枚举时报错的问题。 问题复现 org.springframework.http.converter.HttpMessageNotReadableException: JSON parse error: Cannot d…

腾讯云国际站云服务器使用教程!!!

腾讯云服务器入门教程包括云服务器CPU内存带宽配置选择&#xff0c;选择云服务器CVM或轻量应用服务器&#xff0c;云服务器创建后重置密码、远程连接、搭建程序环境等&#xff0c;腾讯云服务器网分享从0到1腾讯云服务器入门教程&#xff1a; 腾讯云服务器入门教程目录&#xff…