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

若依前后端分离学习笔试

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.rhkb.cn/news/104447.html

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

相关文章

DevExpress WinForms数据编辑器组件,提供丰富的数据输入样式!(二)

DevExpress WinForms超过80个高影响力的WinForms编辑器和多用途控件&#xff0c;从屏蔽数据输入和内置数据验证到HTML格式化&#xff0c;DevExpress数据编辑库提供了无与伦比的数据编辑选项&#xff0c;包括用于独立数据编辑或用于容器控件(如Grid, TreeList和Ribbon)的单元格。…

柔性数组详解

柔性数组 1.前言 在c99标准中&#xff1a;允许结构体的最后一个变量是未知大小的数组&#xff0c;这就是柔性数组的来源。 例如&#xff1a; typedef struct type_a{ int i;int a[0];//柔性数组成员 }type_a;有些编译器可能会报错&#xff0c;那就使用下面这一种定义方式&…

房屋结构健康监测,科技助力让建筑更安全

房屋建筑是人们赖以生存的场所&#xff0c;然而当前我国许多房屋已经达到了使用寿命的中期&#xff0c;房屋的安全系数逐年降低&#xff0c;风险也随着时间的推移而累积。长期以来&#xff0c;我国的房屋普遍存在寿命短、隐患多的问题&#xff0c;“重建设&#xff0c;轻管理”…

4.网络设计与redis、memcached、nginx组件(一)

网络组件系列文章目录 第四章 网络设计与redis、memcached、nginx组件 文章目录 网络组件系列文章目录文章的思维导图前言一、网络相关的问题&#xff0c;网络开发中要处理那些问题&#xff1f;网络操作IO连接建立连接断开消息到达消息发送网络操作IO特性 二、网络中IO检测IO函…

ssm+vue毕业论文管理系统源码和论文

ssmvue毕业论文管理系统053 开发工具&#xff1a;idea 数据库mysql5.7 数据库链接工具&#xff1a;navcat,小海豚等 技术&#xff1a;ssm 摘 要 高校规模越来越大&#xff0c;学生越来越多&#xff0c;每年都有大批的大学生完成学业。毕业之前&#xff0c;各大高校设立…

浅谈Python网络爬虫应对反爬虫的技术对抗

在当今信息时代&#xff0c;数据是非常宝贵的资源。而作为一名专业的 Python 网络爬虫程序猿&#xff0c;在进行网页数据采集时经常会遭遇到各种针对爬虫行为的阻碍和限制&#xff0c;这就需要我们掌握一些应对反爬机制的技术手段。本文将从不同层面介绍如何使用 Python 进行网…

linux系统(centos、ubuntu、银河麒麟服务、uos、deepin)判断程序是否已安装,通用判断方法:使用所有应用和命令的判断

前言 项目中需要判断linux服务器中是否已经安装了某个服务 方法有很多种&#xff0c;但是很多都不通用&#xff0c; 脚本代码就不容易做成统一的 解决方案 用下面的脚本代码去进行判断 用jdk测试 脚本意思如下&#xff1a; 输入java -version命令&#xff0c;将返回的字…

spring boot 3使用 elasticsearch 提供搜索建议

业务场景 用户输入内容&#xff0c;快速返回建议&#xff0c;示例效果如下 技术选型 spring boot 3elasticsearch server 7.17.4spring data elasticsearch 5.0.1elasticsearch-java-api 8.5.3 pom.xml <dependency><groupId>org.springframework.boot</gr…

淘宝免费爬虫数据 商品详情数据 商品销售额销量API

场景&#xff1a;一个宽敞明亮的办公室&#xff0c;一位公司高管坐在办公桌前。 高管&#xff08;自言自语&#xff09;&#xff1a;淘宝&#xff0c;这个平台上商品真是琳琅满目&#xff0c;应该有不少销售数据吧。我该怎么利用这些数据呢&#xff1f; 突然&#xff0c;房间…

Qt 自定义菜单、右键菜单

