From 7a0ccd96c74f7fa36432b612e3934b40efde840f Mon Sep 17 00:00:00 2001 From: paidaxing444 <12qwaszx> Date: Wed, 9 Sep 2020 14:21:31 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A1=E6=A0=B8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/benyi/thememonthplan/table.vue | 42 ++++++++++--------- .../src/views/benyi/themetermplan/table.vue | 2 +- .../mybatis/benyi/ByThemeWeekplanMapper.xml | 2 +- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/ruoyi-ui/src/views/benyi/thememonthplan/table.vue b/ruoyi-ui/src/views/benyi/thememonthplan/table.vue index 573e96b70..8cf6ac3d9 100644 --- a/ruoyi-ui/src/views/benyi/thememonthplan/table.vue +++ b/ruoyi-ui/src/views/benyi/thememonthplan/table.vue @@ -188,27 +188,31 @@ export default { getList() { //console.log(this.queryParams.wpid); listMonthplanitem(this.queryParams).then((response) => { - this.bodyData.monthplanitemList = response.rows; - - //获取所有的活动id - var activityIds = ""; - response.rows.forEach(function (value, key, arr) { - if (value.activityid != null) { - activityIds = activityIds + value.activityid + ";"; - } - }); - var array = []; - activityIds.split(";").forEach(function (value, key, arr) { - if (value != "") { - array.push(parseInt(value)); - } - }); - if (response.rows.length > 0) { - this.getThemeActivityList(array); - } + this.bodyData.monthplanitemList = response.rows; - this.bodyData.monthplanitemList[0].theme = activityIds; + //获取所有的活动id + var activityIds = ""; + response.rows.forEach(function (value, key, arr) { + if (value.activityid != null) { + activityIds = activityIds + value.activityid + ";"; + } + }); + var array = []; + activityIds.split(";").forEach(function (value, key, arr) { + if (value != "") { + array.push(parseInt(value)); + } + }); + + if (response.rows.length > 0) { + this.getThemeActivityList(array); + } + + this.bodyData.monthplanitemList[0].theme = activityIds; + }else{ + this.bodyData.monthplanitemList[0].theme = " "; + } }); }, // 主题--字典状态字典翻译 diff --git a/ruoyi-ui/src/views/benyi/themetermplan/table.vue b/ruoyi-ui/src/views/benyi/themetermplan/table.vue index 84da9ddde..4fa1cd3e4 100644 --- a/ruoyi-ui/src/views/benyi/themetermplan/table.vue +++ b/ruoyi-ui/src/views/benyi/themetermplan/table.vue @@ -108,7 +108,7 @@ export default { }, // 主题--字典状态字典翻译 themeFormat(themeids) { - if (themeids != "") { + if (themeids != "" && themeids != null) { var ilength = themeids.split(";").length - 1; var names = ""; for (var i = 1; i < ilength; i++) { diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanMapper.xml index e9c7bdabf..9ea162bda 100644 --- a/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanMapper.xml +++ b/ruoyi/src/main/resources/mybatis/benyi/ByThemeWeekplanMapper.xml @@ -40,7 +40,7 @@ and createuserid = #{createuserid} and xnxq = #{xnxq} - order by month desc + order by month,zc desc