wangggziwen 23 órája
szülő
commit
9f25a9f472

+ 4 - 0
master/src/main/java/com/ruoyi/config/ActivitiConfig.java

@@ -185,6 +185,10 @@ public class ActivitiConfig {
         Resource pssrMgr = resourceLoader.getResource("classpath:/processes/pssr/pssrMgrConfirm.bpmn"); //加载流程图资源文件
         pssrMgrDb.enableDuplicateFiltering().addInputStream(pssrMgr.getFilename(), pssrMgr.getInputStream()).name("PSSR经理确认流程").deploy();//按流程id部署
 
+        DeploymentBuilder deploymentBuilder18 = repositoryService().createDeployment();
+        Resource spec18 = resourceLoader.getResource("classpath:/processes/eoegsai/eoegSaiApply.bpmn"); //加载流程图资源文件
+        deploymentBuilder18.enableDuplicateFiltering().addInputStream(spec18.getFilename(), spec18.getInputStream()).name("EOEG_SAI开项申请流程").deploy();//按流程id部署
+
     }
 }
 

+ 2 - 2
master/src/main/java/com/ruoyi/project/common/CommonController.java

@@ -116,10 +116,10 @@ public class CommonController extends BaseController
             downloadname = "SAI开项管理导入模板.xlsx";
             url = "static/template/production/saiApply.xlsx";
         } else if( type.equals("eoegsai") ) {
-            downloadname = "EOEG SAI检查管理导入模板.xlsx";
+            downloadname = "EOEG_SAI检查管理导入模板.xlsx";
             url = "static/template/production/eoegSai.xlsx";
         } else if( type.equals("eoegSaiApply") ) {
-            downloadname = "EOEG SAI开项管理导入模板.xlsx";
+            downloadname = "EOEG_SAI开项管理导入模板.xlsx";
             url = "static/template/production/eoegSaiApply.xlsx";
         } else if( type.equals("rcaudit") ) {
             downloadname = "RC审计助手导入模板.xlsx";

+ 18 - 0
master/src/main/java/com/ruoyi/project/ehs/controller/TApproveDangerController.java

@@ -31,7 +31,9 @@ import com.ruoyi.project.listener.EndSucessListener;
 import com.ruoyi.project.listener.ExecutorTaskCreateListener;
 import com.ruoyi.project.listener.RecorderTaskCreateListener;
 import com.ruoyi.project.listener.VerificationTaskCreateListener;
+import com.ruoyi.project.production.domain.TEoegSaiApply;
 import com.ruoyi.project.production.domain.TSaiApply;
+import com.ruoyi.project.production.service.ITEoegSaiApplyService;
 import com.ruoyi.project.production.service.ITSaiApplyService;
 import com.ruoyi.project.pssr.domain.TPssrAboveall;
 import com.ruoyi.project.pssr.domain.TPssrApprove;
@@ -137,6 +139,8 @@ public class TApproveDangerController extends BaseController {
     @Autowired
     private ITSaiApplyService tSaiApplyService;
     @Autowired
+    private ITEoegSaiApplyService tEoegSaiApplyService;
+    @Autowired
     private ITSpecWeekcheckService tSpecWeekcheckService;
     @Autowired
     private ITTsApproveService tTsApproveService;
@@ -337,6 +341,10 @@ public class TApproveDangerController extends BaseController {
                         TSaiApply approve = tSaiApplyService.selectTSaiApplyById(Long.parseLong(pi.getBusinessKey()));
                         devProcess.setApproveObject(approve);
                         devProcess.setApNo(approve.getApNo());
+                    } else if (pi.getProcessDefinitionName().equals("EOEG_SAI开项申请流程")) {
+                        TEoegSaiApply approve = tEoegSaiApplyService.selectTSaiApplyById(Long.parseLong(pi.getBusinessKey()));
+                        devProcess.setApproveObject(approve);
+                        devProcess.setApNo(approve.getApNo());
                     } else if (pi.getProcessDefinitionName().equals("每周安全排查报告")) {
                         TSpecWeekcheck t = tSpecWeekcheckService.selectTSpecWeekcheckById(Long.parseLong(pi.getBusinessKey()));
                         SysUser user = sysUserService.selectUserById(Long.valueOf(t.getCreaterCode()));
@@ -496,6 +504,10 @@ public class TApproveDangerController extends BaseController {
                         TSaiApply approve = tSaiApplyService.selectTSaiApplyById(Long.parseLong(pi.getBusinessKey()));
                         devTask.setApproveObject(approve);
                         devTask.setApNo(approve.getApNo());
+                    } else if (pi.getProcessDefinitionName().equals("EOEG_SAI开项申请流程")) {
+                        TEoegSaiApply approve = tEoegSaiApplyService.selectTSaiApplyById(Long.parseLong(pi.getBusinessKey()));
+                        devTask.setApproveObject(approve);
+                        devTask.setApNo(approve.getApNo());
                     } else if (pi.getProcessDefinitionName().equals("每周安全排查报告")) {
                         TSpecWeekcheck t = tSpecWeekcheckService.selectTSpecWeekcheckById(Long.parseLong(pi.getBusinessKey()));
                         devTask.setApproveObject(t);
@@ -648,6 +660,12 @@ public class TApproveDangerController extends BaseController {
                     devProcess.setApNo(approve.getApNo());
                     devProcess.setApName(user.getNickName());
                     devProcess.setApproveObject(approve);
+                } else if (pi.getProcessDefinitionName().equals("EOEG_SAI开项申请流程")) {
+                    TEoegSaiApply approve = tEoegSaiApplyService.selectTSaiApplyById(Long.parseLong(pi.getBusinessKey()));
+                    SysUser user = sysUserService.selectUserById(Long.valueOf(approve.getCreateBy()));
+                    devProcess.setApNo(approve.getApNo());
+                    devProcess.setApName(user.getNickName());
+                    devProcess.setApproveObject(approve);
                 } else if (pi.getProcessDefinitionName().equals("每周安全排查报告")) {
                     TSpecWeekcheck t = tSpecWeekcheckService.selectTSpecWeekcheckById(Long.parseLong(pi.getBusinessKey()));
                     SysUser user = sysUserService.selectUserById(Long.valueOf(t.getCreaterCode()));

+ 5 - 4
master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiApplyController.java

@@ -26,6 +26,7 @@ import com.ruoyi.project.approve.damain.DevTask;
 import com.ruoyi.project.plant.domain.TStaffmgr;
 import com.ruoyi.project.plant.service.ITStaffmgrService;
 import com.ruoyi.project.process.domain.TMoc;
+import com.ruoyi.project.production.controller.vo.EoegSaiApplyExportVO;
 import com.ruoyi.project.production.controller.vo.EoegSaiApplyQueryVO;
 import com.ruoyi.project.production.controller.vo.SaiApplyExportVO;
 import com.ruoyi.project.production.controller.vo.SaiApplyQueryVO;
@@ -309,7 +310,7 @@ public class TEoegSaiApplyController extends BaseController
         // 实体类集合
         List<TEoegSaiApply> list = tSaiApplyService.selectTSaiApplyList(tSaiApply);
         // 导出VO集合
-        List<SaiApplyExportVO> exportVOList = new ArrayList<>();
+        List<EoegSaiApplyExportVO> exportVOList = new ArrayList<>();
         // 字典查询
         List<SysDictData> saiApplyStatusDict = iSysDictTypeService.selectDictDataByType("SAI_APPLY_STATUS");
         List<SysDictData> teamDivideDict = iSysDictTypeService.selectDictDataByType("TEAM_DIVIDE");
@@ -321,7 +322,7 @@ public class TEoegSaiApplyController extends BaseController
         for (TEoegSaiApply entity : list) {
             no++;
             // 复制属性
-            SaiApplyExportVO vo = new SaiApplyExportVO();
+            EoegSaiApplyExportVO vo = new EoegSaiApplyExportVO();
             vo.setNo(no + "");
             vo.setPlantName(entity.getApplicantDeptName());
             vo.setStaffName(entity.getApplicantName());
@@ -383,8 +384,8 @@ public class TEoegSaiApplyController extends BaseController
             }
             exportVOList.add(vo);
         }
-        ExcelUtil<SaiApplyExportVO> util = new ExcelUtil<SaiApplyExportVO>(SaiApplyExportVO.class);
-        return util.exportExcel(exportVOList, "EOEG SAI开项管理数据");
+        ExcelUtil<EoegSaiApplyExportVO> util = new ExcelUtil<EoegSaiApplyExportVO>(EoegSaiApplyExportVO.class);
+        return util.exportExcel(exportVOList, "EOEG_SAI开项管理数据");
     }
 
     /**

+ 1 - 1
master/src/main/java/com/ruoyi/project/production/controller/TEoegSaiController.java

@@ -333,7 +333,7 @@ public class TEoegSaiController extends BaseController
             saiExportVOList.add(saiExportVO);
         }
         ExcelUtil<EoegSaiExportVO> util = new ExcelUtil<EoegSaiExportVO>(EoegSaiExportVO.class);
-        return util.exportExcel(saiExportVOList, "SAI检查数据");
+        return util.exportExcel(saiExportVOList, "EOEG_SAI检查数据");
     }
 
     /**

+ 11 - 34
master/src/main/java/com/ruoyi/project/production/controller/vo/EoegSaiApplyExportVO.java

@@ -16,6 +16,9 @@ public class EoegSaiApplyExportVO extends BaseEntity
     @Excel(name = "序号", width = 8)
     private String no;
 
+    @Excel(name = "SAI类型")
+    private String saiType;
+
     @Excel(name = "装置")
     private String plantName;
 
@@ -28,12 +31,6 @@ public class EoegSaiApplyExportVO extends BaseEntity
     @Excel(name = "员工号")
     private String staffId;
 
-//    @Excel(name = "月份", width = 8)
-    private String month;
-
-//    @Excel(name = "日期", width = 8)
-    private String date;
-
     /** 登记时间 */
     @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
     @Excel(name = "登记时间", width = 30, dateFormat = "yyyy-MM-dd")
@@ -69,10 +66,6 @@ public class EoegSaiApplyExportVO extends BaseEntity
     @Excel(name = "实际完成日期", width = 30, dateFormat = "yyyy-MM-dd")
     private Date actualFinishDate;
 
-    /** 是否录入开项系统 */
-    @Excel(name = "是否录入开项系统")
-    private String isRecorded;
-
     /** 验收人 */
     @Excel(name = "验证人")
     private String inspectors;
@@ -101,6 +94,14 @@ public class EoegSaiApplyExportVO extends BaseEntity
     @Excel(name = "SAI类别")
     private String category;
 
+    public String getSaiType() {
+        return saiType;
+    }
+
+    public void setSaiType(String saiType) {
+        this.saiType = saiType;
+    }
+
     public Date getApplyDate() {
         return applyDate;
     }
@@ -165,22 +166,6 @@ public class EoegSaiApplyExportVO extends BaseEntity
         this.staffId = staffId;
     }
 
-    public String getMonth() {
-        return month;
-    }
-
-    public void setMonth(String month) {
-        this.month = month;
-    }
-
-    public String getDate() {
-        return date;
-    }
-
-    public void setDate(String date) {
-        this.date = date;
-    }
-
     public String getUnsafeAction() {
         return unsafeAction;
     }
@@ -245,14 +230,6 @@ public class EoegSaiApplyExportVO extends BaseEntity
         this.actualFinishDate = actualFinishDate;
     }
 
-    public String getIsRecorded() {
-        return isRecorded;
-    }
-
-    public void setIsRecorded(String isRecorded) {
-        this.isRecorded = isRecorded;
-    }
-
     public String getInspectors() {
         return inspectors;
     }

+ 5 - 3
master/src/main/resources/mybatis/production/TEoegSaiApplyMapper.xml

@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="TEoegSaiApply" id="TEoegSaiApplyResult">
         <result property="saiApplyId"    column="sai_apply_id"    />
+        <result property="saiType"    column="sai_type"    />
         <result property="delFlag"    column="del_flag"    />
         <result property="createBy"    column="create_by"    />
         <result property="createTime"    column="create_time"    />
@@ -64,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         d.applicant, d.assessor, d.executor, d.inspectors, d.applicant_dept, d.applicant_team, d.description,
         d.unsafe_status, d.unsafe_action, d.apply_date, d.task_id, d.task_name,d.remarks, d.ve_item_other,
         d.handler, d.estimate_finish_date, d.actual_finish_date, d.reaction, d.ve_result,
-        d.sai_level, d.category, d.remarks_assess, d.remarks_execute, d.work_area
+        d.sai_level, d.category, d.remarks_assess, d.remarks_execute, d.work_area, d.sai_type
         from t_eoeg_sai_apply d
         left join sys_dept s on s.dept_id = d.dept_id
     </sql>
@@ -150,6 +151,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </selectKey>
         insert into t_eoeg_sai_apply
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="saiType != null">sai_type,</if>
             <if test="saiApplyId != null">sai_apply_id,</if>
             <if test="delFlag != null">del_flag,</if>
             <if test="createBy != null">create_by,</if>
@@ -186,6 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="workArea != null">work_area,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="saiType != null">#{saiType},</if>
             <if test="saiApplyId != null">#{saiApplyId},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="createBy != null">#{createBy},</if>
@@ -226,6 +229,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateTSaiApply" parameterType="TEoegSaiApply">
         update t_eoeg_sai_apply
         <trim prefix="SET" suffixOverrides=",">
+            <if test="saiType != null">sai_type = #{saiType},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="createBy != null">create_by = #{createBy},</if>
             <if test="createTime != null">create_time = #{createTime},</if>
@@ -254,9 +258,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="handler != null">handler = #{handler},</if>
             <if test="estimateFinishDate != null">estimate_finish_date = #{estimateFinishDate},</if>
             <if test="actualFinishDate != null">actual_finish_date = #{actualFinishDate},</if>
-            <if test="recordNo == null">record_no = null,</if>
             <if test="reaction != null">reaction = #{reaction},</if>
-            <if test="veItems == null">ve_items = null,</if>
             <if test="veResult != null">ve_result = #{veResult},</if>
             <if test="remarks != null">remarks = #{remarks},</if>
             <if test="veItemOther != null">ve_item_other = #{veItemOther},</if>

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

@@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select d.id, d.approve_id, d.file_name, d.file_url, d.create_time, d.file_type from t_eoeg_sai_approve_file d
     </sql>
 
-    <select id="selectTEoegSaiApproveFileList" parameterType="TEoegSaiApproveFile" resultMap="TEoegSaiApproveFileResult">
+    <select id="selectTSaiApproveFileList" parameterType="TEoegSaiApproveFile" resultMap="TEoegSaiApproveFileResult">
         <include refid="selectTEoegSaiApproveFileVo"/>
         <where>  
             <if test="approveId != null "> and approve_id = #{approveId}</if>
@@ -28,12 +28,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </where>
     </select>
     
-    <select id="selectTEoegSaiApproveFileById" parameterType="Long" resultMap="TEoegSaiApproveFileResult">
+    <select id="selectTSaiApproveFileById" parameterType="Long" resultMap="TEoegSaiApproveFileResult">
         <include refid="selectTEoegSaiApproveFileVo"/>
         where id = #{id}
     </select>
         
-    <insert id="insertTEoegSaiApproveFile" parameterType="TEoegSaiApproveFile">
+    <insert id="insertTSaiApproveFile" parameterType="TEoegSaiApproveFile">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">
             SELECT seq_t_eoeg_sai_approve_file.NEXTVAL as id FROM DUAL
         </selectKey>
@@ -56,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
          </trim>
     </insert>
 
-    <update id="updateTEoegSaiApproveFile" parameterType="TEoegSaiApproveFile">
+    <update id="updateTSaiApproveFile" parameterType="TEoegSaiApproveFile">
         update t_eoeg_sai_approve_file
         <trim prefix="SET" suffixOverrides=",">
             <if test="approveId != null">approve_id = #{approveId},</if>
@@ -68,11 +68,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         where id = #{id}
     </update>
 
-    <update id="deleteTEoegSaiApproveFileById" parameterType="Long">
+    <update id="deleteTSaiApproveFileById" parameterType="Long">
         delete from  t_eoeg_sai_approve_file where id = #{id}
     </update>
 
-    <update id="deleteTEoegSaiApproveFileByIds" parameterType="String">
+    <update id="deleteTSaiApproveFileByIds" parameterType="String">
         delete from t_eoeg_sai_approve_file where id in
         <foreach item="id" collection="array" open="(" separator="," close=")">
             #{id}

+ 91 - 0
master/src/main/resources/processes/eoegsai/eoegSaiApply.bpmn

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
+  <process id="eoegSaiApplyProcess" name="EOEG_SAI开项申请流程" isExecutable="true">
+    <startEvent id="startevent" name="Start"></startEvent>
+    <userTask id="assessTask" name="评估" activiti:candidateUsers="#{assessor}"></userTask>
+    <userTask id="executeTask" name="执行" activiti:assignee="#{executor}"></userTask>
+    <userTask id="inspectTask" name="验收"></userTask>
+    <sequenceFlow id="flow5" name="通过" sourceRef="executeTask" targetRef="inspectTask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
+    </sequenceFlow>
+    <endEvent id="endevent1" name="End"></endEvent>
+    <endEvent id="endevent2" name="End"></endEvent>
+    <sequenceFlow id="flow1" sourceRef="startevent" targetRef="assessTask"></sequenceFlow>
+    <sequenceFlow id="flow9" name="通过" sourceRef="assessTask" targetRef="executeTask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow10" name="中止" sourceRef="assessTask" targetRef="endevent2">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 0}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow11" name="通过" sourceRef="inspectTask" targetRef="endevent1">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 1}]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow12" name="驳回" sourceRef="inspectTask" targetRef="executeTask">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${condition == 2}]]></conditionExpression>
+    </sequenceFlow>
+  </process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_eoegSaiApplyProcess">
+    <bpmndi:BPMNPlane bpmnElement="eoegSaiApplyProcess" id="BPMNPlane_eoegSaiApplyProcess">
+      <bpmndi:BPMNShape bpmnElement="startevent" id="BPMNShape_startevent">
+        <omgdc:Bounds height="35.0" width="35.0" x="70.0" y="112.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="assessTask" id="BPMNShape_assessTask">
+        <omgdc:Bounds height="55.0" width="105.0" x="154.0" y="102.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="executeTask" id="BPMNShape_executeTask">
+        <omgdc:Bounds height="55.0" width="105.0" x="314.0" y="104.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="inspectTask" id="BPMNShape_inspectTask">
+        <omgdc:Bounds height="55.0" width="105.0" x="490.0" y="102.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
+        <omgdc:Bounds height="35.0" width="35.0" x="670.0" y="112.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
+        <omgdc:Bounds height="35.0" width="35.0" x="189.0" y="31.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
+        <omgdi:waypoint x="419.0" y="131.0"></omgdi:waypoint>
+        <omgdi:waypoint x="490.0" y="129.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="14.0" width="24.0" x="419.0" y="131.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
+        <omgdi:waypoint x="105.0" y="129.0"></omgdi:waypoint>
+        <omgdi:waypoint x="154.0" y="129.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
+        <omgdi:waypoint x="259.0" y="129.0"></omgdi:waypoint>
+        <omgdi:waypoint x="314.0" y="131.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="14.0" width="24.0" x="259.0" y="129.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow10" id="BPMNEdge_flow10">
+        <omgdi:waypoint x="206.0" y="102.0"></omgdi:waypoint>
+        <omgdi:waypoint x="206.0" y="66.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="14.0" width="24.0" x="206.0" y="86.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow11" id="BPMNEdge_flow11">
+        <omgdi:waypoint x="595.0" y="129.0"></omgdi:waypoint>
+        <omgdi:waypoint x="670.0" y="129.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="14.0" width="24.0" x="595.0" y="129.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
+        <omgdi:waypoint x="542.0" y="157.0"></omgdi:waypoint>
+        <omgdi:waypoint x="542.0" y="214.0"></omgdi:waypoint>
+        <omgdi:waypoint x="455.0" y="214.0"></omgdi:waypoint>
+        <omgdi:waypoint x="366.0" y="214.0"></omgdi:waypoint>
+        <omgdi:waypoint x="366.0" y="159.0"></omgdi:waypoint>
+        <bpmndi:BPMNLabel>
+          <omgdc:Bounds height="14.0" width="24.0" x="542.0" y="157.0"></omgdc:Bounds>
+        </bpmndi:BPMNLabel>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</definitions>

