diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/controller/TeacherController.class b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/controller/TeacherController.class index dab42d2..cba61f9 100644 Binary files a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/controller/TeacherController.class and b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/controller/TeacherController.class differ diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/mapper/TeacherDao.class b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/mapper/TeacherDao.class index 3b51898..97665ee 100644 Binary files a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/mapper/TeacherDao.class and b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/mapper/TeacherDao.class differ diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/mapper/impl/TeacherDaoImpl.class b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/mapper/impl/TeacherDaoImpl.class index 72aa3b0..5ef4a35 100644 Binary files a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/mapper/impl/TeacherDaoImpl.class and b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/mapper/impl/TeacherDaoImpl.class differ diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/pojo/Teacher.class b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/pojo/Teacher.class index bd6d1c5..15d2b50 100644 Binary files a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/pojo/Teacher.class and b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/pojo/Teacher.class differ diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/service/TeacherService.class b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/service/TeacherService.class index cb66cfb..d64290b 100644 Binary files a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/service/TeacherService.class and b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/cyou/chenx221/service/TeacherService.class differ diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/log4j.properties b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/log4j.properties index ba59947..41bf498 100644 --- a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/log4j.properties +++ b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/log4j.properties @@ -1,10 +1,10 @@ -log4j.rootLogger=INFO, stdout +log4j.rootLogger=WARN, stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n -log4j.logger.your.package.name=INFO, sql +log4j.logger.your.package.name=WARN, sql log4j.appender.sql=org.apache.log4j.ConsoleAppender log4j.appender.sql.layout=org.apache.log4j.PatternLayout diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/mapper/TeacherMapper.xml b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/mapper/TeacherMapper.xml index 1e1bbed..9e33b33 100644 --- a/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/mapper/TeacherMapper.xml +++ b/project2/out/artifacts/project2_war_exploded/WEB-INF/classes/mapper/TeacherMapper.xml @@ -56,4 +56,27 @@ + + UPDATE teacher + + + + name = #{name}, + + + birthday = #{birthday}, + + + course_id = #{course.CourseID}, + + + classes = #{classes} + + + + WHERE id = #{id}; + + + + \ No newline at end of file diff --git a/project2/out/artifacts/project2_war_exploded/WEB-INF/views/teachermanage.jsp b/project2/out/artifacts/project2_war_exploded/WEB-INF/views/teachermanage.jsp index abd1bb9..424fd52 100644 --- a/project2/out/artifacts/project2_war_exploded/WEB-INF/views/teachermanage.jsp +++ b/project2/out/artifacts/project2_war_exploded/WEB-INF/views/teachermanage.jsp @@ -173,10 +173,12 @@ ${teacher.classes}
- -
@@ -303,7 +305,7 @@
-
+
@@ -351,28 +353,28 @@
-
-
-
- - -
-
-
+ <%--
--%> + <%--
--%> + <%--
--%> + <%-- + <%-- name="course_name"/>--%> + <%-- --%> + <%--
--%> + <%--
--%> + <%--
--%>
+ for="typeText15">授课班级(1~5班)
-
@@ -452,7 +454,7 @@
- +
@@ -557,96 +559,118 @@ }); - function resetPWD(id) { - $('#typeText5').val(id); - $('#ex1-tab-2').tab('show'); - } - - - //实现按钮的点击事件(禁用/启用用户) $(document).ready(function () { - $('.btn-danger').on('click', function () { + $('.btn-danger').on('click', function () { //移除用户 var id = $(this).closest('tr').find('td:first').text(); - userdisabled(id); + // userdisabled(id); + console.log(id) // debug + }); + $('.btn-info').on('click', function () { //编辑用户 + var id = $(this).closest('tr').find('td:first').text(); + $('#ex1-tab-2').tab('show'); + $('#typeText9').val(id).focus(); // console.log(id) // debug }); - }); - $(document).ready(function () { - $('.btn-success').on('click', function () { - var id = $(this).closest('tr').find('td:first').text(); - userenabled(id); - // console.log(id) // debug + $('#modform').on('submit', function (event) { + event.preventDefault(); + $.ajax({ + url: 'mod', // 替换为您的请求 URL + method: 'POST', // 根据您的需求选择请求方法 (POST, GET, etc.) + data: $('#modform').serialize(), + success: function (response) { + $('#de_message').text(response); + $('#de_button').on('click', function () { + reloadka("reload"); + }); + $('#exampleModal3').modal('show').on('hidden.bs.modal', function () { //针对点击modal外的情况的处理 + reloadka("reload"); + }); + }, + error: function (xhr, status, error) { + if (xhr.status === 400) { + $('#de_message').text(xhr.responseText); + $('#de_button').on('click', function () { + reloadka("close"); + }); + $('#exampleModal3').modal('show'); + } else { + console.log('请求失败:', error); + alert('请求请求失败,请重试'); + } + } + }); }); + }); - //使用ajax在后台发送post禁用/启用用户请求 - function userdisabled(id) { - //btn-danger - $.ajax({ - url: 'userdisabled', - type: 'post', - data: { - id: id - }, - success: function (data) { - if (data.status === 'success') { - $('#de_message').text(data.message); - $('#de_button').on('click', function () { - reloadka("reload"); - }); - $('#exampleModal3').modal('show'); - $('#exampleModal3').on('hidden.bs.modal', function () { //针对点击modal外的情况的处理 - reloadka("reload"); - }); - } else { - $('#de_message').text(data.message); - $('#de_button').on('click', function () { - reloadka("close"); - }); - $('#exampleModal3').modal('show'); - } - }, - error: function (xhr, status, error) { - // 处理请求失败的逻辑 - console.log('请求失败:', error); - alert('请求请求失败,请重试'); - } - }); - } - - function userenabled(id) { - $.ajax({ - url: 'userenabled', - type: 'post', - data: { - id: id - }, - success: function (data) { - if (data.status === 'success') { - $('#de_message').text(data.message); - $('#de_button').on('click', function () { - reloadka("reload"); - }); - $('#exampleModal3').modal('show'); - $('#exampleModal3').on('hidden.bs.modal', function () { - reloadka("reload"); - }); - } else { - $('#de_message').text(data.message); - $('#de_button').on('click', function () { - reloadka("close"); - }); - $('#exampleModal3').modal('show'); - } - }, - error: function (xhr, status, error) { - // 处理请求失败的逻辑 - console.log('请求失败:', error); - alert('请求请求失败,请重试'); - } - }); - } - + // //使用ajax在后台发送post禁用/启用用户请求 + // function userdisabled(id) { + // //btn-danger + // $.ajax({ + // url: 'userdisabled', + // type: 'post', + // data: { + // id: id + // }, + // success: function (data) { + // if (data.status === 'success') { + // $('#de_message').text(data.message); + // $('#de_button').on('click', function () { + // reloadka("reload"); + // }); + // $('#exampleModal3').modal('show'); + // $('#exampleModal3').on('hidden.bs.modal', function () { //针对点击modal外的情况的处理 + // reloadka("reload"); + // }); + // } else { + // $('#de_message').text(data.message); + // $('#de_button').on('click', function () { + // reloadka("close"); + // }); + // $('#exampleModal3').modal('show'); + // } + // }, + // error: function (xhr, status, error) { + // // 处理请求失败的逻辑 + // console.log('请求失败:', error); + // alert('请求请求失败,请重试'); + // } + // }); + // } + // + // function userenabled(id) { + // $.ajax({ + // url: 'userenabled', + // type: 'post', + // data: { + // id: id + // }, + // success: function (data) { + // if (data.status === 'success') { + // $('#de_message').text(data.message); + // $('#de_button').on('click', function () { + // reloadka("reload"); + // }); + // $('#exampleModal3').modal('show'); + // $('#exampleModal3').on('hidden.bs.modal', function () { + // reloadka("reload"); + // }); + // } else { + // $('#de_message').text(data.message); + // $('#de_button').on('click', function () { + // reloadka("close"); + // }); + // $('#exampleModal3').modal('show'); + // } + // }, + // error: function (xhr, status, error) { + // // 处理请求失败的逻辑 + // console.log('请求失败:', error); + // alert('请求请求失败,请重试'); + // } + // }); + // } + // //处理成功/失败后的刷新页面/关闭模态框操作 function reloadka(action) { if (action === 'reload') { diff --git a/project2/project2.sql b/project2/project2.sql index a25e1f6..6f12934 100644 --- a/project2/project2.sql +++ b/project2/project2.sql @@ -11,7 +11,7 @@ Target Server Version : 80033 (8.0.33) File Encoding : 65001 - Date: 16/06/2023 13:52:21 + Date: 16/06/2023 21:12:31 */ SET NAMES utf8mb4; @@ -1232,8 +1232,8 @@ CREATE TABLE `teacher` ( -- ---------------------------- -- Records of teacher -- ---------------------------- -INSERT INTO `teacher` VALUES (1, '韦秀英', '女', '1989-01-01', 8, '1班', 0); -INSERT INTO `teacher` VALUES (2, '蔡岚', '女', '1997-08-14', 1, '5班', 0); +INSERT INTO `teacher` VALUES (1, '无名氏', '女', '1989-01-01', 8, '1班', 0); +INSERT INTO `teacher` VALUES (2, '无名氏2', '女', '1997-08-14', 1, '5班', 0); INSERT INTO `teacher` VALUES (3, '蒋岚', '女', '1998-09-28', 9, '3班', 0); INSERT INTO `teacher` VALUES (4, '侯嘉伦', '男', '1980-05-07', 13, '3班', 0); INSERT INTO `teacher` VALUES (5, '毛子异', '男', '1995-05-03', 12, '1班', 0); diff --git a/project2/src/main/java/cyou/chenx221/controller/TeacherController.java b/project2/src/main/java/cyou/chenx221/controller/TeacherController.java index e1b7564..3a4519a 100644 --- a/project2/src/main/java/cyou/chenx221/controller/TeacherController.java +++ b/project2/src/main/java/cyou/chenx221/controller/TeacherController.java @@ -3,17 +3,14 @@ package cyou.chenx221.controller; import cyou.chenx221.helper.CsvHelper; import cyou.chenx221.helper.UsernameHelper; import cyou.chenx221.pojo.Course; -import cyou.chenx221.pojo.Score; -import cyou.chenx221.pojo.Student; import cyou.chenx221.pojo.Teacher; +import cyou.chenx221.service.CourseService; import cyou.chenx221.service.TeacherService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.sql.Date; @@ -26,10 +23,12 @@ import java.util.List; @RequestMapping("/teacher") public class TeacherController { private final TeacherService teacherService; + private final CourseService courseService; @Autowired - public TeacherController(TeacherService teacherService) { + public TeacherController(TeacherService teacherService, CourseService courseService) { this.teacherService = teacherService; + this.courseService = courseService; } @GetMapping("/manage") @@ -93,8 +92,6 @@ public class TeacherController { classes = null; } - String classesPattern = "[1-5]班";// 使用正则表达式验证班级格式 - if (id <= 0 && name == null && sex == null && birthdayBegin == null && birthdayEnd == null && course_id <= 0 && course_name == null && classes == null) { model.addAttribute("errorMessage", "ID非法或查询条件全为空"); return "redirect:/teacher/manage"; @@ -110,4 +107,47 @@ public class TeacherController { model.addAttribute("download", new CsvHelper().generateTeacherCSVFile(teachers)); return "teacherQueryResult"; } + + @ResponseBody + @PostMapping(value = "/mod",produces = "text/plain;charset=UTF-8") + public ResponseEntity postEdit(@RequestParam(value = "id") int id, + @RequestParam(value = "name", defaultValue = "null", required = false) String name, + @RequestParam(value = "birthday", defaultValue = "null", required = false) String birthday_str, + @RequestParam(value = "course_id", defaultValue = "-1", required = false) int course_id, + @RequestParam(value = "classes", defaultValue = "null", required = false) String classes) throws ParseException { + // 处理表单字段数据 + String classesPattern = "[1-5]班";// 使用正则表达式验证班级格式 + + if (id <= 0) { + return ResponseEntity.badRequest().body("ID非法"); + } else if (name.equals("null") && birthday_str.equals("null") && course_id == -1 && classes.equals("null")) { + return ResponseEntity.badRequest().body("修改内容为空"); + } + Date birthday = null; + if (!birthday_str.equals("null")) { + birthday = new Date(new SimpleDateFormat("yyyy-MM-dd").parse(birthday_str).getTime()); + } + if (!classes.equals("null")) { + if (!classes.matches(classesPattern)) { + return ResponseEntity.badRequest().body("班级格式非法"); + } + } + if(name.equals("null")){ + name=null; + } + if(classes.equals("null")){ + classes=null; + } + + //注 + //这里不考虑一个班一个科目不允许多名教师,少了个班级表+数据表外键搞得不好,所以这里偷懒了... + + Teacher teacher = new Teacher(id,name,birthday,new Course(course_id), classes); + int status_code = teacherService.updateTeacher(teacher); + if (status_code == 0) { + return ResponseEntity.badRequest().body("修改失败"); + } else { + return ResponseEntity.ok("修改成功"); + } + } } diff --git a/project2/src/main/java/cyou/chenx221/mapper/TeacherDao.java b/project2/src/main/java/cyou/chenx221/mapper/TeacherDao.java index 9d008eb..ecefd84 100644 --- a/project2/src/main/java/cyou/chenx221/mapper/TeacherDao.java +++ b/project2/src/main/java/cyou/chenx221/mapper/TeacherDao.java @@ -10,4 +10,7 @@ public interface TeacherDao { List getAllTeachers(); List getQueryTeachers(Teacher teacher); + + + int updateTeacher(Teacher teacher); } diff --git a/project2/src/main/java/cyou/chenx221/mapper/impl/TeacherDaoImpl.java b/project2/src/main/java/cyou/chenx221/mapper/impl/TeacherDaoImpl.java index 5771866..d5ee388 100644 --- a/project2/src/main/java/cyou/chenx221/mapper/impl/TeacherDaoImpl.java +++ b/project2/src/main/java/cyou/chenx221/mapper/impl/TeacherDaoImpl.java @@ -24,6 +24,12 @@ public class TeacherDaoImpl implements TeacherDao { @Override public List getQueryTeachers(Teacher teacher) { - return sqlSession.selectList("getQueryTeachers",teacher); + return sqlSession.selectList("getQueryTeachers", teacher); } + + @Override + public int updateTeacher(Teacher teacher) { + return sqlSession.update("updateTeacher", teacher); + } + } diff --git a/project2/src/main/java/cyou/chenx221/pojo/Teacher.java b/project2/src/main/java/cyou/chenx221/pojo/Teacher.java index f046d8b..b6bfdec 100644 --- a/project2/src/main/java/cyou/chenx221/pojo/Teacher.java +++ b/project2/src/main/java/cyou/chenx221/pojo/Teacher.java @@ -31,6 +31,11 @@ public class Teacher { this.birthdayEnd = birthdayEnd; } + public Teacher(Course course, String classes) { + this.course = course; + this.classes = classes; + } + public Teacher(Integer id, String name, String sex, Course course, String classes, Date birthdayBegin, Date birthdayEnd) { this.id = id; this.name = name; @@ -41,6 +46,14 @@ public class Teacher { this.birthdayEnd = birthdayEnd; } + public Teacher(Integer id, String name, Date birthday, Course course, String classes) { + this.id = id; + this.name = name; + this.birthday = birthday; + this.course = course; + this.classes = classes; + } + @Override public String toString() { return "Teacher{" + diff --git a/project2/src/main/java/cyou/chenx221/service/TeacherService.java b/project2/src/main/java/cyou/chenx221/service/TeacherService.java index 9c8131d..476f95c 100644 --- a/project2/src/main/java/cyou/chenx221/service/TeacherService.java +++ b/project2/src/main/java/cyou/chenx221/service/TeacherService.java @@ -21,4 +21,9 @@ public class TeacherService { public List getQueryTeachers(Teacher teacher) { return teacherDao.getQueryTeachers(teacher); } + + + public int updateTeacher(Teacher teacher) { + return teacherDao.updateTeacher(teacher); + } } diff --git a/project2/src/main/resources/mapper/TeacherMapper.xml b/project2/src/main/resources/mapper/TeacherMapper.xml index 1e1bbed..9e33b33 100644 --- a/project2/src/main/resources/mapper/TeacherMapper.xml +++ b/project2/src/main/resources/mapper/TeacherMapper.xml @@ -56,4 +56,27 @@ + + UPDATE teacher + + + + name = #{name}, + + + birthday = #{birthday}, + + + course_id = #{course.CourseID}, + + + classes = #{classes} + + + + WHERE id = #{id}; + + + + \ No newline at end of file diff --git a/project2/web/WEB-INF/views/teachermanage.jsp b/project2/web/WEB-INF/views/teachermanage.jsp index abd1bb9..424fd52 100644 --- a/project2/web/WEB-INF/views/teachermanage.jsp +++ b/project2/web/WEB-INF/views/teachermanage.jsp @@ -173,10 +173,12 @@ ${teacher.classes}
- -
@@ -303,7 +305,7 @@
- +
@@ -351,28 +353,28 @@
-
-
-
- - -
-
-
+ <%--
--%> + <%--
--%> + <%--
--%> + <%-- + <%-- name="course_name"/>--%> + <%-- --%> + <%--
--%> + <%--
--%> + <%--
--%>
+ for="typeText15">授课班级(1~5班)
-
@@ -452,7 +454,7 @@
- +
@@ -557,96 +559,118 @@ }); - function resetPWD(id) { - $('#typeText5').val(id); - $('#ex1-tab-2').tab('show'); - } - - - //实现按钮的点击事件(禁用/启用用户) $(document).ready(function () { - $('.btn-danger').on('click', function () { + $('.btn-danger').on('click', function () { //移除用户 var id = $(this).closest('tr').find('td:first').text(); - userdisabled(id); + // userdisabled(id); + console.log(id) // debug + }); + $('.btn-info').on('click', function () { //编辑用户 + var id = $(this).closest('tr').find('td:first').text(); + $('#ex1-tab-2').tab('show'); + $('#typeText9').val(id).focus(); // console.log(id) // debug }); - }); - $(document).ready(function () { - $('.btn-success').on('click', function () { - var id = $(this).closest('tr').find('td:first').text(); - userenabled(id); - // console.log(id) // debug + $('#modform').on('submit', function (event) { + event.preventDefault(); + $.ajax({ + url: 'mod', // 替换为您的请求 URL + method: 'POST', // 根据您的需求选择请求方法 (POST, GET, etc.) + data: $('#modform').serialize(), + success: function (response) { + $('#de_message').text(response); + $('#de_button').on('click', function () { + reloadka("reload"); + }); + $('#exampleModal3').modal('show').on('hidden.bs.modal', function () { //针对点击modal外的情况的处理 + reloadka("reload"); + }); + }, + error: function (xhr, status, error) { + if (xhr.status === 400) { + $('#de_message').text(xhr.responseText); + $('#de_button').on('click', function () { + reloadka("close"); + }); + $('#exampleModal3').modal('show'); + } else { + console.log('请求失败:', error); + alert('请求请求失败,请重试'); + } + } + }); }); + }); - //使用ajax在后台发送post禁用/启用用户请求 - function userdisabled(id) { - //btn-danger - $.ajax({ - url: 'userdisabled', - type: 'post', - data: { - id: id - }, - success: function (data) { - if (data.status === 'success') { - $('#de_message').text(data.message); - $('#de_button').on('click', function () { - reloadka("reload"); - }); - $('#exampleModal3').modal('show'); - $('#exampleModal3').on('hidden.bs.modal', function () { //针对点击modal外的情况的处理 - reloadka("reload"); - }); - } else { - $('#de_message').text(data.message); - $('#de_button').on('click', function () { - reloadka("close"); - }); - $('#exampleModal3').modal('show'); - } - }, - error: function (xhr, status, error) { - // 处理请求失败的逻辑 - console.log('请求失败:', error); - alert('请求请求失败,请重试'); - } - }); - } - - function userenabled(id) { - $.ajax({ - url: 'userenabled', - type: 'post', - data: { - id: id - }, - success: function (data) { - if (data.status === 'success') { - $('#de_message').text(data.message); - $('#de_button').on('click', function () { - reloadka("reload"); - }); - $('#exampleModal3').modal('show'); - $('#exampleModal3').on('hidden.bs.modal', function () { - reloadka("reload"); - }); - } else { - $('#de_message').text(data.message); - $('#de_button').on('click', function () { - reloadka("close"); - }); - $('#exampleModal3').modal('show'); - } - }, - error: function (xhr, status, error) { - // 处理请求失败的逻辑 - console.log('请求失败:', error); - alert('请求请求失败,请重试'); - } - }); - } - + // //使用ajax在后台发送post禁用/启用用户请求 + // function userdisabled(id) { + // //btn-danger + // $.ajax({ + // url: 'userdisabled', + // type: 'post', + // data: { + // id: id + // }, + // success: function (data) { + // if (data.status === 'success') { + // $('#de_message').text(data.message); + // $('#de_button').on('click', function () { + // reloadka("reload"); + // }); + // $('#exampleModal3').modal('show'); + // $('#exampleModal3').on('hidden.bs.modal', function () { //针对点击modal外的情况的处理 + // reloadka("reload"); + // }); + // } else { + // $('#de_message').text(data.message); + // $('#de_button').on('click', function () { + // reloadka("close"); + // }); + // $('#exampleModal3').modal('show'); + // } + // }, + // error: function (xhr, status, error) { + // // 处理请求失败的逻辑 + // console.log('请求失败:', error); + // alert('请求请求失败,请重试'); + // } + // }); + // } + // + // function userenabled(id) { + // $.ajax({ + // url: 'userenabled', + // type: 'post', + // data: { + // id: id + // }, + // success: function (data) { + // if (data.status === 'success') { + // $('#de_message').text(data.message); + // $('#de_button').on('click', function () { + // reloadka("reload"); + // }); + // $('#exampleModal3').modal('show'); + // $('#exampleModal3').on('hidden.bs.modal', function () { + // reloadka("reload"); + // }); + // } else { + // $('#de_message').text(data.message); + // $('#de_button').on('click', function () { + // reloadka("close"); + // }); + // $('#exampleModal3').modal('show'); + // } + // }, + // error: function (xhr, status, error) { + // // 处理请求失败的逻辑 + // console.log('请求失败:', error); + // alert('请求请求失败,请重试'); + // } + // }); + // } + // //处理成功/失败后的刷新页面/关闭模态框操作 function reloadka(action) { if (action === 'reload') {