From 284602e4acb217fa0ca8f2cbac984ffe5723abd2 Mon Sep 17 00:00:00 2001 From: zhanglipeng Date: Mon, 6 Sep 2021 11:33:39 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=9C=88=E8=AE=A1=E5=88=92=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E7=94=9F=E6=88=90=E5=AD=90=E9=A1=B9=202=E3=80=81?= =?UTF-8?q?=E5=BE=AE=E5=9E=8B=E8=AF=BE=E7=A8=8B=20=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/benyi/microcoursestudy/index.vue | 58 ++++++++++++++++--- .../src/views/benyi/thememonthplan/data.vue | 30 ++++++---- .../ByThemeMonthplanController.java | 11 ++++ 3 files changed, 78 insertions(+), 21 deletions(-) diff --git a/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue b/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue index ba9575778..901f2c384 100644 --- a/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue +++ b/ruoyi-ui/src/views/benyi/microcoursestudy/index.vue @@ -36,8 +36,18 @@ size="mini" icon="el-icon-printer" @click="prints" + v-show="enable" >打印 + 复制
@@ -48,11 +58,14 @@ @@ -160,20 +200,20 @@ export default { line-height: 40px; } // 禁止复制 -div { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} +// div { +// -webkit-touch-callout: none; +// -webkit-user-select: none; +// -khtml-user-select: none; +// -moz-user-select: none; +// -ms-user-select: none; +// user-select: none; +// } .el-tree { min-width: 100%; display: inline-block; } .tree { - overflow:auto; + overflow: auto; max-height: 600px; } \ No newline at end of file diff --git a/ruoyi-ui/src/views/benyi/thememonthplan/data.vue b/ruoyi-ui/src/views/benyi/thememonthplan/data.vue index cc7f9bfe3..e28a416b3 100644 --- a/ruoyi-ui/src/views/benyi/thememonthplan/data.vue +++ b/ruoyi-ui/src/views/benyi/thememonthplan/data.vue @@ -466,19 +466,25 @@ export default { this.open = true; this.title = "填充主题整合周计划明细"; let arrTime = []; - arrTime.push(response.data.starttime); - arrTime.push(response.data.endtime); + if (response.data.starttime == null) { + } else { + arrTime.push(response.data.starttime); + arrTime.push(response.data.endtime); + } this.form.starttime = arrTime; - var activityid = response.data.activityid.split(";"); - var array = []; - //console.log(arr); - activityid.forEach(function (value, key, arr) { - //console.log(value); // 结果依次为1,2,3 - if (value != "") { - array.push(parseInt(value)); - } - }); - this.themeactivityList = array; + if (activityid == null) { + } else { + var activityid = response.data.activityid.split(";"); + var array = []; + //console.log(arr); + activityid.forEach(function (value, key, arr) { + //console.log(value); // 结果依次为1,2,3 + if (value != "") { + array.push(parseInt(value)); + } + }); + this.themeactivityList = array; + } }); }, /** 提交按钮 */ 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 18ebee792..606bcd543 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 @@ -173,6 +173,17 @@ public class ByThemeMonthplanController extends BaseController { byThemeMonthplan.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId()); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM"); byThemeMonthplan.setName(byClassService.selectByClassById(classId).getBjmc() + "-主题整合月计划" + "(" + sdf.format(byThemeMonthplan.getMonth()) + ")"); + + // 默认创建4个周内容项,如果当前月份5个周 那么由用户自己删 或 增 + ByThemeMonthplanitem byThemeMonthplanitem=null; + for(int i=1;i<5;i++){ + byThemeMonthplanitem=new ByThemeMonthplanitem(); + byThemeMonthplanitem.setId(schoolCommon.getUuid()); + byThemeMonthplanitem.setMpid(uuid); + byThemeMonthplanitem.setZc(Long.valueOf(i)); + byThemeonthplanitemService.insertByThemeMonthplanitem(byThemeMonthplanitem); + } + return toAjax(byThemeMonthplanService.insertByThemeMonthplan(byThemeMonthplan)); } } else {