Browse Source

:bug: 修改页面传参方式解决部分bug

刘嘉伟 4 years ago
parent
commit
94d21fe027
29 changed files with 354 additions and 351 deletions
  1. 1 0
      README.md
  2. 53 53
      pom.xml
  3. 6 0
      src/main/java/com/gz/GuihuaArchivesApplication.java
  4. 5 5
      src/main/java/com/gz/controller/archive/SecondaryArchiveController.java
  5. 2 0
      src/main/java/com/gz/scheduled/ScanArchiveFileScheduled.java
  6. 4 3
      src/main/java/com/gz/service/archive/impl/ArchiveServiceImpl.java
  7. 7 7
      src/main/java/com/gz/service/statistics/impl/SelectStatisticsServiceImpl.java
  8. 1 1
      src/main/resources/mapper/adminMapper.xml
  9. 1 1
      src/main/resources/mapper/archiveMapper.xml
  10. 8 8
      src/main/resources/static/page/admin/edit.html
  11. 4 6
      src/main/resources/static/page/admin/list.html
  12. 22 21
      src/main/resources/static/page/archive/edit.html
  13. 10 10
      src/main/resources/static/page/archive/editSecondary.html
  14. 4 5
      src/main/resources/static/page/archive/fileList.html
  15. 15 23
      src/main/resources/static/page/archive/list.html
  16. 3 8
      src/main/resources/static/page/archive/secondaryList.html
  17. 30 29
      src/main/resources/static/page/archives-tree/edit.html
  18. 2 6
      src/main/resources/static/page/archives-tree/list.html
  19. 6 4
      src/main/resources/static/page/auditList/audit.html
  20. 1 3
      src/main/resources/static/page/auditList/list.html
  21. 4 7
      src/main/resources/static/page/borrow/list.html
  22. 25 19
      src/main/resources/static/page/borrow/reserve.html
  23. 7 7
      src/main/resources/static/page/dept/edit.html
  24. 28 22
      src/main/resources/static/page/dept/list.html
  25. 2 4
      src/main/resources/static/page/myBorrow/list.html
  26. 3 3
      src/main/resources/static/page/myBorrow/ruditResult.html
  27. 18 19
      src/main/resources/static/page/role/edit.html
  28. 19 18
      src/main/resources/static/page/role/editRole.html
  29. 63 59
      src/main/resources/static/page/role/list.html

+ 1 - 0
README.md

@@ -110,3 +110,4 @@ ______
 > + 附件:南京NO.2018G46地块(奥特佳项目)规划设计方案
 > + 关于对建邺区江东中路377号南京金融城一期项目地下室进行确认的复函
 
+> Excel卷内目录档号公式   `=A2&"-"&TEXT(IF(ISNUMBER(FIND("-",G2,1)),LEFT(G2,FIND("-",G2,1) - 1),G2),"0000")`

+ 53 - 53
pom.xml

@@ -149,11 +149,11 @@
             <artifactId>bboss-elasticsearch-spring-boot-starter</artifactId>
             <version>${bboss.elasticsearch.version}</version>
         </dependency>
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-devtools</artifactId>
-            <optional>true</optional>
-        </dependency>
+<!--        <dependency>-->
+<!--            <groupId>org.springframework.boot</groupId>-->
+<!--            <artifactId>spring-boot-devtools</artifactId>-->
+<!--            <optional>true</optional>-->
+<!--        </dependency>-->
     </dependencies>
 
     <build>
@@ -166,57 +166,57 @@
                 </configuration>
             </plugin>
 
