添加功能

This commit is contained in:
yangjun 2024-09-04 14:26:17 +08:00
parent 73fcaa2026
commit a64630298f
46 changed files with 3432 additions and 193 deletions

View File

@ -262,8 +262,8 @@ public class QueryGenerator {
//update-begin-author:scott date:2022-11-07 for:避免用户自定义表无默认字段{创建时间}导致排序报错
//TODO 避免用户自定义表无默认字段创建时间导致排序报错
if(DataBaseConstant.CREATE_TIME.equals(column) && !fieldColumnMap.containsKey(DataBaseConstant.CREATE_TIME)){
column = "id";
log.warn("检测到实体里没有字段createTime改成采用ID排序");
column = "";
// log.warn("检测到实体里没有字段createTime改成采用ID排序");
}
//update-end-author:scott date:2022-11-07 for:避免用户自定义表无默认字段{创建时间}导致排序报错

View File

@ -16,6 +16,10 @@
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-boot-base-core</artifactId>
</dependency>
<dependency>
<groupId>org.jeecgframework.boot</groupId>
<artifactId>jeecg-system-biz</artifactId>
</dependency>
</dependencies>
</project>

View File

@ -1,6 +1,7 @@
package org.jeecg.modules.demo.kcKetangbiao.controller;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@ -9,8 +10,12 @@ 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.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.kcKetangbiao.entity.KcKetangbiao;
import org.jeecg.modules.demo.kcKetangbiao.service.IKcKetangbiaoService;
@ -20,6 +25,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.modules.demo.zjSqxx.entity.ZjSqxx;
import org.jeecg.modules.demo.zjSqxx.service.IZjSqxxService;
import org.jeecgframework.poi.excel.ExcelImportUtil;
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
import org.jeecgframework.poi.excel.entity.ExportParams;
@ -50,7 +57,9 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKetangbiaoService> {
@Autowired
private IKcKetangbiaoService kcKetangbiaoService;
@Autowired
private IZjSqxxService zjSqxxService;
/**
* 分页列表查询
*
@ -81,6 +90,34 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
Page<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
QueryWrapper<ZjSqxx> zjSqxxQueryWrapper = new QueryWrapper<>();
zjSqxxQueryWrapper.eq("user_id",sysUser.getId());
zjSqxxQueryWrapper.eq("sqfw","1");
ZjSqxx zjSqxx = zjSqxxService.getOne(zjSqxxQueryWrapper);
String sfjx = "0";
if(zjSqxx!=null){
Date date = new Date();
if(zjSqxx.getSqStartTime()!=null&&zjSqxx.getSqStartTime().getTime()>=date.getTime()){
sfjx = "1";
}
if(zjSqxx.getSqEndTime()!=null&&zjSqxx.getSqEndTime().getTime()<=date.getTime()){
sfjx = "1";
}
if(StringUtils.isNotBlank(zjSqxx.getXnxq())){
kcKetangbiao.setXnxq(zjSqxx.getXnxq());
}
if(StringUtils.isNotBlank(zjSqxx.getKkdw())){
kcKetangbiao.setInKkdw(zjSqxx.getKkdw());
}
if(StringUtils.isNotBlank(zjSqxx.getKcmc())){
kcKetangbiao.setInKcmc(zjSqxx.getKcmc());
}
}
if(StringUtils.equals("1",sfjx)){
return Result.error("您未在授权期限内,不能进行查询!");
}
IPage<KcKetangbiao> pageList = kcKetangbiaoService.getKclblist(page, kcKetangbiao);
return Result.OK(pageList);
}
@ -195,4 +232,16 @@ public class KcKetangbiaoController extends JeecgController<KcKetangbiao, IKcKet
return Result.OK(kcKetangbiao);
}
@ApiOperation(value="选择课程名称集合", notes="选择课程名称集合")
@GetMapping(value = "/checklist")
public Result<IPage<KcKetangbiao>> checklist(KcKetangbiao kcKetangbiao,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
Page<KcKetangbiao> page = new Page<KcKetangbiao>(pageNo, pageSize);
IPage<KcKetangbiao> pageList = kcKetangbiaoService.checklist(page, kcKetangbiao);
return Result.OK(pageList);
}
}

View File

@ -344,6 +344,13 @@ public class KcKetangbiao implements Serializable {
private String flag;
@TableField(exist = false)
private String inKkdw;
@TableField(exist = false)
private String inKcmc;
@TableField(exist = false)
private KcDetectionMain detectionMain;
@TableField(exist = false)

View File

@ -19,4 +19,6 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
public interface KcKetangbiaoMapper extends BaseMapper<KcKetangbiao> {
IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
IPage<KcKetangbiao> checklist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
}

View File

@ -37,6 +37,19 @@
#{item}
</foreach>
</if>
<if test="kcKetangbiao.inKkdw!=null and kcKetangbiao.inKkdw!=''">
and ktb.kkdw in
<foreach item="item" index="index" collection="kcKetangbiao.inKkdw.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="kcKetangbiao.inKcmc!=null and kcKetangbiao.inKcmc!=''">
and ktb.kcmc in
<foreach item="item" index="index" collection="kcKetangbiao.inKcmc.split(',')" open="(" separator="," close=")">
#{item}
</foreach>
</if>
<if test="kcKetangbiao.kkdw!=null and kcKetangbiao.kkdw!=''">
and ktb.kkdw = #{kcKetangbiao.kkdw}
</if>
@ -77,4 +90,13 @@
order by ktb.hh asc,kkdw.id asc,IF(tkxx.kcmc is null,'0','1') asc
</select>
<select id="checklist" parameterType="org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao" resultType="org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao">
select kcmc as id,kcmc from kc_ketangbiao a , kc_sys_config b where a.xnxq = b.flag1
<if test="kcKetangbiao.kcmc!=null and kcKetangbiao.kcmc!=''">
and a.kcmc like concat('%',#{kcKetangbiao.kcmc},'%')
</if>
GROUP BY kcmc
order by kcmc asc
</select>
</mapper>

View File

@ -17,4 +17,6 @@ public interface IKcKetangbiaoService extends IService<KcKetangbiao> {
IPage<KcKetangbiao> getKclblist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
KcKetangbiao queryAllDataById(String id);
IPage<KcKetangbiao> checklist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao);
}

View File

@ -5,7 +5,10 @@ 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.apache.shiro.SecurityUtils;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.demo.kcDetectionDetailed.entity.KcDetectionDetailed;
import org.jeecg.modules.demo.kcDetectionDetailed.mapper.KcDetectionDetailedMapper;
import org.jeecg.modules.demo.kcDetectionMain.entity.KcDetectionMain;
@ -13,11 +16,14 @@ import org.jeecg.modules.demo.kcDetectionMain.mapper.KcDetectionMainMapper;
import org.jeecg.modules.demo.kcKetangbiao.entity.KcKetangbiao;
import org.jeecg.modules.demo.kcKetangbiao.mapper.KcKetangbiaoMapper;
import org.jeecg.modules.demo.kcKetangbiao.service.IKcKetangbiaoService;
import org.jeecg.modules.demo.zjSqxx.entity.ZjSqxx;
import org.jeecg.modules.demo.zjSqxx.service.IZjSqxxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.Date;
import java.util.List;
/**
@ -95,4 +101,9 @@ public class KcKetangbiaoServiceImpl extends ServiceImpl<KcKetangbiaoMapper, KcK
}
return kcKetangbiao;
}
@Override
public IPage<KcKetangbiao> checklist(Page<KcKetangbiao> page, KcKetangbiao kcKetangbiao) {
return baseMapper.checklist(page,kcKetangbiao);
}
}

View File

@ -37,12 +37,12 @@ public class Xxhbjwxtjxrw implements Serializable {
@ApiModelProperty(value = "xnxqdm")
private java.lang.String xnxqdm;
/**kcmc*/
@Excel(name = "kcmc", width = 15)
@ApiModelProperty(value = "kcmc")
@Excel(name = "课程名称", width = 15)
@ApiModelProperty(value = "课程名称")
private java.lang.String kcmc;
/**kcrwdm*/
@Excel(name = "kcrwdm", width = 15)
@ApiModelProperty(value = "kcrwdm")
@Excel(name = "开课任务编号", width = 15)
@ApiModelProperty(value = "开课任务编号")
private java.lang.String kcrwdm;
/**kclb*/
@Excel(name = "kclb", width = 15)

View File

@ -25,19 +25,19 @@ public class JwxtScwjxx implements Serializable {
private static final long serialVersionUID = 1L;
/**name*/
@Excel(name = "name", width = 15)
@ApiModelProperty(value = "name")
@Excel(name = "姓名", width = 15)
@ApiModelProperty(value = "姓名")
private String name;
/**path*/
@Excel(name = "path", width = 15)
@ApiModelProperty(value = "path")
@Excel(name = "文件", width = 15)
@ApiModelProperty(value = "文件")
private String path;
/**cjr*/
@Excel(name = "cjr", width = 15)
@ApiModelProperty(value = "cjr")
@Excel(name = "创建人", width = 15)
@ApiModelProperty(value = "创建人")
private String cjr;
/**cjsj*/
@Excel(name = "cjsj", width = 15)
@ApiModelProperty(value = "cjsj")
@Excel(name = "创建时间", width = 15)
@ApiModelProperty(value = "创建时间")
private String cjsj;
}

View File

@ -32,20 +32,20 @@ import lombok.experimental.Accessors;
public class Xxhbjwxtscwjxx implements Serializable {
private static final long serialVersionUID = 1L;
/**name*/
@Excel(name = "name", width = 15)
@ApiModelProperty(value = "name")
private java.lang.String name;
/**path*/
@Excel(name = "path", width = 15)
@ApiModelProperty(value = "path")
private java.lang.String path;
/**cjr*/
@Excel(name = "cjr", width = 15)
@ApiModelProperty(value = "cjr")
private java.lang.String cjr;
/**cjsj*/
@Excel(name = "cjsj", width = 15)
@ApiModelProperty(value = "cjsj")
private java.lang.String cjsj;
/**name*/
@Excel(name = "姓名", width = 15)
@ApiModelProperty(value = "姓名")
private String name;
/**path*/
@Excel(name = "文件", width = 15)
@ApiModelProperty(value = "文件")
private String path;
/**cjr*/
@Excel(name = "创建人", width = 15)
@ApiModelProperty(value = "创建人")
private String cjr;
/**cjsj*/
@Excel(name = "创建时间", width = 15)
@ApiModelProperty(value = "创建时间")
private String cjsj;
}

View File

@ -0,0 +1,188 @@
package org.jeecg.modules.demo.zjSqxx.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.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.zjSqxx.entity.ZjSqxx;
import org.jeecg.modules.demo.zjSqxx.service.IZjSqxxService;
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-03
* @Version: V1.0
*/
@Api(tags="专家授权信息")
@RestController
@RequestMapping("/zjSqxx/zjSqxx")
@Slf4j
public class ZjSqxxController extends JeecgController<ZjSqxx, IZjSqxxService> {
@Autowired
private IZjSqxxService zjSqxxService;
/**
* 分页列表查询
*
* @param zjSqxx
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "专家授权信息-分页列表查询")
@ApiOperation(value="专家授权信息-分页列表查询", notes="专家授权信息-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<ZjSqxx>> queryPageList(ZjSqxx zjSqxx,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZjSqxx> queryWrapper = QueryGenerator.initQueryWrapper(zjSqxx, req.getParameterMap());
Page<ZjSqxx> page = new Page<ZjSqxx>(pageNo, pageSize);
IPage<ZjSqxx> pageList = zjSqxxService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zjSqxx
* @return
*/
@AutoLog(value = "专家授权信息-添加")
@ApiOperation(value="专家授权信息-添加", notes="专家授权信息-添加")
@RequiresPermissions("zjSqxx:zj_sqxx:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ZjSqxx zjSqxx) {
zjSqxxService.save(zjSqxx);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zjSqxx
* @return
*/
@AutoLog(value = "专家授权信息-编辑")
@ApiOperation(value="专家授权信息-编辑", notes="专家授权信息-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ZjSqxx zjSqxx) {
zjSqxxService.updateById(zjSqxx);
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) {
zjSqxxService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "专家授权信息-批量删除")
@ApiOperation(value="专家授权信息-批量删除", notes="专家授权信息-批量删除")
@RequiresPermissions("zjSqxx:zj_sqxx:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zjSqxxService.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<ZjSqxx> queryById(@RequestParam(name="id",required=true) String id) {
ZjSqxx zjSqxx = zjSqxxService.getById(id);
if(zjSqxx==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zjSqxx);
}
/**
* 导出excel
*
* @param request
* @param zjSqxx
*/
@RequiresPermissions("zjSqxx:zj_sqxx:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZjSqxx zjSqxx) {
return super.exportXls(request, zjSqxx, ZjSqxx.class, "专家授权信息");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("zjSqxx:zj_sqxx:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZjSqxx.class);
}
/**
* 添加新数据
* @param zjSqxx
* @return
*/
@PostMapping(value = "/addNew")
public Result<String> addNew(@RequestBody ZjSqxx zjSqxx) {
zjSqxxService.addNew(zjSqxx);
return Result.OK("添加成功!");
}
}

View File

@ -0,0 +1,113 @@
package org.jeecg.modules.demo.zjSqxx.entity;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import java.util.List;
import com.baomidou.mybatisplus.annotation.*;
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-03
* @Version: V1.0
*/
@Data
@TableName("zj_sqxx")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="zj_sqxx对象", description="专家授权信息")
public class ZjSqxx 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;
/**教工号*/
@Excel(name = "教工号", width = 15)
@ApiModelProperty(value = "教工号")
private java.lang.String zjNo;
/**专家姓名*/
@Excel(name = "专家姓名", width = 15)
@ApiModelProperty(value = "专家姓名")
private java.lang.String zjName;
/**授权范围0过程考核 1智慧教师 2毕业论文 3实习实践*/
@Excel(name = "授权范围0过程考核 1智慧教师 2毕业论文 3实习实践", width = 15, dicCode = "zj_sqfw")
@Dict(dicCode = "zj_sqfw")
@ApiModelProperty(value = "授权范围0过程考核 1智慧教师 2毕业论文 3实习实践")
private java.lang.String sqfw;
/**授权开始时间*/
@Excel(name = "授权开始时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "授权开始时间")
private java.util.Date sqStartTime;
/**授权结束时间*/
@Excel(name = "授权结束时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "授权结束时间")
private java.util.Date sqEndTime;
/**学年学期/毕业年份*/
@Excel(name = "学年学期/毕业年份", width = 15)
@ApiModelProperty(value = "学年学期/毕业年份")
private java.lang.String xnxq;
/**课程所属专业*/
@Excel(name = "课程所属专业", width = 15)
@ApiModelProperty(value = "课程所属专业")
private java.lang.String zydl;
/**课程名称*/
@Excel(name = "课程名称", width = 15)
@ApiModelProperty(value = "课程名称")
private java.lang.String kcmc;
/**开课单位*/
@Excel(name = "开课单位", width = 15)
@ApiModelProperty(value = "开课单位")
private java.lang.String kkdw;
/**授权状态0正常1过期*/
@Excel(name = "授权状态0正常1过期", width = 15, dicCode = "zj_sqzt")
@Dict(dicCode = "zj_sqzt")
@ApiModelProperty(value = "授权状态0正常1过期")
private java.lang.String sqzt;
/**课程类别*/
@Excel(name = "课程类别", width = 15)
@ApiModelProperty(value = "课程类别")
private java.lang.String kclb;
@TableField(exist = false)
private List<ZjSqxx> sqDataList;
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.zjSqxx.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.zjSqxx.entity.ZjSqxx;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 专家授权信息
* @Author: jeecg-boot
* @Date: 2024-09-03
* @Version: V1.0
*/
public interface ZjSqxxMapper extends BaseMapper<ZjSqxx> {
}

View File

@ -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.zjSqxx.mapper.ZjSqxxMapper">
</mapper>

View File

@ -0,0 +1,15 @@
package org.jeecg.modules.demo.zjSqxx.service;
import org.jeecg.modules.demo.zjSqxx.entity.ZjSqxx;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 专家授权信息
* @Author: jeecg-boot
* @Date: 2024-09-03
* @Version: V1.0
*/
public interface IZjSqxxService extends IService<ZjSqxx> {
void addNew(ZjSqxx zjSqxx);
}

View File

@ -0,0 +1,49 @@
package org.jeecg.modules.demo.zjSqxx.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.jeecg.modules.demo.zjSqxx.entity.ZjSqxx;
import org.jeecg.modules.demo.zjSqxx.mapper.ZjSqxxMapper;
import org.jeecg.modules.demo.zjSqxx.service.IZjSqxxService;
import org.jeecg.modules.system.entity.SysUser;
import org.jeecg.modules.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: 专家授权信息
* @Author: jeecg-boot
* @Date: 2024-09-03
* @Version: V1.0
*/
@Service
public class ZjSqxxServiceImpl extends ServiceImpl<ZjSqxxMapper, ZjSqxx> implements IZjSqxxService {
@Autowired
private ISysUserService sysUserService;
@Override
public void addNew(ZjSqxx zjSqxx) {
List<ZjSqxx> zjSqxxList = zjSqxx.getSqDataList();
String userIdArr[] = zjSqxx.getUserId().split(",");
for(String userId:userIdArr){
SysUser user = sysUserService.getById(userId);
//先删除该用户的授权记录
QueryWrapper<ZjSqxx> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("user_id",userId);
baseMapper.delete(queryWrapper);
for(ZjSqxx sq:zjSqxxList){
sq.setId(null);
sq.setUserId(userId);
sq.setZjName(user.getRealname());
sq.setZjNo(user.getUsername());
baseMapper.insert(sq);
}
}
}
}

View File

@ -0,0 +1,178 @@
package org.jeecg.modules.demo.zyInfoScjl.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.jeecg.common.api.vo.Result;
import org.jeecg.common.system.query.QueryGenerator;
import org.jeecg.common.util.oConvertUtils;
import org.jeecg.modules.demo.zyInfoScjl.entity.ZyInfoScjl;
import org.jeecg.modules.demo.zyInfoScjl.service.IZyInfoScjlService;
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-03
* @Version: V1.0
*/
@Api(tags="作业上传记录")
@RestController
@RequestMapping("/zyInfoScjl/zyInfoScjl")
@Slf4j
public class ZyInfoScjlController extends JeecgController<ZyInfoScjl, IZyInfoScjlService> {
@Autowired
private IZyInfoScjlService zyInfoScjlService;
/**
* 分页列表查询
*
* @param zyInfoScjl
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "作业上传记录-分页列表查询")
@ApiOperation(value="作业上传记录-分页列表查询", notes="作业上传记录-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<ZyInfoScjl>> queryPageList(ZyInfoScjl zyInfoScjl,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<ZyInfoScjl> queryWrapper = QueryGenerator.initQueryWrapper(zyInfoScjl, req.getParameterMap());
Page<ZyInfoScjl> page = new Page<ZyInfoScjl>(pageNo, pageSize);
IPage<ZyInfoScjl> pageList = zyInfoScjlService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param zyInfoScjl
* @return
*/
@AutoLog(value = "作业上传记录-添加")
@ApiOperation(value="作业上传记录-添加", notes="作业上传记录-添加")
@RequiresPermissions("zyInfoScjl:zy_info_scjl:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ZyInfoScjl zyInfoScjl) {
zyInfoScjlService.save(zyInfoScjl);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param zyInfoScjl
* @return
*/
@AutoLog(value = "作业上传记录-编辑")
@ApiOperation(value="作业上传记录-编辑", notes="作业上传记录-编辑")
@RequiresPermissions("zyInfoScjl:zy_info_scjl:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ZyInfoScjl zyInfoScjl) {
zyInfoScjlService.updateById(zyInfoScjl);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "作业上传记录-通过id删除")
@ApiOperation(value="作业上传记录-通过id删除", notes="作业上传记录-通过id删除")
@RequiresPermissions("zyInfoScjl:zy_info_scjl:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
zyInfoScjlService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "作业上传记录-批量删除")
@ApiOperation(value="作业上传记录-批量删除", notes="作业上传记录-批量删除")
@RequiresPermissions("zyInfoScjl:zy_info_scjl:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.zyInfoScjlService.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<ZyInfoScjl> queryById(@RequestParam(name="id",required=true) String id) {
ZyInfoScjl zyInfoScjl = zyInfoScjlService.getById(id);
if(zyInfoScjl==null) {
return Result.error("未找到对应数据");
}
return Result.OK(zyInfoScjl);
}
/**
* 导出excel
*
* @param request
* @param zyInfoScjl
*/
@RequiresPermissions("zyInfoScjl:zy_info_scjl:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ZyInfoScjl zyInfoScjl) {
return super.exportXls(request, zyInfoScjl, ZyInfoScjl.class, "作业上传记录");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("zyInfoScjl:zy_info_scjl:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, ZyInfoScjl.class);
}
}

View File

@ -0,0 +1,116 @@
package org.jeecg.modules.demo.zyInfoScjl.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-03
* @Version: V1.0
*/
@Data
@TableName("zy_info_scjl")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="zy_info_scjl对象", description="作业上传记录")
public class ZyInfoScjl implements Serializable {
private static final long serialVersionUID = 1L;
/**id*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "id")
private java.lang.String id;
/**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;
/**createBy*/
@ApiModelProperty(value = "createBy")
private java.lang.String createBy;
/**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;
/**updateBy*/
@ApiModelProperty(value = "updateBy")
private java.lang.String updateBy;
/**作业id*/
@Excel(name = "作业id", width = 15)
@ApiModelProperty(value = "作业id")
private java.lang.String zyId;
/**作业名称*/
@Excel(name = "作业名称", width = 15)
@ApiModelProperty(value = "作业名称")
private java.lang.String zyName;
/**作业类型*/
@Excel(name = "作业类型", width = 15, dicCode = "zy_leixing")
@Dict(dicCode = "zy_leixing")
@ApiModelProperty(value = "作业类型")
private java.lang.String zyLeixing;
/**占比*/
@Excel(name = "占比", width = 15)
@ApiModelProperty(value = "占比")
private java.lang.String zyZb;
/**开课单位*/
@Excel(name = "开课单位", width = 15)
@ApiModelProperty(value = "开课单位")
private java.lang.String kkdw;
/**开课单位id*/
@Excel(name = "开课单位id", width = 15)
@ApiModelProperty(value = "开课单位id")
private java.lang.String kkdwid;
/**课程名称*/
@Excel(name = "课程名称", width = 15)
@ApiModelProperty(value = "课程名称")
private java.lang.String kcmc;
/**教工号*/
@Excel(name = "教工号", width = 15)
@ApiModelProperty(value = "教工号")
private java.lang.String jgh;
/**授课教师*/
@Excel(name = "授课教师", width = 15)
@ApiModelProperty(value = "授课教师")
private java.lang.String skjs;
/**授课地点*/
@Excel(name = "授课地点", width = 15)
@ApiModelProperty(value = "授课地点")
private java.lang.String skdd;
/**课程性质*/
@Excel(name = "课程性质", width = 15)
@ApiModelProperty(value = "课程性质")
private java.lang.String kcxz;
/**学年学期*/
@Excel(name = "学年学期", width = 15)
@ApiModelProperty(value = "学年学期")
private java.lang.String xnxq;
/**文件*/
@Excel(name = "文件", width = 15)
@ApiModelProperty(value = "文件")
private java.lang.String filePath;
/**学工号*/
@Excel(name = "学工号", width = 15)
@ApiModelProperty(value = "学工号")
private java.lang.String studentNo;
/**学生姓名*/
@Excel(name = "学生姓名", width = 15)
@ApiModelProperty(value = "学生姓名")
private java.lang.String studentName;
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.demo.zyInfoScjl.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.demo.zyInfoScjl.entity.ZyInfoScjl;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 作业上传记录
* @Author: jeecg-boot
* @Date: 2024-09-03
* @Version: V1.0
*/
public interface ZyInfoScjlMapper extends BaseMapper<ZyInfoScjl> {
}

View File

@ -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.zyInfoScjl.mapper.ZyInfoScjlMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.demo.zyInfoScjl.service;
import org.jeecg.modules.demo.zyInfoScjl.entity.ZyInfoScjl;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 作业上传记录
* @Author: jeecg-boot
* @Date: 2024-09-03
* @Version: V1.0
*/
public interface IZyInfoScjlService extends IService<ZyInfoScjl> {
}

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.demo.zyInfoScjl.service.impl;
import org.jeecg.modules.demo.zyInfoScjl.entity.ZyInfoScjl;
import org.jeecg.modules.demo.zyInfoScjl.mapper.ZyInfoScjlMapper;
import org.jeecg.modules.demo.zyInfoScjl.service.IZyInfoScjlService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 作业上传记录
* @Author: jeecg-boot
* @Date: 2024-09-03
* @Version: V1.0
*/
@Service
public class ZyInfoScjlServiceImpl extends ServiceImpl<ZyInfoScjlMapper, ZyInfoScjl> implements IZyInfoScjlService {
}

View File

@ -1829,4 +1829,25 @@ public class SysUserController {
public Result<?> importAppUser(HttpServletRequest request, HttpServletResponse response)throws IOException {
return sysUserService.importAppUser(request);
}
/**
* 获取用户信息
* @param jsonObject
* @return
*/
@RequestMapping(value = "/getInfoByIds", method = RequestMethod.POST)
public Result<Map<String,String>> getInfoByIds(@RequestBody JSONObject jsonObject) {
String userName = "";
String ids = jsonObject.getString("ids");
String arrIds[] = ids.split(",");
for (String id : arrIds) {
SysUser sysUser = sysUserService.getById(id);
userName += sysUser.getRealname() + ",";
}
Map<String,String> map = new HashMap<>();
map.put("userName",userName);
return Result.ok(map);
}
}

View File

@ -190,7 +190,7 @@ mybatis-plus:
table-underline: true
configuration:
# 这个配置会将执行的sql打印出来在开发或测试的时候可以用
#log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
# 返回类型为Map,显示null对应的字段
call-setters-on-nulls: true
#jeecg专用配置

View File

@ -5,6 +5,7 @@ const { createConfirm } = useMessage();
enum Api {
list = '/kcKetangbiao/kcKetangbiao/list',
checklist = '/kcKetangbiao/kcKetangbiao/checklist',
save='/kcKetangbiao/kcKetangbiao/add',
edit='/kcKetangbiao/kcKetangbiao/edit',
deleteOne = '/kcKetangbiao/kcKetangbiao/delete',
@ -29,6 +30,7 @@ export const getImportUrl = Api.importExcel;
* @param params
*/
export const list = (params) => defHttp.get({ url: Api.list, params });
export const checklist = (params) => defHttp.get({ url: Api.checklist, params });
/**
*

View File

@ -30,21 +30,11 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'zc'
},
{
title: '教职工类别',
align: "center",
dataIndex: 'jzglb'
},
{
title: '选课人数',
align: "center",
dataIndex: 'xkrs'
},
{
title: '评课人数',
align: "center",
dataIndex: 'pkrs'
},
{
title: '任务编号',
align: "center",
@ -85,66 +75,6 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'week'
},
{
title: '节次开始时间',
align: "center",
dataIndex: 'hhks'
},
{
title: '节次结束时间',
align: "center",
dataIndex: 'hhjs'
},
{
title: '单双周',
align: "center",
dataIndex: 'dsz'
},
{
title: '课堂开始日期',
align: "center",
dataIndex: 'wwks'
},
{
title: '课堂结束日期',
align: "center",
dataIndex: 'wwjs'
},
{
title: '直播方式',
align: "center",
dataIndex: 'zbfs'
},
{
title: '会议id',
align: "center",
dataIndex: 'hyid'
},
{
title: '会议号',
align: "center",
dataIndex: 'hyh'
},
{
title: '会议密码',
align: "center",
dataIndex: 'hymm'
},
{
title: '课程链接',
align: "center",
dataIndex: 'kclj'
},
{
title: '备注',
align: "center",
dataIndex: 'beizhu'
},
{
title: '直播平台',
align: "center",
dataIndex: 'zbpx'
},
{
title: '开课单位id',
align: "center",
@ -155,91 +85,6 @@ export const columns: BasicColumn[] = [
align: "center",
dataIndex: 'skrq'
},
{
title: '课程表id',
align: "center",
dataIndex: 'kechengbiaoid'
},
{
title: '听课次数',
align: "center",
dataIndex: 'tingkecishu'
},
{
title: '开课周次',
align: "center",
dataIndex: 'kkzc'
},
{
title: '第几周',
align: "center",
dataIndex: 'dijizhou'
},
{
title: '授课周次1',
align: "center",
dataIndex: 'jkzc1'
},
{
title: '是否停课',
align: "center",
dataIndex: 'sftk'
},
{
title: '停课原因',
align: "center",
dataIndex: 'tkyy'
},
{
title: '补课计划',
align: "center",
dataIndex: 'bkjh'
},
{
title: '是否出镜0-出镜1-不出镜',
align: "center",
dataIndex: 'sfcj'
},
{
title: '上课形式0-线上1-线下2-线上线下混合',
align: "center",
dataIndex: 'skxs'
},
{
title: 'kechengbiao1',
align: "center",
dataIndex: 'kechengbiao1'
},
{
title: '是否新生课 0 = 是',
align: "center",
dataIndex: 'sfxsk'
},
{
title: '教工号',
align: "center",
dataIndex: 'jgh'
},
{
title: '备注',
align: "center",
dataIndex: 'bz'
},
{
title: '状态',
align: "center",
dataIndex: 'zt'
},
{
title: '教室编号',
align: "center",
dataIndex: 'jsbh'
},
{
title: '是否删除0未删除1已删除',
align: "center",
dataIndex: 'isDelete'
},
{
title: '学年学期内部用',
align: "center",
@ -247,6 +92,16 @@ export const columns: BasicColumn[] = [
},
];
//列表数据
export const columnsCheck: BasicColumn[] = [
{
title: '课程名称',
align: "center",
dataIndex: 'kcmc'
},
];
// 高级查询数据
export const superQuerySchema = {
kcbh: {title: '课程编号',order: 0,view: 'text', type: 'string',},

View File

@ -0,0 +1,233 @@
<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="12">
<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>
<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-col>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
</template>
</BasicTable>
<!-- 表单区域 -->
<KcKetangbiaoModal ref="registerModal" @success="handleSuccess"></KcKetangbiaoModal>
</div>
</template>
<script lang="ts" name="kcKetangbiao-kcKetangbiao" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columnsCheck, superQuerySchema } from './KcKetangbiao.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl, checklist } from './KcKetangbiao.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import KcKetangbiaoModal from './components/KcKetangbiaoModal.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();
const emit = defineEmits(['ok']);
//table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
title: '课堂表',
api: checklist,
columns: columnsCheck,
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: 8,
});
const wrapperCol = reactive({
xs: 24,
sm: 12,
});
//
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: 'kcKetangbiao:kc_ketangbiao:edit',
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
},
{
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
auth: 'kcKetangbiao:kc_ketangbiao:delete',
},
];
}
function submitForm() {
console.log('🧘', rowSelection.value, selectedRowKeys.value);
emit('ok',selectedRowKeys.value);
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
defineExpose({
submitForm
});
</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>

View File

@ -0,0 +1,74 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<KcKetangbiaoCheckList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></KcKetangbiaoCheckList>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import KcKetangbiaoCheckList from './KcKetangbiaoCheckList.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;
}
/**
* 编辑
* @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(record) {
handleCancel();
emit('success',record);
}
/**
* 取消按钮回调事件
*/
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>

View File

@ -0,0 +1,28 @@
<template>
<div class="p-2">
<a-tabs v-model:activeKey="activeKey">
<a-tab-pane key="1" tab="教学任务">
<XxhbjwxtjxrwList />
</a-tab-pane>
<a-tab-pane key="2" tab="文件上传信息">
<XxhbjwxtscwjxxList />
</a-tab-pane>
<a-tab-pane key="3" tab="学生名单">
<XxhbjwxtxsmdList />
</a-tab-pane>
</a-tabs>
</div>
</template>
<script lang="ts" name="zyHuizong-zyHuizong" setup>
import { ref } from 'vue';
import XxhbjwxtjxrwList from '/@/views/bl/xxhbjwxtjxrw/XxhbjwxtjxrwList.vue'
import XxhbjwxtscwjxxList from '/@/views/bl/xxhbjwxtscwjxx/XxhbjwxtscwjxxList.vue'
import XxhbjwxtxsmdList from '/@/views/bl/xxhbjwxtxsmd/XxhbjwxtxsmdList.vue'
const activeKey = ref('1');
</script>
<style lang="less" scoped>
</style>

View File

@ -6,22 +6,22 @@ import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: 'name',
title: '姓名',
align: "center",
dataIndex: 'name'
},
{
title: 'path',
title: '文件',
align: "center",
dataIndex: 'path'
},
{
title: 'cjr',
title: '创建人',
align: "center",
dataIndex: 'cjr'
},
{
title: 'cjsj',
title: '创建时间',
align: "center",
dataIndex: 'cjsj'
},

View File

@ -6,12 +6,12 @@ import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
{
title: 'kcrwdm',
title: '课程任务代码',
align: "center",
dataIndex: 'kcrwdm'
},
{
title: 'nj',
title: '年级',
align: "center",
dataIndex: 'nj'
},

View File

@ -0,0 +1,79 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/zjSqxx/zjSqxx/list',
save='/zjSqxx/zjSqxx/add',
edit='/zjSqxx/zjSqxx/edit',
addNew='/zjSqxx/zjSqxx/addNew',
deleteOne = '/zjSqxx/zjSqxx/delete',
deleteBatch = '/zjSqxx/zjSqxx/deleteBatch',
importExcel = '/zjSqxx/zjSqxx/importExcel',
exportXls = '/zjSqxx/zjSqxx/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 });
}
export const saveNew = (params, isUpdate) => {
let url = Api.addNew;
return defHttp.post({ url: url, params }, { isTransformResponse: false });
}

View File

@ -0,0 +1,81 @@
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: 'zjNo'
},
{
title: '专家姓名',
align: "center",
dataIndex: 'zjName'
},
{
title: '授权范围',
align: "center",
dataIndex: 'sqfw_dictText'
},
{
title: '授权开始时间',
align: "center",
dataIndex: 'sqStartTime',
customRender:({text}) =>{
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
return text;
},
},
{
title: '授权结束时间',
align: "center",
dataIndex: 'sqEndTime',
customRender:({text}) =>{
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
return text;
},
},
{
title: '学年学期/毕业年份',
align: "center",
dataIndex: 'xnxq'
},
{
title: '课程所属专业',
align: "center",
dataIndex: 'zydl'
},
{
title: '课程名称',
align: "center",
dataIndex: 'kcmc'
},
{
title: '开课单位',
align: "center",
dataIndex: 'kkdw'
},
{
title: '授权状态',
align: "center",
dataIndex: 'sqzt_dictText'
},
];
// 高级查询数据
export const superQuerySchema = {
userId: {title: '用户id',order: 0,view: 'text', type: 'string',},
zjNo: {title: '教工号',order: 1,view: 'text', type: 'string',},
zjName: {title: '专家姓名',order: 2,view: 'text', type: 'string',},
sqfw: {title: '授权范围0过程考核 1智慧教师 2毕业论文 3实习实践',order: 3,view: 'list', type: 'string',dictCode: 'zj_sqfw',},
sqStartTime: {title: '授权开始时间',order: 4,view: 'date', type: 'string',},
sqEndTime: {title: '授权结束时间',order: 5,view: 'date', type: 'string',},
xnxq: {title: '学年学期/毕业年份',order: 6,view: 'list', type: 'string',dictCode: 'xnxq',},
zydl: {title: '课程所属专业',order: 7,view: 'text', type: 'string',},
kcmc: {title: '课程名称',order: 8,view: 'textarea', type: 'string',},
kkdw: {title: '开课单位',order: 9,view: 'textarea', type: 'string',},
sqzt: {title: '授权状态0正常1过期',order: 10,view: 'list', type: 'string',dictCode: 'zj_sqzt',},
};

View File

@ -0,0 +1,256 @@
<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="zjNo">
<template #label><span title="教工号">教工号</span></template>
<a-input placeholder="请输入教工号" v-model:value="queryParam.zjNo" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="zjName">
<template #label><span title="专家姓名">专家姓名</span></template>
<a-input placeholder="请输入专家姓名" v-model:value="queryParam.zjName" allow-clear ></a-input>
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<a-col :lg="6">
<a-form-item name="sqfw">
<template #label><span title="授权范围">授权范围</span></template>
<j-dict-select-tag placeholder="请选择授权范围" v-model:value="queryParam.sqfw" dictCode="zj_sqfw" allow-clear />
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="sqzt">
<template #label><span title="授权状态">授权状态</span></template>
<j-dict-select-tag placeholder="请选择授权状态" v-model:value="queryParam.sqzt" dictCode="zj_sqzt" allow-clear />
</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">
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
</BasicTable>
<!-- 表单区域 -->
<ZjSqxxModal ref="registerModal" @success="handleSuccess"></ZjSqxxModal>
<ZjSqxxEditModal ref="registerEditModal" @success="handleSuccess"></ZjSqxxEditModal>
</div>
</template>
<script lang="ts" name="zjSqxx-zjSqxx" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './ZjSqxx.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZjSqxx.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ZjSqxxModal from './components/ZjSqxxModal.vue'
import ZjSqxxEditModal from './components/ZjSqxxEditModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
const formRef = ref();
const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const registerEditModal = 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) {
registerEditModal.value.disableSubmit = false;
registerEditModal.value.edit(record);
}
/**
* 详情
*/
function handleDetail(record: Recordable) {
registerEditModal.value.disableSubmit = true;
registerEditModal.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),
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
}
]
}
/**
* 查询
*/
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>