+ 1408 - 0
ui/src/views/approve/approveDetail/eoeg-sai-apply-detail.vue

@@ -0,0 +1,1408 @@
+<template>
+  <el-dialog  :close-on-click-modal="false"
+    :title="!this.taskForm.taskId == '' ? $t('EOEG_SAI开项管理申请单处理') : $t('EOEG_SAI开项管理申请单详情')"
+
+    :visible.sync="visible"
+    :append-to-body="true"
+    width="60%">
+    <!-- EOEG SAI开项管理详细 -->
+    <el-form ref="form" :model="dataForm" :rules="rules" label-width="0px">
+      <div id="apply-div">
+        <h4>申请详情</h4>
+        <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="登记人部门">
+            <el-form-item prop="applicantDept">
+              <el-select
+                disabled
+                v-model="dataForm.applicantDept"
+                placeholder="请选择部门">
+                <el-option
+                  v-for="dict in applicantDeptOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记人班组">
+            <el-form-item prop="applicantTeam">
+              <el-select
+                disabled
+                v-model="dataForm.applicantTeam"
+                placeholder="请选择班组">
+                <el-option
+                  v-for="dict in applicantTeamOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记人">
+            <el-form-item prop="applicant">
+              <el-select
+                disabled
+                v-model="dataForm.applicant"
+                placeholder="请选择登记人">
+                <el-option
+                  v-for="dict in applicantOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="问题描述" :span="3">
+            <el-form-item prop="description">
+              <el-input :disabled="applyDisabled" v-model="dataForm.description" placeholder="请输入问题描述" type="textarea" :rows="3"/>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI级别" :span="1">
+          <el-form-item prop="saiLevel">
+              <el-select v-model="dataForm.saiLevel" placeholder="请选择SAI级别" :disabled="applyDisabled">
+                <el-option key="1" label="1" value="1"></el-option>
+                <el-option key="2" label="2" value="2"></el-option>
+                <el-option key="3" label="3" value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI类别" :span="1">
+            <el-form-item prop="category">
+              <el-select
+                filterable
+                clearable
+                v-model="dataForm.category"
+                placeholder="请选择SAI类别"
+                :disabled="applyDisabled">
+                <el-option
+                  v-for="dict in saiCategoryOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="片区" :span="1">
+            <el-form-item prop="workArea">
+              <el-select
+                filterable
+                clearable
+                v-model="dataForm.workArea"
+                placeholder="请选择片区"
+                :disabled="applyDisabled">
+                <el-option
+                  v-for="dict in workAreaList"
+                  :key="dict"
+                  :label="dict"
+                  :value="dict"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="附件" :span="3">
+            <el-table :data="doc.commonfileListApply" border>
+              <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+                <template slot-scope="scope">
+                  <a  class="link-type"  @click="handleDownload(scope.row)">
+                    <span>{{ scope.row.fileName }}</span>
+                  </a>
+                </template>
+              </el-table-column>
+              <!--<el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />-->
+              <!--<el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>-->
+              <!--<el-table-column :label="$t('上传时间')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120"/>-->
+              <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')
+                 ||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')
+                 ||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')
+                 ||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')
+                 ||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')
+                 ||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSee(scope.row)"
+                  > {{ $t('预览') }}</el-button>
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSeePPT(scope.row)"
+                  > {{ $t('ppt预览') }}</el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-download"
+                    @click="handleDownload(scope.row)"
+                  >{{ $t('下载') }}</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-descriptions-item>
+          <el-descriptions-item label="隐患" :span="3">
+            <el-radio v-model="unsafeChoice" label="1" style="margin-right: 10px;" :disabled="applyDisabled" @change="handleUnsafeChoiceChange">不安全状态</el-radio>
+            <el-form-item prop="unsafeStatus" style="display: inline-block;">
+              <el-select :disabled="applyDisabled" v-model="dataForm.unsafeStatus" placeholder="请选择不安全状态" style="margin-right: 20px;" clearable>
+                <el-option
+                  v-for="dict in unsafeStatusOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+            <el-radio v-model="unsafeChoice" label="2" style="margin-right: 10px;" :disabled="applyDisabled" @change="handleUnsafeChoiceChange">不安全行为</el-radio>
+            <el-form-item prop="unsafeAction" style="display: inline-block;">
+              <el-select :disabled="applyDisabled" v-model="dataForm.unsafeAction" placeholder="请选择不安全行为" clearable>
+                <el-option
+                  v-for="dict in unsafeActionOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="登记时间">
+            <el-form-item prop="applyDate">
+              <el-date-picker
+                disabled
+                clearable
+                size="small"
+                style="width: 200px"
+                v-model="dataForm.applyDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="选择登记时间">
+              </el-date-picker>
+            </el-form-item>
+          </el-descriptions-item>
+        </el-descriptions>
+      </div>
+      <div id="assess-div" v-if="showAssess">
+        <h4>评估详情</h4>
+        <el-descriptions title="" :column="2" border>
+          <el-descriptions-item label="预计完成时间" :span="2">
+            <el-form-item prop="estimateFinishDate">
+              <el-date-picker
+                :disabled="assessDisabled"
+                clearable
+                size="small"
+                style="width: 200px"
+                v-model="dataForm.estimateFinishDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                placeholder="选择预计完成时间">
+              </el-date-picker>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="是否录入开项系统">
+            <el-form-item prop="isRecorded">
+              <el-radio :disabled="assessDisabled" v-model="dataForm.isRecorded" label="1" @change="handleIsRecordedChange">是</el-radio>
+              <el-radio :disabled="assessDisabled" v-model="dataForm.isRecorded" label="0" @change="handleIsRecordedChange">否</el-radio>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="开项编号">
+            <el-form-item prop="recordNo">
+              <el-input v-model="dataForm.recordNo" placeholder="请输入开项编号" :disabled="recordNoDisabled" style="width: 200px;"/>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="采取的措施" :span="2">
+            <el-form-item prop="reaction">
+              <el-input :disabled="assessDisabled" v-model="dataForm.reaction" placeholder="请输入采取的措施" type="textarea" :rows="3"/>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="整改负责人">
+            <el-form-item prop="executor">
+              <el-select
+                filterable
+                :disabled="assessDisabled"
+                clearable
+                v-model="dataForm.executor"
+                placeholder="请选择整改负责人">
+                <el-option
+                  v-for="dict in executorOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="验证人">
+            <el-form-item prop="inspector1" style="display: inline-block;">
+              <el-input v-model="inspector1Name" placeholder="" disabled style="width: 180px; margin-right: 10px;"/>
+              <!--<el-select-->
+                <!--filterable-->
+                <!--:disabled="assessDisabled"-->
+                <!--clearable-->
+                <!--v-model="inspector1"-->
+                <!--placeholder="请选择验证人"-->
+                <!--style="margin-right: 10px;">-->
+                <!--<el-option-->
+                  <!--v-for="dict in applicantOptions"-->
+                  <!--:key="dict.dictValue"-->
+                  <!--:label="dict.dictLabel"-->
+                  <!--:value="dict.dictValue"-->
+                <!--&gt;</el-option>-->
+              <!--</el-select>-->
+            </el-form-item>
+            <el-form-item prop="inspector2" style="display: inline-block;">
+              <el-select
+                filterable
+                :disabled="assessDisabled"
+                clearable
+                v-model="inspector2"
+                placeholder="请选择验证人">
+                <el-option
+                  v-for="dict in inspectorOptions"
+                  :key="dict.dictValue"
+                  :label="dict.dictLabel"
+                  :value="dict.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="是否需要VE验证" :span="2">
+            <el-form-item prop="needVe">
+              <el-radio :disabled="assessDisabled" v-model="dataForm.needVe" label="1" @change="handleNeedVeChange">是</el-radio>
+              <el-radio :disabled="assessDisabled" v-model="dataForm.needVe" label="0" @change="handleNeedVeChange">否</el-radio>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="VE验证条款" :span="2">
+            <el-form-item prop="veItemsList">
+              <el-checkbox-group v-model="veItemsList" :disabled="veItemsDisabled">
+                <el-checkbox label="Level3、Level4的时间纠正措施"></el-checkbox>
+                <el-checkbox label="HIRA的补充措施"></el-checkbox>
+                <el-checkbox label="整改措施为程序的制定、更新"></el-checkbox>
+                <el-checkbox label="整改措施有关培训"></el-checkbox>
+                <el-checkbox label="整改措施为增加新设备、设施、部件,或对设备、设施进行改造"></el-checkbox><br/>
+                <el-checkbox label="其它" @change="handleVeItemOtherVeChange"></el-checkbox>
+                <el-form-item prop="veItemOther" style="display: inline-block;">
+                  <el-input v-model="dataForm.veItemOther" placeholder="请输入" :disabled="veItemOtherDisabled" style="display: inline-block; width: 200px; margin-left: 10px;"/>
+                </el-form-item>
+              </el-checkbox-group>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="备注" :span="3">
+            <el-form-item prop="remarksAssess">
+              <el-input :disabled="assessDisabled" v-model="dataForm.remarksAssess" placeholder="请输入备注" type="textarea" :rows="3"/>
+            </el-form-item>
+          </el-descriptions-item>
+        </el-descriptions>
+      </div>
+      <div id="execute-div" v-if="showExecute">
+        <h4>执行详情</h4>
+        <el-descriptions title="" border :column="1">
+          <el-descriptions-item label="附件">
+            <span v-if="!executeDisabled">
+              <el-upload
+                ref="doc"
+                :limit="50"
+                :headers="doc.headers"
+                :action="doc.url + '?pType=saiExecute&pId=' + doc.pId"
+                :disabled="doc.isUploading"
+                :on-progress="handleFileDocProgress"
+                :on-success="handleFileDocSuccess"
+                :auto-upload="true"
+                drag
+              >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">
+                {{ $t('将文件拖到此处,或') }}
+                <em>{{ $t('点击上传') }}</em>
+              </div>
+            </el-upload>
+            </span>
+            <el-table :data="doc.commonfileListExecute" border>
+              <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+                <template slot-scope="scope">
+                  <a  class="link-type"  @click="handleDownload(scope.row)">
+                    <span>{{ scope.row.fileName }}</span>
+                  </a>
+                </template>
+              </el-table-column>
+              <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+              <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+              <el-table-column :label="$t('上传时间')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120"/>
+              <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')
+                 ||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')
+                 ||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')
+                 ||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')
+                 ||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')
+                 ||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSee(scope.row)"
+                  > {{ $t('预览') }}</el-button>
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSeePPT(scope.row)"
+                  > {{ $t('ppt预览') }}</el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-download"
+                    @click="handleDownload(scope.row)"
+                  >{{ $t('下载') }}</el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-delete"
+                    @click="handleDeleteDoc(scope.row)"
+                    v-if="!executeDisabled"
+                  >{{ $t('删除') }}</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-descriptions-item>
+          <el-descriptions-item label="备注" :span="3">
+            <el-form-item prop="remarksExecute">
+              <el-input :disabled="executeDisabled" v-model="dataForm.remarksExecute" placeholder="请输入备注" type="textarea" :rows="3"/>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="驳回历史">
+            <el-table :data="rejectList" border v-loading="historyLoading" style="width: 100%;">
+              <el-table-column prop="result" header-align="center" align="center"
+                               :label="$t('验证结果')"></el-table-column>
+              <el-table-column prop="comment" header-align="center" align="center"
+                               :label="$t('备注')"></el-table-column>
+              <el-table-column prop="userName" header-align="center" align="center" :label="$t('验证人')"></el-table-column>
+              <el-table-column prop="taskEndTime" header-align="center" align="center"
+                               :label="$t('提交日期')"></el-table-column>
+            </el-table>
+          </el-descriptions-item>
+        </el-descriptions>
+      </div>
+      <div id="inspect-div" v-if="showInspect">
+        <h4>验收详情</h4>
+        <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="VC/VE验证成果" :span="3">
+            <el-form-item prop="veResult">
+              <el-radio :disabled="inspectDisabled" v-model="dataForm.veResult" label="1">合格</el-radio>
+              <el-radio :disabled="inspectDisabled" v-model="dataForm.veResult" label="0">不合格</el-radio>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="备注" :span="3">
+            <el-form-item prop="remarks">
+              <el-input :disabled="inspectDisabled" v-model="dataForm.remarks" placeholder="请输入备注" type="textarea" :rows="3"/>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="附件" :span="3">
+            <span v-if="!inspectDisabled">
+              <el-upload
+                ref="doc"
+                :limit="50"
+                :headers="doc.headers"
+                :action="doc.url + '?pType=saiInspect&pId=' + doc.pId"
+                :disabled="doc.isUploading"
+                :on-progress="handleFileDocProgress"
+                :on-success="handleFileDocSuccess"
+                :auto-upload="true"
+                drag
+              >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">
+                {{ $t('将文件拖到此处,或') }}
+                <em>{{ $t('点击上传') }}</em>
+              </div>
+            </el-upload>
+            </span>
+            <el-table :data="doc.commonfileListInspect" border>
+              <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+                <template slot-scope="scope">
+                  <a  class="link-type"  @click="handleDownload(scope.row)">
+                    <span>{{ scope.row.fileName }}</span>
+                  </a>
+                </template>
+              </el-table-column>
+              <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
+              <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+              <el-table-column :label="$t('上传时间')" align="center" prop="createdate" :show-overflow-tooltip="true" width="120"/>
+              <el-table-column :label="$t('操作')" align="center" width="120" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('pdf')||scope.row.fileName.endsWith('xlsx')||scope.row.fileName.endsWith('md')
+                 ||scope.row.fileName.endsWith('docx')||scope.row.fileName.endsWith('doc')||scope.row.fileName.endsWith('txt')
+                 ||scope.row.fileName.endsWith('jpg')||scope.row.fileName.endsWith('png')||scope.row.fileName.endsWith('csv')
+                 ||scope.row.fileName.endsWith('mp4')||scope.row.fileName.endsWith('svg')||scope.row.fileName.endsWith('dwg')
+                 ||scope.row.fileName.endsWith('flv')||scope.row.fileName.endsWith('swf')||scope.row.fileName.endsWith('gif')
+                 ||scope.row.fileName.endsWith('3gp')||scope.row.fileName.endsWith('mkv')||scope.row.fileName.endsWith('tif')"
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSee(scope.row)"
+                  > {{ $t('预览') }}</el-button>
+                  <el-button
+                    v-if="scope.row.fileName.endsWith('ppt')||scope.row.fileName.endsWith('pptx') "
+                    size="mini"
+                    type="text"
+                    icon="el-icon-view"
+                    @click="handleSeePPT(scope.row)"
+                  > {{ $t('ppt预览') }}</el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-download"
+                    @click="handleDownload(scope.row)"
+                  >{{ $t('下载') }}</el-button>
+                  <el-button
+                    size="mini"
+                    type="text"
+                    icon="el-icon-delete"
+                    @click="handleDeleteDoc(scope.row)"
+                    v-if="!inspectDisabled"
+                  >{{ $t('删除') }}</el-button>
+                </template>
+              </el-table-column>
+            </el-table>
+          </el-descriptions-item>
+        </el-descriptions>
+      </div>
+    </el-form>
+    <!-- 流转详情 -->
+    <!--<div>-->
+      <!--<h4>流转详情</h4>-->
+      <!--<el-table :data="historyList" border v-loading="historyLoading" style="width: 100%;">-->
+        <!--<el-table-column prop="taskName" header-align="center" align="center"-->
+                         <!--:label="$t('流程进度')"></el-table-column>-->
+        <!--<el-table-column prop="comment" header-align="center" align="center"-->
+                         <!--:label="$t('审批意见')"></el-table-column>-->
+        <!--<el-table-column prop="userName" header-align="center" align="center" :label="$t('姓名')"></el-table-column>-->
+        <!--<el-table-column prop="taskCreateTime" header-align="center" align="center"-->
+                         <!--:label="$t('开始时间')"></el-table-column>-->
+        <!--<el-table-column prop="taskEndTime" header-align="center" align="center"-->
+                         <!--:label="$t('结束时间')"></el-table-column>-->
+      <!--</el-table>-->
+    <!--</div>-->
+    <!-- 流程操作 -->
+    <div slot="footer" class="dialog-footer">
+      <!-- 当前登录用户为处理人(之一)或张力飞 -->
+      <span v-if="dataForm.handler.indexOf(loginStaffInfo.userId) != -1 || loginStaffInfo.userId == '20276'" style="margin-right: 10px;">
+        <el-button v-if="taskName != null && dataForm.applyStatus != 4 && dataForm.applyStatus != 5" @click="dataFormSave()">{{ $t('保存') }}</el-button>
+        <el-button type="success" v-if="taskName != null && dataForm.veResult != '0'" @click="dataFormSubmit(1)">{{ $t('通过') }}</el-button>
+        <el-button type="danger" v-if="taskName == '验收' && dataForm.veResult == '0'" @click="dataFormSubmit(2)">{{ $t('驳回') }}</el-button>
+        <el-button type="info" v-if="taskName == '评估'" @click="dataFormSubmit(0)">{{ $t('中止') }}</el-button>
+      </span>
+      <el-button @click="visible = false">{{ $t('返回') }}</el-button>
+    </div>
+    <!-- 预览对话框 -->
+    <el-dialog  :close-on-click-modal="false"  v-loading="loadingFlash"     element-loading-background="rgba(0,0,0,0.2)"                 v-dialogDrag :title="pdf.title" :visible.sync="pdf.open"  width="1300px" :center="true" append-to-body>
+      <div style="margin-top: -60px;float: right;margin-right: 40px;">
+        <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+      <div style="margin-top: -30px" >
+        <iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px" v-if="ppt"></iframe>
+      </div>
+      <div style="padding: 30px; width: 100%; height: 100%;" >
+        <el-carousel class="" ref="carousel"  arrow="always"  v-if="pptView"
+                     height="700px"  trigger="click" :autoplay="false" indicator-position="outside">
+          <el-carousel-item class="lun_img" v-for="item in imgs" v-bind:key="item" >
+            <img :src="item" width="100%" height="100%" object-fit="cover" />
+          </el-carousel-item>
+        </el-carousel>
+      </div>
+    </el-dialog>
+  </el-dialog>
+</template>
+
+<script>
+import { getToken } from "@/utils/auth";
+import { updateApply, getApply, handleApply } from "@/api/production/apply";
+import { listFile } from "@/api/production/saiApproveFile";
+import { getHistorylist } from "@/api/ehs/approvedanger";
+import { listUserPost } from "@/api/system/user";
+import { treeselect, listDept } from "@/api/system/dept";
+import { listSaiInspectors, listSaiExecutors, listStaffmgrByDeptAndTeam, getLoginStaffInfo } from "@/api/plant/staffmgr";
+import { allFileList, delCommonfile } from "@/api/common/commonfile";
+import { categoryList } from "@/api/production/category";
+import { selectDevice } from "@/api/invoice/device";
+
+export default {
+  name: "sai-apply-detail",
+  data() {
+    var validateInspector1 = (rule, value, callback) => {
+      if (this.inspector1 == null) {
+        return callback(new Error('验证人不能为空'));
+      } else {
+        return callback();
+      }
+    };
+    var validateInspector2 = (rule, value, callback) => {
+      if (this.inspector2 == null) {
+        return callback(new Error('验证人不能为空'));
+      } else {
+        return callback();
+      }
+    };
+    var validateVeItemsList = (rule, value, callback) => {
+      if (this.dataForm.needVe == '1') {
+        if (this.veItemsList.length == 0) {
+          return callback(new Error('VE验证条款不能为空'));
+        } else {
+          return callback();
+        }
+      } else {
+        return callback();
+      }
+    };
+    var validateRecordNo = (rule, value, callback) => {
+      if (this.dataForm.isRecorded == '1') {
+        if (this.dataForm.recordNo == null) {
+          return callback(new Error('开项编号不能为空'));
+        } else {
+          return callback();
+        }
+      } else {
+        return callback();
+      }
+    };
+    return {
+      // SAI类别列表
+      saiCategoryOptions: [],
+      // 当前登录员工
+      loginStaffInfo: {},
+      //图片集合   打开关闭按钮 等等
+      imgs:[],
+      jpgList:[],
+      ppt:false,
+      pptView:false,
+      loadingFlash:false,
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        commonfileListApply: null,
+        commonfileListExecute: null,
+        commonfileListInspect: null,
+        queryParams: {
+          pId: null,
+          pType: 'eoegSaiApply'
+        },
+        pType: 'eoegSaiApply',
+        pId: null
+      },
+      // pdf文件参数
+      pdf : {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      visible: false,
+      //流转列表
+      historyList: [],
+      rejectList: [],
+      historyLoading: true,
+      taskName: '',
+      rules: {
+        estimateFinishDate: [
+          { required: true, message: this.$t('预计完成时间') + this.$t('不能为空'), trigger: "change" }
+        ],
+        isRecorded: [
+          { required: true, message: this.$t('是否录入开项系统') + this.$t('不能为空'), trigger: "change" }
+        ],
+        reaction: [
+          { required: true, message: this.$t('采取的措施') + this.$t('不能为空'), trigger: "change" }
+        ],
+        executor: [
+          { required: true, message: this.$t('整改负责人') + this.$t('不能为空'), trigger: "change" }
+        ],
+        inspector1: [
+          { required: true, message: this.$t('验证人1') + this.$t('不能为空'), trigger: "change" }
+        ],
+        inspector2: [
+          { required: true, message: this.$t('验证人2') + this.$t('不能为空'), trigger: "change" }
+        ],
+        needVe: [
+          { required: true, message: this.$t('是否需要VE验证') + this.$t('不能为空'), trigger: "change" }
+        ],
+        recordNo: [
+          { validator: validateRecordNo, trigger: 'change' }
+        ],
+        veItemsList: [
+          { validator: validateVeItemsList, trigger: 'change' }
+        ],
+        inspector1: [
+          { validator: validateInspector1, trigger: 'change' }
+        ],
+        inspector2: [
+          { validator: validateInspector2, trigger: 'change' }
+        ],
+        veResult: [
+          { required: true, message: this.$t('VC/VE验证成果') + this.$t('不能为空'), trigger: "change" }
+        ],
+        remarks: [
+          { required: true, message: this.$t('备注') + this.$t('不能为空'), trigger: "change" }
+        ],
+      },
+      // SAI开项管理对象
+      dataForm: {
+        saiApplyId: null,
+        deptId: null,
+        applyStatus: null,
+        apNo: null,
+        processId: null,
+        applicant: null,
+        assessor: null,
+        executor: null,
+        inspectors: null,
+        applicantDept: null,
+        applicantTeam: null,
+        description: null,
+        unsafeStatus: null,
+        unsafeAction: null,
+        applyDate: null,
+        taskId: null,
+        handler: null,
+        taskName: null,
+        estimateFinishDate: null,
+        actualFinishDate: null,
+        isRecorded: null,
+        recordNo: null,
+        reaction: null,
+        needVe: null,
+        veItems: null,
+        veResult: null,
+        veItemOther: null,
+        remarksAssess: null,
+        remarksExecute: null,
+      },
+      taskForm: {
+        comment: '',
+        taskId: '',
+        files: '',
+        businessKey: '',
+        saiApply: null,
+      },
+      showAssess: false,
+      showExecute: false,
+      showInspect: false,
+      // 登记人班组字典
+      applicantTeamOptions: [],
+      // 登记人部门列表
+      applicantDeptOptions: [],
+      // 登记人列表
+      applicantOptions: [],
+      inspectorOptions: [],
+      executorOptions: [],
+      // 不安全状态字典
+      unsafeStatusOptions: [],
+      // 不安全行为字典
+      unsafeActionOptions: [],
+      // 不安全状态/行为选项
+      unsafeChoice: null,
+      // 是否禁用开项编号输入框
+      recordNoDisabled: true,
+      // 是否禁用VE验证条款
+      veItemsDisabled: true,
+      // 是否禁用VE验证条款(其它)
+      veItemOtherDisabled: true,
+      // 是否禁用VE验证条款数组
+      veItemsList: [],
+      // 验证人1
+      inspector1: null,
+      inspector1Name: null,
+      // 验证人2
+      inspector2: null,
+      // 是否禁用不安全状态下拉框
+      unsafeStatusDisabled: false,
+      // 是否禁用不安全行为下拉框
+      unsafeActionDisabled: true,
+      // 是否禁用申请
+      applyDisabled: false,
+      // 是否禁用评估
+      assessDisabled: false,
+      // 是否禁用执行
+      executeDisabled: false,
+      // 是否禁用验收
+      inspectDisabled: false,
+      workAreaList: [],
+    }
+  },
+  methods: {
+    // 初始化
+    init(id, taskId, processId, taskName) {
+      this.doc.id = id;
+      this.doc.queryParams.pId = id;
+      this.doc.pId = id;
+      // 表单重置
+      this.reset();
+      this.inspector1 = null;
+      this.inspector2 = null;
+      this.veItemsList = [];
+      this.dataForm = {};
+      this.historyList = [];
+      this.dataForm.saiApplyId = id || 0;
+      this.form.id = id || 0;
+      this.visible = true;
+      this.taskName = taskName;
+      this.taskForm.taskId = taskId;
+      this.taskForm.businessKey = id;
+      this.dataForm.processId = processId;
+      // 查询SAI开项管理详细
+      getApply(id).then(response => {
+        this.dataForm = response.data;
+        this.getFileList()
+        this.inspector1 = this.dataForm.applicant;
+        if (this.dataForm.inspectors != null) {
+          let inspectors = this.dataForm.inspectors.split(",");
+          this.inspector1 = inspectors[0];
+          this.inspector2 = inspectors[1];
+        }
+        // 加载登记人列表
+        this.listStaffmgrByDeptAndTeam(null, null);
+        if (this.dataForm.veItems != null) {
+          let veItems = this.dataForm.veItems.split(",");
+          for (let i = 0; i < veItems.length; i++) {
+            this.veItemsList.push(veItems[i]);
+          }
+        }
+        if (this.dataForm.isRecorded != null) {
+          this.dataForm.isRecorded = this.dataForm.isRecorded.toString();
+        }
+        if (this.dataForm.needVe != null) {
+          this.dataForm.needVe = this.dataForm.needVe.toString();
+        }
+        this.handleIsRecordedChange();
+        this.handleNeedVeChange();
+        this.handleVeItemOtherVeChange();
+        this.handleUnsafeChoiceChange();
+        if (this.dataForm.unsafeStatus != null && this.dataForm.unsafeStatus != "") {
+          this.unsafeChoice = '1';
+          this.dataForm.unsafeStatus = this.dataForm.unsafeStatus.toString();
+        }
+        if (this.dataForm.unsafeAction != null && this.dataForm.unsafeAction != "") {
+          this.unsafeChoice = '2';
+          this.dataForm.unsafeAction = this.dataForm.unsafeAction.toString();
+        }
+        if (this.dataForm.category != null && this.dataForm.category != "") {
+          this.dataForm.category = Number(this.dataForm.category);
+        }
+        if (this.dataForm.veResult == null) {
+          this.dataForm.veResult = '1';
+        }
+        let applyStatus = this.dataForm.applyStatus;
+        console.log(applyStatus);
+        switch (applyStatus) {
+          case 1:
+            this.showAssess = true;
+            this.assessDisabled = false;
+            this.applyDisabled = false;
+            break;
+          case 2:
+            this.showAssess = true;
+            this.showExecute = true;
+            this.applyDisabled = true;
+            this.assessDisabled = true;
+            this.executeDisabled = false;
+            this.recordNoDisabled = true;
+            this.veItemsDisabled = true;
+            this.veItemOtherDisabled = true;
+            this.dataForm.veResult = '1';
+            break;
+          case 3:
+            this.showAssess = true;
+            this.showExecute = true;
+            this.showInspect = true;
+            this.applyDisabled = true;
+            this.assessDisabled = true;
+            this.executeDisabled = true;
+            this.veItemsDisabled = true;
+            this.veItemOtherDisabled = true;
+            break;
+          case 4:
+            this.showAssess = true;
+            this.showExecute = true;
+            this.showInspect = true;
+            this.applyDisabled = true;
+            this.assessDisabled = true;
+            this.executeDisabled = true;
+            this.inspectDisabled = true;
+            break;
+          case 5:
+            this.showAssess = false;
+            this.assessDisabled = true;
+            break;
+        }
+      });
+      // 查询流转详情
+      getHistorylist({processId: processId}).then(response => {
+        this.historyList = response.rows;
+        this.rejectList = [];
+        for (let i = 0; i < response.rows.length; i++) {
+          if(response.rows[i].comment != null) {
+            if (response.rows[i].comment.indexOf("驳回") != -1) {
+              let reject = {};
+              reject.result = response.rows[i].comment.split(",")[0];
+              reject.comment = response.rows[i].comment.split(",")[1];
+              reject.userName = response.rows[i].userName;
+              reject.taskEndTime = response.rows[i].taskEndTime;
+              this.rejectList.push(reject);
+            }
+          }
+
+        }
+        this.historyLoading = false
+      });
+      // 加载登记人班组字典
+      this.getDicts("TEAM_DIVIDE").then(response => {
+        this.applicantTeamOptions = response.data;
+      });
+      // 加载登记人部门列表
+      this.getApplicantDeptOptions();
+
+      // 加载整改负责人列表
+      this.listSaiInspectors();
+      // 加载执行人列表
+      this.listSaiExecutors();
+      // 加载不安全状态字典
+      this.getDicts("SAI_UNSAFE_STATUS").then(response => {
+        this.unsafeStatusOptions = response.data;
+      });
+      // 加载不安全行为字典
+      this.getDicts("SAI_UNSAFE_ACTION").then(response => {
+        this.unsafeActionOptions = response.data;
+      });
+      // 加载当前登录员工信息
+      this.getLoginStaffInfo();
+      // 加载SAI类别字典
+      this.getCategoryList();
+      this.getWorkAreaList();
+    },
+    getWorkAreaList() {
+      selectDevice().then(response => {
+        let data = response.data;
+        for (let i = 0; i < data.length; i++) {
+          this.workAreaList.push(data[i]);
+        }
+      });
+    },
+    /** 获取SAI类别列表数据 */
+    getCategoryList() {
+      this.saiCategoryOptions = [];
+      categoryList().then(response => {
+        let data = response.data;
+        for (let i = 0; i < data.length; i++) {
+          if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
+            this.saiCategoryOptions.push({
+              dictLabel: data[i].saiCategoryName,
+              dictValue: data[i].saiCategoryId
+            });
+          }
+        }
+      });
+    },
+    /** 加载当前登录员工信息 */
+    getLoginStaffInfo() {
+      getLoginStaffInfo().then(response => {
+        let staff = response.data;
+        if (staff != null) {
+          this.loginStaffInfo = response.data;
+        }
+      });
+    },
+    /** 文件下载处理 */
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    /** 报告附件按钮操作 */
+    handleDoc(row) {
+      this.doc.id = row.saiApplyId;
+      this.doc.title = "附件";
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.saiApplyId
+      this.doc.pId = row.saiApplyId
+      this.getFileList()
+      this.$nextTick(() => {
+        this.$refs.doc.clearFiles()
+      })
+    },
+    getFileList() {
+      listFile({
+        approveId: this.dataForm.saiApplyId
+      }).then(response => {
+        this.doc.commonfileListApply = response;
+      });
+      allFileList({
+        pId: this.doc.queryParams.pId,
+        pType: "saiExecute"
+      }).then(response => {
+        this.doc.commonfileListExecute = response;
+      });
+      allFileList({
+        pId: this.doc.queryParams.pId,
+        pType: "saiInspect"
+      }).then(response => {
+        this.doc.commonfileListInspect = response;
+      });
+    },
+    /** 附件上传中处理 */
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    /** 附件上传成功处理 */
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+      this.getFileList()
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function() {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList();
+        this.msgSuccess(this.$t('删除成功'));
+      })
+    },
+    //文件预览
+    openPdf(){
+      //ppt就跳路由预览,office就直接打开文件新页面
+      const didi={ imgs:this.imgs}
+      if( this.pptView==true&&this.ppt==false){
+        let routeUrl = this.$router.resolve({
+          path: "/cpms/index.html#/pptyulan",
+          query:didi
+        });
+        window.open("/cpms/index.html#/pptyulan?id=" + this.pdf.pdfUrl, '_blank')
+      }else {
+        window.open(this.pdf.pdfUrl)
+      }
+    },
+    handleSeePPT (row){
+      //ppt预览
+      this.loadingFlash=true
+      this.pdf.open =true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = row.fileUrl
+      this.pptView=true
+      this.ppt=false
+      const formatDate =new FormData();
+      formatDate.append("filepath",row.fileUrl)
+
+      //调用文件预览api
+      let res= this.officeConvert.pptConvertCommon(formatDate)
+
+      //查看接受的全局方法的返回结果 console.log(res)
+      //利用.then方法接受Promise对象
+
+      res.then((result)=>{
+        //关闭加载中
+        this.loadingFlash=false
+
+        //成功时直接给地址
+        this.videoList = result.data.imagePathList
+        //将返回的地址集合遍历添加到绑定的数组中
+        this.imgs=[]
+        for (var key=0;key<this.videoList.length;key++) {
+          this.imgs.push( process.env.VUE_APP_BASE_API+  this.videoList[key]  );
+        }
+      }).catch(result => {
+
+        //请求失败,关闭loading,pdf地址直接为为空,不显示
+        this.pdf.pdfUrl =""
+        this.loadingFlash = false;
+      })
+    },
+    handleSee (row){
+      //office预览
+      this.loadingFlash=true
+      this.pdf.open =true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl =""
+
+      this.pptView=false
+      this.ppt=true
+      //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if(row.fileName.endsWith('pdf')){
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+        this.loadingFlash=false
+      }
+      else{
+        const formatDate =new FormData();
+        formatDate.append("filepath",row.fileUrl)
+
+        //调用文件预览api
+        let res= this.officeConvert.officeConvertCommon(formatDate)
+
+
+        //查看接受的全局方法的返回结果 console.log(res)
+        //利用.then方法接受Promise对象
+        res.then((result)=>{
+          //关闭加载中
+          this.loadingFlash=false
+
+          if(result.msg.includes("csv")){
+            this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+            this.$alert(result.msg, this.$t('检查乱码'), { dangerouslyUseHTMLString: true });
+            //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+
+          }else if(result.msg.includes("不存在")){
+            //文件不存在时提示
+            this.pdf.pdfUrl =""
+            this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+            //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+            this.pdf.open =false
+          }else if(result.msg.includes("不支持此格式")){
+
+            this.pdf.pdfUrl =""
+            this.$alert(result.msg, this.$t('预览失败'), { dangerouslyUseHTMLString: true });
+            //    this.$message({message: result.msg, center: true,type:'warning',  offset:400, });
+            this.pdf.open =false
+          } else{
+            //成功时直接给地址
+            this.pdf.pdfUrl =process.env.VUE_APP_BASE_API+ result.data
+          }
+          // this.$nextTick(() => {
+          //   const iframe = window.frames['iFrame']
+          //   const handleLoad = () => {
+          //     setTimeout(() => {
+          //       const Do = (iframe.contentWindow || iframe.contentDocument)
+          //       console.log(Do.document.getElementsByTagName('table')[0])
+          //       Do.document.getElementsByTagName('table')[0].style.width = "100%"
+          //       Do.document.getElementsByTagName('table')[0].setAttribute("class","table")
+          //     }, 500)
+          //   }
+          //   iframe.addEventListener('load', handleLoad, true)
+          // })
+        }).catch(result => {
+
+          //请求失败,关闭loading,pdf地址直接为为空,不显示
+          this.pdf.pdfUrl =""
+          this.loadingFlash = false;
+
+        })
+      }
+
+
+    },
+    /** 不安全行为/状态单选按钮值改变事件 */
+    handleUnsafeChoiceChange() {
+      if (this.unsafeChoice == '1') {
+        this.dataForm.unsafeAction = null;
+        this.unsafeStatusDisabled = false;
+        this.unsafeActionDisabled = true;
+      } else if (this.unsafeChoice == '2') {
+        this.dataForm.unsafeStatus = null;
+        this.unsafeStatusDisabled = true;
+        this.unsafeActionDisabled = false;
+      }
+    },
+    /** VE验证条款(其它)单选按钮值改变事件 */
+    handleVeItemOtherVeChange() {
+      let veItemsList = this.veItemsList;
+      let flag = false;
+      for (let i = 0; i < veItemsList.length; i++) {
+        if (veItemsList[i] == '其它') {
+          flag = true;
+        }
+      }
+      if (flag) {
+        this.veItemOtherDisabled = false;
+      } else {
+        this.veItemOtherDisabled = true;
+        this.dataForm.veItemOther = null;
+      }
+    },
+    /** 是否需要VE验证单选按钮值改变事件 */
+    handleNeedVeChange() {
+      if (this.dataForm.needVe == '1') {
+        this.veItemsDisabled = false;
+      } else if (this.dataForm.needVe == '0') {
+        this.veItemsDisabled = true;
+        this.veItemsList = [];
+        this.handleVeItemOtherVeChange();
+      }
+    },
+    /** 是否录入开项系统单选按钮值改变事件 */
+    handleIsRecordedChange() {
+      if (this.dataForm.isRecorded == '1') {
+        this.recordNoDisabled = false;
+      } else if (this.dataForm.isRecorded == '0') {
+        this.recordNoDisabled = true;
+        this.dataForm.recordNo = null;
+      }
+    },
+    /** 加载登记人部门列表 */
+    getApplicantDeptOptions() {
+      this.applicantDeptOptions = [];
+      this.applicantDeptOptions.push({ dictLabel: "CEP/E", dictValue: '38' });
+      this.applicantDeptOptions.push({ dictLabel: "CTA/B", dictValue: '12' });
+      this.applicantDeptOptions.push({ dictLabel: "CTM/B", dictValue: '14' });
+    },
+    /** 加载登记人列表 */
+    listStaffmgrByDeptAndTeam(applicantDept, applicantTeam) {
+      console.log('123');
+      listStaffmgrByDeptAndTeam({
+        deptId: applicantDept,
+        team: applicantTeam
+      }).then(response => {
+        let staffList = response.rows;
+        this.applicantOptions = [];
+        for (let i = 0; i < staffList.length; i++) {
+          if (this.inspector1 != null) {
+            if (this.inspector1 == staffList[i].userId) {
+              this.inspector1Name = staffList[i].name;
+            }
+          }
+          let staffOption = {
+            dictLabel: staffList[i].name,
+            dictValue: staffList[i].userId
+          }
+          this.applicantOptions.push(staffOption);
+        }
+      });
+    },
+    /** 加载验证人列表 */
+    listSaiInspectors() {
+      listSaiInspectors().then(response => {
+        let staffList = response.data;
+        this.inspectorOptions = [];
+        for (let i = 0; i < staffList.length; i++) {
+          let staffOption = {
+            dictLabel: staffList[i].name,
+            dictValue: staffList[i].userId
+          }
+          this.inspectorOptions.push(staffOption);
+        }
+      });
+    },
+    /** 加载整改负责人列表 */
+    listSaiExecutors(applicantDept, applicantTeam) {
+      listSaiExecutors({
+        deptId: applicantDept,
+        team: applicantTeam
+      }).then(response => {
+        let staffList = response.data;
+        this.executorOptions = [];
+        for (let i = 0; i < staffList.length; i++) {
+          let staffOption = {
+            dictLabel: staffList[i].name,
+            dictValue: staffList[i].userId
+          }
+          let isRepeated = false;
+          for (let j = 0; j < this.executorOptions.length; j++) {
+            if (this.executorOptions[j].dictValue == staffList[i].userId) {
+              isRepeated = true;
+              break;
+            }
+          }
+          if (isRepeated == false) {
+            this.executorOptions.push(staffOption);
+          }
+        }
+      });
+    },
+    // 重置
+    reset() {
+      this.showAssess = false;
+      this.showExecute = false;
+      this.showInspect = false;
+      this.form = {
+        saiApplyId: null,
+        deptId: null,
+        applyStatus: null,
+        apNo: null,
+        processId: null
+      };
+      this.dataForm =  {
+        saiApplyId: null,
+        deptId: null,
+        applyStatus: null,
+        apNo: null,
+        processId: null,
+        applicant: null,
+        assessor: null,
+        executor: null,
+        inspectors: null,
+        applicantDept: null,
+        applicantTeam: null,
+        description: null,
+        unsafeStatus: null,
+        unsafeAction: null,
+        applyDate: null,
+        taskId: null,
+        handler: null,
+        taskName: null,
+        estimateFinishDate: null,
+        actualFinishDate: null,
+        isRecorded: null,
+        recordNo: null,
+        reaction: null,
+        needVe: null,
+        veItems: null,
+        veResult: null,
+        veItemOther: null,
+      };
+      this.taskForm =  {
+        comment: '',
+        taskId: '',
+        files: '',
+        businessKey: '',
+        saiApply: null,
+      };
+    },
+    /**
+     * 处理流程操作按钮点击事件
+     */
+    dataFormSubmit(condition) {
+      if (condition == 0) {
+        // 验证人字符串拼接
+        this.dataForm.inspectors = this.inspector1 + "," + this.inspector2;
+        // VE验证条款字符串拼接
+        if (this.veItemsList.length != 0) {
+          this.dataForm.veItems = "";
+          for (let i = 0; i < this.veItemsList.length; i++) {
+            this.dataForm.veItems += this.veItemsList[i];
+            if (i != this.veItemsList.length - 1) {
+              this.dataForm.veItems += ",";
+            }
+          }
+        }
+        this.taskForm.saiApply = this.dataForm;
+        this.taskForm.condition = condition;
+        handleApply(this.taskForm).then(response =>{
+          this.msgSuccess("提交成功");
+          this.visible = false;
+          // refreshDataList事件:调用父组件getList方法刷新页面
+          this.$emit('refreshDataList');
+        });
+      } else {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            // 验证人字符串拼接
+            this.dataForm.inspectors = this.inspector1 + "," + this.inspector2;
+            // VE验证条款字符串拼接
+            if (this.veItemsList.length != 0) {
+              this.dataForm.veItems = "";
+              for (let i = 0; i < this.veItemsList.length; i++) {
+                this.dataForm.veItems += this.veItemsList[i];
+                if (i != this.veItemsList.length - 1) {
+                  this.dataForm.veItems += ",";
+                }
+              }
+            }
+            this.taskForm.saiApply = this.dataForm;
+            this.taskForm.condition = condition;
+            handleApply(this.taskForm).then(response =>{
+              this.msgSuccess("提交成功");
+              this.visible = false;
+              // refreshDataList事件:调用父组件getList方法刷新页面
+              this.$emit('refreshDataList');
+            });
+          }
+        })
+      }
+    },
+    /**
+     * 保存按钮点击事件
+     */
+    dataFormSave() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          // 验证人字符串拼接
+          this.dataForm.inspectors = this.inspector1 + "," + this.inspector2;
+          // VE验证条款字符串拼接
+          if (this.veItemsList.length != 0) {
+            this.dataForm.veItems = "";
+            for (let i = 0; i < this.veItemsList.length; i++) {
+              this.dataForm.veItems += this.veItemsList[i];
+              if (i != this.veItemsList.length - 1) {
+                this.dataForm.veItems += ",";
+              }
+            }
+          }
+          updateApply(this.dataForm).then(response =>{
+            this.msgSuccess("保存成功");
+            // refreshDataList事件:调用父组件getList方法刷新页面
+            this.$emit('refreshDataList');
+            this.visible = false;
+          });
+        }
+      })
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  h4{
+    margin: 20px 0px 10px 0px;
+  }
+  .el-checkbox {
+    color: #606266;
+    padding: 5px 0px;
+  }
+  ::v-deep .el-input.is-disabled .el-input__inner {
+    color: #606266;
+    background-color: transparent;
+  }
+  ::v-deep .el-textarea.is-disabled .el-textarea__inner {
+    color: #606266;
+    background-color: transparent;
+  }
+  ::v-deep .el-radio__input.is-checked + .el-radio__label {
+    color: #4a7cf9;
+  }
+  ::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
+    background-color: #4a7cf9;
+    border-color: #4a7cf9;
+  }
+  ::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner::after {
+    background-color: #fff;
+  }
+  ::v-deep .el-checkbox__input.is-disabled + span.el-checkbox__label {
+    color: #606266;
+    cursor: not-allowed;
+  }
+  ::v-deep .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner {
+    background-color: #4a7cf9;
+    border-color: #4a7cf9;
+  }
+  ::v-deep .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
+    border-color: #fff;
+  }
+</style>

