소스 검색

隐患;危险源;事故

77681 6 시간 전
부모
커밋
ab9b5f33d6
22개의 변경된 파일313개의 추가작업 그리고 216개의 파일을 삭제
  1. 9 0
      gw-slaj/src/main/java/com/goldenwater/slaj/hidd/controller/BisOrgMonRepPeriController.java
  2. 8 0
      gw-slaj/src/main/java/com/goldenwater/slaj/hidd/mapper/BisOrgMonRepPeriMapper.java
  3. 7 1
      gw-slaj/src/main/java/com/goldenwater/slaj/hidd/service/IBisOrgMonRepPeriService.java
  4. 5 1
      gw-slaj/src/main/java/com/goldenwater/slaj/hidd/service/impl/BisOrgMonRepPeriServiceImpl.java
  5. 22 0
      gw-slaj/src/main/resources/mapper/slaj/hidd/BisOrgMonRepPeriMapper.xml
  6. 3 3
      gw-system/src/main/resources/mapper/system/SysConfigMapper.xml
  7. 3 3
      gw-system/src/main/resources/mapper/system/SysDeptMapper.xml
  8. 3 3
      gw-system/src/main/resources/mapper/system/SysDictDataMapper.xml
  9. 3 3
      gw-system/src/main/resources/mapper/system/SysDictTypeMapper.xml
  10. 2 2
      gw-system/src/main/resources/mapper/system/SysLogininforMapper.xml
  11. 6 6
      gw-system/src/main/resources/mapper/system/SysMenuMapper.xml
  12. 3 3
      gw-system/src/main/resources/mapper/system/SysNoticeMapper.xml
  13. 3 3
      gw-system/src/main/resources/mapper/system/SysNoticeReadMapper.xml
  14. 2 2
      gw-system/src/main/resources/mapper/system/SysOperLogMapper.xml
  15. 3 3
      gw-system/src/main/resources/mapper/system/SysPostMapper.xml
  16. 3 3
      gw-system/src/main/resources/mapper/system/SysRoleMapper.xml
  17. 6 6
      gw-system/src/main/resources/mapper/system/SysUserMapper.xml
  18. 7 6
      gw-ui/src/api/slaj/hidd.js
  19. 32 82
      gw-ui/src/layout/components/Sidebar/index.vue
  20. 106 86
      gw-ui/src/layout/index.vue
  21. 3 0
      gw-ui/src/store/modules/permission.js
  22. 74 0
      gw-ui/src/views/slaj/hidd/hiddTotalList.vue

+ 9 - 0
gw-slaj/src/main/java/com/goldenwater/slaj/hidd/controller/BisOrgMonRepPeriController.java

@@ -1,6 +1,7 @@
 package com.goldenwater.slaj.hidd.controller;
 
 import java.util.List;
+import java.util.Map;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import com.goldenwater.common.core.controller.BaseController;
@@ -55,4 +56,12 @@ public class BisOrgMonRepPeriController extends BaseController {
         ExcelUtil<BisOrgMonRepPeri> util = new ExcelUtil<>(BisOrgMonRepPeri.class);
         util.exportExcel(response, list, "月报周期数据");
     }
+
+    @GetMapping("/monthTotalList")
+    public AjaxResult monthTotalList(@RequestParam(required = false) String repTime) {
+        Map<String, Object> params = new java.util.HashMap<>();
+        params.put("repTime", repTime);
+        List<Map<String, Object>> list = bisOrgMonRepPeriService.selectMonthTotalList(params);
+        return AjaxResult.success(list);
+    }
 }

+ 8 - 0
gw-slaj/src/main/java/com/goldenwater/slaj/hidd/mapper/BisOrgMonRepPeriMapper.java

@@ -1,6 +1,7 @@
 package com.goldenwater.slaj.hidd.mapper;
 
 import java.util.List;
+import java.util.Map;
 import org.apache.ibatis.annotations.Mapper;
 import com.goldenwater.slaj.hidd.domain.BisOrgMonRepPeri;
 