在接触Qt这段时间以来&#xff0c;经常遇到菜单项的问题&#xff08;右键菜单、托盘菜单、按钮菜单等&#xff09;&#xff0c;QMenu用于菜单栏,上下文菜单,弹出菜单等&#xff0c;利用QMenuQAction就可以达到效果&#xff01; 右键菜单实现&#xff1a;通过重写contextMenuEv…

C++(8.21)c++初步

1.斐波那契&#xff1a; #include <iostream> #include<iomanip>using namespace std;int main() {cout << "Hello World!" << endl;int a[10];for(int i0;i<10;i){if(0i||1i){a[i]1;}elsea[i]a[i-1]a[i-2];cout <<setw(4) <&l…

【JavaEE基础学习打卡06】JDBC之进阶学习PreparedStatement

目录 前言一、PreparedStatement是什么二、重点理解预编译三、PreparedStatement基本使用四、Statement和PreparedStatement比较1.PreparedStatement效率高2.PreparedStatement无需拼接参数3.PreparedStatement防止SQL注入 总结 前言 &#x1f4dc; 本系列教程适用于JavaWeb初学…

mac地址、ip地址、子网掩码、端口

1. mac地址 又称为网络适配器或者网络接口卡NIC&#xff0c;但是现在更多人原因使用更简单的名称"网卡"&#xff0c;通过网卡能够是不同的计算机之间相互连接&#xff0c;从而完成数据通信的功能 每一个网卡在出厂的时候 都会给分配到一个编号&#xff0c;类似与身份…

移动web开发rem适配布局

移动web开发rem适配布局 学习目标: 能够使用rem单位能够使用媒体查询的基本语法能够使用Less的基本语法能够使用Less中的嵌套能够使用Less中的运算能够使用2种rem适配方案 1.rem单位基础 2.媒体查询 2.1什么是媒体查询 媒体查询是css3的新语法 使用media查间&#xff0c…

MySQL回表是什么?哪些情况下会回表

&#x1f3c6;作者简介&#xff0c;黑夜开发者&#xff0c;全栈领域新星创作者✌&#xff0c;CSDN博客专家&#xff0c;阿里云社区专家博主&#xff0c;2023年6月CSDN上海赛道top4。 &#x1f3c6;数年电商行业从业经验&#xff0c;历任核心研发工程师&#xff0c;项目技术负责…

Java设计模式-抽象工厂模式

简介 设计模式是软件设计中的一种常见方法&#xff0c;通过定义一系列通用的解决方案&#xff0c;来解决常见的软件设计问题。其中&#xff0c;抽象工厂模式是一种非常常见的设计模式&#xff0c;它可以帮助我们创建一组相关的对象&#xff0c;而不需要指定具体的实现方式。 …

iPhone 14 Pro 动态岛的功能和使用方法详解

当iPhone 14 Pro机型发布时,苹果公司将软件功能与屏幕顶部的药丸状切口创新集成,称之为“灵动岛”,这让许多人感到惊讶。这篇文章解释了它的功能、工作原理,以及你如何与它互动以执行动作。 一、什么是灵动岛?它是如何工作的 在谣言周期的早期‌iPhone 14 Pro‌ 在宣布时…

uniapp 使用permission获取录音权限

使用前&#xff0c;需要先配置权限 android.permission.RECORD_AUDIO

【Django】 Task5 DefaultRouter路由组件和自定义函数

文章目录 【Django】 Task5 DefaultRouter路由组件和自定义函数1.路由组件1.1路由组件介绍1.2SimpleRouter1.3DefaultRouter1.4DefaultRouter示例1.5查看访问服务接口url 2.自定义函数 【Django】 Task5 DefaultRouter路由组件和自定义函数 Task5 主要了解了DefaultRouter路由…

Spring Data Redis

文章目录 Redis各种Java客户端Spring Data Redis使用方式操作字符串类型的数据操作哈希类型数据列表类型集合类型有序集合类型通用类型 Redis各种Java客户端 Java中如何操作redis&#xff0c;这里主讲IDEA中的框架Spring Data Redis来操作redis Jedis是官方推出的&#xff0c;…