月计划打印,主题整合和游戏数据管理 bug
This commit is contained in:
@ -114,7 +114,7 @@
|
||||
<!-- <el-table-column label="家长支持" align="center" prop="support" />
|
||||
<el-table-column label="备注" align="center" prop="remarks" />-->
|
||||
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -140,6 +140,13 @@
|
||||
v-hasPermi="['benyi:themetermplan:edit']"
|
||||
v-show="isShow(scope.row)"
|
||||
>提交</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="handleView(scope.row)"
|
||||
v-hasPermi="['benyi:themetermplan:query']"
|
||||
>预览</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -471,6 +478,13 @@ export default {
|
||||
})
|
||||
.catch(function () {});
|
||||
},
|
||||
/** 预览按钮操作 */
|
||||
handleView(row) {
|
||||
const id = row.id;
|
||||
this.$router.push({
|
||||
path: "/benyi_course/thememonthplanprint/table/"+id,
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -33,18 +33,18 @@
|
||||
<b>{{h.label}}</b>
|
||||
</td>
|
||||
</tr>
|
||||
<tr v-for="item in bodyData.weekplanitemList" :key="item.daytime">
|
||||
<td v-if="item.theme" :rowspan="bodyData.weekplanitemList.length" class="align-center">
|
||||
<span>{{item.theme}}</span>
|
||||
<tr v-for="item in bodyData.monthplanitemList" :key="item.id">
|
||||
<td v-if="item.theme" :rowspan="bodyData.monthplanitemList.length" class="align-center">
|
||||
<span>{{monththeme}}</span>
|
||||
</td>
|
||||
<td class="align-center">{{item.daytime}} / 星期{{item.zhou}}</td>
|
||||
<td>{{themeactivityFormat(item.activityid)}}</td>
|
||||
<td class="align-center">{{fzxzFormat(item.fzxz)}}</td>
|
||||
<td class="align-center">{{item.zc}}</td>
|
||||
<td class="align-center">{{item.starttime}}---{{item.endtime}}</td>
|
||||
<td class="align-center">{{themeactivityFormat(item.activityid)}}</td>
|
||||
<td>{{item.jzzc}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-center">本月微型课程</td>
|
||||
<td colspan="4">{{bz}}</td>
|
||||
<td colspan="4" v-html="wxkc"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="align-center">备注</td>
|
||||
@ -63,14 +63,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listWeekplanitem,
|
||||
getWeekplanitem,
|
||||
} from "@/api/benyi/themeweekplanitem";
|
||||
|
||||
import { listWeekplan, getWeekplan } from "@/api/benyi/themeweekplan";
|
||||
import { listActivityByThemeId } from "@/api/benyi/activity";
|
||||
import { listMonthplan } from "@/api/benyi/thememonthplan";
|
||||
import { listMonthplan, getMonthplan } from "@/api/benyi/thememonthplan";
|
||||
import { listMonthplanitem } from "@/api/benyi/thememonthplanitem";
|
||||
import { listThemeByIds, listThemeByActivityIds } from "@/api/benyi/theme";
|
||||
|
||||
@ -80,19 +74,17 @@ export default {
|
||||
return {
|
||||
tableData: [],
|
||||
title: "",
|
||||
zc: "",
|
||||
month: "",
|
||||
classname: "",
|
||||
tbr: "",
|
||||
monththeme: "",
|
||||
wxkc: "",
|
||||
bz: "",
|
||||
spyj: "",
|
||||
//根据活动id获取的theme名称
|
||||
themenamebyactivityids: "",
|
||||
//分组性质
|
||||
fzxzOptions: [],
|
||||
//主题活动
|
||||
themeactivityOptions: [],
|
||||
//根据活动id获取的theme名称
|
||||
themenamebyactivityids: "",
|
||||
bodyData: {
|
||||
title: [
|
||||
{
|
||||
@ -104,7 +96,7 @@ export default {
|
||||
prop: "day",
|
||||
},
|
||||
{
|
||||
label: "分主题",
|
||||
label: "时间",
|
||||
prop: "name",
|
||||
},
|
||||
{
|
||||
@ -116,9 +108,9 @@ export default {
|
||||
prop: "help",
|
||||
},
|
||||
],
|
||||
weekplanitemList: [
|
||||
monthplanitemList: [
|
||||
{
|
||||
theme: "春天的颜色",
|
||||
theme: "",
|
||||
},
|
||||
// {
|
||||
// day: "周二",
|
||||
@ -144,28 +136,31 @@ export default {
|
||||
},
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
wpid: undefined,
|
||||
},
|
||||
// 查询参数
|
||||
queryParams_MonPlan: {
|
||||
xnxq: undefined,
|
||||
month: undefined,
|
||||
status: "2",
|
||||
},
|
||||
queryParams_MonPlanItem: {
|
||||
mpid: undefined,
|
||||
zc: undefined,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
const themeweekplanid = this.$route.params && this.$route.params.id;
|
||||
this.getThemeWeekPlan(themeweekplanid);
|
||||
this.getDicts("sys_dm_fzxz").then((response) => {
|
||||
this.fzxzOptions = response.data;
|
||||
});
|
||||
const thememonthplanid = this.$route.params && this.$route.params.id;
|
||||
this.getThemeMonthPlan(thememonthplanid);
|
||||
},
|
||||
methods: {
|
||||
getThemeMonthPlan(thememonthplanid) {
|
||||
getMonthplan(thememonthplanid).then((response) => {
|
||||
this.queryParams.mpid = response.data.id;
|
||||
this.title = response.data.name;
|
||||
this.month = response.data.month;
|
||||
this.classname = response.classname;
|
||||
this.tbr = response.createusername;
|
||||
this.wxkc = response.data.wxkc;
|
||||
this.bz = response.data.remark;
|
||||
this.spyj = response.data.shyj;
|
||||
|
||||
this.themeFormat(response.data.themes);
|
||||
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
//主题翻译
|
||||
async themeFormat(themeids) {
|
||||
var themename = "";
|
||||
@ -189,6 +184,33 @@ export default {
|
||||
this.monththeme = themename;
|
||||
}
|
||||
},
|
||||
/** 查询主题整合周计划明细列表 */
|
||||
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[0].theme = activityIds;
|
||||
});
|
||||
},
|
||||
// 主题--字典状态字典翻译
|
||||
themeactivityFormat(activityid) {
|
||||
if (activityid != null) {
|
||||
@ -208,10 +230,6 @@ export default {
|
||||
}
|
||||
return "";
|
||||
},
|
||||
// 分组性质类型--字典状态字典翻译
|
||||
fzxzFormat(fzxz) {
|
||||
return this.selectDictLabel(this.fzxzOptions, fzxz);
|
||||
},
|
||||
//主题活动
|
||||
getThemeActivityList(themeid) {
|
||||
listActivityByThemeId(themeid).then((response) => {
|
||||
@ -219,92 +237,7 @@ export default {
|
||||
this.themeactivityOptions = response.rows;
|
||||
});
|
||||
},
|
||||
//获取周教学计划详情
|
||||
getThemeWeekPlan(themeweekplanid) {
|
||||
getWeekplan(themeweekplanid).then((response) => {
|
||||
//(response);
|
||||
this.queryParams.wpid = response.data.id;
|
||||
this.title = response.data.name;
|
||||
this.zc = response.data.zc;
|
||||
this.month = response.data.month;
|
||||
this.classname = response.classname;
|
||||
this.tbr = response.createusername;
|
||||
this.bz = response.data.remark;
|
||||
this.spyj = response.data.shyj;
|
||||
|
||||
//查找活动id
|
||||
this.queryParams_MonPlan.month = response.data.month;
|
||||
this.queryParams_MonPlan.xnxq = response.data.xnxq;
|
||||
listMonthplan(this.queryParams_MonPlan).then((resMonPlan) => {
|
||||
//console.log(resMonPlan.rows);
|
||||
//获取的月主题
|
||||
var monththemeids = resMonPlan.rows[0].themes;
|
||||
|
||||
this.themeFormat(monththemeids);
|
||||
|
||||
this.queryParams_MonPlanItem.mpid = resMonPlan.rows[0].id;
|
||||
this.queryParams_MonPlanItem.zc = response.data.zc;
|
||||
listMonthplanitem(this.queryParams_MonPlanItem).then(
|
||||
(resMonPlanItem) => {
|
||||
//console.log(resMonPlanItem.rows);
|
||||
var activityids = resMonPlanItem.rows[0].activityid.split(";");
|
||||
var array = [];
|
||||
//console.log(arr);
|
||||
activityids.forEach(function (value, key, arr) {
|
||||
//console.log(value); // 结果依次为1,2,3
|
||||
if (value != "") {
|
||||
array.push(parseInt(value));
|
||||
}
|
||||
});
|
||||
this.getThemeActivityList(array);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
/** 查询主题整合周计划明细列表 */
|
||||
async getList() {
|
||||
//console.log(this.queryParams.wpid);
|
||||
await listWeekplanitem(this.queryParams).then((response) => {
|
||||
this.bodyData.weekplanitemList = 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));
|
||||
}
|
||||
});
|
||||
//获取所有的活动id截止
|
||||
this.getThemeByActivityIds(array);
|
||||
});
|
||||
},
|
||||
//根据活动id获取theme列表
|
||||
async getThemeByActivityIds(array) {
|
||||
if (array.length > 0) {
|
||||
var themename = "";
|
||||
await listThemeByActivityIds(array).then((response) => {
|
||||
response.rows.forEach(function (value, key, arr) {
|
||||
themename = themename + value.name + ";";
|
||||
});
|
||||
});
|
||||
//console.log(themename);
|
||||
this.themenamebyactivityids = themename;
|
||||
}
|
||||
|
||||
this.bodyData.weekplanitemList[0].theme =
|
||||
this.themenamebyactivityids == ""
|
||||
? "未设置"
|
||||
: this.themenamebyactivityids;
|
||||
},
|
||||
//打印
|
||||
prints() {
|
||||
//console.log(this.$refs.printMe);
|
||||
this.$print(this.$refs.printMe);
|
||||
|
Reference in New Issue
Block a user