Browse Source

ly eoeg首页

ly 2 months ago
parent
commit
813424401d

+ 8 - 0
master/src/main/java/com/ruoyi/project/document/mapper/TPlantproglistMapper.java

@@ -79,4 +79,12 @@ public interface TPlantproglistMapper
     List<DataEntity> selectRcData(Map param);
 
     List<DataEntity> selectclassifyData(Map param);
+
+    /**
+     * 查询即将到期或已过期的装置程序清单数量
+     * (下次修订日期或下次回顾日期在1个月内或已过期)
+     *
+     * @return 数量
+     */
+    public int selectExpiringSoonCount();
 }

+ 106 - 0
master/src/main/java/com/ruoyi/project/eoeg/controller/EoegHomeController.java

@@ -0,0 +1,106 @@
+package com.ruoyi.project.eoeg.controller;
+
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.document.mapper.TPlantproglistMapper;
+import com.ruoyi.project.eoeg.mapper.TEoegLockChangeMapper;
+import com.ruoyi.project.plant.domain.TEoegDailyManagement;
+import com.ruoyi.project.plant.mapper.TEoegDailyManagementMapper;
+import com.ruoyi.project.production.domain.TEoegSaiApply;
+import com.ruoyi.project.production.mapper.TEoegSaiApplyMapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * EOEG首页数据Controller
+ * 
+ * @author ssy
+ * @date 2025-10-14
+ */
+@RestController
+@RequestMapping("/eoeg/home")
+public class EoegHomeController extends BaseController
+{
+    @Autowired
+    private TEoegSaiApplyMapper tEoegSaiApplyMapper;
+
+    @Autowired
+    private TEoegLockChangeMapper tEoegLockChangeMapper;
+
+    @Autowired
+    private TPlantproglistMapper tPlantproglistMapper;
+
+    @Autowired
+    private TEoegDailyManagementMapper tEoegDailyManagementMapper;
+
+    /**
+     * 获取本月已完成的SAI数量
+     */
+    @GetMapping("/currentMonthFinishedSaiCount")
+    public AjaxResult getCurrentMonthFinishedSaiCount()
+    {
+        int count = tEoegSaiApplyMapper.selectCurrentMonthFinishedSaiCount();
+        return AjaxResult.success(count);
+    }
+
+    /**
+     * 获取本月已完成的TPM数量
+     */
+    @GetMapping("/currentMonthFinishedTpmCount")
+    public AjaxResult getCurrentMonthFinishedTpmCount()
+    {
+        int count = tEoegSaiApplyMapper.selectCurrentMonthFinishedTpmCount();
+        return AjaxResult.success(count);
+    }
+
+    /**
+     * 获取进行中的锁开锁关数量
+     */
+    @GetMapping("/inProgressLockChangeCount")
+    public AjaxResult getInProgressLockChangeCount()
+    {
+        int count = tEoegLockChangeMapper.selectInProgressLockChangeCount();
+        return AjaxResult.success(count);
+    }
+
+    /**
+     * 获取即将到期或已过期的装置程序清单数量
+     */
+    @GetMapping("/expiringSoonPlantproglistCount")
+    public AjaxResult getExpiringSoonPlantproglistCount()
+    {
+        int count = tPlantproglistMapper.selectExpiringSoonCount();
+        return AjaxResult.success(count);
+    }
+
+    /**
+     * 获取5个班组当年的SAI数量统计
+     */
+    @GetMapping("/teamAnalysis")
+    public AjaxResult getTeamAnalysis()
+    {
+        List<TEoegSaiApply> list = tEoegSaiApplyMapper.selectTeamAnalysis();
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 获取EOEG日常管理首页统计数据
+     */
+    @GetMapping("/eoegDailyManagementDashboard")
+    public TableDataInfo getEoegDailyManagementDashboard(TEoegDailyManagement tEoegDailyManagement)
+    {
+        // 获取当前用户的staffId用于"与我相关"的筛选和排序
+        String staffId = getBaseStaffId();
+        tEoegDailyManagement.setCurrentUserStaffId(staffId);
+        
+        startPage();
+        List<TEoegDailyManagement> list = tEoegDailyManagementMapper.selectTEoegDailyManagementDashboardList(tEoegDailyManagement);
+        return getDataTable(list);
+    }
+}
+

+ 7 - 0
master/src/main/java/com/ruoyi/project/eoeg/mapper/TEoegLockChangeMapper.java

@@ -60,4 +60,11 @@ public interface TEoegLockChangeMapper
      * @return 结果
      */
     public int deleteTEoegLockChangeByIds(Long[] ids);
+
+    /**
+     * 查询进行中的锁开锁关数量
+     * 
+     * @return 数量
+     */
+    public int selectInProgressLockChangeCount();
 }

