增加游戏数学学期计划预览功能

This commit is contained in:
sk1551 2020-11-02 17:20:36 +08:00
parent 214fefc509
commit 794fb7ee11
5 changed files with 29 additions and 5 deletions

View File

@ -289,6 +289,21 @@ export const constantRoutes = [{
} }
}] }]
}, },
{
path: '/benyi_course/mathtermplanprint',
component: Layout,
hidden: true,
children: [{
path: 'table/:id',
component: () =>
import ('@/views/benyi/mathtermplan/table'),
name: 'Mathtermplan2',
meta: {
title: '游戏数学学期计划(表格)',
icon: ''
}
}]
},
{ {
path: '/benyi_course/themetermplan', path: '/benyi_course/themetermplan',
component: Layout, component: Layout,

View File

@ -345,7 +345,7 @@ export default {
}); });
return actions.join(""); return actions.join("");
}, },
// -- // --
mathFaFormat(row, column) { mathFaFormat(row, column) {
if (row.mathconent != null) { if (row.mathconent != null) {
var ilength = row.mathconent.split(";").length - 1; var ilength = row.mathconent.split(";").length - 1;

View File

@ -8,6 +8,7 @@ import com.ruoyi.project.benyi.domain.ByMathTermplanitem;
import com.ruoyi.project.benyi.service.IByMathTermplanitemService; import com.ruoyi.project.benyi.service.IByMathTermplanitemService;
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;
@ -45,6 +46,8 @@ public class ByMathTermplanController extends BaseController
private IByClassService byClassService; private IByClassService byClassService;
@Autowired @Autowired
private IByMathTermplanitemService byMathTermplanitemService; private IByMathTermplanitemService byMathTermplanitemService;
@Autowired
private ISysUserService userService;
/** /**
* 查询游戏数学学期计划列表 * 查询游戏数学学期计划列表
@ -84,7 +87,12 @@ public class ByMathTermplanController extends BaseController
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) public AjaxResult getInfo(@PathVariable("id") String id)
{ {
return AjaxResult.success(byMathTermplanService.selectByMathTermplanById(id)); AjaxResult ajax = AjaxResult.success();
ByMathTermplan byMathTermplan = byMathTermplanService.selectByMathTermplanById(id);
ajax.put(AjaxResult.DATA_TAG, byMathTermplan);
ajax.put("classname", byClassService.selectByClassById(byMathTermplan.getClassid()).getBjmc());
ajax.put("createusername", userService.selectUserById(byMathTermplan.getCreateuserid()).getNickName());
return ajax;
} }
/** /**

View File

@ -86,7 +86,8 @@ public class ByThemeTermplanController extends BaseController {
*/ */
@PreAuthorize("@ss.hasPermi('benyi:themetermplan:query')") @PreAuthorize("@ss.hasPermi('benyi:themetermplan:query')")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id) { public AjaxResult getInfo(@PathVariable("id") String id)
{
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ByThemeTermplan byThemeTermplan = byThemeTermplanService.selectByThemeTermplanById(id); ByThemeTermplan byThemeTermplan = byThemeTermplanService.selectByThemeTermplanById(id);
ajax.put(AjaxResult.DATA_TAG, byThemeTermplan); ajax.put(AjaxResult.DATA_TAG, byThemeTermplan);

View File

@ -31,8 +31,8 @@ public class ByMathTermplanitem extends BaseEntity {
/** /**
* 月份 * 月份
*/ */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM")
@Excel(name = "月份", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "月份", width = 30, dateFormat = "yyyy-MM")
private Date month; private Date month;
/** /**