+ 103 - 68
ui/src/views/production/eoegapply/all/index.vue

@@ -2,6 +2,17 @@
   <div class="app-container">
     <!-- 搜索条件 -->
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="SAI类型" prop="saiType">
+        <el-form-item prop="saiType">
+          <el-select
+            clearable
+            v-model="queryParams.saiType"
+            placeholder="请选择SAI类型">
+            <el-option key="SAI" label="SAI" value="SAI"></el-option>
+            <el-option key="TPM" label="TPM" value="TPM"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form-item>
       <el-form-item label="登记人部门" prop="applicantDept">
         <el-form-item prop="applicantDept">
           <el-select
@@ -121,25 +132,16 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['production:apply:add']"
-        >新增申请单</el-button>
+          v-hasPermi="['production:eoegapply:add']"
+        >新增</el-button>
       </el-col>
-      <!--<el-col :span="1.5">-->
-          <!--<el-button-->
-                  <!--type="info"-->
-                  <!--icon="el-icon-upload2"-->
-                  <!--size="mini"-->
-                  <!--@click="handleImport"-->
-                  <!--v-hasPermi="['production:apply:edit']"-->
-          <!--&gt;导入</el-button>-->
-      <!--</el-col>-->
       <el-col :span="1.5">
         <el-button
           type="warning"
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-hasPermi="['production:apply:export']"
+          v-hasPermi="['production:eoegapply:export']"
         >导出全部</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -148,7 +150,7 @@
           icon="el-icon-download"
           size="mini"
           @click="handleExportSelected"
