月计划打印,主题整合和游戏数据管理 bug

This commit is contained in:
paidaxing444 2020-09-03 16:24:07 +08:00
parent 0e5b8f77f1
commit f600ffd34b
7 changed files with 153 additions and 198 deletions

View File

@ -322,6 +322,21 @@ export const constantRoutes = [{
} }
}] }]
}, },
{
path: '/benyi_course/thememonthplanprint',
component: Layout,
hidden: true,
children: [{
path: 'table/:id',
component: () =>
import('@/views/benyi/thememonthplan/table'),
name: 'Thememonthplan2',
meta: {
title: '主题整合月计划(表格)',
icon: ''
}
}]
},
{ {
path: '/benyi_course/math', path: '/benyi_course/math',
component: Layout, component: Layout,

View File

@ -28,7 +28,7 @@
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> --> </el-form-item>-->
<el-form-item label="游戏形式" prop="type"> <el-form-item label="游戏形式" prop="type">
<el-select v-model="queryParams.type" placeholder="请选择游戏形式" clearable size="small"> <el-select v-model="queryParams.type" placeholder="请选择游戏形式" clearable size="small">
<el-option <el-option
@ -94,7 +94,7 @@
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
placeholder="选择创建时间" placeholder="选择创建时间"
></el-date-picker> ></el-date-picker>
</el-form-item> --> </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@ -108,7 +108,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['benyi:plan:add']" v-hasPermi="['benyi:math:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -118,7 +118,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['benyi:plan:edit']" v-hasPermi="['benyi:math:edit']"
>修改</el-button> >修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -128,18 +128,9 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['benyi:plan:remove']" v-hasPermi="['benyi:math:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="warning"
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['benyi:plan:export']"
>导出</el-button>
</el-col>
</el-row> </el-row>
<el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="planList" @selection-change="handleSelectionChange">
@ -148,16 +139,16 @@
<el-table-column label="游戏名称" align="center" prop="name" /> <el-table-column label="游戏名称" align="center" prop="name" />
<el-table-column label="排序" align="center" prop="sort" /> <el-table-column label="排序" align="center" prop="sort" />
<el-table-column label="游戏形式" align="center" :formatter="typeFormat" prop="type" /> <el-table-column label="游戏形式" align="center" :formatter="typeFormat" prop="type" />
<el-table-column label="游戏目标" align="center" prop="target" :show-overflow-tooltip="true"/> <el-table-column label="游戏目标" align="center" prop="target" :show-overflow-tooltip="true" />
<el-table-column label="游戏准备" align="center" prop="prepare" :show-overflow-tooltip="true" /> <el-table-column label="游戏准备" align="center" prop="prepare" :show-overflow-tooltip="true" />
<el-table-column label="游戏过程" align="center" prop="process" :show-overflow-tooltip="true"/> <el-table-column label="游戏过程" align="center" prop="process" :show-overflow-tooltip="true" />
<!-- <el-table-column label="本周其它目标" align="center" prop="otherTarget" /> <!-- <el-table-column label="本周其它目标" align="center" prop="otherTarget" />
<el-table-column label="建议" align="center" prop="suggest" /> <el-table-column label="建议" align="center" prop="suggest" />
<el-table-column label="创建时间" align="center" prop="createtime" width="180"> <el-table-column label="创建时间" align="center" prop="createtime" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createtime, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.createtime, '{y}-{m}-{d}') }}</span>
</template> </template>
</el-table-column> --> </el-table-column>-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -165,14 +156,14 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['benyi:plan:edit']" v-hasPermi="['benyi:math:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['benyi:plan:remove']" v-hasPermi="['benyi:math:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -246,7 +237,6 @@ import {
delPlan, delPlan,
addPlan, addPlan,
updatePlan, updatePlan,
exportPlan
} from "@/api/benyi/plan"; } from "@/api/benyi/plan";
import { listMath, getMath } from "@/api/benyi/math"; import { listMath, getMath } from "@/api/benyi/math";
import Editor from "@/components/Editor"; import Editor from "@/components/Editor";
@ -254,7 +244,7 @@ import Editor from "@/components/Editor";
export default { export default {
name: "Plan", name: "Plan",
components: { components: {
Editor Editor,
}, },
data() { data() {
return { return {
@ -293,28 +283,40 @@ export default {
process: undefined, process: undefined,
otherTarget: undefined, otherTarget: undefined,
suggest: undefined, suggest: undefined,
createtime: undefined createtime: undefined,
}, },
// //
form: {}, form: {},
// //
rules: { rules: {
name: [{ required: true, message: "游戏名称不能为空", trigger: "blur" }], name: [
{ required: true, message: "游戏名称不能为空", trigger: "blur" },
],
sort: [{ required: true, message: "序号不能为空", trigger: "blur" }], sort: [{ required: true, message: "序号不能为空", trigger: "blur" }],
type: [{ required: true, message: "游戏形式不能为空", trigger: "blur" }], type: [
target: [{ required: true, message: "游戏目标不能为空", trigger: "blur" }], { required: true, message: "游戏形式不能为空", trigger: "blur" },
prepare: [{ required: true, message: "游戏准备不能为空", trigger: "blur" }], ],
process: [{ required: true, message: "游戏过程不能为空", trigger: "blur" }], target: [
otherTarget: [{ required: true, message: "本周其它目标不能为空", trigger: "blur" }], { required: true, message: "游戏目标不能为空", trigger: "blur" },
suggest: [{ required: true, message: "建议不能为空", trigger: "blur" }] ],
} prepare: [
{ required: true, message: "游戏准备不能为空", trigger: "blur" },
],
process: [
{ required: true, message: "游戏过程不能为空", trigger: "blur" },
],
otherTarget: [
{ required: true, message: "本周其它目标不能为空", trigger: "blur" },
],
suggest: [{ required: true, message: "建议不能为空", trigger: "blur" }],
},
}; };
}, },
created() { created() {
const mathId = this.$route.params && this.$route.params.id; const mathId = this.$route.params && this.$route.params.id;
this.getMath(mathId); this.getMath(mathId);
this.getMaths(); this.getMaths();
this.getDicts("sys_math_type").then(response => { this.getDicts("sys_math_type").then((response) => {
this.typeOptions = response.data; this.typeOptions = response.data;
}); });
}, },
@ -322,7 +324,7 @@ export default {
/** 查询游戏数学方案列表 */ /** 查询游戏数学方案列表 */
getList() { getList() {
this.loading = true; this.loading = true;
listPlan(this.queryParams).then(response => { listPlan(this.queryParams).then((response) => {
this.planList = response.rows; this.planList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
@ -344,7 +346,7 @@ export default {
}, },
/** 查询游戏数学名称详细 */ /** 查询游戏数学名称详细 */
getMath(mathId) { getMath(mathId) {
getMath(mathId).then(response => { getMath(mathId).then((response) => {
this.queryParams.mathid = response.data.id; this.queryParams.mathid = response.data.id;
this.defaultMath = response.data.id; this.defaultMath = response.data.id;
this.getList(); this.getList();
@ -352,7 +354,7 @@ export default {
}, },
// //
getMaths() { getMaths() {
listMath().then(response => { listMath().then((response) => {
this.mathOptions = response.rows; this.mathOptions = response.rows;
}); });
}, },
@ -374,7 +376,7 @@ export default {
process: undefined, process: undefined,
otherTarget: undefined, otherTarget: undefined,
suggest: undefined, suggest: undefined,
createtime: undefined createtime: undefined,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -391,7 +393,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.id); this.ids = selection.map((item) => item.id);
this.single = selection.length != 1; this.single = selection.length != 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
@ -406,26 +408,26 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getPlan(id).then(response => { getPlan(id).then((response) => {
this.form = response.data; this.form = response.data;
// console.log(this.form); // console.log(this.form);
this.typeOptions = response.types; this.typeOptions = response.types;
// console.log(this.typeOptions); // console.log(this.typeOptions);
this.form.type = response.typeIds; this.form.type = response.typeIds;
this.open = true; this.open = true;
this.title = "修改游戏数学方案"; this.title = "修改游戏数学方案";
}); });
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm: function() { submitForm: function () {
this.$refs["form"].validate(valid => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
var arrtype = this.form.type; var arrtype = this.form.type;
this.form.type = arrtype.join(";"); this.form.type = arrtype.join(";");
if (this.form.id != undefined) { if (this.form.id != undefined) {
updatePlan(this.form).then(response => { updatePlan(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -433,7 +435,7 @@ export default {
} }
}); });
} else { } else {
addPlan(this.form).then(response => { addPlan(this.form).then((response) => {
if (response.code === 200) { if (response.code === 200) {
this.msgSuccess("新增成功"); this.msgSuccess("新增成功");
this.open = false; this.open = false;
@ -453,34 +455,18 @@ export default {
{ {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning",
} }
) )
.then(function() { .then(function () {
return delPlan(ids); return delPlan(ids);
}) })
.then(() => { .then(() => {
this.getList(); this.getList();
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}) })
.catch(function() {}); .catch(function () {});
}, },
/** 导出按钮操作 */ },
handleExport() {
const queryParams = this.queryParams;
this.$confirm("是否确认导出所有游戏数学方案数据项?", "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
})
.then(function() {
return exportPlan(queryParams);
})
.then(response => {
this.download(response.msg);
})
.catch(function() {});
}
}
}; };
</script> </script>

View File

@ -53,7 +53,7 @@
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:activity:add']" v-hasPermi="['benyi:theme:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -63,7 +63,7 @@
size="mini" size="mini"
:disabled="single" :disabled="single"
@click="handleUpdate" @click="handleUpdate"
v-hasPermi="['system:activity:edit']" v-hasPermi="['benyi:theme:edit']"
>修改</el-button> >修改</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
@ -73,7 +73,7 @@
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete"
v-hasPermi="['system:activity:remove']" v-hasPermi="['benyi:theme:remove']"
>删除</el-button> >删除</el-button>
</el-col> </el-col>
</el-row> </el-row>
@ -92,14 +92,14 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['system:activity:edit']" v-hasPermi="['benyi:theme:edit']"
>修改</el-button> >修改</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:activity:remove']" v-hasPermi="['benyi:theme:remove']"
>删除</el-button> >删除</el-button>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -114,7 +114,7 @@
<!-- <el-table-column label="家长支持" align="center" prop="support" /> <!-- <el-table-column label="家长支持" align="center" prop="support" />
<el-table-column label="备注" align="center" prop="remarks" />--> <el-table-column label="备注" align="center" prop="remarks" />-->
<el-table-column label="状态" align="center" prop="status" :formatter="statusFormat" /> <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"> <template slot-scope="scope">
<el-button <el-button
size="mini" size="mini"
@ -140,6 +140,13 @@
v-hasPermi="['benyi:themetermplan:edit']" v-hasPermi="['benyi:themetermplan:edit']"
v-show="isShow(scope.row)" v-show="isShow(scope.row)"
>提交</el-button> >提交</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-view"
@click="handleView(scope.row)"
v-hasPermi="['benyi:themetermplan:query']"
>预览</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -471,6 +478,13 @@ export default {
}) })
.catch(function () {}); .catch(function () {});
}, },
/** 预览按钮操作 */
handleView(row) {
const id = row.id;
this.$router.push({
path: "/benyi_course/thememonthplanprint/table/"+id,
});
},
}, },
}; };
</script> </script>

View File

@ -33,18 +33,18 @@
<b>{{h.label}}</b> <b>{{h.label}}</b>
</td> </td>
</tr> </tr>
<tr v-for="item in bodyData.weekplanitemList" :key="item.daytime"> <tr v-for="item in bodyData.monthplanitemList" :key="item.id">
<td v-if="item.theme" :rowspan="bodyData.weekplanitemList.length" class="align-center"> <td v-if="item.theme" :rowspan="bodyData.monthplanitemList.length" class="align-center">
<span>{{item.theme}}</span> <span>{{monththeme}}</span>
</td> </td>
<td class="align-center">{{item.daytime}} / 星期{{item.zhou}}</td> <td class="align-center">{{item.zc}}</td>
<td>{{themeactivityFormat(item.activityid)}}</td> <td class="align-center">{{item.starttime}}---{{item.endtime}}</td>
<td class="align-center">{{fzxzFormat(item.fzxz)}}</td> <td class="align-center">{{themeactivityFormat(item.activityid)}}</td>
<td>{{item.jzzc}}</td> <td>{{item.jzzc}}</td>
</tr> </tr>
<tr> <tr>
<td class="align-center">本月微型课程</td> <td class="align-center">本月微型课程</td>
<td colspan="4">{{bz}}</td> <td colspan="4" v-html="wxkc"></td>
</tr> </tr>
<tr> <tr>
<td class="align-center">备注</td> <td class="align-center">备注</td>
@ -63,14 +63,8 @@
</template> </template>
<script> <script>
import {
listWeekplanitem,
getWeekplanitem,
} from "@/api/benyi/themeweekplanitem";
import { listWeekplan, getWeekplan } from "@/api/benyi/themeweekplan";
import { listActivityByThemeId } from "@/api/benyi/activity"; 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 { listMonthplanitem } from "@/api/benyi/thememonthplanitem";
import { listThemeByIds, listThemeByActivityIds } from "@/api/benyi/theme"; import { listThemeByIds, listThemeByActivityIds } from "@/api/benyi/theme";
@ -80,19 +74,17 @@ export default {
return { return {
tableData: [], tableData: [],
title: "", title: "",
zc: "",
month: "", month: "",
classname: "", classname: "",
tbr: "", tbr: "",
monththeme: "", monththeme: "",
wxkc: "",
bz: "", bz: "",
spyj: "", spyj: "",
//idtheme
themenamebyactivityids: "",
//
fzxzOptions: [],
// //
themeactivityOptions: [], themeactivityOptions: [],
//idtheme
themenamebyactivityids: "",
bodyData: { bodyData: {
title: [ title: [
{ {
@ -104,7 +96,7 @@ export default {
prop: "day", prop: "day",
}, },
{ {
label: "分主题", label: "时间",
prop: "name", prop: "name",
}, },
{ {
@ -116,9 +108,9 @@ export default {
prop: "help", prop: "help",
}, },
], ],
weekplanitemList: [ monthplanitemList: [
{ {
theme: "春天的颜色", theme: "",
}, },
// { // {
// day: "", // day: "",
@ -144,28 +136,31 @@ export default {
}, },
// //
queryParams: { queryParams: {
wpid: undefined,
},
//
queryParams_MonPlan: {
xnxq: undefined,
month: undefined,
status: "2",
},
queryParams_MonPlanItem: {
mpid: undefined, mpid: undefined,
zc: undefined,
}, },
}; };
}, },
created() { created() {
const themeweekplanid = this.$route.params && this.$route.params.id; const thememonthplanid = this.$route.params && this.$route.params.id;
this.getThemeWeekPlan(themeweekplanid); this.getThemeMonthPlan(thememonthplanid);
this.getDicts("sys_dm_fzxz").then((response) => {
this.fzxzOptions = response.data;
});
}, },
methods: { 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) { async themeFormat(themeids) {
var themename = ""; var themename = "";
@ -189,6 +184,33 @@ export default {
this.monththeme = themename; 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) { themeactivityFormat(activityid) {
if (activityid != null) { if (activityid != null) {
@ -208,10 +230,6 @@ export default {
} }
return ""; return "";
}, },
// --
fzxzFormat(fzxz) {
return this.selectDictLabel(this.fzxzOptions, fzxz);
},
// //
getThemeActivityList(themeid) { getThemeActivityList(themeid) {
listActivityByThemeId(themeid).then((response) => { listActivityByThemeId(themeid).then((response) => {
@ -219,92 +237,7 @@ export default {
this.themeactivityOptions = response.rows; 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); // 123
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);
});
},
//idtheme
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() { prints() {
//console.log(this.$refs.printMe); //console.log(this.$refs.printMe);
this.$print(this.$refs.printMe); this.$print(this.$refs.printMe);

View File

@ -140,7 +140,6 @@
icon="el-icon-view" icon="el-icon-view"
@click="handleView(scope.row)" @click="handleView(scope.row)"
v-hasPermi="['benyi:themeweekplan:query']" v-hasPermi="['benyi:themeweekplan:query']"
v-show="isShow(scope.row)"
>预览</el-button> >预览</el-button>
</template> </template>
</el-table-column> </el-table-column>

View File

@ -12,6 +12,7 @@ import com.ruoyi.project.benyi.service.IByThemeTermplanitemService;
import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService; import com.ruoyi.project.benyi.service.IByThemeMonthplanitemService;
import com.ruoyi.project.common.SchoolCommon; import com.ruoyi.project.common.SchoolCommon;
import com.ruoyi.project.system.service.IByClassService; import com.ruoyi.project.system.service.IByClassService;
import com.ruoyi.project.system.service.ISysUserService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
@ -52,6 +53,8 @@ public class ByThemeMonthplanController extends BaseController {
private IByThemeTermplanitemService byThemeTermplanitemService; private IByThemeTermplanitemService byThemeTermplanitemService;
@Autowired @Autowired
private IByThemeMonthplanitemService byThemeonthplanitemService; private IByThemeMonthplanitemService byThemeonthplanitemService;
@Autowired
private ISysUserService userService;
/** /**
* 查询主题整合月计划列表 * 查询主题整合月计划列表
@ -89,7 +92,12 @@ public class ByThemeMonthplanController extends BaseController {
@PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')") @PreAuthorize("@ss.hasPermi('benyi:thememonthplan:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) { public AjaxResult getInfo(@PathVariable("id") String id) {
return AjaxResult.success(byThemeMonthplanService.selectByThemeMonthplanById(id)); AjaxResult ajax=AjaxResult.success();
ByThemeMonthplan byThemeMonthplan=byThemeMonthplanService.selectByThemeMonthplanById(id);
ajax.put(AjaxResult.DATA_TAG, byThemeMonthplan);
ajax.put("classname",byClassService.selectByClassById(byThemeMonthplan.getClassid()).getBjmc());
ajax.put("createusername",userService.selectUserById(byThemeMonthplan.getCreateuserid()).getNickName());
return ajax;
} }
/** /**