View File

@ -0,0 +1,386 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="ZjSqxxForm">
<a-row>
<a-col :span="24">
<a-form-item label="教工号" v-bind="validateInfos.zjNo" id="ZjSqxxForm-zjNo" name="zjNo">
<a-input v-model:value="formData.zjNo" placeholder="请输入教工号" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="专家姓名" v-bind="validateInfos.zjName" id="ZjSqxxForm-zjName" name="zjName">
<a-input v-model:value="formData.zjName" placeholder="请输入专家姓名" allow-clear ></a-input>
</a-form-item>
</a-col>
<!-- 过程考核 -->
<a-col :span="24" v-if="formData.sqfw == '0'">
<a-row>
<a-col :span="24">
<a-form-item label="授权开始时间" id="ZjSqxxForm-sqStartTime" name="sqStartTime">
<a-date-picker
placeholder="请选择授权开始时间"
v-model:value="formData.sqStartTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授权结束时间" id="ZjSqxxForm-sqEndTime" name="sqEndTime">
<a-date-picker
placeholder="请选择授权结束时间"
v-model:value="formData.sqEndTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</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 />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开课单位" id="ZjSqxxForm-kkdw" name="kkdw">
<JSelectMultiple v-model:value="formData.kkdw" placeholder="请选择开课单位" :dictCode="`v_kkdw,KKYXMC,KKYXMC`"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="校内专业(大类)" v-bind="validateInfos.zydl" id="ZjSqxxForm-zydl" name="zydl">
<a-input v-model:value="formData.zydl" placeholder="请输入校内专业(大类)" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程类别" id="ZjSqxxForm-kclb" name="kclb">
<JSelectMultiple v-model:value="formData.kclb" placeholder="请选择开课单位" dictCode="kcxz"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程名称" id="ZjSqxxForm-kcmc" name="kcmc">
<a-input-group compact>
<a-input v-model:value="formData.kcmc" style="width: calc(100% - 64px)" disabled placeholder="请输入课程名称" />
<a-button type="primary" @click="handleKecheng">选择</a-button>
</a-input-group>
</a-form-item>
</a-col>
</a-row>
</a-col>
<!-- 智慧教室 -->
<a-col :span="24" v-if="formData.sqfw == '1'">
<a-row>
<a-col :span="24">
<a-form-item label="授权开始时间" id="ZjSqxxForm-sqStartTime" name="sqStartTime">
<a-date-picker
placeholder="请选择授权开始时间"
v-model:value="formData.sqStartTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授权结束时间" id="ZjSqxxForm-sqEndTime" name="sqEndTime">
<a-date-picker
placeholder="请选择授权结束时间"
v-model:value="formData.sqEndTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</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 />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开课单位" id="ZjSqxxForm-kkdw" name="kkdw">
<JSelectMultiple v-model:value="formData.kkdw" placeholder="请选择开课单位" :dictCode="`v_kkdw,KKYXMC,KKYXMC`"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程名称" id="ZjSqxxForm-kcmc" name="kcmc">
<a-input-group compact>
<a-input v-model:value="formData.kcmc" style="width: calc(100% - 64px)" disabled placeholder="请输入课程名称" />
<a-button type="primary" @click="handleKecheng">选择</a-button>
</a-input-group>
</a-form-item>
</a-col>
</a-row>
</a-col>
<!-- 毕业论文 -->
<a-col :span="24" v-if="formData.sqfw == '2'">
<a-row>
<a-col :span="24">
<a-form-item label="授权开始时间" id="ZjSqxxForm-sqStartTime" name="sqStartTime">
<a-date-picker
placeholder="请选择授权开始时间"
v-model:value="formData.sqStartTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授权结束时间" id="ZjSqxxForm-sqEndTime" name="sqEndTime">
<a-date-picker
placeholder="请选择授权结束时间"
v-model:value="formData.sqEndTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</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="xnxq" placeholder="请选择毕业年份" allow-clear />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="所属院系名称" id="ZjSqxxForm-kkdw" name="kkdw">
<JSelectMultiple v-model:value="formData.kkdw" placeholder="请选择开课单位" :dictCode="`v_kkdw,KKYXMC,KKYXMC`"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="所属校内专业(大类)名称" v-bind="validateInfos.zydl" id="ZjSqxxForm-zydl" name="zydl">
<a-input v-model:value="formData.zydl" placeholder="请输入所属校内专业(大类)名称" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="毕业论文(设计)类别" id="ZjSqxxForm-kcmc" name="kcmc">
<JSelectMultiple v-model:value="formData.kclb" placeholder="请选择开课单位" dictCode="kcxz"></JSelectMultiple>
</a-form-item>
</a-col>
</a-row>
</a-col>
<!-- 实习实践 -->
<a-col :span="24" v-if="formData.sqfw == '3'">
<a-row>
<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 />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授权开始时间" id="ZjSqxxForm-sqStartTime" name="sqStartTime">
<a-date-picker
placeholder="请选择授权开始时间"
v-model:value="formData.sqStartTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授权结束时间" id="ZjSqxxForm-sqEndTime" name="sqEndTime">
<a-date-picker
placeholder="请选择授权结束时间"
v-model:value="formData.sqEndTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开课单位" id="ZjSqxxForm-kkdw" name="kkdw">
<JSelectMultiple v-model:value="formData.kkdw" placeholder="请选择开课单位" :dictCode="`v_kkdw,KKYXMC,KKYXMC`"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="校内专业(大类)" v-bind="validateInfos.zydl" id="ZjSqxxForm-zydl" name="zydl">
<a-input v-model:value="formData.zydl" placeholder="请输入校内专业(大类)" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程类别" id="ZjSqxxForm-kclb" name="kclb">
<JSelectMultiple v-model:value="formData.kclb" placeholder="请选择开课单位" dictCode="kcxz"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程名称" id="ZjSqxxForm-kcmc" name="kcmc">
<a-input-group compact>
<a-input v-model:value="formData.kcmc" style="width: calc(100% - 64px)" disabled placeholder="请输入课程名称" />
<a-button type="primary" @click="handleKecheng">选择</a-button>
</a-input-group>
</a-form-item>
</a-col>
</a-row>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
<KcKetangbiaoCheckModal ref="KcKetangbiaoCheckModalPage" @success="ketangSuccess"></KcKetangbiaoCheckModal>
</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 '../ZjSqxx.api';
import { Form } from 'ant-design-vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import KcKetangbiaoCheckModal from '/@/views/bl/kcKetangbiao/KcKetangbiaoCheckModal.vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({})},
formBpm: { type: Boolean, default: true }
});
const formRef = ref();
const KcKetangbiaoCheckModalPage = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
userId: '',
zjNo: '',
zjName: '',
sqfw: '',
sqStartTime: '',
sqEndTime: '',
xnxq: '',
zydl: '',
kcmc: '',
kkdw: '',
sqzt: '',
});
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 checkIndex = ref<number>(-1);
//
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 handleKecheng(index) {
checkIndex.value = index;
KcKetangbiaoCheckModalPage.value.disabled = false;
KcKetangbiaoCheckModalPage.value.add();
}
/**
* 课程回显
* @param record
*/
function ketangSuccess(record) {
console.log('🙍', record);
var kcmcStr = record.map((item) => item).join(',');
formData.kcmc = kcmcStr;
}
/**
* 新增
*/
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>