-          v-hasPermi="['production:apply:export']"
+          v-hasPermi="['production:eoegapply:export']"
         >导出选中数据</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -185,23 +187,37 @@
     <!-- 总表 -->
     <el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange" :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="SAI类型" align="center" prop="saiType" :show-overflow-tooltip="true" width="80"/>
       <el-table-column label="问题描述" align="center" prop="description" :show-overflow-tooltip="true" width="200"/>
-      <el-table-column label="片区" align="center" prop="workArea" :show-overflow-tooltip="true"/>
+      <el-table-column label="片区" align="center" prop="workArea" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.workArea</span>
+        </template>
+      </el-table-column>
       <el-table-column label="申请状态" align="center" prop="applyStatus" :show-overflow-tooltip="true">
         <template slot-scope="scope">
-          <span v-if="scope.row.applyStatus == 0"><el-tag type="info">未提交</el-tag></span>
-          <span v-if="scope.row.applyStatus == 1"><el-tag type="warning">待评估</el-tag></span>
-          <span v-if="scope.row.applyStatus == 2"><el-tag type="warning">进行中</el-tag></span>
-          <span v-if="scope.row.applyStatus == 3"><el-tag type="warning">待验收</el-tag></span>
-          <span v-if="scope.row.applyStatus == 4"><el-tag type="success">已完成</el-tag></span>
-          <span v-if="scope.row.applyStatus == 5"><el-tag type="info">已取消</el-tag></span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">
+            <span v-if="scope.row.applyStatus == 0"><el-tag type="info">未提交</el-tag></span>
+            <span v-if="scope.row.applyStatus == 1"><el-tag type="warning">待评估</el-tag></span>
+            <span v-if="scope.row.applyStatus == 2"><el-tag type="warning">进行中</el-tag></span>
+            <span v-if="scope.row.applyStatus == 3"><el-tag type="warning">待验收</el-tag></span>
+            <span v-if="scope.row.applyStatus == 4"><el-tag type="success">已完成</el-tag></span>
+            <span v-if="scope.row.applyStatus == 5"><el-tag type="info">已取消</el-tag></span>
+          </span>
         </template>
       </el-table-column>
       <el-table-column label="登记人部门" align="center" prop="applicantDeptName" :show-overflow-tooltip="true"/>
       <el-table-column label="登记人班组" align="center" prop="applicantTeam" :show-overflow-tooltip="true" :formatter="teamFormat"/>
       <el-table-column label="登记人" align="center" prop="applicantName" :show-overflow-tooltip="true"/>
       <el-table-column label="当前处理人" align="center" prop="handlerName" :show-overflow-tooltip="true"/>