-<!--            <plugin>-->
-<!--                <groupId>cn.smallbun.screw</groupId>-->
-<!--                <artifactId>screw-maven-plugin</artifactId>-->
-<!--                <version>1.0.3</version>-->
-<!--                <dependencies>-->
-<!--                    &lt;!&ndash; HikariCP &ndash;&gt;-->
-<!--                    <dependency>-->
-<!--                        <groupId>com.zaxxer</groupId>-->
-<!--                        <artifactId>HikariCP</artifactId>-->
-<!--                        <version>3.4.5</version>-->
-<!--                    </dependency>-->
-<!--                    &lt;!&ndash;mysql driver&ndash;&gt;-->
-<!--                    <dependency>-->
-<!--                        <groupId>mysql</groupId>-->
-<!--                        <artifactId>mysql-connector-java</artifactId>-->
-<!--                        <version>8.0.20</version>-->
-<!--                    </dependency>-->
-<!--                </dependencies>-->
-<!--                <configuration>-->
-<!--                    &lt;!&ndash;username&ndash;&gt;-->
-<!--                    <username>root</username>-->
-<!--                    &lt;!&ndash;password&ndash;&gt;-->
-<!--                    <password>abcd123456!@#</password>-->
-<!--                    &lt;!&ndash;driver&ndash;&gt;-->
-<!--                    <driverClassName>com.mysql.cj.jdbc.Driver</driverClassName>-->
-<!--                    &lt;!&ndash;jdbc url&ndash;&gt;-->
-<!--                    <jdbcUrl><![CDATA[jdbc:mysql://115.159.38.225:3306/guihua_archives?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8]]></jdbcUrl>-->
-<!--                    &lt;!&ndash;生成文件类型&ndash;&gt;-->
-<!--                    <fileType>WORD</fileType>-->
-<!--                    &lt;!&ndash;打开文件输出目录&ndash;&gt;-->
-<!--                    <openOutputDir>false</openOutputDir>-->
-<!--                    &lt;!&ndash;生成模板&ndash;&gt;-->
-<!--                    <produceType>freemarker</produceType>-->
-<!--                    &lt;!&ndash;文档名称 为空时:将采用[数据库名称-描述-版本号]作为文档名称&ndash;&gt;-->
-<!--&lt;!&ndash;                    <fileName>111</fileName>&ndash;&gt;-->
-<!--                    &lt;!&ndash;描述&ndash;&gt;-->
-<!--                    <description>数据库文档生成</description>-->
-<!--                    &lt;!&ndash;版本&ndash;&gt;-->
-<!--                    <version>${project.version}</version>-->
-<!--                    &lt;!&ndash;标题&ndash;&gt;-->
-<!--                    <title>数据库文档</title>-->
-<!--                </configuration>-->
-<!--                <executions>-->
-<!--                    <execution>-->
-<!--                        <phase>compile</phase>-->
+            <plugin>
+                <groupId>cn.smallbun.screw</groupId>
+                <artifactId>screw-maven-plugin</artifactId>
+                <version>1.0.3</version>
+                <dependencies>
+                    <!-- HikariCP -->
+                    <dependency>
+                        <groupId>com.zaxxer</groupId>
+                        <artifactId>HikariCP</artifactId>
+                        <version>3.4.5</version>
+                    </dependency>
+                    <!--mysql driver-->
+                    <dependency>
+                        <groupId>mysql</groupId>
+                        <artifactId>mysql-connector-java</artifactId>
+                        <version>8.0.20</version>
+                    </dependency>
+                </dependencies>
+                <configuration>
+                    <!--username-->
+                    <username>root</username>
+                    <!--password-->
+                    <password>abcd123456!@#</password>
+                    <!--driver-->
+                    <driverClassName>com.mysql.cj.jdbc.Driver</driverClassName>
+                    <!--jdbc url-->
+                    <jdbcUrl><![CDATA[jdbc:mysql://115.159.38.225:3306/cmsga?autoReconnect=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=GMT%2B8]]></jdbcUrl>
+                    <!--生成文件类型-->
+                    <fileType>WORD</fileType>
+                    <!--打开文件输出目录-->
+                    <openOutputDir>false</openOutputDir>
+                    <!--生成模板-->
+                    <produceType>freemarker</produceType>
+                    <!--文档名称 为空时:将采用[数据库名称-描述-版本号]作为文档名称-->
+<!--                    <fileName>111</fileName>-->
+                    <!--描述-->
+                    <description>数据库文档生成</description>
+                    <!--版本-->
+                    <version>${project.version}</version>
+                    <!--标题-->
+                    <title>数据库文档</title>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>compile</phase>
 <!--                        <goals>-->
 <!--                            <goal>run</goal>-->
 <!--                        </goals>-->
-<!--                    </execution>-->
-<!--                </executions>-->
-<!--            </plugin>-->
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
 

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

@@ -1,13 +1,19 @@
 package com.gz;
 
+import com.gz.scheduled.ScanArchiveFileScheduled;
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Import;
 import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.scheduling.annotation.EnableScheduling;
 
 @EnableScheduling
 @SpringBootApplication
+@Import(value = {
+        ScanArchiveFileScheduled.class
+})
 public class GuihuaArchivesApplication {
 
     public static void main(String[] args) {

+ 5 - 5
src/main/java/com/gz/controller/archive/SecondaryArchiveController.java

@@ -29,7 +29,7 @@ public class SecondaryArchiveController {
      * @since 2020/9/4 14:46
      */
     @PostMapping("insert")
-    Integer insert(SecondaryArchiveInsertVO dto) throws Exception{
+    Integer insert(SecondaryArchiveInsertVO dto) throws Exception {
         return service.insert(dto);
     }
 
@@ -39,7 +39,7 @@ public class SecondaryArchiveController {
      * @since 2020/9/4 14:46
      */
     @DeleteMapping("delete")
-    Integer delete(Integer id){
+    Integer delete(Integer id) {
         return service.delete(id);
     }
 
@@ -49,7 +49,7 @@ public class SecondaryArchiveController {
      * @since 2020/9/4 14:46
      */
     @PostMapping("update")
-    Integer update(@RequestBody SecondaryArchiveDTO dto){
+    Integer update(@RequestBody SecondaryArchiveDTO dto) {
         return service.update(dto);
     }
 
@@ -59,7 +59,7 @@ public class SecondaryArchiveController {
      * @since 2020/9/4 14:46
      */
     @GetMapping("selectByPage")
-    PageInfo<SecondaryArchiveDTO> selectByPage(SecondaryArchiveVO vo){
+    PageInfo<SecondaryArchiveDTO> selectByPage(SecondaryArchiveVO vo) {
         return service.selectByPage(vo);
     }
 
@@ -81,7 +81,7 @@ public class SecondaryArchiveController {
      * @since 2021/3/9 15:35
      */
     @GetMapping("selectByArchiveId")
-    List<SecondaryArchiveDTO> selectByArchiveId(Integer archiveId){
+    List<SecondaryArchiveDTO> selectByArchiveId(Integer archiveId) {
         return service.selectByArchiveId(archiveId);
     }
 }

+ 2 - 0
src/main/java/com/gz/scheduled/ScanArchiveFileScheduled.java

@@ -4,8 +4,10 @@ import cn.hutool.core.io.FileUtil;
 import cn.hutool.core.util.StrUtil;
 import com.gz.config.MountArchiveFileConfig;
 import com.gz.core.exception.BusinessException;
+import com.gz.mapper.archive.ArchiveFileMapper;
 import lombok.extern.slf4j.Slf4j;
 import org.frameworkset.spi.annotations.Component;
+import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Profile;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.scheduling.annotation.Scheduled;

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

@@ -167,9 +167,9 @@ public class ArchiveServiceImpl implements ArchiveService {
                 // 正常检索
                 searchSql = getSql("com.gz.mapper.archive.ArchiveMapper.searchList", vo);
                 vo.setDeptId(null);
-                Integer i= mapper.getMenuId(vo.getRoleId());
-                if(i.equals(1)){
-                        vo.setDeptId(JwtUtils.getCurrentUserJwtPayload().getDeptId());
+                Integer i = mapper.getMenuId(vo.getRoleId());
+                if (i.equals(1)) {
+                    vo.setDeptId(JwtUtils.getCurrentUserJwtPayload().getDeptId());
                 }
                 result = new PageInfo<>(mapper.searchList(vo));
             }
@@ -459,6 +459,7 @@ public class ArchiveServiceImpl implements ArchiveService {
             stringRedisTemplate.opsForValue().set(archiveDTO.getDh(), String.valueOf(archiveDTO.getId()), 1L, TimeUnit.DAYS);
         }
         for (SecondaryArchiveDTO dto : secondaryArchiveDTOs) {
+            log.info("正在导入卷内目录:{}", JSONObject.toJSON(dto));
             String dh = dto.getDh();
             String archiveDh = dh.substring(0, dh.lastIndexOf("-"));
             int archiveId = Integer.parseInt(stringRedisTemplate.opsForValue().get(archiveDh));

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

@@ -117,7 +117,7 @@ public class SelectStatisticsServiceImpl implements SelectStatisticsService {
                 add("SJ");
             }};
             //占用磁盘的总大小
-            Long hj=0l;
+            Long hj = 0L;
             if (FileUtil.exist(baseDir) && FileUtil.isDirectory(baseDir)) {
                 // 全宗号
                 for (File qzh : baseDir.listFiles()) {
@@ -155,10 +155,10 @@ public class SelectStatisticsServiceImpl implements SelectStatisticsService {
                     }
                 }
             }
-            Map<String,String> map1=new HashMap<>();
+            Map<String, String> map1 = new HashMap<>();
             //内存大小赋值
             for (Map.Entry<String, Long> entry : map.entrySet()) {
-                map1.put(entry.getKey(),UnitUtils.storageUnitConvertStr(entry.getValue()));
+                map1.put(entry.getKey(), UnitUtils.storageUnitConvertStr(entry.getValue()));
             }
             for (Map.Entry<String, String> entry : map1.entrySet()) {
                 for (ArchiveStatisticsRVO li : tree) {
@@ -183,7 +183,7 @@ public class SelectStatisticsServiceImpl implements SelectStatisticsService {
                 }
             });
 
-            tree.get(tree.size()-1).setSumSpace(UnitUtils.storageUnitConvertStr(hj));
+            tree.get(tree.size() - 1).setSumSpace(UnitUtils.storageUnitConvertStr(hj));
             stringRedisTemplate.opsForValue().set(key, JSONObject.toJSONString(tree), DataGlobalVariable.CACHE_EXPIRES, DataGlobalVariable.TIME_UNIT);
             return tree;
         }
@@ -205,7 +205,7 @@ public class SelectStatisticsServiceImpl implements SelectStatisticsService {
             List<ArchiveYearStatisticsRVO> archiveYearStatisticsRVOS = selectStatisticsMapper.selectArchiveYearStatistics(vo);
             // 档案文件根目录
             File baseDir = FileUtil.file(this.baseDir);
-            Long hj=0l;
+            Long hj = 0l;
             log.info("{}{}", baseDir, baseDir.isDirectory());
             if (FileUtil.exist(baseDir) && FileUtil.isDirectory(baseDir)) {
                 // 全宗号
@@ -215,7 +215,7 @@ public class SelectStatisticsServiceImpl implements SelectStatisticsService {
                         for (File year : qzh.listFiles()) {
                             if (ObjectUtil.isNotEmpty(year)) {
                                 Long linuxDirectorySize = this.getLinuxDirectorySize(year);
-                                hj+=linuxDirectorySize;
+                                hj += linuxDirectorySize;
                                 archiveYearStatisticsRVOS.forEach(statisticsRVO -> {
                                     if (statisticsRVO.getGdnd().equals(year.getName())) {
                                         String s = UnitUtils.storageUnitConvertStr(linuxDirectorySize);
@@ -228,7 +228,7 @@ public class SelectStatisticsServiceImpl implements SelectStatisticsService {
                 }
             }
 
-            archiveYearStatisticsRVOS.get(archiveYearStatisticsRVOS.size()-1).setSumSpace(UnitUtils.storageUnitConvertStr(hj));
+            archiveYearStatisticsRVOS.get(archiveYearStatisticsRVOS.size() - 1).setSumSpace(UnitUtils.storageUnitConvertStr(hj));
             stringRedisTemplate.opsForValue().set(key, JSONObject.toJSONString(archiveYearStatisticsRVOS), DataGlobalVariable.CACHE_EXPIRES, DataGlobalVariable.TIME_UNIT);
             return archiveYearStatisticsRVOS;
         }

+ 1 - 1
src/main/resources/mapper/adminMapper.xml

@@ -27,7 +27,7 @@
             <if test="dept != null and dept != ''">
                 and dept_id in (select d.id from tab_dept d where d.id = #{dept} or parent_id = #{dept})
             </if>
-            <if test="roleId != null">
+            <if test="roleId != null and roleId != ''">
                 and role_id = #{roleId}
             </if>
         </where>

+ 1 - 1
src/main/resources/mapper/archiveMapper.xml

@@ -109,7 +109,7 @@
                 AND a.mj = #{mj}
             </if>
             <if test="ztc != null and ztc != ''">
-                AND (a.ztc like concat(concat('%',#{ztc}),'%') OR a.tm like concat(concat('%',#{ztc}),'%') OR sa.tm like concat(concat('%',#{ztc}),'%'))
+                AND (a.ztc like concat(concat('%',#{ztc}),'%') OR a.tm like concat(concat('%',#{ztc}),'%'))
             </if>
             <if test="sql != null and sql != ''">
                 ${sql}

+ 8 - 8
src/main/resources/static/page/admin/edit.html

@@ -94,24 +94,25 @@
 <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', 'treeSelect'], function () {
+    layui.use(['form', 'http', 'treeSelect', 'url'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
         var form = layui.form,
             layer = layui.layer,
             http = layui.http,
             treeSelect = layui.treeSelect,
             $ = layui.$;
-        let id = $('#id').val()
         let deptId = ''
+        // url参数
+        const urlParam = layui.url()
 
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
             //保存方法
         let save = function (data) {
-                http.post(id == '' ? 'system/admin/insert' : 'system/admin/update', data, true, function (res) {
+                http.post(urlParam.id == '' ? 'system/admin/insert' : 'system/admin/update', data, true, function (res) {
                     if (res.code == 200) {
                         let index = layer.alert('保存成功!', {
-                            title: id == '' ? '添加' : '修改' + '信息'
+                            title: urlParam.id == '' ? '添加' : '修改' + '信息'
                         }, function () {
                             // 关闭弹出层
                             layer.close(index);
@@ -146,7 +147,7 @@
                 },
                 success: function (res) {
                     if (deptId != null) {
-                        if (id != '' && deptId != '') {
+                        if (urlParam.id != '' && deptId != '') {
                             treeSelect.checkNode('deptId', deptId);
                         }
                     }
@@ -157,9 +158,9 @@
 
         // 加载数据
         let initData = function () {
-            if (id != '') {
+            if (urlParam.id) {
                 $("#account").prop('readonly', 'readonly')
-                http.get('system/admin/selectByPrimaryKey', {id: id}, false, function (res) {
+                http.get('system/admin/selectByPrimaryKey', {id: urlParam.id}, false, function (res) {
                     deptId = res.data.deptId
                     form.val("addPaper", res.data);
                     form.render();
@@ -177,7 +178,6 @@
             })
         }
         /**事-------------------------------件-------------------------------绑-------------------------------定*/
-
         initSelect()
         initData()
         initDept()

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

@@ -192,7 +192,7 @@
         //添加方法
         let addPaper = function () {
             layer.open({
-                title: '添加角色',
+                title: '添加用户',
                 type: 2,
                 shade: 0.2,
                 maxmin: true,
@@ -230,16 +230,14 @@
 
         let updPaper = function (id) {
             layer.open({
-                title: '添加字典',
+                title: '修改用户',
                 type: 2,
                 shade: 0.2,
                 maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './edit.html',
-                success: function (layero, index) {
-                    var body = layer.getChildFrame('body', index);
-                    body.find("#id").val(id);
+                content: './edit.html?id=' + id,
+                success: function (layer, index) {
                 },
                 end: function () {
                     renderTable()

+ 22 - 21
src/main/resources/static/page/archive/edit.html

@@ -58,12 +58,13 @@
 
                         <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-verify="required" lay-reqtext="档案门类不能为空" lay-filter="ml" class="layui-input">
-<!--                            <select name="ml" id="ml" lay-filter="ml" lay-verify="required" lay-reqtext="档案门类不能为空">-->
-<!--                                <option value="">请选择档案门类</option>-->
-<!--                            </select>-->
+                            <!--                            <input type="hidden" id="mlId" class="layui-input">-->
+                            <!--                            <input type="hidden" id="mlCode" class="layui-input">-->
+                            <input type="text" id="ml" name="ml" lay-verify="required" lay-reqtext="档案门类不能为空"
+                                   lay-filter="ml" class="layui-input">
+                            <!--                            <select name="ml" id="ml" lay-filter="ml" lay-verify="required" lay-reqtext="档案门类不能为空">-->
+                            <!--                                <option value="">请选择档案门类</option>-->
+                            <!--                            </select>-->
                         </div>
 
 
@@ -74,7 +75,7 @@
                             </select>
                         </div>
                         <label class="layui-form-label">目录号:</label>
-<!--                        lay-verify="required"-->
+                        <!--                        lay-verify="required"-->
                         <div class="layui-input-inline">
                             <input type="number" class="layui-input" placeholder="请输入目录号" name="mlh" id="mlh"
                                    lay-filter="mlh"
@@ -271,7 +272,7 @@
 <script src="../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
 <script>
 
-    layui.use(['form', 'http', 'iconPickerFa', 'treeSelect', 'laydate', 'upload', 'element', 'table'], function () {
+    layui.use(['form', 'http', 'iconPickerFa', 'treeSelect', 'laydate', 'upload', 'element', 'table', 'url'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
         var form = layui.form,
             layer = layui.layer,
@@ -282,7 +283,7 @@
             upload = layui.upload,
             table = layui.table,
             treeSelect = layui.treeSelect;
-        let id = $('#id').val();
+        const urlParam = layui.url()
         let bgqxappend = false;
 
         let fileType = $("#fileType").val()
@@ -409,13 +410,13 @@
 
         // 保存方法
         let save = function (data, method) {
-            if (sl){
+            if (sl) {
                 data.ml = sl
             }
-            http.post(id == '' ? 'archive/archive/insert' : 'archive/archive/update', data, true, function (res) {
+            http.post(urlParam.id == '' ? 'archive/archive/insert' : 'archive/archive/update', data, true, function (res) {
                 if (res.code == 200) {
                     let index = layer.alert('保存成功!', {
-                        title: id == '' ? '添加' : '修改' + '信息'
+                        title: urlParam.id == '' ? '添加' : '修改' + '信息'
                     }, function () {
                         if (method == 'save') {
                             // 关闭弹出层
@@ -473,12 +474,12 @@
                         enable: true
                     }
                 },
-                click: function (d){
+                click: function (d) {
                     let code = ''
                     let parent = d.current.getParentNode()
-                    if(parent != null){
+                    if (parent != null) {
                         code = parent.code
-                    }else {
+                    } else {
                         code = d.current.code
                     }
 
@@ -515,7 +516,7 @@
 
                     switch (code) {
                         case 'KU':
-                            if(!isAddhsdw){
+                            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' +
@@ -525,7 +526,7 @@
                             }
                             break;
                         case 'KJ':
-                            if(!isAddxmdh){
+                            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' +
@@ -621,17 +622,17 @@
         // 加载数据
         let initData = function () {
             let adata = ''
-            if (id != '') {
+            if (urlParam.id != '') {
                 $("#file_tab_list").show();
                 $("#zj").hide()
                 http.get('/archive/archive/selectByPrimaryKey', {
-                    id: id
+                    id: urlParam.id
                 }, false, function (res) {
                     adata = res.data
                     form.val("addDict", res.data);
                     form.render();
                 })
-            }else {
+            } else {
                 $("#file_tab_list").hide();
             }
             if (!bgqxappend) {
@@ -673,7 +674,7 @@
                     limitName: 'pageSize'
                 },
                 where: {
-                    archiveId: id,
+                    archiveId: urlParam.id,
                     fileType: fileType
                 },
                 response: {

+ 10 - 10
src/main/resources/static/page/archive/editSecondary.html

@@ -61,7 +61,7 @@
         <label class="layui-form-label">文号:</label>
         <div class="layui-input-block" style="">
             <input type="text" class="layui-input" placeholder="请输入文号" name="wh" id="wh" lay-filter="wh"
-                   lay-verify="required" lay-reqtext="文号不能为空">
+                   lay-reqtext="文号不能为空">
         </div>
     </div>
 
@@ -70,12 +70,12 @@
         <label class="layui-form-label">责任者:</label>
         <div class="layui-input-block" style="">
             <input type="text" class="layui-input" placeholder="请输入责任者" name="zrz" id="zrz" lay-filter="zrz"
-                   lay-verify="required" lay-reqtext="责任者不能为空">
+                   lay-reqtext="责任者不能为空">
         </div>
     </div>
 
     <div class="layui-form-item">
-        <label class="layui-form-label">文件:</label>
+        <label class="layui-form-label required">文件:</label>
         <div class="layui-input-block">
             <div class="layui-input-inline" style="">
                 <input type="text" placeholder="请选择文件" readonly class="layui-input" id="upload">
@@ -113,7 +113,7 @@
 <script src="../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
 <script>
 
-    layui.use(['form', 'http', 'laydate', 'upload'], function () {
+    layui.use(['form', 'http', 'laydate', 'upload', 'url'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
         var form = layui.form,
             layer = layui.layer,
@@ -121,9 +121,9 @@
             $ = layui.$,
             upload = layui.upload,
             laydate = layui.laydate,
-            id = $('#id').val(),
-            archive_id = $("#archive_id").val(),
             upload_file = {};
+        const urlParam = layui.url()
+        console.log('url参数', urlParam)
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
         /** 初始化日期控件*/
@@ -174,10 +174,10 @@
         let save = function (data, method) {
             let f = paramsToFormData(data)
             f.append('file', upload_file)
-            http.post(id == '' ? 'secondary/archive/insert' : 'secondary/archive/update', f, true, function (res) {
+            http.post(urlParam.id == '' ? 'secondary/archive/insert' : 'secondary/archive/update', f, true, function (res) {
                 if (res.code == 200) {
                     let index = layer.alert('保存成功!', {
-                        title: id == '' ? '添加' : '修改' + '信息'
+                        title: urlParam.id == '' ? '添加' : '修改' + '信息'
                     }, function () {
                         if (method == 'save') {
                             // 关闭弹出层
@@ -194,9 +194,9 @@
         // 加载数据
         let initData = function () {
             let adata = ''
-            if (id != '') {
+            if (urlParam.id != '') {
                 http.get('secondary/archive/selectByPrimaryKey', {
-                    id: id
+                    id: urlParam.id
                 }, false, function (res) {
                     adata = res.data
                     form.val("addDict", res.data);

+ 4 - 5
src/main/resources/static/page/archive/fileList.html

@@ -50,7 +50,7 @@
 <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(['table', 'http', 'form', 'upload'], function () {
+    layui.use(['table', 'http', 'form', 'upload', 'url'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
 
         var table = layui.table,
@@ -58,9 +58,8 @@
             form = layui.form,
             upload = layui.upload,
             $ = layui.jquery;
+        const urlParam = layui.url()
 
-        let archive_id = $("#archive_id").val()
-        let fileType = $("#fileType").val()
         let curr = 1;
         /**方-------------------------------法-------------------------------定-------------------------------义*/
             //数据加载方法
@@ -82,8 +81,8 @@
                         limitName: 'pageSize'
                     },
                     where: {
-                        archiveId: archive_id,
-                        fileType: fileType
+                        archiveId: urlParam.archive_id,
+                        fileType: urlParam.fileType
                     },
                     response: {
                         statusCode: 200 //重新规定成功的状态码为 200,table 组件默认为 0

+ 15 - 23
src/main/resources/static/page/archive/list.html

@@ -122,6 +122,7 @@
 
         $("#resultSearch").hide()
 
+        // 获取权限按钮
         http.getRoleButton(158)
 
         let initUpload = function () {
@@ -151,7 +152,6 @@
             layer.close(loading);
         }
 
-
         let initSelect = function () {
             initBgqx()
             // 加载密集
@@ -167,11 +167,12 @@
 
         }
 
-        let initgdnx = function (){
-            http.get('system/dict/selectGdnd',{},false, function (res) {
+        // 加载归档年度
+        let initgdnx = function () {
+            http.get('system/dict/selectGdnd', {}, false, function (res) {
                 let html = '';
                 for (let i in res.data) {
-                    html += '<option value="' + res.data[i].gdnx + '">' + res.data[i].gdnx+ '</option>'
+                    html += '<option value="' + res.data[i].gdnx + '">' + res.data[i].gdnx + '</option>'
                 }
                 $("#gdnd").append(html)
                 form.render();//菜单渲染 把内容加载进去
@@ -255,9 +256,10 @@
             })
         }
 
+        // 加载保管期限
         let initBgqx = function () {
             let code = 'BAOGUANQIXIANER'
-            if(searchParam.ml === 'WS' || searchParam.ml === ''){
+            if (searchParam.ml === 'WS' || searchParam.ml === '') {
                 code = 'BAOGUANQIXIANYI'
             }
             http.get('system/dict/selectDictByCode', {code: code}, false, function (res) {
@@ -330,7 +332,6 @@
             });
         }
 
-
         //添加方法
         let addDict = function () {
             var index = layer.open({
@@ -352,6 +353,7 @@
             });
         }
 
+        // 高级检索
         let advancedSearch = function () {
             var index = layer.open({
                 title: '高级检索',
@@ -362,7 +364,6 @@
                 area: ['750px', '600px'],
                 content: './advancedSearch.html',
                 success: function (layero, index) {
-                    var body = layer.getChildFrame('body', index);
                 },
                 end: function () {
                     renderTable()
@@ -384,11 +385,8 @@
                 maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './fileList.html',
+                content: './fileList.html?archive_id=' + data.id + '&fileType=' + 1,
                 success: function (layero, index) {
-                    var body = layer.getChildFrame('body', index);
-                    body.find("#archive_id").val(data.id);
-                    body.find("#fileType").val(1);
                 },
                 end: function () {
                     renderTable()
@@ -405,11 +403,8 @@
                 maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './fileList.html',
+                content: './fileList.html?archive_id=' + data.id + '&fileType=' + 0,
                 success: function (layero, index) {
-                    var body = layer.getChildFrame('body', index);
-                    body.find("#archive_id").val(data.id);
-                    body.find("#fileType").val(0);
                 },
                 end: function () {
                     renderTable()
@@ -429,9 +424,6 @@
                 area: ['100%', '100%'],
                 content: './secondaryList.html?archive_id=' + data.id + "&dh=" + data.dh,
                 success: function (layero, index) {
-                    // var body = layer.getChildFrame('body', index);
-                    // body.find("#archive_id").val(data.id);
-                    // body.find("#dh").val(data.dh);
                 },
                 end: function () {
                     renderTable()
@@ -483,6 +475,7 @@
             });
         }
 
+        // 批量删除
         let batchDel = function () {
             var data = layui.table.checkStatus('user-table').data;
             if (data.length > 0) {
@@ -510,6 +503,7 @@
             }
         }
 
+        // 导入
         let importExcel = function () {
             var index = layer.open({
                 title: '文档导入',
@@ -520,7 +514,6 @@
                 area: ['100%', '100%'],
                 content: './import.html',
                 success: function (layero, index) {
-                    var body = layer.getChildFrame('body', index);
                 },
                 end: function () {
                     renderTable()
@@ -528,6 +521,7 @@
             });
         }
 
+        // 档案信息
         let join = function (id) {
             layer.open({
                 title: '档案信息',
@@ -538,9 +532,6 @@
                 area: ['100%', '100%'],
                 content: './show.html' + '?id=' + id,
                 success: function (layero, index) {
-                    // var body = layer.getChildFrame('body', index);
-                    // body.find("#archive_id").val(id);
-                    // console.log(body.find("#archive_id"))
                 },
                 end: function () {
                     // renderTable()
@@ -548,10 +539,12 @@
             });
         }
 
+        // 下载模板
         let download = function () {
             window.open("/template/导入模板.xlsx", "_blank")
         }
 
+        // 导出
         let exportUser = function (data) {
             var url = http.requestUrl + 'archives/user/exportWord?userId=' + data.id;
             var xhr = new XMLHttpRequest();
@@ -578,7 +571,6 @@
             };
             // 发送ajax请求
             xhr.send()
-
         }
         /**事-------------------------------件-------------------------------绑-------------------------------定*/
 

+ 3 - 8
src/main/resources/static/page/archive/secondaryList.html

@@ -35,7 +35,7 @@
 <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(['table', 'http', 'form', 'upload','url'], function () {
+    layui.use(['table', 'http', 'form', 'upload', 'url'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
 
         var table = layui.table,
@@ -128,10 +128,8 @@
                 maxmin: true,
                 shadeClose: true,
                 area: ['600px', '600px'],
-                content: './editSecondary.html',
+                content: './editSecondary.html?archive_id=' + archive_id,
                 success: function (layero, index) {
-                    var body = layer.getChildFrame('body', index);
-                    body.find("#archive_id").val(archive_id);
                 },
                 end: function () {
                     renderTable()
@@ -148,11 +146,8 @@
                 maxmin: true,
                 shadeClose: true,
                 area: ['600px', '600px'],
-                content: './editSecondary.html',
+                content: './editSecondary.html?id=' + data.id + '&archive_id=' + archive_id,
                 success: function (layero, index) {
-                    var body = layer.getChildFrame('body', index);
-                    body.find("#archive_id").val(archive_id);
-                    body.find("#id").val(data.id)
                 },
                 end: function () {
                     renderTable()

+ 30 - 29
src/main/resources/static/page/archives-tree/edit.html

@@ -18,7 +18,8 @@
         <label class="layui-form-label required">门类名称</label>
         <div class="layui-input-block">
             <input type="hidden" name="id" id="id" class="layui-input">
-            <input type="text" name="title" lay-verify="required" lay-reqtext="门类名称不能为空" placeholder="请输入门类名称" value="" class="layui-input">
+            <input type="text" name="title" lay-verify="required" lay-reqtext="门类名称不能为空" placeholder="请输入门类名称" value=""
+                   class="layui-input">
         </div>
     </div>
 
@@ -26,18 +27,18 @@
     <div class="layui-form-item">
         <label class="layui-form-label required">门类代码</label>
         <div class="layui-input-block">
-            <input type="text" name="code" placeholder="请输入门类代码" value="" lay-verify="" lay-reqtext="门类代码不能为空" class="layui-input">
+            <input type="text" name="code" placeholder="请输入门类代码" value="" lay-verify="" lay-reqtext="门类代码不能为空"
+                   class="layui-input">
         </div>
     </div>
 
 
-
     <div class="layui-form-item">
         <label class="layui-form-label">父级门类</label>
         <div class="layui-input-block">
-<!--            <select name="parentId" id="parentId" lay-filter="parentId">-->
-<!--                <option value="-1">请选择父级菜单</option>-->
-<!--            </select>-->
+            <!--            <select name="parentId" id="parentId" lay-filter="parentId">-->
+            <!--                <option value="-1">请选择父级菜单</option>-->
+            <!--            </select>-->
             <input type="text" id="parentId" name="parentId" lay-filter="parentId" class="layui-input">
         </div>
     </div>
@@ -59,37 +60,37 @@
 <script src="../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
 <script>
 
-    layui.use(['form','http','iconPickerFa','treeSelect'], function () {
+    layui.use(['form', 'http', 'iconPickerFa', 'treeSelect', 'url'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
         var form = layui.form,
             layer = layui.layer,
             http = layui.http,
             $ = layui.$,
             treeSelect = layui.treeSelect;
-        let id = $('#id').val()
+        const urlParam = layui.url()
         let parentId;
         /**方-------------------------------法-------------------------------定-------------------------------义*/
-        // 保存方法
+            // 保存方法
         let save = function (data) {
                 var selectedNodes = treeSelect.zTree('parentId').getSelectedNodes();
-                if (selectedNodes.length > 0){
+                if (selectedNodes.length > 0) {
                     data.parentId = selectedNodes[0].id
-                }else {
+                } else {
                     data.parentId = -1
                 }
-            http.post(id == '' ? 'system/archivesTree/insert': 'system/archivesTree/update',data,true,function (res) {
-                if (res.code == 200){
-                    let index = layer.alert('保存成功!', {
-                        title: id == '' ? '添加':'修改' + '信息'
-                    }, function () {
-                        // 关闭弹出层
-                        layer.close(index);
-                        let iframeIndex = parent.layer.getFrameIndex(window.name);
-                        parent.layer.close(iframeIndex);
-                    });
-                }
-            })
-        }
+                http.post(urlParam.id == '' ? 'system/archivesTree/insert' : 'system/archivesTree/update', data, true, function (res) {
+                    if (res.code == 200) {
+                        let index = layer.alert('保存成功!', {
+                            title: urlParam.id == '' ? '添加' : '修改' + '信息'
+                        }, function () {
+                            // 关闭弹出层
+                            layer.close(index);
+                            let iframeIndex = parent.layer.getFrameIndex(window.name);
+                            parent.layer.close(iframeIndex);
+                        });
+                    }
+                })
+            }
 
         // 加载下拉框
         let loadDictSelect = function () {
@@ -122,7 +123,7 @@
                     }
                 },
                 success: function (res) {
-                    if(id != '' && parentId != '' && parentId != -1){
+                    if (urlParam.id != '' && parentId != '' && parentId != -1) {
                         treeSelect.checkNode('parentId', parentId);
                     }
                 }
@@ -131,10 +132,10 @@
 
         // 加载数据
         let initData = function () {
-            if(id != ''){
-                http.get('/system/archivesTree/selectByPrimaryKey',{
-                    id: id
-                },false,function (res) {
+            if (urlParam.id) {
+                http.get('/system/archivesTree/selectByPrimaryKey', {
+                    id: urlParam.id
+                }, false, function (res) {
                     form.val("addDict", res.data);
                     parentId = res.data.parentId
                     form.render();

+ 2 - 6
src/main/resources/static/page/archives-tree/list.html

@@ -124,12 +124,8 @@
                 maxmin:true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './edit.html',
-                success: function(layero, index){
-                    // var iframe = window['layui-layer-iframe' + index];
-                    // iframe.setValue(id)
-                    var body=layer.getChildFrame('body',index);
-                    body.find("#id").val(id);
+                content: './edit.html?id=' + id,
+                success: function(layer, index){
                 },
                 end: function () {
                     renderTable()

+ 6 - 4
src/main/resources/static/page/auditList/audit.html

@@ -132,17 +132,19 @@
     <script src="../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
     <script>
 
-        layui.use(['form', 'http', 'laydate'], function () {
+        layui.use(['form', 'http', 'laydate', 'url'], function () {
             /**变-------------------------------量-------------------------------定-------------------------------义*/
             var form = layui.form,
                 layer = layui.layer,
                 http = layui.http,
                 laydate = layui.laydate,
                 $ = layui.$;
-            let id = $('#id').val()
+            const urlParam = layui.url()
+            console.log(urlParam, '参数')
             /**方-------------------------------法-------------------------------定-------------------------------义*/
                 // 保存方法
             let save = function (data) {
+                    data.id = urlParam.id
                     http.post('borrow/archiveBorrow/audit', data, true, function (res) {
                         if (res.code == 200) {
                             let index = layer.alert('保存成功!', {
@@ -162,7 +164,7 @@
             let initData = function () {
                 // 加载当前文档信息
                 http.get('borrow/archiveBorrow/selectBorrowInfo', {
-                    id: id
+                    id: urlParam.id
                 }, false, function (res) {
                     $("#adminName").text(res.data.name == null ? '无' : res.data.name)
                     let jy = ''
@@ -185,7 +187,7 @@
                     $("#phone").text(res.data.phone == null ? '无' : res.data.phone)
                     let fjHtml = '无'
                     if (res.data.originalFileName) {
-                        fjHtml = '<a style="color: #2D8CF0" target="_blank" href="' + res.data.filePath +'/' +  res.data.fileName + '">' + res.data.originalFileName + '</a>'
+                        fjHtml = '<a style="color: #2D8CF0" target="_blank" href="' + res.data.filePath + '/' + res.data.fileName + '">' + res.data.originalFileName + '</a>'
                     }
                     $("#fj").html(fjHtml)
                     // form.val("addDict", res.data);

+ 1 - 3
src/main/resources/static/page/auditList/list.html

@@ -275,10 +275,8 @@
                 maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './audit.html',
+                content: './audit.html?id=' + data.id,
                 success: function (layero, index) {
-                    var body = layer.getChildFrame('body', index);
-                    body.find("#id").val(data.id);
                 },
                 end: function () {
                     renderTable()

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

@@ -163,11 +163,8 @@
                 maxmin: true,
                 shadeClose: true,
                 area: ['70%', '90%'],
-                content: '../borrow/reserve.html',
+                content: '../borrow/reserve.html?archive_id=' + data.id + "&recordType=" + 1,
                 success: function (layero, index) {
-                    var body = layer.getChildFrame('body', index);
-                    body.find("#archive_id").val(data.id);
-                    body.find("#recordType").val(1);
                 },
                 end: function () {
                     renderTable()
@@ -240,11 +237,11 @@
             })
         }
 
-        let initgdnx = function (){
-            http.get('system/dict/selectGdnd',{},false, function (res) {
+        let initgdnx = function () {
+            http.get('system/dict/selectGdnd', {}, false, function (res) {
                 let html = '';
                 for (let i in res.data) {
-                    html += '<option value="' + res.data[i].gdnx + '">' + res.data[i].gdnx+ '</option>'
+                    html += '<option value="' + res.data[i].gdnx + '">' + res.data[i].gdnx + '</option>'
                 }
                 $("#gdnd").append(html)
                 form.render();//菜单渲染 把内容加载进去

+ 25 - 19
src/main/resources/static/page/borrow/reserve.html

@@ -10,6 +10,7 @@
         body {
             background-color: #ffffff;
         }
+
         .layui-form-item .layui-input-inline {
             /*width: 20%;*/
         }
@@ -20,6 +21,7 @@
     <div class="layui-form-item" id="ryA">
         <label class="layui-form-label required">人员类型:</label>
         <div class="layui-input-block">
+            <input type="hidden" name="recordType" id="recordType" class="layui-input">
             <input lay-filter="personType" type="radio" name="personType" value="局内人员" title="局内人员" checked>
             <input lay-filter="personType" type="radio" name="personType" value="外来人员" title="外来人员">
         </div>
@@ -68,6 +70,7 @@
     <div class="layui-form-item">
         <label class="layui-form-label required">档号:</label>
         <div class="layui-input-block">
+            <input type="hidden" name="archiveId" id="archive_id" class="layui-input">
             <input type="text" name="dh" placeholder="请输入档号" value="" lay-verify="required" lay-reqtext="档号不能为空"
                    class="layui-input" readonly>
         </div>
@@ -128,7 +131,7 @@
 <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', 'laydate', 'upload','url'], function () {
+    layui.use(['form', 'http', 'laydate', 'upload', 'url'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
         var form = layui.form,
             layer = layui.layer,
@@ -141,9 +144,8 @@
         let recordType = url().recordType
         console.log()
         /**方-------------------------------法-------------------------------定-------------------------------义*/
-        if(recordType == 1){
-            http.get('system/auth/currLoginAdminDept', {
-            }, true, function (res) {
+        if (recordType == 1) {
+            http.get('system/auth/currLoginAdminDept', {}, true, function (res) {
                 if (res.code === 200) {
                     $("#dept").val(res.data.deptName ? res.data.deptName : '无')
                     $("#phone").val(res.data.phone)
@@ -156,24 +158,26 @@
             // $("#dept_container").hide()
             // $("#phone_container").hide()
             $("#ryA").hide()
-        }else {
+        } else {
             $("#name_A").hide();
         }
-            // 保存方法
+        // 保存方法
         let save = function (data) {
-                http.post('borrow/archiveBorrow/borrow', data, true, function (res) {
-                    if (res.code == 200) {
-                        let index = layer.alert('保存成功!', {
-                            title: '预约借阅文档'
-                        }, function () {
-                            // 关闭弹出层
-                            layer.close(index);
-                            let iframeIndex = parent.layer.getFrameIndex(window.name);
-                            parent.layer.close(iframeIndex);
-                        });
-                    }
-                })
-            }
+            data.archiveId = archiveId
+            data.recordType = recordType
+            http.post('borrow/archiveBorrow/borrow', data, true, function (res) {
+                if (res.code == 200) {
+                    let index = layer.alert('保存成功!', {
+                        title: '预约借阅文档'
+                    }, function () {
+                        // 关闭弹出层
+                        layer.close(index);
+                        let iframeIndex = parent.layer.getFrameIndex(window.name);
+                        parent.layer.close(iframeIndex);
+                    });
+                }
+            })
+        }
         // 加载下拉框
         let loadDictSelect = function () {
             http.get('system/admin/selectAll', {}, false, function (res) {
@@ -186,11 +190,13 @@
                 form.render();//菜单渲染 把内容加载进去
             })
         }
+
         // 最小时间
         function minDate() {
             var now = new Date();
             return now.getFullYear() + "-" + (now.getMonth() + 1) + "-" + now.getDate();
         }
+
         // 加载数据
         let initData = function () {
             laydate.render({

+ 7 - 7
src/main/resources/static/page/dept/edit.html

@@ -60,14 +60,14 @@
 <script src="../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
 <script>
 
-    layui.use(['form', 'http', 'iconPickerFa', 'treeSelect'], function () {
+    layui.use(['form', 'http', 'iconPickerFa', 'treeSelect', 'url'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
         var form = layui.form,
             layer = layui.layer,
             http = layui.http,
             $ = layui.$,
             treeSelect = layui.treeSelect;
-        let id = $('#id').val()
+        const urlParam = layui.url()
         let parentId;
         /**方-------------------------------法-------------------------------定-------------------------------义*/
             // 保存方法
@@ -78,10 +78,10 @@
                 } else {
                     data.parentId = null
                 }
-                http.post(id == '' ? 'system/dept/insert' : 'system/dept/update', data, true, function (res) {
+                http.post(urlParam.id == '' ? 'system/dept/insert' : 'system/dept/update', data, true, function (res) {
                     if (res.code == 200) {
                         let index = layer.alert('保存成功!', {
-                            title: id == '' ? '添加' : '修改' + '信息'
+                            title: urlParam.id == '' ? '添加' : '修改' + '信息'
                         }, function () {
                             // 关闭弹出层
                             layer.close(index);
@@ -116,7 +116,7 @@
                 },
                 success: function (res) {
                     if (parentId != null) {
-                        if (id != '' && parentId != '' && parentId != -1) {
+                        if (urlParam.id != '' && parentId != '' && parentId != -1) {
                             treeSelect.checkNode('parentId', parentId);
                         }
                     }
@@ -126,9 +126,9 @@
 
         // 加载数据
         let initData = function () {
-            if (id != '') {
+            if (urlParam.id) {
                 http.get('/system/dept/selectByPrimaryKey', {
-                    id: id
+                    id: urlParam.id
                 }, false, function (res) {
                     form.val("addDict", res.data);
                     parentId = res.data.parentId

+ 28 - 22
src/main/resources/static/page/dept/list.html

@@ -33,12 +33,12 @@
 <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(['table', 'treetable','http'], function () {
+    layui.use(['table', 'treetable', 'http'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
         let $ = layui.jquery,
-        table = layui.table,
-        http = layui.http,
-        treetable = layui.treetable;
+            table = layui.table,
+            http = layui.http,
+            treetable = layui.treetable;
 
         /**方-------------------------------法-------------------------------定-------------------------------义*/
         http.getRoleButton(184)
@@ -57,8 +57,8 @@
                 page: false,
                 cols: [[
                     {type: 'numbers'},
-                    {field: 'deptName',  title: '名称'},
-                    {field: 'deptOrder',  title: '排序'},
+                    {field: 'deptName', title: '名称'},
+                    {field: 'deptOrder', title: '排序'},
                     {templet: '#operating', width: 300, align: 'center', title: '操作'}
                 ]],
                 done: function () {
@@ -84,7 +84,7 @@
                 title: '添加部门',
                 type: 2,
                 shade: 0.2,
-                maxmin:true,
+                maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
                 content: './edit.html',
@@ -97,13 +97,13 @@
         //删除方法
         let deleteDict = function (id) {
             layer.confirm('真的删除行么', function (index) {
-                http.delete('/system/dept/delete',{id: id},true,function (res) {
-                    if (res.code == 200){
+                http.delete('/system/dept/delete', {id: id}, true, function (res) {
+                    if (res.code == 200) {
                         layer.msg('删除成功', {
                             icon: 1,
                             time: 2000
                         })
-                    }else {
+                    } else {
                         layer.msg(res.msg, {
                             icon: 2,
                             time: 2000
@@ -121,15 +121,11 @@
                 title: '修改部门',
                 type: 2,
                 shade: 0.2,
-                maxmin:true,
+                maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './edit.html',
-                success: function(layero, index){
-                    // var iframe = window['layui-layer-iframe' + index];
-                    // iframe.setValue(id)
-                    var body=layer.getChildFrame('body',index);
-                    body.find("#id").val(id);
+                content: './edit.html?id=' + id,
+                success: function (layero, index) {
                 },
                 end: function () {
                     renderTable()
@@ -146,17 +142,27 @@
         table.on('tool(dict-table)', function (obj) {
             let data = obj.data;
             switch (obj.event) {
-                case 'delete': deleteDict(data.id); break;
-                case 'update': updateDict(data.id); break;
+                case 'delete':
+                    deleteDict(data.id);
+                    break;
+                case 'update':
+                    updateDict(data.id);
+                    break;
             }
         });
 
         //头部工具栏监听
         table.on('toolbar(dict-table)', function (obj) {
             switch (obj.event) {
-                case 'unfoldAll': unfoldAll(); break;
-                case 'add': addDict(); break;
-                case 'foldAll': foldAll(); break;
+                case 'unfoldAll':
+                    unfoldAll();
+                    break;
+                case 'add':
+                    addDict();
+                    break;
+                case 'foldAll':
+                    foldAll();
+                    break;
             }
         })
     });

+ 2 - 4
src/main/resources/static/page/myBorrow/list.html

@@ -224,16 +224,14 @@
         //打开附件列表
         let opinion = function (data) {
             var index = layer.open({
-                title: '预约借阅',
+                title: '审核结果',
                 type: 2,
                 shade: 0.2,
                 maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './ruditResult.html',
+                content: './ruditResult.html?id=' + data.id,
                 success: function (layero, index) {
-                    var body = layer.getChildFrame('body', index);
-                    body.find("#id").val(data.id);
                 },
                 end: function () {
                     renderTable()

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

@@ -74,21 +74,21 @@
 <script src="../../js/lay-config.js?v=1.0.4" charset="utf-8"></script>
 <script>
 
-    layui.use(['form', 'http', 'laydate'], function () {
+    layui.use(['form', 'http', 'laydate','url'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
         var form = layui.form,
             layer = layui.layer,
             http = layui.http,
             laydate = layui.laydate,
             $ = layui.$;
-        let id = $('#id').val()
+        const urlParam = layui.url()
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
         // 加载数据
         let initData = function () {
             // 加载当前文档信息
             http.get('borrow/archiveBorrow/selectByPrimaryKey', {
-                id: id
+                id: urlParam.id
             }, false, function (res) {
                 if (res.code === 200){
 

+ 18 - 19
src/main/resources/static/page/role/edit.html

@@ -33,7 +33,6 @@
     </div>
 
 
-
     <div class="layui-form-item">
         <div class="layui-input-block">
             <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
@@ -44,37 +43,37 @@
 <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'], function () {
+    layui.use(['form', 'http', 'url'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
         var form = layui.form,
             layer = layui.layer,
             http = layui.http,
             $ = layui.$;
-        let id = $('#id').val()
+        const urlParam = layui.url()
 
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
 
-        //保存方法
+            //保存方法
         let save = function (data) {
-            http.post(id == '' ? 'system/role/insert': 'system/role/update',data,true,function (res) {
-                if (res.code == 200){
-                    let index = layer.alert('保存成功!', {
-                        title: id == '' ? '添加':'修改' + '信息'
-                    }, function () {
-                        // 关闭弹出层
-                        layer.close(index);
-                        let iframeIndex = parent.layer.getFrameIndex(window.name);
-                        parent.layer.close(iframeIndex);
-                    });
-                }
-            })
-        }
+                http.post(urlParam.id == '' ? 'system/role/insert' : 'system/role/update', data, true, function (res) {
+                    if (res.code == 200) {
+                        let index = layer.alert('保存成功!', {
+                            title: urlParam.id == '' ? '添加' : '修改' + '信息'
+                        }, function () {
+                            // 关闭弹出层
+                            layer.close(index);
+                            let iframeIndex = parent.layer.getFrameIndex(window.name);
+                            parent.layer.close(iframeIndex);
+                        });
+                    }
+                })
+            }
 
         // 加载数据
         let initData = function () {
-            if(id != ''){
-                http.get('system/role/selectByPrimaryKey',{id: id},true,function (res) {
+            if (urlParam.id != '') {
+                http.get('system/role/selectByPrimaryKey', {id: urlParam.id}, true, function (res) {
                     form.val("addPaper", res.data);
                     form.render();
                 })

+ 19 - 18
src/main/resources/static/page/role/editRole.html

@@ -73,21 +73,21 @@
 <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', 'tree', 'util'], function () {
+    layui.use(['form', 'http', 'tree', 'util', 'url'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
         var form = layui.form,
             layer = layui.layer,
             http = layui.http,
             tree = layui.tree,
             $ = layui.$;
-        let id = $('#id').val()
+        const urlParam = layui.url()
 
 
         /**方-------------------------------法-------------------------------定-------------------------------义*/
 
         let initTree = function () {
             http.get('system/role/selectRoleList', {
-                roleId: id
+                roleId: urlParam.id
             }, true, function (res) {
                 // 基本演示
                 tree.render({
@@ -117,7 +117,7 @@
         }
 
         let initMj = () => {
-            http.get('system/dict/selectMiJiRole', {roleId: id}, true, function (res) {
+            http.get('system/dict/selectMiJiRole', {roleId: urlParam.id}, true, function (res) {
                 tree.render({
                     elem: '#miji-role'
                     , data: res.data
@@ -141,7 +141,7 @@
 
         }
         let initArchiveTree = () => {
-            http.get('system/archivesTree/selectArchiveRole', {roleId: id}, true, function (res) {
+            http.get('system/archivesTree/selectArchiveRole', {roleId: urlParam.id}, true, function (res) {
                 tree.render({
                     elem: '#archive-tree-role'
                     , data: res.data
@@ -152,15 +152,15 @@
         }
 
         let initArchive = () => {
-            http.get('system/role/selectShowArchive', {roleId: id}, true, res => {
-               if (res.code == 200){
-                   tree.render({
-                       elem: '#archive-role'
-                       , data: res.data
-                       , showCheckbox: true  //是否显示复选框
-                       , id: 'archive-role'
-                   });
-               }
+            http.get('system/role/selectShowArchive', {roleId: urlParam.id}, true, res => {
+                if (res.code == 200) {
+                    tree.render({
+                        elem: '#archive-role'
+                        , data: res.data
+                        , showCheckbox: true  //是否显示复选框
+                        , id: 'archive-role'
+                    });
+                }
             })
 
         }
@@ -170,18 +170,19 @@
         //保存方法
         let save = function () {
             let data = {
-                roleId: id,
+                roleId: urlParam.id,
                 menuIds: getChecked_list(tree.getChecked("menu-role")),
                 mjCodes: getChecked_list(tree.getChecked("miji-role")),
                 archiveTrees: getChecked_list(tree.getChecked("archive-tree-role")),
                 archiveShow: getChecked_list(tree.getChecked("archive-role")),
+                bmqxRole: document.getElementById("bmqx-role").value
                 bmqxRole:bmqxRole
             }
             console.log()
             http.post('system/role/setRole', data, true, function (res) {
                 if (res.code == 200) {
                     let index = layer.alert('保存成功!', {
-                        title: id == '' ? '添加' : '修改' + '信息'
+                        title: urlParam.id == '' ? '添加' : '修改' + '信息'
                     }, function () {
                         // 关闭弹出层
                         layer.close(index);
@@ -190,7 +191,7 @@
                     });
                 }
             })
-    }
+        }
 
         /**事-------------------------------件-------------------------------绑-------------------------------定*/
 
@@ -210,7 +211,7 @@
 
         //监听提交
         form.on('submit(saveBtn)', function (data) {
-             save(data.field)
+            save(data.field)
         });
 
     });

+ 63 - 59
src/main/resources/static/page/role/list.html

@@ -17,14 +17,14 @@
 
 <!--  头部工具栏  -->
 <script type="text/html" id="toolbar">
-<!--        <button class="layui-btn layui-btn-sm" lay-event="addPaper">添加</button>-->
+    <!--        <button class="layui-btn layui-btn-sm" lay-event="addPaper">添加</button>-->
 </script>
 
 <!-- 操作列 -->
 <script type="text/html" id="operating">
-<!--    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="setRole">设置权限</a>-->
-<!--    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>-->
-<!--    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>-->
+    <!--    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="setRole">设置权限</a>-->
+    <!--    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="edit">修改</a>-->
+    <!--    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>-->
 </script>
 
 </body>
@@ -33,7 +33,7 @@
 <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(['table','http'], function () {
+    layui.use(['table', 'http'], function () {
         /**变-------------------------------量-------------------------------定-------------------------------义*/
 
         var table = layui.table,
@@ -45,48 +45,48 @@
         http.getRoleButton(18)
         //数据加载方法
         let renderTable = function () {
-                // 加载表格数据
-                table.render({
-                    elem: '#paper-table',
-                    url: 'system/role/select',
-                    toolbar: '#toolbar', //开启头部工具栏,并为其绑定左侧模板
-                    defaultToolbar: ['filter', 'exports', 'print'],
-                    title: '用户数据表',
-                    page: {
-                        curr: curr
-                    },
-                    limit: 15,
-                    limits: [15, 30, 45, 60],
-                    request: {
-                        pageName: 'pageNum',
-                        limitName: 'pageSize'
-                    },
-                    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) {
-                        // $('th').css({'background-color': '#1aa094', 'color': '#fff','font-weight':'bold'})
-                        curr = curr1
-                    },
-                    cols: [[
-                        // {type: 'checkbox', fixed: 'left'}
-                        {type: 'numbers'},
-                        {field: 'roleName', title: '角色名称'},
-                        {field: 'remark', title: '角色描述'},
-                        {field: 'createTime', title: '创建时间'},
-                        {templet: '#operating', align: 'center', title: '操作'}
-                    ]]
-                });
+            // 加载表格数据
+            table.render({
+                elem: '#paper-table',
+                url: 'system/role/select',
+                toolbar: '#toolbar', //开启头部工具栏,并为其绑定左侧模板
+                defaultToolbar: ['filter', 'exports', 'print'],
+                title: '用户数据表',
+                page: {
+                    curr: curr
+                },
+                limit: 15,
+                limits: [15, 30, 45, 60],
+                request: {
+                    pageName: 'pageNum',
+                    limitName: 'pageSize'
+                },
+                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) {
+                    // $('th').css({'background-color': '#1aa094', 'color': '#fff','font-weight':'bold'})
+                    curr = curr1
+                },
+                cols: [[
+                    // {type: 'checkbox', fixed: 'left'}
+                    {type: 'numbers'},
+                    {field: 'roleName', title: '角色名称'},
+                    {field: 'remark', title: '角色描述'},
+                    {field: 'createTime', title: '创建时间'},
+                    {templet: '#operating', align: 'center', title: '操作'}
+                ]]
+            });
 
-            }
+        }
 
         //添加方法
         let addPaper = function () {
@@ -109,7 +109,7 @@
         //删除方法
         let delPaper = function (id) {
             layer.confirm('真的删除行么', function (index) {
-                http.delete('system/role/delete',{id: id},true,function (res) {
+                http.delete('system/role/delete', {id: id}, true, function (res) {
                     if (res.code == 200) {
                         layer.msg('删除成功', {
                             icon: 1,
@@ -127,7 +127,7 @@
             });
         }
 
-        let updPaper = function(id){
+        let updPaper = function (id) {
             layer.open({
                 title: '修改权限',
                 type: 2,
@@ -135,10 +135,8 @@
                 maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './edit.html',
+                content: './edit.html?id=' + id,
                 success: function (layero, index) {
-                    var body=layer.getChildFrame('body',index);
-                    body.find("#id").val(id);
                 },
                 end: function () {
                     renderTable()
@@ -146,7 +144,7 @@
             });
         }
 
-        let setRole = function(id){
+        let setRole = function (id) {
             layer.open({
                 title: '设置权限',
                 type: 2,
@@ -154,10 +152,8 @@
                 maxmin: true,
                 shadeClose: true,
                 area: ['100%', '100%'],
-                content: './editRole.html',
+                content: './editRole.html?id=' + id,
                 success: function (layero, index) {
-                    var body=layer.getChildFrame('body',index);
-                    body.find("#id").val(id);
                 },
                 end: function () {
                     renderTable()
@@ -171,16 +167,24 @@
         //头工具栏事件
         table.on('toolbar(paper-table)', function (obj) {
             switch (obj.event) {
-                case 'add': addPaper(); break;
+                case 'add':
+                    addPaper();
+                    break;
             }
         })
 
         //监听行工具事件
         table.on('tool(paper-table)', function (obj) {
             switch (obj.event) {
-                case 'delete': delPaper(obj.data.id); break;
-                case 'update': updPaper(obj.data.id); break;
-                case 'setRole': setRole(obj.data.id); break;
+                case 'delete':
+                    delPaper(obj.data.id);
+                    break;
+                case 'update':
+                    updPaper(obj.data.id);
+                    break;
+                case 'setRole':
+                    setRole(obj.data.id);
+                    break;
             }
         })
     });