diff --git a/ruoyi-ui/src/api/benyi/activity.js b/ruoyi-ui/src/api/benyi/activity.js index 470aefebc..4120c7d6f 100644 --- a/ruoyi-ui/src/api/benyi/activity.js +++ b/ruoyi-ui/src/api/benyi/activity.js @@ -52,7 +52,7 @@ export function exportActivity(query) { }) } -// 删除主题整合活动 +// 查询主题整合活动 export function listActivityByThemeId(id) { return request({ url: '/benyi/activity/listbythemeid/' + id, diff --git a/ruoyi-ui/src/api/benyi/theme.js b/ruoyi-ui/src/api/benyi/theme.js index 3d67dd619..153909c7b 100644 --- a/ruoyi-ui/src/api/benyi/theme.js +++ b/ruoyi-ui/src/api/benyi/theme.js @@ -58,4 +58,20 @@ export function exportTheme(query) { method: 'get', params: query }) +} + +// 查询主题整合 +export function listThemeByIds(id) { + return request({ + url: '/benyi/theme/listthemebyid/' + id, + method: 'post' + }) +} + +// 查询主题整合 +export function listThemeByActivityIds(id) { + return request({ + url: '/benyi/theme/listthemebyactivityid/' + id, + method: 'post' + }) } \ No newline at end of file diff --git a/ruoyi-ui/src/permission.js b/ruoyi-ui/src/permission.js index f3f1ef669..1a58905ce 100644 --- a/ruoyi-ui/src/permission.js +++ b/ruoyi-ui/src/permission.js @@ -14,7 +14,7 @@ NProgress.configure({ }) //const whiteList = ['/login', '/auth-redirect', '/bind', '/register'] -const whiteList = ['/login', '/experience/apply/', '/experience/result/', '/experience/content/', '/activity', 'week', 'month', ', term', 'play'] +const whiteList = ['/login', '/experience/apply/', '/experience/result/', '/experience/content/', '/activity', 'week', 'month', 'term', 'play'] router.beforeEach((to, from, next) => { NProgress.start() diff --git a/ruoyi-ui/src/router/index.js b/ruoyi-ui/src/router/index.js index db666b8cd..29b16deb8 100644 --- a/ruoyi-ui/src/router/index.js +++ b/ruoyi-ui/src/router/index.js @@ -307,6 +307,21 @@ export const constantRoutes = [{ } }] }, + { + path: '/benyi_course/themeweekplanprint', + component: Layout, + hidden: true, + children: [{ + path: 'table/:id', + component: () => + import('@/views/benyi/themeweekplan/table'), + name: 'Themeweekplan2', + meta: { + title: '主题整合周计划(表格)', + icon: '' + } + }] + }, { path: '/benyi_course/math', component: Layout, diff --git a/ruoyi-ui/src/views/benyi/themeweekplan/index.vue b/ruoyi-ui/src/views/benyi/themeweekplan/index.vue index d52efd54e..9b50983d0 100644 --- a/ruoyi-ui/src/views/benyi/themeweekplan/index.vue +++ b/ruoyi-ui/src/views/benyi/themeweekplan/index.vue @@ -108,7 +108,7 @@ - + @@ -424,6 +432,13 @@ export default { }) .catch(function () {}); }, + /** 预览按钮操作 */ + handleView(row) { + const id = row.id; + this.$router.push({ + path: "/benyi_course/themeweekplanprint/table/"+id, + }); + }, }, }; \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi/themeweekplan/table.vue b/ruoyi-ui/src/views/benyi/themeweekplan/table.vue index 81070d26d..ab585495c 100644 --- a/ruoyi-ui/src/views/benyi/themeweekplan/table.vue +++ b/ruoyi-ui/src/views/benyi/themeweekplan/table.vue @@ -1,15 +1,35 @@ @@ -188,9 +365,8 @@ export default { } } /*去除页眉页脚*/ -@page{ - size: auto; /* auto is the initial value */ - margin: 3mm; /* this affects the margin in the printer settings */ +@page { + size: auto; /* auto is the initial value */ + margin: 3mm; /* this affects the margin in the printer settings */ } - \ No newline at end of file diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeController.java index 83591ea28..b22fa48ea 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeController.java @@ -103,4 +103,23 @@ public class ByThemeController extends BaseController { public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(byThemeService.deleteByThemeByIds(ids)); } + + /** + * 查询主题整合活动列表 + */ + @PostMapping("/listthemebyid/{ids}") + public TableDataInfo listbythemeid(@PathVariable Long[] ids) { + List list = byThemeService.selectByThemeByIds(ids); + return getDataTable(list); + } + + /** + * 查询主题整合活动列表 + */ + @PostMapping("/listthemebyactivityid/{ids}") + public TableDataInfo listthemebyactivityid(@PathVariable Long[] ids) { + List list = byThemeService.selectByThemeByActivityIds(ids); + 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 6104edd34..425aa125a 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 @@ -14,6 +14,7 @@ import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService; import com.ruoyi.project.benyi.service.IByThemeWeekplanitemService; import com.ruoyi.project.common.SchoolCommon; import com.ruoyi.project.system.service.IByClassService; +import com.ruoyi.project.system.service.ISysUserService; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -54,6 +55,9 @@ public class ByThemeWeekplanController extends BaseController { private IByThemeMonthplanitemService byThemeonthplanitemService; @Autowired private IByThemeWeekplanitemService byThemeWeekplanitemService; + @Autowired + private ISysUserService userService; + /** * 查询主题整合周计划(根据月计划明细)列表 @@ -93,7 +97,12 @@ public class ByThemeWeekplanController extends BaseController { @PreAuthorize("@ss.hasPermi('benyi:themeweekplan:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { - return AjaxResult.success(byThemeWeekplanService.selectByThemeWeekplanById(id)); + AjaxResult ajax=AjaxResult.success(); + ByThemeWeekplan byThemeWeekplan=byThemeWeekplanService.selectByThemeWeekplanById(id); + ajax.put(AjaxResult.DATA_TAG, byThemeWeekplan); + ajax.put("classname",byClassService.selectByClassById(byThemeWeekplan.getClassid()).getBjmc()); + ajax.put("createusername",userService.selectUserById(byThemeWeekplan.getCreateuserid()).getNickName()); + return ajax; } /** diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeMapper.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeMapper.java index f79ceda14..3c1f0406f 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeMapper.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeMapper.java @@ -66,4 +66,20 @@ public interface ByThemeMapper { * @return 结果 */ public int deleteByThemeByIds(Long[] ids); + + /** + * 查询主题整合列表 + * + * @param ids 主题整合 + * @return 主题整合集合 + */ + public List selectByThemeByIds(Long[] ids); + + /** + * 查询主题整合列表 + * + * @param ids 主题整合 + * @return 主题整合集合 + */ + public List selectByThemeByActivityIds(Long[] ids); } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeService.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeService.java index abe16dc95..113e81780 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeService.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeService.java @@ -83,4 +83,20 @@ public interface IByThemeService { * @return 结果 */ public int deleteByThemeById(Long id); + + /** + * 查询主题整合列表 + * + * @param ids 主题整合 + * @return 主题整合集合 + */ + public List selectByThemeByIds(Long[] ids); + + /** + * 查询主题整合列表 + * + * @param ids 主题整合 + * @return 主题整合集合 + */ + public List selectByThemeByActivityIds(Long[] ids); } diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeServiceImpl.java index cc6e71dd6..ae085d8d3 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeServiceImpl.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeServiceImpl.java @@ -185,4 +185,26 @@ public class ByThemeServiceImpl implements IByThemeService { public int deleteByThemeById(Long id) { return byThemeMapper.deleteByThemeById(id); } + + /** + * 查询主题整合列表 + * + * @param ids 主题整合 + * @return 主题整合集合selectByThemeByIds + */ + @Override + public List selectByThemeByIds(Long[] ids) { + return byThemeMapper.selectByThemeByIds(ids); + } + + /** + * 查询主题整合列表 + * + * @param ids 主题整合 + * @return 主题整合集合 + */ + @Override + public List selectByThemeByActivityIds(Long[] ids) { + return byThemeMapper.selectByThemeByActivityIds(ids); + } } diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml index 6328c1b19..66bf2a13e 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml @@ -92,11 +92,28 @@ delete from by_theme where id = #{id} - + delete from by_theme where id in #{id} + + + + \ No newline at end of file