-      <el-table-column label="整改负责人" align="center" prop="executorName" :show-overflow-tooltip="true"/>
+      <el-table-column label="整改负责人" align="center" prop="executorName" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.executorName</span>
+        </template>
+      </el-table-column>
       <el-table-column label="登记时间" align="center" prop="applyDate" width="100" sortable>
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}</span>
@@ -209,22 +225,28 @@
       </el-table-column>
       <el-table-column label="预计完成时间" align="center" prop="estimateFinishDate" width="100" sortable>
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.estimateFinishDate, '{y}-{m}-{d}') }}</span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">{{ parseTime(scope.row.estimateFinishDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
       <el-table-column label="实际完成时间" align="center" prop="actualFinishDate" width="100">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.actualFinishDate, '{y}-{m}-{d}') }}</span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">{{ parseTime(scope.row.actualFinishDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="SAI级别" align="center" prop="saiLevel" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.saiLevel</span>
         </template>
       </el-table-column>
-      <el-table-column label="是否录入开项系统" align="center" prop="isRecorded" :show-overflow-tooltip="true">
+      <el-table-column label="SAI类别" align="center" prop="category" :show-overflow-tooltip="true" :formatter="saiCategoryFormat">
         <template slot-scope="scope">
-          <span>{{ scope.row.isRecorded == 1 ? "是" : "否" }}</span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.category</span>
         </template>
       </el-table-column>
