QuYueTing 3 недель назад
Родитель
Сommit
78322d829a

+ 86 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/ConstructionStage.java~

@@ -0,0 +1,86 @@
+package com.management.platform.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2026-04-13
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class ConstructionStage extends Model<ConstructionStage> {
+
+    private static final long serialVersionUID=1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 分项工程名称
+     */
+    @TableField("name")
+    private String name;
+
+    /**
+     * 主分类
+     */
+    @TableField("construction_type")
+    private String constructionType;
+
+    /**
+     * 单位
+     */
+    @TableField("unit")
+    private String unit;
+
+    /**
+     * 权重
+     */
+    @TableField("percent")
+    private Integer percent;
+
+    /**
+     * 父级类型id
+     */
+    @TableField("main_id")
+    private Integer mainId;
+
+    @TableField(exist = false)
+    private String mainName;
+
+    /**
+     * 总设计量
+     */
+    @TableField(exist = false)
+    private Double designNumber;
+
+    /**
+     * 总完成量
+     */
+    @TableField(exist = false)
+    private Double finishNumber;
+
+    /**
+     * 完成率
+     */
+    @TableField(exist = false)
+    private long finishRate;
+
+    @Override
+    protected Serializable pkVal() {
+        return this.id;
+    }
+
+}

+ 720 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/TimeType.java~

