按照学期打包下载功能
This commit is contained in:
parent
5ae64cc5fd
commit
d3e45d82e0
|
@ -0,0 +1,176 @@
|
|||
package org.jeecg.modules.demo.downKccldbxz.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.downKccldbxz.entity.DownKccldbxz;
|
||||
import org.jeecg.modules.demo.downKccldbxz.service.IDownKccldbxzService;
|
||||
|
||||
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: 2025-03-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="课程材料打包下载")
|
||||
@RestController
|
||||
@RequestMapping("/downKccldbxz/downKccldbxz")
|
||||
@Slf4j
|
||||
public class DownKccldbxzController extends JeecgController<DownKccldbxz, IDownKccldbxzService> {
|
||||
@Autowired
|
||||
private IDownKccldbxzService downKccldbxzService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param downKccldbxz
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "课程材料打包下载-分页列表查询")
|
||||
@ApiOperation(value="课程材料打包下载-分页列表查询", notes="课程材料打包下载-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<DownKccldbxz>> queryPageList(DownKccldbxz downKccldbxz,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<DownKccldbxz> queryWrapper = QueryGenerator.initQueryWrapper(downKccldbxz, req.getParameterMap());
|
||||
Page<DownKccldbxz> page = new Page<DownKccldbxz>(pageNo, pageSize);
|
||||
IPage<DownKccldbxz> pageList = downKccldbxzService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param downKccldbxz
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程材料打包下载-添加")
|
||||
@ApiOperation(value="课程材料打包下载-添加", notes="课程材料打包下载-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody DownKccldbxz downKccldbxz) {
|
||||
downKccldbxzService.saveDownload(downKccldbxz);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param downKccldbxz
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程材料打包下载-编辑")
|
||||
@ApiOperation(value="课程材料打包下载-编辑", notes="课程材料打包下载-编辑")
|
||||
@RequiresPermissions("downKccldbxz:down_kccldbxz:edit")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody DownKccldbxz downKccldbxz) {
|
||||
downKccldbxzService.updateById(downKccldbxz);
|
||||
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) {
|
||||
downKccldbxzService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "课程材料打包下载-批量删除")
|
||||
@ApiOperation(value="课程材料打包下载-批量删除", notes="课程材料打包下载-批量删除")
|
||||
@RequiresPermissions("downKccldbxz:down_kccldbxz:deleteBatch")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.downKccldbxzService.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<DownKccldbxz> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
DownKccldbxz downKccldbxz = downKccldbxzService.getById(id);
|
||||
if(downKccldbxz==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(downKccldbxz);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param downKccldbxz
|
||||
*/
|
||||
@RequiresPermissions("downKccldbxz:down_kccldbxz:exportXls")
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, DownKccldbxz downKccldbxz) {
|
||||
return super.exportXls(request, downKccldbxz, DownKccldbxz.class, "课程材料打包下载");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("downKccldbxz:down_kccldbxz:importExcel")
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, DownKccldbxz.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
package org.jeecg.modules.demo.downKccldbxz.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
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: 2025-03-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("down_kccldbxz")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="down_kccldbxz对象", description="课程材料打包下载")
|
||||
public class DownKccldbxz 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;
|
||||
/**条件*/
|
||||
@Excel(name = "条件", width = 15)
|
||||
@ApiModelProperty(value = "条件")
|
||||
private java.lang.String title;
|
||||
/**学年学期*/
|
||||
@Excel(name = "学年学期", width = 15)
|
||||
@ApiModelProperty(value = "学年学期")
|
||||
private java.lang.String xnxq;
|
||||
/**状态*/
|
||||
@Excel(name = "状态", width = 15, dicCode = "down_status")
|
||||
@Dict(dicCode = "down_status")
|
||||
@ApiModelProperty(value = "状态")
|
||||
private java.lang.String status;
|
||||
/**附件地址*/
|
||||
@Excel(name = "附件地址", width = 15)
|
||||
@ApiModelProperty(value = "附件地址")
|
||||
private java.lang.String filePath;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String kkyxmc;//开课院校名称
|
||||
|
||||
@TableField(exist = false)
|
||||
private String kcmc;//课程名称
|
||||
|
||||
@TableField(exist = false)
|
||||
private String rkjs;//任课教师
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.demo.downKccldbxz.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.demo.downKccldbxz.entity.DownKccldbxz;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: 课程材料打包下载
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface DownKccldbxzMapper extends BaseMapper<DownKccldbxz> {
|
||||
|
||||
}
|
|
@ -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.downKccldbxz.mapper.DownKccldbxzMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,15 @@
|
|||
package org.jeecg.modules.demo.downKccldbxz.service;
|
||||
|
||||
import org.jeecg.modules.demo.downKccldbxz.entity.DownKccldbxz;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: 课程材料打包下载
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IDownKccldbxzService extends IService<DownKccldbxz> {
|
||||
|
||||
void saveDownload(DownKccldbxz downKccldbxz);
|
||||
}
|
|
@ -0,0 +1,194 @@
|
|||
package org.jeecg.modules.demo.downKccldbxz.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jeecg.modules.demo.downKccldbxz.entity.DownKccldbxz;
|
||||
import org.jeecg.modules.demo.downKccldbxz.mapper.DownKccldbxzMapper;
|
||||
import org.jeecg.modules.demo.downKccldbxz.service.IDownKccldbxzService;
|
||||
import org.jeecg.modules.demo.utils.ZipFiles;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.entity.Xxhbjwxtjxrw;
|
||||
import org.jeecg.modules.demo.xxhbjwxtjxrw.service.IXxhbjwxtjxrwService;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.entity.Xxhbjwxtscwjxx;
|
||||
import org.jeecg.modules.demo.xxhbjwxtscwjxx.service.IXxhbjwxtscwjxxService;
|
||||
import org.jeecg.modules.utils.SFTPUtil;
|
||||
import org.jeecg.modules.utils.SftpConfig;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipOutputStream;
|
||||
|
||||
/**
|
||||
* @Description: 课程材料打包下载
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-03-24
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class DownKccldbxzServiceImpl extends ServiceImpl<DownKccldbxzMapper, DownKccldbxz> implements IDownKccldbxzService {
|
||||
|
||||
@Autowired
|
||||
private IXxhbjwxtjxrwService xxhbjwxtjxrwService;
|
||||
|
||||
@Autowired
|
||||
private IXxhbjwxtscwjxxService xxhbjwxtscwjxxService;
|
||||
|
||||
@Value(value = "${jeecg.path.upload}")
|
||||
private String downloadpath;
|
||||
|
||||
@Autowired
|
||||
SftpConfig sftpConfig;
|
||||
@Override
|
||||
public void saveDownload(DownKccldbxz downKccldbxz) {
|
||||
downKccldbxz.setStatus("1");
|
||||
String title = downKccldbxz.getXnxq()+"-";
|
||||
if(StringUtils.isNotBlank(downKccldbxz.getXnxq())){
|
||||
title = downKccldbxz.getXnxq()+"-";
|
||||
}
|
||||
if (StringUtils.isNotBlank(downKccldbxz.getKkyxmc())){
|
||||
title = title + downKccldbxz.getKkyxmc()+"-";
|
||||
}
|
||||
if (StringUtils.isNotBlank(downKccldbxz.getKcmc())){
|
||||
title = title + downKccldbxz.getKcmc()+"-";
|
||||
}
|
||||
if (StringUtils.isNotBlank(downKccldbxz.getRkjs())){
|
||||
title = title + downKccldbxz.getRkjs()+"-";
|
||||
}
|
||||
if (StringUtils.isBlank(title)){
|
||||
title = "整体课程材料打包-";
|
||||
}
|
||||
//6位随机数
|
||||
String random = String.valueOf((int)((Math.random()*9+1)*100000));
|
||||
title = title + random;
|
||||
downKccldbxz.setTitle(title);
|
||||
baseMapper.insert(downKccldbxz);
|
||||
|
||||
|
||||
QueryWrapper<Xxhbjwxtjxrw> xxhbjwxtjxrwQueryWrapper = new QueryWrapper<>();
|
||||
xxhbjwxtjxrwQueryWrapper.eq("file_shztmc","审核通过");
|
||||
xxhbjwxtjxrwQueryWrapper.eq("xnxqmc",downKccldbxz.getXnxq());
|
||||
xxhbjwxtjxrwQueryWrapper.eq(StringUtils.isNotBlank(downKccldbxz.getKkyxmc()),"kkyxmc",downKccldbxz.getKkyxmc());
|
||||
xxhbjwxtjxrwQueryWrapper.like(StringUtils.isNotBlank(downKccldbxz.getKcmc()),"kcmc",downKccldbxz.getKcmc());
|
||||
xxhbjwxtjxrwQueryWrapper.like(StringUtils.isNotBlank(downKccldbxz.getRkjs()),"teaxm",downKccldbxz.getRkjs());
|
||||
List<Xxhbjwxtjxrw> list = xxhbjwxtjxrwService.list(xxhbjwxtjxrwQueryWrapper);
|
||||
|
||||
String finalTitle = title;
|
||||
|
||||
final String[] sfysj = {"0"};//是否有数据 0没数据 1有数据
|
||||
list.forEach(item->{
|
||||
|
||||
QueryWrapper<Xxhbjwxtscwjxx> xxhbjwxtscwQueryWrapper = new QueryWrapper<>();
|
||||
xxhbjwxtscwQueryWrapper.eq("kcrwdm",item.getKcrwdm());
|
||||
String type = "bl0-pfbz,bl0-zyyq,bl1-pfbz,bl0-zyyq,bl2-pfbz,bl0-zyyq,bl3-pfbz,bl0-zyyq,bl4-pfbz,bl0-zyyq,bl5-pfbz,bl0-zyyq,qt-01,qt-02,qt-03,qt-04,qt-05,qt-06,qt-07,qt-08";
|
||||
xxhbjwxtscwQueryWrapper.in("type",type.split(","));
|
||||
List<Xxhbjwxtscwjxx> list2 = xxhbjwxtscwjxxService.list(xxhbjwxtscwQueryWrapper);
|
||||
list2.forEach(item2->{
|
||||
sfysj[0] = "1";
|
||||
String imgPath = item2.getPath();
|
||||
String path = "downloadTemp/"+ finalTitle+"/"+item.getKcmc()+"/"+item.getTeaxm();
|
||||
|
||||
|
||||
|
||||
Map<String,String> map = SFTPUtil.download(sftpConfig,imgPath,getDownloadPath(path));
|
||||
|
||||
String localFilePath = map.get("fileName");
|
||||
System.out.println("------------------------>" + localFilePath);
|
||||
});
|
||||
});
|
||||
if(sfysj[0].equals("0")){
|
||||
downKccldbxz.setStatus("3");
|
||||
baseMapper.updateById(downKccldbxz);
|
||||
return;
|
||||
}
|
||||
|
||||
// 指定要打包的文件夹路径
|
||||
String sourceFolderPath = getDownloadPath("downloadTemp/"+title);
|
||||
// 指定输出zip文件的路径
|
||||
String outputZipPath = getDownloadPath("downloadTemp/"+title+".zip");
|
||||
|
||||
// 调用方法进行打包
|
||||
zipFolder(sourceFolderPath, outputZipPath);
|
||||
|
||||
downKccldbxz.setFilePath("downloadTemp/"+title+".zip");
|
||||
downKccldbxz.setStatus("2");
|
||||
baseMapper.updateById(downKccldbxz);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private String getDownloadPath(String path){
|
||||
String filePath = "";
|
||||
// if(StringUtils.isNotBlank(path)){
|
||||
// return "";
|
||||
// }
|
||||
int idx = path.indexOf(downloadpath);
|
||||
if(idx==-1){
|
||||
filePath = downloadpath + File.separator + path;
|
||||
}else{
|
||||
filePath = path;
|
||||
}
|
||||
return filePath;
|
||||
}
|
||||
|
||||
|
||||
public static void zipFolder(String sourceFolderPath, String outputZipPath) {
|
||||
FileOutputStream fos = null;
|
||||
ZipOutputStream zipOut = null;
|
||||
try {
|
||||
fos = new FileOutputStream(outputZipPath);
|
||||
zipOut = new ZipOutputStream(fos);
|
||||
addSourceFolderToZip(sourceFolderPath, zipOut, ""); // 第三个参数为空字符串,表示根目录下的文件夹将被直接包含在zip文件中
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (zipOut != null) {
|
||||
zipOut.close();
|
||||
}
|
||||
if (fos != null) {
|
||||
fos.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void addSourceFolderToZip(String sourceFolderPath, ZipOutputStream zipOut, String pathInZip) throws IOException {
|
||||
File folder = new File(sourceFolderPath);
|
||||
try {
|
||||
if (folder.exists() && folder.isDirectory()) {
|
||||
for (File file : folder.listFiles()) {
|
||||
if (file.isDirectory()) {
|
||||
addSourceFolderToZip(file.getPath(), zipOut, pathInZip + file.getName() + "/"); // 对子文件夹递归调用
|
||||
} else {
|
||||
FileInputStream fis = new FileInputStream(file);
|
||||
ZipEntry zipEntry = new ZipEntry(pathInZip + file.getName()); // 添加文件到zip条目中,并保持其路径结构
|
||||
zipOut.putNextEntry(zipEntry);
|
||||
byte[] bytes = new byte[1024]; // 缓冲区大小1024字节
|
||||
int length;
|
||||
while ((length = fis.read(bytes)) >= 0) { // 读取文件内容并写入到zip输出流中
|
||||
zipOut.write(bytes, 0, length);
|
||||
}
|
||||
fis.close(); // 关闭文件输入流
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("目录不存在"+sourceFolderPath);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -29,16 +29,75 @@ public class ZipFiles {
|
|||
zos.close();
|
||||
}
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// String[] files = {"d://file1.txt", "d://file2.txt", "d://file3.txt"};
|
||||
// String zipFileName = "D://files.zip";
|
||||
//
|
||||
// try {
|
||||
// zipFiles(zipFileName, files);
|
||||
//
|
||||
// System.out.println("Files zipped successfully!");
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
|
||||
public static void main(String[] args) {
|
||||
String[] files = {"d://file1.txt", "d://file2.txt", "d://file3.txt"};
|
||||
String zipFileName = "D://files.zip";
|
||||
// 指定要打包的文件夹路径
|
||||
String sourceFolderPath = "D:\\opt\\webapp\\downloadZip\\2024年春季学期-董永军-189273";
|
||||
// 指定输出zip文件的路径
|
||||
String outputZipPath = "D:\\opt\\webapp\\downloadZip\\output.zip";
|
||||
|
||||
// 调用方法进行打包
|
||||
zipFolder(sourceFolderPath, outputZipPath);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void zipFolder(String sourceFolderPath, String outputZipPath) {
|
||||
FileOutputStream fos = null;
|
||||
ZipOutputStream zipOut = null;
|
||||
try {
|
||||
zipFiles(zipFileName, files);
|
||||
|
||||
System.out.println("Files zipped successfully!");
|
||||
fos = new FileOutputStream(outputZipPath);
|
||||
zipOut = new ZipOutputStream(fos);
|
||||
addSourceFolderToZip(sourceFolderPath, zipOut, ""); // 第三个参数为空字符串,表示根目录下的文件夹将被直接包含在zip文件中
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
try {
|
||||
if (zipOut != null) {
|
||||
zipOut.close();
|
||||
}
|
||||
if (fos != null) {
|
||||
fos.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void addSourceFolderToZip(String sourceFolderPath, ZipOutputStream zipOut, String pathInZip) throws IOException {
|
||||
File folder = new File(sourceFolderPath);
|
||||
try {
|
||||
for (File file : folder.listFiles()) {
|
||||
if (file.isDirectory()) {
|
||||
addSourceFolderToZip(file.getPath(), zipOut, pathInZip + file.getName() + "/"); // 对子文件夹递归调用
|
||||
} else {
|
||||
FileInputStream fis = new FileInputStream(file);
|
||||
ZipEntry zipEntry = new ZipEntry(pathInZip + file.getName()); // 添加文件到zip条目中,并保持其路径结构
|
||||
zipOut.putNextEntry(zipEntry);
|
||||
byte[] bytes = new byte[1024]; // 缓冲区大小1024字节
|
||||
int length;
|
||||
while ((length = fis.read(bytes)) >= 0) { // 读取文件内容并写入到zip输出流中
|
||||
zipOut.write(bytes, 0, length);
|
||||
}
|
||||
fis.close(); // 关闭文件输入流
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/downKccldbxz/downKccldbxz/list',
|
||||
save='/downKccldbxz/downKccldbxz/add',
|
||||
edit='/downKccldbxz/downKccldbxz/edit',
|
||||
deleteOne = '/downKccldbxz/downKccldbxz/delete',
|
||||
deleteBatch = '/downKccldbxz/downKccldbxz/deleteBatch',
|
||||
importExcel = '/downKccldbxz/downKccldbxz/importExcel',
|
||||
exportXls = '/downKccldbxz/downKccldbxz/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
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: 'title'
|
||||
},
|
||||
{
|
||||
title: '学年学期',
|
||||
align: "center",
|
||||
dataIndex: 'xnxq'
|
||||
},
|
||||
{
|
||||
title: '打包时间',
|
||||
align: "center",
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
align: "center",
|
||||
dataIndex: 'status_dictText'
|
||||
},
|
||||
{
|
||||
title: '下载地址',
|
||||
align: "center",
|
||||
dataIndex: 'filePath',
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
title: {title: '条件',order: 0,view: 'text', type: 'string',},
|
||||
xnxq: {title: '学年学期',order: 1,view: 'text', type: 'string',},
|
||||
status: {title: '状态',order: 2,view: 'radio', type: 'string',dictCode: 'down_status',},
|
||||
filePath: {title: '附件地址',order: 3,view: 'file', type: 'string',},
|
||||
};
|
|
@ -0,0 +1,218 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--引用表格-->
|
||||
<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)"/>
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
<template v-if="column.dataIndex==='filePath'">
|
||||
<!--文件字段回显插槽-->
|
||||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button>
|
||||
</template>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<DownKccldbxzModal ref="registerModal" @success="handleSuccess"></DownKccldbxzModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="downKccldbxz-downKccldbxz" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './DownKccldbxz.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './DownKccldbxz.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import DownKccldbxzModal from './components/DownKccldbxzModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '课程材料打包下载',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "课程材料打包下载",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
downloadFile(record.filePath)
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
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: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'downKccldbxz:down_kccldbxz:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.jeecg-basic-table-form-container {
|
||||
padding: 0;
|
||||
.table-page-search-submitButtons {
|
||||
display: block;
|
||||
margin-bottom: 24px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.query-group-cust{
|
||||
min-width: 100px !important;
|
||||
}
|
||||
.query-group-split-cust{
|
||||
width: 30px;
|
||||
display: inline-block;
|
||||
text-align: center
|
||||
}
|
||||
.ant-form-item:not(.ant-form-item-with-help){
|
||||
margin-bottom: 16px;
|
||||
height: 32px;
|
||||
}
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,172 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="DownKccldbxzForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="学年学期" v-bind="validateInfos.xnxq" id="BlJbzdjsForm-xnxq" name="xnxq">
|
||||
<j-dict-select-tag placeholder="请选择学年学期" v-model:value="formData.xnxq" :dictCode="`v_xqxn,down_xqxn,down_xqxn,true order by sort desc`" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="开课单位名称">
|
||||
<j-dict-select-tag
|
||||
placeholder="请选择开课单位名称"
|
||||
v-model:value="formData.kkyxmc"
|
||||
:dictCode="`v_kkdw,kkyxmc,kkyxmc`"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="课程名称">
|
||||
<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="任课教师">
|
||||
<a-input v-model:value="formData.rkjs" 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 JUpload from '/@/components/Form/src/jeecg/components/JUpload/JUpload.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../DownKccldbxz.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: '',
|
||||
title: '',
|
||||
xnxq: '',
|
||||
status: '',
|
||||
filePath: '',
|
||||
});
|
||||
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({
|
||||
xnxq: [{ required: true, message: '请选择对应的学期!' }],
|
||||
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<DownKccldbxzForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></DownKccldbxzForm>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import DownKccldbxzForm from './DownKccldbxzForm.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>
|
|
@ -606,18 +606,6 @@ function getTableAction(record) {
|
|||
label: '查看',
|
||||
onClick: handleView.bind(null, record),
|
||||
},
|
||||
// {
|
||||
// label: '学生成绩',
|
||||
// onClick: handleCjd.bind(null, record),
|
||||
// },
|
||||
// {
|
||||
// label: '考核评价材料',
|
||||
// onClick: handleKhpjcl.bind(null, record),
|
||||
// },
|
||||
// {
|
||||
// label: '学生原始材料',
|
||||
// onClick: handleXsyscl.bind(null, record),
|
||||
// },
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@
|
|||
</a-form>
|
||||
</div>
|
||||
<a-tabs v-model:activeKey="activeKey" type="card" @change="onChangeTab" style="background-color: white;">
|
||||
<a-tab-pane key="1" tab="学生成绩">
|
||||
<a-tab-pane key="1" tab="学生成绩1">
|
||||
<XscjList ref="cjdFormModal" @callback="init"></XscjList>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="2" tab="考核评价材料" :forceRender="true">
|
||||
|
|
|
@ -41,6 +41,7 @@ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
|||
canResize: false,
|
||||
useSearchForm: false,
|
||||
showActionColumn: false,
|
||||
immediate: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
|
|
|
@ -308,6 +308,7 @@ export const columns3: BasicColumn[] = [
|
|||
dataIndex: 'cj4',
|
||||
width: 100,
|
||||
sorter: true,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '期末成绩',
|
||||
|
@ -315,6 +316,7 @@ export const columns3: BasicColumn[] = [
|
|||
dataIndex: 'cj5',
|
||||
width: 100,
|
||||
sorter: true,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '总成绩',
|
||||
|
|
Loading…
Reference in New Issue