+ 0 - 11
master/src/main/java/com/ruoyi/project/plant/controller/TEoegDailyManagementController.java

@@ -100,15 +100,4 @@ public class TEoegDailyManagementController extends BaseController
     {
         return toAjax(tEoegDailyManagementService.deleteTEoegDailyManagementByIds(ids));
     }
-
-    /**
-     * 获取EOEG日常管理首页统计数据
-     */
-    @GetMapping("/dashboard")
-    public TableDataInfo getDashboardData(TEoegDailyManagement tEoegDailyManagement)
-    {
-        startPage();
-        List<TEoegDailyManagement> list = tEoegDailyManagementService.selectTEoegDailyManagementList(tEoegDailyManagement);
-        return getDataTable(list);
-    }
 }

+ 22 - 0
master/src/main/java/com/ruoyi/project/plant/domain/TEoegDailyManagement.java

@@ -137,6 +137,28 @@ public class TEoegDailyManagement extends BaseEntity
     @Excel(name = "备注")
     private String remarks;
 
+    /** 当前用户StaffId(用于查询与我相关) */
+    private String currentUserStaffId;
+
+    /** 是否与我相关 */
+    private String isRelatedToMe;
+
+    public String getCurrentUserStaffId() {
+        return currentUserStaffId;
+    }
+
+    public void setCurrentUserStaffId(String currentUserStaffId) {
+        this.currentUserStaffId = currentUserStaffId;
+    }
+
+    public String getIsRelatedToMe() {
+        return isRelatedToMe;
+    }
+
+    public void setIsRelatedToMe(String isRelatedToMe) {
+        this.isRelatedToMe = isRelatedToMe;
+    }
+
     public void setId(Long id)
     {
         this.id = id;

+ 8 - 0
master/src/main/java/com/ruoyi/project/plant/mapper/TEoegDailyManagementMapper.java

@@ -59,4 +59,12 @@ public interface TEoegDailyManagementMapper
      * @return 结果
      */
     public int deleteTEoegDailyManagementByIds(Long[] ids);
+
+    /**
+     * 查询EOEG日常管理首页列表(带"与我相关"标识和特定排序)
+     *
+     * @param tEoegDailyManagement 日常管理EOEG
+     * @return 日常管理EOEG集合
+     */
+    public List<TEoegDailyManagement> selectTEoegDailyManagementDashboardList(TEoegDailyManagement tEoegDailyManagement);
 }

+ 14 - 0
master/src/main/java/com/ruoyi/project/production/mapper/TEoegSaiApplyMapper.java

@@ -66,4 +66,18 @@ public interface TEoegSaiApplyMapper
      * @return 结果
      */
     public int deleteTSaiApplyByIds(Long[] saiApplyIds);
+
+    /**
+     * 查询本月已完成的SAI数量
+     * 
+     * @return 数量
+     */
+    public int selectCurrentMonthFinishedSaiCount();
+
+    /**
+     * 查询本月已完成的TPM数量
+     * 
+     * @return 数量
+     */
+    public int selectCurrentMonthFinishedTpmCount();
 }

+ 12 - 0
master/src/main/resources/mybatis/document/TPlantproglistMapper.xml

@@ -262,4 +262,16 @@
         order by dataName
     </select>
 
+    <select id="selectExpiringSoonCount" resultType="int">
+        select count(1)
+        from t_plantproglist
+        where del_flag = 0
+        and dept_id = 10023
+        and (
+            (nexteditdate is not null and nexteditdate <![CDATA[<=]]> sysdate + 30)
+            or
+            (nextreviewdate is not null and nextreviewdate <![CDATA[<=]]> sysdate + 30)
+        )
+    </select>
+
 </mapper>

+ 7 - 0
master/src/main/resources/mybatis/eoeg/TEoegLockChangeMapper.xml

@@ -297,5 +297,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{id}
         </foreach>
     </update>
