From 6c9880a58e934c486ce17777923b657bef1d27b8 Mon Sep 17 00:00:00 2001 From: sk1551 <15175617877@163.com> Date: Thu, 22 Oct 2020 16:10:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9C=88=E4=B8=BB=E9=A2=98?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E6=98=BE=E7=A4=BA=E6=89=80=E6=9C=89=E4=B8=BB?= =?UTF-8?q?=E9=A2=98=E6=B2=A1=E5=8C=BA=E5=88=86=E7=8F=AD=E7=BA=A7=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/benyi/theme/index.vue | 2 +- .../src/views/benyi/themetermplan/data.vue | 34 ++++++++++++++----- .../src/views/benyi/themetermplan/index.vue | 2 +- ruoyi-ui/src/views/system/class/index.vue | 1 + .../resources/mybatis/benyi/ByThemeMapper.xml | 1 + 5 files changed, 29 insertions(+), 11 deletions(-) diff --git a/ruoyi-ui/src/views/benyi/theme/index.vue b/ruoyi-ui/src/views/benyi/theme/index.vue index 2192bc2ba..b6f5476c5 100644 --- a/ruoyi-ui/src/views/benyi/theme/index.vue +++ b/ruoyi-ui/src/views/benyi/theme/index.vue @@ -262,7 +262,7 @@ export default { const id = row.id || this.ids; getTheme(id).then(response => { this.form = response.data; - console.log(this.form); + //console.log(this.form); this.open = true; this.title = "修改主题整合"; }); diff --git a/ruoyi-ui/src/views/benyi/themetermplan/data.vue b/ruoyi-ui/src/views/benyi/themetermplan/data.vue index 8d8b0191a..42bb25937 100644 --- a/ruoyi-ui/src/views/benyi/themetermplan/data.vue +++ b/ruoyi-ui/src/views/benyi/themetermplan/data.vue @@ -152,6 +152,7 @@ import { exportTermplanitem, } from "@/api/benyi/themetermplanitem"; +import { listClass } from "@/api/system/class"; import { listTermplan, getTermplan } from "@/api/benyi/themetermplan"; import { listTheme } from "@/api/benyi/theme"; @@ -193,6 +194,12 @@ export default { createuserid: undefined, updateuserid: undefined }, + queryParams_class: { + bjbh: undefined + }, + queryParams_classtype: { + classid: undefined + }, // 表单参数 form: {}, // 表单校验 @@ -209,7 +216,9 @@ export default { //console.log(themeplanid); this.getThemePlan(themeplanid); this.getThemePlanList(); - this.getThemeList(); + this.getClassType(); + + }, methods: { // 主题--字典状态字典翻译 @@ -242,13 +251,7 @@ export default { }); this.form.themeconent = text; }, - //主题 - getThemeList() { - listTheme(null).then((response) => { - //console.log(response.rows); - this.themeOptions = response.rows; - }); - }, + // 字典翻译 themePlanFormat(row, column) { // return this.selectDictLabel(this.classOptions, row.classid); @@ -265,9 +268,9 @@ export default { //计划详情 getThemePlan(themeplanid) { getTermplan(themeplanid).then((response) => { + this.queryParams_class.bjbh = response.data.classid; this.queryParams.tpid = response.data.id; this.defaultThemeType = response.data.id; - if (response.data.status == "0") { this.isShow = true; } else { @@ -277,6 +280,19 @@ export default { this.getList(); }); }, + // 获取班级类型 + getClassType() { + listClass(this.queryParams_class).then((response) => { + this.queryParams_classtype.classid = response.rows[0].bjtype; + this.getThemeList(); + }); + }, + //主题 + getThemeList() { + listTheme(this.queryParams_classtype).then((response) => { + this.themeOptions = response.rows; + }); + }, getThemePlanList() { listTermplan().then((response) => { this.themePlanOptions = response.rows; diff --git a/ruoyi-ui/src/views/benyi/themetermplan/index.vue b/ruoyi-ui/src/views/benyi/themetermplan/index.vue index 79baf1d64..214b142a2 100644 --- a/ruoyi-ui/src/views/benyi/themetermplan/index.vue +++ b/ruoyi-ui/src/views/benyi/themetermplan/index.vue @@ -249,7 +249,7 @@ export default { }, methods: { isShow(row) { - console.log(row.status); + //console.log(row.status); if (row.status == "0") { return true; } else { diff --git a/ruoyi-ui/src/views/system/class/index.vue b/ruoyi-ui/src/views/system/class/index.vue index 13b531954..db7bb6927 100644 --- a/ruoyi-ui/src/views/system/class/index.vue +++ b/ruoyi-ui/src/views/system/class/index.vue @@ -290,6 +290,7 @@ export default { this.loading = true; listClass(this.queryParams).then(response => { this.classList = response.rows; + console.log(this.classList); this.total = response.total; this.loading = false; }); diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml index 66bf2a13e..cdd6f196f 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml @@ -43,6 +43,7 @@ and name like concat('%', #{name}, '%') and content = #{content} and communicate = #{communicate} + and classid = #{classid} and parent_id = #{parentId} and sort = #{sort}