View File

@ -0,0 +1,77 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ZjSqxxForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZjSqxxForm>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ZjSqxxForm from './ZjSqxxEditForm.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>

View File

@ -0,0 +1,436 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="ZjSqxxForm">
<a-row>
<a-col :span="24">
<a-form-item label="用户" v-bind="validateInfos.userName" id="ZjSqxxForm-userId" name="userName">
<a-input v-model:value="formData.userName" placeholder="请选择用户" allow-clear style="width: 60%" disabled></a-input>
<a-input v-model:value="formData.userId" placeholder="请选择用户" allow-clear hidden></a-input>
<a-button type="primary" @click="handleSelect" style="margin-left: 10px"> 选择用户</a-button>
<a-button type="primary" @click="handleShouquan" style="margin-left: 10px"> 授权</a-button>
</a-form-item>
</a-col>
</a-row>
<a-row v-for="(item, index) in sqDataList" style="border: 1px solid #ccc; padding: 10px; margin-bottom: 10px" :key="index">
<a-col :span="24">
<a-form-item label="授权范围" id="ZjSqxxForm-sqfw" name="sqfw">
<j-dict-select-tag v-model:value="item.sqfw" dictCode="zj_sqfw" placeholder="请选择授权范围" allow-clear />
</a-form-item>
</a-col>
<!-- 过程考核 -->
<a-col :span="24" v-if="item.sqfw == '0'">
<a-row>
<a-col :span="24">
<a-form-item label="授权开始时间" id="ZjSqxxForm-sqStartTime" name="sqStartTime">
<a-date-picker
placeholder="请选择授权开始时间"
v-model:value="item.sqStartTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授权结束时间" id="ZjSqxxForm-sqEndTime" name="sqEndTime">
<a-date-picker
placeholder="请选择授权结束时间"
v-model:value="item.sqEndTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="学年学期" id="ZjSqxxForm-xnxq" name="xnxq">
<j-dict-select-tag v-model:value="item.xnxq" dictCode="xqxn" placeholder="请选择学年学期" allow-clear />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开课单位" id="ZjSqxxForm-kkdw" name="kkdw">
<JSelectMultiple v-model:value="item.kkdw" placeholder="请选择开课单位" :dictCode="`v_kkdw,KKYXMC,KKYXMC`"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="校内专业(大类)" v-bind="validateInfos.zydl" id="ZjSqxxForm-zydl" name="zydl">
<a-input v-model:value="item.zydl" placeholder="请输入校内专业(大类)" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程类别" id="ZjSqxxForm-kclb" name="kclb">
<JSelectMultiple v-model:value="item.kclb" placeholder="请选择开课单位" dictCode="kcxz"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程名称" id="ZjSqxxForm-kcmc" name="kcmc">
<a-input-group compact>
<a-input v-model:value="item.kcmc" style="width: calc(100% - 64px)" disabled placeholder="请输入课程名称" />
<a-button type="primary" @click="handleKecheng(index)">选择</a-button>
</a-input-group>
</a-form-item>
</a-col>
</a-row>
</a-col>
<!-- 智慧教室 -->
<a-col :span="24" v-if="item.sqfw == '1'">
<a-row>
<a-col :span="24">
<a-form-item label="授权开始时间" id="ZjSqxxForm-sqStartTime" name="sqStartTime">
<a-date-picker
placeholder="请选择授权开始时间"
v-model:value="item.sqStartTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授权结束时间" id="ZjSqxxForm-sqEndTime" name="sqEndTime">
<a-date-picker
placeholder="请选择授权结束时间"
v-model:value="item.sqEndTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="学年学期" id="ZjSqxxForm-xnxq" name="xnxq">
<j-dict-select-tag v-model:value="item.xnxq" dictCode="xqxn" placeholder="请选择学年学期" allow-clear />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开课单位" id="ZjSqxxForm-kkdw" name="kkdw">
<JSelectMultiple v-model:value="item.kkdw" placeholder="请选择开课单位" :dictCode="`v_kkdw,KKYXMC,KKYXMC`"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程名称" id="ZjSqxxForm-kcmc" name="kcmc">
<a-input-group compact>
<a-input v-model:value="item.kcmc" style="width: calc(100% - 64px)" disabled placeholder="请输入课程名称" />
<a-button type="primary" @click="handleKecheng(index)">选择</a-button>
</a-input-group>
</a-form-item>
</a-col>
</a-row>
</a-col>
<!-- 毕业论文 -->
<a-col :span="24" v-if="item.sqfw == '2'">
<a-row>
<a-col :span="24">
<a-form-item label="授权开始时间" id="ZjSqxxForm-sqStartTime" name="sqStartTime">
<a-date-picker
placeholder="请选择授权开始时间"
v-model:value="item.sqStartTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授权结束时间" id="ZjSqxxForm-sqEndTime" name="sqEndTime">
<a-date-picker
placeholder="请选择授权结束时间"
v-model:value="item.sqEndTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="毕业年份" id="ZjSqxxForm-xnxq" name="xnxq">
<j-dict-select-tag v-model:value="item.xnxq" dictCode="xnxq" placeholder="请选择毕业年份" allow-clear />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="所属院系名称" id="ZjSqxxForm-kkdw" name="kkdw">
<JSelectMultiple v-model:value="item.kkdw" placeholder="请选择开课单位" :dictCode="`v_kkdw,KKYXMC,KKYXMC`"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="所属校内专业(大类)名称" v-bind="validateInfos.zydl" id="ZjSqxxForm-zydl" name="zydl">
<a-input v-model:value="item.zydl" placeholder="请输入所属校内专业(大类)名称" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="毕业论文(设计)类别" id="ZjSqxxForm-kcmc" name="kcmc">
<JSelectMultiple v-model:value="item.kclb" placeholder="请选择开课单位" dictCode="kcxz"></JSelectMultiple>
</a-form-item>
</a-col>
</a-row>
</a-col>
<!-- 实习实践 -->
<a-col :span="24" v-if="item.sqfw == '3'">
<a-row>
<a-col :span="24">
<a-form-item label="学年学期" id="ZjSqxxForm-xnxq" name="xnxq">
<j-dict-select-tag v-model:value="item.xnxq" dictCode="xqxn" placeholder="请选择学年学期" allow-clear />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授权开始时间" id="ZjSqxxForm-sqStartTime" name="sqStartTime">
<a-date-picker
placeholder="请选择授权开始时间"
v-model:value="item.sqStartTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授权结束时间" id="ZjSqxxForm-sqEndTime" name="sqEndTime">
<a-date-picker
placeholder="请选择授权结束时间"
v-model:value="item.sqEndTime"
value-format="YYYY-MM-DD"
style="width: 100%"
allow-clear
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开课单位" id="ZjSqxxForm-kkdw" name="kkdw">
<JSelectMultiple v-model:value="item.kkdw" placeholder="请选择开课单位" :dictCode="`v_kkdw,KKYXMC,KKYXMC`"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="校内专业(大类)" v-bind="validateInfos.zydl" id="ZjSqxxForm-zydl" name="zydl">
<a-input v-model:value="item.zydl" placeholder="请输入校内专业(大类)" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程类别" id="ZjSqxxForm-kclb" name="kclb">
<JSelectMultiple v-model:value="item.kclb" placeholder="请选择开课单位" dictCode="kcxz"></JSelectMultiple>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程名称" id="ZjSqxxForm-kcmc" name="kcmc">
<a-input-group compact>
<a-input v-model:value="item.kcmc" style="width: calc(100% - 64px)" disabled placeholder="请输入课程名称" />
<a-button type="primary" @click="handleKecheng(index)">选择</a-button>
</a-input-group>
</a-form-item>
</a-col>
</a-row>
</a-col>
</a-row>
</a-form>
</template>
</JFormContainer>
<!--用户选择弹窗-->
<UseSelectModal @register="registerModal" @select="selectOk" />
<KcKetangbiaoCheckModal ref="KcKetangbiaoCheckModalPage" @success="ketangSuccess"></KcKetangbiaoCheckModal>
</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 { saveNew } from '../ZjSqxx.api';
import { Form } from 'ant-design-vue';
import { useModal } from '/src/components/Modal';
import UseSelectModal from '/@/views/system/role/components/UseSelectModal.vue';
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
import KcKetangbiaoCheckModal from '/@/views/bl/kcKetangbiao/KcKetangbiaoCheckModal.vue';
const props = defineProps({
formDisabled: { type: Boolean, default: false },
formData: { type: Object, default: () => ({}) },
formBpm: { type: Boolean, default: true },
});
const formRef = ref();
const KcKetangbiaoCheckModalPage = ref();
const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({
id: '',
userId: '',
userName: '',
zjNo: '',
zjName: '',
sqfw: '',
sqStartTime: '',
sqEndTime: '',
xnxq: '',
zydl: '',
kcmc: '',
kkdw: '',
sqzt: '',
});
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 sqDataList = ref<any>([]);
const checkIndex = ref<number>(-1);
//
const validatorRules = reactive({});
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
//drawer
const [registerModal, { openModal }] = useModal();
//
const disabled = computed(() => {
if (props.formBpm === true) {
if (props.formData.disabled === false) {
return false;
} else {
return true;
}
}
return props.formDisabled;
});
/**
* 新增
*/
function add() {
edit({
zjNo: '',
zjName: '',
sqfw: '',
sqStartTime: '',
sqEndTime: '',
xnxq: '',
zydl: '',
kcmc: '',
kkdw: '',
sqzt: '',
});
}
/**
* 编辑
*/
function edit(record) {
nextTick(() => {
resetFields();
const tmpData = {};
Object.keys(formData).forEach((key) => {
if (record.hasOwnProperty(key)) {
tmpData[key] = record[key];
}
});
//
Object.assign(formData, tmpData);
});
}
/**
* 选择课程
*/
function handleKecheng(index) {
checkIndex.value = index;
KcKetangbiaoCheckModalPage.value.disabled = false;
KcKetangbiaoCheckModalPage.value.add();
}
/**
* 课程回显
* @param record
*/
function ketangSuccess(record) {
console.log('🙍', record);
var kcmcStr = record.map((item) => item).join(',');
sqDataList.value[checkIndex.value].kcmc = kcmcStr;
}
/**
* 授权新增列表
*/
function handleShouquan() {
var list = sqDataList.value;
list.push({});
}
/**
* 选择已有用户
*/
function handleSelect() {
openModal(true);
}
/**
* 添加已有用户
*/
async function selectOk(val) {
console.log('👯', val);
defHttp.post({ url: '/sys/user/getInfoByIds', params: { ids: val.join(',') } }).then((res) => {
console.log('👱‍♀️', res);
formData.userId = val.join(',');
formData.userName = res.userName;
});
// await addUserRole({ roleId: roleId.value, userIdList: val }, reload);
}
/**
* 提交数据
*/
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(',');
}
}
}
model.sqDataList = sqDataList.value;
console.log('💋', model);
await saveNew(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>

View File

@ -0,0 +1,77 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ZjSqxxForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZjSqxxForm>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ZjSqxxForm from './ZjSqxxForm.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>

View File

@ -7,6 +7,9 @@
<a-tab-pane key="2" tab="详细信息">
<ZyHuizongXiangxiList />
</a-tab-pane>
<a-tab-pane key="3" tab="上传记录">
<ZyInfoScjlList />
</a-tab-pane>
</a-tabs>
</div>
</template>
@ -15,6 +18,7 @@
import { ref } from 'vue';
import ZyHuizongList from '/@/views/bl/zyHuizong/ZyHuizongList.vue'
import ZyHuizongXiangxiList from '/@/views/bl/zyHuizongXiangxi/ZyHuizongXiangxiList.vue'
import ZyInfoScjlList from '/@/views/bl/zyInfoScjl/ZyInfoScjlList.vue'
const activeKey = ref('1');
</script>

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/zyInfoScjl/zyInfoScjl/list',
save='/zyInfoScjl/zyInfoScjl/add',
edit='/zyInfoScjl/zyInfoScjl/edit',
deleteOne = '/zyInfoScjl/zyInfoScjl/delete',
deleteBatch = '/zyInfoScjl/zyInfoScjl/deleteBatch',
importExcel = '/zyInfoScjl/zyInfoScjl/importExcel',
exportXls = '/zyInfoScjl/zyInfoScjl/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 });
}