+
+    <select id="selectInProgressLockChangeCount" resultType="int">
+        select count(1)
+        from t_eoeg_lock_change
+        where del_flag = 0
+        and (status = 0 or status = 1)
+    </select>
     
 </mapper>

+ 47 - 10
master/src/main/resources/mybatis/plant/TEoegDailyManagementMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.plant.mapper.TEoegDailyManagementMapper">
-
+    
     <resultMap type="TEoegDailyManagement" id="TEoegDailyManagementResult">
         <result property="id"    column="id"    />
         <result property="year"    column="year"    />
@@ -36,22 +36,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptId"    column="dept_id"    />
         <result property="remarks"    column="remarks"    />
         <result property="deptName" column="dept_name" />
+        <result property="isRelatedToMe" column="is_related_to_me" />
     </resultMap>
 
     <sql id="selectTEoegDailyManagementVo">
-        select d.id, d.year, d.start_month, d.end_month, d.rc_code, d.subject, d.work_content, d.responsible_person, d.frequency, d.standard, d.finish_status, d.q1_jan, d.q1_feb, d.q1_mar, d.q2_apr, d.q2_may, d.q2_jun, d.q3_jul, d.q3_aug, d.q3_sep, d.q4_oct, d.q4_nov, d.q4_dec, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks ,s.dept_name from t_eoeg_daily_management d
-      left join sys_dept s on s.dept_id = d.dept_id
+        select d.id, d.year, d.start_month, d.end_month, d.rc_code, d.subject, d.work_content, d.responsible_person, d.frequency, d.standard, d.finish_status, d.q1_jan, d.q1_feb, d.q1_mar, d.q2_apr, d.q2_may, d.q2_jun, d.q3_jul, d.q3_aug, d.q3_sep, d.q4_oct, d.q4_nov, d.q4_dec, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, s.dept_name
+        <if test="currentUserStaffId != null and currentUserStaffId != ''">
+        , case when d.responsible_person like '%' || #{currentUserStaffId} || '%' then '1' else '0' end as is_related_to_me
+        </if>
+        <if test="currentUserStaffId == null or currentUserStaffId == ''">
+        , '0' as is_related_to_me
+        </if>
+        from t_eoeg_daily_management d
+        left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
     <select id="selectTEoegDailyManagementList" parameterType="TEoegDailyManagement" resultMap="TEoegDailyManagementResult">
         <include refid="selectTEoegDailyManagementVo"/>
-        <where>
+        <where>  
             <if test="year != null  and year != ''"> and year = #{year}</if>
             <if test="startMonth != null  and startMonth != ''"> and start_month = #{startMonth}</if>
             <if test="endMonth != null  and endMonth != ''"> and end_month = #{endMonth}</if>
-            <if test="rcCode != null  and rcCode != ''"> and rc_code = #{rcCode}</if>
-            <if test="subject != null  and subject != ''"> and subject = #{subject}</if>
-            <if test="workContent != null  and workContent != ''"> and work_content = #{workContent}</if>
+            <if test="rcCode != null  and rcCode != ''"> and rc_code like '%' || #{rcCode} || '%'</if>
+            <if test="subject != null  and subject != ''"> and subject like '%' || #{subject} || '%'</if>
+            <if test="workContent != null  and workContent != ''"> and work_content like '%' || #{workContent} || '%'</if>
             <if test="responsiblePerson != null  and responsiblePerson != ''"> and responsible_person = #{responsiblePerson}</if>
             <if test="frequency != null  and frequency != ''"> and frequency = #{frequency}</if>
             <if test="standard != null  and standard != ''"> and standard = #{standard}</if>
@@ -79,12 +87,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 数据范围过滤 -->
         ${params.dataScope}
     </select>
-
+    
     <select id="selectTEoegDailyManagementById" parameterType="Long" resultMap="TEoegDailyManagementResult">
         <include refid="selectTEoegDailyManagementVo"/>
         where id = #{id}
     </select>
-
+        
     <insert id="insertTEoegDailyManagement" parameterType="TEoegDailyManagement">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_eoeg_daily_management.NEXTVAL as id FROM DUAL
@@ -203,4 +211,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </foreach>
     </update>
 
