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

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
ruoyi-ui/src
router
views/benyi/mathtermplan
ruoyi/src/main/java/com/ruoyi/project/benyi

@ -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',
component: Layout,

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

@ -8,6 +8,7 @@ import com.ruoyi.project.benyi.domain.ByMathTermplanitem;
import com.ruoyi.project.benyi.service.IByMathTermplanitemService;
import com.ruoyi.project.common.SchoolCommon;
import com.ruoyi.project.system.service.IByClassService;
import com.ruoyi.project.system.service.ISysUserService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -45,6 +46,8 @@ public class ByMathTermplanController extends BaseController
private IByClassService byClassService;
@Autowired
private IByMathTermplanitemService byMathTermplanitemService;
@Autowired
private ISysUserService userService;
/**
* 查询游戏数学学期计划列表
@ -84,7 +87,12 @@ public class ByMathTermplanController extends BaseController
@GetMapping(value = "/{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;
}
/**

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

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