@@ -0,0 +1,720 @@
+package com.management.platform.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import java.util.List;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author Seyason
+ * @since 2026-03-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+public class TimeType extends Model<TimeType> {
+
+    private static final long serialVersionUID=1L;
+
+    /**
+     * 公司id
+     */
+    @TableId("company_id")
+    private Integer companyId;
+
+    /**
+     * 全天时长
+     */
+    @TableField("allday")
+    private Float allday;
+
+    /**
+     * 上午时长
+     */
+    @TableField("am")
+    private Float am;
+
+    /**
+     * 下午时长
+     */
+    @TableField("pm")
+    private Float pm;
+
+    /**
+     * 每月工作天数
+     */
+    @TableField("month_days")
+    private BigDecimal monthDays;
+
+    /**
+     * 时薪录入方式:0-按月薪计算,1-直接输入时薪
+     */
+    @TableField("hour_cost_input_type")
+    private Integer hourCostInputType;
+
+    /**
+     * 时长上报方式
+     */
+    @TableField("type")
+    private Integer type;
+
+    /**
+     * 是否计算加班工时工资
+     */
+    @TableField("pay_overtime")
+    private Boolean payOvertime;
+
+    /**
+     * 填报提醒时间
+     */
+    @TableField("alert_time")
+    private String alertTime;
+
+    /**
+     * 支持同个项目多个时间事项录入
+     */
+    @TableField("multi_worktime")
+    private Integer multiWorktime;
+
+    /**
+     * 强制固定月薪
+     */
+    @TableField("fix_monthcost")
+    private Integer fixMonthcost;
+
+    /**
+     * 可补填几个月的, 0-不限制,1-本月,2-上个月,3-上上月,4- 7天内 ,5- 前一天
+     */
+    @TableField("fill_months")
+    private Integer fillMonths;
+
+    /**
+     * 工时填报自定义维度是否启用
+     */
+    @TableField("custom_degree_active")
+    private Integer customDegreeActive;
+
+    /**
+     * 工时填报自定义维度名称
+     */
+    @TableField("custom_degree_name")
+    private String customDegreeName;
+
+    /**
+     * 工时填报自定义维度是否必填 0-否 1-是
+     */
+    @TableField("custom_degree_status")
+    private Integer customDegreeStatus;
+
+    /**
+     * 工时填报自定义维度是否绑定项目 0-否 1-是
+     */
+    @TableField("custom_degree_with_pro")
+    private Integer customDegreeWithPro;
+
+    /**
+     * 提醒内容
+     */
+    @TableField("alert_msg")
+    private String alertMsg;
+
+    /**
+     * 同步企业微信的考勤记录
+     */
+    @TableField("sync_corpwx_time")
+    private Integer syncCorpwxTime;
+
+    /**
+     * 是否需要部门上级审核日报
+     */
+    @TableField("need_dept_audit")
+    private Integer needDeptAudit;
+
+    /**
+     * 是否开启自定义审批流
+     */
+    @TableField("report_workflow")
+    private Integer reportWorkflow;
+
+    /**
+     * 工时填报数值收集开关
+     */
+    @TableField("custom_data_active")
+    private Integer customDataActive;
+
+    /**
+     * 工时填报数值收集字段名称
+     */
+    @TableField("custom_data_name")
+    private String customDataName;
+
+    /**
+     * 工时填报数值收集字段是否必填 0-否 1-是
+     */
+    @TableField("custom_data_status")
+    private Integer customDataStatus;
+
+    /**
+     * 工时填报数值收集字段最大值是否限制 0-否 1-是
+     */
+    @TableField("custom_data_max_status")
+    private Integer customDataMaxStatus;
+
+    /**
+     * 工时填报数值收集字段最大值限制
+     */
+    @TableField("custom_data_max_value")
+    private Integer customDataMaxValue;
+
+    /**
+     * 财务成本导入是否需要审核
+     */
+    @TableField("finance_audit")
+    private Integer financeAudit;
+
+    /**
+     * 加班倍数
+     */
+    @TableField("overtime_ratio")
+    private Double overtimeRatio;
+
+    /**
+     * 是否同步钉钉考勤打卡和出差
+     */
+    @TableField("sync_dingding")
+    private Integer syncDingding;
+
+    /**
+     * 是否是药研行业
+     */
+    @TableField("is_cro")
+    private Integer isCro;
+
+    /**
+     * 只使用导入功能,不要项目审核
+     */
+    @TableField("only_importreport")
+    private Integer onlyImportreport;
+
+    /**
+     * 填写日报显示钉钉打卡时长
+     */
+    @TableField("show_dd_cardtime")
+    private Integer showDdCardtime;
+
+    /**
+     * 填写日报显示企业微信打卡时长
+     */
+    @TableField("show_corpwx_cardtime")
+    private Integer showCorpwxCardtime;
+
+    /**
+     * 自定义文本信息是否开启
+     */
+    @TableField("custom_text_active")
+    private Integer customTextActive;
+
+    /**
+     * 自定义文本信息字段名称
+     */
+    @TableField("custom_text_name")
+    private String customTextName;
+
+    /**
+     * 自定义文本信息是否必填 0-否 1-是
+     */
+    @TableField("custom_text_status")
+    private Integer customTextStatus;
+
+    /**
+     * 是否锁定每日填报时长
+     */
+    @TableField("lock_worktime")
+    private Integer lockWorktime;
+
+    /**
+     * 填报是否填报加班
+     */
+    @TableField("fill_overtime")
+    private Integer fillOvertime;
+
+    /**
+     * 是否显示填报和审核的时间
+     */
+    @TableField("show_fillaudit_time")
+    private Integer showFillauditTime;
+
+    /**
+     * 是否秘薪处理,即任何人的薪资都显示*
+     */
+    @TableField("is_secret_salary")
+    private Integer isSecretSalary;
+
+    /**
+     * 采用三位组合,第一位代表周六,第二位代表周日,第三位代表其他节假日,0代表不提醒,1代表提醒
+     */
+    @TableField("alert_non_workday")
+    private Integer alertNonWorkday;
+
+    /**
+     * 0-每日提醒当天漏填 1-每日提醒昨天漏填
+     */
+    @TableField("alert_type")
+    private Integer alertType;
+
+    /**
+     * 0-工作内容非必填 1-工作内容必填
+     */
+    @TableField("work_content_state")
+    private Integer workContentState;
+
+    /**
+     * 0-不可提前填报 1-可提前填报
+     */
+    @TableField("fill_ahead")
+    private Integer fillAhead;
+
+    /**
+     * 0-当天 1-第二天 2-第三天
+     */
+    @TableField("timeliness")
+    private Integer timeliness;
+
+    /**
+     * 0-未开启 1-开启
+     */
+    @TableField("main_project_state")
+    private Integer mainProjectState;
+
+    /**
+     * 日报的审核类型, 0-项目审核人审核,1-分组负责人审核,2-先分组负责人审核再项目负责人(PM)审核;3-员工自由选择审批人 4-项目所属BU审核 5-直属审核人或部门负责人审核,6-直属或部门负责人审核->项目日报审核人审核,7-项目和部门并行审核;8-项目设置复审人;9-分组负责人审核->项目日报审核人审核;10-普通员工到项目经理,项目经理到单独审核人
+     */
+    @TableField("report_audit_type")
+    private Integer reportAuditType;
+
+    /**
+     * 0-未开启 1-开启
+     */
+    @TableField("project_level_state")
+    private Integer projectLevelState;
+
+    /**
+     * 0-未开启 1-开启
+     */
+    @TableField("need_evaluate")
+    private Integer needEvaluate;
+
+    /**
+     * 产值  0-未开启 1-开启
+     */
+    @TableField("output_value_status")
+    private Integer outputValueStatus;
+
+    /**
+     * 0-未开启 1-开启
+     */
+    @TableField("user_custom_static")
+    private Integer userCustomStatic;
+
+    /**
+     * 批量填报是否包含节假日;0-不包含,1-包含
+     */
+    @TableField("include_weekends")
+    private Integer includeWeekends;
+
+    /**
+     * 从相册选择图片 0-未开启 1-开启
+     */
+    @TableField("chose_from_album")
+    private Integer choseFromAlbum;
+
+    /**
+     * 项目相关部门 0-未开启 1-开启
+     */
+    @TableField("project_with_dept")
+    private Integer projectWithDept;
+
+    /**
+     * 财务核算成本导入是否含工号:0-不含,1-含
+     */
+    @TableField("finance_jobnum_enabled")
+    private Integer financeJobnumEnabled;
+
+    /**
+     * 日报审核通过消息推送 0-未开启 1-开启
+     */
+    @TableField("report_approve_msgpush")
+    private Integer reportApproveMsgpush;
+
+    /**
+     * 日报自动审核 0-未开启 1-开启
+     */
+    @TableField("report_auto_approve")
+    private Integer reportAutoApprove;
+
+    /**
+     * 日报自动审核天数
+     */
+    @TableField("report_auto_approve_days")
+    private Integer reportAutoApproveDays;
+
+    /**
+     * 日报填报时长上限,默认12小时
+     */
+    @TableField("max_report_time")
+    private Float maxReportTime;
+
+    /**
+     * 填报工作时长下限
+     */
+    @TableField("min_report_time")
+    private Float minReportTime;
+
+    /**
+     * 是否同步泛微考勤打卡和出差
+     */
+    @TableField("sync_fanwei")
+    private Integer syncFanwei;
+
+    /**
+     * 员工自由选择审核人的方式下的审核层级:默认为2
+     */
+    @TableField("audit_level")
+    private Integer auditLevel;
+
+    /**
+     * 任务列表是否有预估工时功能
+     */
+    @TableField("stage_has_evtime")
+    private Integer stageHasEvtime;
+
+    /**
+     * 无考勤记录无法填报
+     */
+    @TableField("not_allowed_no_attendance")
+    private Integer notAllowedNoAttendance;
+
+    /**
+     * 1为需要同步企业微信请假,0为不需要同步企业微信请假
+     */
+    @TableField("wx_leave")
+    private Integer wxLeave;
+
+    /**
+     * 是否开通【推送工时数据】 0-否 1-是
+     */
+    @TableField("push_report_data")
+    private Integer pushReportData;
+
+    /**
+     * 推送工时数据URL
+     */
+    @TableField("push_report_url")
+    private String pushReportUrl;
+
+    /**
+     * 0-否 1-是
+     */
+    @TableField("restart_task_need_reason")
+    private Integer restartTaskNeedReason;
+
+    /**
+     * 0-否 1-是  子项目是否必填
+     */
+    @TableField("sub_pro_must_fill")
+    private Integer subProMustFill;
+
+    /**
+     * 0-否 1-是  加班时长是否需要校验
+     */
+    @TableField("work_overtime_need_check")
+    private Integer workOvertimeNeedCheck;
+
+    /**
+     * 0-否 1-是  是否开启项目人天校验功能
+     */
+    @TableField("project_man_day")
+    private Integer projectManDay;
+
+    /**
+     * 0-否 1-是  是否开启项目表单自定义
+     */
+    @TableField("project_custom")
+    private Integer projectCustom;
+
+    /**
+     * 待审核提醒时间
+     */
+    @TableField("wait_check_alert_time")
+    private String waitCheckAlertTime;
+
+    /**
+     * 0-否 1-是  是否开启简易费用报销
+     */
+    @TableField("easy_expense")
+    private Integer easyExpense;
+
+    /**
+     * 是否同步AD
+     */
+    @TableField("sync_ad")
+    private Integer syncAd;
+
+    /**
+     * 是否日报审核人变为日报抄送人,当report_audit_type=5时,可以设置该字段为1
+     */
+    @TableField("report_cc")
+    private Integer reportCc;
+
+    /**
+     * 非工作日是否禁止填报
+     */
+    @TableField("not_allowed_on_non_workday")
+    private Integer notAllowedOnNonWorkday;
+
+    /**
+     * 关闭工时填报
+     */
+    @TableField("stop_report")
+    private Integer stopReport;
+
+    /**
+     * 是否启用新的按周填报模式
+     */
+    @TableField("enable_new_weeklyfill")
+    private Integer enableNewWeeklyfill;
+
+    /**
+     * 默认每月1号提醒上个月
+     */
+    @TableField("alert_day")
+    private Integer alertDay;
+
+    /**
+     * 默认每月3号前可补填上个月日报
+     */
+    @TableField("fill_month_on_day")
+    private Integer fillMonthOnDay;
+
+    /**
+     * 同步对接sap系统 0-否 1-是
+     */
+    @TableField("sync_sap")
+    private Integer syncSap;
+
+    /**
+     * 项目超期不可填报
+     */
+    @TableField("not_allowed_expired_project")
+    private Integer notAllowedExpiredProject;
+
+    /**
+     * 按时间段填报时,时间是否可重叠
+     */
+    @TableField("time_can_overlap")
+    private Integer timeCanOverlap;
+
+    /**
+     * 自定义维度是否填报是可多选
+     */
+    @TableField("custom_degree_multiple")
+    private Boolean customDegreeMultiple;
+
+    /**
+     * 任务分组是否必填
+     */
+    @TableField("task_group_required")
+    private Integer taskGroupRequired;
+
+    /**
+     * 任务是否必填 0-否 1-是
+     */
+    @TableField("task_required")
+    private Integer taskRequired;
+
+    /**
+     * 日报填报隐藏阶段项
+     */
+    @TableField("hide_stages")
+    private Integer hideStages;
+
+    /**
+     * 日报填报隐藏任务项
+     */
+    @TableField("hide_task")
+    private Integer hideTask;
+
+    /**
+     * 项目隐藏子项目功能按钮
+     */
+    @TableField("hide_subproject")
+    private Integer hideSubproject;
+
+    /**
+     * 开启日报审批流的本部门负责人由上级部门负责人审核
+     */
+    @TableField("report_audit_flow_enable_super_dept_aduit")
+    private Integer reportAuditFlowEnableSuperDeptAduit;
+
+    /**
+     * 是否开启设置可填报部门 0-否 1-是
+     */
+    @TableField("user_with_multi_dept")
+    private Integer userWithMultiDept;
+
+    /**
+     * 提醒审核日,默认周一
+     */
+    @TableField("alert_check_day")
+    private Integer alertCheckDay;
+
+    /**
+     * 提醒审核的文字消息
+     */
+    @TableField("alert_check_msg")
+    private String alertCheckMsg;
+
+    /**
+     * 导入的日报,按照正常审批来处理,非单独设置的部门直属领导审核
+     */
+    @TableField("import_report_audit_normal")
+    private Integer importReportAuditNormal;
+
+    /**
+     * 日报第二审核人;在reportAuditType5时有效
+     */
+    @TableField("second_auditor")
+    private String secondAuditor;
+
+    /**
+     * 日报第三审核人;在reportAuditType5时有效
+     */
+    @TableField("third_auditor")
+    private String thirdAuditor;
+
+    /**
+     * 工时报告页面,查看时仅显示比例;
+     */
+    @TableField("only_show_percent")
+    private Integer onlyShowPercent;
+
+    /**
+     * 是否校验考勤数据的加班时长
+     */
+    @TableField("verify_card_overtime")
+    private Integer verifyCardOvertime;
+
+    /**
+     * 驳回日报原因是否必填
+     */
+    @TableField("force_reject_reason")
+    private Integer forceRejectReason;
+
+    /**
+     * 任务文件审核 0不启用 1启用
+     */
+    @TableField("task_file_charge")
+    private Integer taskFileCharge;
+
+    /**
+     * 任务预估成本功能是否开启,0-不启用,1-启用
+     */
+    @TableField("task_plan_cost")
+    private Integer taskPlanCost;
+
+    /**
+     * 项目进度判断依据,0-默认字段,1-根据任务工时
+     */
+    @TableField("project_progress_check")
+    private Integer projectProgressCheck;
+
+    /**
+     * 按周审核日报过滤功能,0-不开启,1-开启
+     */
+    @TableField("weekly_charge_filter")
+    private Integer weeklyChargeFilter;
+
+    /**
+     * 对已通过的日报进行撤销操作时是否发送企微消息功能,0-不发送,1-发送
+     */
+    @TableField("report_charge_msg")
+    private Integer reportChargeMsg;
+
+    /**
+     * 项目审核人是自己时自动审核通过
+     */
+    @TableField("auto_project_approve")
+    private Boolean autoProjectApprove;
+
+    /**
+     * 日报定制字段4名称
+     */
+    @TableField("report_extra_field4_name")
+    private String reportExtraField4Name;
+
+    /**
+     * 日报定制字段5名称
+     */
+    @TableField("report_extra_field5_name")
+    private String reportExtraField5Name;
+
+    /**
+     * 审核提醒方式:0-定时提醒,1-实时提醒
+     */
+    @TableField("alert_audit_mode")
+    private Integer alertAuditMode;
+
+    /**
+     * 部门负责人接收抄送提醒
+     */
+    @TableField("cc_dept_manager")
+    private Boolean ccDeptManager;
+
+    /**
+     * 代填不校验考勤
+     */
+    @TableField("not_check_cardtime")
+    private Boolean notCheckCardtime;
+
+    /**
+     * 工时填报隐藏分组
+     */
+    @TableField("hide_group")
+    private Boolean hideGroup;
+
+    /**
+     * 工时填报隐藏工作内容
+     */
+    @TableField("hide_content")
+    private Boolean hideContent;
+
+    /**
+     * 财务分摊二次分配功能
+     */
+    @TableField("finance_twice_assign")
+    private Boolean financeTwiceAssign;
+    
+
+    @TableField(exist = false)
+    private List<User> userList;
+    @TableField(exist = false)
+    private List<TimeAutoExclude> excludeTimeList;
+    @TableField(exist = false)
+    private Integer saasSyncContact;
+
+    @Override
+    protected Serializable pkVal() {
+        return this.companyId;
+    }
+
+}

