diff --git a/ruoyi-ui/src/api/benyi/themeweekplan.js b/ruoyi-ui/src/api/benyi/themeweekplan.js index af728efec..a0293bf73 100644 --- a/ruoyi-ui/src/api/benyi/themeweekplan.js +++ b/ruoyi-ui/src/api/benyi/themeweekplan.js @@ -43,6 +43,14 @@ export function delWeekplan(id) { }) } +// 提交主题整合学期计划 +export function checkWeekplan(id) { + return request({ + url: '/benyi/themeweekplan/check/' + id, + method: 'post' + }) +} + // 导出主题整合周计划(根据月计划明细) export function exportWeekplan(query) { return request({ diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index e3b6a72a5..69e7875e6 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -247,6 +247,21 @@ export const constantRoutes = [{ } }] }, + { + path: '/benyi_course/themeweekplan', + component: Layout, + hidden: true, + children: [{ + path: 'data/:id', + component: () => + import('@/views/benyi/themeweekplan/data'), + name: 'Themeweekplan1', + meta: { + title: '主题整合周计划(明细)', + icon: '' + } + }] + }, { path: '/benyi_course/math', component: Layout, diff --git a/ruoyi-ui/src/views/benyi/themeweekplan/data.vue b/ruoyi-ui/src/views/benyi/themeweekplan/data.vue index e69de29bb..56bb35758 100644 --- a/ruoyi-ui/src/views/benyi/themeweekplan/data.vue +++ b/ruoyi-ui/src/views/benyi/themeweekplan/data.vue @@ -0,0 +1,548 @@ + + + \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi/themeweekplan/index.vue b/ruoyi-ui/src/views/benyi/themeweekplan/index.vue index ab739ac67..d52efd54e 100644 --- a/ruoyi-ui/src/views/benyi/themeweekplan/index.vue +++ b/ruoyi-ui/src/views/benyi/themeweekplan/index.vue @@ -86,21 +86,18 @@ v-hasPermi="['benyi:themeweekplan:remove']" >删除 - - 导出 - - + - + + + @@ -187,6 +194,7 @@ import { addWeekplan, updateWeekplan, exportWeekplan, + checkWeekplan, } from "@/api/benyi/themeweekplan"; import { listClass } from "@/api/system/class"; @@ -256,6 +264,13 @@ export default { }); }, methods: { + isShow(row) { + if (row.status == "0") { + return true; + } else { + return false; + } + }, //班级列表 getClassList() { listClass(null).then((response) => { @@ -392,6 +407,23 @@ export default { }) .catch(function () {}); }, + /** 提交按钮操作 */ + handleCheck(row) { + const id = row.id; + this.$confirm("是否确认提交主题整合周计划?提交后数据将不能维护", "警告", { + confirmButtonText: "确定", + cancelButtonText: "取消", + type: "warning", + }) + .then(function () { + return checkWeekplan(id); + }) + .then(() => { + this.getList(); + this.msgSuccess("提交成功"); + }) + .catch(function () {}); + }, }, }; \ No newline at end of file diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanController.java index 5b362cebd..76b246166 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeMonthplanController.java @@ -60,7 +60,14 @@ public class ByThemeMonthplanController extends BaseController { @GetMapping("/list") public TableDataInfo list(ByThemeMonthplan byThemeMonthplan) { startPage(); - List list = byThemeMonthplanService.selectByThemeMonthplanList(byThemeMonthplan); + byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId()); + String classId = schoolCommon.getClassId(); + List list = null; + //首先判断当前账户是否为幼儿园账号 + if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { + byThemeMonthplan.setClassid(classId); + } + list = byThemeMonthplanService.selectByThemeMonthplanList(byThemeMonthplan); return getDataTable(list); } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java index 989d93ee5..2858b37bd 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeTermplanController.java @@ -55,7 +55,14 @@ public class ByThemeTermplanController extends BaseController { @GetMapping("/list") public TableDataInfo list(ByThemeTermplan byThemeTermplan) { startPage(); - List list = byThemeTermplanService.selectByThemeTermplanList(byThemeTermplan); + byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId()); + String classId = schoolCommon.getClassId(); + List list = null; + //首先判断当前账户是否为幼儿园账号 + if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { + byThemeTermplan.setClassid(classId); + } + list = byThemeTermplanService.selectByThemeTermplanList(byThemeTermplan); return getDataTable(list); } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeWeekplanController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeWeekplanController.java index c11df982f..6104edd34 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeWeekplanController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeWeekplanController.java @@ -62,7 +62,16 @@ public class ByThemeWeekplanController extends BaseController { @GetMapping("/list") public TableDataInfo list(ByThemeWeekplan byThemeWeekplan) { startPage(); - List list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan); + + byThemeWeekplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId()); + String classId = schoolCommon.getClassId(); + List list = null; + //首先判断当前账户是否为幼儿园账号 + if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { + byThemeWeekplan.setClassid(classId); + } + list = byThemeWeekplanService.selectByThemeWeekplanList(byThemeWeekplan); + return getDataTable(list); } @@ -189,4 +198,17 @@ public class ByThemeWeekplanController extends BaseController { public AjaxResult remove(@PathVariable String[] ids) { return toAjax(byThemeWeekplanService.deleteByThemeWeekplanByIds(ids)); } + + /** + * 提交主题整合学期计划 + */ + @PreAuthorize("@ss.hasPermi('benyi:themeweekplan:edit')") + @Log(title = "主题整合周计划", businessType = BusinessType.UPDATE) + @PostMapping("/check/{id}") + public AjaxResult check(@PathVariable String id) { + ByThemeWeekplan byThemeWeekplan = new ByThemeWeekplan(); + byThemeWeekplan.setId(id); + byThemeWeekplan.setStatus("1"); + return toAjax(byThemeWeekplanService.updateByThemeWeekplan(byThemeWeekplan)); + } } diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanMapper.xml index a3926afb4..e9c7bdabf 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanMapper.xml @@ -40,6 +40,7 @@ and createuserid = #{createuserid} and xnxq = #{xnxq} + order by month desc