View File

@ -0,0 +1,90 @@
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: 'zyName'
},
{
title: '作业类型',
align: "center",
dataIndex: 'zyLeixing_dictText'
},
{
title: '占比',
align: "center",
dataIndex: 'zyZb'
},
{
title: '开课单位',
align: "center",
dataIndex: 'kkdw'
},
{
title: '课程名称',
align: "center",
dataIndex: 'kcmc'
},
{
title: '教工号',
align: "center",
dataIndex: 'jgh'
},
{
title: '授课教师',
align: "center",
dataIndex: 'skjs'
},
{
title: '授课地点',
align: "center",
dataIndex: 'skdd'
},
{
title: '课程性质',
align: "center",
dataIndex: 'kcxz'
},
{
title: '学年学期',
align: "center",
dataIndex: 'xnxq'
},
{
title: '文件',
align: "center",
dataIndex: 'filePath'
},
{
title: '学工号',
align: "center",
dataIndex: 'studentNo'
},
{
title: '学生姓名',
align: "center",
dataIndex: 'studentName'
},
];
// 高级查询数据
export const superQuerySchema = {
zyName: {title: '作业名称',order: 0,view: 'text', type: 'string',},
zyLeixing: {title: '作业类型',order: 1,view: 'list', type: 'string',dictCode: 'zy_leixing',},
zyZb: {title: '占比',order: 2,view: 'text', type: 'string',},
kkdw: {title: '开课单位',order: 3,view: 'text', type: 'string',},
kcmc: {title: '课程名称',order: 4,view: 'text', type: 'string',},
jgh: {title: '教工号',order: 5,view: 'text', type: 'string',},
skjs: {title: '授课教师',order: 6,view: 'text', type: 'string',},
skdd: {title: '授课地点',order: 7,view: 'text', type: 'string',},
kcxz: {title: '课程性质',order: 8,view: 'text', type: 'string',},
xnxq: {title: '学年学期',order: 9,view: 'text', type: 'string',},
filePath: {title: '文件',order: 10,view: 'textarea', type: 'string',},
studentNo: {title: '学工号',order: 11,view: 'text', type: 'string',},
studentName: {title: '学生姓名',order: 12,view: 'text', type: 'string',},
};