Разница между файлами не показана из-за своего большого размера
+ 3333 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml~


+ 21 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ReportProjectConstructionMapper.xml~

@@ -0,0 +1,21 @@
+<?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.management.platform.mapper.ReportProjectConstructionMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.management.platform.entity.ReportProjectConstruction">
+        <id column="id" property="id" />
+        <result column="report_id" property="reportId" />
+        <result column="project_id" property="projectId" />
+        <result column="construction_stage_id" property="constructionStageId" />
+        <result column="finish_number" property="finishNumber" />
+        <result column="user_id" property="finishNumber" />
+        <result column="finish_number" property="finishNumber" />
+    </resultMap>
+
+    <!-- 通用查询结果列 -->
+    <sql id="Base_Column_List">
+        id, report_id, project_id, construction_stage_id, finish_number
+    </sql>
+
+</mapper>

+ 490 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/construction/stage_list.vue

@@ -0,0 +1,490 @@
+<template>
+    <section>
+        <!--工具条-->
+        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+            <el-form :inline="true">
+                <el-form-item label="一级工程分类">
+                    <el-select v-model="searchMainCategory" placeholder="选择一级工程分类" style="width: 200px;" @change="handleMainCategoryChange">
+                        <el-option label="配电网架空线路工程" value="配电网架空线路工程"></el-option>
+                        <el-option label="电缆及通道工程" value="电缆及通道工程"></el-option>
+                        <el-option label="拆除工程" value="拆除工程"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="分项工程列表">
+                    <el-select v-model="searchConstructionType" placeholder="选择分项工程" clearable style="width: 200px;">
+                        <el-option 
+                            v-for="item in filteredConstructionMainList" 
+                            :key="item.id" 
+                            :label="item.name" 
+                            :value="item.id">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item>
+                    <el-input v-model="searchName" placeholder="请输入施工名称" clearable style="width: 200px;"></el-input>
+                </el-form-item>
+                <el-form-item style="float: right;">
+                    <el-button type="primary" @click="handleAdd">新增施工环节</el-button>
+                    <el-button type="success" @click="handleManageCategories">管理分项工程</el-button>
+                </el-form-item>
+            </el-form>
+        </el-col>
+
+        <!--列表-->
+        <el-table :data="filteredList" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
+            <el-table-column type="index" width="60" label="序号">
+            </el-table-column>
+            <el-table-column prop="constructionType" label="工程分类" width="200"></el-table-column>
+            <el-table-column prop="mainName" label="分项工程" width="200"></el-table-column>
+            <el-table-column prop="name" label="施工名称"></el-table-column>
+            <el-table-column prop="unit" label="单位" width="150"></el-table-column>
+            <el-table-column prop="percent" label="权重" width="150">
+                <template slot-scope="scope">
+                    {{ scope.row.percent }}%
+                </template>
+            </el-table-column>
+            <el-table-column label="操作" width="200">
+                <template slot-scope="scope">
+                    <el-button size="small" type="primary" @click="handleEdit(scope.row)">编辑</el-button>
+                    <el-button size="small" type="danger" @click="handleDelete(scope.row)">删除</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+
+        <!--新增/编辑界面-->
+        <el-dialog :title="dialogTitle" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" width="500px">
+            <el-form ref="form1" :model="addForm" :rules="rules" label-width="120px">
+                <el-form-item label="一级工程分类" prop="constructionType">
+                    <el-select v-model="addForm.constructionType" placeholder="请选择一级工程分类" style="width: 100%;" @change="handleConstructionTypeChange">
+                        <el-option label="配电网架空线路工程" value="配电网架空线路工程"></el-option>
+                        <el-option label="电缆及通道工程" value="电缆及通道工程"></el-option>
+                        <el-option label="拆除工程" value="拆除工程"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="分项工程" prop="mainId">
+                    <el-select v-model="addForm.mainId" placeholder="请选择分项工程" style="width: 100%;">
+                        <el-option 
+                            v-for="item in filteredAddFormConstructionMainList" 
+                            :key="item.id" 
+                            :label="item.name" 
+                            :value="item.id">
+                        </el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="施工分项名称" prop="name">
+                    <el-input v-model="addForm.name" placeholder="请输入施工分项名称"></el-input>
+                </el-form-item>
+                <el-form-item label="单位" prop="unit">
+                    <el-input v-model="addForm.unit" placeholder="请输入单位"></el-input>
+                </el-form-item>
+                <el-form-item label="权重(%)" prop="percent">
+                    <el-input v-model.number="addForm.percent" placeholder="请输入权重" type="number"></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="addFormVisible = false">取消</el-button>
+                <el-button type="primary" @click="submitForm" :loading="addLoading">保存</el-button>
+            </div>
+        </el-dialog>
+
+        <!--管理分项工程分类界面-->
+        <el-dialog title="管理分项工程分类" :visible.sync="manageCategoriesVisible" :close-on-click-modal="false" width="800px">
+            <div style="margin-bottom: 10px;">
+                <el-button type="primary" size="small" @click="handleAddCategory">新增分类</el-button>
+            </div>
+            <el-table :data="constructionMainList" v-loading="categoryLoading" max-height="400" border>
+                <el-table-column type="index" width="60" label="序号"></el-table-column>
+                <el-table-column prop="constructionType" label="一级工程分类" width="200"></el-table-column>
+                <el-table-column prop="name" label="分项工程名称"></el-table-column>
+                <el-table-column label="操作" width="180">
+                    <template slot-scope="scope">
+                        <el-button size="small" type="primary" @click="handleEditCategory(scope.row)">编辑</el-button>
+                        <el-button size="small" type="danger" @click="handleDeleteCategory(scope.row)">删除</el-button>
+                    </template>
+                </el-table-column>
+            </el-table>
+        </el-dialog>
+
+        <!--新增/编辑分项工程分类界面-->
+        <el-dialog :title="categoryDialogTitle" v-if="categoryFormVisible" :visible.sync="categoryFormVisible" :close-on-click-modal="false" width="500px">
+            <el-form ref="categoryForm" :model="categoryForm" :rules="categoryRules" label-width="140px">
+                <el-form-item label="一级工程分类" prop="constructionType" >
+                    <el-select v-model="categoryForm.constructionType" placeholder="请选择一级工程分类" style="width: 100%;">
+                        <el-option label="配电网架空线路工程" value="配电网架空线路工程"></el-option>
+                        <el-option label="电缆及通道工程" value="电缆及通道工程"></el-option>
+                        <el-option label="拆除工程" value="拆除工程"></el-option>
+                    </el-select>
+                </el-form-item>
+                <el-form-item label="分项工程名称" prop="name">
+                    <el-input v-model="categoryForm.name" placeholder="请输入分项工程名称"></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="categoryFormVisible = false">取消</el-button>
+                <el-button type="primary" @click="submitCategoryForm" :loading="categorySubmitLoading">保存</el-button>
+            </div>
+        </el-dialog>
+
+    </section>
+</template>
+
+<style scoped>
+.toolbar {
+    margin-bottom: 10px;
+}
+</style>
+
+<script>
+    export default {
+        data() {
+            return {
+                searchMainCategory: '配电网架空线路工程',
+                searchConstructionType: '',
+                searchName: '',
+                tableHeight: 0,
+                listLoading: false,
+                list: [],
+                addFormVisible: false,
+                addLoading: false,
+                dialogTitle: "",
+                addForm: {
+                    id: null,
+                    mainId: null,
+                    name: '',
+                    constructionType: '',
+                    unit: '',
+                    percent: null,
+                },
+                rules: {
+                    constructionType: [{ required: true, message: '请选择工程分类', trigger: "change" }],
+                    mainId: [{ required: true, message: '请选择分项工程', trigger: "change" }],
+                    name: [{ required: true, message: '请输入施工分项名称', trigger: "blur" }],
+                    percent: [
+                        { required: true, message: '请输入权重', trigger: "blur" },
+                        { type: 'number', message: '权重必须为数字', trigger: "blur" }
+                    ],
+                },
+                // 分项工程分类管理相关
+                manageCategoriesVisible: false,
+                categoryLoading: false,
+                constructionMainList: [],
+                categoryFormVisible: false,
+                categoryDialogTitle: "",
+                categorySubmitLoading: false,
+                categoryForm: {
+                    id: null,
+                    name: '',
+                    constructionType: '',
+                },
+                categoryRules: {
+                    constructionType: [{ required: true, message: '请选择一级工程分类', trigger: "change" }],
+                    name: [{ required: true, message: '请输入分项工程名称', trigger: "blur" }],
+                }
+            };
+        },
+        computed: {
+            filteredList() {
+                let result = this.list;
+                
+                // 按工程分类筛选
+                if (this.searchConstructionType) {
+                    result = result.filter(item => item.mainId === this.searchConstructionType);
+                }
+                
+                // 按施工名称筛选
+                if (this.searchName) {
+                    result = result.filter(item => item.name && item.name.includes(this.searchName));
+                }
+                
+                return result;
+            },
+            // 根据一级工程分类筛选分项工程列表
+            filteredConstructionMainList() {
+                if (this.searchMainCategory) {
+                    return this.constructionMainList.filter(item => item.constructionType === this.searchMainCategory);
+                }
+                return this.constructionMainList;
+            },
+            // 根据新增/编辑表单中选择的一级工程分类筛选分项工程列表
+            filteredAddFormConstructionMainList() {
+                if (this.addForm.constructionType) {
+                    return this.constructionMainList.filter(item => item.constructionType === this.addForm.constructionType);
+                }
+                return this.constructionMainList;
+            }
+        },
+        methods: {
+            //搜索
+            handleSearch() {
+                // 计算属性会自动更新filteredList
+            },
+
+            //一级工程分类改变时,清空分项工程筛选并重新加载列表
+            handleMainCategoryChange() {
+                this.searchConstructionType = '';
+                this.getList();
+            },
+
+            //新增/编辑表单中一级工程分类改变时,清空分项工程选择
+            handleConstructionTypeChange() {
+                this.addForm.mainId = null;
+            },
+
+            //获取分项工程分类列表
+            getConstructionMainList() {
+                this.http.post('/construction-main/list', {},
+                res => {
+                    if (res.code == "ok") {
+                        this.constructionMainList = res.data || [];
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //显示管理分项工程分类界面
+            handleManageCategories() {
+                this.manageCategoriesVisible = true;
+                this.getConstructionMainList();
+            },
+
+            //显示新增分类界面
+            handleAddCategory() {
+                this.categoryDialogTitle = "新增分项工程分类";
+                this.categoryForm = {
+                    id: null,
+                    name: '',
+                    constructionType: this.searchMainCategory,
+                };
+                this.categoryFormVisible = true;
+            },
+
+            //显示编辑分类界面
+            handleEditCategory(row) {
+                this.categoryDialogTitle = "编辑分项工程分类";
+                this.categoryForm = {
+                    id: row.id,
+                    name: row.name,
+                    constructionType: row.constructionType,
+                };
+                this.categoryFormVisible = true;
+            },
+
+            //提交分类表单
+            submitCategoryForm() {
+                this.$refs.categoryForm.validate(valid => {
+                    if (valid) {
+                        this.categorySubmitLoading = true;
+                        this.http.post('/construction-main/addOrUpdate', this.categoryForm,
+                        res => {
+                            this.categorySubmitLoading = false;
+                            if (res.code == "ok") {
+                                this.$message({
+                                    message: this.categoryForm.id ? '修改成功' : '新增成功',
+                                    type: "success"
+                                });
+                                this.categoryFormVisible = false;
+                                this.getConstructionMainList();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: "error"
+                                });
+                            }
+                        },
+                        error => {
+                            this.categorySubmitLoading = false;
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                        });
+                    }
+                });
+            },
+
+            //删除分类
+            handleDeleteCategory(row) {
+                this.$confirm('确定要删除该分项工程分类吗?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    this.categoryLoading = true;
+                    this.http.post('/construction-main/delete', { id: row.id },
+                    res => {
+                        this.categoryLoading = false;
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: '删除成功',
+                                type: "success"
+                            });
+                            this.getConstructionMainList();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.categoryLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+                }).catch(() => {
+                    // 取消删除
+                });
+            },
+
+            //获取列表
+            getList() {
+                this.listLoading = true;
+                this.http.post('/construction-stage/list', {
+                    constructionType: this.searchMainCategory
+                },
+                res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.list = res.data || [];
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
+
+            //显示新增界面
+            handleAdd() {
+                this.dialogTitle = "新增分项工程";
+                this.addForm = {
+                    id: null,
+                    mainId: null,
+                    name: '',
+                    constructionType: this.searchMainCategory,
+                    unit: '',
+                    percent: null,
+                };
+                this.addFormVisible = true;
+            },
+
+            //显示编辑界面
+            handleEdit(row) {
+                this.dialogTitle = "编辑分项工程";
+                this.addForm = {
+                    id: row.id,
+                    mainId: row.mainId,
+                    name: row.name,
+                    constructionType: row.constructionType,
+                    unit: row.unit,
+                    percent: row.percent,
+                };
+                this.addFormVisible = true;
+            },
+
+            //提交表单
+            submitForm() {
+                this.$refs.form1.validate(valid => {
+                    if (valid) {
+                        this.addLoading = true;
+                        this.http.post('/construction-stage/addOrUpdate', this.addForm,
+                        res => {
+                            this.addLoading = false;
+                            if (res.code == "ok") {
+                                this.$message({
+                                    message: this.addForm.id ? '修改成功' : '新增成功',
+                                    type: "success"
+                                });
+                                this.addFormVisible = false;
+                                this.getList();
+                            } else {
+                                this.$message({
+                                    message: res.msg,
+                                    type: "error"
+                                });
+                            }
+                        },
+                        error => {
+                            this.addLoading = false;
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                        });
+                    }
+                });
+            },
+
+            //删除
+            handleDelete(row) {
+                this.$confirm('确定要删除该分项工程吗?', '提示', {
+                    confirmButtonText: '确定',
+                    cancelButtonText: '取消',
+                    type: 'warning'
+                }).then(() => {
+                    this.listLoading = true;
+                    this.http.post('/construction-stage/delete', { id: row.id },
+                    res => {
+                        this.listLoading = false;
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: '删除成功',
+                                type: "success"
+                            });
+                            this.getList();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.listLoading = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+                }).catch(() => {
+                    // 取消删除
+                });
+            },
+        },
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 115;
+            const that = this;
+            window.onresize = function temp() {
+                that.tableHeight = window.innerHeight - 115;
+            };
+        },
+        mounted() {
+            this.getList();
+            this.getConstructionMainList();
+        }
+    };
+</script>
+
+<style lang="scss" scoped>
+</style>