@@ -51,4 +52,11 @@ public interface BisOrgMonRepPeriMapper {
      * @return 影响行数
      */
     int deleteBisOrgMonRepPeriByGuids(String[] guids);
+
+    /**
+     * 查询月报汇总
+     * @param params 查询参数
+     * @return 月报汇总列表
+     */
+    List<Map<String, Object>> selectMonthTotalList(Map<String, Object> params);
 }

+ 7 - 1
gw-slaj/src/main/java/com/goldenwater/slaj/hidd/service/IBisOrgMonRepPeriService.java

@@ -3,7 +3,6 @@ package com.goldenwater.slaj.hidd.service;
 import java.util.List;
 import java.util.Map;
 import com.goldenwater.slaj.hidd.domain.BisOrgMonRepPeri;
-
 /**
  * 月报期间 服务层
  */
@@ -57,4 +56,11 @@ public interface IBisOrgMonRepPeriService {
      * @return 树形数据
      */
     List<Map<String, Object>> selectRepTreeData(String parentGuid);
+
+    /**
+     * 查询月报汇总
+     * @param params 查询参数
+     * @return 月报汇总列表
+     */
+    List<Map<String, Object>> selectMonthTotalList(Map<String, Object> params);
 }

+ 5 - 1
gw-slaj/src/main/java/com/goldenwater/slaj/hidd/service/impl/BisOrgMonRepPeriServiceImpl.java

@@ -52,7 +52,6 @@ public class BisOrgMonRepPeriServiceImpl implements IBisOrgMonRepPeriService {
     @Override
     public List<Map<String, Object>> selectRepTreeData(String parentGuid) {
         List<Map<String, Object>> tree = new ArrayList<>();
-        // 构建树形数据
         Map<String, Object> node = new HashMap<>();
         node.put("id", "root");
         node.put("label", "全部");
@@ -60,4 +59,9 @@ public class BisOrgMonRepPeriServiceImpl implements IBisOrgMonRepPeriService {
         tree.add(node);
         return tree;
     }
+
+    @Override
+    public List<Map<String, Object>> selectMonthTotalList(Map<String, Object> params) {
+        return bisOrgMonRepPeriMapper.selectMonthTotalList(params);
+    }
 }

+ 22 - 0
gw-slaj/src/main/resources/mapper/slaj/hidd/BisOrgMonRepPeriMapper.xml

@@ -60,6 +60,28 @@
     <delete id="deleteBisOrgMonRepPeriByGuid" parameterType="String">
         delete from bis_org_mon_rep_peri where guid = #{guid}
     </delete>
+    <select id="selectMonthTotalList" parameterType="java.util.Map" resultType="java.util.Map">
+        select c.hidd_clas as repType,
+               coalesce(sum(case when (d.guid is not null and (d.requ_comp_date is null or (d.requ_comp_date is not null and now() > d.requ_comp_date and e.accep_leg_pers is null))) then 1 else 0 end), 0) as overUnImplRect,
+               coalesce(sum(case when c.hidd_grad = '1' then 1 else 0 end), 0) as impHiddCount,
+               coalesce(sum(case when c.hidd_stat = '1' then 1 else 0 end), 0) as unImplRect,
+               coalesce(sum(case when c.hidd_stat = '2' then 1 else 0 end), 0) as implRect,
+               coalesce(sum(case when c.hidd_stat = '3' then 1 else 0 end), 0) as inRect,
+               coalesce(sum(case when c.hidd_stat = '4' then 1 else 0 end), 0) as compRect
+        from bis_org_mon_rep_peri a
+        left join bis_hidd_rec_rep b on b.rep_guid = a.guid
+        left join obj_hidd c on c.guid = b.hidd_guid
+        left join bis_hidd_rect_impl d on d.hidd_guid = b.hidd_guid
+        left join bis_hidd_rect_acce e on e.hidd_guid = b.hidd_guid
+        <where>
+            and a.rep_type = '0'
+            and a.rep_act = '1'
+            <if test="repTime != null and repTime != ''">and a.rep_time = #{repTime}</if>
+        </where>
+        group by c.hidd_clas
+        order by c.hidd_clas
+    </select>
+
     <delete id="deleteBisOrgMonRepPeriByGuids" parameterType="String">
         delete from bis_org_mon_rep_peri where guid in
         <foreach item="guid" collection="array" open="(" separator="," close=")">

+ 3 - 3
gw-system/src/main/resources/mapper/system/SysConfigMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -85,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="configType != null and configType != ''">#{configType},</if>
 			<if test="createBy != null and createBy != ''">#{createBy},</if>
 			<if test="remark != null and remark != ''">#{remark},</if>
- 			sysdate()
+ 			now()
 		)
     </insert>
 	 