-</mapper>
+    <select id="selectTEoegDailyManagementDashboardList" parameterType="TEoegDailyManagement" resultMap="TEoegDailyManagementResult">
+        select d.id, d.year, d.start_month, d.end_month, d.rc_code, d.subject, d.work_content, d.responsible_person, 
+        d.frequency, d.standard, d.finish_status, d.q1_jan, d.q1_feb, d.q1_mar, d.q2_apr, d.q2_may, d.q2_jun, 
+        d.q3_jul, d.q3_aug, d.q3_sep, d.q4_oct, d.q4_nov, d.q4_dec, d.del_flag, d.creater_code, d.createdate, 
+        d.updater_code, d.updatedate, d.dept_id, d.remarks, s.dept_name
+        <if test="currentUserStaffId != null and currentUserStaffId != ''">
+        , case when d.responsible_person like '%' || #{currentUserStaffId} || '%' then '1' else '0' end as is_related_to_me
+        </if>
+        <if test="currentUserStaffId == null or currentUserStaffId == ''">
+        , '0' as is_related_to_me
+        </if>
+        from t_eoeg_daily_management d
+        left join sys_dept s on s.dept_id = d.dept_id
+        <where>
+            <if test="year != null  and year != ''"> and d.year = #{year}</if>
+            <if test="rcCode != null  and rcCode != ''"> and d.rc_code like '%' || #{rcCode} || '%'</if>
+            <if test="subject != null  and subject != ''"> and d.subject like '%' || #{subject} || '%'</if>
+            <if test="workContent != null  and workContent != ''"> and d.work_content like '%' || #{workContent} || '%'</if>
+            <if test="finishStatus != null  and finishStatus != ''"> and d.finish_status = #{finishStatus}</if>
+            and d.del_flag = 0
+        </where>
+        order by 
+        <if test="currentUserStaffId != null and currentUserStaffId != ''">
+        case when d.responsible_person like '%' || #{currentUserStaffId} || '%' then 0 else 1 end,
+        </if>
+        case when d.finish_status = '0' then 0 else 1 end,
+        d.id desc
+    </select>
+    
+</mapper>

+ 24 - 6
master/src/main/resources/mybatis/production/TEoegSaiApplyMapper.xml

@@ -3,7 +3,7 @@
 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.project.production.mapper.TEoegSaiApplyMapper">
-    
+
     <resultMap type="TEoegSaiApply" id="TEoegSaiApplyResult">
         <result property="saiApplyId"    column="sai_apply_id"    />
         <result property="saiType"    column="sai_type"    />
@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         from (select a.APPLICANT_TEAM at, count(a.APPLICANT_TEAM) act, del_flag from t_eoeg_sai_apply a
         where extract(year from a.apply_date) = extract(year from sysdate)
         group by a.APPLICANT_TEAM, a.del_flag order by a.APPLICANT_TEAM) b
-        left join SYS_DICT_DATA d on d.DICT_VALUE=b.at where d.DICT_TYPE='TEAM_DIVIDE' and d.DICT_LABEL &lt;&gt; 'W' and b.del_flag=0
+        left join SYS_DICT_DATA d on d.DICT_VALUE=b.at where d.DICT_TYPE='TEAM_DIVIDE' and b.del_flag=0
     </select>
 
     <select id="selectPersonalAnalysis" resultMap="TEoegSaiApplyResult">
@@ -137,12 +137,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
         order by APPLY_DATE asc
     </select>
-    
+
     <select id="selectTSaiApplyById" parameterType="Long" resultMap="TEoegSaiApplyResult">
         <include refid="selectTEoegSaiApplyVo"/>
         where sai_apply_id = #{saiApplyId}
     </select>
-        
+
     <insert id="insertTSaiApply" parameterType="TEoegSaiApply">
         <selectKey keyProperty="saiApplyId" resultType="long" order="BEFORE">
             SELECT seq_t_sai_apply.NEXTVAL as saiApplyId FROM DUAL
@@ -283,5 +283,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{saiApplyId}
         </foreach>
     </update>
-    
-</mapper>
+
+    <select id="selectCurrentMonthFinishedSaiCount" resultType="int">
+        select count(1)
+        from t_eoeg_sai_apply
+        where del_flag = 0
+        and sai_type = 'SAI'
+        and extract(year from actual_finish_date) = extract(year from sysdate)
+        and extract(month from actual_finish_date) = extract(month from sysdate)
+    </select>
+
+    <select id="selectCurrentMonthFinishedTpmCount" resultType="int">
+        select count(1)
+        from t_eoeg_sai_apply
+        where del_flag = 0
+        and sai_type = 'TPM'
+        and extract(year from actual_finish_date) = extract(year from sysdate)
+        and extract(month from actual_finish_date) = extract(month from sysdate)
+    </select>
+
+</mapper>