View File

@ -0,0 +1,281 @@
<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="zyName">
<template #label><span title="作业名称">作业名称</span></template>
<a-input placeholder="请输入作业名称" v-model:value="queryParam.zyName" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="zyLeixing">
<template #label><span title="作业类型">作业类型</span></template>
<j-dict-select-tag placeholder="请选择作业类型" v-model:value="queryParam.zyLeixing" dictCode="zy_leixing" allow-clear />
</a-form-item>
</a-col>
<template v-if="toggleSearchStatus">
<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="kcmc">
<template #label><span title="课程名称">课程名称</span></template>
<a-input placeholder="请输入课程名称" v-model:value="queryParam.kcmc" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="jgh">
<template #label><span title="教工号">教工号</span></template>
<a-input placeholder="请输入教工号" v-model:value="queryParam.jgh" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="skjs">
<template #label><span title="授课教师">授课教师</span></template>
<a-input placeholder="请输入授课教师" v-model:value="queryParam.skjs" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="kcxz">
<template #label><span title="课程性质">课程性质</span></template>
<a-input placeholder="请输入课程性质" v-model:value="queryParam.kcxz" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="studentNo">
<template #label><span title="学工号">学工号</span></template>
<a-input placeholder="请输入学工号" v-model:value="queryParam.studentNo" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :lg="6">
<a-form-item name="studentName">
<template #label><span title="学生姓名">学生姓名</span></template>
<a-input placeholder="请输入学生姓名" v-model:value="queryParam.studentName" 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" >
<!--插槽:table标题-->
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template>
</BasicTable>
<!-- 表单区域 -->
<ZyInfoScjlModal ref="registerModal" @success="handleSuccess"></ZyInfoScjlModal>
</div>
</template>
<script lang="ts" name="zyInfoScjl-zyInfoScjl" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './ZyInfoScjl.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ZyInfoScjl.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ZyInfoScjlModal from './components/ZyInfoScjlModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.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({
tableProps: {
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: 'zyInfoScjl:zy_info_scjl:edit'
},
];
}
/**
* 下拉操作栏
*/
function getDropDownAction(record) {
return [
{
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
auth: 'zyInfoScjl:zy_info_scjl: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>

View File

@ -0,0 +1,218 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="ZyInfoScjlForm">
<a-row>
<a-col :span="24">
<a-form-item label="作业名称" v-bind="validateInfos.zyName" id="ZyInfoScjlForm-zyName" name="zyName">
<a-input v-model:value="formData.zyName" placeholder="请输入作业名称" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="作业类型" v-bind="validateInfos.zyLeixing" id="ZyInfoScjlForm-zyLeixing" name="zyLeixing">
<j-dict-select-tag v-model:value="formData.zyLeixing" dictCode="zy_leixing" placeholder="请选择作业类型" allow-clear />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="占比" v-bind="validateInfos.zyZb" id="ZyInfoScjlForm-zyZb" name="zyZb">
<a-input v-model:value="formData.zyZb" placeholder="请输入占比" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="开课单位" v-bind="validateInfos.kkdw" id="ZyInfoScjlForm-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.kcmc" id="ZyInfoScjlForm-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.jgh" id="ZyInfoScjlForm-jgh" name="jgh">
<a-input v-model:value="formData.jgh" placeholder="请输入教工号" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授课教师" v-bind="validateInfos.skjs" id="ZyInfoScjlForm-skjs" name="skjs">
<a-input v-model:value="formData.skjs" placeholder="请输入授课教师" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="授课地点" v-bind="validateInfos.skdd" id="ZyInfoScjlForm-skdd" name="skdd">
<a-input v-model:value="formData.skdd" placeholder="请输入授课地点" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="课程性质" v-bind="validateInfos.kcxz" id="ZyInfoScjlForm-kcxz" name="kcxz">
<a-input v-model:value="formData.kcxz" placeholder="请输入课程性质" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="学年学期" v-bind="validateInfos.xnxq" id="ZyInfoScjlForm-xnxq" name="xnxq">
<a-input v-model:value="formData.xnxq" placeholder="请输入学年学期" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="文件" v-bind="validateInfos.filePath" id="ZyInfoScjlForm-filePath" name="filePath">
<a-textarea v-model:value="formData.filePath" :rows="4" placeholder="请输入文件" />
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="学工号" v-bind="validateInfos.studentNo" id="ZyInfoScjlForm-studentNo" name="studentNo">
<a-input v-model:value="formData.studentNo" placeholder="请输入学工号" allow-clear ></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="学生姓名" v-bind="validateInfos.studentName" id="ZyInfoScjlForm-studentName" name="studentName">
<a-input v-model:value="formData.studentName" 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 '../ZyInfoScjl.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: '',
zyName: '',
zyLeixing: '',
zyZb: '',
kkdw: '',
kcmc: '',
jgh: '',
skjs: '',
skdd: '',
kcxz: '',
xnxq: '',
filePath: '',
studentNo: '',
studentName: '',
});
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>

View File

@ -0,0 +1,77 @@
<template>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<ZyInfoScjlForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ZyInfoScjlForm>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ZyInfoScjlForm from './ZyInfoScjlForm.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>

View File

@ -0,0 +1,59 @@
<template>
<BasicModal v-bind="$attrs" @register="registerModal" title="用户选择列表" width="1000px" @ok="handleSubmit" destroyOnClose>
<BasicTable @register="registerTable" :rowSelection="rowSelection" />
</BasicModal>
</template>
<script lang="ts" setup>
import { ref, unref, toRaw } from 'vue';
import { BasicModal, useModalInner } from '/src/components/Modal';
import { BasicTable, useTable, TableAction } from '/src/components/Table';
import { userColumns, searchUserFormSchema } from '../role.data';
import { list } from '../../user/user.api';
// Emits
const emit = defineEmits(['select', 'register']);
const checkedKeys = ref<Array<string | number>>([]);
const [registerModal, { setModalProps, closeModal }] = useModalInner();
//table
const [registerTable, { reload }] = useTable({
api: list,
rowKey: 'id',
columns: userColumns,
formConfig: {
labelWidth: 60,
schemas: searchUserFormSchema,
baseRowStyle: { maxHeight: '20px' },
autoSubmitOnEnter: true,
},
striped: true,
useSearchForm: true,
showTableSetting: false,
bordered: true,
showIndexColumn: false,
canResize: false,
});
/**
* 选择列配置
*/
const rowSelection = {
type: 'checkbox',
columnWidth: 50,
selectedRowKeys: checkedKeys,
onChange: onSelectChange,
};
/**
* 选择事件
*/
function onSelectChange(selectedRowKeys: (string | number)[]) {
checkedKeys.value = selectedRowKeys;
}
//
function handleSubmit() {
setModalProps({ confirmLoading: true });
//
closeModal();
//
emit('select', toRaw(unref(checkedKeys)));
setModalProps({ confirmLoading: false });
}
</script>