From 7d44e1650df540ee4acea3600c5772265fc5203d Mon Sep 17 00:00:00 2001 From: zhanglipeng Date: Sat, 4 Sep 2021 22:05:25 +0800 Subject: [PATCH] =?UTF-8?q?ios=E6=97=A5=E6=9C=9F=E4=B8=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=20=E5=91=A8=E8=AE=A1=E5=88=92=E5=AE=A1=E6=A0=B8?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E4=B8=BB=E9=A2=98=20=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=B7=B3=E8=BD=AC=E5=88=B0=E8=AF=BE=E7=A8=8B=E6=A0=91?= =?UTF-8?q?=E6=8A=98=E5=8F=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/utils/ruoyi.js | 2 +- .../views/benyi/themestudy_tremplan/index.vue | 2 +- .../ByThemeMonthplanController.java | 25 ++++++++++++------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js index bbf4fb2ed..ebae65292 100644 --- a/ruoyi-ui/src/utils/ruoyi.js +++ b/ruoyi-ui/src/utils/ruoyi.js @@ -18,7 +18,7 @@ export function parseTime(time, pattern) { if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { time = parseInt(time) } else if (typeof time === 'string') { - time = time.replace(new RegExp(/-/gm), '/'); + time = time.replace(new RegExp(/-/gm), '/').replace('T', ' ').replace(new RegExp(/\.[\d]{3}/gm),''); } if ((typeof time === 'number') && (time.toString().length === 10)) { time = time * 1000 diff --git a/ruoyi-ui/src/views/benyi/themestudy_tremplan/index.vue b/ruoyi-ui/src/views/benyi/themestudy_tremplan/index.vue index e489b3aca..f77040aa8 100644 --- a/ruoyi-ui/src/views/benyi/themestudy_tremplan/index.vue +++ b/ruoyi-ui/src/views/benyi/themestudy_tremplan/index.vue @@ -19,7 +19,7 @@ :expand-on-click-node="true" :filter-node-method="filterNode" ref="tree" - default-expand-all + :default-expand-all="false" @node-click="handleNodeClick" /> 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 ab12c759b..0c60c4685 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 @@ -63,11 +63,18 @@ public class ByThemeMonthplanController extends BaseController { @GetMapping("/list") public TableDataInfo list(ByThemeMonthplan byThemeMonthplan) { byThemeMonthplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId()); - String classId = schoolCommon.getClassId(); + //参数传进来的班级编号 + String strClassId = byThemeMonthplan.getClassid(); List list = null; - //首先判断当前账户是否为幼儿园账号 - if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { - byThemeMonthplan.setClassid(classId); + //如果传进来的班级编号为空,那么就认为是本身查询 + if (schoolCommon.isStringEmpty(strClassId)) { + String classId = schoolCommon.getClassId(); + //首先判断当前账户是否为幼儿园账号 + if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { + byThemeMonthplan.setClassid(classId); + } + }else{ + byThemeMonthplan.setClassid(strClassId); } startPage(); list = byThemeMonthplanService.selectByThemeMonthplanList(byThemeMonthplan); @@ -105,11 +112,11 @@ public class ByThemeMonthplanController extends BaseController { @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") String id) { - AjaxResult ajax=AjaxResult.success(); - ByThemeMonthplan byThemeMonthplan=byThemeMonthplanService.selectByThemeMonthplanById(id); + AjaxResult ajax = AjaxResult.success(); + ByThemeMonthplan byThemeMonthplan = byThemeMonthplanService.selectByThemeMonthplanById(id); ajax.put(AjaxResult.DATA_TAG, byThemeMonthplan); - ajax.put("classname",byClassService.selectByClassById(byThemeMonthplan.getClassid()).getBjmc()); - ajax.put("createusername",userService.selectUserById(byThemeMonthplan.getCreateuserid()).getNickName()); + ajax.put("classname", byClassService.selectByClassById(byThemeMonthplan.getClassid()).getBjmc()); + ajax.put("createusername", userService.selectUserById(byThemeMonthplan.getCreateuserid()).getNickName()); return ajax; } @@ -127,7 +134,7 @@ public class ByThemeMonthplanController extends BaseController { String bjtypeNew = byClassService.selectByClassById(classId).getBjtype(); if (bjtypeNew.equals("1")) { return AjaxResult.error("当前班级为托班,无法创建计划"); - }else { + } else { //根据当前月份 查找学期计划的主题 ByThemeTermplan byThemeTermplan = new ByThemeTermplan(); byThemeTermplan.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId());