修改bug
This commit is contained in:
parent
6c6ff8dc15
commit
19bc7789e4
|
|
@ -27,6 +27,8 @@ import lombok.extern.slf4j.Slf4j;
|
|||
|
||||
import org.jeecg.modules.demo.zjSqxx.entity.ZjSqxx;
|
||||
import org.jeecg.modules.demo.zjSqxx.service.IZjSqxxService;
|
||||
import org.jeecg.modules.demo.zjXkxx.entity.ZjXkxx;
|
||||
import org.jeecg.modules.demo.zjXkxx.service.IZjXkxxService;
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
|
|
@ -60,6 +62,8 @@ public class XxhbjwxtjxrwController extends JeecgController<Xxhbjwxtjxrw, IXxhbj
|
|||
|
||||
@Autowired
|
||||
private IZjSqxxService zjSqxxService;
|
||||
@Autowired
|
||||
private IZjXkxxService zjXkxxService;
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
|
|
@ -110,12 +114,43 @@ public class XxhbjwxtjxrwController extends JeecgController<Xxhbjwxtjxrw, IXxhbj
|
|||
return Result.error("您未在授权期限内,不能进行查询!");
|
||||
}
|
||||
|
||||
queryWrapper.like(StringUtils.isNotBlank(xxhbjwxtjxrw.getZhuanye()),"zymc",xxhbjwxtjxrw.getZhuanye());
|
||||
queryWrapper.like(StringUtils.isNotBlank(xxhbjwxtjxrw.getZhicheng()),"teaxm",xxhbjwxtjxrw.getZhicheng());
|
||||
|
||||
Page<Xxhbjwxtjxrw> page = new Page<Xxhbjwxtjxrw>(pageNo, pageSize);
|
||||
IPage<Xxhbjwxtjxrw> pageList = xxhbjwxtjxrwService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
@ApiOperation(value="查询专家选课列表", notes="查询专家选课列表")
|
||||
@GetMapping(value = "/zjList")
|
||||
public Result<IPage<Xxhbjwxtjxrw>> zjList(Xxhbjwxtjxrw xxhbjwxtjxrw,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Xxhbjwxtjxrw> queryWrapper = QueryGenerator.initQueryWrapper(xxhbjwxtjxrw, req.getParameterMap());
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
QueryWrapper<ZjXkxx> zjXkxxQueryWrapper = new QueryWrapper<>();
|
||||
zjXkxxQueryWrapper.eq("user_id",sysUser.getUsername());
|
||||
List<ZjXkxx> list = zjXkxxService.list(zjXkxxQueryWrapper);
|
||||
if(list!=null&&list.size()>0){
|
||||
StringBuffer sb = new StringBuffer();
|
||||
for(ZjXkxx zjXkxx:list){
|
||||
sb.append(zjXkxx.getKcrwdm()+",");
|
||||
}
|
||||
queryWrapper.in("kcrwdm",sb.toString().split(","));
|
||||
}
|
||||
|
||||
queryWrapper.like(StringUtils.isNotBlank(xxhbjwxtjxrw.getZhuanye()),"zymc",xxhbjwxtjxrw.getZhuanye());
|
||||
queryWrapper.like(StringUtils.isNotBlank(xxhbjwxtjxrw.getZhicheng()),"teaxm",xxhbjwxtjxrw.getZhicheng());
|
||||
Page<Xxhbjwxtjxrw> page = new Page<Xxhbjwxtjxrw>(pageNo, pageSize);
|
||||
IPage<Xxhbjwxtjxrw> pageList = xxhbjwxtjxrwService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
|
|
|
|||
|
|
@ -4,10 +4,8 @@ import java.io.Serializable;
|
|||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
|
@ -92,4 +90,14 @@ public class Xxhbjwxtjxrw implements Serializable {
|
|||
@Excel(name = "是否能上传考核分析及试卷样本", width = 15)
|
||||
@ApiModelProperty(value = "是否能上传考核分析及试卷样本")
|
||||
private java.lang.String isUploadSj;
|
||||
/**jxbrs*/
|
||||
@Excel(name = "jxbrs", width = 15)
|
||||
@ApiModelProperty(value = "jxbrs")
|
||||
private String jxbrs;
|
||||
|
||||
|
||||
@TableField(exist = false)
|
||||
private java.lang.String zhuanye;
|
||||
@TableField(exist = false)
|
||||
private java.lang.String zhicheng;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,4 +44,8 @@ public class JwxtScwjxx implements Serializable {
|
|||
@Excel(name = "创建时间", width = 15)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String cjsj;
|
||||
/**附件类型*/
|
||||
@Excel(name = "附件类型", width = 15)
|
||||
@ApiModelProperty(value = "附件类型")
|
||||
private String fjtype;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,4 +52,8 @@ public class Xxhbjwxtscwjxx implements Serializable {
|
|||
@Excel(name = "创建时间", width = 15)
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String cjsj;
|
||||
/**附件类型*/
|
||||
@Excel(name = "附件类型", width = 15)
|
||||
@ApiModelProperty(value = "附件类型")
|
||||
private String fjtype;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtxsmd.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
|
@ -9,9 +10,14 @@ import java.io.UnsupportedEncodingException;
|
|||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.Xxhbjwxtscwjxx;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.service.IXxhbjwxtscwjxxService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.service.IXxhbjwxtxsmdService;
|
||||
|
||||
|
|
@ -50,6 +56,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
|
|||
public class XxhbjwxtxsmdController extends JeecgController<Xxhbjwxtxsmd, IXxhbjwxtxsmdService> {
|
||||
@Autowired
|
||||
private IXxhbjwxtxsmdService xxhbjwxtxsmdService;
|
||||
@Autowired
|
||||
private IXxhbjwxtscwjxxService xxhbjwxtscwjxxService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
|
|
@ -174,4 +182,146 @@ public class XxhbjwxtxsmdController extends JeecgController<Xxhbjwxtxsmd, IXxhbj
|
|||
return super.importExcel(request, response, Xxhbjwxtxsmd.class);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="获取课程的成绩占比", notes="获取课程的成绩占比")
|
||||
@GetMapping(value = "/getCjzb")
|
||||
public Result<List<Xxhbjwxtxsmd>> getCjzb(Xxhbjwxtxsmd xxhbjwxtxsmd) {
|
||||
QueryWrapper<Xxhbjwxtxsmd> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("kcrwdm",xxhbjwxtxsmd.getKcrwdm());
|
||||
queryWrapper.last("limit 1");
|
||||
Xxhbjwxtxsmd pageList = xxhbjwxtxsmdService.getOne(queryWrapper);
|
||||
List<Xxhbjwxtxsmd> list = new ArrayList<>();
|
||||
if(pageList!=null){
|
||||
|
||||
String kcrwdm = pageList.getKcrwdm();
|
||||
if(StringUtils.isNotBlank(pageList.getCj1mc())){
|
||||
Xxhbjwxtxsmd par = new Xxhbjwxtxsmd();
|
||||
par.setCj1mc(pageList.getCj1mc());
|
||||
String fjtype = pageList.getCj1mc().substring(0,pageList.getCj1mc().indexOf("["));
|
||||
String zb = pageList.getCj1mc().substring(pageList.getCj1mc().indexOf("[")+1,pageList.getCj1mc().indexOf("]"));
|
||||
par.setKhfs(fjtype);
|
||||
par.setZb(zb);
|
||||
|
||||
QueryWrapper<Xxhbjwxtscwjxx> queryWrapper1 = new QueryWrapper<>();
|
||||
queryWrapper1.eq("kcrwdm",kcrwdm);
|
||||
queryWrapper1.eq("fjtype",fjtype);
|
||||
List<Xxhbjwxtscwjxx> list1 = xxhbjwxtscwjxxService.list(queryWrapper1);
|
||||
if(list1.size()==0){
|
||||
par.setCdlx("暂无文件");
|
||||
}else if (StringUtils.equals(pageList.getJxbrs(),list1.size()+"")){
|
||||
par.setCdlx("全量");
|
||||
}else{
|
||||
par.setCdlx("抽样");
|
||||
}
|
||||
par.setSort("1");
|
||||
list.add(par);
|
||||
}
|
||||
if(StringUtils.isNotBlank(pageList.getCj2mc())){
|
||||
Xxhbjwxtxsmd par = new Xxhbjwxtxsmd();
|
||||
par.setCj1mc(pageList.getCj2mc());
|
||||
String fjtype = pageList.getCj2mc().substring(0,pageList.getCj2mc().indexOf("["));
|
||||
String zb = pageList.getCj1mc().substring(pageList.getCj1mc().indexOf("[")+1,pageList.getCj1mc().indexOf("]"));
|
||||
par.setKhfs(fjtype);
|
||||
par.setZb(zb);
|
||||
|
||||
QueryWrapper<Xxhbjwxtscwjxx> queryWrapper1 = new QueryWrapper<>();
|
||||
queryWrapper1.eq("kcrwdm",kcrwdm);
|
||||
queryWrapper1.eq("fjtype",fjtype);
|
||||
List<Xxhbjwxtscwjxx> list1 = xxhbjwxtscwjxxService.list(queryWrapper1);
|
||||
if(list1.size()==0){
|
||||
par.setCdlx("暂无文件");
|
||||
}else if (StringUtils.equals(pageList.getJxbrs(),list1.size()+"")){
|
||||
par.setCdlx("全量");
|
||||
}else{
|
||||
par.setCdlx("抽样");
|
||||
}
|
||||
par.setSort("2");
|
||||
list.add(par);
|
||||
}
|
||||
if(StringUtils.isNotBlank(pageList.getCj3mc())){
|
||||
Xxhbjwxtxsmd par = new Xxhbjwxtxsmd();
|
||||
par.setCj1mc(pageList.getCj3mc());
|
||||
String fjtype = pageList.getCj3mc().substring(0,pageList.getCj3mc().indexOf("["));
|
||||
String zb = pageList.getCj1mc().substring(pageList.getCj1mc().indexOf("[")+1,pageList.getCj1mc().indexOf("]"));
|
||||
par.setKhfs(fjtype);
|
||||
par.setZb(zb);
|
||||
|
||||
QueryWrapper<Xxhbjwxtscwjxx> queryWrapper1 = new QueryWrapper<>();
|
||||
queryWrapper1.eq("kcrwdm",kcrwdm);
|
||||
queryWrapper1.eq("fjtype",fjtype);
|
||||
List<Xxhbjwxtscwjxx> list1 = xxhbjwxtscwjxxService.list(queryWrapper1);
|
||||
if(list1.size()==0){
|
||||
par.setCdlx("暂无文件");
|
||||
}else if (StringUtils.equals(pageList.getJxbrs(),list1.size()+"")){
|
||||
par.setCdlx("全量");
|
||||
}else{
|
||||
par.setCdlx("抽样");
|
||||
}
|
||||
par.setSort("3");
|
||||
list.add(par);
|
||||
}
|
||||
if(StringUtils.isNotBlank(pageList.getCj4mc())){
|
||||
Xxhbjwxtxsmd par = new Xxhbjwxtxsmd();
|
||||
par.setCj1mc(pageList.getCj4mc());
|
||||
String fjtype = pageList.getCj4mc().substring(0,pageList.getCj4mc().indexOf("["));
|
||||
String zb = pageList.getCj1mc().substring(pageList.getCj1mc().indexOf("[")+1,pageList.getCj1mc().indexOf("]"));
|
||||
par.setKhfs(fjtype);
|
||||
par.setZb(zb);
|
||||
|
||||
QueryWrapper<Xxhbjwxtscwjxx> queryWrapper1 = new QueryWrapper<>();
|
||||
queryWrapper1.eq("kcrwdm",kcrwdm);
|
||||
queryWrapper1.eq("fjtype",fjtype);
|
||||
List<Xxhbjwxtscwjxx> list1 = xxhbjwxtscwjxxService.list(queryWrapper1);
|
||||
if(list1.size()==0){
|
||||
par.setCdlx("暂无文件");
|
||||
}else if (StringUtils.equals(pageList.getJxbrs(),list1.size()+"")){
|
||||
par.setCdlx("全量");
|
||||
}else{
|
||||
par.setCdlx("抽样");
|
||||
}
|
||||
par.setSort("4");
|
||||
list.add(par);
|
||||
}
|
||||
if(StringUtils.isNotBlank(pageList.getCj5mc())){
|
||||
Xxhbjwxtxsmd par = new Xxhbjwxtxsmd();
|
||||
par.setCj1mc(pageList.getCj5mc());
|
||||
String fjtype = pageList.getCj5mc().substring(0,pageList.getCj5mc().indexOf("["));
|
||||
String zb = pageList.getCj1mc().substring(pageList.getCj1mc().indexOf("[")+1,pageList.getCj1mc().indexOf("]"));
|
||||
par.setKhfs(fjtype);
|
||||
par.setZb(zb);
|
||||
|
||||
QueryWrapper<Xxhbjwxtscwjxx> queryWrapper1 = new QueryWrapper<>();
|
||||
queryWrapper1.eq("kcrwdm",kcrwdm);
|
||||
queryWrapper1.eq("fjtype",fjtype);
|
||||
List<Xxhbjwxtscwjxx> list1 = xxhbjwxtscwjxxService.list(queryWrapper1);
|
||||
if(list1.size()==0){
|
||||
par.setCdlx("暂无文件");
|
||||
}else if (StringUtils.equals(pageList.getJxbrs(),list1.size()+"")){
|
||||
par.setCdlx("全量");
|
||||
}else{
|
||||
par.setCdlx("抽样");
|
||||
}
|
||||
par.setSort("5");
|
||||
list.add(par);
|
||||
}
|
||||
}
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ApiOperation(value="教务系统学生名单-分页列表查询", notes="教务系统学生名单-分页列表查询")
|
||||
@GetMapping(value = "/getXsmdxxByFjtype")
|
||||
public Result<IPage<Xxhbjwxtxsmd>> getXsmdxxByFjtype(Xxhbjwxtxsmd xxhbjwxtxsmd,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<Xxhbjwxtxsmd> queryWrapper = QueryGenerator.initQueryWrapper(xxhbjwxtxsmd, req.getParameterMap());
|
||||
Page<Xxhbjwxtxsmd> page = new Page<Xxhbjwxtxsmd>(pageNo, pageSize);
|
||||
queryWrapper.like("b.fjtype",xxhbjwxtxsmd.getCdlx());
|
||||
IPage<Xxhbjwxtxsmd> pageList = xxhbjwxtxsmdService.getXsmdxxByFjtype(page, xxhbjwxtxsmd);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,4 +116,8 @@ public class JwxtXsmd {
|
|||
@Excel(name = "ksxzmc", width = 15)
|
||||
@ApiModelProperty(value = "ksxzmc")
|
||||
private String ksxzmc;
|
||||
/**jxbrs*/
|
||||
@Excel(name = "jxbrs", width = 15)
|
||||
@ApiModelProperty(value = "jxbrs")
|
||||
private String jxbrs;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,21 @@ public class Xxhbjwxtxsmd implements Serializable {
|
|||
@Excel(name = "ksxzmc", width = 15)
|
||||
@ApiModelProperty(value = "ksxzmc")
|
||||
private java.lang.String ksxzmc;
|
||||
/**jxbrs*/
|
||||
@Excel(name = "jxbrs", width = 15)
|
||||
@ApiModelProperty(value = "jxbrs")
|
||||
private String jxbrs;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String studentPath;
|
||||
@TableField(exist = false)
|
||||
private String cdlx;
|
||||
@TableField(exist = false)
|
||||
private String khfs;
|
||||
@TableField(exist = false)
|
||||
private String zb;
|
||||
@TableField(exist = false)
|
||||
private String sort;
|
||||
@TableField(exist = false)
|
||||
private String fsshow;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,10 @@ package org.jeecg.modules.demo.xxhbjwxtxsmd.mapper;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
|
@ -14,4 +18,5 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||
*/
|
||||
public interface XxhbjwxtxsmdMapper extends BaseMapper<Xxhbjwxtxsmd> {
|
||||
|
||||
IPage<Xxhbjwxtxsmd> getXsmdxxByFjtype(Page<Xxhbjwxtxsmd> page, @Param("xxhbjwxtxsmd") Xxhbjwxtxsmd xxhbjwxtxsmd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,4 +7,11 @@
|
|||
left join (select SUBSTRING(name FROM 1 FOR 10) as student_no,name,path as student_path,cjr,cjsj,kcrwdm from xxhbjwxtscwjxx) b on a.kcrwdm =b.kcrwdm and a.xsbh = b.student_no
|
||||
${ew.customSqlSegment}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="getXsmdxxByFjtype" parameterType="org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd" resultType="org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd">
|
||||
select a.*,b.student_path from xxhbjwxtxsmd a
|
||||
left join (select SUBSTRING(name FROM 1 FOR 10) as student_no,name,path as student_path,cjr,cjsj,kcrwdm from xxhbjwxtscwjxx where fjtype = #{xxhbjwxtxsmd.cdlx}) b on a.kcrwdm =b.kcrwdm and a.xsbh = b.student_no
|
||||
where a.KCRWDM = #{xxhbjwxtxsmd.kcrwdm}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
package org.jeecg.modules.demo.xxhbjwxtxsmd.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
|
@ -15,4 +18,6 @@ import java.util.List;
|
|||
public interface IXxhbjwxtxsmdService extends IService<Xxhbjwxtxsmd> {
|
||||
|
||||
void syncList(List<Xxhbjwxtxsmd> outDataList);
|
||||
|
||||
IPage<Xxhbjwxtxsmd> getXsmdxxByFjtype(Page<Xxhbjwxtxsmd> page, Xxhbjwxtxsmd xxhbjwxtxsmd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@ package org.jeecg.modules.demo.xxhbjwxtxsmd.service.impl;
|
|||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.entity.Xxhbjwxtxsmd;
|
||||
import org.jeecg.modules.demo.xxhbjwxtxsmd.mapper.XxhbjwxtxsmdMapper;
|
||||
|
|
@ -30,6 +33,26 @@ public class XxhbjwxtxsmdServiceImpl extends ServiceImpl<XxhbjwxtxsmdMapper, Xxh
|
|||
syncList(entityList, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Xxhbjwxtxsmd> getXsmdxxByFjtype(Page<Xxhbjwxtxsmd> page, Xxhbjwxtxsmd xxhbjwxtxsmd) {
|
||||
IPage<Xxhbjwxtxsmd> page1 = baseMapper.getXsmdxxByFjtype(page,xxhbjwxtxsmd);
|
||||
String sort = xxhbjwxtxsmd.getSort();
|
||||
page1.getRecords().forEach(item->{
|
||||
if(StringUtils.equals("1",sort)){
|
||||
item.setFsshow(item.getCj1());
|
||||
}else if(StringUtils.equals("2",sort)){
|
||||
item.setFsshow(item.getCj2());
|
||||
}else if(StringUtils.equals("3",sort)){
|
||||
item.setFsshow(item.getCj3());
|
||||
}else if(StringUtils.equals("4",sort)){
|
||||
item.setFsshow(item.getCj4());
|
||||
}else if(StringUtils.equals("5",sort)){
|
||||
item.setFsshow(item.getCj5());
|
||||
}
|
||||
});
|
||||
return page1;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public boolean syncList(Collection<Xxhbjwxtxsmd> entityList, boolean isDelete) {
|
||||
QueryWrapper dqw = new QueryWrapper();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,199 @@
|
|||
package org.jeecg.modules.demo.zjXkxx.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.system.vo.LoginUser;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.zjXkxx.entity.ZjXkxx;
|
||||
import org.jeecg.modules.demo.zjXkxx.service.IZjXkxxService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: 专家选课信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="专家选课信息")
|
||||
@RestController
|
||||
@RequestMapping("/zjXkxx/zjXkxx")
|
||||
@Slf4j
|
||||
public class ZjXkxxController extends JeecgController<ZjXkxx, IZjXkxxService> {
|
||||
@Autowired
|
||||
private IZjXkxxService zjXkxxService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param zjXkxx
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "专家选课信息-分页列表查询")
|
||||
@ApiOperation(value="专家选课信息-分页列表查询", notes="专家选课信息-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<ZjXkxx>> queryPageList(ZjXkxx zjXkxx,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
zjXkxx.setUserId(sysUser.getUsername());
|
||||
|
||||
QueryWrapper<ZjXkxx> queryWrapper = QueryGenerator.initQueryWrapper(zjXkxx, req.getParameterMap());
|
||||
Page<ZjXkxx> page = new Page<ZjXkxx>(pageNo, pageSize);
|
||||
IPage<ZjXkxx> pageList = zjXkxxService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param zjXkxx
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "专家选课信息-添加")
|
||||
@ApiOperation(value="专家选课信息-添加", notes="专家选课信息-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody ZjXkxx zjXkxx) {
|
||||
zjXkxxService.save(zjXkxx);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param zjXkxx
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "专家选课信息-编辑")
|
||||
@ApiOperation(value="专家选课信息-编辑", notes="专家选课信息-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody ZjXkxx zjXkxx) {
|
||||
zjXkxxService.updateById(zjXkxx);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "专家选课信息-通过id删除")
|
||||
@ApiOperation(value="专家选课信息-通过id删除", notes="专家选课信息-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
zjXkxxService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "专家选课信息-批量删除")
|
||||
@ApiOperation(value="专家选课信息-批量删除", notes="专家选课信息-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.zjXkxxService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "专家选课信息-通过id查询")
|
||||
@ApiOperation(value="专家选课信息-通过id查询", notes="专家选课信息-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<ZjXkxx> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
ZjXkxx zjXkxx = zjXkxxService.getById(id);
|
||||
if(zjXkxx==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(zjXkxx);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param zjXkxx
|
||||
*/
|
||||
@RequiresPermissions("zjXkxx:zj_xkxx:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, ZjXkxx zjXkxx) {
|
||||
return super.exportXls(request, zjXkxx, ZjXkxx.class, "专家选课信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("zjXkxx:zj_xkxx:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, ZjXkxx.class);
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "专家选课信息-批量添加")
|
||||
@ApiOperation(value="专家选课信息-批量添加", notes="专家选课信息-批量添加")
|
||||
@PostMapping(value = "/addBatch")
|
||||
public Result<String> addBatch(@RequestBody List<ZjXkxx> list) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
QueryWrapper<ZjXkxx> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("user_id",sysUser.getUsername());
|
||||
zjXkxxService.remove(queryWrapper);//删除专家授权资源信息
|
||||
for(ZjXkxx par:list){
|
||||
par.setUserId(sysUser.getUsername());
|
||||
}
|
||||
zjXkxxService.saveBatch(list);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
package org.jeecg.modules.demo.zjXkxx.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: 专家选课信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("zj_xkxx")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="zj_xkxx对象", description="专家选课信息")
|
||||
public class ZjXkxx implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private java.lang.String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private java.util.Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private java.lang.String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**用户id*/
|
||||
@Excel(name = "用户id", width = 15)
|
||||
@ApiModelProperty(value = "用户id")
|
||||
private java.lang.String userId;
|
||||
private java.lang.String bjxx;//班级
|
||||
private java.lang.String kclb;//课程类别
|
||||
private java.lang.String kcmc;//课程名称
|
||||
private java.lang.String kcrwdm;//课程任务代码
|
||||
private java.lang.String khfsmc;//考核方式
|
||||
private java.lang.String kkyxmc;//开课单位
|
||||
private java.lang.String sjfs;//试卷分数
|
||||
private java.lang.String teaxm;//任课教师
|
||||
private java.lang.String xf;//学分
|
||||
private java.lang.String xn;//学年
|
||||
private java.lang.String xnxqdm;//学年学期
|
||||
private java.lang.String xqmc;//学期
|
||||
private java.lang.String zhicheng;//职称
|
||||
private java.lang.String zhuanye;//专业
|
||||
private java.lang.String zxs;//学时
|
||||
private java.lang.String zymc;//专业名称
|
||||
private java.lang.String xkrs;//选课人数
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.zjXkxx.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.zjXkxx.entity.ZjXkxx;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 专家选课信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface ZjXkxxMapper extends BaseMapper<ZjXkxx> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.demo.zjXkxx.mapper.ZjXkxxMapper">
|
||||
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.demo.zjXkxx.service;
|
||||
|
||||
import org.jeecg.modules.demo.zjXkxx.entity.ZjXkxx;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 专家选课信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IZjXkxxService extends IService<ZjXkxx> {
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.demo.zjXkxx.service.impl;
|
||||
|
||||
import org.jeecg.modules.demo.zjXkxx.entity.ZjXkxx;
|
||||
import org.jeecg.modules.demo.zjXkxx.mapper.ZjXkxxMapper;
|
||||
import org.jeecg.modules.demo.zjXkxx.service.IZjXkxxService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: 专家选课信息
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2024-09-10
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class ZjXkxxServiceImpl extends ServiceImpl<ZjXkxxMapper, ZjXkxx> implements IZjXkxxService {
|
||||
|
||||
}
|
||||
|
|
@ -315,8 +315,8 @@ justauth:
|
|||
sftp:
|
||||
hostname: 210.47.29.99
|
||||
port: 22
|
||||
username: Nenujwc@99
|
||||
password: LKdg&^kKf5rw
|
||||
username: sftp
|
||||
password: Nenujwc@99
|
||||
timeout: 1000
|
||||
uploadpath: kczx
|
||||
fullpath: /data
|
||||
|
|
@ -6,10 +6,10 @@ VITE_PUBLIC_PATH = /
|
|||
|
||||
|
||||
# 跨域代理,您可以配置多个 ,请注意,没有换行符
|
||||
VITE_PROXY = [["/jeecgboot","http://192.168.2.12:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]]
|
||||
VITE_PROXY = [["/jeecgboot","http://192.168.2.13:8080/jeecg-boot"],["/upload","http://192.168.2.13:3300/upload"]]
|
||||
|
||||
#后台接口全路径地址(必填)
|
||||
VITE_GLOB_DOMAIN_URL=http://192.168.2.12:8080/jeecg-boot
|
||||
VITE_GLOB_DOMAIN_URL=http://192.168.2.13:8080/jeecg-boot
|
||||
|
||||
#后台接口父地址(必填)
|
||||
VITE_GLOB_API_URL=/jeecgboot
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ const { createConfirm } = useMessage();
|
|||
|
||||
enum Api {
|
||||
list = '/xxhbjwxtjxrw/xxhbjwxtjxrw/list',
|
||||
zjList = '/xxhbjwxtjxrw/xxhbjwxtjxrw/zjList',
|
||||
save='/xxhbjwxtjxrw/xxhbjwxtjxrw/add',
|
||||
edit='/xxhbjwxtjxrw/xxhbjwxtjxrw/edit',
|
||||
deleteOne = '/xxhbjwxtjxrw/xxhbjwxtjxrw/delete',
|
||||
|
|
@ -29,6 +30,7 @@ export const getImportUrl = Api.importExcel;
|
|||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
export const zjList = (params) => defHttp.get({ url: Api.zjList, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
|
|
|
|||
|
|
@ -85,6 +85,204 @@ export const columns: BasicColumn[] = [
|
|||
},
|
||||
];
|
||||
|
||||
|
||||
//列表数据
|
||||
export const columns2: BasicColumn[] = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: 'rowIndex',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function ({ index }) {
|
||||
return parseInt(index) + 1;
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '学年学期',
|
||||
align: "center",
|
||||
dataIndex: 'xnxqdm',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '课程名称',
|
||||
align: "center",
|
||||
dataIndex: 'kcmc',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '课程号',
|
||||
align: "center",
|
||||
dataIndex: 'kcrwdm',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '课程类别',
|
||||
align: "center",
|
||||
dataIndex: 'kclb',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '学分',
|
||||
align: "center",
|
||||
dataIndex: 'xf',
|
||||
width: 80,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '学时',
|
||||
align: "center",
|
||||
dataIndex: 'zxs',
|
||||
width: 80,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '开课单位名称',
|
||||
align: "center",
|
||||
dataIndex: 'kkyxmc',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '所属校内专业(大类)名称',
|
||||
align: "center",
|
||||
dataIndex: 'zymc',
|
||||
width: 220,
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '任课教师[职称]',
|
||||
align: "center",
|
||||
dataIndex: 'teaxm',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '班级',
|
||||
align: "center",
|
||||
dataIndex: 'bjxx',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '学年',
|
||||
align: "center",
|
||||
dataIndex: 'xn',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '学期',
|
||||
align: "center",
|
||||
dataIndex: 'xqmc',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '试卷份数',
|
||||
align: "center",
|
||||
dataIndex: 'sjfs',
|
||||
ellipsis: true,
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
dataIndex: 'action',
|
||||
align: 'center',
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
//列表数据
|
||||
export const columns3: BasicColumn[] = [
|
||||
{
|
||||
title: '学年学期',
|
||||
align: "center",
|
||||
dataIndex: 'xnxqdm'
|
||||
},
|
||||
{
|
||||
title: '课程名称',
|
||||
align: "center",
|
||||
dataIndex: 'kcmc'
|
||||
},
|
||||
{
|
||||
title: '课程类别',
|
||||
align: "center",
|
||||
dataIndex: 'kclb'
|
||||
},
|
||||
{
|
||||
title: '所属校内专业(大类)名称',
|
||||
align: "center",
|
||||
dataIndex: 'zymc',
|
||||
width: 220
|
||||
},
|
||||
{
|
||||
title: '任课教师[职称]',
|
||||
align: "center",
|
||||
dataIndex: 'teaxm'
|
||||
},
|
||||
{
|
||||
title: '选课人数',
|
||||
align: "center",
|
||||
dataIndex: 'jxbrs'
|
||||
},
|
||||
{
|
||||
title: '考试方式',
|
||||
align: "center",
|
||||
dataIndex: 'khfsmc'
|
||||
},
|
||||
// {
|
||||
// title: '成绩单',
|
||||
// align: "center",
|
||||
// dataIndex: 'cjd',
|
||||
// slots: { customRender: 'cjd' },
|
||||
// },
|
||||
// {
|
||||
// title: '考核评价材料',
|
||||
// align: "center",
|
||||
// dataIndex: 'khpjcl',
|
||||
// slots: { customRender: 'khpjcl' },
|
||||
// },
|
||||
// {
|
||||
// title: '学生原始材料',
|
||||
// align: "center",
|
||||
// dataIndex: 'xsyscl',
|
||||
// slots: { customRender: 'xsyscl' },
|
||||
// },
|
||||
|
||||
// {
|
||||
// title: '课程号',
|
||||
// align: "center",
|
||||
// dataIndex: 'kcrwdm'
|
||||
// },
|
||||
// {
|
||||
// title: '学分',
|
||||
// align: "center",
|
||||
// dataIndex: 'xf',
|
||||
// width: 80
|
||||
// },
|
||||
// {
|
||||
// title: '学时',
|
||||
// align: "center",
|
||||
// dataIndex: 'zxs',
|
||||
// width: 80
|
||||
// },
|
||||
// {
|
||||
// title: '开课单位名称',
|
||||
// align: "center",
|
||||
// dataIndex: 'kkyxmc'
|
||||
// },
|
||||
// {
|
||||
// title: '班级',
|
||||
// align: "center",
|
||||
// dataIndex: 'bjxx'
|
||||
// },
|
||||
// {
|
||||
// title: '试卷份数',
|
||||
// align: "center",
|
||||
// dataIndex: 'sjfs'
|
||||
// },
|
||||
// {
|
||||
// title: '是否能上传考核分析及试卷样本',
|
||||
// align: "center",
|
||||
// dataIndex: 'isUploadSj'
|
||||
// },
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
xnxqdm: {title: 'xnxqdm',order: 0,view: 'text', type: 'string',},
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@
|
|||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,494 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<div v-if="sfxk == 0">
|
||||
<div style="text-align: center">
|
||||
<div style="color: red; font-weight: 700; font-size: 20; margin-top: 200px">您还没有选课,请先选择课程</div>
|
||||
<a-button type="primary" style="margin-left: 10px; margin-top: 10px" @click="handleXuanke">选课</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 选课信息 -->
|
||||
<div v-if="sfxk == 1">
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery2" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="xn">
|
||||
<template #label><span title="学年">学年</span></template>
|
||||
<j-dict-select-tag placeholder="请选择学年" v-model:value="queryParam2.xn" :dictCode="`v_xn,xn,xn`" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="xqmc">
|
||||
<template #label><span title="学期">学期</span></template>
|
||||
<j-dict-select-tag placeholder="请选择学期" v-model:value="queryParam2.xqmc" dictCode="cjxq" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="kkyxmc">
|
||||
<template #label><span title="开课单位名称">开课单位名称</span></template>
|
||||
<j-dict-select-tag
|
||||
placeholder="请选择开课单位名称"
|
||||
v-model:value="queryParam2.kkyxmc"
|
||||
:dictCode="`v_kkdw,kkyxmc,kkyxmc`"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="zhunaye">
|
||||
<template #label><span title="所属专业">所属专业</span></template>
|
||||
<j-dict-select-tag
|
||||
placeholder="请选择所属专业"
|
||||
v-model:value="queryParam2.zhuanye"
|
||||
:dictCode="`v_zhuanye,dept_name,dept_name`"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="kcmc">
|
||||
<template #label><span title="任课教师">任课教师</span></template>
|
||||
<j-input placeholder="请输入任课教师" v-model:value="queryParam2.teaxm" allow-clear></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="zhicheng">
|
||||
<template #label><span title="职称">职称</span></template>
|
||||
<j-dict-select-tag
|
||||
placeholder="请选择职称"
|
||||
v-model:value="queryParam2.zhicheng"
|
||||
:dictCode="`v_zhicheng,zhicheng,zhicheng`"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12" style="text-align: right">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery2">查询</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<a-table
|
||||
:columns="columns2"
|
||||
:data-source="dataList"
|
||||
v-model:current="paginationProp.current"
|
||||
:total="paginationProp.total"
|
||||
:pagination="paginationProp"
|
||||
@change="onPageChange"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<a @click="handleQueren(record)">确认</a>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
|
||||
<a-table :columns="columns2" :data-source="checkData" :pagination="false">
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.dataIndex === 'action'">
|
||||
<a @click="handleDel(record)">删除</a>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
<div style="text-align: right">
|
||||
<a-button type="primary" style="margin-left: 10px; margin-top: 10px" @click="handleSubmit">确认</a-button>
|
||||
<a-button type="primary" style="margin-left: 10px; margin-top: 10px" @click="handleFanhui">返回</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 成绩单 -->
|
||||
<div v-show="sfxk == 2">
|
||||
<CjdForm ref="cjdFormModal" @callback="init"></CjdForm>
|
||||
</div>
|
||||
<!-- 考核评价材料 -->
|
||||
<div v-show="sfxk == 3">
|
||||
<XxhbjwxtscwjxxList ref="khpjclFormModal" @callback="init"></XxhbjwxtscwjxxList>
|
||||
</div>
|
||||
<!-- 学生原始材料 -->
|
||||
<div v-show="sfxk == 4">
|
||||
<XxhbjwxtxsmdList3 ref="xsysclFormModal" @callback="init" @handleXq="handleXsysclxq"></XxhbjwxtxsmdList3>
|
||||
</div>
|
||||
<!-- 学生原始材料-详情 -->
|
||||
<div v-show="sfxk == 5">
|
||||
<XxhbjwxtxsmdList4 ref="xsysclXqFormModal" @callback="init"></XxhbjwxtxsmdList4>
|
||||
</div>
|
||||
<!-- 选课后的列表 -->
|
||||
<div v-if="sfxk == 999">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<!-- <a-col :span="24" style="text-align: right;margin-bottom: 20px;">
|
||||
模板下载:
|
||||
<a-popover placement="topRight" type="primary">
|
||||
<template #content>
|
||||
<a-button type="primary" style="margin-left: 10px;margin-top: 10px" @click="textDown('a1','课堂教学评价表')">课堂教学评价表</a-button>
|
||||
<a-button type="primary" style="margin-left: 10px;margin-top: 10px" @click="textDown('a2','试卷评价表')">试卷评价表</a-button>
|
||||
<a-button type="primary" style="margin-left: 10px;margin-top: 10px" @click="textDown('a3','本科毕业论文(设计)评价表')">本科毕业论文(设计)评价表</a-button>
|
||||
</template>
|
||||
<template #title>
|
||||
<span>专家用评价表</span>
|
||||
</template>
|
||||
<a-button>专家用评价表</a-button>
|
||||
</a-popover>
|
||||
</a-col> -->
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="xn">
|
||||
<template #label><span title="学年">学年</span></template>
|
||||
<j-dict-select-tag placeholder="请选择学年" v-model:value="queryParam.xn" :dictCode="`v_xn,xn,xn`" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="xqmc">
|
||||
<template #label><span title="学期">学期</span></template>
|
||||
<j-dict-select-tag placeholder="请选择学期" v-model:value="queryParam.xqmc" dictCode="cjxq" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="kkyxmc">
|
||||
<template #label><span title="开课单位名称">开课单位名称</span></template>
|
||||
<j-dict-select-tag
|
||||
placeholder="请选择开课单位名称"
|
||||
v-model:value="queryParam.kkyxmc"
|
||||
:dictCode="`v_kkdw,kkyxmc,kkyxmc`"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="zhunaye">
|
||||
<template #label><span title="所属专业">所属专业</span></template>
|
||||
<j-dict-select-tag
|
||||
placeholder="请选择所属专业"
|
||||
v-model:value="queryParam.zhuanye"
|
||||
:dictCode="`v_zhuanye,dept_name,dept_name`"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="kcmc">
|
||||
<template #label><span title="任课教师">任课教师</span></template>
|
||||
<j-input placeholder="请输入任课教师" v-model:value="queryParam.teaxm" allow-clear></j-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="zhicheng">
|
||||
<template #label><span title="职称">职称</span></template>
|
||||
<j-dict-select-tag
|
||||
placeholder="请选择职称"
|
||||
v-model:value="queryParam.zhicheng"
|
||||
:dictCode="`v_zhicheng,zhicheng,zhicheng`"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<!-- <a-col :lg="6">
|
||||
<a-form-item name="kcmc">
|
||||
<template #label><span title="课程名称">课程名称</span></template>
|
||||
<j-input placeholder="请输入课程名称" v-model:value="queryParam.kcmc" allow-clear ></j-input>
|
||||
</a-form-item>
|
||||
</a-col> -->
|
||||
<a-col :span="12" style="text-align: right">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls" style="margin-left: 8px"> 导出</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="handleXuanke" style="margin-left: 8px"> 选课</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template #cjd="{ record }">
|
||||
<a @click="handleCjd(record)">查看</a>
|
||||
</template>
|
||||
<template #khpjcl="{ record }">
|
||||
<a>查看</a>
|
||||
</template>
|
||||
<template #xsyscl="{ record }">
|
||||
<a>查看</a>
|
||||
</template>
|
||||
</BasicTable>
|
||||
</div>
|
||||
|
||||
<!-- 表单区域 -->
|
||||
<XxhbjwxtjxrwModal ref="registerModal" @success="handleSuccess"></XxhbjwxtjxrwModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="xxhbjwxtjxrw-xxhbjwxtjxrw" setup>
|
||||
import { ref, reactive, onMounted, computed } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, columns2, columns3, superQuerySchema } from './Xxhbjwxtjxrw.data';
|
||||
import { zjList, list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Xxhbjwxtjxrw.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import XxhbjwxtjxrwModal from './components/XxhbjwxtjxrwModal.vue';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import CjdForm from './components/CjdForm.vue';
|
||||
import XxhbjwxtscwjxxList from '/@/views/bl/xxhbjwxtscwjxx/XxhbjwxtscwjxxList.vue';
|
||||
import XxhbjwxtxsmdList3 from '/@/views/bl/xxhbjwxtxsmd/XxhbjwxtxsmdList3.vue';
|
||||
import XxhbjwxtxsmdList4 from '/@/views/bl/xxhbjwxtxsmd/XxhbjwxtxsmdList4.vue';
|
||||
|
||||
const formRef = ref();
|
||||
const cjdFormModal = ref();
|
||||
const khpjclFormModal = ref();
|
||||
const xsysclFormModal = ref();
|
||||
const xsysclXqFormModal = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const queryParam2 = ref<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
const emit = defineEmits(['callback']);
|
||||
const sfxk = ref<number>(0);
|
||||
const checkData = ref<any>([]);
|
||||
const dataList = ref<any>([]);
|
||||
import { Pagination } from 'ant-design-vue';
|
||||
const APagination = Pagination;
|
||||
const { createMessage } = useMessage();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
api: zjList,
|
||||
columns: columns3,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 320,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: '教务系统教学任务',
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess,
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
|
||||
tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: 24,
|
||||
sm: 6,
|
||||
xl: 6,
|
||||
xxl: 6,
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 18,
|
||||
});
|
||||
const paginationProp = ref<any>({
|
||||
total: 1,
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
});
|
||||
//成绩单
|
||||
function handleCjd(record) {
|
||||
sfxk.value = 2;
|
||||
cjdFormModal.value.init(record);
|
||||
}
|
||||
//考核评价材料
|
||||
function handleKhpjcl(record) {
|
||||
sfxk.value = 3;
|
||||
khpjclFormModal.value.init(record);
|
||||
}
|
||||
//学生原始材料
|
||||
function handleXsyscl(record) {
|
||||
sfxk.value = 4;
|
||||
xsysclFormModal.value.init(record);
|
||||
}
|
||||
//选课
|
||||
function handleXuanke() {
|
||||
sfxk.value = 1;
|
||||
searchQuery2();
|
||||
}
|
||||
function handleXsysclxq(record) {
|
||||
console.log('👨⚕️handleXsysclxq', record);
|
||||
sfxk.value = 5;
|
||||
xsysclXqFormModal.value.init(record);
|
||||
}
|
||||
//返回首页
|
||||
function handleFanhui() {
|
||||
init();
|
||||
}
|
||||
|
||||
//选课确认
|
||||
function handleQueren(record) {
|
||||
console.log('😺', record);
|
||||
var aaa = checkData.value.includes(record);
|
||||
if (aaa) {
|
||||
createMessage.warn('不能重复选择数据!');
|
||||
return;
|
||||
}
|
||||
console.log('😇aaaa', aaa);
|
||||
checkData.value.push(record);
|
||||
}
|
||||
//选课删除
|
||||
function handleDel(record) {
|
||||
checkData.value = checkData.value.filter((item) => item.kcrwdm !== record.kcrwdm);
|
||||
}
|
||||
//翻页方法
|
||||
async function onPageChange(record) {
|
||||
console.log('👬', record);
|
||||
paginationProp.value.current = record.current;
|
||||
await searchQuery2();
|
||||
}
|
||||
//下载本地文件
|
||||
function textDown(type, downame) {
|
||||
var a = document.createElement('a'); //创建一个<a></a>标签
|
||||
a.href = '/download/' + type + '.docx';
|
||||
//给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
||||
a.download = downame + '.docx';
|
||||
//设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
||||
a.style.display = 'none'; // 障眼法藏起来a标签
|
||||
document.body.appendChild(a);
|
||||
// 将a标签追加到文档对象中
|
||||
a.click(); //模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
|
||||
a.remove();
|
||||
// 一次性的,用完就删除a标签
|
||||
}
|
||||
|
||||
//选课提交
|
||||
function handleSubmit() {
|
||||
var list = checkData.value;
|
||||
if (list.length == 0) {
|
||||
createMessage.warn('请选择数据!');
|
||||
}
|
||||
defHttp
|
||||
.post({
|
||||
url: '/zjXkxx/zjXkxx/addBatch',
|
||||
data: list,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log('🤛', res);
|
||||
init();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
emit('callback', record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '成绩单',
|
||||
onClick: handleCjd.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '考核评价材料',
|
||||
onClick: handleKhpjcl.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '学生原始材料',
|
||||
onClick: handleXsyscl.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery2() {
|
||||
queryParam2.value.pageNo = paginationProp.value.current;
|
||||
defHttp.get({ url: '/xxhbjwxtjxrw/xxhbjwxtjxrw/list', params: { pageNo: paginationProp.value.current, ...queryParam2.value } }).then((res) => {
|
||||
dataList.value = res.records;
|
||||
paginationProp.value.total = res.total;
|
||||
paginationProp.value.current = res.pageNo;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function init() {
|
||||
//获取是否有选课信息
|
||||
defHttp.get({ url: '/zjXkxx/zjXkxx/list', params: { pageSize: -1 } }).then((res) => {
|
||||
console.log('🧛', res);
|
||||
if (res.records.length == 0) {
|
||||
sfxk.value = 0;
|
||||
checkData.value = [];
|
||||
} else {
|
||||
sfxk.value = 999;
|
||||
checkData.value = res.records;
|
||||
paginationProp.value.total = res.records.total;
|
||||
paginationProp.value.current = res.records.pages;
|
||||
}
|
||||
});
|
||||
}
|
||||
// 自动请求并暴露内部方法
|
||||
onMounted(() => {
|
||||
init();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust {
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust {
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help) {
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,226 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12"> <span style="font-size: 22px;font-weight: 700;margin-left: 20px;">成绩单</span> </a-col>
|
||||
<a-col :span="12" style="text-align: right">
|
||||
<a-button type="primary" @click="handleFanhui">返回</a-button>
|
||||
</a-col>
|
||||
<a-col :gutter="24">
|
||||
<div style="text-align: center; font-size: 16px; font-weight: 700; line-height: 50px" v-if="jxrwInfo.value">
|
||||
{{ jxrwInfo?.value.xn }}{{ jxrwInfo?.value.xqmc }}学期《{{ jxrwInfo?.value.kcmc }}》课程考核材料
|
||||
</div>
|
||||
<div v-if="jxrwInfo.value">
|
||||
<div style="padding-left: 15px; font-weight: 700">概要信息</div>
|
||||
<a-row style="line-height: 30px">
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">开课单位</span> :<span>{{ jxrwInfo?.value.kkyxmc }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程类别</span> :<span>{{ jxrwInfo?.value.kclb }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程名称</span> :<span>{{ jxrwInfo?.value.kcmc }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程负责人</span> :<span>{{ jxrwInfo?.value.teaxm }}</span>
|
||||
</a-col>
|
||||
<a-col :span="4">
|
||||
<span style="margin-left: 15px">选课人数</span> :<span>{{ jxrwInfo?.value.jxbrs }}</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- <div>
|
||||
详细信息
|
||||
</div> -->
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<!-- <XxhbjwxtxsmdModal ref="registerModal" @success="handleSuccess"></XxhbjwxtxsmdModal> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="xxhbjwxtxsmd-xxhbjwxtxsmd" setup>
|
||||
import { ref, reactive, defineExpose } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns3, superQuerySchema } from '/@/views/bl/xxhbjwxtxsmd/Xxhbjwxtxsmd.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from '/@/views/bl/xxhbjwxtxsmd/Xxhbjwxtxsmd.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
// import XxhbjwxtxsmdModal from './components/XxhbjwxtxsmdModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { downloadFile as ajaxDownloadFileFn } from '/@/api/common/api';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
const spinning = ref<boolean>(false);
|
||||
const emit = defineEmits(['callback']);
|
||||
|
||||
const jxrwInfo = reactive<any>({});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '详细信息',
|
||||
api: list,
|
||||
columns: columns3,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
showActionColumn: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: '教务系统学生名单',
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess,
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
|
||||
tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: 24,
|
||||
sm: 4,
|
||||
xl: 6,
|
||||
xxl: 4,
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
function textDown() {
|
||||
var a = document.createElement('a'); //创建一个<a></a>标签
|
||||
a.href = '/download/a.docx';
|
||||
//给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
||||
a.download = 'a.docx';
|
||||
//设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
||||
a.style.display = 'none'; // 障眼法藏起来a标签
|
||||
document.body.appendChild(a);
|
||||
// 将a标签追加到文档对象中
|
||||
a.click(); //模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
|
||||
a.remove();
|
||||
// 一次性的,用完就删除a标签
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
if (record.studentPath) {
|
||||
return [
|
||||
{
|
||||
label: '预览',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '下载',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
} else {
|
||||
return [
|
||||
{
|
||||
label: '暂无文件',
|
||||
disabled: true,
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleFanhui() {
|
||||
emit('callback');
|
||||
}
|
||||
|
||||
function init(record) {
|
||||
console.log('🧞', record);
|
||||
queryParam.kcrwdm = record.kcrwdm;
|
||||
jxrwInfo.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust {
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust {
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help) {
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<CjdForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></CjdForm>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import CjdForm from './CjdForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(1200);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function init(record) {
|
||||
title.value = '成绩单';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.init(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
init,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12"> <span style="font-size: 22px;font-weight: 700;margin-left: 20px;">考核评价材料</span> </a-col>
|
||||
<a-col :span="12" style="text-align: right">
|
||||
<a-button type="primary" @click="handleFanhui">返回</a-button>
|
||||
</a-col>
|
||||
<a-col :gutter="24">
|
||||
<div style="text-align: center; font-size: 16px; font-weight: 700; line-height: 50px" v-if="jxrwInfo.value">
|
||||
{{ jxrwInfo?.value.xn }}{{ jxrwInfo?.value.xqmc }}学期《{{ jxrwInfo?.value.kcmc }}》课程考核材料
|
||||
</div>
|
||||
<div v-if="jxrwInfo.value">
|
||||
<div style="padding-left: 15px; font-weight: 700">概要信息</div>
|
||||
<a-row style="line-height: 30px">
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">开课单位</span> :<span>{{ jxrwInfo?.value.kkyxmc }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程类别</span> :<span>{{ jxrwInfo?.value.kclb }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程名称</span> :<span>{{ jxrwInfo?.value.kcmc }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程负责人</span> :<span>{{ jxrwInfo?.value.teaxm }}</span>
|
||||
</a-col>
|
||||
<a-col :span="4">
|
||||
<span style="margin-left: 15px">考试性质</span> :<span>{{ jxrwInfo?.value.khfsmc }}</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- <div>
|
||||
详细信息
|
||||
</div> -->
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<!-- <XxhbjwxtxsmdModal ref="registerModal" @success="handleSuccess"></XxhbjwxtxsmdModal> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="xxhbjwxtxsmd-xxhbjwxtxsmd" setup>
|
||||
import { ref, reactive,defineExpose } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns3, superQuerySchema } from '/@/views/bl/xxhbjwxtxsmd/Xxhbjwxtxsmd.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from '/@/views/bl/xxhbjwxtxsmd/Xxhbjwxtxsmd.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
// import XxhbjwxtxsmdModal from './components/XxhbjwxtxsmdModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { downloadFile as ajaxDownloadFileFn } from '/@/api/common/api';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
const spinning = ref<boolean>(false);
|
||||
const emit = defineEmits(['callback']);
|
||||
|
||||
const jxrwInfo = reactive<any>({});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title:'详细信息',
|
||||
api: list,
|
||||
columns: columns3,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
showActionColumn: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "教务系统学生名单",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
function textDown(){
|
||||
var a = document.createElement("a"); //创建一个<a></a>标签
|
||||
a.href = "/download/a.docx";
|
||||
//给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
||||
a.download ="a.docx";
|
||||
//设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
||||
a.style.display = "none"; // 障眼法藏起来a标签
|
||||
document.body.appendChild(a);
|
||||
// 将a标签追加到文档对象中
|
||||
a.click(); //模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
|
||||
a.remove();
|
||||
// 一次性的,用完就删除a标签
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
if(record.studentPath){
|
||||
return [
|
||||
{
|
||||
label: '预览',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '下载',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
|
||||
}else{
|
||||
return [
|
||||
{
|
||||
label: '暂无文件',
|
||||
disabled:true,
|
||||
},];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleFanhui(){
|
||||
emit('callback');
|
||||
}
|
||||
|
||||
function init(record) {
|
||||
console.log('🧞', record);
|
||||
queryParam.kcrwdm = record.kcrwdm;
|
||||
jxrwInfo.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,229 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12"> <span style="font-size: 22px;font-weight: 700;margin-left: 20px;">学生原始材料</span> </a-col>
|
||||
<a-col :span="12" style="text-align: right">
|
||||
<a-button type="primary" @click="handleFanhui">返回</a-button>
|
||||
</a-col>
|
||||
<a-col :gutter="24">
|
||||
<div style="text-align: center; font-size: 16px; font-weight: 700; line-height: 50px" v-if="jxrwInfo.value">
|
||||
{{ jxrwInfo?.value.xn }}{{ jxrwInfo?.value.xqmc }}学期《{{ jxrwInfo?.value.kcmc }}》课程考核材料
|
||||
</div>
|
||||
<div v-if="jxrwInfo.value">
|
||||
<div style="padding-left: 15px; font-weight: 700">概要信息</div>
|
||||
<a-row style="line-height: 30px">
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">开课单位</span> :<span>{{ jxrwInfo?.value.kkyxmc }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程类别</span> :<span>{{ jxrwInfo?.value.kclb }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程名称</span> :<span>{{ jxrwInfo?.value.kcmc }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程负责人</span> :<span>{{ jxrwInfo?.value.teaxm }}</span>
|
||||
</a-col>
|
||||
<a-col :span="4">
|
||||
<span style="margin-left: 15px">考试性质</span> :<span>{{ jxrwInfo?.value.khfsmc }}</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- <div>
|
||||
详细信息
|
||||
</div> -->
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<!-- <XxhbjwxtxsmdModal ref="registerModal" @success="handleSuccess"></XxhbjwxtxsmdModal> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="xxhbjwxtxsmd-xxhbjwxtxsmd" setup>
|
||||
import { ref, reactive,defineExpose } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns3, superQuerySchema } from '/@/views/bl/xxhbjwxtxsmd/Xxhbjwxtxsmd.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from '/@/views/bl/xxhbjwxtxsmd/Xxhbjwxtxsmd.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
// import XxhbjwxtxsmdModal from './components/XxhbjwxtxsmdModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { downloadFile as ajaxDownloadFileFn } from '/@/api/common/api';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
const spinning = ref<boolean>(false);
|
||||
const emit = defineEmits(['callback']);
|
||||
|
||||
const jxrwInfo = reactive<any>({});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title:'详细信息',
|
||||
api: list,
|
||||
columns: columns3,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
showActionColumn: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "教务系统学生名单",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
function textDown(){
|
||||
var a = document.createElement("a"); //创建一个<a></a>标签
|
||||
a.href = "/download/a.docx";
|
||||
//给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
||||
a.download ="a.docx";
|
||||
//设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
||||
a.style.display = "none"; // 障眼法藏起来a标签
|
||||
document.body.appendChild(a);
|
||||
// 将a标签追加到文档对象中
|
||||
a.click(); //模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
|
||||
a.remove();
|
||||
// 一次性的,用完就删除a标签
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
if(record.studentPath){
|
||||
return [
|
||||
{
|
||||
label: '预览',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '下载',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
|
||||
}else{
|
||||
return [
|
||||
{
|
||||
label: '暂无文件',
|
||||
disabled:true,
|
||||
},];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleFanhui(){
|
||||
emit('callback');
|
||||
}
|
||||
|
||||
function init(record) {
|
||||
console.log('🧞', record);
|
||||
queryParam.kcrwdm = record.kcrwdm;
|
||||
jxrwInfo.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -7,35 +7,14 @@ import {h} from "vue";
|
|||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '文件名称',
|
||||
title: '材料名称',
|
||||
align: "center",
|
||||
dataIndex: 'name',
|
||||
dataIndex: 'fjtype',
|
||||
ellipsis: false,
|
||||
customRender:({ text }) => {
|
||||
return h('div', {style: {"width": "100%", "text-align":"left"}},text)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '存储路径',
|
||||
align: "center",
|
||||
dataIndex: 'path',
|
||||
ellipsis: false,
|
||||
customRender:({ text }) => {
|
||||
return h('div', {style: {"width": "100%", "text-align":"left"}},text)
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
align: "center",
|
||||
dataIndex: 'cjr',
|
||||
width:80,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
align: "center",
|
||||
dataIndex: 'cjsj',
|
||||
width: 160,
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
|
|
|
|||
|
|
@ -4,28 +4,44 @@
|
|||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6" >
|
||||
<a-form-item name="name">
|
||||
<template #label><span title="文件名称">文件名称</span></template>
|
||||
<j-input placeholder="请输入文件名称" v-model:value="queryParam.name" x allow-clear />
|
||||
</a-form-item>
|
||||
<a-col :span="12"> <span style="font-size: 22px;font-weight: 700;margin-left: 20px;">考核评价材料</span> </a-col>
|
||||
<a-col :span="12" style="text-align: right">
|
||||
<a-button type="primary" style="margin-left: 8px" @click="handleFanhui">返回</a-button>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
<a-col :gutter="24">
|
||||
<div style="text-align: center; font-size: 16px; font-weight: 700; line-height: 50px" v-if="jxrwInfo.value">
|
||||
{{ jxrwInfo?.value.xn }}{{ jxrwInfo?.value.xqmc }}学期《{{ jxrwInfo?.value.kcmc }}》
|
||||
</div>
|
||||
<div v-if="jxrwInfo.value">
|
||||
<div style="padding-left: 15px; font-weight: 700">概要信息</div>
|
||||
<a-row style="line-height: 30px">
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">开课单位</span> :<span>{{ jxrwInfo?.value.kkyxmc }}</span>
|
||||
</a-col>
|
||||
</span>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程类别</span> :<span>{{ jxrwInfo?.value.kclb }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程名称</span> :<span>{{ jxrwInfo?.value.kcmc }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程负责人</span> :<span>{{ jxrwInfo?.value.teaxm }}</span>
|
||||
</a-col>
|
||||
<a-col :span="4">
|
||||
<span style="margin-left: 15px">选课人数</span> :<span>{{ jxrwInfo?.value.jxbrs }}</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<BasicTable @register="registerTable">
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
|
|
@ -34,29 +50,34 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" name="xxhbjwxtscwjxx-xxhbjwxtscwjxx" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './Xxhbjwxtscwjxx.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Xxhbjwxtscwjxx.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import XxhbjwxtscwjxxModal from './components/XxhbjwxtscwjxxModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './Xxhbjwxtscwjxx.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Xxhbjwxtscwjxx.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import XxhbjwxtscwjxxModal from './components/XxhbjwxtscwjxxModal.vue';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
const jxrwInfo = reactive<any>({});
|
||||
import {getFileAccessHttpUrl} from "@/utils/common/compUtils";
|
||||
import {encryptByBase64} from "@/utils/cipher";
|
||||
|
||||
const emit = defineEmits(['callback']);
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
showActionColumn: false,
|
||||
// showActionColumn: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
|
|
@ -66,162 +87,201 @@
|
|||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "教务系统上传文件信息",
|
||||
name: '教务系统上传文件信息',
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
success: handleSuccess,
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
|
||||
tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: 24,
|
||||
sm: 4,
|
||||
xl: 6,
|
||||
xxl: 4,
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
function handleFanhui() {
|
||||
emit('callback');
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 预览
|
||||
*/
|
||||
function handleYulan(record){
|
||||
var file = getFileAccessHttpUrl(record.path) ;
|
||||
console.log('🤬', file);
|
||||
// window.open('https://view.xdocin.com/view?src=' + encodeURIComponent(encryptByBase64(file)));
|
||||
// window.open('https://fileview.jeecg.com/onlinePreview?url=' + encodeURIComponent(encryptByBase64(file)));
|
||||
window.open(file,"_blank");
|
||||
}
|
||||
/**
|
||||
* 下载
|
||||
*/
|
||||
function handleDown(record){
|
||||
downloadFile(record.path)
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'xxhbjwxtscwjxx:xxhbjwxtscwjxx:edit'
|
||||
label: '查看',
|
||||
onClick: handleYulan.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '下载',
|
||||
onClick: handleDown.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
},
|
||||
{
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'xxhbjwxtscwjxx:xxhbjwxtscwjxx:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
auth: 'xxhbjwxtscwjxx:xxhbjwxtscwjxx:delete',
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function init(record) {
|
||||
queryParam.kcrwdm = record.kcrwdm;
|
||||
queryParam.fjtype = "过程性考核-论文,历次过程性考核-评分标准,课程目标达成情况评价报告,课程考核合理性审核记录单,历次过程性考核-内容及要求(或试题),课程考核质量评价单,期未考试-试题(或内容及要求),期末考试-评分标准"
|
||||
// 平时成绩
|
||||
// 期末成绩
|
||||
// 期中成绩
|
||||
// 实践成绩
|
||||
jxrwInfo.value = record;
|
||||
|
||||
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
.query-group-cust {
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
.query-group-split-cust {
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
text-align: center;
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
.ant-form-item:not(.ant-form-item-with-help) {
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@ enum Api {
|
|||
deleteBatch = '/xxhbjwxtxsmd/xxhbjwxtxsmd/deleteBatch',
|
||||
importExcel = '/xxhbjwxtxsmd/xxhbjwxtxsmd/importExcel',
|
||||
exportXls = '/xxhbjwxtxsmd/xxhbjwxtxsmd/exportXls',
|
||||
list2 = '/xxhbjwxtxsmd/xxhbjwxtxsmd/getCjzb',
|
||||
list3 = '/xxhbjwxtxsmd/xxhbjwxtxsmd/getXsmdxxByFjtype',
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -29,6 +31,8 @@ export const getImportUrl = Api.importExcel;
|
|||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
export const list2 = (params) => defHttp.get({ url: Api.list2, params });
|
||||
export const list3 = (params) => defHttp.get({ url: Api.list3, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
|
|
|
|||
|
|
@ -261,6 +261,64 @@ export const columns: BasicColumn[] = [
|
|||
];
|
||||
|
||||
|
||||
//列表数据
|
||||
export const columns3: BasicColumn[] = [
|
||||
{
|
||||
title: '学号',
|
||||
align: "center",
|
||||
dataIndex: 'xsbh',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '学生姓名',
|
||||
align: "center",
|
||||
dataIndex: 'xsxm',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '专业',
|
||||
align: "center",
|
||||
dataIndex: 'zymc',
|
||||
width: 200,
|
||||
},
|
||||
{
|
||||
title: '平时成绩1',
|
||||
align: "center",
|
||||
dataIndex: 'cj1',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '平时成绩2',
|
||||
align: "center",
|
||||
dataIndex: 'cj2',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '平时成绩3',
|
||||
align: "center",
|
||||
dataIndex: 'cj3',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '期中成绩',
|
||||
align: "center",
|
||||
dataIndex: 'cj4',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '期末成绩',
|
||||
align: "center",
|
||||
dataIndex: 'cj5',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '总成绩',
|
||||
align: "center",
|
||||
dataIndex: 'zcj',
|
||||
width: 100,
|
||||
},
|
||||
];
|
||||
|
||||
//列表数据
|
||||
export const columns2: BasicColumn[] = [
|
||||
{
|
||||
|
|
@ -384,6 +442,83 @@ export const columns2: BasicColumn[] = [
|
|||
},
|
||||
];
|
||||
|
||||
|
||||
|
||||
//列表数据
|
||||
export const columns4: BasicColumn[] = [
|
||||
{
|
||||
title: '考核方式',
|
||||
align: "center",
|
||||
dataIndex: 'khfs',
|
||||
// customRender:({text}) =>{
|
||||
// text = !text ? "" : (text.length > 0 ? text.substr(0,text.indexOf("[")) : "");
|
||||
// return text;
|
||||
// },
|
||||
},
|
||||
{
|
||||
title: '占比',
|
||||
align: "center",
|
||||
dataIndex: 'zb',
|
||||
// customRender:({text}) =>{
|
||||
// if(text.indexOf("[") > -1){
|
||||
// try{
|
||||
// var a = text.indexOf("[")+1;
|
||||
// var b = text.indexOf("]");
|
||||
// var c = parseInt(b)-parseInt(a);
|
||||
// text = !text ? "" : (text.length > 0 ? text.substr(a,c) : "");
|
||||
// }catch(e){
|
||||
|
||||
// }
|
||||
// }
|
||||
// return text;
|
||||
// }
|
||||
},
|
||||
{
|
||||
title: '学生原始材料',
|
||||
align: "center",
|
||||
dataIndex: 'xsyscl',
|
||||
children: [
|
||||
{
|
||||
title: '存档类型',
|
||||
dataIndex: 'cdlx',
|
||||
width: 140,
|
||||
// slots: { customRender: 'cdlxaction' },
|
||||
},
|
||||
{
|
||||
title: '详情',
|
||||
dataIndex: 'xq',
|
||||
width: 100,
|
||||
slots: { customRender: 'xqaction' },
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
|
||||
//列表数据
|
||||
export const columns5: BasicColumn[] = [
|
||||
{
|
||||
title: '学生学号',
|
||||
align: "center",
|
||||
dataIndex: 'xsbh',
|
||||
},
|
||||
{
|
||||
title: '学生姓名',
|
||||
align: "center",
|
||||
dataIndex: 'xsxm',
|
||||
},
|
||||
{
|
||||
title: '专业',
|
||||
align: "center",
|
||||
dataIndex: 'zymc',
|
||||
},
|
||||
{
|
||||
title: '得分',
|
||||
align: "center",
|
||||
dataIndex: 'fsshow',
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
kcrwdm: {title: 'kcrwdm',order: 0,view: 'text', type: 'string',},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,211 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12"> <span style="font-size: 22px; font-weight: 700; margin-left: 20px">学生原始材料 </span> </a-col>
|
||||
<a-col :span="12" style="text-align: right">
|
||||
<a-button type="primary" @click="handleFanhui">返回</a-button>
|
||||
</a-col>
|
||||
<a-col :gutter="24">
|
||||
<div style="text-align: center; font-size: 16px; font-weight: 700; line-height: 50px" v-if="jxrwInfo.value">
|
||||
{{ jxrwInfo?.value.xn }}{{ jxrwInfo?.value.xqmc }}学期《{{ jxrwInfo?.value.kcmc }}》
|
||||
</div>
|
||||
<div v-if="jxrwInfo.value">
|
||||
<div style="padding-left: 15px; font-weight: 700">概要信息</div>
|
||||
<a-row style="line-height: 30px">
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">开课单位</span> :<span>{{ jxrwInfo?.value.kkyxmc }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程类别</span> :<span>{{ jxrwInfo?.value.kclb }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程名称</span> :<span>{{ jxrwInfo?.value.kcmc }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程负责人</span> :<span>{{ jxrwInfo?.value.teaxm }}</span>
|
||||
</a-col>
|
||||
<a-col :span="4">
|
||||
<span style="margin-left: 15px">选课人数</span> :<span>{{ jxrwInfo?.value.jxbrs }}</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- <div>
|
||||
详细信息
|
||||
</div> -->
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<template #headerCell="{ column }">
|
||||
<template v-if="column.key === 'cdlx'">
|
||||
<a-popover placement="topRight" class="">
|
||||
<template #content>
|
||||
<p
|
||||
>为进一步加强教学督导、交流研讨和教学反思改进,学校要求对课程的学生原始考核材料进行全量或抽样电子存档。<br />全量指对班级所有学生的原始材料全部存档;抽样是指按学生成绩的优秀、良好、一般各抽取至少2份原始材料进行电子存档。</p
|
||||
>
|
||||
</template>
|
||||
<template #title>
|
||||
<span>存档类型 </span>
|
||||
</template>
|
||||
<span>存档类型</span><icon icon="ant-design:question-circle-outlined" style="margin-left: 5px; font-size: 16px" />
|
||||
</a-popover>
|
||||
</template>
|
||||
<template v-if="column.key != 'cdlx'">
|
||||
{{ column.customTitle ? column.customTitle : column.title }}
|
||||
</template>
|
||||
<!-- <template v-if="column.key === 'zb'">
|
||||
占比
|
||||
</template> -->
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #xqaction="{ record }">
|
||||
<a @click="handleDetail(record)">查看</a>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<XxhbjwxtxsmdModal ref="registerModal" @success="handleSuccess"></XxhbjwxtxsmdModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="xxhbjwxtxsmd-xxhbjwxtxsmd" setup>
|
||||
import { ref, reactive, defineExpose } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns4, superQuerySchema } from './Xxhbjwxtxsmd.data';
|
||||
import { list2, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Xxhbjwxtxsmd.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import XxhbjwxtxsmdModal from './components/XxhbjwxtxsmdModal.vue';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { downloadFile as ajaxDownloadFileFn } from '/@/api/common/api';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
const spinning = ref<boolean>(false);
|
||||
const emit = defineEmits(['callback', 'handleXq']);
|
||||
|
||||
const jxrwInfo = reactive<any>({});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '详细信息',
|
||||
api: list2,
|
||||
columns: columns4,
|
||||
canResize: false,
|
||||
useSearchForm: false,
|
||||
showActionColumn: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: '教务系统学生名单',
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess,
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] =
|
||||
tableContext;
|
||||
const labelCol = reactive({
|
||||
xs: 24,
|
||||
sm: 4,
|
||||
xl: 6,
|
||||
xxl: 4,
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
function textDown() {
|
||||
var a = document.createElement('a'); //创建一个<a></a>标签
|
||||
a.href = '/download/a.docx';
|
||||
//给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
||||
a.download = 'a.docx';
|
||||
//设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
||||
a.style.display = 'none'; // 障眼法藏起来a标签
|
||||
document.body.appendChild(a);
|
||||
// 将a标签追加到文档对象中
|
||||
a.click(); //模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
|
||||
a.remove();
|
||||
// 一次性的,用完就删除a标签
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleFanhui() {
|
||||
emit('callback');
|
||||
}
|
||||
|
||||
function handleDetail(record) {
|
||||
console.log('😢handleDetail--------', record);
|
||||
jxrwInfo.value.khfs = record.khfs;
|
||||
jxrwInfo.value.sort = record.sort;
|
||||
console.log('🖕222222222222', jxrwInfo.value);
|
||||
emit('handleXq', jxrwInfo.value);
|
||||
}
|
||||
function init(record) {
|
||||
console.log('🧞', record);
|
||||
queryParam.kcrwdm = record.kcrwdm;
|
||||
jxrwInfo.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust {
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust {
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help) {
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,247 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12"> <span style="font-size: 22px; font-weight: 700; margin-left: 20px">学生原始材料详情 </span> </a-col>
|
||||
<a-col :span="12" style="text-align: right">
|
||||
<a-button type="primary" @click="handleFanhui">返回</a-button>
|
||||
</a-col>
|
||||
<a-col :gutter="24">
|
||||
<div style="text-align: center; font-size: 16px; font-weight: 700; line-height: 50px" v-if="jxrwInfo.value">
|
||||
{{ jxrwInfo?.value.xn }}{{ jxrwInfo?.value.xqmc }}学期《{{ jxrwInfo?.value.kcmc }}》
|
||||
</div>
|
||||
<div v-if="jxrwInfo.value">
|
||||
<div style="padding-left: 15px; font-weight: 700">概要信息</div>
|
||||
<a-row style="line-height: 30px">
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">开课单位</span> :<span>{{ jxrwInfo?.value.kkyxmc }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程类别</span> :<span>{{ jxrwInfo?.value.kclb }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程名称</span> :<span>{{ jxrwInfo?.value.kcmc }}</span>
|
||||
</a-col>
|
||||
<a-col :span="5">
|
||||
<span style="margin-left: 15px">课程负责人</span> :<span>{{ jxrwInfo?.value.teaxm }}</span>
|
||||
</a-col>
|
||||
<a-col :span="4">
|
||||
<span style="margin-left: 15px">选课人数</span> :<span>{{ jxrwInfo?.value.jxbrs }}</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!-- <div>
|
||||
详细信息
|
||||
</div> -->
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<XxhbjwxtxsmdModal ref="registerModal" @success="handleSuccess"></XxhbjwxtxsmdModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="xxhbjwxtxsmd-xxhbjwxtxsmd" setup>
|
||||
import { ref, reactive,defineExpose } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns5, superQuerySchema } from './Xxhbjwxtxsmd.data';
|
||||
import { list3, deleteOne, batchDelete, getImportUrl, getExportUrl } from './Xxhbjwxtxsmd.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import XxhbjwxtxsmdModal from './components/XxhbjwxtxsmdModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import {getFileAccessHttpUrl} from "@/utils/common/compUtils";
|
||||
import {encryptByBase64} from "@/utils/cipher";
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
const spinning = ref<boolean>(false);
|
||||
const emit = defineEmits(['callback']);
|
||||
|
||||
const jxrwInfo = reactive<any>({});
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title:'详细信息',
|
||||
api: list3,
|
||||
columns: columns5,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "教务系统学生名单",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
function textDown(){
|
||||
var a = document.createElement("a"); //创建一个<a></a>标签
|
||||
a.href = "/download/a.docx";
|
||||
//给a标签的href属性值加上地址,注意,这里是绝对路径,不用加 点.
|
||||
a.download ="a.docx";
|
||||
//设置下载文件文件名,这里加上.xlsx指定文件类型,pdf文件就指定.fpd即可
|
||||
a.style.display = "none"; // 障眼法藏起来a标签
|
||||
document.body.appendChild(a);
|
||||
// 将a标签追加到文档对象中
|
||||
a.click(); //模拟点击了a标签,会触发a标签的href的读取,浏览器就会自动下载了
|
||||
a.remove();
|
||||
// 一次性的,用完就删除a标签
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 预览
|
||||
*/
|
||||
function handleYulan(record){
|
||||
var file = getFileAccessHttpUrl(record.studentPath) ;
|
||||
console.log('🤬', file);
|
||||
// window.open('https://view.xdocin.com/view?src=' + encodeURIComponent(encryptByBase64(file)));
|
||||
// window.open('https://fileview.jeecg.com/onlinePreview?url=' + encodeURIComponent(encryptByBase64(file)));
|
||||
window.open(file,"_blank");
|
||||
}
|
||||
/**
|
||||
* 下载
|
||||
*/
|
||||
function handleDown(record){
|
||||
downloadFile(record.studentPath)
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
if(record.studentPath){
|
||||
return [
|
||||
{
|
||||
label: '查看',
|
||||
onClick: handleYulan.bind(null, record),
|
||||
},
|
||||
{
|
||||
label: '下载',
|
||||
onClick: handleDown.bind(null, record),
|
||||
},
|
||||
];
|
||||
|
||||
}else{
|
||||
return [
|
||||
{
|
||||
label: '暂无文件',
|
||||
disabled:true,
|
||||
},];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function handleFanhui() {
|
||||
emit('callback');
|
||||
}
|
||||
function init(record) {
|
||||
console.log('🧞', record);
|
||||
queryParam.kcrwdm = record.kcrwdm;
|
||||
queryParam.cdlx = record.khfs;
|
||||
queryParam.sort = record.sort;
|
||||
jxrwInfo.value = record;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学年学期" id="ZjSqxxForm-xnxq" name="xnxq">
|
||||
<j-dict-select-tag v-model:value="formData.xnxq" dictCode="xqxn" placeholder="请选择学年学期,如果不选,默认全部" allow-clear />
|
||||
<JSelectMultiple v-model:value="formData.xnxq" placeholder="请选择学年学期,如果不选,默认全部" :dictCode="`v_xnxqdm,xnxqdm,xnxqdm`"></JSelectMultiple>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学年学期" id="ZjSqxxForm-xnxq" name="xnxq">
|
||||
<JSelectMultiple v-model:value="item.xnxq" placeholder="请选择学年学期,如果不选,默认全部" dictCode="xqxn"></JSelectMultiple>
|
||||
<JSelectMultiple v-model:value="item.xnxq" placeholder="请选择学年学期,如果不选,默认全部" :dictCode="`v_xnxqdm,xnxqdm,xnxqdm`"></JSelectMultiple>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
|
|
|
|||
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/zjXkxx/zjXkxx/list',
|
||||
save='/zjXkxx/zjXkxx/add',
|
||||
edit='/zjXkxx/zjXkxx/edit',
|
||||
deleteOne = '/zjXkxx/zjXkxx/delete',
|
||||
deleteBatch = '/zjXkxx/zjXkxx/deleteBatch',
|
||||
importExcel = '/zjXkxx/zjXkxx/importExcel',
|
||||
exportXls = '/zjXkxx/zjXkxx/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '学年学期',
|
||||
align: "center",
|
||||
dataIndex: 'xnxq_dictText'
|
||||
},
|
||||
{
|
||||
title: '课程名称',
|
||||
align: "center",
|
||||
dataIndex: 'kcmc'
|
||||
},
|
||||
{
|
||||
title: '课程类别',
|
||||
align: "center",
|
||||
dataIndex: 'kclb'
|
||||
},
|
||||
{
|
||||
title: '开课单位',
|
||||
align: "center",
|
||||
dataIndex: 'kkdw'
|
||||
},
|
||||
{
|
||||
title: '所属专业(大类)',
|
||||
align: "center",
|
||||
dataIndex: 'sszy'
|
||||
},
|
||||
{
|
||||
title: '任课教师',
|
||||
align: "center",
|
||||
dataIndex: 'rkjs'
|
||||
},
|
||||
{
|
||||
title: '教师职称',
|
||||
align: "center",
|
||||
dataIndex: 'jszc'
|
||||
},
|
||||
{
|
||||
title: '选课人数',
|
||||
align: "center",
|
||||
dataIndex: 'xkrs'
|
||||
},
|
||||
{
|
||||
title: '考试方式',
|
||||
align: "center",
|
||||
dataIndex: 'khfs'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
xnxq: {title: '学年学期',order: 0,view: 'list', type: 'string',dictCode: '',},
|
||||
kcmc: {title: '课程名称',order: 1,view: 'text', type: 'string',},
|
||||
kclb: {title: '课程类别',order: 2,view: 'text', type: 'string',},
|
||||
kkdw: {title: '开课单位',order: 3,view: 'text', type: 'string',},
|
||||
sszy: {title: '所属专业(大类)',order: 4,view: 'textarea', type: 'string',},
|
||||
rkjs: {title: '任课教师',order: 5,view: 'text', type: 'string',},
|
||||
jszc: {title: '教师职称',order: 6,view: 'text', type: 'string',},
|
||||
xkrs: {title: '选课人数',order: 7,view: 'text', type: 'string',},
|
||||
khfs: {title: '考试方式',order: 8,view: 'text', type: 'string',},
|
||||
};
|
||||
|
|
@ -0,0 +1,279 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="xnxq">
|
||||
<template #label><span title="学年学期">学年学期</span></template>
|
||||
<a-input placeholder="请输入学年学期" v-model:value="queryParam.xnxq" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="kcmc">
|
||||
<template #label><span title="课程名称">课程名称</span></template>
|
||||
<a-input placeholder="请输入课程名称" v-model:value="queryParam.kcmc" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<template v-if="toggleSearchStatus">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="kclb">
|
||||
<template #label><span title="课程类别">课程类别</span></template>
|
||||
<a-input placeholder="请输入课程类别" v-model:value="queryParam.kclb" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="kkdw">
|
||||
<template #label><span title="开课单位">开课单位</span></template>
|
||||
<a-input placeholder="请输入开课单位" v-model:value="queryParam.kkdw" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="sszy">
|
||||
<template #label><span title="所属专业(大类)">所属专业</span></template>
|
||||
<a-input placeholder="请输入所属专业(大类)" v-model:value="queryParam.sszy" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</template>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
<a @click="toggleSearchStatus = !toggleSearchStatus" style="margin-left: 8px">
|
||||
{{ toggleSearchStatus ? '收起' : '展开' }}
|
||||
<Icon :icon="toggleSearchStatus ? 'ant-design:up-outlined' : 'ant-design:down-outlined'" />
|
||||
</a>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'zjXkxx:zj_xkxx:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'zjXkxx:zj_xkxx:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'zjXkxx:zj_xkxx:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'zjXkxx:zj_xkxx:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<ZjXkxxModal ref="registerModal" @success="handleSuccess"></ZjXkxxModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="zjXkxx-zjXkxx" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './ZjXkxx.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZjXkxx.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import ZjXkxxModal from './components/ZjXkxxModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '专家选课信息',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "专家选课信息",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'zjXkxx:zj_xkxx:edit'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'zjXkxx:zj_xkxx:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="ZjXkxxForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学年学期" v-bind="validateInfos.xnxq" id="ZjXkxxForm-xnxq" name="xnxq">
|
||||
<j-dict-select-tag v-model:value="formData.xnxq" dictCode="" placeholder="请选择学年学期" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="课程名称" v-bind="validateInfos.kcmc" id="ZjXkxxForm-kcmc" name="kcmc">
|
||||
<a-input v-model:value="formData.kcmc" placeholder="请输入课程名称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="课程类别" v-bind="validateInfos.kclb" id="ZjXkxxForm-kclb" name="kclb">
|
||||
<a-input v-model:value="formData.kclb" placeholder="请输入课程类别" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="开课单位" v-bind="validateInfos.kkdw" id="ZjXkxxForm-kkdw" name="kkdw">
|
||||
<a-input v-model:value="formData.kkdw" placeholder="请输入开课单位" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="所属专业(大类)" v-bind="validateInfos.sszy" id="ZjXkxxForm-sszy" name="sszy">
|
||||
<a-textarea v-model:value="formData.sszy" :rows="4" placeholder="请输入所属专业(大类)" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="任课教师" v-bind="validateInfos.rkjs" id="ZjXkxxForm-rkjs" name="rkjs">
|
||||
<a-input v-model:value="formData.rkjs" placeholder="请输入任课教师" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="教师职称" v-bind="validateInfos.jszc" id="ZjXkxxForm-jszc" name="jszc">
|
||||
<a-input v-model:value="formData.jszc" placeholder="请输入教师职称" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="选课人数" v-bind="validateInfos.xkrs" id="ZjXkxxForm-xkrs" name="xkrs">
|
||||
<a-input v-model:value="formData.xkrs" placeholder="请输入选课人数" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="考试方式" v-bind="validateInfos.khfs" id="ZjXkxxForm-khfs" name="khfs">
|
||||
<a-input v-model:value="formData.khfs" placeholder="请输入考试方式" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../ZjXkxx.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
xnxq: '',
|
||||
kcmc: '',
|
||||
kclb: '',
|
||||
kkdw: '',
|
||||
sszy: '',
|
||||
rkjs: '',
|
||||
jszc: '',
|
||||
xkrs: '',
|
||||
khfs: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<ZjXkxxForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZjXkxxForm>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import ZjXkxxForm from './ZjXkxxForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
||||
|
|
@ -40,14 +40,10 @@
|
|||
<a-input placeholder="请输入授课教师" v-model:value="queryParam.skjs" allow-clear></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-col :lg="12" style="text-align: right;">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue