liuchanglan 4 years ago
parent
commit
42d5b60a24
47 changed files with 1081 additions and 433 deletions
  1. 2 2
      README.md
  2. 1 0
      pom.xml
  3. 0 1
      src/main/java/com/gz/GuihuaArchivesApplication.java
  4. 1 1
      src/main/java/com/gz/aop/WebLogAspect.java
  5. 49 12
      src/main/java/com/gz/config/MountArchiveFileConfig.java
  6. 16 14
      src/main/java/com/gz/core/exception/CustomExceptionEnum.java
  7. 74 17
      src/main/java/com/gz/job/MountArchiveFileJob.java
  8. 1 0
      src/main/java/com/gz/rvo/archive/ArchiveRVO.java
  9. 91 14
      src/main/java/com/gz/scheduled/ScanArchiveFileScheduled.java
  10. 6 3
      src/main/java/com/gz/service/archive/impl/ArchiveServiceImpl.java
  11. 3 0
      src/main/java/com/gz/service/statistics/SelectStatisticsService.java
  12. 50 0
      src/main/java/com/gz/service/statistics/impl/SelectStatisticsServiceImpl.java
  13. 4 1
      src/main/java/com/gz/utils/ExcelUtils.java
  14. 6 0
      src/main/java/com/gz/vo/archive/SearchArchiveVO.java
  15. 3 1
      src/main/resources/application-dev.yml
  16. 4 2
      src/main/resources/application-prod.yml
  17. 2 0
      src/main/resources/application-test.yml
  18. 1 1
      src/main/resources/logback-spring.xml
  19. 1 0
      src/main/resources/mapper/archiveFileMapper.xml
  20. 25 21
      src/main/resources/mapper/archiveMapper.xml
  21. 0 1
      src/main/resources/static/js/lay-module/layuimini/miniAdmin.js
  22. 0 3
      src/main/resources/static/js/lay-module/layuimini/miniMenu.js
  23. 3 2
      src/main/resources/static/js/lay-module/request/http.js
  24. 2 3
      src/main/resources/static/js/lay-module/treeSelect/treeSelect.js
  25. 3 4
      src/main/resources/static/js/lay-module/wangEditor/wangEditor.js
  26. 6 3
      src/main/resources/static/page/admin/list.html
  27. 17 14
      src/main/resources/static/page/archive/advancedSearch.html
  28. 514 208
      src/main/resources/static/page/archive/edit.html
  29. 6 3
      src/main/resources/static/page/archive/fileList.html
  30. 55 25
      src/main/resources/static/page/archive/list.html
  31. 6 4
      src/main/resources/static/page/archive/secondaryList.html
  32. 41 22
      src/main/resources/static/page/archive/show.html
  33. 3 1
      src/main/resources/static/page/archive/upload.html
  34. 0 1
      src/main/resources/static/page/archives-tree/edit.html
  35. 9 5
      src/main/resources/static/page/auditList/list.html
  36. 25 7
      src/main/resources/static/page/borrow/list.html
  37. 7 2
      src/main/resources/static/page/borrow/listaaa.html
  38. 7 2
      src/main/resources/static/page/borrow/reserve.html
  39. 9 10
      src/main/resources/static/page/home/new_file.html
  40. 6 4
      src/main/resources/static/page/log/logsList.html
  41. 0 2
      src/main/resources/static/page/menu/addMenu.html
  42. 8 3
      src/main/resources/static/page/myBorrow/list.html
  43. 0 2
      src/main/resources/static/page/role/editRole.html
  44. 6 3
      src/main/resources/static/page/role/list.html
  45. 1 4
      src/main/resources/static/page/user/addUser.html
  46. 6 3
      src/main/resources/static/page/user/userList.html
  47. 1 2
      src/main/resources/static/page/user/userRole.html

+ 2 - 2
README.md

@@ -1,4 +1,4 @@
-# 国土档案
+# 南京市规划和自然资源局综合档案系统
 
 ## 1.环境信息
 
@@ -35,7 +35,7 @@ ______
 > * 位置:`/data/redis`
 > * 配置文件:`/data/redis-5.0.0/redis.conf`
 
-### 2.0 应用服务器
+### 2.2 应用服务器
 
 > ##### 配置:16h32g 1000g Centos7.8
 > * ip `66.1.21.158`

+ 1 - 0
pom.xml

@@ -34,6 +34,7 @@
         <skipTests>true</skipTests>
     </properties>
 
+
     <dependencies>
         <!--        aop-->
         <dependency>

+ 0 - 1
src/main/java/com/gz/GuihuaArchivesApplication.java

@@ -5,7 +5,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.scheduling.annotation.EnableScheduling;
 
-@EnableAsync
 @EnableScheduling
 @SpringBootApplication
 public class GuihuaArchivesApplication {

+ 1 - 1
src/main/java/com/gz/aop/WebLogAspect.java

@@ -29,7 +29,7 @@ import javax.servlet.http.HttpServletRequest;
  */
 @Aspect
 @Component
-@Profile("test")
+//@Profile("test")
 public class WebLogAspect {
 
     /**

+ 49 - 12
src/main/java/com/gz/config/MountArchiveFileConfig.java

@@ -1,8 +1,13 @@
 package com.gz.config;
 
+import cn.hutool.core.util.ReUtil;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Configuration;
 
+import javax.annotation.PostConstruct;
 import java.io.File;
+import java.util.HashMap;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.LinkedBlockingQueue;
@@ -12,18 +17,50 @@ import java.util.concurrent.LinkedBlockingQueue;
  * @author LiuchangLan
  * @date 2021/3/16 13:21
  */
+@Slf4j
 @Configuration
 public class MountArchiveFileConfig {
-    // 扫描根目录
-    public static final String scanBasePath = "E:\\cache";
-    // pdf队列
-    public static final LinkedBlockingQueue<File> PDFQueue = new LinkedBlockingQueue<>();
-    // tif队列
-    public static final LinkedBlockingQueue<File> TIFQueue = new LinkedBlockingQueue<>();
-    // 移动文件耗时小 选择newCachedThreadPool线程池
-    public static final ExecutorService executorService = Executors.newCachedThreadPool();
-    // PDF 文件夹包含Key
-    public static final String PDFFolderKey = "PDF";
-    // TIF 文件夹包含Key
-    public static final String TIFFolderKey = "TIF";
+    /** 扫描根目录*/
+    public static String SCAN_BASE_PATH = "";
+    /** pdf队列*/
+    public static final LinkedBlockingQueue<File> PDF_QUEUE = new LinkedBlockingQueue<>();
+    /** tif队列*/
+    public static final LinkedBlockingQueue<File> TIF_QUEUE = new LinkedBlockingQueue<>();
+    /** 等待处理的文件*/
+    public static final HashMap<String,File> WAIT_HANDLE_FILE = new HashMap<>();
+    /** pdf文件偏小 数量偏多 移动文件耗时小 选择newCachedThreadPool线程池*/
+    public static final ExecutorService ARCHIVE_HANDLE_JOB_THREAD_POOL = Executors.newCachedThreadPool();
+    /** PDF正在执行的任务队列*/
+    public static final String SCAN_JOB_QUEUE = "PDF_JOB_QUEUE";
+    /** PDF 文件夹命名正则*/
+    public static final String PDF_FOLDER_PATTERN = ".*(\\d{4})-PDF";
+    /** TIF 文件夹命名正则*/
+    public static final String TIF_FOLDER_PATTERN = ".*(\\d{4})-TIF";
+    /** pdf文件名正则*/
+    public static final String PDF_FILE_PATTERN = ".*\\.pdf$";
+    /** tif文件名正则*/
+    public static final String TIF_FILE_PATTERN = ".*\\.tif$";
+
+    /** 挂载错误redis记录key*/
+    public static final String ARCHIVE_FILE_MOUNT_ERROR_FOMAT = "MOUNT_ERROR_%s";
+
+    /** ---------------------redis存储错误信息---------------------*/
+    /** 错误信息key*/
+    public static final String ERROR_MSG_KEY = "error_msg";
+    /** 错误时间key*/
+    public static final String ERROR_TIME_KEY = "error_time";
+    /** 错误文件key*/
+    public static final String ERROR_FILE_PATH_KEY = "error_file_path";
+
+    @Value("${mount-archive.scan-base-path}")
+    public void setArchiveFileRootDirectory(String scanBasePath) {
+        log.info("待挂接文件扫描根目录:{}",scanBasePath);
+        SCAN_BASE_PATH = scanBasePath;
+    }
+
+
+    public static void main(String[] args) {
+        boolean match = ReUtil.isMatch("\\^([a-zA-Z]+-?)+[a-zA-Z0-9]+\\\\.[x|X][m|M][l|L]$", "a.xml");
+        System.out.println(match);
+    }
 }

+ 16 - 14
src/main/java/com/gz/core/exception/CustomExceptionEnum.java

@@ -5,33 +5,35 @@ import lombok.AllArgsConstructor;
 import lombok.Getter;
 
 /**
- * @description 自定义异常枚举
  * @author LiuChangLan
+ * @description 自定义异常枚举
  * @since 2021/1/26 22:23
  */
 @Getter
 @AllArgsConstructor
 public enum CustomExceptionEnum implements CustomResponsInterface {
 
-    ACCOUNT_OR_PASSWORD_INCORRECT(1000,"用户名不存在、或者密码不正确!"),
-    ACCOUNT_DISABLE(1001,"用户已禁用"),
-    LOGIN_TIMEOUT(1002,"登录已过期"),
-    CAPTCHA_ERROR(1003,"验证码错误"),
-    DICT_CODE_EXISTS(1004,"字典编码已存在,请更换"),
-    File_NOT_EXISTS(1005,"请选择一个文件"),
-    PASSWORD_NO_INCORRECT(1006,"密码不正确"),
-    GENERATE_DH_ERROR(1007,"档号生成失败"),
-    UPLOAD_ARCHIVE_FILE_TYPE_ERROR(1008,"档案附件暂只支持PDF、TIF"),
+    ACCOUNT_OR_PASSWORD_INCORRECT(1000, "用户名不存在、或者密码不正确!"),
+    ACCOUNT_DISABLE(1001, "用户已禁用"),
+    LOGIN_TIMEOUT(1002, "登录已过期"),
+    CAPTCHA_ERROR(1003, "验证码错误"),
+    DICT_CODE_EXISTS(1004, "字典编码已存在,请更换"),
+    File_NOT_EXISTS(1005, "请选择一个文件"),
+    PASSWORD_NO_INCORRECT(1006, "密码不正确"),
+    GENERATE_DH_ERROR(1007, "档号生成失败"),
+    UPLOAD_ARCHIVE_FILE_TYPE_ERROR(1008, "档案附件暂只支持PDF、TIF"),
 
 
-    ORIGINAL_SCRIPT_NO_EXISTS(1009,"原件已被借阅"),
-    REPEAT_BORROW(1010,"您提交已借阅该文档,请勿重复借阅");
+    ORIGINAL_SCRIPT_NO_EXISTS(1009, "原件已被借阅"),
+    REPEAT_BORROW(1010, "您提交已借阅该文档,请勿重复借阅"),
 
 
+    ARCHIVE_DATA_NOT_EXISTS(1100, "归档数据不存在"),
+    DEL_ORIGINAL_FILE_ERROR(1101,"删除原文件失败")
 
     ;
 
 
-    private Integer code;
-    private String msg;
+    private final Integer code;
+    private final String msg;
 }

+ 74 - 17
src/main/java/com/gz/job/MountArchiveFileJob.java

@@ -1,10 +1,22 @@
 package com.gz.job;
 
+import cn.hutool.core.date.DateUtil;
+import cn.hutool.core.io.FileUtil;
+import com.gz.config.FileUploadConfig;
 import com.gz.config.MountArchiveFileConfig;
+import com.gz.core.exception.BusinessException;
+import com.gz.core.exception.CustomExceptionEnum;
+import com.gz.dto.archive.ArchiveDTO;
+import com.gz.dto.system.ArchiveFileDTO;
+import com.gz.mapper.archive.ArchiveFileMapper;
+import com.gz.mapper.archive.ArchiveMapper;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Profile;
+import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
 import java.io.File;
 
 /**
@@ -17,25 +29,70 @@ import java.io.File;
 @Component
 public class MountArchiveFileJob {
 
+    @Resource
+    private ArchiveMapper archiveMapper;
+
+    @Resource
+    private ArchiveFileMapper archiveFileMapper;
+
+    @Resource
+    private StringRedisTemplate stringRedisTemplate;
+
     @PostConstruct
     public void HandelePDFJob() {
-        MyThread thread = new MyThread();
-        thread.start();
-    }
-
-    public class MyThread extends Thread{
-        @Override
-        public void run() {
-            try {
-                final File pdfFolder = MountArchiveFileConfig.PDFQueue.take();
-                MountArchiveFileConfig.executorService.execute(() -> {
-                    System.out.println(pdfFolder.getName());
-                });
-            } catch (InterruptedException e) {
-                e.printStackTrace();
+        log.info("[归档任务]初始化PDF文件归档任务线程");
+        // 另一个线程启动 监听队列
+        new Thread(() -> {
+            while (true) {
+                try {
+                    final File pdf = MountArchiveFileConfig.PDF_QUEUE.take(); // 读取队列中信息 size为0 阻塞线程
+                    log.debug("读取PDF:{},现在队列剩余:{}", pdf.getName(), MountArchiveFileConfig.PDF_QUEUE.size());
+                    MountArchiveFileConfig.ARCHIVE_HANDLE_JOB_THREAD_POOL.execute(() -> {
+                        String key = "";
+                        try {
+                            // 文件名
+                            String name = pdf.getName();
+                            // 文件名不带扩展名 就是档号
+                            String dh = FileUtil.mainName(pdf);
+                            // redisKey
+                            key = String.format(MountArchiveFileConfig.ARCHIVE_FILE_MOUNT_ERROR_FOMAT, pdf.getName());
+                            // 判断是否在错误队列 错误队列跳过
+                            if (!stringRedisTemplate.hasKey(key)) {
+                                ArchiveDTO archiveDTO = new ArchiveDTO();
+                                archiveDTO.setDh(dh);
+                                archiveDTO = archiveMapper.selectOne(archiveDTO);
+                                if (archiveDTO == null) {
+                                    throw new BusinessException(CustomExceptionEnum.ARCHIVE_DATA_NOT_EXISTS);
+                                }
+                                String finallyPath = "/" + archiveDTO.getQzh() + "/" + archiveDTO.getGdnd() + "/" + archiveDTO.getMl() + "/" + archiveDTO.getBgqx() + "/" + archiveDTO.getDh() + "/pdf/";
+                                FileUtil.copy(pdf, new File(FileUploadConfig.ARCHIVE_FILE_ROOT_DIRECTORY + finallyPath + name), false);
+                                log.debug("复制文件:[{}]成功", name);
+                                // 删除扫描成功文件
+                                if (!FileUtil.del(pdf)) {
+                                    throw new BusinessException(CustomExceptionEnum.DEL_ORIGINAL_FILE_ERROR);
+                                }
+                                ArchiveFileDTO archiveFileDTO = new ArchiveFileDTO();
+                                archiveFileDTO.setArchiveId(archiveDTO.getId());
+                                archiveFileDTO.setFileName(pdf.getName());
+                                archiveFileDTO.setOriginalFileName(pdf.getName());
+                                archiveFileDTO.setFileSize(FileUtil.size(pdf));
+                                archiveFileDTO.setFilePath(finallyPath);
+                                archiveFileDTO.setFileType(0);
+                                archiveFileMapper.insertSelective(archiveFileDTO);
+                                // TODO: 2021/3/17 发送rabbitmq 队列消息
+                            }
+                        } catch (Exception e) {
+                            log.error("挂载出现错误:", e);
+                            stringRedisTemplate.opsForHash().put(key, MountArchiveFileConfig.ERROR_MSG_KEY, e.getMessage());
+                            stringRedisTemplate.opsForHash().put(key, MountArchiveFileConfig.ERROR_TIME_KEY, DateUtil.now());
+                            stringRedisTemplate.opsForHash().put(key, MountArchiveFileConfig.ERROR_FILE_PATH_KEY, pdf.getPath());
+                        }
+                        MountArchiveFileConfig.WAIT_HANDLE_FILE.remove(pdf.getPath()); // 执行完毕 移除等待处理Map
+                    });
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
             }
-        }
+        }).start();
     }
-
-
 }

+ 1 - 0
src/main/java/com/gz/rvo/archive/ArchiveRVO.java

@@ -11,4 +11,5 @@ import lombok.Data;
 public class ArchiveRVO extends ArchiveDTO {
     private String mjText;
     private String mlText;
+    private String bgqxText;
 }

+ 91 - 14
src/main/java/com/gz/scheduled/ScanArchiveFileScheduled.java

@@ -1,12 +1,21 @@
 package com.gz.scheduled;
 
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.io.FileUtil;
+import cn.hutool.core.util.StrUtil;
+import com.gz.config.FileUploadConfig;
 import com.gz.config.MountArchiveFileConfig;
 import com.gz.core.exception.BusinessException;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Profile;
+import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Component;
 
+import javax.annotation.PostConstruct;
+import javax.annotation.Resource;
 import java.io.File;
+import java.util.Set;
 
 /**
  * 扫描档案文件定时任务
@@ -16,26 +25,94 @@ import java.io.File;
  */
 @Slf4j
 @Component
+@Profile("prod")
 public class ScanArchiveFileScheduled {
 
-    @Scheduled(cron = "0/5 * * * * ?")
+    @Resource
+    private StringRedisTemplate stringRedisTemplate;
+
+
+    /**
+     * @description 递归扫描文件夹 pdf、tif 文件放入队列 其他文件、空文件夹删除处理
+     * @author LiuChangLan
+     * @since 2021/3/23 15:52
+     */
+    private void sendFileToQUeue(File directory) throws InterruptedException {
+        if (directory.isDirectory()) {
+            File[] files = directory.listFiles();
+            if (files.length == 0 && !directory.getPath().equals(MountArchiveFileConfig.SCAN_BASE_PATH)) {
+                FileUtil.del(directory);
+                log.info("文件夹{}为空,自动删除", directory.getPath());
+            }
+            for (File file : files) {
+                if (file.isDirectory()) {
+                    // 扫描到文件夹 递归
+                    sendFileToQUeue(file);
+                } else {
+                    // 等待处理中 跳过 处理错误 跳过
+                    if (MountArchiveFileConfig.WAIT_HANDLE_FILE.containsKey(file.getPath())) {
+                        log.info("文件[{}]待处理 跳过待处理文件", file.getPath());
+                        continue;
+                    }
+                    if (stringRedisTemplate.hasKey(String.format(MountArchiveFileConfig.ARCHIVE_FILE_MOUNT_ERROR_FOMAT, file.getName()))) {
+                        log.info("文件[{}]处理错误 跳过处理错误文件", file.getPath());
+                        continue;
+                    }
+                    // pdf 文件
+                    if ("pdf".equals(FileUtil.getType(file))) {
+                        MountArchiveFileConfig.WAIT_HANDLE_FILE.put(file.getPath(), file);
+                        MountArchiveFileConfig.PDF_QUEUE.put(file);
+                        log.info("扫描到pdf文件,当前队列还剩余{}个", MountArchiveFileConfig.PDF_QUEUE.size());
+                        // tif 文件
+                    } else if ("tif".equals(FileUtil.getType(file))) {
+                        MountArchiveFileConfig.WAIT_HANDLE_FILE.put(file.getPath(), file);
+                        MountArchiveFileConfig.TIF_QUEUE.put(file);
+                        log.info("扫描到tif文件,当前队列还剩余{}个", MountArchiveFileConfig.TIF_QUEUE.size());
+                    } else {
+                        FileUtil.del(file);
+                        log.info("扫描到其他类型文件,删除文件[{}]", file);
+                    }
+                }
+            }
+        } else {
+            throw new BusinessException(500, "入参非路径");
+        }
+    }
+
+    /**
+     * @description 扫描根目录下的文件 进行入队
+     * @author LiuChangLan
+     * @since 2021/3/17 14:16
+     */
+    @Scheduled(cron = "0/30 * * * * ?")
     public void startScan() throws InterruptedException {
-        log.debug("开始扫描");
-        File file = new File(MountArchiveFileConfig.scanBasePath);
-        if (!file.exists()) {
+        if (StrUtil.isEmpty(MountArchiveFileConfig.SCAN_BASE_PATH)) {
+            log.warn("未配置扫描根目录 跳过扫描");
+            return;
+        }
+        log.debug("开始扫描[{}]下的档案文件", MountArchiveFileConfig.SCAN_BASE_PATH);
+        File scanPath = new File(MountArchiveFileConfig.SCAN_BASE_PATH);
+        if (!scanPath.exists()) {
             throw new BusinessException(500, "档案根目录不存在,无法扫描");
         }
-        for (File yearDirectory : file.listFiles()) {
-            for (File archiveDirectory : yearDirectory.listFiles()) {
-                if (archiveDirectory.getName().contains(MountArchiveFileConfig.PDFFolderKey)) {
-                    MountArchiveFileConfig.PDFQueue.put(archiveDirectory);
-                    log.debug("扫描到PDF文件夹:{},现在队列共有{}", archiveDirectory.getName(), MountArchiveFileConfig.PDFQueue.size());
-                } else if (archiveDirectory.getName().contains(MountArchiveFileConfig.TIFFolderKey)) {
-                    log.debug("扫描到TIF文件夹:{},现在队列共有{}", archiveDirectory.getName(), MountArchiveFileConfig.TIFQueue.size());
-                    MountArchiveFileConfig.TIFQueue.put(archiveDirectory);
-                }
-            }
+        this.sendFileToQUeue(scanPath);
+    }
 
+    /**
+     * @description 挂载错误 定时重新入队
+     * @author LiuChangLan
+     * @since 2021/3/17 14:15
+     */
+    @Scheduled(cron = "0 0 1 * * ?")
+//    @Scheduled(cron = "0/30 * * * * ?")
+    public void errorRejoinQueue() throws InterruptedException {
+        log.debug("开始读取错误队列,重新放入队列进行挂载");
+        Set<String> keys = stringRedisTemplate.keys(String.format(MountArchiveFileConfig.ARCHIVE_FILE_MOUNT_ERROR_FOMAT, "*"));
+        for (String key : keys) {
+            String pdfPath = stringRedisTemplate.opsForHash().get(key, MountArchiveFileConfig.ERROR_FILE_PATH_KEY).toString();
+            MountArchiveFileConfig.PDF_QUEUE.put(new File(pdfPath));
+            log.debug("错误文件:[{}]重新入队", pdfPath);
+            stringRedisTemplate.delete(key);
         }
     }
 }

+ 6 - 3
src/main/java/com/gz/service/archive/impl/ArchiveServiceImpl.java

@@ -36,9 +36,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.multipart.MultipartFile;
-import sun.plugin2.applet.context.InitialJNLPExecutionContext;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
@@ -226,7 +224,11 @@ public class ArchiveServiceImpl implements ArchiveService {
     @Override
     public String generateDh(GenerateDhVO vo) {
         String jh = String.format("%05d", vo.getJh());
-        vo.setMl(archivesTreeService.selectParentByCode(vo.getMl()).getCode());
+        ArchivesTreeDTO dto = archivesTreeService.selectParentByCode(vo.getSl());
+        if (dto != null){
+            vo.setMl(dto.getCode());
+        }
+
         switch (vo.getMl()) {
             case "WS":
                 return String.format(DataGlobalVariable.WS_DH_FOMAT, vo.getQzh(), vo.getGdnd(), vo.getBgqx(), jh);
@@ -272,6 +274,7 @@ public class ArchiveServiceImpl implements ArchiveService {
                 dto.setMj(ExcelUtils.getExcelCellStringValue(row, 4));
                 dto.setBgqx(ExcelUtils.getExcelCellStringValue(row, 5));
                 // TODO: 2021/2/25 机构代号 6 馆编号 7
+                dto.setJh(ExcelUtils.getExcelCellIntegerValue(row,7));
                 dto.setZtsl(ExcelUtils.getExcelCellIntegerValue(row, 8));
                 dto.setWjbh(ExcelUtils.getExcelCellStringValue(row, 9));
                 DateTime wjxcsj = DateUtil.parse(ExcelUtils.getExcelCellStringValue(row, 10), "yyyyMMdd");

+ 3 - 0
src/main/java/com/gz/service/statistics/SelectStatisticsService.java

@@ -7,6 +7,7 @@ import com.gz.rvo.statistics.BorrowStatisticsRVO;
 import com.gz.vo.statistics.StatisticsVO;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 查询统计Service
@@ -20,4 +21,6 @@ public interface SelectStatisticsService {
     List<ArchiveYearStatisticsRVO> selectArchiveYearStatistics(StatisticsVO vo);
 
     List<BorrowStatisticsRVO> selectBorrowStatistics(StatisticsVO vo);
+
+    Map<String,Integer> selectUserBorrowCountStatistics();
 }

+ 50 - 0
src/main/java/com/gz/service/statistics/impl/SelectStatisticsServiceImpl.java

@@ -1,11 +1,16 @@
 package com.gz.service.statistics.impl;
 
+import cn.hutool.core.date.DateTime;
+import cn.hutool.core.date.DateUnit;
+import cn.hutool.core.date.DateUtil;
 import cn.hutool.core.lang.tree.Tree;
 import cn.hutool.core.lang.tree.TreeNodeConfig;
 import cn.hutool.core.lang.tree.TreeUtil;
 import com.alibaba.fastjson.JSONObject;
 import com.gz.common.DataGlobalVariable;
+import com.gz.dto.borrow.ArchiveBorrowDTO;
 import com.gz.dto.system.ArchivesTreeDTO;
+import com.gz.mapper.borrow.ArchiveBorrowMapper;
 import com.gz.mapper.statistics.SelectStatisticsMapper;
 import com.gz.mapper.system.ArchivesTreeMapper;
 import com.gz.rvo.statistics.ArchiveStatisticsRVO;
@@ -13,7 +18,11 @@ import com.gz.rvo.statistics.ArchiveYearStatisticsRVO;
 import com.gz.rvo.statistics.BorrowStatisticsRVO;
 import com.gz.service.statistics.SelectStatisticsService;
 import com.gz.service.system.ArchivesTreeService;
+import com.gz.utils.JwtUtils;
 import com.gz.vo.statistics.StatisticsVO;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import org.mybatis.spring.annotation.MapperScan;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.core.StringRedisTemplate;
@@ -22,7 +31,9 @@ import org.springframework.util.StringUtils;
 
 import javax.annotation.Resource;
 import javax.persistence.Id;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 import java.util.concurrent.TimeUnit;
 import java.util.stream.Collectors;
 
@@ -44,6 +55,9 @@ public class SelectStatisticsServiceImpl implements SelectStatisticsService {
     @Autowired
     private StringRedisTemplate stringRedisTemplate;
 
+    @Resource
+    private ArchiveBorrowMapper archiveBorrowMapper;
+
     @Override
     public List<ArchiveStatisticsRVO> selectStatisticsByType(StatisticsVO vo) {
         if (vo.getMl() != null) {
@@ -113,4 +127,40 @@ public class SelectStatisticsServiceImpl implements SelectStatisticsService {
             return JSONObject.parseObject(listString, List.class);
         }
     }
+
+
+    @Override
+    public Map<String,Integer> selectUserBorrowCountStatistics() {
+        ArchiveBorrowDTO param = new ArchiveBorrowDTO();
+        param.setAdminId(JwtUtils.getCurrentUserJwtPayload().getId());
+        List<ArchiveBorrowDTO> selectResult = archiveBorrowMapper.select(param);
+        Integer dqwgh = 0, // 到期未归还
+                jjdq = 0, // 即将到期
+                sqwcl = 0, // 申请未处理
+                lsjyw = selectResult.size(); // 历史借阅数
+
+        for (ArchiveBorrowDTO item : selectResult) {
+            // 当前时间
+            DateTime now = DateUtil.date();
+            // 预计归还时间
+            DateTime estimateReturnTime = DateUtil.parseDate(item.getEstimateReturnTime());
+            // 已经过期 未归还 原件借阅 借阅审核已通过
+            if (now.before(estimateReturnTime) && item.getReturnStatus() == 0 && item.getBorrowType() == 1 && item.getAuditStatus() == 2){
+                dqwgh ++;
+            }
+            // 剩余3天为即将到期
+            if (DateUtil.between(now,estimateReturnTime, DateUnit.DAY) == 3){
+                jjdq ++;
+            }
+            if (item.getBorrowType() == 1 && item.getAuditStatus() == 0){
+                sqwcl ++;
+            }
+        }
+        Map<String,Integer> result = new HashMap<>();
+        result.put("dqwgh", dqwgh);
+        result.put("jjdq", jjdq);
+        result.put("sqwcl", sqwcl);
+        result.put("lsjyw",lsjyw);
+        return result;
+    }
 }

+ 4 - 1
src/main/java/com/gz/utils/ExcelUtils.java

@@ -20,8 +20,11 @@ public class ExcelUtils {
     public static String getExcelCellStringValue(List<Object> row, int index) {
         if (index >= row.size()) {
             return null;
+        }else if (row.get(index) == null){
+            return null;
+        }else {
+            return String.valueOf(row.get(index)).trim();
         }
-        return String.valueOf(row.get(index)).trim();
     }
 
     /**

+ 6 - 0
src/main/java/com/gz/vo/archive/SearchArchiveVO.java

@@ -44,6 +44,12 @@ public class SearchArchiveVO extends PageVO {
     // 结果中检索
     private boolean again;
 
+    // 排序字段
+    private String field;
+
+    // 排序方式
+    private String order;
+
     public boolean getAgain(){
         return this.again;
     }

+ 3 - 1
src/main/resources/application-dev.yml

@@ -1,5 +1,5 @@
 server:
-  port: 9091
+  port: 9092
 spring:
   resources:
     static-locations: classpath:/static,classpath:/public,classpath:/resources,classpath:/META-INF/resources,file:${upload-file.file-root-directory},file:${upload-file.archive-file-root-directory}
@@ -97,3 +97,5 @@ upload-file:
 logging:
   file:
     path: D:\logs\guihua_archive
+mount-archive:
+  scan-base-path: C:\Users\84731\Desktop\资料 (1)

+ 4 - 2
src/main/resources/application-prod.yml

@@ -92,8 +92,10 @@ spring:
           initial-interval: 5000
 upload-file:
   server-file-url-prefix: http://66.1.21.158:${server.port}
-  file-root-directory: /data/file/archive_file
-  archive-file-root-directory: /data/file
+  file-root-directory: /data/file
+  archive-file-root-directory: /data/file/archive_file
 logging:
   file:
     path: /data/logs
+mount-archive:
+  scan-base-path: /home/挂档根目录

+ 2 - 0
src/main/resources/application-test.yml

@@ -97,3 +97,5 @@ upload-file:
 logging:
   file:
     path: /data/logs
+mount-archive:
+  scan-base-path: /home/挂档根目录

+ 1 - 1
src/main/resources/logback-spring.xml

@@ -212,7 +212,7 @@
     因为mybatis打印的sql日志是debug级别的,如果将所有的debug都打印出来会特别乱,
     所以特意指定mybatis的日志为debug,其他的为info
 -->
-    <logger name="com.gz.mapper" level="debug" additivity="false">
+    <logger name="com.gz" level="debug" additivity="false">
         <appender-ref ref="CONSOLE"/>
     </logger>
 

+ 1 - 0
src/main/resources/mapper/archiveFileMapper.xml

@@ -9,6 +9,7 @@
             AND af.archive_id = #{archiveId}
         </if>
         AND file_type = 0
+        AND af.deleted = 0
     </where>
     </select>
 

+ 25 - 21
src/main/resources/mapper/archiveMapper.xml

@@ -49,7 +49,9 @@
                 ${sql}
             </if>
         </where>
-        order by create_time desc
+        <if test="field != null and field != '' and order != null and order != ''">
+            order by ${field} ${order}
+        </if>
     </select>
 
 
@@ -84,7 +86,9 @@
                 ${sql}
             </if>
         </where>
-        order by create_time desc
+        <if test="field != null and field != '' and order != null and order != ''">
+            order by ${field} ${order}
+        </if>
     </select>
 
 
@@ -167,25 +171,25 @@
     </select>
 
     <select id="selectByPrimaryKeyText" resultType="com.gz.rvo.archive.ArchiveRVO">
-        SELECT
-            IF
-                (
-                    atr.parent_id = - 1,
-                    atr.title,
-                    concat(
-                            concat( ( SELECT c.title FROM tab_archives_tree c WHERE c.id = atr.parent_id ), '-' ),
-                            atr.title
-                        )
-                ) mlText,
-            d.dict_name mjText,
-            a.*
-        FROM
-            tab_archives a
-                LEFT JOIN tab_archives_tree atr ON a.ml = atr.CODE
-                left join tab_dict d on a.mj = d.dict_code
+        SELECT IF
+                   (
+                       atr.parent_id = - 1,
+                       atr.title,
+                       concat(
+                               concat((SELECT c.title FROM tab_archives_tree c WHERE c.id = atr.parent_id), '-'),
+                               atr.title
+                           )
+                   )       mlText,
+               d.dict_name mjText,
+               d1.dict_name bgqxText,
+               a.*
+        FROM tab_archives a
+                 LEFT JOIN tab_archives_tree atr ON a.ml = atr.CODE
+                 left join tab_dict d on a.mj = d.dict_code
+                 left join tab_dict d1 on a.bgqx = d1.dict_code
         where a.deleted = 0
-        and d.deleted = 0
-        and atr.deleted = 0
-        and a.id = #{id}
+          and d.deleted = 0
+          and atr.deleted = 0
+          and a.id = #{id}
     </select>
 </mapper>

+ 0 - 1
src/main/resources/static/js/lay-module/layuimini/miniAdmin.js

@@ -352,7 +352,6 @@ layui.define(["jquery", "miniMenu", "element","miniTab", "miniTheme","http"], fu
                     try {
                         layer.close(window.openTips);
                     } catch (e) {
-                        console.log(e.message);
                     }
                 }
             });

File diff suppressed because it is too large
+ 0 - 3
src/main/resources/static/js/lay-module/layuimini/miniMenu.js


+ 3 - 2
src/main/resources/static/js/lay-module/request/http.js

@@ -31,8 +31,9 @@ layui.define(['jquery', 'layer'], function (exports) {
                     headers['Content-Type'] = 'application/json;charset=utf-8;'
                 }
                 break;
-            // case "DELETE":
-            //     break;
+            case "DELETE":
+                headers['Content-Type'] = 'application/x-www-form-urlencoded'
+                break;
         }
         // if (type == 'POST' && !(data instanceof FormData)) {
         //     data = JSON.stringify(data)

File diff suppressed because it is too large
+ 2 - 3
src/main/resources/static/js/lay-module/treeSelect/treeSelect.js


+ 3 - 4
src/main/resources/static/js/lay-module/wangEditor/wangEditor.js

@@ -641,7 +641,6 @@ var config = {
     // onchange 事件
     // onchange: function (html) {
     //     // html 即变化之后的内容
-    //     console.log(html)
     // },
 
     // 是否显示添加网络图片的 tab
@@ -683,7 +682,7 @@ var config = {
     // 自定义上传图片超时时间 ms
     uploadImgTimeout: 10000,
 
-    // 上传图片 hook 
+    // 上传图片 hook
     uploadImgHooks: {
         // customInsert: function (insertLinkImg, result, editor) {
         //     console.log('customInsert')
@@ -3408,7 +3407,7 @@ Text.prototype = {
             if (txtHtml === '<p><br></p>') {
                 // 最后剩下一个空行,就不再删除了
                 e.preventDefault();
-                return;
+
             }
         });
 
@@ -4073,7 +4072,7 @@ UploadImg.prototype = {
             img = null;
             // 无法成功下载图片
             _this2._alert('插入图片错误', 'wangEditor: \u63D2\u5165\u56FE\u7247\u51FA\u9519\uFF0C\u56FE\u7247\u94FE\u63A5\u662F "' + link + '"\uFF0C\u4E0B\u8F7D\u8BE5\u94FE\u63A5\u5931\u8D25');
-            return;
+
         };
         img.onabort = function () {
             img = null;

+ 6 - 3
src/main/resources/static/page/admin/list.html

@@ -37,7 +37,7 @@
             form = layui.form,
             $ = layui.jquery;
 
-
+        let curr = 1;
         /**方-------------------------------法-------------------------------定-------------------------------义*/
         http.getRoleButton(39)
         //数据加载方法
@@ -51,7 +51,9 @@
                     title: '用户数据表',
                     limit: 15,
                     limits: [15, 30, 45, 60],
-                    page: true,
+                    page: {
+                        curr: curr
+                    },
                     request: {
                         pageName: 'pageNum',
                         limitName: 'pageSize'
@@ -67,7 +69,8 @@
                             "data": res.data.list
                         }
                     },
-                    done: function(res, curr, count) {
+                    done: function(res, curr1, count) {
+                        curr = curr1
                         // $('th').css({'background-color': '#1aa094', 'color': '#fff','font-weight':'bold'})
                     },
                     cols: [[

+ 17 - 14
src/main/resources/static/page/archive/advancedSearch.html

@@ -24,14 +24,9 @@
 </head>
 <body>
 <div class="layui-form layuimini-form" lay-filter="addDict" id="add" style="text-aglin:center">
-    <div class="layui-form-item" style="width: 671px">
-        <label class="layui-form-label required">存档时间:</label>
-        <div class="layui-input-block">
-            <input class="layui-input" name="time" id="time" readonly>
-        </div>
-    </div>
     <div class="layui-form-item" id="1">
-        <label class="layui-form-label required">条件1:</label>
+<!--        <label class="layui-form-label required">条件1:</label>-->
+        <div class="layui-input-inline" style="width: 75px;height: 38px"></div>
         <div class="layui-input-inline" style="width: 135px;">
             <select class="layui-select" name="field_1" id="field_1" lay-verify="required" lay-reqtext="条件1字段不能未空">
                 <option value="">请选择字段</option>
@@ -64,7 +59,7 @@
         </div>
     </div>
     <div class="layui-form-item" id="2">
-        <label class="layui-form-label required">条件2:</label>
+<!--        <label class="layui-form-label required">条件2:</label>-->
         <div class="layui-input-inline" style="width: 75px;">
             <!--            <input type="radio" name="join2" class="layui-input" value="OR" title="OR">-->
             <!--            <input type="radio" name="join2" class="layui-input" value="AND" title="AND">-->
@@ -96,7 +91,7 @@
                 <option value="like">模糊</option>
             </select>
         </div>
-        <div class="layui-input-inline">
+        <div class="layui-input-inline" style="width: 275px;">
             <input class="layui-input" type="text" name="variable_2" id="variable_2" placeholder="请输入值"
                    lay-verify="required" lay-reqtext="条件2值不能未空">
         </div>
@@ -106,7 +101,7 @@
         </div>
     </div>
     <div class="layui-form-item" id="3">
-        <label class="layui-form-label required">条件3:</label>
+<!--        <label class="layui-form-label required">条件3:</label>-->
         <div class="layui-input-inline" style="width: 75px;">
             <select name="join_3" class="layui-select" id="join_3">
                 <option value="AND">AND</option>
@@ -135,7 +130,7 @@
                 <option value="like">模糊</option>
             </select>
         </div>
-        <div class="layui-input-inline">
+        <div class="layui-input-inline" style="width: 275px;">
             <input class="layui-input" type="text" name="variable_3" id="variable_3" placeholder="请输入值"
                    lay-verify="required" lay-reqtext="条件3值不能未空">
         </div>
@@ -145,6 +140,14 @@
         </div>
     </div>
 
+    <div class="layui-form-item" style="width: 671px" id="time_item">
+<!--        <label class="layui-form-label required">存档时间:</label>-->
+        <div class="layui-input-inline" style="width: 75px;height: 38px"></div>
+        <div class="layui-input-inline" style="width: 503px;">
+            <input class="layui-input" name="time" id="time" placeholder="日期范围" readonly>
+        </div>
+    </div>
+
     <div class="layui-form-item" id="submit_button_container">
         <div class="layui-input-block">
             <button class="layui-btn layui-btn-normal" lay-submit lay-filter="search">搜索</button>
@@ -185,8 +188,8 @@
             }
             $("#submit_button_container").remove()
             index++;
-            $("#add").append('<div class="layui-form-item"  id="' + index + '">\n' +
-                '            <label class="layui-form-label required">条件' + index + ':</label>\n' +
+            $("#time_item").before('<div class="layui-form-item"  id="' + index + '">\n' +
+                // '            <label class="layui-form-label required">条件' + index + ':</label>\n' +
                 '    <div class="layui-input-inline" style="width: 75px;">\n' +
                 '            <select name="join_' + index + '" class="layui-select" id="join_' + index + '">\n' +
                 '                <option value="AND">AND</option>\n' +
@@ -214,7 +217,7 @@
                 '                    <option value="like">模糊</option>\n' +
                 '                </select>\n' +
                 '            </div>\n' +
-                '            <div class="layui-input-inline">\n' +
+                '            <div class="layui-input-inline" style="width: 275px;">\n' +
                 '                <input class="layui-input" type="text" name="variable_' + index + '" id="variable_' + index + '" placeholder="请输入值" lay-verify="required" lay-reqtext="条件' + index + '值不能未空">\n' +
                 '            </div>\n' +
                 '            <div class="layui-input-inline" style="width: 100px;">\n' +

+ 514 - 208
src/main/resources/static/page/archive/edit.html

@@ -37,179 +37,263 @@
     </style>
 </head>
 <body>
-<div class="layui-main">
-    <div class="layui-form layuimini-form" lay-filter="addDict" id="add" style="text-aglin:center">
-        <input type="hidden" class="layui-input" name="id" id="id">
-        <div class="layui-form-item">
-            <label class="layui-form-label required">归档年度:</label>
-            <div class="layui-input-inline" style="">
-                <input type="text" class="layui-input" placeholder="请选择归档年度" name="gdnd" id="gdnd" lay-filter="gdnd"
-                       lay-verify="required" lay-reqtext="归档年度不能为空" readonly>
-            </div>
-
-            <label class="layui-form-label required">档案门类:</label>
-            <div class="layui-input-inline">
-                <input type="hidden" id="mlId" class="layui-input">
-                <input type="hidden" id="mlCode" class="layui-input">
-                <select name="ml" id="ml" lay-filter="ml" lay-verify="required" lay-reqtext="档案门类不能为空">
-                    <option value="">请选择档案门类</option>
-                </select>
-            </div>
 
-
-            <label class="layui-form-label required">全宗号:</label>
-            <div class="layui-input-inline">
-                <select name="qzh" id="qzh" lay-filter="qzh" lay-verify="required" lay-reqtext="全宗号不能为空">
-                    <option value="">请选择全宗号</option>
-                </select>
-            </div>
-            <label class="layui-form-label required">目录号:</label>
-            <div class="layui-input-inline">
-                <input type="number" class="layui-input" placeholder="请输入目录号" name="mlh" id="mlh" lay-filter="mlh"
-                       lay-verify="required" lay-reqtext="目录号不能为空">
+<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
+    <ul class="layui-tab-title">
+        <li class="layui-this">编辑档案</li>
+        <li id="file_tab_list">挂接</li>
+    </ul>
+    <div class="layui-tab-content">
+        <div class="layui-tab-item layui-show">
+            <div class="layui-main">
+                <div class="layui-form layuimini-form" lay-filter="addDict" id="add" style="text-aglin:center">
+                    <input type="hidden" class="layui-input" name="id" id="id">
+                    <div class="layui-form-item">
+                        <label class="layui-form-label required">归档年度:</label>
+                        <div class="layui-input-inline" style="">
+                            <input type="text" class="layui-input" placeholder="请选择归档年度" name="gdnd" id="gdnd"
+                                   lay-filter="gdnd"
+                                   lay-verify="required" lay-reqtext="归档年度不能为空" readonly>
+                        </div>
+
+                        <label class="layui-form-label required">档案门类:</label>
+                        <div class="layui-input-inline">
+<!--                            <input type="hidden" id="mlId" class="layui-input">-->
+<!--                            <input type="hidden" id="mlCode" class="layui-input">-->
+                            <input type="text" id="ml" name="ml" lay-filter="ml" class="layui-input">
+<!--                            <select name="ml" id="ml" lay-filter="ml" lay-verify="required" lay-reqtext="档案门类不能为空">-->
+<!--                                <option value="">请选择档案门类</option>-->
+<!--                            </select>-->
+                        </div>
+
+
+                        <label class="layui-form-label required">全宗号:</label>
+                        <div class="layui-input-inline">
+                            <select name="qzh" id="qzh" lay-filter="qzh" lay-verify="required" lay-reqtext="全宗号不能为空">
+                                <option value="">请选择全宗号</option>
+                            </select>
+                        </div>
+                        <label class="layui-form-label required">目录号:</label>
+                        <div class="layui-input-inline">
+                            <input type="number" class="layui-input" placeholder="请输入目录号" name="mlh" id="mlh"
+                                   lay-filter="mlh"
+                                   lay-verify="required" lay-reqtext="目录号不能为空">
+                        </div>
+
+                    </div>
+                    <div class="layui-form-item" id="hide_div">
+                    </div>
+
+                    <div class="layui-form-item">
+                        <label class="layui-form-label required" id="jh_label">卷(件)号:</label>
+                        <div class="layui-input-inline">
+                            <input type="number" class="layui-input" name="jh" id="jh" placeholder="请输入件号"
+                                   lay-filter="jh"
+                                   lay-verify="required" lay-reqtext="件号不能为空" min="0">
+                        </div>
+
+                        <label class="layui-form-label required">保管期限:</label>
+                        <div class="layui-input-inline">
+                            <select name="bgqx" id="bgqx" lay-filter="bgqx" lay-verify="required"
+                                    lay-reqtext="保管期限不能为空">
+                                <option value="">请选择保管期限</option>
+                            </select>
+                        </div>
+
+                        <label class="layui-form-label required">档号:</label>
+                        <div class="layui-input-inline" style="width: 344px;">
+                            <input type="text" class="layui-input" id="dh" name="dh" placeholder="自动生成"
+                                   lay-verify="required"
+                                   lay-reqtext="档号不能为空" readonly>
+                        </div>
+                    </div>
+
+                    <div class="layui-form-item">
+                        <label class="layui-form-label required">题名:</label>
+                        <div class="layui-input-inline" style="width: 834px;">
+                            <input type="text" class="layui-input" name="tm" id="tm" lay-filter="tm" placeholder="请输入题名"
+                                   lay-verify="required" lay-reqtext="题名不能为空">
+                        </div>
+                    </div>
+
+                    <div class="layui-form-item">
+                        <label class="layui-form-label">内容概述:</label>
+                        <div class="layui-input-inline" style="width: 834px;">
+                            <textarea class="layui-textarea" name="nrgs" id="nrgs" placeholder="请输入内容概述"></textarea>
+                        </div>
+                    </div>
+
+                    <div class="layui-form-item">
+                        <label class="layui-form-label required">文件形成时间:</label>
+                        <div class="layui-input-inline" style="width: 135px;">
+                            <input type="text" class="layui-input" name="wjxcsj" id="wjxcsj" lay-filter="wjxcsj"
+                                   placeholder="开始时间"
+                                   lay-verify="required" lay-reqtext="文件形成时间不能为空" readonly>
+                        </div>
+                        <div class="layui-form-mid">-</div>
+                        <div class="layui-input-inline" style="width: 135px">
+                            <input type="text" class="layui-input" name="wjdqsj" id="wjdqsj" lay-filter="wjdqsj"
+                                   placeholder="结束时间"
+                                   lay-verify="required" lay-reqtext="文件形成时间不能为空" readonly>
+                        </div>
+
+                        <label class="layui-form-label required">归档日期:</label>
+                        <div class="layui-input-inline" style="width: 150px;">
+                            <input type="text" class="layui-input" name="gdrq" id="gdrq" lay-filter="wjdqsj"
+                                   style="cursor: pointer"
+                                   readonly>
+                        </div>
+
+                        <label class="layui-form-label required">密级:</label>
+                        <div class="layui-input-inline">
+                            <select name="mj" id="mj" lay-filter="mj" lay-verify="required" lay-reqtext="密级不能为空">
+                                <option value="">请选择密级</option>
+                            </select>
+                        </div>
+                    </div>
+
+                    <div class="layui-form-item">
+                        <label class="layui-form-label required">文件编号:</label>
+                        <div class="layui-input-inline">
+                            <input type="text" class="layui-input" name="wjbh" id="wjbh" lay-filter="wjbh"
+                                   lay-verify="required"
+                                   lay-reqtext="文号不能为空" placeholder="请输入文号">
+                        </div>
+                        <label class="layui-form-label required">责任者:</label>
+                        <div class="layui-input-inline">
+                            <input type="text" class="layui-input" name="zrz" id="zrz" lay-filter="zrz"
+                                   lay-verify="required"
+                                   lay-reqtext="责任者不能为空" placeholder="请输入责任者">
+                        </div>
+
+
+                        <label class="layui-form-label">载体数量:</label>
+                        <div class="layui-input-inline">
+                            <input type="number" class="layui-input" name="ztsl" id="ztsl" lay-filter="ztsl"
+                                   placeholder="请输入载体数量"
+                                   min="0">
+                        </div>
+
+                        <label class="layui-form-label">主题词:</label>
+                        <div class="layui-input-inline">
+                            <input type="number" class="layui-input" name="ztc" id="ztc" lay-filter="ztc"
+                                   placeholder="请输入主题词">
+                        </div>
+                    </div>
+
+                    <div class="layui-form-item">
+                        <label class="layui-form-label">主办部门:</label>
+                        <div class="layui-input-inline" style="width: 344px;">
+                            <input type="text" class="layui-input" name="zbbm" id="zbbm" lay-filter="zbbm"
+                                   placeholder="请输入主办部门">
+                        </div>
+                        <label class="layui-form-label">协办部门:</label>
+                        <div class="layui-input-inline" style="width: 344px;">
+                            <input type="text" class="layui-input" name="xbbm" id="xbbm" lay-filter="xbbm"
+                                   placeholder="请输入协办部门">
+                        </div>
+                    </div>
+
+                    <div class="layui-form-item">
+                        <label class="layui-form-label">存放位置描述:</label>
+                        <div class="layui-input-inline" style="width: 834px;">
+                            <input type="text" class="layui-input" name="cfwzms" id="cfwzms" lay-filter="cfwzms"
+                                   placeholder="请输入存在位置描述">
+                        </div>
+
+                    </div>
+
+                    <div class="layui-form-item">
+                        <label class="layui-form-label">备注:</label>
+                        <div class="layui-input-inline" style="width: 834px;">
+                            <textarea class="layui-textarea" name="bz" id="bz" placeholder="请输入备注"></textarea>
+                        </div>
+                    </div>
+
+
+                    <div class="layui-form-item">
+                        <button class="layui-btn layui-btn"
+                                id="cancel"
+                                style="background-color: white;color:#1E9FFF;border: 1px solid #1E9FFF">取消
+                        </button>
+                        <button id="zj" class="layui-btn" lay-submit lay-filter="zj" style="background-color: #f7b374">
+                            追加
+                        </button>
+                        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">保存</button>
+                    </div>
+                </div>
             </div>
-
-        </div>
-        <div class="layui-form-item" id="hide_div">
         </div>
-
-        <div class="layui-form-item">
-            <label class="layui-form-label required" id="jh_label">卷(件)号:</label>
-            <div class="layui-input-inline">
-                <input type="number" class="layui-input" name="jh" id="jh" placeholder="请输入件号" lay-filter="jh"
-                       lay-verify="required" lay-reqtext="件号不能为空" min="0">
-            </div>
-
-            <label class="layui-form-label required">保管期限:</label>
-            <div class="layui-input-inline">
-                <select name="bgqx" id="bgqx" lay-filter="bgqx" lay-verify="required" lay-reqtext="保管期限不能为空">
-                    <option value="">请选择保管期限</option>
-                </select>
-            </div>
-
-            <label class="layui-form-label required">档号:</label>
-            <div class="layui-input-inline" style="width: 344px;">
-                <input type="text" class="layui-input" id="dh" name="dh" placeholder="自动生成" lay-verify="required"
-                       lay-reqtext="档号不能为空" readonly>
-            </div>
-        </div>
-
-        <div class="layui-form-item">
-            <label class="layui-form-label required">题名:</label>
-            <div class="layui-input-inline" style="width: 834px;">
-                <input type="text" class="layui-input" name="tm" id="tm" lay-filter="tm" placeholder="请输入题名"
-                       lay-verify="required" lay-reqtext="题名不能为空">
+        <div class="layui-tab-item">
+            <div class="layuimini-container">
+                <div class="layuimini-main">
+                    <div>
+                        <div class="layui-form toolbar">
+                            <div class="layui-form-item">
+                                <div class="layui-inline">
+                                    <!--                                <input type="hidden" id="archive_id" class="layui-input">-->
+                                    <input type="hidden" id="fileType" name="fileType" class="layui-input">
+                                </div>
+                                <div class="layui-inline">
+                                    <!--                        <button id="upload" class="layui-btn icon-btn"><i-->
+                                    <!--                                class="layui-icon"></i>上传-->
+                                    <!--                        </button>-->
+                                </div>
+                                <!--                    <div class="layui-inline">-->
+                                <!--                        <button id="btnSearch" lay-submit lay-filter="search" class="layui-btn icon-btn"><i-->
+                                <!--                                class="layui-icon"></i>搜索-->
+                                <!--                        </button>-->
+                                <!--                    </div>-->
+                            </div>
+                        </div>
+                        <table class="layui-hide" id="user-table" lay-filter="table"></table>
+                    </div>
+                </div>
             </div>
         </div>
-
-        <div class="layui-form-item">
-            <label class="layui-form-label">内容概述:</label>
-            <div class="layui-input-inline" style="width: 834px;">
-                <textarea class="layui-textarea" name="nrgs" id="nrgs" placeholder="请输入内容概述"></textarea>
-            </div>
-        </div>
-
-        <div class="layui-form-item">
-            <label class="layui-form-label required">文件形成时间:</label>
-            <div class="layui-input-inline" style="width: 135px;">
-                <input type="text" class="layui-input" name="wjxcsj" id="wjxcsj" lay-filter="wjxcsj" placeholder="开始时间"
-                       lay-verify="required" lay-reqtext="文件形成时间不能为空" readonly>
-            </div>
-            <div class="layui-form-mid">-</div>
-            <div class="layui-input-inline" style="width: 135px">
-                <input type="text" class="layui-input" name="wjdqsj" id="wjdqsj" lay-filter="wjdqsj" placeholder="结束时间"
-                       lay-verify="required" lay-reqtext="文件形成时间不能为空" readonly>
-            </div>
-
-            <label class="layui-form-label required">归档日期:</label>
-            <div class="layui-input-inline" style="width: 150px;">
-                <input type="text" class="layui-input" name="gdrq" id="gdrq" lay-filter="wjdqsj" style="cursor: pointer"
-                       readonly>
-            </div>
-
-            <label class="layui-form-label required">密级:</label>
-            <div class="layui-input-inline">
-                <select name="mj" id="mj" lay-filter="mj" lay-verify="required" lay-reqtext="密级不能为空">
-                    <option value="">请选择密级</option>
-                </select>
-            </div>
-        </div>
-
-        <div class="layui-form-item">
-            <label class="layui-form-label required">文件编号:</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="wjbh" id="wjbh" lay-filter="wjbh" lay-verify="required"
-                       lay-reqtext="文号不能为空" placeholder="请输入文号">
-            </div>
-            <label class="layui-form-label required">责任者:</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="zrz" id="zrz" lay-filter="zrz" lay-verify="required"
-                       lay-reqtext="责任者不能为空" placeholder="请输入责任者">
-            </div>
-            <label class="layui-form-label">主办部门:</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="zbbm" id="zbbm" lay-filter="zbbm" placeholder="请输入主办部门">
-            </div>
-            <label class="layui-form-label">协办部门:</label>
-            <div class="layui-input-inline">
-                <input type="text" class="layui-input" name="xbbm" id="xbbm" lay-filter="xbbm" placeholder="请输入协办部门">
-            </div>
-        </div>
-
-        <div class="layui-form-item">
-            <label class="layui-form-label">存放位置描述:</label>
-            <div class="layui-input-inline" style="width: 344px;">
-                <input type="text" class="layui-input" name="cfwzms" id="cfwzms" lay-filter="cfwzms"
-                       placeholder="请输入存在位置描述">
-            </div>
-
-            <label class="layui-form-label">载体数量:</label>
-            <div class="layui-input-inline">
-                <input type="number" class="layui-input" name="ztsl" id="ztsl" lay-filter="ztsl" placeholder="请输入载体数量"
-                       min="0">
-            </div>
-
-            <label class="layui-form-label">主题词:</label>
-            <div class="layui-input-inline">
-                <input type="number" class="layui-input" name="ztc" id="ztc" lay-filter="ztc" placeholder="请输入主题词">
-            </div>
-        </div>
-
-        <div class="layui-form-item">
-            <label class="layui-form-label">备注:</label>
-            <div class="layui-input-inline" style="width: 834px;">
-                <textarea class="layui-textarea" name="bz" id="bz" placeholder="请输入备注"></textarea>
-            </div>
-        </div>
-
-
-        <div class="layui-form-item">
-            <button class="layui-btn layui-btn"
-                    id="cancel"
-                    style="background-color: white;color:#1E9FFF;border: 1px solid #1E9FFF">取消
-            </button>
-            <button class="layui-btn" lay-submit lay-filter="zj" style="background-color: #f7b374">追加</button>
-            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">保存</button>
-        </div>
     </div>
 </div>
+<!--  头部工具栏  -->
+<script type="text/html" id="toolbar">
+    <!--    <button class="layui-btn layui-btn-sm" lay-event="upload" id="upload">上传</button>-->
+    <!--    <a class="layui-btn layui-btn-sm" lay-even="aaa" >上传</a>-->
+    <a class="layui-btn layui-btn-sm" lay-event="upload">上传</a>
+
+</script>
+<!-- 操作列 -->
+<script type="text/html" id="operating">
+    <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="openPDF">预览</a>
+    <!--    <a class="layui-btn layui-btn-xs" lay-event="openPDF">下载</a>-->
+    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="delete">删除</a>
+</script>
 <script src="../../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
 <script src="../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
 <script>
 
-    layui.use(['form', 'http', 'iconPickerFa', 'treeSelect', 'laydate', 'upload'], function () {
+    layui.use(['form', 'http', 'iconPickerFa', 'treeSelect', 'laydate', 'upload', 'element', 'table'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
         var form = layui.form,
             layer = layui.layer,
             http = layui.http,
             $ = layui.$,
+            element = layui.element,
             laydate = layui.laydate,
             upload = layui.upload,
+            table = layui.table,
             treeSelect = layui.treeSelect;
-        let id = $('#id').val(),
-            mlCode = $('#mlCode').val()
-        mlId = $('#mlId').val()
+        let id = $('#id').val();
         let bgqxappend = false;
+
+        let fileType = $("#fileType").val()
+        let curr = 1;
+
+
+        let isAddhsdw = false;
+        let isAddxmdh = false;
+
+        let sl = '';
+        let ml = '';
+
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
         /** 初始化日期控件*/
@@ -316,7 +400,7 @@
                 , error: function (index, upload) {
                     var tr = fileList.find('tr#upload-' + index)
                         , tds = tr.children();
-                    tds.eq(2).html('<span style="color: #FF5722;">上传失败</span>');
+                    tds.eq(2).html('<span style="color: #ff5722;">上传失败</span>');
                     tds.eq(3).find('.demo-reload').removeClass('layui-hide'); //显示重传
                 }
             });
@@ -324,6 +408,7 @@
 
         // 保存方法
         let save = function (data, method) {
+            data.ml = sl
             http.post(id == '' ? 'archive/archive/insert' : 'archive/archive/update', data, true, function (res) {
                 if (res.code == 200) {
                     let index = layer.alert('保存成功!', {
@@ -342,7 +427,7 @@
 
         let getJh = function () {
             http.get('archive/archive/getJH', {
-                    code: mlCode
+                    code: ml
                 }, false, function (res) {
                     if (res.code == 200) {
                         if (res.data) {
@@ -355,33 +440,51 @@
             )
         }
 
-        let loadDictSelect = function () {
-
-            http.get('system/archivesTree/selectParentByCode',{
-                code: mlCode
-            },false,res => {
-                if(res.code == 200){
-                    let html = ''
-                    switch (res.data.code) {
-                        case 'KU':
-                            html += ' <label class="layui-form-label required" id="hsdwdh_label">核算单位代号:</label>\n' +
-                                '        <div class="layui-input-inline" style="width: 540px;" id="hsdwdh_input">\n' +
-                                '            <input type="text" class="layui-input" name="hsdwdh" id="hsdwdh" placeholder="请输入核算单位代号" lay-filter="hsdwdh"\n' +
-                                '                   lay-verify="required" lay-reqtext="核算单位代号不能为空">\n' +
-                                '        </div>'
-                            break;
-                        case 'KJ':
-                            html += '<label class="layui-form-label required" id="xmdh_label" >项目代号:</label>\n' +
-                                '        <div class="layui-input-inline" style="width: 540px;" id="xmdh_input" >\n' +
-                                '            <input type="text" class="layui-input" name="xmdh" id="xmdh" placeholder="请输入项目代号" lay-filter="xmldh"\n' +
-                                '                   lay-verify="required" lay-reqtext="项目代号不能为空">\n' +
-                                '        </div>'
-                            break;
+        // 加载下拉框
+        let loadMlSelect = function () {
+            // http.get('/system/menu/select',null,false,function (res) {
+            //     let html = ''
+            //     for (let index in res.data) {
+            //         html += '<option value="'+res.data[index].id+'">'+res.data[index].title+'</option>'
+            //     }
+            //     $('#parentId').append(html)
+            //     form.render();//菜单渲染 把内容加载进去
+            // })
+            treeSelect.render({
+                // 选择器
+                elem: '#ml',
+                // 数据
+                data: 'system/archivesTree/selectTree',
+                // 异步加载方式:get/post,默认get
+                type: 'get',
+                // 占位符
+                placeholder: '请选择门类',
+                // 是否开启搜索功能:true/false,默认false
+                search: true,
+                // 一些可定制的样式
+                style: {
+                    folder: {
+                        enable: true
+                    },
+                    line: {
+                        enable: true
                     }
-                    $('#hide_div').append(html)
+                },
+                click: function (d){
+                    let code = ''
+                    let parent = d.current.getParentNode()
+                    if(parent != null){
+                        code = parent.code
+                    }else {
+                        code = d.current.code
+                    }
+
+                    ml = code
+                    sl = d.current.code
 
+                    getJh()
                     let jhLable = '';
-                    switch (res.data.code) {
+                    switch (code) {
                         case 'SJ':
                         case 'MT':
                         case 'SW':
@@ -404,19 +507,65 @@
                     }
 
                     $("#jh_label").text(jhLable)
-                }
-            })
 
-            http.get('system/archivesTree/selectChildById', {
-                id: mlId
-            }, false, res => {
-                let html = '';
-                for (let i in res.data) {
-                    html += '<option value="' + res.data[i].code + '">' + res.data[i].title + '</option>'
+                    let html = ''
+
+                    switch (code) {
+                        case 'KU':
+                            if(!isAddhsdw){
+                                html += ' <label class="layui-form-label required" id="hsdwdh_label">核算单位代号:</label>\n' +
+                                    '        <div class="layui-input-inline" style="width: 540px;" id="hsdwdh_input">\n' +
+                                    '            <input type="text" class="layui-input" name="hsdwdh" id="hsdwdh" placeholder="请输入核算单位代号" lay-filter="hsdwdh"\n' +
+                                    '                   lay-verify="required" lay-reqtext="核算单位代号不能为空">\n' +
+                                    '        </div>'
+                                isAddhsdw = !isAddhsdw
+                            }
+                            break;
+                        case 'KJ':
+                            if(!isAddxmdh){
+                                html += '<label class="layui-form-label required" id="xmdh_label" >项目代号:</label>\n' +
+                                    '        <div class="layui-input-inline" style="width: 540px;" id="xmdh_input" >\n' +
+                                    '            <input type="text" class="layui-input" name="xmdh" id="xmdh" placeholder="请输入项目代号" lay-filter="xmldh"\n' +
+                                    '                   lay-verify="required" lay-reqtext="项目代号不能为空">\n' +
+                                    '        </div>'
+                            }
+                            break;
+                    }
+                    $('#hide_div').append(html)
+
+
+                },
+                success: function (res) {
+                    // if(id != '' && parentId != '' && parentId != -1){
+                    //     treeSelect.checkNode('parentId', parentId);
+                    // }
                 }
-                $("#ml").append(html)
-                form.render();//菜单渲染 把内容加载进去
-            })
+            });
+        }
+
+        loadMlSelect()
+
+        let loadDictSelect = function () {
+
+            // http.get('system/archivesTree/selectParentByCode', {
+            //     code: mlCode
+            // }, false, res => {
+            //     if (res.code == 200) {
+            //         let html = ''
+            //
+            //     }
+            // })
+
+            // http.get('system/archivesTree/selectChildById', {
+            //     id: mlId
+            // }, false, res => {
+            //     let html = '';
+            //     for (let i in res.data) {
+            //         html += '<option value="' + res.data[i].code + '">' + res.data[i].title + '</option>'
+            //     }
+            //     $("#ml").append(html)
+            //     form.render();//菜单渲染 把内容加载进去
+            // })
 
             // 加载全宗号
             http.get('system/dict/selectDictByCode', {code: 'QUANZONGHAO'}, false, function (res) {
@@ -445,8 +594,8 @@
             $.each(t, function () {
                 d[this.name] = this.value;
             });
-            d.sl = d.ml
-            d.ml = mlCode
+            d.sl = sl
+            d.ml = ml
             http.post('archive/archive/generateDh', d, true, res => {
                 if (res.code === 200) {
                     $("#dh").val(res.data)
@@ -470,6 +619,8 @@
         let initData = function () {
             let adata = ''
             if (id != '') {
+                $("#file_tab_list").show();
+                $("#zj").hide()
                 http.get('/archive/archive/selectByPrimaryKey', {
                     id: id
                 }, false, function (res) {
@@ -477,6 +628,8 @@
                     form.val("addDict", res.data);
                     form.render();
                 })
+            }else {
+                $("#file_tab_list").hide();
             }
 
             if (!bgqxappend) {
@@ -496,6 +649,159 @@
             form.render();
 
         }
+
+
+        //数据加载方法
+        let renderTable = function () {
+            // 加载表格数据
+            table.render({
+                elem: '#user-table',
+                url: 'archive/archiveFile/selectByPage',
+                toolbar: '#toolbar', //开启头部工具栏,并为其绑定左侧模板
+                // defaultToolbar: ['filter', 'exports', 'print'],
+                title: '附件表',
+                limit: 15,
+                limits: [15, 30, 45, 60],
+                page: {
+                    curr: curr
+                },
+                request: {
+                    pageName: 'pageNum',
+                    limitName: 'pageSize'
+                },
+                where: {
+                    archiveId: id,
+                    fileType: fileType
+                },
+                response: {
+                    statusCode: 200 //重新规定成功的状态码为 200,table 组件默认为 0
+                },
+                parseData: function (res) {
+                    return {
+                        "code": res.code,
+                        "msg": res.msg,
+                        "count": res.data.total,
+                        "data": res.data.list
+                    }
+                },
+                done: function (res, curr1, count) {
+                    curr = curr1
+                    // $('th').css({'background-color': '#1aa094', 'color': '#fff', 'font-weight': 'bold'})
+                },
+                cols: [[
+                    {type: 'numbers'},
+                    // {field: 'originalFileName', title: '原文件名'},
+                    {field: 'fileName', title: '文件名'},
+                    {
+                        field: 'jnml', title: '卷内目录', templet: function (rv) {
+                            return rv.jnml ? rv.jnml : '无'
+                        }
+                    },
+                    {
+                        field: 'fileSize', title: '文件大小',
+                        templet: function (rv) {
+                            let size = rv.fileSize
+                            let data = ''
+                            if (size < 0.1 * 1024) { //如果小于0.1KB转化成B
+                                data = size.toFixed(2) + "B";
+                            } else if (size < 0.1 * 1024 * 1024) {//如果小于0.1MB转化成KB
+                                data = (size / 1024).toFixed(2) + "KB";
+                            } else if (size < 0.1 * 1024 * 1024 * 1024) { //如果小于0.1GB转化成MB
+                                data = (size / (1024 * 1024)).toFixed(2) + "MB";
+                            } else { //其他转化成GB
+                                data = (size / (1024 * 1024 * 1024)).toFixed(2) + "GB";
+                            }
+                            var sizestr = data + "";
+                            var len = sizestr.indexOf("\.");
+                            var dec = sizestr.substr(len + 1, 2);
+                            if (dec == "00") {//当小数点后为00时 去掉小数部分
+                                return sizestr.substring(0, len) + sizestr.substr(len + 3, 2);
+                            }
+                            return sizestr;
+                        }
+                    },
+                    {field: 'createTime', title: '上传时间'},
+                    {templet: '#operating', width: 240, align: 'center', title: '操作'}
+                ]]
+            });
+
+        }
+
+        let deleteFile = function (id) {
+            layer.confirm('真的删除行么', function (index) {
+                http.delete('archive/archiveFile/delete', {id: id}, true, function (res) {
+                    if (res.code == 200) {
+                        layer.msg('删除成功', {
+                            icon: 1,
+                            time: 2000
+                        })
+                    }
+                    renderTable()
+                })
+                layer.close(index);
+            });
+        }
+
+        let openUpload = function () {
+            var index = layer.open({
+                title: '预约借阅',
+                type: 2,
+                shade: 0.2,
+                maxmin: true,
+                shadeClose: true,
+                area: ['600px', '400px'],
+                content: './upload.html',
+                success: function (layero, index) {
+                    var body = layer.getChildFrame('body', index);
+                    body.find("#archive_id").val(id);
+                    body.find("#fileType").val(fileType);
+                },
+                end: function () {
+                    renderTable()
+                }
+            });
+        }
+
+        let openPDF = function (data) {
+            if (data.fileName.substring(data.fileName.indexOf('.') + 1) == 'pdf') {
+                layer.open({
+                    type: 2,
+                    area: ['100%', '100%'],
+                    fixed: false, //不固定
+                    maxmin: true,
+                    content: data.filePath + '/' + data.fileName
+                });
+            } else {
+                layer.msg('只支持预览pdf格式文件', {
+                    icon: 2
+                })
+            }
+        }
+
+        renderTable()
+        //表格操作栏
+        table.on('tool(table)', function (obj) {
+            let data = obj.data;
+            switch (obj.event) {
+                case 'delete':
+                    deleteFile(data.id);
+                    break;
+                case 'openPDF':
+                    openPDF(data)
+                    break;
+            }
+        });
+
+
+        table.on('toolbar(table)', function (obj) {
+            let data = obj.data;
+            switch (obj.event) {
+                case 'upload':
+                    openUpload();
+                    break;
+            }
+        });
+
         /**事-------------------------------件-------------------------------绑-------------------------------定*/
         initDate()
         initUpload()
@@ -526,22 +832,22 @@
             $("#ztc").val('')
         });
 
-        form.on('select(ml)', function (data) {
-            if (!bgqxappend) {
-                // 加载保管期限
-                http.get('system/dict/selectDictByCode', {code: data.value === 'WS' ? 'BAOGUANQIXIANYI' : 'BAOGUANQIXIANER'}, false, function (res) {
-                    let html = '';
-                    for (let i in res.data) {
-                        html += '<option value="' + res.data[i].dictCode + '">' + res.data[i].dictName + '</option>'
-                    }
-                    $("#bgqx").append(html)
-                    form.render();//菜单渲染 把内容加载进去
-                })
-                bgqxappend = !bgqxappend
-            }
-
-            getJh()
-        });
+        // form.on('select(ml)', function (data) {
+        //     if (!bgqxappend) {
+        //         // 加载保管期限
+        //         http.get('system/dict/selectDictByCode', {code: data.value === 'WS' ? 'BAOGUANQIXIANYI' : 'BAOGUANQIXIANER'}, false, function (res) {
+        //             let html = '';
+        //             for (let i in res.data) {
+        //                 html += '<option value="' + res.data[i].dictCode + '">' + res.data[i].dictName + '</option>'
+        //             }
+        //             $("#bgqx").append(html)
+        //             form.render();//菜单渲染 把内容加载进去
+        //         })
+        //         bgqxappend = !bgqxappend
+        //     }
+        //     loadDictSelect()
+        //     getJh()
+        // });
 
         form.on('select(bgqx)', function (data) {
             generateDh()

+ 6 - 3
src/main/resources/static/page/archive/fileList.html

@@ -61,7 +61,7 @@
 
         let archive_id = $("#archive_id").val()
         let fileType = $("#fileType").val()
-
+        let curr = 1;
         /**方-------------------------------法-------------------------------定-------------------------------义*/
             //数据加载方法
         let renderTable = function () {
@@ -74,7 +74,9 @@
                     title: '附件表',
                     limit: 15,
                     limits: [15, 30, 45, 60],
-                    page: true,
+                    page: {
+                        curr: curr
+                    },
                     request: {
                         pageName: 'pageNum',
                         limitName: 'pageSize'
@@ -94,7 +96,8 @@
                             "data": res.data.list
                         }
                     },
-                    done: function (res, curr, count) {
+                    done: function (res, curr1, count) {
+                        curr = curr1
                         // $('th').css({'background-color': '#1aa094', 'color': '#fff', 'font-weight': 'bold'})
                     },
                     cols: [[

+ 55 - 25
src/main/resources/static/page/archive/list.html

@@ -27,19 +27,19 @@
                     <div class="layui-inline">
                         <input type="text" id="dh" name="dh" lay-filter="dh" placeholder="请输入档号" class="layui-input">
                     </div>
-                    <div class="layui-inline">
-                        <input type="text" id="gdnd" name="gdnd" lay-filter="gdnd" placeholder="请输入归档年度"
+                    <div class="layui-inline" style="width: 100px;">
+                        <input type="text" id="gdnd" name="gdnd" lay-filter="gdnd" placeholder="归档年度"
                                class="layui-input">
                     </div>
-                    <div class="layui-inline">
+                    <div class="layui-inline" style="width: 100px;">
                         <select name="mj" id="mj">
-                            <option value="">请选择密级</option>
+                            <option value="">密级</option>
                         </select>
                     </div>
 
-                    <div class="layui-inline">
+                    <div class="layui-inline" style="width: 100px;">
                         <select name="bgqx" id="bgqx">
-                            <option value="">请选择保管期限</option>
+                            <option value="">保管期限</option>
                         </select>
                     </div>
                     <div class="layui-inline">
@@ -105,6 +105,7 @@
             // bgqx: null,
             // ml: null
         }
+        let curr = 1;
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
         $("#resultSearch").hide()
@@ -232,7 +233,7 @@
                 for (let i in res.data) {
                     html += '<option value="' + res.data[i].dictCode + '">' + res.data[i].dictName + '</option>'
                 }
-                $("#bgqx").html('<option value="">请选择保管期限</option>')
+                $("#bgqx").html('<option value="">保管期限</option>')
                 $("#bgqx").append(html)
                 form.render();//菜单渲染 把内容加载进去
             })
@@ -250,7 +251,9 @@
                 title: '用户数据表',
                 limit: 15,
                 limits: [15, 30, 45, 60],
-                page: true,
+                page: {
+                    curr: curr
+                },
                 request: {
                     pageName: 'pageNum',
                     limitName: 'pageSize'
@@ -267,21 +270,28 @@
                         "data": res.data.list
                     }
                 },
-                done: function (res, curr, count) {
+                done: function (res, curr1, count) {
                     params = {}
+                    // console.log(res,curr,count)
+                    curr = curr1
                     // $('th').css({'background-color': '#1aa094', 'color': '#fff', 'font-weight': 'bold'})
                 },
                 cols: [[
                     // {type: 'checkbox', fixed: 'left'},
                     {type: 'numbers'},
-                    {field: 'dh', title: '档号', width: 240},
-                    {field: 'tm', title: '题名', width: 700},
-                    {field: 'gdnd', title: '归档年度', width: 120},
+                    {field: 'dh', title: '档号', width: 240, sort: true},
+                    {field: 'jh', title: '件号', width: 80, sort: true},
+                    {
+                        field: 'tm', title: '题名', width: 700, event: 'tm', templet: function (rv) {
+                            return '<a style="color: cornflowerblue;text-decoration: underline" href="#">' + rv.tm + '</a>'
+                        }
+                    },
+                    {field: 'gdnd', title: '归档年度', width: 120, sort: true},
                     {field: 'zrz', title: '责任者', width: 120},
                     {field: 'mjText', title: '密级', width: 80},
                     {field: 'wjxcsj', title: '文件形成时间', width: 120},
                     {field: 'wjdqsj', title: '文件到期时间', width: 120},
-                    {templet: '#operating', width: 350, align: 'center', title: '操作', fixed: 'right'}
+                    {templet: '#operating', width: 250, align: 'center', title: '操作', fixed: 'right'}
                 ]]
             });
         }
@@ -290,7 +300,7 @@
         //添加方法
         let addDict = function () {
             var index = layer.open({
-                title: '添加监督对象',
+                title: '新增档案信息',
                 type: 2,
                 shade: 0.2,
                 maxmin: true,
@@ -315,13 +325,13 @@
                 shade: 0.2,
                 maxmin: true,
                 shadeClose: true,
-                area: ['900px', '600px'],
+                area: ['750px', '600px'],
                 content: './advancedSearch.html',
                 success: function (layero, index) {
                     var body = layer.getChildFrame('body', index);
                 },
                 end: function () {
-                    renderTable()
+                    // renderTable()
                 }
             });
         }
@@ -350,7 +360,7 @@
         //打开文件列表
         let openFiles = function (data) {
             var index = layer.open({
-                title: '附件',
+                title: '挂接档案',
                 type: 2,
                 shade: 0.2,
                 maxmin: true,
@@ -392,7 +402,7 @@
 
         //删除方法
         let deleteDict = function (id) {
-            layer.confirm('真的删除行么', function (index) {
+            layer.confirm('确定删除该档案吗?', function (index) {
                 http.delete('archive/archive/delete', {id: id}, true, function (res) {
                     if (res.code == 200) {
                         layer.msg('删除成功', {
@@ -414,7 +424,7 @@
         //修改方法
         let updateDict = function (id) {
             layer.open({
-                title: '修改监督对象',
+                title: '修改档案信息',
                 type: 2,
                 shade: 0.2,
                 maxmin: true,
@@ -426,6 +436,7 @@
                     body.find("#id").val(id);
                     body.find("#mlId").val(searchParam.mlId);
                     body.find("#mlCode").val(searchParam.ml);
+                    body.find("#fileType").val(0);
                 },
                 end: function () {
                     renderTable()
@@ -460,7 +471,7 @@
             }
         }
 
-        let importExcel = function (){
+        let importExcel = function () {
             var index = layer.open({
                 title: '文档导入',
                 type: 2,
@@ -480,19 +491,20 @@
 
         let join = function (id) {
             layer.open({
-                title: '监督对象',
+                title: '档案信息',
                 type: 2,
                 shade: 0.2,
                 maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './show.html',
+                content: './show.html' + '?id=' + id,
                 success: function (layero, index) {
-                    var body = layer.getChildFrame('body', index);
-                    body.find("#archive_id").val(id);
+                    // var body = layer.getChildFrame('body', index);
+                    // body.find("#archive_id").val(id);
+                    // console.log(body.find("#archive_id"))
                 },
                 end: function () {
-                    renderTable()
+                    // renderTable()
                 }
             });
         }
@@ -566,9 +578,22 @@
                 case 'borrowing':
                     openBorrow(data);
                     break;
+                case 'tm':
+                    join(data.id);
+                    break;
             }
         });
 
+        table.on('sort(table)', function (obj) {
+            console.log(obj)
+            table.reload('user-table', {
+                initSort: obj, //记录初始排序,如果不设的话,将无法标记表头的排序状态。
+                where: { //请求参数(注意:这里面的参数可任意定义,并非下面固定的格式)
+                    field: obj.field, //排序字段
+                    order: obj.type  //排序方式
+                }
+            });
+        })
 
         //头部工具栏监听
         table.on('toolbar(table)', function (obj) {
@@ -589,6 +614,9 @@
                 case 'download':
                     download();
                     break;
+                case 'tm':
+                    join(obj.data.id)
+                    break;
             }
         })
 
@@ -614,5 +642,7 @@
             $("#resultSearch").show()
             renderTable()
         })
+
+
     });
 </script>

+ 6 - 4
src/main/resources/static/page/archive/secondaryList.html

@@ -45,7 +45,7 @@
             $ = layui.jquery;
 
         let archive_id = $("#archive_id").val()
-
+        let curr = 1
         /**方-------------------------------法-------------------------------定-------------------------------义*/
             //数据加载方法
         let renderTable = function () {
@@ -59,7 +59,9 @@
                     toolbar: '#toolbar',
                     limit: 15,
                     limits: [15, 30, 45, 60],
-                    page: true,
+                    page: {
+                        curr: curr
+                    },
                     request: {
                         pageName: 'pageNum',
                         limitName: 'pageSize'
@@ -78,7 +80,8 @@
                             "data": res.data.list
                         }
                     },
-                    done: function (res, curr, count) {
+                    done: function (res, curr1, count) {
+                        curr = curr1
                         // $('th').css({'background-color': '#1aa094', 'color': '#fff', 'font-weight': 'bold'})
                     },
                     cols: [[
@@ -172,7 +175,6 @@
         //表格操作栏
         table.on('tool(table)', function (obj) {
             let data = obj.data;
-            console.log(obj)
             switch (obj.event) {
                 case 'delete':
                     deleteFile(data.id);

+ 41 - 22
src/main/resources/static/page/archive/show.html

@@ -61,35 +61,35 @@
             <div>
                 <table style="font-size:12px;" border="1" class="layui-table" cellspacing="0">
                     <tr>
-                        <th>档号:</th>
+                        <th width="40px">档号:</th>
                         <td id="dh"></td>
-                        <th>题名:</th>
+                        <th width="40px">题名:</th>
                         <td id="tm"></td>
                     </tr>
                     <tr>
-                        <th>保管期限:</th>
+                        <th width="40px">保管期限:</th>
                         <td id="bgqx"></td>
-                        <th>档案类型:</th>
+                        <th width="40px">档案类型:</th>
                         <td id="mlText"></td>
                     </tr>
                     <tr>
-                        <th>密级:</th>
+                        <th width="40px">密级:</th>
                         <td id="mjText"></td>
-                        <th>归档日期:</th>
+                        <th width="40px">归档日期:</th>
                         <td id="gdrq"></td>
                     </tr>
                     <tr>
-                        <th>文号:</th>
+                        <th width="40px">文号:</th>
                         <td id="wjbh"></td>
-                        <th>责任者:</th>
+                        <th width="40px">责任者:</th>
                         <td id="zrz"></td>
                     </tr>
                     <tr>
-                        <th>内容概述:</th>
+                        <th width="40px">内容概述:</th>
                         <td colspan="3" id="nrgs"></td>
                     </tr>
                     <tr>
-                        <th>备注:</th>
+                        <th width="40px">备注:</th>
                         <td colspan="3" id="remarks"></td>
                     </tr>
                 </table>
@@ -98,29 +98,42 @@
         <div class="layui-tab-item">
             <div class="layui-fluid" style="height: 100%">
                 <div class="layui-row">
-                    <div class="layui-col-md2">
+                    <div class="layui-col-md2" id="files">
                         <ul id="file_list" class="layui-bg-black" style="height: calc(96vh);">
-                            <input id="archive_id" name="archive_id" type="hidden">
                         </ul>
                     </div>
-                    <div class="layui-col-md10">
-                        <iframe src=""
-                                frameborder="0" id="pdf_show" style="width: 100%; height: calc(96vh);"></iframe>
+                    <div class="layui-col-md10" id="pdf_yl">
+                        <iframe src="" frameborder="0" id="pdf_show" style="width: 100%; height: calc(96vh);"></iframe>
                     </div>
                 </div>
             </div>
         </div>
     </div>
 </div>
+<input id="archive_id" name="archive_id" type="hidden">
 <script src="../../lib/layui-v2.5.5/layui.js" charset="utf-8"></script>
 <script src="../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
 <script>
-    layui.use(['http', 'element'], function () {
+    layui.use(['http', 'element', 'url'], function () {
         let http = layui.http,
             $ = layui.$,
+            url = layui.url,
             element = layui.element
         ;
-        let archive_id = $("#archive_id").val()
+
+        // let archive_id = $("#archive_id").val()
+        let archive_id = url('id')['id']
+
+        // let a = setInterval(function (){
+        //     layer.msg(archive_id)
+        // },1000);
+        //
+
+        if (!archive_id) {
+            layer.msg('加载错误')
+            return;
+        }
+
 
         $(document).on('click', 'li>a', function () {
             $("#file_list").children("li").removeClass("layui-bg-green")
@@ -135,7 +148,7 @@
             http.get('archive/archiveFile/selectByArchiveId', {
                 archiveId: archive_id,
                 fileType: 0
-            }, true, res => {
+            }, false, res => {
                 if (res.code == 200) {
                     if (res.data.length == 0) {
                         // layui.layer.msg('无文件无法预览,即将自动关闭', {icon: 2}, function () {
@@ -144,10 +157,16 @@
                         //     parent.layer.close(iframeIndex);
                         // })
                         // return
-                        console.log(11)
                         $("#file_tab_list").hide()
                         return
                     }
+                    if (res.data.length == 1) {
+                        $("#files").removeClass();
+                        $("#files").addClass("layui-col-md0");
+                        $("#files").hide();
+                        $("#pdf_yl").removeClass();
+                        $("#pdf_yl").addClass("layui-col-md12");
+                    }
                     for (let i = 0; i < res.data.length; i++) {
                         let item = res.data[i]
                         if (i == 0) {
@@ -165,11 +184,11 @@
         let initData = () => {
             http.get('archive/archive/selectByPrimaryKeyText', {
                 id: archive_id
-            }, true, res => {
+            }, false, res => {
                 if (res.code == 200) {
                     $("#dh").text(res.data.dh ? res.data.dh : '无');
                     $("#tm").text(res.data.tm ? res.data.tm : '无');
-                    $("#bgqx").text(res.data.bgqx ? res.data.bgqx : '无');
+                    $("#bgqx").text(res.data.bgqx ? res.data.bgqxText : '无');
                     $("#mlText").text(res.data.mlText ? res.data.mlText : '无');
                     $("#mjText").text(res.data.mjText ? res.data.mjText : '无');
                     $("#gdrq").text(res.data.createTime ? res.data.createTime : '无');
@@ -184,7 +203,7 @@
         initFile()
 
 
-        element.on('tab(docDemoTabBrief)', function(data){
+        element.on('tab(docDemoTabBrief)', function (data) {
             // let index = data.index;
             // if (index == 1){
             //

+ 3 - 1
src/main/resources/static/page/archive/upload.html

@@ -57,6 +57,8 @@
 <script>
     layui.use(['form', 'upload', 'http'], () => {
 
+        let layer = layui.layer;
+
         let archive_id = layui.$("#archive_id").val()
         let fileType = layui.$("#fileType").val()
         let secondaryArchiveId = ''
@@ -93,7 +95,7 @@
                     if (res.code === 200) {
                         layer.msg('上传成功', {
                             icon: 1
-                        },function () {
+                        }, function () {
                             // 关闭弹出层
                             let iframeIndex = parent.layer.getFrameIndex(window.name);
                             parent.layer.close(iframeIndex);

+ 0 - 1
src/main/resources/static/page/archives-tree/edit.html

@@ -49,7 +49,6 @@
         </div>
     </div>
 
-
     <div class="layui-form-item">
         <div class="layui-input-block">
             <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>

+ 9 - 5
src/main/resources/static/page/auditList/list.html

@@ -78,6 +78,8 @@
             // bgqx: null,
             // ml: null
         }
+
+        let curr = 1;
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
             // http.getRoleButton(164)
@@ -102,7 +104,9 @@
                 toolbar: '#toolbar',
                 limit: 15,
                 limits: [15, 30, 45, 60],
-                page: true,
+                page: {
+                    curr: curr
+                },
                 request: {
                     pageName: 'pageNum',
                     limitName: 'pageSize'
@@ -119,7 +123,8 @@
                         "data": res.data.list
                     }
                 },
-                done: function (res, curr, count) {
+                done: function (res, curr1, count) {
+                    curr = curr1
                     // $('th').css({'background-color': '#1aa094', 'color': '#fff', 'font-weight': 'bold'})
                 },
                 cols: [[
@@ -134,9 +139,9 @@
                     },
                     {
                         field: 'estimateReturnTime', title: '预计归还时间', width: 120, templet(rv) {
-                            if (rv.estimateReturnTime){
+                            if (rv.estimateReturnTime) {
                                 return rv.estimateReturnTime.substring(0, 11)
-                            }else {
+                            } else {
                                 return '无需归还'
                             }
                         }
@@ -273,7 +278,6 @@
                 content: './audit.html',
                 success: function (layero, index) {
                     var body = layer.getChildFrame('body', index);
-                    console.log(data)
                     body.find("#id").val(data.id);
                 },
                 end: function () {

+ 25 - 7
src/main/resources/static/page/borrow/list.html

@@ -105,6 +105,7 @@
             // bgqx: null,
             // ml: null
         }
+        let curr = 1;
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
         $("#resultSearch").hide()
@@ -250,7 +251,9 @@
                 title: '用户数据表',
                 limit: 15,
                 limits: [15, 30, 45, 60],
-                page: true,
+                page: {
+                    curr: curr
+                },
                 request: {
                     pageName: 'pageNum',
                     limitName: 'pageSize'
@@ -267,16 +270,18 @@
                         "data": res.data.list
                     }
                 },
-                done: function (res, curr, count) {
+                done: function (res, curr1, count) {
                     params = {}
+                    curr = curr1
                     // $('th').css({'background-color': '#1aa094', 'color': '#fff', 'font-weight': 'bold'})
                 },
                 cols: [[
                     // {type: 'checkbox', fixed: 'left'},
                     {type: 'numbers'},
-                    {field: 'dh', title: '档号', width: 240},
+                    {field: 'dh', title: '档号', width: 240, sort: true},
+                    {field: 'jh', title: '件号', width: 80, sort: true},
                     {field: 'tm', title: '题名', width: 700},
-                    {field: 'gdnd', title: '归档年度', width: 120},
+                    {field: 'gdnd', title: '归档年度', width: 120, sort: true},
                     {field: 'zrz', title: '责任者', width: 120},
                     {field: 'mjText', title: '密级', width: 80},
                     {field: 'wjxcsj', title: '文件形成时间', width: 120},
@@ -315,7 +320,7 @@
                 shade: 0.2,
                 maxmin: true,
                 shadeClose: true,
-                area: ['900px', '600px'],
+                area: ['750px', '600px'],
                 content: '../archive/advancedSearch.html',
                 success: function (layero, index) {
                     var body = layer.getChildFrame('body', index);
@@ -462,13 +467,13 @@
 
         let join = function (id) {
             layer.open({
-                title: '监督对象',
+                title: '档案详细信息',
                 type: 2,
                 shade: 0.2,
                 maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './show.html',
+                content: '../archive/show.html',
                 success: function (layero, index) {
                     var body = layer.getChildFrame('body', index);
                     body.find("#archive_id").val(id);
@@ -548,9 +553,22 @@
                 case 'borrowing':
                     openBorrow(data);
                     break;
+                case 'tm':
+                    join(data.id);
+                    break;
             }
         });
 
+        table.on('sort(table)', function (obj) {
+            console.log(obj)
+            table.reload('user-table', {
+                initSort: obj, //记录初始排序,如果不设的话,将无法标记表头的排序状态。
+                where: { //请求参数(注意:这里面的参数可任意定义,并非下面固定的格式)
+                    field: obj.field, //排序字段
+                    order: obj.type  //排序方式
+                }
+            });
+        })
 
         //头部工具栏监听
         table.on('toolbar(table)', function (obj) {

+ 7 - 2
src/main/resources/static/page/borrow/listaaa.html

@@ -86,6 +86,8 @@
             // bgqx: null,
             // ml: null
         }
+
+        let curr = 1
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
         http.getRoleButton(164)
@@ -100,7 +102,9 @@
                 defaultToolbar: ['filter', 'exports', 'print'],
                 title: '用户数据表',
                 toolbar: '#toolbar',
-                page: true,
+                page: {
+                    curr: curr
+                },
                 limit: 15,
                 limits: [15, 30, 45, 60],
                 request: {
@@ -119,7 +123,8 @@
                         "data": res.data.list
                     }
                 },
-                done: function (res, curr, count) {
+                done: function (res, curr1, count) {
+                    curr = curr1
                     // $('th').css({'background-color': '#1aa094', 'color': '#fff', 'font-weight': 'bold'})
                 },
                 cols: [[

+ 7 - 2
src/main/resources/static/page/borrow/reserve.html

@@ -49,9 +49,9 @@
     </div>
 
     <div class="layui-form-item" id="phone_container">
-        <label class="layui-form-label required">手机号:</label>
+        <label class="layui-form-label">手机号:</label>
         <div class="layui-input-block">
-            <input type="text" class="layui-input" id="phone" lay-verify="required" lay-reqtext="手机号能为空" name="phone">
+            <input type="text" class="layui-input" id="phone" name="phone">
         </div>
     </div>
 
@@ -287,6 +287,10 @@
         })
         // 登记人员类型
         form.on("radio(personType)", function (data) {
+            $("#dept").val('');
+            $("#phone").val('');
+            $("#adminId").val('');
+            $("#name").val('');
             var type = data.value;
             if (type == '局内人员') {
                 $("#name_A").hide();
@@ -295,6 +299,7 @@
                 $("#name_A").show();
                 $("#deptId_A").hide();
             }
+            form.render();
         });
         // 借阅类型
         form.on("radio(borrowType)", function (data) {

+ 9 - 10
src/main/resources/static/page/home/new_file.html

@@ -182,7 +182,7 @@
 		.cardall{
 			margin-left: 12px;
 			 width: 98%;
-			display: flex; 
+			display: flex;
 			justify-content: space-between;
 		}
 .card1{
@@ -204,11 +204,11 @@
     </style>
 </head>
 <body>
-	
-	
+
+
 
 <div class=""  style="width:1200px; margin: 0 auto;">
-	
+
 	<div class="cardall">
 	  <div class="layui-col-md3 card1">
 	 <div style="margin-top: 15%;">
@@ -223,7 +223,7 @@
 				  <div  class="card2" style="font-size: 25px;font-weight: 600;">12</div>
 				  <div  class="card2" style="color: #8C8C8C;">到期未归还</div>
 	</div>
-	  
+
 	  </div>
 	  <div class="layui-col-md3 card1">
  <div style="margin-top: 15%;">
@@ -241,12 +241,12 @@
 	  </div>
 	</div>
     <div class="layuimini-main">
-	
+
         <div class="layui-row layui-col-space">
-	
+
             <div class="layui-col-md">
                 <div class="layui-row layui-col-space">
-				
+
                     <div class=""style="margin-right: 125px;width: 527px;float: left;">
                         <div class="layui-card">
                     <div class="layui-card-header"><img src="../../images/7.png " style="width: 10px;margin-right: 5px;" >到期未归还记录</div>
@@ -285,7 +285,7 @@
 
 
 
-                
+
 
                 </div>
             </div>
@@ -655,7 +655,6 @@
             echartsRecords.on('click',function (param) {
                 // let url = '/page/questionClues/list.html?hadnleWayParent='
                 let url = '/archives/page/questionClues/list.html?hadnleWayParent='
-                console.log(param)
                 switch (param.name) {
                     case '拟立案' : url += 'NILIAN'; break;
                     case '初步核实' : url += 'CHUBUHESHI'; break;

+ 6 - 4
src/main/resources/static/page/log/logsList.html

@@ -67,7 +67,7 @@
             $ = layui.jquery;
 
         let searchData = {}
-
+        let curr = 1
         /**方-------------------------------法-------------------------------定-------------------------------义*/
         http.getRoleButton(25)
         //数据加载方法
@@ -82,7 +82,9 @@
                 toolbar: '#toolbar',
                 limit: 15,
                 limits: [15, 30, 45, 60],
-                page: true,
+                page: {
+                    curr: curr
+                },
                 request: {
                     pageName: 'pageNum',
                     limitName: 'pageSize'
@@ -99,7 +101,8 @@
                         "data": res.data.list
                     }
                 },
-                done: function (res, curr, count) {
+                done: function (res, curr1, count) {
+                    curr = curr1
                     // $('th').css({'background-color': '#1aa094', 'color': '#fff', 'font-weight': 'bold'})
                 },
                 cols: [[
@@ -231,7 +234,6 @@
 
         //头部工具栏监听
         table.on('toolbar(user-table)', function (obj) {
-            console.log(obj)
             switch (obj.event) {
                 case 'clearThirtyOut':
                     clearThirtyOut();

+ 0 - 2
src/main/resources/static/page/menu/addMenu.html

@@ -179,11 +179,9 @@
                 limit: 12,
                 // 点击回调
                 click: function (data) {
-                    console.log(data);
                 },
                 // 渲染成功后的回调
                 success: function (d) {
-                    console.log(d);
                 }
             });
         }

+ 8 - 3
src/main/resources/static/page/myBorrow/list.html

@@ -77,6 +77,8 @@
             // bgqx: null,
             // ml: null
         }
+
+        let curr = 1
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
             // http.getRoleButton(164)
@@ -91,7 +93,9 @@
                     defaultToolbar: ['filter', 'exports', 'print'],
                     title: '用户数据表',
                     toolbar: '#toolbar',
-                    page: true,
+                    page: {
+                        curr: curr
+                    },
                     limit: 15,
                     limits: [15, 30, 45, 60],
                     request: {
@@ -110,8 +114,9 @@
                             "data": res.data.list
                         }
                     },
-                    done: function (res, curr, count) {
+                    done: function (res, curr1, count) {
                         // $('th').css({'background-color': '#1aa094', 'color': '#fff', 'font-weight': 'bold'})
+                        curr = curr1
                     },
                     cols: [[
                         // {type: 'checkbox', fixed: 'left'},
@@ -246,7 +251,7 @@
         form.on('submit(search)', function (data) {
             searchParam.dh = data.field.dh
             searchParam.tm = data.field.tm
-            searchParam.startTime = data.field.borrowTime.substring(0,data.field.borrowTime.indexOf(" - "))
+            searchParam.startTime = data.field.borrowTime.substring(0, data.field.borrowTime.indexOf(" - "))
             searchParam.endTime = data.field.borrowTime.substring(data.field.borrowTime.indexOf(" - ") + " - ".length)
             renderTable()
         })

+ 0 - 2
src/main/resources/static/page/role/editRole.html

@@ -65,7 +65,6 @@
             $ = layui.$;
         let id = $('#id').val()
 
-        console.log(id)
 
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
@@ -130,7 +129,6 @@
                 mjCodes: getChecked_list(tree.getChecked("miji-role")),
                 archiveTrees: getChecked_list(tree.getChecked("archive-tree-role"))
             }
-            console.log(data)
             http.post('system/role/setRole', data, true, function (res) {
                 if (res.code == 200) {
                     let index = layer.alert('保存成功!', {

+ 6 - 3
src/main/resources/static/page/role/list.html

@@ -39,7 +39,7 @@
         var table = layui.table,
             http = layui.http,
             $ = layui.jquery;
-
+        let curr = 1
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
         http.getRoleButton(18)
@@ -52,7 +52,9 @@
                     toolbar: '#toolbar', //开启头部工具栏,并为其绑定左侧模板
                     defaultToolbar: ['filter', 'exports', 'print'],
                     title: '用户数据表',
-                    page: true,
+                    page: {
+                        curr: curr
+                    },
                     limit: 15,
                     limits: [15, 30, 45, 60],
                     request: {
@@ -70,8 +72,9 @@
                             "data": res.data.list
                         }
                     },
-                    done: function(res, curr, count) {
+                    done: function(res, curr1, count) {
                         // $('th').css({'background-color': '#1aa094', 'color': '#fff','font-weight':'bold'})
+                        curr = curr1
                     },
                     cols: [[
                         // {type: 'checkbox', fixed: 'left'}

+ 1 - 4
src/main/resources/static/page/user/addUser.html

@@ -82,7 +82,6 @@
                     for (let i in res.data) {
                         html += '<option value="' + res.data[i].id + '">' + res.data[i].dictName + '</option>'
                     }
-                    console.log(html)
                     $("#paperType").append(html)
                     form.render();//菜单渲染 把内容加载进去
                 })
@@ -95,7 +94,6 @@
                 for (let i in res.data) {
                     html += '<option value="' + res.data[i].id + '">' + res.data[i].dictName + '</option>'
                 }
-                console.log(html)
                 $("#businessType").append(html)
                 form.render();//菜单渲染 把内容加载进去
             })
@@ -120,7 +118,6 @@
         // 加载数据
         let initData = function () {
             if (id != '') {
-                console.log($("#password"))
                 $("#password").hide()
                 $("input[name=password]").prop("disabled","disabled")
                 $("input[name=account]").prop("readonly","readonly")
@@ -152,4 +149,4 @@
     });
 </script>
 </body>
-</html>
+</html>

+ 6 - 3
src/main/resources/static/page/user/userList.html

@@ -43,7 +43,7 @@
             $ = layui.jquery;
 
         /**方-------------------------------法-------------------------------定-------------------------------义*/
-
+        let curr = 1;
         //数据加载方法
         let renderTable = function () {
                 // 加载表格数据
@@ -53,7 +53,9 @@
                     toolbar: '#toolbar', //开启头部工具栏,并为其绑定左侧模板
                     defaultToolbar: ['filter', 'exports', 'print'],
                     title: '用户数据表',
-                    page: true,
+                    page: {
+                        curr: curr
+                    },
                     limit: 15,
                     limits: [15, 30, 45, 60],
                     request: {
@@ -71,7 +73,8 @@
                             "data": res.data.list
                         }
                     },
-                    done: function(res, curr, count) {
+                    done: function(res, curr1, count) {
+                        curr = curr1
                         // $('th').css({'background-color': '#1aa094', 'color': '#fff','font-weight':'bold'})
                     },
                     cols: [[

+ 1 - 2
src/main/resources/static/page/user/userRole.html

@@ -76,7 +76,6 @@
                     });
                 }
             })
-            console.log(data)
         }
 
         // 加载数据
@@ -112,4 +111,4 @@
     });
 </script>
 </body>
-</html>
+</html>