-      <el-table-column label="开项编号" align="center" prop="recordNo" :show-overflow-tooltip="true"/>
-      <el-table-column label="SAI级别" align="center" prop="saiLevel" :show-overflow-tooltip="true"/>
-      <el-table-column label="SAI类别" align="center" prop="category" :show-overflow-tooltip="true" :formatter="saiCategoryFormat"/>
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <!-- 申请已提交操作 -->
@@ -269,7 +291,7 @@
               size="mini"
               type="text"
               @click="handleSubmit(scope.row)"
-              v-hasPermi="['production:apply:edit']"
+              v-hasPermi="['production:eoegapply:edit']"
               icon="el-icon-s-claim"
             >提交申请</el-button>
             <!--<el-button-->
@@ -278,21 +300,21 @@
               <!--icon="el-icon-document"-->
               <!--@click="handleDoc(scope.row)"-->
             <!--&gt;上传附件</el-button>-->
-            <el-button
-              size="mini"
-              type="text"
-              icon="el-icon-edit"
-              @click="handleUpdate(scope.row)"
-              v-hasPermi="['production:apply:edit']"
-            >修改</el-button>
-            <el-button
-              size="mini"
-              type="text"
-              icon="el-icon-delete"
-              @click="handleDelete(scope.row)"
-              v-hasPermi="['production:apply:remove']"
-            >删除</el-button>
           </span>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['production:eoegapply:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['production:eoegapply:remove']"
+          >删除</el-button>
           <span v-if="(scope.row.applyStatus == 1
                       || scope.row.applyStatus == 2
                       || scope.row.applyStatus == 3
@@ -303,7 +325,7 @@
               type="text"
               icon="el-icon-edit"
               @click="handleUpdate2(scope.row)"
-              v-hasPermi="['production:apply:edit']"
+              v-hasPermi="['production:eoegapply:edit']"
             >修改</el-button>
           </span>
         </template>
@@ -321,6 +343,16 @@
     <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="60%" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="0px">
         <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="SAI类型" :span="3">
+            <el-form-item prop="saiType">
+              <el-select
+                v-model="form.saiType"
+                placeholder="请选择SAI类型">
+                <el-option key="SAI" label="SAI" value="SAI"></el-option>
+                <el-option key="TPM" label="TPM" value="TPM"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
           <el-descriptions-item label="登记人部门">
             <el-form-item prop="applicantDept">
               <el-select
@@ -377,16 +409,24 @@
               <el-input v-model="form.description" placeholder="请输入问题描述" type="textarea" :rows="3" />
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="SAI级别" :span="1">
+          <el-descriptions-item label="采取的措施" :span="3">
+            <el-form-item prop="reaction">
+              <el-input v-model="form.reaction" placeholder="请输入采取的措施" type="textarea" :rows="3"/>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI级别" :span="1" v-if="form.saiType == 'SAI'">
             <el-form-item prop="saiLevel">
               <el-select v-model="form.saiLevel" placeholder="请选择SAI级别" @change="handleSaiLevelChange">
                 <el-option key="1" label="1" value="1"></el-option>
                 <el-option key="2" label="2" value="2"></el-option>
                 <el-option key="3" label="3" value="3"></el-option>
               </el-select>
+              <span @click="saiTypeInfo = true" style="padding-left: 5px; cursor: pointer;">
+                <i class="el-icon-question"></i>
+              </span>
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="SAI类别" :span="1">
+          <el-descriptions-item label="SAI类别" :span="1" v-if="form.saiType == 'SAI'">
             <el-form-item prop="category">
               <el-select
                 @change="handleSaiCategoryChange"
@@ -403,7 +443,7 @@
               </el-select>
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="片区" :span="1">
+          <el-descriptions-item label="片区" :span="1" v-if="form.saiType == 'SAI'">
             <el-form-item prop="workArea">
               <el-select
                 @change="handleSaiCategoryChange"
@@ -420,7 +460,7 @@
               </el-select>
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="隐患" :span="3">
+          <el-descriptions-item label="隐患" :span="3" v-if="form.saiType == 'SAI'">
             <el-radio v-model="unsafeChoice" label="1" @change="handleUnsafeChoiceChange" style="margin-right: 10px;">不安全状态</el-radio>
             <el-form-item prop="unsafeStatus" style="display: inline-block;">
               <el-select v-model="form.unsafeStatus" filterable placeholder="请选择不安全状态" :disabled="unsafeStatusDisabled" style="margin-right: 20px;" clearable>
@@ -520,8 +560,9 @@
         </el-descriptions>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="handleSaveAndSubmit" :disabled="submitDisabled">提 交</el-button>
-        <el-button @click="submitForm" :disabled="submitDisabled">保 存</el-button>
+        <el-button v-if="form.saiType == 'TPM'" type="primary" @click="submitForm">保 存 TPM</el-button>
+        <el-button v-if="form.saiType == 'SAI'" type="primary" @click="handleSaveAndSubmit" :disabled="submitDisabled">提 交 SAI</el-button>
+        <el-button v-if="form.saiType == 'SAI'" @click="submitForm" :disabled="submitDisabled">保 存 SAI</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -807,6 +848,10 @@
         </el-col>
       </el-row>
     </el-dialog>
+    <!-- SAI类型说明对话框 -->
+    <el-dialog  :close-on-click-modal="false" title="SAI类型说明" :visible.sync="saiTypeInfo" width="400px" append-to-body>
+      SAI类型说明(图片)
+    </el-dialog>
   </div>
 </template>
 
@@ -874,6 +919,8 @@ export default {
       }
     };
     return {
+      // SAI类型说明
+      saiTypeInfo: false,
       // 趋势图y轴数值
       valueList1: [],
       valueList2: [],
@@ -1335,11 +1382,11 @@ export default {
         for (let i = 0; i < data.length; i++) {
           if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
             this.saiCategoryOptions.push({
-              dictLabel: data[i].saiCategoryName,
+              dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
               dictValue: data[i].saiCategoryId
             });
             this.saiCategoryOptions2.push({
-              dictLabel: data[i].saiCategoryName,
+              dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
               dictValue: data[i].saiCategoryId
             });
           }
@@ -1553,7 +1600,7 @@ export default {
             this.loginStaffInfo.isMonitor = true;
           }
           this.form.applicantDept = staff.unit;
-          if (staff.unit == '10') {
+          if (staff.unit == '38') {
             this.form.applicantTeam = staff.team;
           }
           this.form.applicant = staff.userId;
@@ -1562,19 +1609,7 @@ export default {
     },
     /** 加载登记人部门列表 */
     getApplicantDeptOptions() {
-      // listDept(null).then(response => {
-      //   let deptList = response.data;
-      //   this.applicantDeptOptions = [];
-      //   for (let i = 0; i < deptList.length; i++) {
-      //     if (deptList[i].deptId == 103 || deptList[i].deptId == 10058 || deptList[i].deptId == 10042) {
-      //       this.applicantDeptOptions.push({
-      //         dictLabel: deptList[i].deptName,
-      //         dictValue: deptList[i].deptId
-      //       });
-      //     }
-      //   }
-      // });
-      this.applicantDeptOptions.push({ dictLabel: "CBP/C", dictValue: '10' });
+      this.applicantDeptOptions.push({ dictLabel: "CEP/E", dictValue: '38' });
       this.applicantDeptOptions.push({ dictLabel: "CTA/B", dictValue: '12' });
       this.applicantDeptOptions.push({ dictLabel: "CTM/B", dictValue: '14' });
     },
@@ -1583,7 +1618,7 @@ export default {
       this.applicantOptions = [];
       this.form.applicant = null;
       let applicantDept = this.form.applicantDept;
-      if (applicantDept != '10') {
+      if (applicantDept != '38') {
         this.applicantTeamDisabled = true;
         this.form.applicantTeam = null;
       } else {
@@ -1782,7 +1817,7 @@ export default {
       this.reset();
       this.fileList = [];
       this.open = true;
-      this.title = "添加SAI开项申请";
+      this.title = "新增 TPM / SAI";
       // 加载当前登录员工信息
       this.getLoginStaffInfo();
       this.applicantTeamDisabled = false;

+ 110 - 61
ui/src/views/production/eoegapply/mine/index.vue

@@ -2,6 +2,17 @@
   <div class="app-container">
     <!-- 搜索条件 -->
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="SAI类型" prop="saiType">
+        <el-form-item prop="saiType">
+          <el-select
+            clearable
+            v-model="queryParams.saiType"
+            placeholder="请选择SAI类型">
+            <el-option key="SAI" label="SAI" value="SAI"></el-option>
+            <el-option key="TPM" label="TPM" value="TPM"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form-item>
       <el-form-item label="登记人部门" prop="applicantDept">
         <el-form-item prop="applicantDept">
           <el-select
@@ -121,25 +132,16 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['production:apply:add']"
-        >新增申请单</el-button>
+          v-hasPermi="['production:eoegapply:add']"
+        >新增</el-button>
       </el-col>
-      <!--<el-col :span="1.5">-->
-        <!--<el-button-->
-          <!--type="info"-->
-          <!--icon="el-icon-upload2"-->
-          <!--size="mini"-->
-          <!--@click="handleImport"-->
-          <!--v-hasPermi="['production:apply:edit']"-->
-        <!--&gt;导入</el-button>-->
-      <!--</el-col>-->
       <el-col :span="1.5">
         <el-button
           type="warning"
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-hasPermi="['production:apply:export']"
+          v-hasPermi="['production:eoegapply:export']"
         >导出全部</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -148,7 +150,7 @@
           icon="el-icon-download"
           size="mini"
           @click="handleExportSelected"
-          v-hasPermi="['production:apply:export']"
+          v-hasPermi="['production:eoegapply:export']"
         >导出选中数据</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -178,23 +180,37 @@
     <!-- 总表 -->
     <el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange" :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="SAI类型" align="center" prop="saiType" :show-overflow-tooltip="true" width="80"/>
       <el-table-column label="问题描述" align="center" prop="description" :show-overflow-tooltip="true" width="200"/>
-      <el-table-column label="片区" align="center" prop="workArea" :show-overflow-tooltip="true"/>
+      <el-table-column label="片区" align="center" prop="workArea" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.workArea</span>
+        </template>
+      </el-table-column>
       <el-table-column label="申请状态" align="center" prop="applyStatus" :show-overflow-tooltip="true">
         <template slot-scope="scope">
-          <span v-if="scope.row.applyStatus == 0"><el-tag type="info">未提交</el-tag></span>
-          <span v-if="scope.row.applyStatus == 1"><el-tag type="warning">待评估</el-tag></span>
-          <span v-if="scope.row.applyStatus == 2"><el-tag type="warning">进行中</el-tag></span>
-          <span v-if="scope.row.applyStatus == 3"><el-tag type="warning">待验收</el-tag></span>
-          <span v-if="scope.row.applyStatus == 4"><el-tag type="success">已完成</el-tag></span>
-          <span v-if="scope.row.applyStatus == 5"><el-tag type="info">已取消</el-tag></span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">
+            <span v-if="scope.row.applyStatus == 0"><el-tag type="info">未提交</el-tag></span>
+            <span v-if="scope.row.applyStatus == 1"><el-tag type="warning">待评估</el-tag></span>
+            <span v-if="scope.row.applyStatus == 2"><el-tag type="warning">进行中</el-tag></span>
+            <span v-if="scope.row.applyStatus == 3"><el-tag type="warning">待验收</el-tag></span>
+            <span v-if="scope.row.applyStatus == 4"><el-tag type="success">已完成</el-tag></span>
+            <span v-if="scope.row.applyStatus == 5"><el-tag type="info">已取消</el-tag></span>
+          </span>
         </template>
       </el-table-column>
       <el-table-column label="登记人部门" align="center" prop="applicantDeptName" :show-overflow-tooltip="true"/>
       <el-table-column label="登记人班组" align="center" prop="applicantTeam" :show-overflow-tooltip="true" :formatter="teamFormat"/>
       <el-table-column label="登记人" align="center" prop="applicantName" :show-overflow-tooltip="true"/>
       <el-table-column label="当前处理人" align="center" prop="handlerName" :show-overflow-tooltip="true"/>
-      <el-table-column label="整改负责人" align="center" prop="executorName" :show-overflow-tooltip="true"/>
+      <el-table-column label="整改负责人" align="center" prop="executorName" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.executorName</span>
+        </template>
+      </el-table-column>
       <el-table-column label="登记时间" align="center" prop="applyDate" width="100" sortable>
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}</span>
@@ -202,20 +218,28 @@
       </el-table-column>
       <el-table-column label="预计完成时间" align="center" prop="estimateFinishDate" width="100" sortable>
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.estimateFinishDate, '{y}-{m}-{d}') }}</span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">{{ parseTime(scope.row.estimateFinishDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
       <el-table-column label="实际完成时间" align="center" prop="actualFinishDate" width="100">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.actualFinishDate, '{y}-{m}-{d}') }}</span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">{{ parseTime(scope.row.actualFinishDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="SAI级别" align="center" prop="saiLevel" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.saiLevel</span>
         </template>
       </el-table-column>
