wuhb 5 ヶ月 前
コミット
cc4fdc23e3

+ 31 - 0
sql/gxt_runtime_score.sql

@@ -0,0 +1,31 @@
+-- ----------------------------
+-- 维保运行时间分数区间配置表
+-- ----------------------------
+DROP TABLE IF EXISTS `gxt_runtime_score`;
+CREATE TABLE `gxt_runtime_score` (
+  `id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+  `min_hours` DECIMAL(10,2) NOT NULL COMMENT '最小小时数',
+  `max_hours` DECIMAL(10,2) NULL DEFAULT NULL COMMENT '最大小时数(null表示无上限)',
+  `score_range` VARCHAR(50) NOT NULL COMMENT '分数区间描述',
+  `description` VARCHAR(200) NULL DEFAULT NULL COMMENT '描述',
+  `create_by` VARCHAR(64) NULL DEFAULT NULL COMMENT '创建者',
+  `create_time` DATETIME NULL DEFAULT NULL COMMENT '创建时间',
+  `update_by` VARCHAR(64) NULL DEFAULT NULL COMMENT '更新者',
+  `update_time` DATETIME NULL DEFAULT NULL COMMENT '更新时间',
+  `remark` VARCHAR(500) NULL DEFAULT NULL COMMENT '备注',
+  PRIMARY KEY (`id`) USING BTREE,
+  UNIQUE INDEX `idx_score_range` (`score_range`) USING BTREE COMMENT '分数区间唯一索引'
+) ENGINE = InnoDB
+  AUTO_INCREMENT = 1
+  CHARACTER SET = utf8mb4
+  COLLATE = utf8mb4_general_ci COMMENT = '维保运行时间分数区间配置表'
+  ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- 插入默认分数区间配置
+-- ----------------------------
+INSERT INTO `gxt_runtime_score` VALUES (1, 0.00, 10.00, '<10小时', '恢复运行时间小于10小时', 'admin', NOW(), NULL, NULL, '快速恢复');
+INSERT INTO `gxt_runtime_score` VALUES (2, 10.00, 240.00, '10-240小时', '恢复运行时间10-240小时', 'admin', NOW(), NULL, NULL, '正常恢复');
+INSERT INTO `gxt_runtime_score` VALUES (3, 240.00, 270.00, '240-270小时', '恢复运行时间240-270小时', 'admin', NOW(), NULL, NULL, '延迟恢复');
+INSERT INTO `gxt_runtime_score` VALUES (4, 270.00, 300.00, '270-300小时', '恢复运行时间270-300小时', 'admin', NOW(), NULL, NULL, '严重延迟');
+INSERT INTO `gxt_runtime_score` VALUES (5, 300.00, NULL, '>300小时', '恢复运行时间超过300小时', 'admin', NOW(), NULL, NULL, '极严重延迟');

+ 8 - 8
ygtx-admin/src/main/java/com/ygtx/web/controller/system/SysPostHomePageController.java

@@ -32,7 +32,7 @@ import com.ygtx.system.service.ISysPostHomePageService;
 
 /**
  * 岗位首页配置Controller
- * 
+ *
  * @author ruoyi
  */
 @RestController
@@ -40,10 +40,10 @@ import com.ygtx.system.service.ISysPostHomePageService;
 public class SysPostHomePageController extends BaseController
 {
     private static final Logger logger = LoggerFactory.getLogger(SysPostHomePageController.class);
-    
+
     @Autowired
     private ISysPostHomePageService sysPostHomePageService;
-    
+
     @Autowired
     private ISysPostService sysPostService;
 
@@ -58,7 +58,7 @@ public class SysPostHomePageController extends BaseController
         List<SysPostHomePage> list = sysPostHomePageService.selectSysPostHomePageList(sysPostHomePage);
         return getDataTable(list);
     }
-    
+
     /**
      * 查询岗位列表
      */
@@ -106,7 +106,7 @@ public class SysPostHomePageController extends BaseController
             // 设置创建者信息
             String username = getUsername();
             sysPostHomePage.setCreateBy(username);
-            
+
             int result = sysPostHomePageService.insertSysPostHomePage(sysPostHomePage);
             if (result > 0) {
                 return AjaxResult.success("操作成功");
@@ -131,7 +131,7 @@ public class SysPostHomePageController extends BaseController
             // 设置更新者信息
             String username = getUsername();
             sysPostHomePage.setUpdateBy(username);
-            
+
             int result = sysPostHomePageService.updateSysPostHomePage(sysPostHomePage);
             if (result > 0) {
                 return AjaxResult.success("操作成功");
@@ -176,6 +176,6 @@ public class SysPostHomePageController extends BaseController
                 return AjaxResult.success(list.get(0));
             }
         }
-        return AjaxResult.error("当前用户岗位未配置首页数据");
+        return AjaxResult.success();
     }
-}
+}

+ 103 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/domain/GxtRuntimeScore.java

@@ -0,0 +1,103 @@
+package com.ygtx.gxt.domain;
+
+import com.ygtx.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.math.BigDecimal;
+
+/**
+ * 维保运行时间分数区间配置对象 gxt_runtime_score
+ * 
+ * @author ygtx
+ * @date 2025-11-04
+ */
+@ApiModel(description = "维保运行时间分数区间配置")
+public class GxtRuntimeScore extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 主键ID */
+    @ApiModelProperty(value = "主键ID")
+    private Long id;
+
+    /** 最小小时数 */
+    @ApiModelProperty(value = "最小小时数")
+    private BigDecimal minHours;
+
+    /** 最大小时数 */
+    @ApiModelProperty(value = "最大小时数")
+    private BigDecimal maxHours;
+
+    /** 分数区间描述 */
+    @ApiModelProperty(value = "分数区间描述")
+    private String scoreRange;
+
+    /** 描述 */
+    @ApiModelProperty(value = "描述")
+    private String description;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setMinHours(BigDecimal minHours) 
+    {
+        this.minHours = minHours;
+    }
+
+    public BigDecimal getMinHours() 
+    {
+        return minHours;
+    }
+    public void setMaxHours(BigDecimal maxHours) 
+    {
+        this.maxHours = maxHours;
+    }
+
+    public BigDecimal getMaxHours() 
+    {
+        return maxHours;
+    }
+    public void setScoreRange(String scoreRange) 
+    {
+        this.scoreRange = scoreRange;
+    }
+
+    public String getScoreRange() 
+    {
+        return scoreRange;
+    }
+    public void setDescription(String description) 
+    {
+        this.description = description;
+    }
+
+    public String getDescription() 
+    {
+        return description;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("minHours", getMinHours())
+            .append("maxHours", getMaxHours())
+            .append("scoreRange", getScoreRange())
+            .append("description", getDescription())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 78 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/mapper/GxtRuntimeScoreMapper.java

@@ -0,0 +1,78 @@
+package com.ygtx.gxt.mapper;
+
+import java.util.List;
+import java.util.Map;
+
+import com.ygtx.gxt.domain.GxtRuntimeScore;
+
+/**
+ * 维保运行时间分数区间配置Mapper接口
+ * 
+ * @author ygtx
+ * @date 2025-11-04
+ */
+public interface GxtRuntimeScoreMapper 
+{
+    /**
+     * 查询维保运行时间分数区间配置
+     * 
+     * @param id 维保运行时间分数区间配置主键
+     * @return 维保运行时间分数区间配置
+     */
+    public GxtRuntimeScore selectGxtRuntimeScoreById(Long id);
+
+    /**
+     * 查询维保运行时间分数区间配置列表
+     * 
+     * @param gxtRuntimeScore 维保运行时间分数区间配置
+     * @return 维保运行时间分数区间配置集合
+     */
+    public List<GxtRuntimeScore> selectGxtRuntimeScoreList(GxtRuntimeScore gxtRuntimeScore);
+
+    /**
+     * 新增维保运行时间分数区间配置
+     * 
+     * @param gxtRuntimeScore 维保运行时间分数区间配置
+     * @return 结果
+     */
+    public int insertGxtRuntimeScore(GxtRuntimeScore gxtRuntimeScore);
+
+    /**
+     * 修改维保运行时间分数区间配置
+     * 
+     * @param gxtRuntimeScore 维保运行时间分数区间配置
+     * @return 结果
+     */
+    public int updateGxtRuntimeScore(GxtRuntimeScore gxtRuntimeScore);
+
+    /**
+     * 删除维保运行时间分数区间配置
+     * 
+     * @param id 维保运行时间分数区间配置主键
+     * @return 结果
+     */
+    public int deleteGxtRuntimeScoreById(Long id);
+
+    /**
+     * 批量删除维保运行时间分数区间配置
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteGxtRuntimeScoreByIds(Long[] ids);
+
+    /**
+     * 获取所有运行时间分数区间配置
+     * 
+     * @return 运行时间分数区间配置列表
+     */
+    public List<GxtRuntimeScore> selectAllRuntimeScores();
+
+    /**
+     * 根据设备ID和时间范围统计运行时间分数
+     * 
+     * @param params 查询参数
+     * @return 统计结果
+     */
+    public List<Map<String, Object>> selectRuntimeScoreStatistics(Map<String, Object> params);
+}

+ 83 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/service/IGxtRuntimeScoreService.java

@@ -0,0 +1,83 @@
+package com.ygtx.gxt.service;
+
+import java.util.List;
+import java.util.Map;
+import com.ygtx.gxt.domain.GxtRuntimeScore;
+
+/**
+ * 维保运行时间分数区间配置Service接口
+ * 
+ * @author ygtx
+ * @date 2025-11-04
+ */
+public interface IGxtRuntimeScoreService 
+{
+    /**
+     * 查询维保运行时间分数区间配置
+     * 
+     * @param id 维保运行时间分数区间配置主键
+     * @return 维保运行时间分数区间配置
+     */
+    public GxtRuntimeScore selectGxtRuntimeScoreById(Long id);
+
+    /**
+     * 查询维保运行时间分数区间配置列表
+     * 
+     * @param gxtRuntimeScore 维保运行时间分数区间配置
+     * @return 维保运行时间分数区间配置集合
+     */
+    public List<GxtRuntimeScore> selectGxtRuntimeScoreList(GxtRuntimeScore gxtRuntimeScore);
+
+    /**
+     * 新增维保运行时间分数区间配置
+     * 
+     * @param gxtRuntimeScore 维保运行时间分数区间配置
+     * @return 结果
+     */
+    public int insertGxtRuntimeScore(GxtRuntimeScore gxtRuntimeScore);
+
+    /**
+     * 修改维保运行时间分数区间配置
+     * 
+     * @param gxtRuntimeScore 维保运行时间分数区间配置
+     * @return 结果
+     */
+    public int updateGxtRuntimeScore(GxtRuntimeScore gxtRuntimeScore);
+
+    /**
+     * 批量删除维保运行时间分数区间配置
+     * 
+     * @param ids 需要删除的维保运行时间分数区间配置主键集合
+     * @return 结果
+     */
+    public int deleteGxtRuntimeScoreByIds(Long[] ids);
+
+    /**
+     * 删除维保运行时间分数区间配置信息
+     * 
+     * @param id 维保运行时间分数区间配置主键
+     * @return 结果
+     */
+    public int deleteGxtRuntimeScoreById(Long id);
+
+    /**
+     * 获取所有运行时间分数区间配置
+     * 
+     * @return 运行时间分数区间配置列表
+     */
+    public List<GxtRuntimeScore> selectAllRuntimeScores();
+
+    /**
+     * 获取维保运行统计
+     * 
+     * @param groupFields 分组字段
+     * @param gxtCenter 维保中心
+     * @param pcsStationName 场站名称
+     * @param brand 设备品牌
+     * @param model 设备型号
+     * @return 统计结果
+     */
+    public List<Map<String, Object>> getRuntimeScoreStatistics(String groupFields, String gxtCenter,
+                                                              String pcsStationName, String brand,
+                                                              String model);
+}

+ 132 - 0
ygtx-gxt/src/main/java/com/ygtx/gxt/service/impl/GxtRuntimeScoreServiceImpl.java

@@ -0,0 +1,132 @@
+package com.ygtx.gxt.service.impl;
+
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ygtx.gxt.mapper.GxtRuntimeScoreMapper;
+import com.ygtx.gxt.domain.GxtRuntimeScore;
+import com.ygtx.gxt.service.IGxtRuntimeScoreService;
+
+/**
+ * 维保运行时间分数区间配置Service业务层处理
+ * 
+ * @author ygtx
+ * @date 2025-11-04
+ */
+@Service
+public class GxtRuntimeScoreServiceImpl implements IGxtRuntimeScoreService
+{
+    @Autowired
+    private GxtRuntimeScoreMapper gxtRuntimeScoreMapper;
+
+    /**
+     * 查询维保运行时间分数区间配置
+     * 
+     * @param id 维保运行时间分数区间配置主键
+     * @return 维保运行时间分数区间配置
+     */
+    @Override
+    public GxtRuntimeScore selectGxtRuntimeScoreById(Long id)
+    {
+        return gxtRuntimeScoreMapper.selectGxtRuntimeScoreById(id);
+    }
+
+    /**
+     * 查询维保运行时间分数区间配置列表
+     * 
+     * @param gxtRuntimeScore 维保运行时间分数区间配置
+     * @return 维保运行时间分数区间配置
+     */
+    @Override
+    public List<GxtRuntimeScore> selectGxtRuntimeScoreList(GxtRuntimeScore gxtRuntimeScore)
+    {
+        return gxtRuntimeScoreMapper.selectGxtRuntimeScoreList(gxtRuntimeScore);
+    }
+
+    /**
+     * 新增维保运行时间分数区间配置
+     * 
+     * @param gxtRuntimeScore 维保运行时间分数区间配置
+     * @return 结果
+     */
+    @Override
+    public int insertGxtRuntimeScore(GxtRuntimeScore gxtRuntimeScore)
+    {
+        return gxtRuntimeScoreMapper.insertGxtRuntimeScore(gxtRuntimeScore);
+    }
+
+    /**
+     * 修改维保运行时间分数区间配置
+     * 
+     * @param gxtRuntimeScore 维保运行时间分数区间配置
+     * @return 结果
+     */
+    @Override
+    public int updateGxtRuntimeScore(GxtRuntimeScore gxtRuntimeScore)
+    {
+        return gxtRuntimeScoreMapper.updateGxtRuntimeScore(gxtRuntimeScore);
+    }
+
+    /**
+     * 批量删除维保运行时间分数区间配置
+     * 
+     * @param ids 需要删除的维保运行时间分数区间配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteGxtRuntimeScoreByIds(Long[] ids)
+    {
+        return gxtRuntimeScoreMapper.deleteGxtRuntimeScoreByIds(ids);
+    }
+
+    /**
+     * 删除维保运行时间分数区间配置信息
+     * 
+     * @param id 维保运行时间分数区间配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteGxtRuntimeScoreById(Long id)
+    {
+        return gxtRuntimeScoreMapper.deleteGxtRuntimeScoreById(id);
+    }
+
+    /**
+     * 获取所有运行时间分数区间配置
+     * 
+     * @return 运行时间分数区间配置列表
+     */
+    @Override
+    public List<GxtRuntimeScore> selectAllRuntimeScores()
+    {
+        return gxtRuntimeScoreMapper.selectAllRuntimeScores();
+    }
+
+    /**
+     * 获取维保运行统计
+     * 
+     * @param groupFields 分组字段
+     * @param gxtCenter 维保中心
+     * @param pcsStationName 场站名称
+     * @param brand 设备品牌
+     * @param model 设备型号
+     * @return 统计结果
+     */
+    @Override
+    public List<Map<String, Object>> getRuntimeScoreStatistics(String groupFields, String gxtCenter,
+                                                              String pcsStationName, String brand,
+                                                              String model)
+    {
+        Map<String, Object> params = new HashMap<>();
+        params.put("groupFields", groupFields);
+        params.put("gxtCenter", gxtCenter);
+        params.put("pcsStationName", pcsStationName);
+        params.put("brand", brand);
+        params.put("model", model);
+        
+        return gxtRuntimeScoreMapper.selectRuntimeScoreStatistics(params);
+    }
+}

+ 197 - 0
ygtx-gxt/src/main/resources/mapper/gxt/GxtRuntimeScoreMapper.xml

@@ -0,0 +1,197 @@
+<?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">
+<mapper namespace="com.ygtx.gxt.mapper.GxtRuntimeScoreMapper">
+
+    <resultMap type="GxtRuntimeScore" id="GxtRuntimeScoreResult">
+        <result property="id" column="id"/>
+        <result property="minHours" column="min_hours"/>
+        <result property="maxHours" column="max_hours"/>
+        <result property="scoreRange" column="score_range"/>
+        <result property="description" column="description"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+        <result property="remark" column="remark"/>
+    </resultMap>
+
+    <sql id="selectGxtRuntimeScoreVo">
+        select id, min_hours, max_hours, score_range, description, create_by, create_time, update_by, update_time, remark from gxt_runtime_score
+    </sql>
+
+    <select id="selectGxtRuntimeScoreList" parameterType="GxtRuntimeScore" resultMap="GxtRuntimeScoreResult">
+        <include refid="selectGxtRuntimeScoreVo"/>
+        <where>  
+            <if test="minHours != null "> and min_hours = #{minHours}</if>
+            <if test="maxHours != null "> and max_hours = #{maxHours}</if>
+            <if test="scoreRange != null  and scoreRange != ''"> and score_range = #{scoreRange}</if>
+            <if test="description != null  and description != ''"> and description = #{description}</if>
+        </where>
+        order by id asc
+    </select>
+    
+    <select id="selectGxtRuntimeScoreById" parameterType="Long" resultMap="GxtRuntimeScoreResult">
+        <include refid="selectGxtRuntimeScoreVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertGxtRuntimeScore" parameterType="GxtRuntimeScore" useGeneratedKeys="true" keyProperty="id">
+        insert into gxt_runtime_score
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="minHours != null">min_hours,</if>
+            <if test="maxHours != null">max_hours,</if>
+            <if test="scoreRange != null and scoreRange != ''">score_range,</if>
+            <if test="description != null and description != ''">description,</if>
+            <if test="createBy != null and createBy != ''">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null and updateBy != ''">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="minHours != null">#{minHours},</if>
+            <if test="maxHours != null">#{maxHours},</if>
+            <if test="scoreRange != null and scoreRange != ''">#{scoreRange},</if>
+            <if test="description != null and description != ''">#{description},</if>
+            <if test="createBy != null and createBy != ''">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateGxtRuntimeScore" parameterType="GxtRuntimeScore">
+        update gxt_runtime_score
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="minHours != null">min_hours = #{minHours},</if>
+            <if test="maxHours != null">max_hours = #{maxHours},</if>
+            <if test="scoreRange != null and scoreRange != ''">score_range = #{scoreRange},</if>
+            <if test="description != null and description != ''">description = #{description},</if>
+            <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteGxtRuntimeScoreById" parameterType="Long">
+        delete from gxt_runtime_score where id = #{id}
+    </delete>
+
+    <delete id="deleteGxtRuntimeScoreByIds" parameterType="Long">
+        delete from gxt_runtime_score where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+    
+    <select id="selectAllRuntimeScores" resultMap="GxtRuntimeScoreResult">
+        <include refid="selectGxtRuntimeScoreVo"/>
+        order by min_hours asc
+    </select>
+    
+    <!-- 维保运行统计SQL -->
+    <select id="selectRuntimeScoreStatistics" resultType="java.util.HashMap">
+        SELECT 
+            <choose>
+                <when test="params.groupFields != null and params.groupFields != ''">
+                    <foreach collection="params.groupFields.split(',')" item="field" separator=",">
+                        t.${field}
+                    </foreach>,
+                </when>
+                <otherwise>
+                    t.gxt_center,
+                </otherwise>
+            </choose>
+            SUM(t.under_10_hours_score) as under_10_hours_score,
+            SUM(t.range_10_240_score) as range_10_240_score,
+            SUM(t.range_240_270_score) as range_240_270_score,
+            SUM(t.range_270_300_score) as range_270_300_score,
+            SUM(t.over_300_score) as over_300_score,
+            SUM(t.total_score) as total_score,
+            COUNT(t.device_id) as device_count
+        FROM (
+            SELECT 
+                <choose>
+                    <when test="params.groupFields != null and params.groupFields != ''">
+                        <foreach collection="params.groupFields.split(',')" item="field" separator=",">
+                            w.${field}
+                        </foreach>,
+                    </when>
+                    <otherwise>
+                        w.gxt_center,
+                    </otherwise>
+                </choose>
+                w.pcs_device_id as device_id,
+                w.pcs_device_name as device_name,
+                MAX(r.restart_time) as last_restart_time,
+                TIMESTAMPDIFF(HOUR, MAX(r.restart_time), NOW()) as downtime_hours,
+                CASE 
+                    WHEN TIMESTAMPDIFF(HOUR, MAX(r.restart_time), NOW()) &lt; 10 THEN COALESCE(SUM(w.score), 0)
+                    ELSE 0
+                END as under_10_hours_score,
+                CASE 
+                    WHEN TIMESTAMPDIFF(HOUR, MAX(r.restart_time), NOW()) &gt;= 10 AND TIMESTAMPDIFF(HOUR, MAX(r.restart_time), NOW()) &lt; 240 THEN COALESCE(SUM(w.score), 0)
+                    ELSE 0
+                END as range_10_240_score,
+                CASE 
+                    WHEN TIMESTAMPDIFF(HOUR, MAX(r.restart_time), NOW()) &gt;= 240 AND TIMESTAMPDIFF(HOUR, MAX(r.restart_time), NOW()) &lt; 270 THEN COALESCE(SUM(w.score), 0)
+                    ELSE 0
+                END as range_240_270_score,
+                CASE 
+                    WHEN TIMESTAMPDIFF(HOUR, MAX(r.restart_time), NOW()) &gt;= 270 AND TIMESTAMPDIFF(HOUR, MAX(r.restart_time), NOW()) &lt; 300 THEN COALESCE(SUM(w.score), 0)
+                    ELSE 0
+                END as range_270_300_score,
+                CASE 
+                    WHEN TIMESTAMPDIFF(HOUR, MAX(r.restart_time), NOW()) &gt;= 300 THEN COALESCE(SUM(w.score), 0)
+                    ELSE 0
+                END as over_300_score,
+                COALESCE(SUM(w.score), 0) as total_score
+            FROM gxt_work_order w
+            LEFT JOIN gxt_repair_order r ON w.pcs_device_id = r.pcs_device_id AND r.restart_time IS NOT NULL
+            WHERE w.create_time &gt;= DATE_SUB(NOW(), INTERVAL 1 MONTH)
+                AND w.pcs_device_id IS NOT NULL
+                <if test="params.gxtCenter != null and params.gxtCenter != ''">
+                    AND w.gxt_center = #{params.gxtCenter}
+                </if>
+                <if test="params.pcsStationName != null and params.pcsStationName != ''">
+                    AND w.pcs_station_name = #{params.pcsStationName}
+                </if>
+                <if test="params.brand != null and params.brand != ''">
+                    AND w.brand = #{params.brand}
+                </if>
+                <if test="params.model != null and params.model != ''">
+                    AND w.model = #{params.model}
+                </if>
+            GROUP BY 
+                <choose>
+                    <when test="params.groupFields != null and params.groupFields != ''">
+                        <foreach collection="params.groupFields.split(',')" item="field" separator=",">
+                            w.${field}
+                        </foreach>,
+                    </when>
+                    <otherwise>
+                        w.gxt_center,
+                    </otherwise>
+                </choose>
+                w.pcs_device_id, w.pcs_device_name
+        ) t
+        GROUP BY
+            <choose>
+                <when test="params.groupFields != null and params.groupFields != ''">
+                    <foreach collection="params.groupFields.split(',')" item="field" separator=",">
+                        t.${field}
+                    </foreach>
+                </when>
+                <otherwise>
+                    t.gxt_center
+                </otherwise>
+            </choose>
+        ORDER BY total_score DESC
+    </select>
+</mapper>

+ 10 - 1
ygtx-ui/src/assets/styles/index.scss

@@ -236,4 +236,13 @@ aside {
 
 .el-form-item--default .el-form-item__content .item-search{
   display: block; width: 100%;height: 30px;text-align: right;
-}
+}
+
+.custom-confirm-box .el-message-box__container {
+  display: block;
+  text-align: center;
+}
+
+.custom-confirm-box .el-message-box__container i {
+  font-size: 40px;
+}

+ 2 - 2
ygtx-ui/src/components/Breadcrumb/index.vue

@@ -34,7 +34,7 @@ function getBreadcrumb() {
   }
   // 判断是否为首页
   if (!isDashboard(matched[0])) {
-    matched = [{ path: "/index", meta: { title: "首页" } }].concat(matched)
+    matched = [{ path: "/index", meta: { title: "驾驶仓" } }].concat(matched)
   }
   levelList.value = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
 }
@@ -95,4 +95,4 @@ getBreadcrumb()
     cursor: text;
   }
 }
-</style>
+</style>

+ 10 - 0
ygtx-ui/src/plugins/modal.js

@@ -54,9 +54,19 @@ export default {
   // 确认窗体
   confirm(content) {
     return ElMessageBox.confirm(content, "系统提示", {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: "warning"
+    })
+  },
+
+  confirm2(title, content, type="warning") {
+    return ElMessageBox.confirm(content, title, {
       confirmButtonText: '确定',
       cancelButtonText: '取消',
       type: "warning",
+      iconClass: 'fa fa-play', // 使用 Font Awesome 图标
+      customClass: 'custom-confirm-box', // 自定义类名(可选)
     })
   },
   // 提交内容

+ 119 - 138
ygtx-ui/src/views/gxt/repairOrder/index.vue

@@ -127,9 +127,9 @@
     </el-row>
 
     <!-- 工单列表 -->
-    <el-table 
-      v-loading="loading" 
-      :data="repairOrderList" 
+    <el-table
+      v-loading="loading"
+      :data="repairOrderList"
       @selection-change="handleSelectionChange"
       style="width: 100%"
       :max-height="tableHeight"
@@ -176,43 +176,40 @@
           <dict-tag :options="gxt_order_priority_type" :value="scope.row.priorityType" />
         </template>
       </el-table-column>-->
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="250" fixed="right">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="220" fixed="right">
         <template #default="scope">
-          <el-button 
+          <el-button
             v-if="scope.row.workOrderStatus === 'to_issue'"
-            type="primary" 
-            link 
+            type="primary"
+            link
             @click="handleEdit(scope.row)"
             v-hasPermi="['gxt:repairOrder:edit']"
-          ><i class="fa fa-edit"></i>编辑</el-button>
-          <el-button 
+          >编辑</el-button>
+
+          <el-button
             v-if="scope.row.workOrderStatus === 'to_issue'"
             type="primary"
             link
             @click="handleAssign(scope.row)"
-            v-hasPermi="['gxt:repairOrder:assign']"
-          ><i class="fa fa-user-plus"></i>下发</el-button>
-          <el-button 
+          >下发</el-button>
+          <el-button
             v-if="scope.row.workOrderStatus === 'assigned'"
             type="primary"
             link
             @click="handleAccept(scope.row)"
-            v-hasPermi="['gxt:repairOrder:accept']"
-          ><i class="fa fa-check"></i>接单</el-button>
-          <el-button 
+          >接单</el-button>
+          <el-button
             v-if="scope.row.workOrderStatus === 'suspended'"
             type="success"
             link
             @click="handleStart(scope.row)"
-            v-hasPermi="['gxt:repairOrder:start']"
-          ><i class="fa fa-play"></i>开始</el-button>
-          <el-button 
+          >开始</el-button>
+          <el-button
             v-if="scope.row.workOrderStatus === 'processing'"
-            type="danger"
+            type="warning"
             link
             @click="handleSuspend(scope.row)"
-            v-hasPermi="['gxt:repairOrder:suspend']"
-          ><i class="fa fa-stop"></i>挂起</el-button>
+          >挂起</el-button>
 <!--          <el-button
             v-if="scope.row.workOrderStatus === 'processing'"
             type="warning"
@@ -225,57 +222,52 @@
             link
             @click="handleProcessDone(scope.row)"
           >结束</el-button>-->
-          <el-button 
+          <el-button
             v-if="scope.row.workOrderStatus === 'processing'"
-            type="success"
+            type="primary"
             link
             @click="handleFinalize(scope.row)"
-            v-hasPermi="['gxt:repairOrder:finalize']"
-          ><i class="fa fa-check"></i>结单</el-button>
-          <el-button 
+          >结单</el-button>
+          <el-button
             v-if="scope.row.workOrderStatus === 'to_approve'"
             type="primary"
             link
             @click="handleApprove(scope.row)"
-            v-hasPermi="['gxt:repairOrder:approve']"
-          ><i class="fa fa-check-circle"></i>审批</el-button>
+          >审批</el-button>
 <!--          <el-button
             v-if="scope.row.workOrderStatus === 'paused' || scope.row.workOrderStatus === 'suspended'"
             type="primary"
             link
             @click="handleResume(scope.row)"
           >恢复</el-button>-->
-          <el-button 
+          <el-button
             v-if="scope.row.workOrderStatus === 'completed' && !scope.row.score"
-            type="warning"
+            type="primary"
             link
             @click="handleRating(scope.row)"
-            v-hasPermi="['gxt:repairOrder:rating']"
-          ><i class="fa fa-star"></i>评分</el-button>
+          >评分</el-button>
           <el-button
               v-if="scope.row.workOrderStatus === 'completed' && !scope.row.restartTime"
-              type="success"
+              type="primary"
               link
               @click="handleRestart(scope.row)"
-              v-hasPermi="['gxt:repairOrder:restart']"
-          ><i class="fa fa-play"></i>复运</el-button>
+          >复运</el-button>
           <el-button
-              type="info"
+              type="primary"
               link
               @click="handleView(scope.row)"
-              v-hasPermi="['gxt:repairOrder:query']"
-          ><i class="fa fa-eye"></i>查看</el-button>
+          >查看</el-button>
           <el-button
               v-if="scope.row.workOrderStatus === 'to_issue'"
               type="danger"
               link
               @click="handleDelete(scope.row)"
               v-hasPermi="['gxt:repairOrder:remove']"
-          ><i class="fa fa-trash"></i>删除</el-button>
+          >删除</el-button>
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
       v-show="total>0"
       :total="total"
@@ -394,10 +386,10 @@
         <el-row>
           <el-col :span="24">
             <el-form-item label="故障描述" prop="faultDesc">
-              <el-input 
-                v-model="form.faultDesc" 
-                type="textarea" 
-                placeholder="请输入故障描述" 
+              <el-input
+                v-model="form.faultDesc"
+                type="textarea"
+                placeholder="请输入故障描述"
                 maxlength="500"
                 show-word-limit
                 :rows="3"
@@ -455,12 +447,12 @@
               {{ assignForm.misOrderNo }}
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="24">
             <el-form-item label="故障描述">{{ assignForm.faultDesc || '无' }}</el-form-item>
           </el-col>
 
         </el-row>
-        
+
 <!--        <el-form-item label="关联维保工单">
           <el-select
             v-model="assignForm.relatedOrderCode"
@@ -484,16 +476,16 @@
             </el-option>
           </el-select>
         </el-form-item>
-        
-        <el-form-item 
-          v-if="assignForm.relatedOrderCode" 
+
+        <el-form-item
+          v-if="assignForm.relatedOrderCode"
           label="维保内容"
           prop="relatedOrderContent">
 
-          <el-input 
+          <el-input
             v-model="assignForm.relatedOrderContent"
-            type="textarea" 
-            placeholder="请输入维保内容" 
+            type="textarea"
+            placeholder="请输入维保内容"
             maxlength="500"
             show-word-limit
             :rows="3"
@@ -639,11 +631,11 @@
           </el-select>
         </el-form-item>
         <el-form-item label="详细说明" prop="suspendDescription">
-          <el-input 
-            v-model="suspendForm.suspendDescription" 
-            type="textarea" 
-            placeholder="请输入详细说明" 
-            maxlength="100" 
+          <el-input
+            v-model="suspendForm.suspendDescription"
+            type="textarea"
+            placeholder="请输入详细说明"
+            maxlength="100"
             show-word-limit
             :rows="3"
           />
@@ -707,10 +699,10 @@
           <el-col :span="12">
             <el-form-item label="工作负责人">{{ approveForm.teamLeaderName }}</el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="24">
             <el-form-item label="故障描述">{{ approveForm.faultDesc || '无' }}</el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="24">
             <el-form-item label="挂起原因">
               {{ approveForm.suspendReason || '无' }}
             </el-form-item>
@@ -723,11 +715,11 @@
           </el-radio-group>
         </el-form-item>
         <el-form-item label="驳回原因" prop="rejectionReason" v-if="approveForm.approvalStatus === 'rejected'">
-          <el-input 
-            v-model="approveForm.rejectionReason" 
-            type="textarea" 
-            placeholder="请输入驳回原因" 
-            maxlength="100" 
+          <el-input
+            v-model="approveForm.rejectionReason"
+            type="textarea"
+            placeholder="请输入驳回原因"
+            maxlength="100"
             show-word-limit
             :rows="3"
           />
@@ -797,7 +789,7 @@
           <el-col :span="12">
             <el-form-item label="结束时间">{{ parseTime(finalizeForm.realEndTime) }}</el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="24">
             <el-form-item label="故障描述">{{ finalizeForm.faultDesc || '无' }}</el-form-item>
           </el-col>
           <el-col :span="12">
@@ -833,15 +825,15 @@
                   show-word-limit
                   :rows="4"
               />
-            </el-form-item> 
+            </el-form-item>
           </el-col>
         </el-row>
 <!--        <el-form-item label="结单说明" prop="finalizationRemark">
-          <el-input 
-            v-model="finalizeForm.finalizationRemark" 
-            type="textarea" 
-            placeholder="请输入结单说明" 
-            maxlength="200" 
+          <el-input
+            v-model="finalizeForm.finalizationRemark"
+            type="textarea"
+            placeholder="请输入结单说明"
+            maxlength="200"
             show-word-limit
             :rows="4"
           />
@@ -859,11 +851,11 @@
     <el-dialog title="结束工单" v-model="completeDialogVisible" width="600px" append-to-body @close="closeCompleteDialog">
       <el-form ref="completeFormRef" :model="completeForm" :rules="completeRules" label-width="120px" label-position="top">
         <el-form-item label="处理结果描述" prop="completeDescription">
-          <el-input 
-            v-model="completeForm.completeDescription" 
-            type="textarea" 
-            placeholder="请输入处理结果描述" 
-            maxlength="200" 
+          <el-input
+            v-model="completeForm.completeDescription"
+            type="textarea"
+            placeholder="请输入处理结果描述"
+            maxlength="200"
             show-word-limit
             :rows="4"
           />
@@ -933,14 +925,9 @@
           <el-col :span="12">
             <el-form-item label="结束时间">{{ parseTime(ratingForm.realEndTime) }}</el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="24">
             <el-form-item label="故障描述">{{ ratingForm.faultDesc || '无' }}</el-form-item>
           </el-col>
-          <el-col :span="12">
-            <el-form-item label="维修内容">
-              {{ ratingForm.content }}
-            </el-form-item>
-          </el-col>
           <el-col :span="12">
             <el-form-item label="检修类型">
               <dict-tag :options="gxt_maintenance_type" :value="ratingForm.maintenanceType" />
@@ -949,7 +936,11 @@
           <el-col :span="12">
             <el-form-item label="检修人员">{{ ratingForm.workGroupMemberName }}</el-form-item>
           </el-col>
-
+          <el-col :span="24">
+            <el-form-item label="维修内容">
+              {{ ratingForm.content }}
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item label="评分" prop="score">
               <el-input-number
@@ -982,7 +973,7 @@
         </div>
       </template>
     </el-dialog>
-    
+
     <!-- 开始处理对话框 -->
     <el-dialog title="开始工单" v-model="startDialogVisible" width="500px" append-to-body @close="closeStartDialog">
       <el-form label-width="120px" label-position="top">
@@ -1021,7 +1012,7 @@
         </div>
       </template>
     </el-dialog>
-    
+
     <!-- 复运对话框 -->
     <el-dialog title="复运" v-model="restartDialogVisible" width="800px" append-to-body @close="closeRestartDialog">
       <el-form ref="restartFormRef" :model="restartForm" :rules="restartRules" label-width="120px" label-position="top">
@@ -1060,7 +1051,7 @@
         </div>
       </template>
     </el-dialog>
-    
+
     <!-- 查看工单详情对话框 -->
     <el-dialog title="查看工单详情" v-model="viewDialogVisible" width="1000px" append-to-body>
       <el-row :gutter="20">
@@ -1172,7 +1163,7 @@
                 <el-timeline-item type="primary"
                   v-for="(flow, index) in flowList"
                   :key="index"
-                  :timestamp="parseTime(flow.actionTime, '{y}-{m}-{d} {h}:{i}:{s}')" 
+                  :timestamp="parseTime(flow.actionTime, '{y}-{m}-{d} {h}:{i}:{s}')"
                 >
                   <div class="flow-item">
                     <h4><dict-tag :options="gxt_repair_order_flow_action_type" :value="flow.actionType" /></h4>
@@ -1187,25 +1178,25 @@
           </div>
         </el-col>
       </el-row>
-      
+
       <template #footer>
         <div class="dialog-footer">
           <el-button @click="closeViewDialog">关 闭</el-button>
         </div>
       </template>
     </el-dialog>
-    
+
     <!-- 设备选择组件 -->
     <equipment-select-single v-model="equipmentSelectVisible" @onSelected="onEquipmentSelected"></equipment-select-single>
   </div>
 </template>
 
 <script setup name="RepairOrder">
-import { 
-  listRepairOrder, 
-  getRepairOrder, 
-  delRepairOrder, 
-  addRepairOrder, 
+import {
+  listRepairOrder,
+  getRepairOrder,
+  delRepairOrder,
+  addRepairOrder,
   updateRepairOrder,
   assignRepairOrder,
   acceptRepairOrder,
@@ -1546,19 +1537,19 @@ function getList() {
 function getMaintenanceCenterAndStationList() {
   listDept({}).then(response => {
     const depts = response.data;
-    
+
     // 筛选出维保中心(level=2)
     maintenanceCenterOptions.value = depts.filter(dept => dept.level === "2");
-    
+
     // 筛选出场站(level=3)
     const stations = depts.filter(dept => dept.level === "3");
-    
+
     // 如果已选择维保中心,则筛选出该维保中心下的场站
     if (queryParams.value.gxtCenter) {
       const selectedMaintenanceCenter = maintenanceCenterOptions.value.find(
         center => center.deptName === queryParams.value.gxtCenter
       );
-      
+
       if (selectedMaintenanceCenter) {
         stationOptions.value = stations.filter(
           station => station.ancestors.includes(selectedMaintenanceCenter.deptId)
@@ -1577,18 +1568,18 @@ function getMaintenanceCenterAndStationList() {
 function handleMaintenanceCenterChange(selectedCenter) {
   // 清空场站选择
   queryParams.value.pcsStationName = null;
-  
+
   // 如果选择了维保中心,则加载对应的场站
   if (selectedCenter) {
     listDept({}).then(response => {
       const depts = response.data;
       const stations = depts.filter(dept => dept.level === "3");
-      
+
       // 找到选中的维保中心
       const selectedMaintenanceCenter = maintenanceCenterOptions.value.find(
         center => center.deptName === selectedCenter
       );
-      
+
       if (selectedMaintenanceCenter) {
         // 筛选出该维保中心下的场站
         stationOptions.value = stations.filter(
@@ -1628,15 +1619,6 @@ function handleSelectEquipment() {
 /** 设备选择回调 */
 function onEquipmentSelected(row) {
   if (row) {
-    // 检查维保中心ID和场站ID是否存在
-    if (!row.maintenanceCenterId) {
-      proxy.$modal.msgError("该设备的维保中心没有对应的部门,请完善部门信息后再更新设备数据!");
-      return;
-    }
-    if (!row.stationId) {
-      proxy.$modal.msgError("该设备的场站没有对应的部门,请完善部门信息后再更新设备数据!");
-      return;
-    }
     form.value.pcsDeviceId = row.equipmentId
     form.value.pcsDeviceName = row.equipmentCode
     form.value.gxtCenterId = row.maintenanceCenterId
@@ -1667,7 +1649,7 @@ function handleAdd() {
   reset()
   openDialog.value = true
   dialogTitle.value = "新建维修工单"
-  
+
   // 生成工单编号
   const now = new Date()
   const year = now.getFullYear()
@@ -1676,7 +1658,7 @@ function handleAdd() {
   const dateStr = `${year}${month}${day}`
   const randomNum = Math.floor(100 + Math.random() * 900)
   form.value.workOrderProjectNo = `WX${dateStr}${randomNum}`
-  
+
   // 设置默认发生时间
   form.value.occurTime = now
 }
@@ -1740,8 +1722,7 @@ function submitFormAndIssue() {
 /** 删除按钮操作 */
 function handleDelete(row) {
   const ids = row.id || ids.value
-  const workOrderProjectNo = row.workOrderProjectNo || (repairOrderList.value.find(item => item.id === ids)?.workOrderProjectNo)
-  proxy.$modal.confirm('是否确认删除维修工单编号为"' + workOrderProjectNo + '"的数据项?').then(function() {
+  proxy.$modal.confirm('是否确认删除维修工单编号为"' + ids + '"的数据项?').then(function() {
     return delRepairOrder(ids)
   }).then(() => {
     getList()
@@ -1799,7 +1780,7 @@ function searchWorkOrders(query) {
     workOrderOptions.value = []
     return
   }
-  
+
   workOrderSearchLoading.value = true
   listGxtOrder({ workOrderProjectNo: query }).then(response => {
     workOrderOptions.value = response.rows
@@ -1816,7 +1797,7 @@ function handleWorkOrderChange(val) {
     assignForm.value.relatedOrderContent = ""
     return
   }
-  
+
   // 查找选中的维保工单
   const selectedWorkOrder = workOrderOptions.value.find(item => item.workOrderProjectNo === val)
   if (selectedWorkOrder) {
@@ -1838,9 +1819,9 @@ async function submitAssign() {
           relatedOrderCode: assignForm.value.relatedOrderCode,
           relatedOrderContent: assignForm.value.relatedOrderContent
         }*/
-        
+
         await assignRepairOrder(assignForm.value)
-        
+
         proxy.$modal.msgSuccess("下发成功")
         assignDialogVisible.value = false
         getList()
@@ -1876,7 +1857,7 @@ async function submitAccept() {
       try {
         // 更新检修人员列表
         handleMembersChange('acceptForm');
-        
+
         // 更新工单状态和相关信息
         /*const updateData = {
           id: acceptForm.value.id,
@@ -1887,9 +1868,9 @@ async function submitAccept() {
           teamLeaderName: acceptForm.value.teamLeaderName,
           workGroupMemberName: acceptForm.value.selectedMembers.join(",")
         }*/
-        
+
         await acceptRepairOrder(acceptForm.value)
-        
+
         proxy.$modal.msgSuccess("接单成功")
         acceptDialogVisible.value = false
         getList()
@@ -1918,9 +1899,9 @@ async function submitStart() {
       workOrderStatus: "processing",
       realStartTime: new Date()
     };*/
-    
+
     await startRepairOrder(startForm.value);
-    
+
     proxy.$modal.msgSuccess("工单已开始处理");
     startDialogVisible.value = false;
     getList();
@@ -1937,9 +1918,9 @@ async function handlePause(row) {
         id: row.id,
         workOrderStatus: "paused"
       }
-      
+
       await pauseRepairOrder(updateData)
-      
+
       proxy.$modal.msgSuccess("工单已暂停")
       getList()
     } catch (error) {
@@ -1956,9 +1937,9 @@ async function handleResume(row) {
         id: row.id,
         workOrderStatus: "processing"
       };
-      
+
       await resumeRepairOrder(updateData);
-      
+
       proxy.$modal.msgSuccess("工单已恢复");
       getList();
     } catch (error) {
@@ -1997,9 +1978,9 @@ async function submitComplete() {
           realEndTime: new Date(),
           completeDescription: completeForm.value.completeDescription
         }
-        
+
         await processDoneRepairOrder(updateData)
-        
+
         proxy.$modal.msgSuccess("处理完成,工单进入待结单状态")
         completeDialogVisible.value = false
         getList()
@@ -2030,7 +2011,7 @@ async function submitRating() {
           score: ratingForm.value.score,
           reviewContent: ratingForm.value.reviewContent
         }*/
-        
+
         await ratingRepairOrder(ratingForm.value)
         proxy.$modal.msgSuccess("评分成功")
         ratingDialogVisible.value = false
@@ -2082,7 +2063,7 @@ async function submitSuspend() {
         };
         */
         await suspendRepairOrder(suspendForm.value);
-        
+
         proxy.$modal.msgSuccess("挂起申请已提交");
         suspendDialogVisible.value = false;
         getList();
@@ -2120,7 +2101,7 @@ async function submitApprove() {
     if (valid) {
       try {
         /*let updateData, actionRemark, toStatus, actionType = "审批";
-        
+
         if (approveForm.value.approvalStatus === 'approved') {
           // 审批通过
           toStatus = "suspended";
@@ -2145,7 +2126,7 @@ async function submitApprove() {
           approveForm.value.rejectionReason = undefined;
         }
         await approveSuspendRepairOrder(approveForm.value);
-        
+
         proxy.$modal.msgSuccess("操作完成");
         approveDialogVisible.value = false;
         getList();
@@ -2187,15 +2168,15 @@ async function submitFinalize() {
       try {
         // 更新检修人员列表
         handleMembersChange('finalizeForm');
-        
+
         /*const updateData = {
           id: finalizeForm.value.id,
           workOrderStatus: "completed",
           finalizationRemark: finalizeForm.value.finalizationRemark
         }*/
-        
+
         await finalizeRepairOrder(finalizeForm.value)
-        
+
         proxy.$modal.msgSuccess("工单结单成功")
         finalizeDialogVisible.value = false
         getList()
@@ -2210,7 +2191,7 @@ async function submitFinalize() {
 function handleMembersChange(formName) {
   // 默认使用 acceptForm,但也支持其他表单
   const targetForm = formName === 'finalizeForm' ? finalizeForm : acceptForm;
-  
+
   // 清空之前的列表
   targetForm.value.repairOrderPersonList = [];
   console.log(targetForm.value.selectedMembers)
@@ -2243,7 +2224,7 @@ async function submitRestart() {
     if (valid) {
       try {
         await restartRepairOrder(restartForm.value)
-        
+
         proxy.$modal.msgSuccess("复运成功")
         restartDialogVisible.value = false
         getList()

+ 5 - 3
ygtx-ui/src/views/index.vue

@@ -11,17 +11,19 @@ import { getCurrentUserHomePage } from '@/api/system/postHomePage'
 import Index0 from './index0.vue'
 import Index1 from './index1.vue'
 import Index2 from './index2.vue'
+import Index3 from './index3.vue'
 
 export default {
   name: 'Index',
   components: {
     Index0,
     Index1,
-    Index2
+    Index2,
+    Index3
   },
   setup() {
     const homePageRouteName = ref('')
-    
+
     // 根据路由名称确定要加载的组件
     const currentComponent = computed(() => {
       // 直接使用homePageRouteName值作为组件名称,提高代码简洁性
@@ -77,4 +79,4 @@ export default {
     }
   }
 }
-</script>
+</script>

+ 2 - 2
ygtx-ui/src/views/login.vue

@@ -81,8 +81,8 @@ const router = useRouter()
 const { proxy } = getCurrentInstance()
 
 const loginForm = ref({
-  username: "test",
-  password: "111111",
+  username: "",
+  password: "",
   rememberMe: false,
   code: "",
   uuid: ""