+ 51 - 0
ui/src/api/eoeg/home.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+
+// 获取本月已完成的SAI数量
+export function getCurrentMonthFinishedSaiCount() {
+  return request({
+    url: '/eoeg/home/currentMonthFinishedSaiCount',
+    method: 'get'
+  })
+}
+
+// 获取本月已完成的TPM数量
+export function getCurrentMonthFinishedTpmCount() {
+  return request({
+    url: '/eoeg/home/currentMonthFinishedTpmCount',
+    method: 'get'
+  })
+}
+
+// 获取进行中的锁开锁关数量
+export function getInProgressLockChangeCount() {
+  return request({
+    url: '/eoeg/home/inProgressLockChangeCount',
+    method: 'get'
+  })
+}
+
+// 获取即将到期或已过期的装置程序清单数量
+export function getExpiringSoonPlantproglistCount() {
+  return request({
+    url: '/eoeg/home/expiringSoonPlantproglistCount',
+    method: 'get'
+  })
+}
+
+// 获取5个班组当年的SAI数量统计
+export function getTeamAnalysis() {
+  return request({
+    url: '/eoeg/home/teamAnalysis',
+    method: 'get'
+  })
+}
+
+// 获取EOEG日常管理首页统计数据
+export function getDashboardData(query) {
+  return request({
+    url: '/eoeg/home/eoegDailyManagementDashboard',
+    method: 'get',
+    params: query
+  })
+}
+

+ 0 - 9
ui/src/api/plant/eoeg-daily-management.js

@@ -59,12 +59,3 @@ export function importTemplate() {
     method: 'get'
   })
 }
-
-// 获取EOEG日常管理首页统计数据
-export function getDashboardData(query) {
-  return request({
-    url: '/plant/eoeg-daily-management/dashboard',
-    method: 'get',
-    params: query
-  })
-}

+ 73 - 26
ui/src/views/eoeg/home/dashboard/PanelGroup.vue

@@ -1,54 +1,54 @@
 <template>
-  <el-row :gutter="40" class="panel-group">
+  <el-row :gutter="16" class="panel-group">
     <el-col :lg="6" :sm="12" :xs="12" class="card-panel-col">
-      <div class="card-panel">
+      <div class="card-panel" @click="handleCardClick('sai')">
         <div class="card-panel-icon-wrapper icon-people">
           <svg-icon class-name="card-panel-icon" icon-class="dev"/>
         </div>
         <div class="card-panel-description">
           <div class="card-panel-text">
-            总设备
+            本月SAI
           </div>
-          <count-to :duration="3000" :end-val="devNum" :start-val="0" class="card-panel-num"/>
+          <count-to :duration="3000" :end-val="saiFinishedNum" :start-val="0" class="card-panel-num"/>
         </div>
       </div>
     </el-col>
     <el-col :lg="6" :sm="12" :xs="12" class="card-panel-col">
-      <div class="card-panel">
+      <div class="card-panel" @click="handleCardClick('tpm')">
         <div class="card-panel-icon-wrapper icon-message">
-          <svg-icon class-name="card-panel-icon" icon-class="uncheck"/>
+          <svg-icon class-name="card-panel-icon" icon-class="checked"/>
         </div>
         <div class="card-panel-description">
           <div class="card-panel-text">
-            本月未完成计划
+            本月TPM数
           </div>
-          <count-to :duration="3000" :end-val="uncheckPlanNum" :start-val="0" class="card-panel-num"/>
+          <count-to :duration="3000" :end-val="tpmFinishedNum" :start-val="0" class="card-panel-num"/>
         </div>
       </div>
     </el-col>
     <el-col :lg="6" :sm="12" :xs="12" class="card-panel-col">
-      <div class="card-panel">
+      <div class="card-panel" @click="handleCardClick('lock')">
         <div class="card-panel-icon-wrapper icon-money">
-          <svg-icon class-name="card-panel-icon" icon-class="checked"/>
+          <svg-icon class-name="card-panel-icon" icon-class="uncheck"/>
         </div>
         <div class="card-panel-description">
           <div class="card-panel-text">
-            本月已完成计划
+            进行中的锁开锁关
           </div>