@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="configType != null and configType != ''">config_type = #{configType},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
             <if test="remark != null">remark = #{remark},</if>
- 			update_time = sysdate()
+ 			update_time = now()
         </set>
         where config_id = #{configId}
     </update>

+ 3 - 3
gw-system/src/main/resources/mapper/system/SysDeptMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -111,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="email != null and email != ''">#{email},</if>
  			<if test="status != null">#{status},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			now()
  		)
 	</insert>
 	
@@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="email != null">email = #{email},</if>
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = now()
  		</set>
  		where dept_id = #{deptId}
 	</update>

+ 3 - 3
gw-system/src/main/resources/mapper/system/SysDictDataMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null">status = #{status},</if>
  			<if test="remark != null">remark = #{remark},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = now()
  		</set>
  		where dict_code = #{dictCode}
 	</update>
@@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			now()
  		)
 	</insert>
 	

+ 3 - 3
gw-system/src/main/resources/mapper/system/SysDictTypeMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -79,7 +79,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null">status = #{status},</if>
  			<if test="remark != null">remark = #{remark},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = now()
  		</set>
  		where dict_id = #{dictId}
 	</update>
@@ -98,7 +98,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			now()
  		)
 	</insert>
 	

+ 2 - 2
gw-system/src/main/resources/mapper/system/SysLogininforMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
 	<insert id="insertLogininfor" parameterType="SysLogininfor">
 		insert into sys_logininfor (user_name, status, ipaddr, login_location, browser, os, msg, login_time)