-      <el-table-column label="是否录入开项系统" align="center" prop="isRecorded" :show-overflow-tooltip="true">
+      <el-table-column label="SAI类别" align="center" prop="category" :show-overflow-tooltip="true" :formatter="saiCategoryFormat">
         <template slot-scope="scope">
-          <span>{{ scope.row.isRecorded == 1 ? "是" : "否" }}</span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.category</span>
         </template>
       </el-table-column>
-      <el-table-column label="开项编号" align="center" prop="recordNo" :show-overflow-tooltip="true"/>
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <!-- 申请已提交操作 -->
@@ -260,7 +284,7 @@
               size="mini"
               type="text"
               @click="handleSubmit(scope.row)"
-              v-hasPermi="['production:apply:edit']"
+              v-hasPermi="['production:eoegapply:edit']"
               icon="el-icon-s-claim"
             >提交申请</el-button>
             <!--<el-button-->
@@ -269,20 +293,33 @@
             <!--icon="el-icon-document"-->
             <!--@click="handleDoc(scope.row)"-->
             <!--&gt;上传附件</el-button>-->
+          </span>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['production:eoegapply:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['production:eoegapply:remove']"
+          >删除</el-button>
+          <span v-if="(scope.row.applyStatus == 1
+                      || scope.row.applyStatus == 2
+                      || scope.row.applyStatus == 3
+                      || scope.row.applyStatus == 4)
+                      && (loginStaffInfo.isMonitor || loginStaffInfo.userId == '20276')">
             <el-button
               size="mini"
               type="text"
               icon="el-icon-edit"
-              @click="handleUpdate(scope.row)"
-              v-hasPermi="['production:apply:edit']"
+              @click="handleUpdate2(scope.row)"
+              v-hasPermi="['production:eoegapply:edit']"
             >修改</el-button>
-            <el-button
-              size="mini"
-              type="text"
-              icon="el-icon-delete"
-              @click="handleDelete(scope.row)"
-              v-hasPermi="['production:apply:remove']"
-            >删除</el-button>
           </span>
         </template>
       </el-table-column>
@@ -299,6 +336,16 @@
     <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="60%" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="0px">
         <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="SAI类型" :span="3">
+            <el-form-item prop="saiType">
+              <el-select
+                v-model="form.saiType"
+                placeholder="请选择SAI类型">
+                <el-option key="SAI" label="SAI" value="SAI"></el-option>
+                <el-option key="TPM" label="TPM" value="TPM"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
           <el-descriptions-item label="登记人部门">
             <el-form-item prop="applicantDept">
               <el-select
@@ -355,16 +402,24 @@
               <el-input v-model="form.description" placeholder="请输入问题描述" type="textarea" :rows="3" />
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="SAI级别" :span="1">
+          <el-descriptions-item label="采取的措施" :span="3">
+            <el-form-item prop="reaction">
+              <el-input v-model="form.reaction" placeholder="请输入采取的措施" type="textarea" :rows="3"/>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI级别" :span="1" v-if="form.saiType == 'SAI'">
             <el-form-item prop="saiLevel">
               <el-select v-model="form.saiLevel" placeholder="请选择SAI级别" @change="handleSaiLevelChange">
                 <el-option key="1" label="1" value="1"></el-option>
                 <el-option key="2" label="2" value="2"></el-option>
                 <el-option key="3" label="3" value="3"></el-option>
               </el-select>
+              <span @click="saiTypeInfo = true" style="padding-left: 5px; cursor: pointer;">
+                <i class="el-icon-question"></i>
+              </span>
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="SAI类别" :span="1">
+          <el-descriptions-item label="SAI类别" :span="1" v-if="form.saiType == 'SAI'">
             <el-form-item prop="category">
               <el-select
                 @change="handleSaiCategoryChange"
@@ -381,8 +436,7 @@
               </el-select>
             </el-form-item>
           </el-descriptions-item>
-
-          <el-descriptions-item label="片区" :span="1">
+          <el-descriptions-item label="片区" :span="1" v-if="form.saiType == 'SAI'">
             <el-form-item prop="workArea">
               <el-select
                 @change="handleSaiCategoryChange"
@@ -399,7 +453,7 @@
               </el-select>
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="隐患" :span="3">
+          <el-descriptions-item label="隐患" :span="3" v-if="form.saiType == 'SAI'">
             <el-radio v-model="unsafeChoice" label="1" @change="handleUnsafeChoiceChange" style="margin-right: 10px;">不安全状态</el-radio>
             <el-form-item prop="unsafeStatus" style="display: inline-block;">
               <el-select v-model="form.unsafeStatus" filterable placeholder="请选择不安全状态" :disabled="unsafeStatusDisabled" style="margin-right: 20px;" clearable>
@@ -499,8 +553,9 @@
         </el-descriptions>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="handleSaveAndSubmit" :disabled="submitDisabled">提 交</el-button>
-        <el-button @click="submitForm" :disabled="submitDisabled">保 存</el-button>
+        <el-button v-if="form.saiType == 'TPM'" type="primary" @click="submitForm">保 存 TPM</el-button>
+        <el-button v-if="form.saiType == 'SAI'" type="primary" @click="handleSaveAndSubmit" :disabled="submitDisabled">提 交 SAI</el-button>
+        <el-button v-if="form.saiType == 'SAI'" @click="submitForm" :disabled="submitDisabled">保 存 SAI</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -699,6 +754,10 @@
         </el-carousel>
       </div>
     </el-dialog>
+    <!-- SAI类型说明对话框 -->
+    <el-dialog  :close-on-click-modal="false" title="SAI类型说明" :visible.sync="saiTypeInfo" width="400px" append-to-body>
+      SAI类型说明(图片)
+    </el-dialog>
   </div>
 </template>
 
@@ -766,6 +825,8 @@
         }
       };
       return {
+        // SAI类型说明
+        saiTypeInfo: false,
         submitDisabled: false,
         applyDateRange: [],
         estimateFinishDateRange: [],
@@ -1111,11 +1172,11 @@
           for (let i = 0; i < data.length; i++) {
             if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
               this.saiCategoryOptions.push({
-                dictLabel: data[i].saiCategoryName,
+                dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
                 dictValue: data[i].saiCategoryId
               });
               this.saiCategoryOptions2.push({
-                dictLabel: data[i].saiCategoryName,
+                dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
                 dictValue: data[i].saiCategoryId
               });
             }
@@ -1326,7 +1387,7 @@
           if (staff != null) {
             this.loginStaffInfo = response.data;
             this.form.applicantDept = staff.unit;
-            if (staff.unit == '10') {
+            if (staff.unit == '38') {
               this.form.applicantTeam = staff.team;
             }
             this.form.applicant = staff.userId;
@@ -1335,19 +1396,7 @@
       },
       /** 加载登记人部门列表 */
       getApplicantDeptOptions() {
-        // listDept(null).then(response => {
-        //   let deptList = response.data;
-        //   this.applicantDeptOptions = [];
-        //   for (let i = 0; i < deptList.length; i++) {
-        //     if (deptList[i].deptId == 103 || deptList[i].deptId == 10058 || deptList[i].deptId == 10042) {
-        //       this.applicantDeptOptions.push({
-        //         dictLabel: deptList[i].deptName,
-        //         dictValue: deptList[i].deptId
-        //       });
-        //     }
-        //   }
-        // });
-        this.applicantDeptOptions.push({ dictLabel: "CBP/C", dictValue: '10' });
+        this.applicantDeptOptions.push({ dictLabel: "CEP/E", dictValue: '38' });
         this.applicantDeptOptions.push({ dictLabel: "CTA/B", dictValue: '12' });
         this.applicantDeptOptions.push({ dictLabel: "CTM/B", dictValue: '14' });
       },
@@ -1356,7 +1405,7 @@
         this.applicantOptions = [];
         this.form.applicant = null;
         let applicantDept = this.form.applicantDept;
-        if (applicantDept != '10') {
+        if (applicantDept != '38') {
           this.applicantTeamDisabled = true;
           this.form.applicantTeam = null;
         } else {
@@ -1568,7 +1617,7 @@
         this.reset();
         this.fileList = [];
         this.open = true;
-        this.title = "添加SAI开项申请";
+        this.title = "新增 TPM / SAI";
         // 加载当前登录员工信息
         this.getLoginStaffInfo();
         this.applicantTeamDisabled = false;

+ 110 - 60
ui/src/views/production/eoegapply/pending/index.vue

@@ -2,6 +2,17 @@
   <div class="app-container">
     <!-- 搜索条件 -->
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="SAI类型" prop="saiType">
+        <el-form-item prop="saiType">
+          <el-select
+            clearable
+            v-model="queryParams.saiType"
+            placeholder="请选择SAI类型">
+            <el-option key="SAI" label="SAI" value="SAI"></el-option>
+            <el-option key="TPM" label="TPM" value="TPM"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form-item>
       <el-form-item label="登记人部门" prop="applicantDept">
         <el-form-item prop="applicantDept">
           <el-select
@@ -121,25 +132,16 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['production:apply:add']"
-        >新增申请单</el-button>
+          v-hasPermi="['production:eoegapply:add']"
+        >新增</el-button>
       </el-col>
-      <!--<el-col :span="1.5">-->
-        <!--<el-button-->
-          <!--type="info"-->
-          <!--icon="el-icon-upload2"-->
-          <!--size="mini"-->
-          <!--@click="handleImport"-->
-          <!--v-hasPermi="['production:apply:edit']"-->
-        <!--&gt;导入</el-button>-->
-      <!--</el-col>-->
       <el-col :span="1.5">
         <el-button
           type="warning"
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-hasPermi="['production:apply:export']"
+          v-hasPermi="['production:eoegapply:export']"
         >导出全部</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -148,7 +150,7 @@
           icon="el-icon-download"
           size="mini"
           @click="handleExportSelected"
-          v-hasPermi="['production:apply:export']"
+          v-hasPermi="['production:eoegapply:export']"
         >导出选中数据</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -178,23 +180,37 @@
     <!-- 总表 -->
     <el-table v-loading="loading" :data="applyList" @selection-change="handleSelectionChange" :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="SAI类型" align="center" prop="saiType" :show-overflow-tooltip="true" width="80"/>
       <el-table-column label="问题描述" align="center" prop="description" :show-overflow-tooltip="true" width="200"/>
-      <el-table-column label="片区" align="center" prop="workArea" :show-overflow-tooltip="true"/>
+      <el-table-column label="片区" align="center" prop="workArea" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.workArea</span>
+        </template>
+      </el-table-column>
       <el-table-column label="申请状态" align="center" prop="applyStatus" :show-overflow-tooltip="true">
         <template slot-scope="scope">
-          <span v-if="scope.row.applyStatus == 0"><el-tag type="info">未提交</el-tag></span>
-          <span v-if="scope.row.applyStatus == 1"><el-tag type="warning">待评估</el-tag></span>
-          <span v-if="scope.row.applyStatus == 2"><el-tag type="warning">进行中</el-tag></span>
-          <span v-if="scope.row.applyStatus == 3"><el-tag type="warning">待验收</el-tag></span>
-          <span v-if="scope.row.applyStatus == 4"><el-tag type="success">已完成</el-tag></span>
-          <span v-if="scope.row.applyStatus == 5"><el-tag type="info">已取消</el-tag></span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">
+            <span v-if="scope.row.applyStatus == 0"><el-tag type="info">未提交</el-tag></span>
+            <span v-if="scope.row.applyStatus == 1"><el-tag type="warning">待评估</el-tag></span>
+            <span v-if="scope.row.applyStatus == 2"><el-tag type="warning">进行中</el-tag></span>
+            <span v-if="scope.row.applyStatus == 3"><el-tag type="warning">待验收</el-tag></span>
+            <span v-if="scope.row.applyStatus == 4"><el-tag type="success">已完成</el-tag></span>
+            <span v-if="scope.row.applyStatus == 5"><el-tag type="info">已取消</el-tag></span>
+          </span>
         </template>
       </el-table-column>
       <el-table-column label="登记人部门" align="center" prop="applicantDeptName" :show-overflow-tooltip="true"/>
       <el-table-column label="登记人班组" align="center" prop="applicantTeam" :show-overflow-tooltip="true" :formatter="teamFormat"/>
       <el-table-column label="登记人" align="center" prop="applicantName" :show-overflow-tooltip="true"/>
       <el-table-column label="当前处理人" align="center" prop="handlerName" :show-overflow-tooltip="true"/>
-      <el-table-column label="整改负责人" align="center" prop="executorName" :show-overflow-tooltip="true"/>
+      <el-table-column label="整改负责人" align="center" prop="executorName" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.executorName</span>
+        </template>
+      </el-table-column>
       <el-table-column label="登记时间" align="center" prop="applyDate" width="100" sortable>
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.applyDate, '{y}-{m}-{d}') }}</span>
@@ -202,20 +218,28 @@
       </el-table-column>
       <el-table-column label="预计完成时间" align="center" prop="estimateFinishDate" width="100" sortable>
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.estimateFinishDate, '{y}-{m}-{d}') }}</span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">{{ parseTime(scope.row.estimateFinishDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
       <el-table-column label="实际完成时间" align="center" prop="actualFinishDate" width="100">
         <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.actualFinishDate, '{y}-{m}-{d}') }}</span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">{{ parseTime(scope.row.actualFinishDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="SAI级别" align="center" prop="saiLevel" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.saiLevel</span>
         </template>
       </el-table-column>