-          <count-to :duration="3000" :end-val="checkedPlanNum" :start-val="0" class="card-panel-num"/>
+          <count-to :duration="3000" :end-val="lockChangeNum" :start-val="0" class="card-panel-num"/>
         </div>
       </div>
     </el-col>
     <el-col :lg="6" :sm="12" :xs="12" class="card-panel-col">
-      <div class="card-panel">
+      <div class="card-panel" @click="handleCardClick('plantproglist')">
         <div class="card-panel-icon-wrapper icon-shopping">
           <svg-icon class-name="card-panel-icon" icon-class="issue"/>
         </div>
         <div class="card-panel-description">
           <div class="card-panel-text">
-            未处理问题数量
+            装置程序清单(即将到期)
           </div>
-          <count-to :duration="3000" :end-val="issueNum" :start-val="0" class="card-panel-num"/>
+          <count-to :duration="3000" :end-val="plantproglistNum" :start-val="0" class="card-panel-num"/>
         </div>
       </div>
     </el-col>
@@ -57,7 +57,7 @@
 
 <script>
 import CountTo from 'vue-count-to'
-import {getCountNums} from "@/api/patrol";
+import {getCurrentMonthFinishedSaiCount, getCurrentMonthFinishedTpmCount, getInProgressLockChangeCount, getExpiringSoonPlantproglistCount} from "@/api/eoeg/home";
 
 export default {
   components: {
@@ -65,27 +65,74 @@ export default {
   },
   data() {
     return {
-      devNum: 0,
-      uncheckPlanNum: 0,
-      checkedPlanNum: 0,
-      issueNum: 0,
+      saiFinishedNum: 0,
+      tpmFinishedNum: 0,
+      lockChangeNum: 0,
+      plantproglistNum: 0,
     }
   },
   created() {
-      this.devNum = 1000;
-      this.uncheckPlanNum = 1000;
-      this.checkedPlanNum = 1000;
-      this.issueNum = 1000;
+      this.getSaiFinishedCount();
+      this.getTpmFinishedCount();
+      this.getLockChangeCount();
+      this.getPlantproglistCount();
   },
+  methods: {
+    /** 获取本月已完成的SAI数量 */
+    getSaiFinishedCount() {
+      getCurrentMonthFinishedSaiCount().then(response => {
+        this.saiFinishedNum = response.data;
+      });
+    },
+    /** 获取本月已完成的TPM数量 */
+    getTpmFinishedCount() {
+      getCurrentMonthFinishedTpmCount().then(response => {
+        this.tpmFinishedNum = response.data;
+      });
+    },
+    /** 获取进行中的锁开锁关数量 */
+    getLockChangeCount() {
+      getInProgressLockChangeCount().then(response => {
+        this.lockChangeNum = response.data;
+      });
+    },
+    /** 获取即将到期的装置程序清单数量 */
+    getPlantproglistCount() {
+      getExpiringSoonPlantproglistCount().then(response => {
+        this.plantproglistNum = response.data;
+      });
+    },
+    /** 处理卡片点击事件 */
+    handleCardClick(type) {
+      switch(type) {
+        case 'sai':
+          // 跳转到EOEG SAI申请页面
+          this.$router.push('/production/eoegsai/eoegapply');
+          break;
+        case 'tpm':
+          // 跳转到EOEG SAI申请页面(TPM类型)
+          this.$router.push('/production/eoegsai/eoegapply');
+          break;
+        case 'lock':
+          // 跳转到锁开锁关申请页面
+          this.$router.push('/process/eoegChange');
+          break;
+        case 'plantproglist':
+          // 跳转到装置程序清单页面
+          this.$router.push('/document/plantproglist');
+          break;
+      }
+    }
+  }
 }
 </script>
 
 <style lang="scss" scoped>
 .panel-group {
-  margin-top: 18px;
+  margin-top: 0;
 
   .card-panel-col {
-    margin-bottom: 32px;
+    margin-bottom: 16px;
   }
 
   .card-panel {

+ 35 - 18
ui/src/views/eoeg/home/dashboard/PieChart.vue

@@ -5,6 +5,7 @@
 <script>
 import * as echarts from 'echarts';
 import resize from "@/views/patrol/home/dashboard/mixins/resize";
+import {getTeamAnalysis} from "@/api/eoeg/home";
 
 require('echarts/theme/macarons') // echarts theme
 
@@ -31,7 +32,7 @@ export default {
     }
   },
   mounted() {
-    this.initChart();
+    this.getTeamData();
   },
   beforeDestroy() {
     if (!this.chart) {
@@ -41,21 +42,44 @@ export default {
     this.chart = null
   },
   methods: {
-    initChart() {// 在项目中运行以下代码,查看控制台输出
-      console.log('ECharts version:', echarts.version);
+    /** 获取班组统计数据 */
+    getTeamData() {
+      getTeamAnalysis().then(response => {
+        const chartData = response.data.map(item => ({
+          value: parseInt(item.teamCount || 0),
+          name: item.applicantTeam || '未知班组'
+        }));
+        this.initChart(chartData);
+      }).catch(() => {
+        // 如果请求失败,使用空数据初始化图表
+        this.initChart([]);
+      });
+    },
+    /** 初始化图表 */
+    initChart(data) {
       this.chart = echarts.init(this.$el, 'macarons')
 
       this.chart.setOption({
+        title: {
+          text: '班组SAI数量统计',
+          left: 'center',
+          top: 10,
+          textStyle: {
+            fontSize: 16,
+            fontWeight: 'bold'
+          }
+        },
         tooltip: {
-          trigger: 'item'
+          trigger: 'item',
+          formatter: '{b}: {c} ({d}%)'
         },
         legend: {
-          top: '5%',
+          top: '10%',
           left: 'center'
         },
         series: [
           {
-            name: 'Access From',
+            name: 'SAI数量',
             type: 'pie',
             radius: ['40%', '70%'],
             avoidLabelOverlap: false,
@@ -64,31 +88,24 @@ export default {
               borderRadius: 10
             },
             label: {
-              show: false,
-              position: 'center'
+              show: true,
+              formatter: '{b}: {c}'
             },
             emphasis: {
               label: {
                 show: true,
-                fontSize: 40,
+                fontSize: 18,
                 fontWeight: 'bold'
               }
             },
             labelLine: {
-              show: false
+              show: true
             },
-            data: [
-              { value: 1048, name: 'Search Engine' },
-              { value: 735, name: 'Direct' },
-              { value: 580, name: 'Email' },
-              { value: 484, name: 'Union Ads' },
-              { value: 300, name: 'Video Ads' }
-            ]
+            data: data
           }
         ]
       })
     }
-
   }
 };
 </script>

+ 14 - 4
ui/src/views/eoeg/home/dashboard/TableChart.vue

@@ -30,10 +30,21 @@
         align="center"
         :show-overflow-tooltip="true">
       </el-table-column>
+      <el-table-column
+        prop="isRelatedToMe"
+        label="与我相关"
+        align="center"
+        width="90">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.isRelatedToMe == '1'" type="warning" size="small">是</el-tag>
+          <el-tag v-else type="info" size="small">否</el-tag>
+        </template>
+      </el-table-column>
       <el-table-column
         prop="finishStatus"
         label="完成情况"
-        align="center">
+        align="center"
+        width="90">
         <template slot-scope="scope">
           <el-tag v-if="scope.row.finishStatus == '1'" type="success" size="small">已完成</el-tag>
           <el-tag v-else-if="scope.row.finishStatus == '0'" type="danger" size="small">未完成</el-tag>
@@ -44,7 +55,7 @@
   </div>
 </template>
 <script>
-import { getDashboardData } from '@/api/plant/eoeg-daily-management'
+import { getDashboardData } from '@/api/eoeg/home'
 
 export default {
   name: 'tableChart',
@@ -65,8 +76,7 @@ export default {
       tableData: [],
       queryParams: {
         pageNum: 1,
-        pageSize: 20,
-        year: new Date().getFullYear().toString()
+        pageSize: 20
       }
     }
   },

+ 2 - 2
ui/src/views/eoeg/home/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="dashboard-editor-container">
     <PanelGroup/>
-    <el-row :gutter="32">
+    <el-row :gutter="16">
       <el-col :xs="24" :sm="24" :lg="8">
         <div class="chart-wrapper">
           <pie-chart/>
@@ -39,7 +39,7 @@ export default {
 </script>
 <style lang="scss" scoped>
 .dashboard-editor-container {
-  padding: 32px;
+  padding: 16px;
   background-color: rgb(240, 242, 245);
   position: relative;