-		values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, sysdate())
+		values (#{userName}, #{status}, #{ipaddr}, #{loginLocation}, #{browser}, #{os}, #{msg}, now())
 	</insert>
 	
 	<select id="selectLogininforList" parameterType="SysLogininfor" resultMap="SysLogininforResult">

+ 6 - 6
gw-system/src/main/resources/mapper/system/SysMenuMapper.xml

@@ -29,7 +29,7 @@
 	</resultMap>
 
 	<sql id="selectMenuVo">
-        select menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache, menu_type, visible, status, ifnull(perms,'') as perms, icon, create_time
+        select menu_id, menu_name, parent_id, order_num, path, component, query, route_name, is_frame, is_cache, menu_type, visible, status, coalesce(perms,'') as perms, icon, create_time
 		from sys_menu
     </sql>
 
@@ -50,13 +50,13 @@
 	</select>
 
 	<select id="selectMenuTreeAll" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, coalesce(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0
 		order by m.parent_id, m.order_num
 	</select>
 
 	<select id="selectMenuListByUserId" parameterType="SysMenu" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, coalesce(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m
 		left join sys_role_menu rm on m.menu_id = rm.menu_id
 		left join sys_user_role ur on rm.role_id = ur.role_id
@@ -75,7 +75,7 @@
 	</select>
 
     <select id="selectMenuTreeByUserId" parameterType="Long" resultMap="SysMenuResult">
-		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
+		select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.query, m.route_name, m.visible, m.status, coalesce(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time
 		from sys_menu m
 			 left join sys_role_menu rm on m.menu_id = rm.menu_id
 			 left join sys_user_role ur on rm.role_id = ur.role_id
@@ -157,7 +157,7 @@
 			<if test="icon !=null and icon != ''">icon = #{icon},</if>
 			<if test="remark != null and remark != ''">remark = #{remark},</if>
 			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
-			update_time = sysdate()
+			update_time = now()
 		</set>
 		where menu_id = #{menuId}
 	</update>
@@ -200,7 +200,7 @@
 		<if test="icon != null and icon != ''">#{icon},</if>
 		<if test="remark != null and remark != ''">#{remark},</if>
 		<if test="createBy != null and createBy != ''">#{createBy},</if>
-		sysdate()
+		now()
 		)
 	</insert>
 

+ 3 - 3
gw-system/src/main/resources/mapper/system/SysNoticeMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -59,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 			<if test="status != null and status != ''">#{status}, </if>
 			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			now()
 		)
     </insert>
 	 
@@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="noticeContent != null">notice_content = #{noticeContent}, </if>
             <if test="status != null and status != ''">status = #{status}, </if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = now()
         </set>
         where notice_id = #{noticeId}
     </update>

+ 3 - 3
gw-system/src/main/resources/mapper/system/SysNoticeReadMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -14,7 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <!-- 新增已读记录 -->
     <insert id="insertNoticeRead" parameterType="SysNoticeRead">
         insert ignore into sys_notice_read (notice_id, user_id, read_time)
-        values (#{noticeId}, #{userId}, sysdate())
+        values (#{noticeId}, #{userId}, now())
     </insert>
 
     <!-- 查询未读数量:正常状态公告 减去 当前用户已读数 -->
@@ -51,7 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         insert ignore into sys_notice_read (notice_id, user_id, read_time)
         values
         <foreach collection="noticeIds" item="noticeId" separator=",">
-            (#{noticeId}, #{userId}, sysdate())
+            (#{noticeId}, #{userId}, now())
         </foreach>
     </insert>
 

+ 2 - 2
gw-system/src/main/resources/mapper/system/SysOperLogMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
 	<insert id="insertOperlog" parameterType="SysOperLog">
 		insert into sys_oper_log(title, business_type, method, request_method, operator_type, oper_name, dept_name, oper_url, oper_ip, oper_location, oper_param, json_result, status, error_msg, cost_time, oper_time)
-        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, sysdate())
+        values (#{title}, #{businessType}, #{method}, #{requestMethod}, #{operatorType}, #{operName}, #{deptName}, #{operUrl}, #{operIp}, #{operLocation}, #{operParam}, #{jsonResult}, #{status}, #{errorMsg}, #{costTime}, now())
 	</insert>
 	
 	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">

+ 3 - 3
gw-system/src/main/resources/mapper/system/SysPostMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="remark != null">remark = #{remark},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = now()
  		</set>
  		where post_id = #{postId}
 	</update>
@@ -104,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			now()
  		)
 	</insert>
 	

+ 3 - 3
gw-system/src/main/resources/mapper/system/SysRoleMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -117,7 +117,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">#{status},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
- 			sysdate()
+ 			now()
  		)
 	</insert>
 	
@@ -133,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="status != null and status != ''">status = #{status},</if>
  			<if test="remark != null">remark = #{remark},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- 			update_time = sysdate()
+ 			update_time = now()
  		</set>
  		where role_id = #{roleId}
 	</update>

+ 6 - 6
gw-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8" ?>
+<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE mapper
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
@@ -173,7 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="pwdUpdateDate != null">#{pwdUpdateDate},</if>
  			<if test="createBy != null and createBy != ''">#{createBy},</if>
  			<if test="remark != null and remark != ''">#{remark},</if>
- 			sysdate()
+ 			now()
  		)
 	</insert>
 	
@@ -192,17 +192,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  			<if test="loginDate != null">login_date = #{loginDate},</if>
  			<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  			<if test="remark != null">remark = #{remark},</if>
- 			update_time = sysdate()
+ 			update_time = now()
  		</set>
  		where user_id = #{userId}
 	</update>
 	
 	<update id="updateUserStatus" parameterType="SysUser">
- 		update sys_user set status = #{status}, update_time = sysdate() where user_id = #{userId}
+ 		update sys_user set status = #{status}, update_time = now() where user_id = #{userId}
 	</update>
 	
 	<update id="updateUserAvatar" parameterType="SysUser">
- 		update sys_user set avatar = #{avatar}, update_time = sysdate() where user_id = #{userId}
+ 		update sys_user set avatar = #{avatar}, update_time = now() where user_id = #{userId}
 	</update>
 	
   	<update id="updateLoginInfo" parameterType="SysUser">
@@ -210,7 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	</update>
 	
 	<update id="resetUserPwd" parameterType="SysUser">
- 		update sys_user set pwd_update_date = sysdate(), password = #{password}, update_time = sysdate() where user_id = #{userId}
+ 		update sys_user set pwd_update_date = now(), password = #{password}, update_time = now() where user_id = #{userId}
 	</update>
 	
 	<delete id="deleteUserById" parameterType="Long">

+ 7 - 6
gw-ui/src/api/slaj/hidd.js

@@ -858,12 +858,13 @@ export function delObjCons(guids) {
   })
 }
 
-// ========== 整改进度删除 ==========
-
-// 删除整改进展
-export function delBisHiddRectProg(guids) {
+// 查询月报汇总
+export function getMonthTotalList(query) {
   return request({
-    url: '/hidd/rectprog/' + guids,
-    method: 'delete'
+    url: '/hidd/monrepperi/monthTotalList',
+    method: 'get',
+    params: query
   })
 }
+
+

+ 32 - 82
gw-ui/src/layout/components/Sidebar/index.vue

@@ -79,20 +79,14 @@
 </template>
 
 <script>
-import { computed } from "vue";
+import { computed, watch } from "vue";
 import { useRoute, useRouter } from "vue-router";
 import useAppStore from "@/store/modules/app";
 import usePermissionStore from "@/store/modules/permission";
 
 export default {
   name: "Sidebar",
-  props: {
-    topMenuKey: {
-      type: String,
-      default: "",
-    },
-  },
-  setup(props) {
+  setup() {
     const route = useRoute();
     const router = useRouter();
     const appStore = useAppStore();
@@ -100,93 +94,49 @@ export default {
 
     const isCollapse = computed(() => appStore.sidebar.isCollapse);
 
-    // 当前激活的菜单
-    const activeMenu = computed(() => {
-      return route.path;
-    });
+    const activeMenu = computed(() => route.path);
 
-    // 获取菜单列表
     const menuList = computed(() => {
       const routes = permissionStore.sidebarRouters || [];
-      console.log("sidebarRouters:", routes);
-      console.log("topMenuKey:", props.topMenuKey);
-
-      if (!routes.length) return [];
-
-      if (props.topMenuKey) {
-        const current = routes.find((item) => item.path === props.topMenuKey);
-        if (current && current.children) {
-          return current.children.filter((child) => !child.hidden);
+      const result = [];
+      for (const item of routes) {
+        if (item.hidden) continue;
+        if (item.meta?.title) {
+          result.push(item);
+        } else if (item.children) {
+          const visible = item.children.filter(c => !c.hidden && c.meta?.title);
+          for (const child of visible) {
+            result.push({
+              ...child,
+              path: child.path.startsWith('/') ? child.path : (item.path + '/' + child.path),
+            });
+          }
         }
       }
-
-      const firstMenu = routes[0];
-      if (firstMenu && firstMenu.children) {
-        return firstMenu.children.filter((child) => !child.hidden);
-      }
-
-      return [];
+      return result;
     });
 
-    // 获取完整路径
-    const getFullPath = (path, parentPath = "", grandParentPath = "") => {
-      if (path.startsWith("/")) {
-        return path;
-      }
-
-      // 三级菜单:topMenuKey + 一级/二级/三级
-      if (grandParentPath && parentPath) {
-        return (
-          props.topMenuKey +
-          "/" +
-          grandParentPath +
-          "/" +
-          parentPath +
-          "/" +
-          path
-        );
-      }
+    const getFullPath = (path, parentPath, grandParentPath) => {
+      if (path.startsWith("/")) return path;
 
-      // 二级菜单:topMenuKey + 一级/二级
-      if (parentPath) {
-        return props.topMenuKey + "/" + parentPath + "/" + path;
-      }
+      let parts = [];
+      if (grandParentPath) parts.push(grandParentPath);
+      if (parentPath) parts.push(parentPath);
+      parts.push(path);
 
-      // 一级菜单:topMenuKey + 一级
-      return props.topMenuKey + "/" + path;
+      const joined = parts.join("/");
+      return joined.startsWith("/") ? joined : "/" + joined;
     };
 
-    // 点击菜单
-    const handleMenuClick = (
-      item,
-      parentItem = null,
-      grandParentItem = null,
-    ) => {
-      let fullPath = "";
-
-      if (grandParentItem && parentItem) {
-        // 三级菜单:topMenuKey/一级/二级/三级
-        fullPath =
-          props.topMenuKey +
-          "/" +
-          grandParentItem.path +
-          "/" +
-          parentItem.path +
-          "/" +
-          item.path;
-      } else if (parentItem) {
-        // 二级菜单:topMenuKey/一级/二级
-        fullPath = props.topMenuKey + "/" + parentItem.path + "/" + item.path;
-      } else {
-        // 一级菜单:topMenuKey/一级
-        fullPath = props.topMenuKey + "/" + item.path;
-      }
-
-      console.log("跳转路径:", fullPath);
-      router.push(fullPath);
+    const handleMenuClick = (item, parentItem, grandParentItem) => {
+      const path = getFullPath(
+        item.path,
+        parentItem?.path,
+        grandParentItem?.path,
+      );
+      router.push(path);
     };
 
-    // 收起/展开
     const toggleCollapse = () => {
       appStore.sidebar.isCollapse = !appStore.sidebar.isCollapse;
     };

+ 106 - 86
gw-ui/src/layout/index.vue

@@ -8,19 +8,35 @@
       '--current-color-dark-bg': theme + '33',
     }"
   >
-    <!-- 顶部一级菜单栏 -->
-    <top-navbar
-      v-if="!sidebar.hide"
-      :active-menu="activeTopMenu"
-      @menu-click="handleTopMenuClick"
-      @setLayout="openSettings"
-    />
+    <!-- 顶部栏(系统名 + 用户信息) -->
+    <div class="top-bar">
+      <div class="logo-area">
+        <span class="logo-text" style="cursor:pointer" @click="router.push('/index')">水利安全生产监管信息系统</span>
+      </div>
+      <div class="top-right-menu">
+        <el-dropdown @command="handleCommand" class="avatar-container" trigger="hover">
+          <div class="avatar-wrapper">
+            <svg-icon icon-class="user" class="user-icon" />
+            <span class="user-nickname">{{ userStore.nickName || userStore.name }}</span>
+            <el-icon class="dropdown-icon"><ArrowDown /></el-icon>
+          </div>
+          <template #dropdown>
+            <el-dropdown-menu>
+              <router-link to="/user/profile">
+                <el-dropdown-item>个人中心</el-dropdown-item>
+              </router-link>
+              <el-dropdown-item divided command="logout">退出登录</el-dropdown-item>
+            </el-dropdown-menu>
+          </template>
+        </el-dropdown>
+      </div>
+    </div>
 
     <!-- 下方区域:左右结构 -->
     <div class="main-layout">
       <!-- 左侧二三级菜单 -->
       <div class="sidebar-wrapper" :class="{ collapsed: isCollapse }">
-        <sidebar v-if="!sidebar.hide" :top-menu-key="activeTopMenu" />
+        <sidebar v-if="!sidebar.hide" />
       </div>
 
       <!-- 右侧内容区域 -->
@@ -33,108 +49,112 @@
 </template>
 
 <script setup>
-import { computed, ref, watch, onMounted } from "vue";
-import { useRoute, useRouter } from "vue-router";
-import TopNavbar from "./components/TopNavbar/index.vue";
+import { computed, ref } from "vue";
+import { useRouter } from "vue-router";
+import { ElMessageBox } from "element-plus";
+import { ArrowDown } from "@element-plus/icons-vue";
 import Sidebar from "./components/Sidebar/index.vue";
 import { AppMain, Settings } from "./components";
 import useAppStore from "@/store/modules/app";
 import useSettingsStore from "@/store/modules/settings";
-import usePermissionStore from "@/store/modules/permission";
+import useUserStore from "@/store/modules/user";
 
 const settingsStore = useSettingsStore();
-const permissionStore = usePermissionStore();
 const appStore = useAppStore();
-const route = useRoute();
+const userStore = useUserStore();
 const router = useRouter();
 
-// 首页路径
-const HOME_PATH = "/index";
-
-// 计算属性
 const theme = computed(() => settingsStore.theme);
 const sidebar = computed(() => appStore.sidebar);
 const isCollapse = computed(() => appStore.sidebar.isCollapse);
 
-// 当前选中的顶级菜单
-const activeTopMenu = ref("");
-
-// 获取当前选中的顶级菜单
-const getCurrentTopMenu = () => {
-  const currentPath = route.path;
+const settingRef = ref(null);
 
-  // 如果是首页,选中首页菜单
-  if (currentPath === HOME_PATH) {
-    return HOME_PATH;
+function handleCommand(command) {
+  switch (command) {
+    case "logout":
+      ElMessageBox.confirm("确定注销并退出系统吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      }).then(() => {
+        userStore.logOut().then(() => {
+          location.href = "/index";
+        });
+      }).catch(() => {});
+      break;
   }
+}
+</script>
 
-  try {
-    const routes = permissionStore.topbarRouters || [];
-    const firstLevel = "/" + currentPath.split("/")[1];
-    const matched = routes.find((r) => r.path === firstLevel);
-    return matched?.path || HOME_PATH;
-  } catch (error) {
-    return HOME_PATH;
-  }
-};
+<style scoped>
+.app-wrapper {
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+}
 
-// 处理顶级菜单点击
-function handleTopMenuClick(menuPath) {
-  activeTopMenu.value = menuPath;
+.top-bar {
+  height: 60px;
+  background: #217ff4;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 30px;
+  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
+  flex-shrink: 0;
+}
 
-  // 如果点击的是首页,直接跳转
-  if (menuPath === HOME_PATH) {
-    router.push(HOME_PATH);
-    return;
-  }
+.logo-text {
+  color: #fff;
+  font-size: 20px;
+  font-weight: bold;
+}
 
-  // 其他菜单:跳转到第一个子路由
-  const routes = permissionStore.topbarRouters || [];
-  const targetRoute = routes.find((r) => r.path === menuPath);
-
-  if (targetRoute && targetRoute.children && targetRoute.children.length > 0) {
-    const firstChild = targetRoute.children.find((child) => !child.hidden);
-    if (firstChild) {
-      let fullPath = firstChild.path;
-      if (!fullPath.startsWith("/")) {
-        fullPath = menuPath + "/" + fullPath;
-      }
-      router.push(fullPath);
-    }
-  }
+.top-right-menu {
+  display: flex;
+  align-items: center;
 }
 
-// 打开设置面板
-const settingRef = ref(null);
-function openSettings() {
-  if (settingRef.value) {
-    settingRef.value.openSetting();
-  }
+.avatar-wrapper {
+  display: flex;
+  align-items: center;
+  gap: 8px;
+  cursor: pointer;
+  padding: 0 12px;
+  height: 60px;
+  max-width: 200px;
 }
 
-// 监听路由变化,更新选中的顶级菜单
-watch(
-  () => route.path,
-  () => {
-    activeTopMenu.value = getCurrentTopMenu();
-  },
-  { immediate: true },
-);
-
-onMounted(() => {
-  // 如果当前是根路径,跳转到首页
-  if (route.path === "/") {
-    router.push(HOME_PATH);
-  }
-  activeTopMenu.value = getCurrentTopMenu();
-});
-</script>
+.avatar-wrapper:hover {
+  background: rgba(255, 255, 255, 0.15);
+}
 
-<style scoped>
-.app-wrapper {
-  height: 100%;
-  display: flex;
-  flex-direction: column;
+.user-icon {
+  width: 18px;
+  height: 18px;
+  color: #fff;
+  flex-shrink: 0;
+}
+
+.user-nickname {
+  font-size: 14px;
+  color: #fff;
+  max-width: 120px;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  flex-shrink: 1;
+}
+
+.dropdown-icon {
+  font-size: 14px;
+  color: #fff;
+  transition: transform 0.3s;
+}
+
+.avatar-wrapper:hover .dropdown-icon {
+  transform: rotate(180deg);
 }
 
 .main-layout {

+ 3 - 0
gw-ui/src/store/modules/permission.js

@@ -79,6 +79,9 @@ function filterAsyncRouter(asyncRouterMap, lastRouter = false, type = false) {
       delete route['children']
       delete route['redirect']
     }
+    if (lastRouter && route.name) {
+      route.name = lastRouter.name + '/' + route.name
+    }
     return true
   })
 }

+ 74 - 0
gw-ui/src/views/slaj/hidd/hiddTotalList.vue

@@ -0,0 +1,74 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="上报期间" prop="repTime">
+        <el-date-picker v-model="queryParams.repTime" type="month" placeholder="选择月份" value-format="YYYY年MM月" format="YYYY年MM月" />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
+        <el-button icon="Refresh" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="totalList" border style="width: 100%; text-align: center;">
+      <el-table-column label="单位类型" align="center" prop="repType" width="160" />
+      <el-table-column label="重大隐患" align="center" prop="impHiddCount" />
+      <el-table-column label="逾期未整改" align="center" prop="overUnImplRect" />
+      <el-table-column label="未落实整改" align="center" prop="unImplRect" />
+      <el-table-column label="落实整改" align="center" prop="implRect" />
+      <el-table-column label="正在整改" align="center" prop="inRect" />
+      <el-table-column label="已完成整改" align="center" prop="compRect" />
+      <el-table-column label="整改率" align="center">
+        <template #default="scope">
+          <span v-if="scope.row.implRect + scope.row.inRect + scope.row.compRect > 0">
+            {{ ((scope.row.compRect / (scope.row.implRect + scope.row.inRect + scope.row.compRect)) * 100).toFixed(1) }}%
+          </span>
+          <span v-else>--</span>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script setup name="HiddTotalList">
+import { getMonthTotalList } from "@/api/slaj/hidd"
+
+const { proxy } = getCurrentInstance()
+
+const totalList = ref([])
+const loading = ref(false)
+const showSearch = ref(true)
+
+const data = reactive({
+  queryParams: {
+    repTime: undefined
+  }
+})
+
+const { queryParams } = toRefs(data)
+
+function getList() {
+  loading.value = true
+  getMonthTotalList(queryParams.value).then(res => {
+    loading.value = false
+    totalList.value = res.data || []
+  })
+}
+
+function handleQuery() {
+  getList()
+}
+
+function resetQuery() {
+  proxy.resetForm("queryRef")
+  handleQuery()
+}
+
+onMounted(() => {
+  getList()
+})
+</script>