Commit 06cb983b9ccd88a61f96eaaeb1dc98aef5b04c64
Merge remote-tracking branch 'origin/master'
Showing
17 changed files
with
1132 additions
and
78 deletions
ruoyi-archives/src/main/java/com/ruoyi/controller/ArchivesFileController.java
0 → 100644
| 1 | +package com.ruoyi.controller; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.common.annotation.Log; | ||
| 4 | +import com.ruoyi.common.core.controller.BaseController; | ||
| 5 | +import com.ruoyi.common.core.domain.AjaxResult; | ||
| 6 | +import com.ruoyi.common.core.page.TableDataInfo; | ||
| 7 | +import com.ruoyi.common.enums.BusinessType; | ||
| 8 | +import com.ruoyi.common.utils.poi.ExcelUtil; | ||
| 9 | +import com.ruoyi.domain.ArchivesFile; | ||
| 10 | +import com.ruoyi.service.IArchivesFileService; | ||
| 11 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 12 | +import org.springframework.security.access.prepost.PreAuthorize; | ||
| 13 | +import org.springframework.web.bind.annotation.*; | ||
| 14 | + | ||
| 15 | +import javax.servlet.http.HttpServletResponse; | ||
| 16 | +import java.util.List; | ||
| 17 | + | ||
| 18 | +/** | ||
| 19 | + * 【请填写功能名称】Controller | ||
| 20 | + * | ||
| 21 | + * @author li | ||
| 22 | + * @date 2022-08-04 | ||
| 23 | + */ | ||
| 24 | +@RestController | ||
| 25 | +@RequestMapping("/archives/file") | ||
| 26 | +public class ArchivesFileController extends BaseController | ||
| 27 | +{ | ||
| 28 | + @Autowired | ||
| 29 | + private IArchivesFileService archivesFileService; | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 查询【请填写功能名称】列表 | ||
| 33 | + */ | ||
| 34 | + @PreAuthorize("@ss.hasPermi('archives:file:list')") | ||
| 35 | + @GetMapping("/list") | ||
| 36 | + public TableDataInfo list(ArchivesFile archivesFile) | ||
| 37 | + { | ||
| 38 | + startPage(); | ||
| 39 | + List<ArchivesFile> list = archivesFileService.selectArchivesFileList(archivesFile); | ||
| 40 | + return getDataTable(list); | ||
| 41 | + } | ||
| 42 | + | ||
| 43 | + /** | ||
| 44 | + * 导出【请填写功能名称】列表 | ||
| 45 | + */ | ||
| 46 | + @PreAuthorize("@ss.hasPermi('archives:file:export')") | ||
| 47 | + @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT) | ||
| 48 | + @PostMapping("/export") | ||
| 49 | + public void export(HttpServletResponse response, ArchivesFile archivesFile) | ||
| 50 | + { | ||
| 51 | + List<ArchivesFile> list = archivesFileService.selectArchivesFileList(archivesFile); | ||
| 52 | + ExcelUtil<ArchivesFile> util = new ExcelUtil<ArchivesFile>(ArchivesFile.class); | ||
| 53 | + util.exportExcel(response, list, "【请填写功能名称】数据"); | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + /** | ||
| 57 | + * 获取【请填写功能名称】详细信息 | ||
| 58 | + */ | ||
| 59 | + @PreAuthorize("@ss.hasPermi('archives:file:query')") | ||
| 60 | + @GetMapping(value = "/{id}") | ||
| 61 | + public AjaxResult getInfo(@PathVariable("id") Long id) | ||
| 62 | + { | ||
| 63 | + return AjaxResult.success(archivesFileService.selectArchivesFileById(id)); | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + /** | ||
| 67 | + * 新增【请填写功能名称】 | ||
| 68 | + */ | ||
| 69 | + @PreAuthorize("@ss.hasPermi('archives:file:add')") | ||
| 70 | + @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT) | ||
| 71 | + @PostMapping | ||
| 72 | + public AjaxResult add(@RequestBody ArchivesFile archivesFile) | ||
| 73 | + { | ||
| 74 | + return toAjax(archivesFileService.insertArchivesFile(archivesFile)); | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + /** | ||
| 78 | + * 修改【请填写功能名称】 | ||
| 79 | + */ | ||
| 80 | + @PreAuthorize("@ss.hasPermi('archives:file:edit')") | ||
| 81 | + @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE) | ||
| 82 | + @PutMapping | ||
| 83 | + public AjaxResult edit(@RequestBody ArchivesFile archivesFile) | ||
| 84 | + { | ||
| 85 | + return toAjax(archivesFileService.updateArchivesFile(archivesFile)); | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + /** | ||
| 89 | + * 删除【请填写功能名称】 | ||
| 90 | + */ | ||
| 91 | + @PreAuthorize("@ss.hasPermi('archives:file:remove')") | ||
| 92 | + @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE) | ||
| 93 | + @DeleteMapping("/{ids}") | ||
| 94 | + public AjaxResult remove(@PathVariable Long[] ids) | ||
| 95 | + { | ||
| 96 | + return toAjax(archivesFileService.deleteArchivesFileByIds(ids)); | ||
| 97 | + } | ||
| 98 | +} |
ruoyi-archives/src/main/java/com/ruoyi/domain/ArchivesCollectBox.java
| @@ -121,9 +121,7 @@ public class ArchivesCollectBox extends BaseEntity | @@ -121,9 +121,7 @@ public class ArchivesCollectBox extends BaseEntity | ||
| 121 | @Excel(name = "原文") | 121 | @Excel(name = "原文") |
| 122 | private String text; | 122 | private String text; |
| 123 | 123 | ||
| 124 | - /** 文件 */ | ||
| 125 | - @Excel(name = "文件") | ||
| 126 | - private String file; | 124 | + |
| 127 | 125 | ||
| 128 | /** 1.未整理文件 | 126 | /** 1.未整理文件 |
| 129 | 2.已整理文件 | 127 | 2.已整理文件 |
| @@ -377,15 +375,7 @@ public class ArchivesCollectBox extends BaseEntity | @@ -377,15 +375,7 @@ public class ArchivesCollectBox extends BaseEntity | ||
| 377 | { | 375 | { |
| 378 | return text; | 376 | return text; |
| 379 | } | 377 | } |
| 380 | - public void setFile(String file) | ||
| 381 | - { | ||
| 382 | - this.file = file; | ||
| 383 | - } | ||
| 384 | 378 | ||
| 385 | - public String getFile() | ||
| 386 | - { | ||
| 387 | - return file; | ||
| 388 | - } | ||
| 389 | public void setStatus(String status) | 379 | public void setStatus(String status) |
| 390 | { | 380 | { |
| 391 | this.status = status; | 381 | this.status = status; |
| @@ -451,8 +441,7 @@ public class ArchivesCollectBox extends BaseEntity | @@ -451,8 +441,7 @@ public class ArchivesCollectBox extends BaseEntity | ||
| 451 | .append("draftName", getDraftName()) | 441 | .append("draftName", getDraftName()) |
| 452 | .append("page", getPage()) | 442 | .append("page", getPage()) |
| 453 | .append("documentMark", getDocumentMark()) | 443 | .append("documentMark", getDocumentMark()) |
| 454 | - .append("text", getText()) | ||
| 455 | - .append("file", getFile()) | 444 | + .append("text", getText()) |
| 456 | .append("createBy", getCreateBy()) | 445 | .append("createBy", getCreateBy()) |
| 457 | .append("createTime", getCreateTime()) | 446 | .append("createTime", getCreateTime()) |
| 458 | .append("updateBy", getUpdateBy()) | 447 | .append("updateBy", getUpdateBy()) |
ruoyi-archives/src/main/java/com/ruoyi/domain/ArchivesFile.java
0 → 100644
| 1 | +package com.ruoyi.domain; | ||
| 2 | + | ||
| 3 | +import org.apache.commons.lang3.builder.ToStringBuilder; | ||
| 4 | +import org.apache.commons.lang3.builder.ToStringStyle; | ||
| 5 | +import com.ruoyi.common.annotation.Excel; | ||
| 6 | +import com.ruoyi.common.core.domain.BaseEntity; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * 【请填写功能名称】对象 archives_file | ||
| 10 | + * | ||
| 11 | + * @author li | ||
| 12 | + * @date 2022-08-04 | ||
| 13 | + */ | ||
| 14 | +public class ArchivesFile extends BaseEntity | ||
| 15 | +{ | ||
| 16 | + private static final long serialVersionUID = 1L; | ||
| 17 | + | ||
| 18 | + /** 主键 */ | ||
| 19 | + private Long id; | ||
| 20 | + | ||
| 21 | + /** 所属文件id */ | ||
| 22 | + @Excel(name = "所属文件id") | ||
| 23 | + private Long colletctId; | ||
| 24 | + | ||
| 25 | + /** 原文名称 */ | ||
| 26 | + @Excel(name = "原文名称") | ||
| 27 | + private String name; | ||
| 28 | + | ||
| 29 | + /** 原文大小 */ | ||
| 30 | + @Excel(name = "原文大小") | ||
| 31 | + private String size; | ||
| 32 | + | ||
| 33 | + /** 原文类型 */ | ||
| 34 | + @Excel(name = "原文类型") | ||
| 35 | + private String type; | ||
| 36 | + | ||
| 37 | + /** 原文密级 */ | ||
| 38 | + @Excel(name = "原文密级") | ||
| 39 | + private String secretLevel; | ||
| 40 | + | ||
| 41 | + /** 原文版本 */ | ||
| 42 | + @Excel(name = "原文版本") | ||
| 43 | + private String version; | ||
| 44 | + | ||
| 45 | + /** $column.columnComment */ | ||
| 46 | + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") | ||
| 47 | + private String file; | ||
| 48 | + | ||
| 49 | + public void setId(Long id) | ||
| 50 | + { | ||
| 51 | + this.id = id; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public Long getId() | ||
| 55 | + { | ||
| 56 | + return id; | ||
| 57 | + } | ||
| 58 | + public void setColletctId(Long colletctId) | ||
| 59 | + { | ||
| 60 | + this.colletctId = colletctId; | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + public Long getColletctId() | ||
| 64 | + { | ||
| 65 | + return colletctId; | ||
| 66 | + } | ||
| 67 | + public void setName(String name) | ||
| 68 | + { | ||
| 69 | + this.name = name; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public String getName() | ||
| 73 | + { | ||
| 74 | + return name; | ||
| 75 | + } | ||
| 76 | + public void setSize(String size) | ||
| 77 | + { | ||
| 78 | + this.size = size; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + public String getSize() | ||
| 82 | + { | ||
| 83 | + return size; | ||
| 84 | + } | ||
| 85 | + public void setType(String type) | ||
| 86 | + { | ||
| 87 | + this.type = type; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + public String getType() | ||
| 91 | + { | ||
| 92 | + return type; | ||
| 93 | + } | ||
| 94 | + public void setSecretLevel(String secretLevel) | ||
| 95 | + { | ||
| 96 | + this.secretLevel = secretLevel; | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + public String getSecretLevel() | ||
| 100 | + { | ||
| 101 | + return secretLevel; | ||
| 102 | + } | ||
| 103 | + public void setVersion(String version) | ||
| 104 | + { | ||
| 105 | + this.version = version; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public String getVersion() | ||
| 109 | + { | ||
| 110 | + return version; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + public String getFile() { | ||
| 114 | + return file; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public void setFile(String file) { | ||
| 118 | + this.file = file; | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + @Override | ||
| 122 | + public String toString() { | ||
| 123 | + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) | ||
| 124 | + .append("id", getId()) | ||
| 125 | + .append("colletctId", getColletctId()) | ||
| 126 | + .append("name", getName()) | ||
| 127 | + .append("size", getSize()) | ||
| 128 | + .append("type", getType()) | ||
| 129 | + .append("secretLevel", getSecretLevel()) | ||
| 130 | + .append("version", getVersion()) | ||
| 131 | + .append("file", getFile()) | ||
| 132 | + .append("createBy", getCreateBy()) | ||
| 133 | + .append("createTime", getCreateTime()) | ||
| 134 | + .append("updateBy", getUpdateBy()) | ||
| 135 | + .append("updateTime", getUpdateTime()) | ||
| 136 | + .toString(); | ||
| 137 | + } | ||
| 138 | +} |
ruoyi-archives/src/main/java/com/ruoyi/mapper/ArchivesFileMapper.java
0 → 100644
| 1 | +package com.ruoyi.mapper; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.domain.ArchivesFile; | ||
| 4 | + | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 【请填写功能名称】Mapper接口 | ||
| 9 | + * | ||
| 10 | + * @author li | ||
| 11 | + * @date 2022-08-04 | ||
| 12 | + */ | ||
| 13 | +public interface ArchivesFileMapper | ||
| 14 | +{ | ||
| 15 | + /** | ||
| 16 | + * 查询【请填写功能名称】 | ||
| 17 | + * | ||
| 18 | + * @param id 【请填写功能名称】主键 | ||
| 19 | + * @return 【请填写功能名称】 | ||
| 20 | + */ | ||
| 21 | + public ArchivesFile selectArchivesFileById(Long id); | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 查询【请填写功能名称】列表 | ||
| 25 | + * | ||
| 26 | + * @param archivesFile 【请填写功能名称】 | ||
| 27 | + * @return 【请填写功能名称】集合 | ||
| 28 | + */ | ||
| 29 | + public List<ArchivesFile> selectArchivesFileList(ArchivesFile archivesFile); | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 新增【请填写功能名称】 | ||
| 33 | + * | ||
| 34 | + * @param archivesFile 【请填写功能名称】 | ||
| 35 | + * @return 结果 | ||
| 36 | + */ | ||
| 37 | + public int insertArchivesFile(ArchivesFile archivesFile); | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 修改【请填写功能名称】 | ||
| 41 | + * | ||
| 42 | + * @param archivesFile 【请填写功能名称】 | ||
| 43 | + * @return 结果 | ||
| 44 | + */ | ||
| 45 | + public int updateArchivesFile(ArchivesFile archivesFile); | ||
| 46 | + | ||
| 47 | + /** | ||
| 48 | + * 删除【请填写功能名称】 | ||
| 49 | + * | ||
| 50 | + * @param id 【请填写功能名称】主键 | ||
| 51 | + * @return 结果 | ||
| 52 | + */ | ||
| 53 | + public int deleteArchivesFileById(Long id); | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * 批量删除【请填写功能名称】 | ||
| 57 | + * | ||
| 58 | + * @param ids 需要删除的数据主键集合 | ||
| 59 | + * @return 结果 | ||
| 60 | + */ | ||
| 61 | + public int deleteArchivesFileByIds(Long[] ids); | ||
| 62 | +} |
ruoyi-archives/src/main/java/com/ruoyi/service/IArchivesFileService.java
0 → 100644
| 1 | +package com.ruoyi.service; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.domain.ArchivesFile; | ||
| 4 | + | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 【请填写功能名称】Service接口 | ||
| 9 | + * | ||
| 10 | + * @author li | ||
| 11 | + * @date 2022-08-04 | ||
| 12 | + */ | ||
| 13 | +public interface IArchivesFileService | ||
| 14 | +{ | ||
| 15 | + /** | ||
| 16 | + * 查询【请填写功能名称】 | ||
| 17 | + * | ||
| 18 | + * @param id 【请填写功能名称】主键 | ||
| 19 | + * @return 【请填写功能名称】 | ||
| 20 | + */ | ||
| 21 | + public ArchivesFile selectArchivesFileById(Long id); | ||
| 22 | + | ||
| 23 | + /** | ||
| 24 | + * 查询【请填写功能名称】列表 | ||
| 25 | + * | ||
| 26 | + * @param archivesFile 【请填写功能名称】 | ||
| 27 | + * @return 【请填写功能名称】集合 | ||
| 28 | + */ | ||
| 29 | + public List<ArchivesFile> selectArchivesFileList(ArchivesFile archivesFile); | ||
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 新增【请填写功能名称】 | ||
| 33 | + * | ||
| 34 | + * @param archivesFile 【请填写功能名称】 | ||
| 35 | + * @return 结果 | ||
| 36 | + */ | ||
| 37 | + public int insertArchivesFile(ArchivesFile archivesFile); | ||
| 38 | + | ||
| 39 | + /** | ||
| 40 | + * 修改【请填写功能名称】 | ||
| 41 | + * | ||
| 42 | + * @param archivesFile 【请填写功能名称】 | ||
| 43 | + * @return 结果 | ||
| 44 | + */ | ||
| 45 | + public int updateArchivesFile(ArchivesFile archivesFile); | ||
| 46 | + | ||
| 47 | + /** | ||
| 48 | + * 批量删除【请填写功能名称】 | ||
| 49 | + * | ||
| 50 | + * @param ids 需要删除的【请填写功能名称】主键集合 | ||
| 51 | + * @return 结果 | ||
| 52 | + */ | ||
| 53 | + public int deleteArchivesFileByIds(Long[] ids); | ||
| 54 | + | ||
| 55 | + /** | ||
| 56 | + * 删除【请填写功能名称】信息 | ||
| 57 | + * | ||
| 58 | + * @param id 【请填写功能名称】主键 | ||
| 59 | + * @return 结果 | ||
| 60 | + */ | ||
| 61 | + public int deleteArchivesFileById(Long id); | ||
| 62 | +} |
ruoyi-archives/src/main/java/com/ruoyi/service/impl/ArchivesFileServiceImpl.java
0 → 100644
| 1 | +package com.ruoyi.service.impl; | ||
| 2 | + | ||
| 3 | +import com.ruoyi.common.utils.DateUtils; | ||
| 4 | +import com.ruoyi.domain.ArchivesFile; | ||
| 5 | +import com.ruoyi.mapper.ArchivesFileMapper; | ||
| 6 | +import com.ruoyi.service.IArchivesFileService; | ||
| 7 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 8 | +import org.springframework.stereotype.Service; | ||
| 9 | + | ||
| 10 | +import java.util.List; | ||
| 11 | + | ||
| 12 | +/** | ||
| 13 | + * 【请填写功能名称】Service业务层处理 | ||
| 14 | + * | ||
| 15 | + * @author li | ||
| 16 | + * @date 2022-08-04 | ||
| 17 | + */ | ||
| 18 | +@Service | ||
| 19 | +public class ArchivesFileServiceImpl implements IArchivesFileService | ||
| 20 | +{ | ||
| 21 | + @Autowired | ||
| 22 | + private ArchivesFileMapper archivesFileMapper; | ||
| 23 | + | ||
| 24 | + /** | ||
| 25 | + * 查询【请填写功能名称】 | ||
| 26 | + * | ||
| 27 | + * @param id 【请填写功能名称】主键 | ||
| 28 | + * @return 【请填写功能名称】 | ||
| 29 | + */ | ||
| 30 | + @Override | ||
| 31 | + public ArchivesFile selectArchivesFileById(Long id) | ||
| 32 | + { | ||
| 33 | + return archivesFileMapper.selectArchivesFileById(id); | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + /** | ||
| 37 | + * 查询【请填写功能名称】列表 | ||
| 38 | + * | ||
| 39 | + * @param archivesFile 【请填写功能名称】 | ||
| 40 | + * @return 【请填写功能名称】 | ||
| 41 | + */ | ||
| 42 | + @Override | ||
| 43 | + public List<ArchivesFile> selectArchivesFileList(ArchivesFile archivesFile) | ||
| 44 | + { | ||
| 45 | + return archivesFileMapper.selectArchivesFileList(archivesFile); | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + /** | ||
| 49 | + * 新增【请填写功能名称】 | ||
| 50 | + * | ||
| 51 | + * @param archivesFile 【请填写功能名称】 | ||
| 52 | + * @return 结果 | ||
| 53 | + */ | ||
| 54 | + @Override | ||
| 55 | + public int insertArchivesFile(ArchivesFile archivesFile) | ||
| 56 | + { | ||
| 57 | + archivesFile.setCreateTime(DateUtils.getNowDate()); | ||
| 58 | + return archivesFileMapper.insertArchivesFile(archivesFile); | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + /** | ||
| 62 | + * 修改【请填写功能名称】 | ||
| 63 | + * | ||
| 64 | + * @param archivesFile 【请填写功能名称】 | ||
| 65 | + * @return 结果 | ||
| 66 | + */ | ||
| 67 | + @Override | ||
| 68 | + public int updateArchivesFile(ArchivesFile archivesFile) | ||
| 69 | + { | ||
| 70 | + archivesFile.setUpdateTime(DateUtils.getNowDate()); | ||
| 71 | + return archivesFileMapper.updateArchivesFile(archivesFile); | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + /** | ||
| 75 | + * 批量删除【请填写功能名称】 | ||
| 76 | + * | ||
| 77 | + * @param ids 需要删除的【请填写功能名称】主键 | ||
| 78 | + * @return 结果 | ||
| 79 | + */ | ||
| 80 | + @Override | ||
| 81 | + public int deleteArchivesFileByIds(Long[] ids) | ||
| 82 | + { | ||
| 83 | + return archivesFileMapper.deleteArchivesFileByIds(ids); | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + /** | ||
| 87 | + * 删除【请填写功能名称】信息 | ||
| 88 | + * | ||
| 89 | + * @param id 【请填写功能名称】主键 | ||
| 90 | + * @return 结果 | ||
| 91 | + */ | ||
| 92 | + @Override | ||
| 93 | + public int deleteArchivesFileById(Long id) | ||
| 94 | + { | ||
| 95 | + return archivesFileMapper.deleteArchivesFileById(id); | ||
| 96 | + } | ||
| 97 | +} |
ruoyi-archives/src/main/resources/mapper/archives/ArchivesCollectBoxMapper.xml
| @@ -31,7 +31,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -31,7 +31,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 31 | <result property="page" column="page" /> | 31 | <result property="page" column="page" /> |
| 32 | <result property="documentMark" column="document_mark" /> | 32 | <result property="documentMark" column="document_mark" /> |
| 33 | <result property="text" column="text" /> | 33 | <result property="text" column="text" /> |
| 34 | - <result property="file" column="file" /> | ||
| 35 | <result property="createBy" column="create_by" /> | 34 | <result property="createBy" column="create_by" /> |
| 36 | <result property="createTime" column="create_time" /> | 35 | <result property="createTime" column="create_time" /> |
| 37 | <result property="updateBy" column="update_by" /> | 36 | <result property="updateBy" column="update_by" /> |
| @@ -43,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -43,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 43 | </resultMap> | 42 | </resultMap> |
| 44 | 43 | ||
| 45 | <sql id="selectArchivesCollectBoxVo"> | 44 | <sql id="selectArchivesCollectBoxVo"> |
| 46 | - select id, general, year, title, sort, safekeeping_date, secret_level, pages, filing_number, zk_number, location_code, filing_dept, archival_code, responsibility_name, serial_mark, piece_mark, register_mark, counsellors, filing_name, summary_name, record_type, carrier_type, draft_name, page, document_mark, text, file, create_by, create_time, update_by, update_time, status, apprvoal, belong_role, box_mark from archives_collect_box | 45 | + select id, general, year, title, sort, safekeeping_date, secret_level, pages, filing_number, zk_number, location_code, filing_dept, archival_code, responsibility_name, serial_mark, piece_mark, register_mark, counsellors, filing_name, summary_name, record_type, carrier_type, draft_name, page, document_mark, text, create_by, create_time, update_by, update_time, status, apprvoal, belong_role, box_mark from archives_collect_box |
| 47 | </sql> | 46 | </sql> |
| 48 | 47 | ||
| 49 | <select id="selectArchivesCollectBoxList" parameterType="ArchivesCollectBox" resultMap="ArchivesCollectBoxResult"> | 48 | <select id="selectArchivesCollectBoxList" parameterType="ArchivesCollectBox" resultMap="ArchivesCollectBoxResult"> |
| @@ -74,7 +73,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -74,7 +73,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 74 | <if test="page != null and page != ''"> and page = #{page}</if> | 73 | <if test="page != null and page != ''"> and page = #{page}</if> |
| 75 | <if test="documentMark != null and documentMark != ''"> and document_mark = #{documentMark}</if> | 74 | <if test="documentMark != null and documentMark != ''"> and document_mark = #{documentMark}</if> |
| 76 | <if test="text != null and text != ''"> and text = #{text}</if> | 75 | <if test="text != null and text != ''"> and text = #{text}</if> |
| 77 | - <if test="file != null and file != ''"> and file = #{file}</if> | ||
| 78 | <if test="status != null and status != ''"> and status = #{status}</if> | 76 | <if test="status != null and status != ''"> and status = #{status}</if> |
| 79 | <if test="apprvoal != null and apprvoal != ''"> and apprvoal = #{apprvoal}</if> | 77 | <if test="apprvoal != null and apprvoal != ''"> and apprvoal = #{apprvoal}</if> |
| 80 | <if test="belongRole != null and belongRole != ''"> and belong_role = #{belongRole}</if> | 78 | <if test="belongRole != null and belongRole != ''"> and belong_role = #{belongRole}</if> |
| @@ -115,7 +113,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -115,7 +113,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 115 | <if test="page != null">page,</if> | 113 | <if test="page != null">page,</if> |
| 116 | <if test="documentMark != null">document_mark,</if> | 114 | <if test="documentMark != null">document_mark,</if> |
| 117 | <if test="text != null">text,</if> | 115 | <if test="text != null">text,</if> |
| 118 | - <if test="file != null">file,</if> | ||
| 119 | <if test="createBy != null">create_by,</if> | 116 | <if test="createBy != null">create_by,</if> |
| 120 | <if test="createTime != null">create_time,</if> | 117 | <if test="createTime != null">create_time,</if> |
| 121 | <if test="updateBy != null">update_by,</if> | 118 | <if test="updateBy != null">update_by,</if> |
| @@ -151,7 +148,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -151,7 +148,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 151 | <if test="page != null">#{page},</if> | 148 | <if test="page != null">#{page},</if> |
| 152 | <if test="documentMark != null">#{documentMark},</if> | 149 | <if test="documentMark != null">#{documentMark},</if> |
| 153 | <if test="text != null">#{text},</if> | 150 | <if test="text != null">#{text},</if> |
| 154 | - <if test="file != null">#{file},</if> | ||
| 155 | <if test="createBy != null">#{createBy},</if> | 151 | <if test="createBy != null">#{createBy},</if> |
| 156 | <if test="createTime != null">#{createTime},</if> | 152 | <if test="createTime != null">#{createTime},</if> |
| 157 | <if test="updateBy != null">#{updateBy},</if> | 153 | <if test="updateBy != null">#{updateBy},</if> |
| @@ -191,7 +187,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | @@ -191,7 +187,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 191 | <if test="page != null">page = #{page},</if> | 187 | <if test="page != null">page = #{page},</if> |
| 192 | <if test="documentMark != null">document_mark = #{documentMark},</if> | 188 | <if test="documentMark != null">document_mark = #{documentMark},</if> |
| 193 | <if test="text != null">text = #{text},</if> | 189 | <if test="text != null">text = #{text},</if> |
| 194 | - <if test="file != null">file = #{file},</if> | ||
| 195 | <if test="createBy != null">create_by = #{createBy},</if> | 190 | <if test="createBy != null">create_by = #{createBy},</if> |
| 196 | <if test="createTime != null">create_time = #{createTime},</if> | 191 | <if test="createTime != null">create_time = #{createTime},</if> |
| 197 | <if test="updateBy != null">update_by = #{updateBy},</if> | 192 | <if test="updateBy != null">update_by = #{updateBy},</if> |
ruoyi-archives/src/main/resources/mapper/archives/ArchivesFileMapper.xml
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
| 2 | +<!DOCTYPE mapper | ||
| 3 | + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" | ||
| 4 | + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | ||
| 5 | +<mapper namespace="com.ruoyi.mapper.ArchivesFileMapper"> | ||
| 6 | + | ||
| 7 | + <resultMap type="ArchivesFile" id="ArchivesFileResult"> | ||
| 8 | + <result property="id" column="id" /> | ||
| 9 | + <result property="colletctId" column="colletct_id" /> | ||
| 10 | + <result property="name" column="name" /> | ||
| 11 | + <result property="size" column="size" /> | ||
| 12 | + <result property="type" column="type" /> | ||
| 13 | + <result property="secretLevel" column="secret_level" /> | ||
| 14 | + <result property="version" column="version" /> | ||
| 15 | + <result property="file" column="file" /> | ||
| 16 | + <result property="createBy" column="create_by" /> | ||
| 17 | + <result property="createTime" column="create_time" /> | ||
| 18 | + <result property="updateBy" column="update_by" /> | ||
| 19 | + <result property="updateTime" column="update_time" /> | ||
| 20 | + </resultMap> | ||
| 21 | + | ||
| 22 | + <sql id="selectArchivesFileVo"> | ||
| 23 | + select id, colletct_id, name, size, type, secret_level, version, file, create_by, create_time, update_by, update_time from archives_file | ||
| 24 | + </sql> | ||
| 25 | + | ||
| 26 | + <select id="selectArchivesFileList" parameterType="ArchivesFile" resultMap="ArchivesFileResult"> | ||
| 27 | + <include refid="selectArchivesFileVo"/> | ||
| 28 | + <where> | ||
| 29 | + <if test="colletctId != null "> and colletct_id = #{colletctId}</if> | ||
| 30 | + <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if> | ||
| 31 | + <if test="size != null and size != ''"> and size = #{size}</if> | ||
| 32 | + <if test="type != null and type != ''"> and type = #{type}</if> | ||
| 33 | + <if test="secretLevel != null and secretLevel != ''"> and secret_level = #{secretLevel}</if> | ||
| 34 | + <if test="version != null and version != ''"> and version = #{version}</if> | ||
| 35 | + <if test="file != null and file != ''"> and file = #{file}</if> | ||
| 36 | + </where> | ||
| 37 | + </select> | ||
| 38 | + | ||
| 39 | + <select id="selectArchivesFileById" parameterType="Long" resultMap="ArchivesFileResult"> | ||
| 40 | + <include refid="selectArchivesFileVo"/> | ||
| 41 | + where id = #{id} | ||
| 42 | + </select> | ||
| 43 | + | ||
| 44 | + <insert id="insertArchivesFile" parameterType="ArchivesFile" useGeneratedKeys="true" keyProperty="id"> | ||
| 45 | + insert into archives_file | ||
| 46 | + <trim prefix="(" suffix=")" suffixOverrides=","> | ||
| 47 | + <if test="colletctId != null">colletct_id,</if> | ||
| 48 | + <if test="name != null">name,</if> | ||
| 49 | + <if test="size != null">size,</if> | ||
| 50 | + <if test="type != null">type,</if> | ||
| 51 | + <if test="secretLevel != null">secret_level,</if> | ||
| 52 | + <if test="version != null">version,</if> | ||
| 53 | + <if test="file != null">file,</if> | ||
| 54 | + <if test="createBy != null">create_by,</if> | ||
| 55 | + <if test="createTime != null">create_time,</if> | ||
| 56 | + <if test="updateBy != null">update_by,</if> | ||
| 57 | + <if test="updateTime != null">update_time,</if> | ||
| 58 | + </trim> | ||
| 59 | + <trim prefix="values (" suffix=")" suffixOverrides=","> | ||
| 60 | + <if test="colletctId != null">#{colletctId},</if> | ||
| 61 | + <if test="name != null">#{name},</if> | ||
| 62 | + <if test="size != null">#{size},</if> | ||
| 63 | + <if test="type != null">#{type},</if> | ||
| 64 | + <if test="secretLevel != null">#{secretLevel},</if> | ||
| 65 | + <if test="version != null">#{version},</if> | ||
| 66 | + <if test="file != null">#{file},</if> | ||
| 67 | + <if test="createBy != null">#{createBy},</if> | ||
| 68 | + <if test="createTime != null">#{createTime},</if> | ||
| 69 | + <if test="updateBy != null">#{updateBy},</if> | ||
| 70 | + <if test="updateTime != null">#{updateTime},</if> | ||
| 71 | + </trim> | ||
| 72 | + </insert> | ||
| 73 | + | ||
| 74 | + <update id="updateArchivesFile" parameterType="ArchivesFile"> | ||
| 75 | + update archives_file | ||
| 76 | + <trim prefix="SET" suffixOverrides=","> | ||
| 77 | + <if test="colletctId != null">colletct_id = #{colletctId},</if> | ||
| 78 | + <if test="name != null">name = #{name},</if> | ||
| 79 | + <if test="size != null">size = #{size},</if> | ||
| 80 | + <if test="type != null">type = #{type},</if> | ||
| 81 | + <if test="secretLevel != null">secret_level = #{secretLevel},</if> | ||
| 82 | + <if test="version != null">version = #{version},</if> | ||
| 83 | + <if test="file != null">file = #{file},</if> | ||
| 84 | + <if test="createBy != null">create_by = #{createBy},</if> | ||
| 85 | + <if test="createTime != null">create_time = #{createTime},</if> | ||
| 86 | + <if test="updateBy != null">update_by = #{updateBy},</if> | ||
| 87 | + <if test="updateTime != null">update_time = #{updateTime},</if> | ||
| 88 | + </trim> | ||
| 89 | + where id = #{id} | ||
| 90 | + </update> | ||
| 91 | + | ||
| 92 | + <delete id="deleteArchivesFileById" parameterType="Long"> | ||
| 93 | + delete from archives_file where id = #{id} | ||
| 94 | + </delete> | ||
| 95 | + | ||
| 96 | + <delete id="deleteArchivesFileByIds" parameterType="String"> | ||
| 97 | + delete from archives_file where id in | ||
| 98 | + <foreach item="id" collection="array" open="(" separator="," close=")"> | ||
| 99 | + #{id} | ||
| 100 | + </foreach> | ||
| 101 | + </delete> | ||
| 102 | +</mapper> | ||
| 0 | \ No newline at end of file | 103 | \ No newline at end of file |
ruoyi-ui/src/api/archives/file.js
0 → 100644
| 1 | +import request from '@/utils/request' | ||
| 2 | + | ||
| 3 | +// 查询【请填写功能名称】列表 | ||
| 4 | +export function listFile(query) { | ||
| 5 | + return request({ | ||
| 6 | + url: '/archives/file/list', | ||
| 7 | + method: 'get', | ||
| 8 | + params: query | ||
| 9 | + }) | ||
| 10 | +} | ||
| 11 | + | ||
| 12 | +// 查询【请填写功能名称】详细 | ||
| 13 | +export function getFile(id) { | ||
| 14 | + return request({ | ||
| 15 | + url: '/archives/file/' + id, | ||
| 16 | + method: 'get' | ||
| 17 | + }) | ||
| 18 | +} | ||
| 19 | + | ||
| 20 | +// 新增【请填写功能名称】 | ||
| 21 | +export function addFile(data) { | ||
| 22 | + return request({ | ||
| 23 | + url: '/archives/file', | ||
| 24 | + method: 'post', | ||
| 25 | + data: data | ||
| 26 | + }) | ||
| 27 | +} | ||
| 28 | + | ||
| 29 | +// 修改【请填写功能名称】 | ||
| 30 | +export function updateFile(data) { | ||
| 31 | + return request({ | ||
| 32 | + url: '/archives/file', | ||
| 33 | + method: 'put', | ||
| 34 | + data: data | ||
| 35 | + }) | ||
| 36 | +} | ||
| 37 | + | ||
| 38 | +// 删除【请填写功能名称】 | ||
| 39 | +export function delFile(id) { | ||
| 40 | + return request({ | ||
| 41 | + url: '/archives/file/' + id, | ||
| 42 | + method: 'delete' | ||
| 43 | + }) | ||
| 44 | +} |
ruoyi-ui/src/components/FileUpload/index.vue
| @@ -50,17 +50,17 @@ export default { | @@ -50,17 +50,17 @@ export default { | ||
| 50 | // 数量限制 | 50 | // 数量限制 |
| 51 | limit: { | 51 | limit: { |
| 52 | type: Number, | 52 | type: Number, |
| 53 | - default: 5, | 53 | + default: 1, |
| 54 | }, | 54 | }, |
| 55 | // 大小限制(MB) | 55 | // 大小限制(MB) |
| 56 | fileSize: { | 56 | fileSize: { |
| 57 | type: Number, | 57 | type: Number, |
| 58 | - default: 5, | 58 | + default: 20, |
| 59 | }, | 59 | }, |
| 60 | // 文件类型, 例如['png', 'jpg', 'jpeg'] | 60 | // 文件类型, 例如['png', 'jpg', 'jpeg'] |
| 61 | fileType: { | 61 | fileType: { |
| 62 | type: Array, | 62 | type: Array, |
| 63 | - default: () => ["doc", "xls", "ppt", "txt", "pdf"], | 63 | + default: () => ["doc", "xls", "ppt", "txt", "pdf","jpg","png"], |
| 64 | }, | 64 | }, |
| 65 | // 是否显示提示 | 65 | // 是否显示提示 |
| 66 | isShowTip: { | 66 | isShowTip: { |
| @@ -78,6 +78,7 @@ export default { | @@ -78,6 +78,7 @@ export default { | ||
| 78 | Authorization: "Bearer " + getToken(), | 78 | Authorization: "Bearer " + getToken(), |
| 79 | }, | 79 | }, |
| 80 | fileList: [], | 80 | fileList: [], |
| 81 | + size : 0, | ||
| 81 | }; | 82 | }; |
| 82 | }, | 83 | }, |
| 83 | watch: { | 84 | watch: { |
| @@ -124,13 +125,14 @@ export default { | @@ -124,13 +125,14 @@ export default { | ||
| 124 | if (fileExtension && fileExtension.indexOf(type) > -1) return true; | 125 | if (fileExtension && fileExtension.indexOf(type) > -1) return true; |
| 125 | return false; | 126 | return false; |
| 126 | }); | 127 | }); |
| 127 | - /*if (!isTypeOk) { | 128 | + if (!isTypeOk) { |
| 128 | this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`); | 129 | this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`); |
| 129 | return false; | 130 | return false; |
| 130 | - }*/ | 131 | + } |
| 131 | } | 132 | } |
| 132 | // 校检文件大小 | 133 | // 校检文件大小 |
| 133 | if (this.fileSize) { | 134 | if (this.fileSize) { |
| 135 | + this.size = file.size / 1024; | ||
| 134 | const isLt = file.size / 1024 / 1024 < this.fileSize; | 136 | const isLt = file.size / 1024 / 1024 < this.fileSize; |
| 135 | if (!isLt) { | 137 | if (!isLt) { |
| 136 | this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`); | 138 | this.$modal.msgError(`上传文件大小不能超过 ${this.fileSize} MB!`); |
| @@ -159,8 +161,14 @@ export default { | @@ -159,8 +161,14 @@ export default { | ||
| 159 | this.number = 0; | 161 | this.number = 0; |
| 160 | this.$emit("input", this.listToString(this.fileList)); | 162 | this.$emit("input", this.listToString(this.fileList)); |
| 161 | this.$modal.closeLoading(); | 163 | this.$modal.closeLoading(); |
| 164 | + // 文件名称 和 文件大小 | ||
| 165 | + let val = {"originalFilename" :res.originalFilename,"size": this.size } | ||
| 166 | + this.fileAll(val) | ||
| 162 | } | 167 | } |
| 163 | }, | 168 | }, |
| 169 | + fileAll(val){ | ||
| 170 | + this.$emit("FileList",val) | ||
| 171 | + }, | ||
| 164 | // 删除文件 | 172 | // 删除文件 |
| 165 | handleDelete(index) { | 173 | handleDelete(index) { |
| 166 | this.fileList.splice(index, 1); | 174 | this.fileList.splice(index, 1); |
ruoyi-ui/src/views/archives/box/index.vue
| @@ -161,9 +161,8 @@ | @@ -161,9 +161,8 @@ | ||
| 161 | 161 | ||
| 162 | 162 | ||
| 163 | <el-dialog :title="title" :visible.sync="boxOpen" width="80%" append-to-body> | 163 | <el-dialog :title="title" :visible.sync="boxOpen" width="80%" append-to-body> |
| 164 | - <preview :url="'/profile/upload/2022/08/03/20220121中途站用时分析表沪嘉专线 (1)_20220803161055A001.xlsx'" /> | ||
| 165 | -<!-- | ||
| 166 | - <indexbox :statusPd="3" />--> | 164 | + |
| 165 | + <indexbox :statusPd="2" /> | ||
| 167 | </el-dialog> | 166 | </el-dialog> |
| 168 | </div> | 167 | </div> |
| 169 | </template> | 168 | </template> |
| @@ -171,12 +170,11 @@ | @@ -171,12 +170,11 @@ | ||
| 171 | <script> | 170 | <script> |
| 172 | import { listBox, getBox, delBox, addBox, updateBox } from "@/api/archives/box"; | 171 | import { listBox, getBox, delBox, addBox, updateBox } from "@/api/archives/box"; |
| 173 | 172 | ||
| 174 | -import preview from "@/views/archives/preview/preview"; | ||
| 175 | import indexbox from "@/views/archives/collerctbox/index.vue"; | 173 | import indexbox from "@/views/archives/collerctbox/index.vue"; |
| 176 | 174 | ||
| 177 | export default { | 175 | export default { |
| 178 | name: "Box", | 176 | name: "Box", |
| 179 | - components: { preview,indexbox }, | 177 | + components: { indexbox }, |
| 180 | data() { | 178 | data() { |
| 181 | return { | 179 | return { |
| 182 | // 遮罩层 | 180 | // 遮罩层 |
ruoyi-ui/src/views/archives/collerctbox/index.vue
| @@ -43,6 +43,19 @@ | @@ -43,6 +43,19 @@ | ||
| 43 | 43 | ||
| 44 | 44 | ||
| 45 | <el-row :gutter="10" class="mb8" v-if="titleshow"> | 45 | <el-row :gutter="10" class="mb8" v-if="titleshow"> |
| 46 | + | ||
| 47 | + | ||
| 48 | + <el-col :span="1.5"> | ||
| 49 | + <el-select v-model="approval_type"> | ||
| 50 | + <el-option | ||
| 51 | + v-for="dict in dict.type.approval_type" | ||
| 52 | + :key="dict.value" | ||
| 53 | + :label="dict.label" | ||
| 54 | + :value="dict.value" | ||
| 55 | + ></el-option> | ||
| 56 | + </el-select> | ||
| 57 | + </el-col> | ||
| 58 | + | ||
| 46 | <el-col :span="1.5"> | 59 | <el-col :span="1.5"> |
| 47 | <el-button | 60 | <el-button |
| 48 | type="primary" | 61 | type="primary" |
| @@ -85,7 +98,7 @@ | @@ -85,7 +98,7 @@ | ||
| 85 | v-hasPermi="['archives:collerctbox:export']" | 98 | v-hasPermi="['archives:collerctbox:export']" |
| 86 | >导出</el-button> | 99 | >导出</el-button> |
| 87 | </el-col> | 100 | </el-col> |
| 88 | - <el-col :span="1.5"> | 101 | + <el-col :span="1.5" v-if="lecommit"> |
| 89 | <el-button | 102 | <el-button |
| 90 | type="warning" | 103 | type="warning" |
| 91 | plain | 104 | plain |
| @@ -95,12 +108,33 @@ | @@ -95,12 +108,33 @@ | ||
| 95 | v-hasPermi="['archives:collerctbox:commmit']" | 108 | v-hasPermi="['archives:collerctbox:commmit']" |
| 96 | >提交</el-button> | 109 | >提交</el-button> |
| 97 | </el-col> | 110 | </el-col> |
| 111 | + | ||
| 112 | + <el-col :span="1.5" v-if="inserBox"> | ||
| 113 | + <el-button | ||
| 114 | + type="warning" | ||
| 115 | + plain | ||
| 116 | + icon="el-icon-download" | ||
| 117 | + size="mini" | ||
| 118 | + @click="handleinserBox" | ||
| 119 | + v-hasPermi="['archives:collerctbox:inserBox']" | ||
| 120 | + >加入盒</el-button> | ||
| 121 | + </el-col> | ||
| 98 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | 122 | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
| 99 | </el-row> | 123 | </el-row> |
| 100 | 124 | ||
| 101 | <el-table v-loading="loading" :data="boxList" @selection-change="handleSelectionChange"> | 125 | <el-table v-loading="loading" :data="boxList" @selection-change="handleSelectionChange"> |
| 102 | <el-table-column type="selection" width="55" align="center" /> | 126 | <el-table-column type="selection" width="55" align="center" /> |
| 103 | - <el-table-column label="主键" align="center" prop="id" /> | 127 | + <el-table-column label="操作" align="center" prop="year" > |
| 128 | + <template slot-scope="scope"> | ||
| 129 | + <el-button | ||
| 130 | + size="mini" | ||
| 131 | + type="text" | ||
| 132 | + icon="el-icon-edit" | ||
| 133 | + @click="handleCheck(scope.row)" | ||
| 134 | + v-hasPermi="['archives:box:check']" | ||
| 135 | + >查看</el-button> | ||
| 136 | + </template> | ||
| 137 | + </el-table-column> | ||
| 104 | <el-table-column label="全宗号" align="center" prop="general" /> | 138 | <el-table-column label="全宗号" align="center" prop="general" /> |
| 105 | <el-table-column label="年度" align="center" prop="year" /> | 139 | <el-table-column label="年度" align="center" prop="year" /> |
| 106 | <el-table-column label="题名" align="center" prop="title" /> | 140 | <el-table-column label="题名" align="center" prop="title" /> |
| @@ -162,38 +196,58 @@ | @@ -162,38 +196,58 @@ | ||
| 162 | /> | 196 | /> |
| 163 | 197 | ||
| 164 | <!-- 添加或修改【请填写功能名称】对话框 --> | 198 | <!-- 添加或修改【请填写功能名称】对话框 --> |
| 165 | - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | 199 | + <el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body> |
| 166 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | 200 | <el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
| 167 | - <el-form-item label="全宗号" prop="general"> | ||
| 168 | - <el-input v-model="form.general" placeholder="请输入全宗号" /> | ||
| 169 | - </el-form-item> | 201 | + <el-row> |
| 202 | + <el-col :span="6"> | ||
| 203 | + <el-form-item label="全宗号" prop="general"> | ||
| 204 | + <el-input v-model="form.general" placeholder="请输入全宗号" /> | ||
| 205 | + </el-form-item> | ||
| 206 | + </el-col> | ||
| 207 | + <el-col :span="6"> | ||
| 170 | <el-form-item label="年度" prop="year"> | 208 | <el-form-item label="年度" prop="year"> |
| 171 | <el-input v-model="form.year" placeholder="请输入年度" /> | 209 | <el-input v-model="form.year" placeholder="请输入年度" /> |
| 172 | </el-form-item> | 210 | </el-form-item> |
| 211 | + </el-col> | ||
| 212 | + <el-col :span="6"> | ||
| 173 | <el-form-item label="题名" prop="title"> | 213 | <el-form-item label="题名" prop="title"> |
| 174 | <el-input v-model="form.title" placeholder="请输入题名" /> | 214 | <el-input v-model="form.title" placeholder="请输入题名" /> |
| 175 | </el-form-item> | 215 | </el-form-item> |
| 216 | + </el-col> | ||
| 217 | + <el-col :span="6"> | ||
| 176 | <el-form-item label="分类号" prop="sort"> | 218 | <el-form-item label="分类号" prop="sort"> |
| 177 | <el-input v-model="form.sort" placeholder="请输入分类号" /> | 219 | <el-input v-model="form.sort" placeholder="请输入分类号" /> |
| 178 | </el-form-item> | 220 | </el-form-item> |
| 179 | - <el-form-item label="保管期限" prop="safekeepingDate"> | ||
| 180 | - <el-date-picker clearable | ||
| 181 | - v-model="form.safekeepingDate" | ||
| 182 | - type="date" | ||
| 183 | - value-format="yyyy-MM-dd" | ||
| 184 | - placeholder="请选择保管期限"> | ||
| 185 | - </el-date-picker> | ||
| 186 | - </el-form-item> | 221 | + </el-col> |
| 222 | + </el-row> | ||
| 223 | + <el-row> | ||
| 224 | + <el-col :span="6"> | ||
| 225 | + <el-form-item label="保管期限" prop="safekeepingDate"> | ||
| 226 | + <el-date-picker clearable | ||
| 227 | + v-model="form.safekeepingDate" | ||
| 228 | + type="date" | ||
| 229 | + value-format="yyyy-MM-dd" | ||
| 230 | + placeholder="请选择保管期限"> | ||
| 231 | + </el-date-picker> | ||
| 232 | + </el-form-item> | ||
| 233 | + </el-col> | ||
| 234 | + <el-col :span="6"> | ||
| 187 | <el-form-item label="密级" prop="secretLevel"> | 235 | <el-form-item label="密级" prop="secretLevel"> |
| 188 | <el-input v-model="form.secretLevel" placeholder="请输入密级" /> | 236 | <el-input v-model="form.secretLevel" placeholder="请输入密级" /> |
| 189 | </el-form-item> | 237 | </el-form-item> |
| 238 | + </el-col> | ||
| 239 | + <el-col :span="6"> | ||
| 190 | <el-form-item label="页数" prop="pages"> | 240 | <el-form-item label="页数" prop="pages"> |
| 191 | <el-input v-model="form.pages" placeholder="请输入页数" /> | 241 | <el-input v-model="form.pages" placeholder="请输入页数" /> |
| 192 | </el-form-item> | 242 | </el-form-item> |
| 243 | + </el-col> | ||
| 244 | + <el-col :span="6"> | ||
| 193 | <el-form-item label="归档份数" prop="filingNumber"> | 245 | <el-form-item label="归档份数" prop="filingNumber"> |
| 194 | <el-input v-model="form.filingNumber" placeholder="请输入归档份数" /> | 246 | <el-input v-model="form.filingNumber" placeholder="请输入归档份数" /> |
| 195 | </el-form-item> | 247 | </el-form-item> |
| 196 | - <el-form-item label="在库份数" prop="zkNumber"> | 248 | + </el-col> |
| 249 | + </el-row> | ||
| 250 | +<!-- <el-form-item label="在库份数" prop="zkNumber"> | ||
| 197 | <el-input v-model="form.zkNumber" placeholder="请输入在库份数" /> | 251 | <el-input v-model="form.zkNumber" placeholder="请输入在库份数" /> |
| 198 | </el-form-item> | 252 | </el-form-item> |
| 199 | <el-form-item label="库位码" prop="locationCode"> | 253 | <el-form-item label="库位码" prop="locationCode"> |
| @@ -238,9 +292,7 @@ | @@ -238,9 +292,7 @@ | ||
| 238 | <el-form-item label="原文" prop="text"> | 292 | <el-form-item label="原文" prop="text"> |
| 239 | <el-input v-model="form.text" placeholder="请输入原文" /> | 293 | <el-input v-model="form.text" placeholder="请输入原文" /> |
| 240 | </el-form-item> | 294 | </el-form-item> |
| 241 | - <el-form-item label="文件"> | ||
| 242 | - <file-upload v-model="form.file"/> | ||
| 243 | - </el-form-item> | 295 | + |
| 244 | <el-form-item label="1.待整理 2.待审批" prop="apprvoal"> | 296 | <el-form-item label="1.待整理 2.待审批" prop="apprvoal"> |
| 245 | <el-input v-model="form.apprvoal" placeholder="请输入1.待整理 2.待审批" /> | 297 | <el-input v-model="form.apprvoal" placeholder="请输入1.待整理 2.待审批" /> |
| 246 | </el-form-item> | 298 | </el-form-item> |
| @@ -249,25 +301,32 @@ | @@ -249,25 +301,32 @@ | ||
| 249 | </el-form-item> | 301 | </el-form-item> |
| 250 | <el-form-item label="盒号" prop="boxMark"> | 302 | <el-form-item label="盒号" prop="boxMark"> |
| 251 | <el-input v-model="form.boxMark" placeholder="请输入盒号" /> | 303 | <el-input v-model="form.boxMark" placeholder="请输入盒号" /> |
| 252 | - </el-form-item> | 304 | + </el-form-item>--> |
| 253 | </el-form> | 305 | </el-form> |
| 254 | <div slot="footer" class="dialog-footer"> | 306 | <div slot="footer" class="dialog-footer"> |
| 255 | <el-button type="primary" @click="submitForm">确 定</el-button> | 307 | <el-button type="primary" @click="submitForm">确 定</el-button> |
| 256 | <el-button @click="cancel">取 消</el-button> | 308 | <el-button @click="cancel">取 消</el-button> |
| 257 | </div> | 309 | </div> |
| 258 | </el-dialog> | 310 | </el-dialog> |
| 311 | + | ||
| 312 | + | ||
| 313 | + | ||
| 314 | + <el-dialog :title="title" :visible.sync="fileOpen" width="80%" append-to-body> | ||
| 315 | + <file :collboxId=collboxId /> | ||
| 316 | + </el-dialog> | ||
| 259 | </div> | 317 | </div> |
| 260 | </template> | 318 | </template> |
| 261 | 319 | ||
| 262 | <script> | 320 | <script> |
| 263 | import { listBox, getBox, delBox, addBox, updateBox } from "@/api/archives/collerctbox"; | 321 | import { listBox, getBox, delBox, addBox, updateBox } from "@/api/archives/collerctbox"; |
| 264 | - | 322 | +import file from "@/views/archives/file/index.vue"; |
| 265 | export default { | 323 | export default { |
| 266 | name: "collerctbox", | 324 | name: "collerctbox", |
| 267 | - | 325 | + dicts: ['approval_type'], |
| 326 | + components: { file }, | ||
| 268 | props: { | 327 | props: { |
| 269 | statusPd: { | 328 | statusPd: { |
| 270 | - type: String, // 这里你接收的值是什么类型就写什么类型 | 329 | + type: Number, // 这里你接收的值是什么类型就写什么类型 |
| 271 | } | 330 | } |
| 272 | }, | 331 | }, |
| 273 | 332 | ||
| @@ -320,27 +379,30 @@ export default { | @@ -320,27 +379,30 @@ export default { | ||
| 320 | page: null, | 379 | page: null, |
| 321 | documentMark: null, | 380 | documentMark: null, |
| 322 | text: null, | 381 | text: null, |
| 323 | - file: null, | ||
| 324 | status: null, | 382 | status: null, |
| 325 | apprvoal: null, | 383 | apprvoal: null, |
| 326 | belongRole: null, | 384 | belongRole: null, |
| 327 | boxMark: null, | 385 | boxMark: null, |
| 328 | - | ||
| 329 | }, | 386 | }, |
| 330 | // 表单参数 | 387 | // 表单参数 |
| 331 | form: {}, | 388 | form: {}, |
| 332 | // 表单校验 | 389 | // 表单校验 |
| 333 | rules: { | 390 | rules: { |
| 334 | }, | 391 | }, |
| 335 | - statusPd : null, //页面传递参数 1.未整理 2.已整理 3.盒 | ||
| 336 | - titleshow : true //3.盒 不显示查询条件 | 392 | + approval_type : null, |
| 393 | + // statusPd : null, //页面传递参数 1.未整理 2.已整理 3.盒 | ||
| 394 | + titleshow : true,//3.盒 不显示查询条件 | ||
| 395 | + fileOpen : false, | ||
| 396 | + collboxId: null,//本次Id | ||
| 397 | + lecommit: false | ||
| 337 | }; | 398 | }; |
| 338 | }, | 399 | }, |
| 400 | + //statusPd 0未整理文件 1 已整理文件 2 盒 | ||
| 339 | created() { | 401 | created() { |
| 340 | this.getList(); | 402 | this.getList(); |
| 341 | - if (this.statusPd == 3){ | ||
| 342 | - this.titleshow = false | ||
| 343 | - } | 403 | + this.titleshow =this.statusPd == 2 ? false : true; //提交 |
| 404 | + this.lecommit = this.statusPd != "0" ? false :true; | ||
| 405 | + this.inserBox = this.statusPd == 1 ? true : false; //加入盒 | ||
| 344 | }, | 406 | }, |
| 345 | methods: { | 407 | methods: { |
| 346 | /** 查询【请填写功能名称】列表 */ | 408 | /** 查询【请填写功能名称】列表 */ |
| @@ -387,7 +449,6 @@ export default { | @@ -387,7 +449,6 @@ export default { | ||
| 387 | page: null, | 449 | page: null, |
| 388 | documentMark: null, | 450 | documentMark: null, |
| 389 | text: null, | 451 | text: null, |
| 390 | - file: null, | ||
| 391 | createBy: null, | 452 | createBy: null, |
| 392 | createTime: null, | 453 | createTime: null, |
| 393 | updateBy: null, | 454 | updateBy: null, |
| @@ -395,7 +456,8 @@ export default { | @@ -395,7 +456,8 @@ export default { | ||
| 395 | status: "0", | 456 | status: "0", |
| 396 | apprvoal: null, | 457 | apprvoal: null, |
| 397 | belongRole: null, | 458 | belongRole: null, |
| 398 | - boxMark: null | 459 | + boxMark: null, |
| 460 | + inserBox: false, | ||
| 399 | }; | 461 | }; |
| 400 | this.resetForm("form"); | 462 | this.resetForm("form"); |
| 401 | }, | 463 | }, |
| @@ -419,7 +481,7 @@ export default { | @@ -419,7 +481,7 @@ export default { | ||
| 419 | handleAdd() { | 481 | handleAdd() { |
| 420 | this.reset(); | 482 | this.reset(); |
| 421 | this.open = true; | 483 | this.open = true; |
| 422 | - this.title = "添加【请填写功能名称】"; | 484 | + this.title = "添加【11】"; |
| 423 | }, | 485 | }, |
| 424 | /** 修改按钮操作 */ | 486 | /** 修改按钮操作 */ |
| 425 | handleUpdate(row) { | 487 | handleUpdate(row) { |
| @@ -428,7 +490,7 @@ export default { | @@ -428,7 +490,7 @@ export default { | ||
| 428 | getBox(id).then(response => { | 490 | getBox(id).then(response => { |
| 429 | this.form = response.data; | 491 | this.form = response.data; |
| 430 | this.open = true; | 492 | this.open = true; |
| 431 | - this.title = "修改【请填写功能名称】"; | 493 | + this.title = "修改【22】"; |
| 432 | }); | 494 | }); |
| 433 | }, | 495 | }, |
| 434 | /** 提交按钮 */ | 496 | /** 提交按钮 */ |
| @@ -471,7 +533,6 @@ export default { | @@ -471,7 +533,6 @@ export default { | ||
| 471 | handleCommit(row){ | 533 | handleCommit(row){ |
| 472 | const id = row.id || this.ids | 534 | const id = row.id || this.ids |
| 473 | getBox(id).then(response => { | 535 | getBox(id).then(response => { |
| 474 | - debugger | ||
| 475 | let from = response.data; | 536 | let from = response.data; |
| 476 | from.status = "1"; | 537 | from.status = "1"; |
| 477 | updateBox(from).then(response => { | 538 | updateBox(from).then(response => { |
| @@ -480,6 +541,13 @@ export default { | @@ -480,6 +541,13 @@ export default { | ||
| 480 | this.getList(); | 541 | this.getList(); |
| 481 | }); | 542 | }); |
| 482 | }); | 543 | }); |
| 544 | + }, | ||
| 545 | + handleinserBox(row){ | ||
| 546 | + | ||
| 547 | + }, | ||
| 548 | + handleCheck(row){ | ||
| 549 | + this.fileOpen = true; | ||
| 550 | + this.collboxId = row.id; | ||
| 483 | } | 551 | } |
| 484 | } | 552 | } |
| 485 | }; | 553 | }; |
ruoyi-ui/src/views/archives/file/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="app-container"> | ||
| 3 | + | ||
| 4 | + | ||
| 5 | + <el-row :gutter="20"> | ||
| 6 | + <el-col :span="16" :xs="24" > | ||
| 7 | + | ||
| 8 | + <preview :fileurl= fileurl v-if="fileOpen"/> | ||
| 9 | + </el-col> | ||
| 10 | + <el-col :span="8" :xs="24"> | ||
| 11 | +<!-- | ||
| 12 | + <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> | ||
| 13 | + <el-form-item label="所属文件id" prop="colletctId"> | ||
| 14 | + <el-input | ||
| 15 | + v-model="queryParams.colletctId" | ||
| 16 | + placeholder="请输入所属文件id" | ||
| 17 | + clearable | ||
| 18 | + @keyup.enter.native="handleQuery" | ||
| 19 | + /> | ||
| 20 | + </el-form-item> | ||
| 21 | + <el-form-item label="原文名称" prop="name"> | ||
| 22 | + <el-input | ||
| 23 | + v-model="queryParams.name" | ||
| 24 | + placeholder="请输入原文名称" | ||
| 25 | + clearable | ||
| 26 | + @keyup.enter.native="handleQuery" | ||
| 27 | + /> | ||
| 28 | + </el-form-item> | ||
| 29 | + <el-form-item label="原文大小" prop="size"> | ||
| 30 | + <el-input | ||
| 31 | + v-model="queryParams.size" | ||
| 32 | + placeholder="请输入原文大小" | ||
| 33 | + clearable | ||
| 34 | + @keyup.enter.native="handleQuery" | ||
| 35 | + /> | ||
| 36 | + </el-form-item> | ||
| 37 | + <el-form-item label="原文密级" prop="secretLevel"> | ||
| 38 | + <el-input | ||
| 39 | + v-model="queryParams.secretLevel" | ||
| 40 | + placeholder="请输入原文密级" | ||
| 41 | + clearable | ||
| 42 | + @keyup.enter.native="handleQuery" | ||
| 43 | + /> | ||
| 44 | + </el-form-item> | ||
| 45 | + <el-form-item label="原文版本" prop="version"> | ||
| 46 | + <el-input | ||
| 47 | + v-model="queryParams.version" | ||
| 48 | + placeholder="请输入原文版本" | ||
| 49 | + clearable | ||
| 50 | + @keyup.enter.native="handleQuery" | ||
| 51 | + /> | ||
| 52 | + </el-form-item> | ||
| 53 | + <el-form-item> | ||
| 54 | + <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | ||
| 55 | + <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | ||
| 56 | + </el-form-item> | ||
| 57 | + </el-form> | ||
| 58 | +--> | ||
| 59 | + | ||
| 60 | + <el-row :gutter="10" class="mb8"> | ||
| 61 | + <el-col :span="1.5"> | ||
| 62 | + <el-button | ||
| 63 | + type="primary" | ||
| 64 | + plain | ||
| 65 | + icon="el-icon-plus" | ||
| 66 | + size="mini" | ||
| 67 | + @click="handleAdd" | ||
| 68 | + v-hasPermi="['archives:file:add']" | ||
| 69 | + >新增</el-button> | ||
| 70 | + </el-col> | ||
| 71 | + <el-col :span="1.5"> | ||
| 72 | + <el-button | ||
| 73 | + type="success" | ||
| 74 | + plain | ||
| 75 | + icon="el-icon-edit" | ||
| 76 | + size="mini" | ||
| 77 | + :disabled="single" | ||
| 78 | + @click="handleUpdate" | ||
| 79 | + v-hasPermi="['archives:file:edit']" | ||
| 80 | + >修改</el-button> | ||
| 81 | + </el-col> | ||
| 82 | + <el-col :span="1.5"> | ||
| 83 | + <el-button | ||
| 84 | + type="danger" | ||
| 85 | + plain | ||
| 86 | + icon="el-icon-delete" | ||
| 87 | + size="mini" | ||
| 88 | + :disabled="multiple" | ||
| 89 | + @click="handleDelete" | ||
| 90 | + v-hasPermi="['archives:file:remove']" | ||
| 91 | + >删除</el-button> | ||
| 92 | + </el-col> | ||
| 93 | + <el-col :span="1.5"> | ||
| 94 | + <el-button | ||
| 95 | + type="warning" | ||
| 96 | + plain | ||
| 97 | + icon="el-icon-download" | ||
| 98 | + size="mini" | ||
| 99 | + @click="handleExport" | ||
| 100 | + v-hasPermi="['archives:file:export']" | ||
| 101 | + >导出</el-button> | ||
| 102 | + </el-col> | ||
| 103 | + </el-row> | ||
| 104 | + | ||
| 105 | + <el-table v-loading="loading" :data="fileList" @selection-change="handleSelectionChange" > | ||
| 106 | + | ||
| 107 | + <el-table-column type="selection" width="55" align="center" /> | ||
| 108 | + | ||
| 109 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||
| 110 | + <template slot-scope="scope"> | ||
| 111 | + <el-button | ||
| 112 | + size="mini" | ||
| 113 | + type="text" | ||
| 114 | + icon="el-icon-edit" | ||
| 115 | + @click="clickFile(scope.row)" | ||
| 116 | + v-hasPermi="['archives:file:edit']" | ||
| 117 | + >查看文件</el-button> | ||
| 118 | + </template> | ||
| 119 | + </el-table-column> | ||
| 120 | +<!-- <el-table-column label="主键" align="center" prop="id" /> | ||
| 121 | + <el-table-column label="所属文件id" align="center" prop="colletctId" />--> | ||
| 122 | + <el-table-column label="原文名称" align="center" prop="name" /> | ||
| 123 | + <el-table-column label="原文大小" align="center" prop="size" /> | ||
| 124 | + <el-table-column label="原文类型" align="center" prop="type"> | ||
| 125 | + <template slot-scope="scope"> | ||
| 126 | + <dict-tag :options="dict.type.original_type" :value="scope.row.type"/> | ||
| 127 | + </template> | ||
| 128 | + </el-table-column> | ||
| 129 | + <el-table-column label="原文密级" align="center" prop="secretLevel"> | ||
| 130 | + <template slot-scope="scope"> | ||
| 131 | + <dict-tag :options="dict.type.secret_level" :value="scope.row.secretLevel"/> | ||
| 132 | + </template> | ||
| 133 | + </el-table-column> | ||
| 134 | + <el-table-column label="原文版本" align="center" prop="version" /> | ||
| 135 | + <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | ||
| 136 | + <template slot-scope="scope"> | ||
| 137 | + <el-button | ||
| 138 | + size="mini" | ||
| 139 | + type="text" | ||
| 140 | + icon="el-icon-edit" | ||
| 141 | + @click="handleUpdate(scope.row)" | ||
| 142 | + v-hasPermi="['archives:file:edit']" | ||
| 143 | + >修改</el-button> | ||
| 144 | + <el-button | ||
| 145 | + size="mini" | ||
| 146 | + type="text" | ||
| 147 | + icon="el-icon-delete" | ||
| 148 | + @click="handleDelete(scope.row)" | ||
| 149 | + v-hasPermi="['archives:file:remove']" | ||
| 150 | + >删除</el-button> | ||
| 151 | + </template> | ||
| 152 | + </el-table-column> | ||
| 153 | + </el-table> | ||
| 154 | + </el-col> | ||
| 155 | + </el-row> | ||
| 156 | + <pagination | ||
| 157 | + v-show="total>0" | ||
| 158 | + :total="total" | ||
| 159 | + :page.sync="queryParams.pageNum" | ||
| 160 | + :limit.sync="queryParams.pageSize" | ||
| 161 | + @pagination="getList" | ||
| 162 | + /> | ||
| 163 | + | ||
| 164 | + | ||
| 165 | + | ||
| 166 | + <!-- 添加或修改【请填写功能名称】对话框 --> | ||
| 167 | + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | ||
| 168 | + <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||
| 169 | + <el-form-item label="原文名称" prop="name"> | ||
| 170 | + <el-input v-model="form.name" placeholder="请输入原文名称" disabled/> | ||
| 171 | + </el-form-item> | ||
| 172 | + <el-form-item label="原文大小" prop="size"> | ||
| 173 | + <el-input v-model="form.size" placeholder="请输入原文大小" disabled/> | ||
| 174 | + </el-form-item> | ||
| 175 | + <el-form-item label="原文类型" prop="type"> | ||
| 176 | + <el-select v-model="form.type" placeholder="请选择原文类型"> | ||
| 177 | + <el-option | ||
| 178 | + v-for="dict in dict.type.original_type" | ||
| 179 | + :key="dict.value" | ||
| 180 | + :label="dict.label" | ||
| 181 | + :value="dict.value" | ||
| 182 | + ></el-option> | ||
| 183 | + </el-select> | ||
| 184 | + </el-form-item> | ||
| 185 | + <el-form-item label="原文密级" prop="secretLevel"> | ||
| 186 | + | ||
| 187 | + <el-select v-model="form.secretLevel" placeholder="请输入原文密级"> | ||
| 188 | + <el-option | ||
| 189 | + v-for="dict in dict.type.secret_level" | ||
| 190 | + :key="dict.value" | ||
| 191 | + :label="dict.label" | ||
| 192 | + :value="dict.value" | ||
| 193 | + ></el-option> | ||
| 194 | + </el-select> | ||
| 195 | + </el-form-item> | ||
| 196 | + <el-form-item label="原文版本" prop="version"> | ||
| 197 | + <el-input v-model="form.version" placeholder="请输入原文版本" /> | ||
| 198 | + </el-form-item> | ||
| 199 | + <el-form-item label="文件" > | ||
| 200 | + <file-upload v-model="form.file" @FileList="FileList"/> | ||
| 201 | + </el-form-item> | ||
| 202 | + </el-form> | ||
| 203 | + <div slot="footer" class="dialog-footer"> | ||
| 204 | + <el-button type="primary" @click="submitForm">确 定</el-button> | ||
| 205 | + <el-button @click="cancel">取 消</el-button> | ||
| 206 | + </div> | ||
| 207 | + </el-dialog> | ||
| 208 | + </div> | ||
| 209 | +</template> | ||
| 210 | + | ||
| 211 | +<script> | ||
| 212 | +import { listFile, getFile, delFile, addFile, updateFile } from "@/api/archives/file"; | ||
| 213 | + | ||
| 214 | +import preview from "@/views/archives/preview/preview"; | ||
| 215 | +export default { | ||
| 216 | + name: "File", | ||
| 217 | + dicts: ['original_type','secret_level'], | ||
| 218 | + components: { preview }, | ||
| 219 | + | ||
| 220 | + props: { | ||
| 221 | + collboxId: { | ||
| 222 | + type: Number, // 这里你接收的值是什么类型就写什么类型 | ||
| 223 | + }, | ||
| 224 | + }, | ||
| 225 | + data() { | ||
| 226 | + return { | ||
| 227 | + // 遮罩层 | ||
| 228 | + loading: true, | ||
| 229 | + // 选中数组 | ||
| 230 | + ids: [], | ||
| 231 | + // 非单个禁用 | ||
| 232 | + single: true, | ||
| 233 | + // 非多个禁用 | ||
| 234 | + multiple: true, | ||
| 235 | + // 显示搜索条件 | ||
| 236 | + showSearch: true, | ||
| 237 | + // 总条数 | ||
| 238 | + total: 0, | ||
| 239 | + // 文件表格数据 | ||
| 240 | + fileList: [], | ||
| 241 | + // 弹出层标题 | ||
| 242 | + title: "", | ||
| 243 | + // 是否显示弹出层 | ||
| 244 | + open: false, | ||
| 245 | + // 查询参数 | ||
| 246 | + queryParams: { | ||
| 247 | + pageNum: 1, | ||
| 248 | + pageSize: 10, | ||
| 249 | + colletctId: null, | ||
| 250 | + name: null, | ||
| 251 | + size: null, | ||
| 252 | + type: null, | ||
| 253 | + secretLevel: null, | ||
| 254 | + version: null, | ||
| 255 | + file: null, | ||
| 256 | + }, | ||
| 257 | + // 表单参数 | ||
| 258 | + form: {}, | ||
| 259 | + // 表单校验 | ||
| 260 | + rules: { | ||
| 261 | + }, | ||
| 262 | + fileurl: null, | ||
| 263 | + fileOpen: true | ||
| 264 | + }; | ||
| 265 | + }, | ||
| 266 | + created() { | ||
| 267 | + this.getList(); | ||
| 268 | + }, | ||
| 269 | + methods: { | ||
| 270 | + /** 查询文件列表 */ | ||
| 271 | + getList() { | ||
| 272 | + this.loading = true; | ||
| 273 | + listFile(this.queryParams).then(response => { | ||
| 274 | + this.fileList = response.rows; | ||
| 275 | + this.total = response.total; | ||
| 276 | + this.loading = false; | ||
| 277 | + }); | ||
| 278 | + }, | ||
| 279 | + // 取消按钮 | ||
| 280 | + cancel() { | ||
| 281 | + this.open = false; | ||
| 282 | + this.reset(); | ||
| 283 | + }, | ||
| 284 | + // 表单重置 | ||
| 285 | + reset() { | ||
| 286 | + this.form = { | ||
| 287 | + id: null, | ||
| 288 | + colletctId: null, | ||
| 289 | + name: null, | ||
| 290 | + size: null, | ||
| 291 | + type: null, | ||
| 292 | + secretLevel: null, | ||
| 293 | + version: null, | ||
| 294 | + file: null, | ||
| 295 | + createBy: null, | ||
| 296 | + createTime: null, | ||
| 297 | + updateBy: null, | ||
| 298 | + updateTime: null | ||
| 299 | + }; | ||
| 300 | + this.resetForm("form"); | ||
| 301 | + }, | ||
| 302 | + /** 搜索按钮操作 */ | ||
| 303 | + handleQuery() { | ||
| 304 | + this.queryParams.pageNum = 1; | ||
| 305 | + this.getList(); | ||
| 306 | + }, | ||
| 307 | + /** 重置按钮操作 */ | ||
| 308 | + resetQuery() { | ||
| 309 | + this.resetForm("queryForm"); | ||
| 310 | + this.handleQuery(); | ||
| 311 | + }, | ||
| 312 | + // 多选框选中数据 | ||
| 313 | + handleSelectionChange(selection) { | ||
| 314 | + this.ids = selection.map(item => item.id) | ||
| 315 | + this.single = selection.length!==1 | ||
| 316 | + this.multiple = !selection.length | ||
| 317 | + }, | ||
| 318 | + /** 新增按钮操作 */ | ||
| 319 | + handleAdd() { | ||
| 320 | + this.reset(); | ||
| 321 | + this.open = true; | ||
| 322 | + this.title = "添加文件"; | ||
| 323 | + }, | ||
| 324 | + /** 修改按钮操作 */ | ||
| 325 | + handleUpdate(row) { | ||
| 326 | + this.reset(); | ||
| 327 | + const id = row.id || this.ids | ||
| 328 | + getFile(id).then(response => { | ||
| 329 | + this.form = response.data; | ||
| 330 | + this.open = true; | ||
| 331 | + this.title = "修改文件"; | ||
| 332 | + }); | ||
| 333 | + }, | ||
| 334 | + /** 提交按钮 */ | ||
| 335 | + submitForm() { | ||
| 336 | + this.$refs["form"].validate(valid => { | ||
| 337 | + if (valid) { | ||
| 338 | + if (this.form.id != null) { | ||
| 339 | + updateFile(this.form).then(response => { | ||
| 340 | + this.$modal.msgSuccess("修改成功"); | ||
| 341 | + this.open = false; | ||
| 342 | + this.getList(); | ||
| 343 | + }); | ||
| 344 | + } else { | ||
| 345 | + addFile(this.form).then(response => { | ||
| 346 | + this.$modal.msgSuccess("新增成功"); | ||
| 347 | + this.open = false; | ||
| 348 | + this.getList(); | ||
| 349 | + }); | ||
| 350 | + } | ||
| 351 | + } | ||
| 352 | + }); | ||
| 353 | + }, | ||
| 354 | + /** 删除按钮操作 */ | ||
| 355 | + handleDelete(row) { | ||
| 356 | + const ids = row.id || this.ids; | ||
| 357 | + this.$modal.confirm('是否确认删除文件编号为"' + ids + '"的数据项?').then(function() { | ||
| 358 | + return delFile(ids); | ||
| 359 | + }).then(() => { | ||
| 360 | + this.getList(); | ||
| 361 | + this.$modal.msgSuccess("删除成功"); | ||
| 362 | + }).catch(() => {}); | ||
| 363 | + }, | ||
| 364 | + /** 导出按钮操作 */ | ||
| 365 | + handleExport() { | ||
| 366 | + this.download('archives/file/export', { | ||
| 367 | + ...this.queryParams | ||
| 368 | + }, `file_${new Date().getTime()}.xlsx`) | ||
| 369 | + }, | ||
| 370 | + clickFile(row) { | ||
| 371 | + this.fileurl = row.file; | ||
| 372 | + this.title = "..."; | ||
| 373 | + this.reload() | ||
| 374 | + }, | ||
| 375 | + | ||
| 376 | + reload(){ | ||
| 377 | + this.fileOpen = false; | ||
| 378 | + this.$nextTick(function (){ | ||
| 379 | + this.fileOpen = true; | ||
| 380 | + }) | ||
| 381 | + }, | ||
| 382 | + FileList(val){ | ||
| 383 | + this.form.name = val.originalFilename; | ||
| 384 | + this.form.size = Math.round(val.size) + "kb"; | ||
| 385 | + } | ||
| 386 | + } | ||
| 387 | +}; | ||
| 388 | +</script> |
ruoyi-ui/src/views/archives/index.vue
| @@ -35,15 +35,15 @@ | @@ -35,15 +35,15 @@ | ||
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | <el-tabs v-model="activeName" type="card" @tab-click="handleClick" v-if="stattwo"> | 37 | <el-tabs v-model="activeName" type="card" @tab-click="handleClick" v-if="stattwo"> |
| 38 | - <el-tab-pane label="未整理文件" name="first" > <indexbox :statusPd="0" v-if="isFirst"/></el-tab-pane> | 38 | + <el-tab-pane label="未整理文件" name="first" > <indexbox :statusPd=0 v-if="isFirst"/></el-tab-pane> |
| 39 | <el-tab-pane label="已整理文件" name="second" ><indexbox :statusPd="1" v-if="isSecond" /></el-tab-pane> | 39 | <el-tab-pane label="已整理文件" name="second" ><indexbox :statusPd="1" v-if="isSecond" /></el-tab-pane> |
| 40 | <el-tab-pane label="盒" name="third" ><box v-if="isThird" /></el-tab-pane> | 40 | <el-tab-pane label="盒" name="third" ><box v-if="isThird" /></el-tab-pane> |
| 41 | </el-tabs> | 41 | </el-tabs> |
| 42 | 42 | ||
| 43 | <el-tabs v-model="tactiveName" type="card" @tab-click="thandleClick" v-if="stat"> | 43 | <el-tabs v-model="tactiveName" type="card" @tab-click="thandleClick" v-if="stat"> |
| 44 | - <el-tab-pane label="未整理案卷" name="tfirst" > <indexvolume :statusPd="0" v-if="itFirst"/></el-tab-pane> | ||
| 45 | - <el-tab-pane label="已整理案卷" name="tsecond" ><indexvolume :statusPd="1" v-if="itSecond" /></el-tab-pane> | ||
| 46 | - <el-tab-pane label="组卷" name="tthird" ><indexvolume v-if="itThird" /></el-tab-pane> | 44 | + <el-tab-pane label="未整理文件" name="tfirst" > <indexvolume :statusPd=0 v-if="itFirst"/></el-tab-pane> |
| 45 | + <el-tab-pane label="未整理案卷" name="tsecond" ><indexvolume :statusPd="1" v-if="itSecond" /></el-tab-pane> | ||
| 46 | + <el-tab-pane label="已整理案卷" name="tthird" ><indexvolume v-if="itThird" /></el-tab-pane> | ||
| 47 | </el-tabs> | 47 | </el-tabs> |
| 48 | 48 | ||
| 49 | 49 | ||
| @@ -55,9 +55,9 @@ | @@ -55,9 +55,9 @@ | ||
| 55 | 55 | ||
| 56 | <script > | 56 | <script > |
| 57 | import {treeselect} from "@/api/archives/dept"; | 57 | import {treeselect} from "@/api/archives/dept"; |
| 58 | -import indexbox from "@/views/archives/collerctbox"; | ||
| 59 | -import box from "@/views/archives/box"; | ||
| 60 | -import indexvolume from "@/views/archives/volume"; | 58 | +import indexbox from "@/views/archives/collerctbox/index"; |
| 59 | +import box from "@/views/archives/box/index"; | ||
| 60 | +import indexvolume from "@/views/archives/volume/index"; | ||
| 61 | export default { | 61 | export default { |
| 62 | components: { indexbox ,indexvolume,box}, | 62 | components: { indexbox ,indexvolume,box}, |
| 63 | name: "archiveindex", | 63 | name: "archiveindex", |
ruoyi-ui/src/views/archives/preview/preview.vue
| @@ -16,26 +16,24 @@ import {treeselect} from "@/api/archives/dept"; | @@ -16,26 +16,24 @@ import {treeselect} from "@/api/archives/dept"; | ||
| 16 | export default { | 16 | export default { |
| 17 | 17 | ||
| 18 | props: { | 18 | props: { |
| 19 | - url: { | 19 | + fileurl: { |
| 20 | type: String, // 这里你接收的值是什么类型就写什么类型 | 20 | type: String, // 这里你接收的值是什么类型就写什么类型 |
| 21 | } | 21 | } |
| 22 | }, | 22 | }, |
| 23 | 23 | ||
| 24 | name: "preview", | 24 | name: "preview", |
| 25 | +/* inject:['reload'],*/ | ||
| 25 | data() { | 26 | data() { |
| 26 | return { | 27 | return { |
| 27 | - | ||
| 28 | reportUrl : null, | 28 | reportUrl : null, |
| 29 | - url:null | ||
| 30 | }; | 29 | }; |
| 31 | }, | 30 | }, |
| 32 | created(){ | 31 | created(){ |
| 33 | - debugger | 32 | + if(this.fileurl != null && this.fileurl != undefined){ |
| 34 | 33 | ||
| 35 | - alert(process.env.npm_config_port); | ||
| 36 | - let a = process.env.VUE_APP_BASE_API; | ||
| 37 | - let urll = "http://localhost"+ process.env.VUE_APP_BASE_API +this.url; //要预览文件的访问地址 | ||
| 38 | - this.reportUrl = 'http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(bsbase64Encode.encode(urll)); | 34 | + let url = "http://localhost"+ process.env.VUE_APP_BASE_API +this.fileurl; //要预览文件的访问地址 |
| 35 | + this.reportUrl = 'http://127.0.0.1:8012/onlinePreview?url='+encodeURIComponent(bsbase64Encode.encode(url)); | ||
| 36 | + } | ||
| 39 | }, | 37 | }, |
| 40 | methods: { | 38 | methods: { |
| 41 | 39 |
ruoyi-ui/src/views/archives/volume/index.vue
| @@ -204,6 +204,12 @@ import { listVolume, getVolume, delVolume, addVolume, updateVolume } from "@/api | @@ -204,6 +204,12 @@ import { listVolume, getVolume, delVolume, addVolume, updateVolume } from "@/api | ||
| 204 | 204 | ||
| 205 | export default { | 205 | export default { |
| 206 | name: "Volume", | 206 | name: "Volume", |
| 207 | + props: { | ||
| 208 | + statusPd: { | ||
| 209 | + type: Number, // 这里你接收的值是什么类型就写什么类型 | ||
| 210 | + } | ||
| 211 | + }, | ||
| 212 | + | ||
| 207 | data() { | 213 | data() { |
| 208 | return { | 214 | return { |
| 209 | // 遮罩层 | 215 | // 遮罩层 |