-      <el-table-column label="是否录入开项系统" align="center" prop="isRecorded" :show-overflow-tooltip="true">
+      <el-table-column label="SAI类别" align="center" prop="category" :show-overflow-tooltip="true" :formatter="saiCategoryFormat">
         <template slot-scope="scope">
-          <span>{{ scope.row.isRecorded == 1 ? "是" : "否" }}</span>
+          <span v-if="scope.row.saiType=='TPM'">/</span>
+          <span v-if="scope.row.saiType=='SAI'">scope.row.category</span>
         </template>
       </el-table-column>
-      <el-table-column label="开项编号" align="center" prop="recordNo" :show-overflow-tooltip="true"/>
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <!-- 申请已提交操作 -->
@@ -260,7 +284,7 @@
               size="mini"
               type="text"
               @click="handleSubmit(scope.row)"
-              v-hasPermi="['production:apply:edit']"
+              v-hasPermi="['production:eoegapply:edit']"
               icon="el-icon-s-claim"
             >提交申请</el-button>
             <!--<el-button-->
@@ -269,20 +293,33 @@
             <!--icon="el-icon-document"-->
             <!--@click="handleDoc(scope.row)"-->
             <!--&gt;上传附件</el-button>-->
+          </span>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['production:eoegapply:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['production:eoegapply:remove']"
+          >删除</el-button>
+          <span v-if="(scope.row.applyStatus == 1
+                      || scope.row.applyStatus == 2
+                      || scope.row.applyStatus == 3
+                      || scope.row.applyStatus == 4)
+                      && (loginStaffInfo.isMonitor || loginStaffInfo.userId == '20276')">
             <el-button
               size="mini"
               type="text"
               icon="el-icon-edit"
-              @click="handleUpdate(scope.row)"
-              v-hasPermi="['production:apply:edit']"
+              @click="handleUpdate2(scope.row)"
+              v-hasPermi="['production:eoegapply:edit']"
             >修改</el-button>
-            <el-button
-              size="mini"
-              type="text"
-              icon="el-icon-delete"
-              @click="handleDelete(scope.row)"
-              v-hasPermi="['production:apply:remove']"
-            >删除</el-button>
           </span>
         </template>
       </el-table-column>
@@ -299,6 +336,16 @@
     <el-dialog  :close-on-click-modal="false" :title="title" :visible.sync="open" width="60%" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="0px">
         <el-descriptions title="" :column="3" border>
+          <el-descriptions-item label="SAI类型" :span="3">
+            <el-form-item prop="saiType">
+              <el-select
+                v-model="form.saiType"
+                placeholder="请选择SAI类型">
+                <el-option key="SAI" label="SAI" value="SAI"></el-option>
+                <el-option key="TPM" label="TPM" value="TPM"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-descriptions-item>
           <el-descriptions-item label="登记人部门">
             <el-form-item prop="applicantDept">
               <el-select
@@ -355,16 +402,24 @@
               <el-input v-model="form.description" placeholder="请输入问题描述" type="textarea" :rows="3" />
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="SAI级别" :span="1">
+          <el-descriptions-item label="采取的措施" :span="3">
+            <el-form-item prop="reaction">
+              <el-input v-model="form.reaction" placeholder="请输入采取的措施" type="textarea" :rows="3"/>
+            </el-form-item>
+          </el-descriptions-item>
+          <el-descriptions-item label="SAI级别" :span="1" v-if="form.saiType == 'SAI'">
             <el-form-item prop="saiLevel">
               <el-select v-model="form.saiLevel" placeholder="请选择SAI级别" @change="handleSaiLevelChange">
                 <el-option key="1" label="1" value="1"></el-option>
                 <el-option key="2" label="2" value="2"></el-option>
                 <el-option key="3" label="3" value="3"></el-option>
               </el-select>
+              <span @click="saiTypeInfo = true" style="padding-left: 5px; cursor: pointer;">
+                <i class="el-icon-question"></i>
+              </span>
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="SAI类别" :span="1">
+          <el-descriptions-item label="SAI类别" :span="1" v-if="form.saiType == 'SAI'">
             <el-form-item prop="category">
               <el-select
                 @change="handleSaiCategoryChange"
@@ -381,7 +436,7 @@
               </el-select>
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="片区" :span="1">
+          <el-descriptions-item label="片区" :span="1" v-if="form.saiType == 'SAI'">
             <el-form-item prop="workArea">
               <el-select
                 @change="handleSaiCategoryChange"
@@ -398,7 +453,7 @@
               </el-select>
             </el-form-item>
           </el-descriptions-item>
-          <el-descriptions-item label="隐患" :span="3">
+          <el-descriptions-item label="隐患" :span="3" v-if="form.saiType == 'SAI'">
             <el-radio v-model="unsafeChoice" label="1" @change="handleUnsafeChoiceChange" style="margin-right: 10px;">不安全状态</el-radio>
             <el-form-item prop="unsafeStatus" style="display: inline-block;">
               <el-select v-model="form.unsafeStatus" filterable placeholder="请选择不安全状态" :disabled="unsafeStatusDisabled" style="margin-right: 20px;" clearable>
@@ -498,8 +553,9 @@
         </el-descriptions>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="handleSaveAndSubmit" :disabled="submitDisabled">提 交</el-button>
-        <el-button @click="submitForm" :disabled="submitDisabled">保 存</el-button>
+        <el-button v-if="form.saiType == 'TPM'" type="primary" @click="submitForm">保 存 TPM</el-button>
+        <el-button v-if="form.saiType == 'SAI'" type="primary" @click="handleSaveAndSubmit" :disabled="submitDisabled">提 交 SAI</el-button>
+        <el-button v-if="form.saiType == 'SAI'" @click="submitForm" :disabled="submitDisabled">保 存 SAI</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -698,6 +754,10 @@
         </el-carousel>
       </div>
     </el-dialog>
+    <!-- SAI类型说明对话框 -->
+    <el-dialog  :close-on-click-modal="false" title="SAI类型说明" :visible.sync="saiTypeInfo" width="400px" append-to-body>
+      SAI类型说明(图片)
+    </el-dialog>
   </div>
 </template>
 
@@ -765,6 +825,8 @@
         }
       };
       return {
+        // SAI类型说明
+        saiTypeInfo: false,
         submitDisabled: false,
         applyDateRange: [],
         estimateFinishDateRange: [],
@@ -1110,11 +1172,11 @@
           for (let i = 0; i < data.length; i++) {
             if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
               this.saiCategoryOptions.push({
-                dictLabel: data[i].saiCategoryName,
+                dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
                 dictValue: data[i].saiCategoryId
               });
               this.saiCategoryOptions2.push({
-                dictLabel: data[i].saiCategoryName,
+                dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
                 dictValue: data[i].saiCategoryId
               });
             }
@@ -1325,7 +1387,7 @@
           if (staff != null) {
             this.loginStaffInfo = response.data;
             this.form.applicantDept = staff.unit;
-            if (staff.unit == '10') {
+            if (staff.unit == '38') {
               this.form.applicantTeam = staff.team;
             }
             this.form.applicant = staff.userId;
@@ -1334,19 +1396,7 @@
       },
       /** 加载登记人部门列表 */
       getApplicantDeptOptions() {
-        // listDept(null).then(response => {
-        //   let deptList = response.data;
-        //   this.applicantDeptOptions = [];
-        //   for (let i = 0; i < deptList.length; i++) {
-        //     if (deptList[i].deptId == 103 || deptList[i].deptId == 10058 || deptList[i].deptId == 10042) {
-        //       this.applicantDeptOptions.push({
-        //         dictLabel: deptList[i].deptName,
-        //         dictValue: deptList[i].deptId
-        //       });
-        //     }
-        //   }
-        // });
-        this.applicantDeptOptions.push({ dictLabel: "CBP/C", dictValue: '10' });
+        this.applicantDeptOptions.push({ dictLabel: "CEP/E", dictValue: '38' });
         this.applicantDeptOptions.push({ dictLabel: "CTA/B", dictValue: '12' });
         this.applicantDeptOptions.push({ dictLabel: "CTM/B", dictValue: '14' });
       },
@@ -1355,7 +1405,7 @@
         this.applicantOptions = [];
         this.form.applicant = null;
         let applicantDept = this.form.applicantDept;
-        if (applicantDept != '10') {
+        if (applicantDept != '38') {
           this.applicantTeamDisabled = true;
           this.form.applicantTeam = null;
         } else {
@@ -1564,7 +1614,7 @@
         this.reset();
         this.fileList = [];
         this.open = true;
-        this.title = "添加SAI开项申请";
+        this.title = "新增 TPM / SAI";
         // 加载当前登录员工信息
         this.getLoginStaffInfo();
         this.applicantTeamDisabled = false;

+ 5 - 5
ui/src/views/production/eoegcategory/index.vue

@@ -41,7 +41,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['production:category:add']"
+          v-hasPermi="['production:eoegcategory:add']"
         >新增</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -51,7 +51,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-          v-hasPermi="['production:category:edit']"
+          v-hasPermi="['production:eoegcategory:edit']"
         >修改</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -61,7 +61,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-          v-hasPermi="['production:category:remove']"
+          v-hasPermi="['production:eoegcategory:remove']"
         >删除</el-button>
       </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -79,14 +79,14 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['production:category:edit']"
+            v-hasPermi="['production:eoegcategory:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['production:category:remove']"
+            v-hasPermi="['production:eoegcategory:remove']"
           >删除</el-button>
         </template>
       </el-table-column>

+ 8 - 8
ui/src/views/production/eoegcheck/index.vue

@@ -30,7 +30,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['production:sai:add']"
+          v-hasPermi="['production:eoegsai:add']"
         >新增</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -40,7 +40,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-          v-hasPermi="['production:sai:edit']"
+          v-hasPermi="['production:eoegsai:edit']"
         >修改</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -50,7 +50,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-          v-hasPermi="['production:sai:remove']"
+          v-hasPermi="['production:eoegsai:remove']"
         >删除</el-button>
       </el-col>
         <el-col :span="1.5">
@@ -59,7 +59,7 @@
                     icon="el-icon-upload2"
                     size="mini"
                     @click="handleImport"
-                    v-hasPermi="['production:sai:edit']"
+                    v-hasPermi="['production:eoegsai:edit']"
             >导入</el-button>
         </el-col>
       <el-col :span="1.5">
@@ -68,7 +68,7 @@
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-hasPermi="['production:sai:export']"
+          v-hasPermi="['production:eoegsai:export']"
         >导出</el-button>
       </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getListByYear()"></right-toolbar>
@@ -105,14 +105,14 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['production:sai:edit']"
+            v-hasPermi="['production:eoegsai:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['production:sai:remove']"
+            v-hasPermi="['production:eoegsai:remove']"
           >删除</el-button>
         </template>
       </el-table-column>
@@ -428,7 +428,7 @@ export default {
         for (let i = 0; i < data.length; i++) {
           if (data[i].saiCategoryName != null && data[i].saiCategoryName != "") {
             this.saiCategoryOptions.push({
-              dictLabel: data[i].saiCategoryName,
+              dictLabel: data[i].saiCategoryName + "(" + data[i].saiCategoryDescription + ")",
               dictValue: data[i].saiCategoryId
             });
           }