主题整合bug

This commit is contained in:
zhanglipeng 2020-11-26 15:21:11 +08:00
parent 49e07332d6
commit f11278bce2
10 changed files with 105 additions and 27 deletions

View File

@ -59,3 +59,11 @@ export function listActivityByThemeId(id) {
method: 'post' method: 'post'
}) })
} }
// 查询主题整合活动
export function listActivityById(id) {
return request({
url: '/benyi/activity/listbyid/' + id,
method: 'post'
})
}

View File

@ -1,9 +1,15 @@
<template> <template>
<div class="table-container" ref="printMe"> <div class="table-container" ref="printMe">
<h2 class="title">{{title}}</h2> <h2 class="title">{{ title }}</h2>
<div class="table"> <div class="table">
<div class="print no-print"> <div class="print no-print">
<el-button type="primary" plain size="mini" icon="el-icon-printer" @click="prints"></el-button> <el-button
type="primary"
plain
size="mini"
icon="el-icon-printer"
@click="prints"
></el-button>
</div> </div>
<table> <table>
<tr class="align-center"> <tr class="align-center">
@ -13,34 +19,42 @@
</td>--> </td>-->
<td> <td>
<b class="table-title">班级</b> <b class="table-title">班级</b>
{{classname}} {{ classname }}
</td> </td>
<td> <td>
<b class="table-title">月份</b> <b class="table-title">月份</b>
{{month}} {{ month }}
</td> </td>
<td colspan="2"> <td colspan="2">
<b class="table-title">月主题</b> <b class="table-title">月主题</b>
{{monththeme}} {{ monththeme }}
</td> </td>
<td> <td>
<b class="table-title">制表人</b> <b class="table-title">制表人</b>
{{tbr}} {{ tbr }}
</td> </td>
</tr> </tr>
<tr class="align-center table-bg"> <tr class="align-center table-bg">
<td v-for="h in bodyData.title" :key="h.prop"> <td v-for="h in bodyData.title" :key="h.prop">
<b>{{h.label}}</b> <b>{{ h.label }}</b>
</td> </td>
</tr> </tr>
<tr v-for="item in bodyData.monthplanitemList" :key="item.id"> <tr v-for="item in bodyData.monthplanitemList" :key="item.id">
<td v-if="item.theme" :rowspan="bodyData.monthplanitemList.length" class="align-center"> <td
<span>{{monththeme}}</span> v-if="item.theme"
:rowspan="bodyData.monthplanitemList.length"
class="align-center"
>
<span>{{ monththeme }}</span>
</td> </td>
<td class="align-center">{{item.zc}}</td> <td class="align-center">{{ item.zc }}</td>
<td class="align-center">{{item.starttime}}---{{item.endtime}}</td> <td class="align-center">
<td class="align-center">{{themeactivityFormat(item.activityid)}}</td> {{ item.starttime }}---{{ item.endtime }}
<td>{{item.jzzc}}</td> </td>
<td class="align-center">
{{ themeactivityFormat(item.activityid) }}
</td>
<td>{{ item.jzzc }}</td>
</tr> </tr>
<tr> <tr>
<td class="align-center">本月微型课程</td> <td class="align-center">本月微型课程</td>
@ -48,11 +62,11 @@
</tr> </tr>
<tr> <tr>
<td class="align-center">备注</td> <td class="align-center">备注</td>
<td colspan="4">{{bz}}</td> <td colspan="4">{{ bz }}</td>
</tr> </tr>
<tr> <tr>
<td class="align-center">教学主管审批</td> <td class="align-center">教学主管审批</td>
<td colspan="4">{{spyj}}</td> <td colspan="4">{{ spyj }}</td>
</tr> </tr>
</table> </table>
<!-- <p <!-- <p
@ -63,7 +77,7 @@
</template> </template>
<script> <script>
import { listActivityByThemeId } from "@/api/benyi/activity"; import { listActivityById } from "@/api/benyi/activity";
import { listMonthplan, getMonthplan } from "@/api/benyi/thememonthplan"; import { listMonthplan, getMonthplan } from "@/api/benyi/thememonthplan";
import { listMonthplanitem } from "@/api/benyi/thememonthplanitem"; import { listMonthplanitem } from "@/api/benyi/thememonthplanitem";
import { listThemeByIds, listThemeByActivityIds } from "@/api/benyi/theme"; import { listThemeByIds, listThemeByActivityIds } from "@/api/benyi/theme";
@ -210,7 +224,7 @@ export default {
} }
this.bodyData.monthplanitemList[0].theme = activityIds; this.bodyData.monthplanitemList[0].theme = activityIds;
}else{ } else {
this.bodyData.monthplanitemList[0].theme = " "; this.bodyData.monthplanitemList[0].theme = " ";
} }
}); });
@ -221,6 +235,8 @@ export default {
var ilength = activityid.split(";").length - 1; var ilength = activityid.split(";").length - 1;
var names = ""; var names = "";
for (var i = 1; i < ilength; i++) { for (var i = 1; i < ilength; i++) {
// console.log(activityid.split(";")[i]);
// console.log(this.themeactivityOptions);
names = names =
names + names +
this.selectMoeDictLabel( this.selectMoeDictLabel(
@ -230,14 +246,16 @@ export default {
""; "";
} }
//this.selectDictLabel(this.scopeOptions, row.xnxq); //this.selectDictLabel(this.scopeOptions, row.xnxq);
// console.log(names);
return names; return names;
} }
return ""; return "";
}, },
// //
getThemeActivityList(themeid) { getThemeActivityList(themeid) {
listActivityByThemeId(themeid).then((response) => { listActivityById(themeid).then((response) => {
//console.log(response.rows); // console.log("111" + themeid);
// console.log("222" + response.rows);
this.themeactivityOptions = response.rows; this.themeactivityOptions = response.rows;
}); });
}, },

View File

@ -274,7 +274,7 @@ import {
} from "@/api/benyi/themeweekplanitem"; } from "@/api/benyi/themeweekplanitem";
import { listWeekplan, getWeekplan } from "@/api/benyi/themeweekplan"; import { listWeekplan, getWeekplan } from "@/api/benyi/themeweekplan";
import { listActivityByThemeId } from "@/api/benyi/activity"; import { listActivityById } from "@/api/benyi/activity";
import { listMonthplan } from "@/api/benyi/thememonthplan"; import { listMonthplan } from "@/api/benyi/thememonthplan";
import { listMonthplanitem } from "@/api/benyi/thememonthplanitem"; import { listMonthplanitem } from "@/api/benyi/thememonthplanitem";
@ -390,7 +390,7 @@ export default {
}, },
// //
getThemeActivityList(themeid) { getThemeActivityList(themeid) {
listActivityByThemeId(themeid).then((response) => { listActivityById(themeid).then((response) => {
//console.log(response.rows); //console.log(response.rows);
this.themeactivityOptions = response.rows; this.themeactivityOptions = response.rows;
}); });

View File

@ -43,7 +43,7 @@
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :xs="24" :ms="12" :md="5"> <el-col :xs="24" :ms="12" :md="4">
<el-form-item label="所属周次" prop="zc"> <el-form-item label="所属周次" prop="zc">
<el-input-number <el-input-number
v-model="queryParams.zc" v-model="queryParams.zc"

View File

@ -69,7 +69,7 @@ import {
} from "@/api/benyi/themeweekplanitem"; } from "@/api/benyi/themeweekplanitem";
import { listWeekplan, getWeekplan } from "@/api/benyi/themeweekplan"; import { listWeekplan, getWeekplan } from "@/api/benyi/themeweekplan";
import { listActivityByThemeId } from "@/api/benyi/activity"; import { listActivityById } from "@/api/benyi/activity";
import { listMonthplan } from "@/api/benyi/thememonthplan"; import { listMonthplan } from "@/api/benyi/thememonthplan";
import { listMonthplanitem } from "@/api/benyi/thememonthplanitem"; import { listMonthplanitem } from "@/api/benyi/thememonthplanitem";
import { listThemeByIds, listThemeByActivityIds } from "@/api/benyi/theme"; import { listThemeByIds, listThemeByActivityIds } from "@/api/benyi/theme";
@ -150,6 +150,7 @@ export default {
queryParams_MonPlan: { queryParams_MonPlan: {
xnxq: undefined, xnxq: undefined,
month: undefined, month: undefined,
classid:undefined,
status: "2", status: "2",
}, },
queryParams_MonPlanItem: { queryParams_MonPlanItem: {
@ -214,15 +215,15 @@ export default {
}, },
// //
getThemeActivityList(themeid) { getThemeActivityList(themeid) {
listActivityByThemeId(themeid).then((response) => { listActivityById(themeid).then((response) => {
console.log(response.rows); // console.log(response.rows);
this.themeactivityOptions = response.rows; this.themeactivityOptions = response.rows;
}); });
}, },
// //
getThemeWeekPlan(themeweekplanid) { getThemeWeekPlan(themeweekplanid) {
getWeekplan(themeweekplanid).then((response) => { getWeekplan(themeweekplanid).then((response) => {
//(response); console.log(response.data.classid);
this.queryParams.wpid = response.data.id; this.queryParams.wpid = response.data.id;
this.title = response.data.name; this.title = response.data.name;
this.zc = response.data.zc; this.zc = response.data.zc;
@ -235,8 +236,9 @@ export default {
//id //id
this.queryParams_MonPlan.month = response.data.month; this.queryParams_MonPlan.month = response.data.month;
this.queryParams_MonPlan.xnxq = response.data.xnxq; this.queryParams_MonPlan.xnxq = response.data.xnxq;
this.queryParams_MonPlan.classid=response.data.classid;
listMonthplan(this.queryParams_MonPlan).then((resMonPlan) => { listMonthplan(this.queryParams_MonPlan).then((resMonPlan) => {
//console.log(resMonPlan.rows); console.log(resMonPlan.rows);
// //
var monththemeids = resMonPlan.rows[0].themes; var monththemeids = resMonPlan.rows[0].themes;

View File

@ -120,7 +120,21 @@ public class ByThemeActivityController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:theme:list')"+ "||@ss.hasPermi('benyi:thememonthplan:list')") @PreAuthorize("@ss.hasPermi('benyi:theme:list')"+ "||@ss.hasPermi('benyi:thememonthplan:list')")
@PostMapping("/listbythemeid/{ids}") @PostMapping("/listbythemeid/{ids}")
public TableDataInfo listbythemeid(@PathVariable Long[] ids) { public TableDataInfo listbythemeid(@PathVariable Long[] ids) {
// System.out.println("ids:"+ids);
List<ByThemeActivity> list = byThemeActivityService.selectByThemeActivityByThemeIds(ids); List<ByThemeActivity> list = byThemeActivityService.selectByThemeActivityByThemeIds(ids);
// System.out.println(list.size());
return getDataTable(list);
}
/**
* 查询主题整合活动列表
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:list')"+ "||@ss.hasPermi('benyi:thememonthplan:list')")
@PostMapping("/listbyid/{ids}")
public TableDataInfo listbyid(@PathVariable Long[] ids) {
// System.out.println("ids:"+ids);
List<ByThemeActivity> list = byThemeActivityService.selectByThemeActivityByIds(ids);
// System.out.println(list.size());
return getDataTable(list); return getDataTable(list);
} }
} }

View File

@ -66,4 +66,12 @@ public interface ByThemeActivityMapper {
* @return 主题整合活动集合 * @return 主题整合活动集合
*/ */
public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids); public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids);
/**
* 查询主题整合活动列表
*
* @param ids 主题整合活动
* @return 主题整合活动集合
*/
public List<ByThemeActivity> selectByThemeActivityByIds(Long[] ids);
} }

View File

@ -66,4 +66,12 @@ public interface IByThemeActivityService {
* @return 主题整合活动集合 * @return 主题整合活动集合
*/ */
public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids); public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids);
/**
* 查询主题整合活动列表
*
* @param ids 主题整合活动
* @return 主题整合活动集合
*/
public List<ByThemeActivity> selectByThemeActivityByIds(Long[] ids);
} }

View File

@ -97,4 +97,15 @@ public class ByThemeActivityServiceImpl implements IByThemeActivityService {
public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids){ public List<ByThemeActivity> selectByThemeActivityByThemeIds(Long[] ids){
return byThemeActivityMapper.selectByThemeActivityByThemeIds(ids); return byThemeActivityMapper.selectByThemeActivityByThemeIds(ids);
} }
/**
* 查询主题整合活动列表
*
* @param ids 主题整合活动
* @return 主题整合活动集合
*/
@Override
public List<ByThemeActivity> selectByThemeActivityByIds(Long[] ids){
return byThemeActivityMapper.selectByThemeActivityByIds(ids);
}
} }

View File

@ -117,4 +117,13 @@
order by themeid,sort order by themeid,sort
</select> </select>
<select id="selectByThemeActivityByIds" parameterType="String" resultMap="ByThemeActivityResult">
<include refid="selectByThemeActivityVo"/>
where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
order by themeid,sort
</select>
</mapper> </mapper>