ソースを参照

PSSR:
-添加检修项目创建流程

jiangbiao 8 ヶ月 前
コミット
c9c5eaa6eb

+ 155 - 29
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrApproveController.java

@@ -1,24 +1,29 @@
 package com.ruoyi.project.pssr.controller;
 
-import java.util.List;
-import org.springframework.security.access.prepost.PreAuthorize;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.PutMapping;
-import org.springframework.web.bind.annotation.DeleteMapping;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.aspectj.lang.annotation.Log;
 import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
-import com.ruoyi.project.pssr.domain.TPssrApprove;
-import com.ruoyi.project.pssr.service.ITPssrApproveService;
 import com.ruoyi.framework.web.controller.BaseController;
 import com.ruoyi.framework.web.domain.AjaxResult;
-import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.framework.web.page.TableDataInfo;
+import com.ruoyi.project.pssr.domain.TPssrApprove;
+import com.ruoyi.project.pssr.domain.TPssrOverhaulExchanger;
+import com.ruoyi.project.pssr.domain.TPssrSubcontent;
+import com.ruoyi.project.pssr.service.*;
+import com.ruoyi.project.system.mapper.SysUserMapper;
+import org.activiti.engine.RuntimeService;
+import org.activiti.engine.TaskService;
+import org.activiti.engine.impl.identity.Authentication;
+import org.activiti.engine.runtime.ProcessInstance;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * pssr审批管理Controller
@@ -28,18 +33,47 @@ import com.ruoyi.framework.web.page.TableDataInfo;
  */
 @RestController
 @RequestMapping("/pssr/approve")
-public class TPssrApproveController extends BaseController
-{
+public class TPssrApproveController extends BaseController {
+
+    @Autowired
+    private SysUserMapper userMapper;
+
+    @Autowired
+    private RuntimeService runtimeService;
+
+    @Autowired
+    private TaskService taskService;
+
     @Autowired
     private ITPssrApproveService tPssrApproveService;
 
+    @Autowired
+    private ITPssrSubcontentService tPssrSubcontentService;
+
+    @Autowired
+    private ITPssrOverhaulExchangerService tPssrOverhaulExchangerService;
+
+    @Autowired
+    private ITPssrOverhaulFilterService tPssrOverhaulFilterService;
+
+    @Autowired
+    private ITPssrOverhaulPipeService tPssrOverhaulPipeService;
+
+    @Autowired
+    private ITPssrOverhaulTowerService tPssrOverhaulTowerService;
+
+    @Autowired
+    private ITPssrOverhaulPumpService tPssrOverhaulPumpService;
+
+    @Autowired
+    private ITPssrOverhaulValveService tPssrOverhaulValveService;
+
     /**
      * 查询pssr审批管理列表
      */
     @PreAuthorize("@ss.hasPermi('pssr:approve:list')")
     @GetMapping("/list")
-    public TableDataInfo list(TPssrApprove tPssrApprove)
-    {
+    public TableDataInfo list(TPssrApprove tPssrApprove) {
         startPage();
         List<TPssrApprove> list = tPssrApproveService.selectTPssrApproveList(tPssrApprove);
         return getDataTable(list);
@@ -51,8 +85,7 @@ public class TPssrApproveController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:approve:export')")
     @Log(title = "pssr审批管理", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
-    public AjaxResult export(TPssrApprove tPssrApprove)
-    {
+    public AjaxResult export(TPssrApprove tPssrApprove) {
         List<TPssrApprove> list = tPssrApproveService.selectTPssrApproveList(tPssrApprove);
         ExcelUtil<TPssrApprove> util = new ExcelUtil<TPssrApprove>(TPssrApprove.class);
         return util.exportExcel(list, "approve");
@@ -63,8 +96,7 @@ public class TPssrApproveController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:approve:query')")
     @GetMapping(value = "/{approveId}")
-    public AjaxResult getInfo(@PathVariable("approveId") Long approveId)
-    {
+    public AjaxResult getInfo(@PathVariable("approveId") Long approveId) {
         return AjaxResult.success(tPssrApproveService.selectTPssrApproveById(approveId));
     }
 
@@ -74,8 +106,7 @@ public class TPssrApproveController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:approve:add')")
     @Log(title = "pssr审批管理", businessType = BusinessType.INSERT)
     @PostMapping
-    public AjaxResult add(@RequestBody TPssrApprove tPssrApprove)
-    {
+    public AjaxResult add(@RequestBody TPssrApprove tPssrApprove) {
         return toAjax(tPssrApproveService.insertTPssrApprove(tPssrApprove));
     }
 
@@ -85,8 +116,7 @@ public class TPssrApproveController extends BaseController
     @PreAuthorize("@ss.hasPermi('pssr:approve:edit')")
     @Log(title = "pssr审批管理", businessType = BusinessType.UPDATE)
     @PutMapping
-    public AjaxResult edit(@RequestBody TPssrApprove tPssrApprove)
-    {
+    public AjaxResult edit(@RequestBody TPssrApprove tPssrApprove) {
         return toAjax(tPssrApproveService.updateTPssrApprove(tPssrApprove));
     }
 
@@ -95,9 +125,105 @@ public class TPssrApproveController extends BaseController
      */
     @PreAuthorize("@ss.hasPermi('pssr:approve:remove')")
     @Log(title = "pssr审批管理", businessType = BusinessType.DELETE)
-	@DeleteMapping("/{approveIds}")
-    public AjaxResult remove(@PathVariable Long[] approveIds)
-    {
+    @DeleteMapping("/{approveIds}")
+    public AjaxResult remove(@PathVariable Long[] approveIds) {
         return toAjax(tPssrApproveService.deleteTPssrApproveByIds(approveIds));
     }
+
+    @Log(title = "pssr发起审批", businessType = BusinessType.INSERT)
+    @PostMapping("/doPssrApprove/{subId}")
+    public AjaxResult doApprove(@PathVariable Long subId) {
+        TPssrSubcontent tPssrSubcontent = tPssrSubcontentService.selectTPssrSubcontentById(subId);
+        switch (tPssrSubcontent.getSerialNumber()) {
+            case "01":
+                do01Approve(tPssrSubcontent);
+                break;
+            case "02":
+                break;
+            case "03":
+                break;
+            case "04":
+                break;
+            case "05":
+                break;
+            case "06":
+                break;
+            case "07":
+                break;
+            case "08":
+                break;
+            case "09":
+                break;
+            case "10":
+                break;
+            case "11":
+                break;
+            case "12":
+                break;
+            case "13":
+                break;
+            case "14":
+                break;
+            case "15":
+                break;
+            case "16":
+                break;
+            case "17":
+                break;
+            case "18":
+                break;
+            case "19":
+                break;
+            case "20":
+                break;
+            case "21":
+                break;
+            case "22":
+                break;
+            case "23":
+                break;
+            case "24":
+                break;
+            case "25":
+                break;
+            case "26":
+                break;
+            case "27":
+                break;
+            case "28":
+                break;
+
+        }
+        return AjaxResult.success();
+    }
+
+    // 检修项目审批流程发起申请
+    public void do01Approve(TPssrSubcontent sub) {
+        String userId = getUserId().toString();
+        //新增审批数据
+        TPssrApprove approve = new TPssrApprove();
+        approve.setSubId(sub.getId());
+        approve.setApNo(DateUtils.dateTimeNow() + userId);
+        approve.setApproveStatus("0");
+        approve.setSubCharge(sub.getConfirm());
+        approve.setCreaterCode(userId);
+        approve.setCreatedate(new Date());
+        tPssrApproveService.insertTPssrApprove(approve);
+
+        //查询所有确认人
+        TPssrOverhaulExchanger tPssrOverhaulExchanger = tPssrOverhaulExchangerService.selectAllConfirmedPersonBySubId(sub.getId());
+        String confirmers = tPssrOverhaulExchanger.getConfirmedPerson();
+        // 开始申请流程
+        long businessKey = approve.getApproveId();
+        //开始工作流、监听
+        Authentication.setAuthenticatedUserId(userId);//设置当前申请人
+        Map<String, Object> variables = new HashMap<>();
+        variables.put("applyUser", userId);
+        variables.put("confirmUsers", confirmers);
+        variables.put("chargePerson", sub.getConfirm());
+        //采用key来启动流程定义并设置流程变量,返回流程实例
+        ProcessInstance pi = runtimeService.startProcessInstanceByKey("pssr1confirm", String.valueOf(businessKey), variables);
+        approve.setProcessId(pi.getProcessInstanceId());
+        tPssrApproveService.updateTPssrApprove(approve);
+    }
 }

+ 2 - 0
master/src/main/java/com/ruoyi/project/pssr/mapper/TPssrOverhaulExchangerMapper.java

@@ -29,6 +29,8 @@ public interface TPssrOverhaulExchangerMapper
     @DataScope(deptAlias = "d")
     public List<TPssrOverhaulExchanger> selectTPssrOverhaulExchangerList(TPssrOverhaulExchanger tPssrOverhaulExchanger);
 
+    public TPssrOverhaulExchanger selectAllConfirmedPersonBySubId(Long subId);
+
     /**
      * 新增检修项目-换热器
      * 

+ 2 - 0
master/src/main/java/com/ruoyi/project/pssr/service/ITPssrOverhaulExchangerService.java

@@ -27,6 +27,8 @@ public interface ITPssrOverhaulExchangerService
      */
     public List<TPssrOverhaulExchanger> selectTPssrOverhaulExchangerList(TPssrOverhaulExchanger tPssrOverhaulExchanger);
 
+    public TPssrOverhaulExchanger selectAllConfirmedPersonBySubId(Long subId);
+
     /**
      * 新增检修项目-换热器
      * 

+ 6 - 0
master/src/main/java/com/ruoyi/project/pssr/service/impl/TPssrOverhaulExchangerServiceImpl.java

@@ -43,6 +43,12 @@ public class TPssrOverhaulExchangerServiceImpl implements ITPssrOverhaulExchange
         return tPssrOverhaulExchangerMapper.selectTPssrOverhaulExchangerList(tPssrOverhaulExchanger);
     }
 
+    @Override
+    public TPssrOverhaulExchanger selectAllConfirmedPersonBySubId(Long subId)
+    {
+        return tPssrOverhaulExchangerMapper.selectAllConfirmedPersonBySubId(subId);
+    }
+
     /**
      * 新增检修项目-换热器
      *

+ 1 - 0
master/src/main/java/com/ruoyi/project/training/bccnew/service/impl/TTsApproveServiceImpl.java

@@ -108,6 +108,7 @@ public class TTsApproveServiceImpl implements ITTsApproveService {
 //        variables.put("xyuser", sysUser.getUserId());
         TStaffmgr tStaffmgr = new TStaffmgr();
         tStaffmgr.setActualposts("24");
+        tStaffmgr.setDeptId(103L);
         StringBuilder executor = new StringBuilder();
         for (SysUser user : userMapper.selectUserPost(tStaffmgr)) {
             executor.append(user.getUserId().toString()).append(",");

+ 1 - 0
master/src/main/java/com/ruoyi/project/training/elearn/service/impl/TElPaperServiceImpl.java

@@ -420,6 +420,7 @@ public class TElPaperServiceImpl implements ITElPaperService {
                             }
                             tsFirstplan.setUserId(user.getUserId());
                             tsFirstplan.setNickName(user.getNickName());
+                            logger.info("====tsFirstplan:{}",tsFirstplan);
                             tTsFirstplanService.updateTTsFirstplan(tsFirstplan);
                         }
                     }

+ 11 - 0
master/src/main/resources/mybatis/pssr/TPssrOverhaulExchangerMapper.xml

@@ -56,6 +56,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTPssrOverhaulExchangerVo"/>
         where id = #{id}
     </select>
+
+    <select id="selectAllConfirmedPersonBySubId" parameterType="Long" resultMap="TPssrOverhaulExchangerResult">
+        SELECT LISTAGG(CONFIRMED_PERSON ,  ',') WITHIN GROUP (ORDER BY CONFIRMED_PERSON)AS result
+        FROM (
+                 select CONFIRMED_PERSON from T_PSSR_OVERHAUL_EXCHANGER where #{subId} union
+                 select RESP_PERSON  from T_PSSR_OVERHAUL_FILTER  where #{subId} union
+                 select CONFIRMER from T_PSSR_OVERHAUL_PIPE  where #{subId} union
+                 select CONFIRMED_PERSON from T_PSSR_OVERHAUL_PUMP  where #{subId} union
+                 select CONFIRMED_PERSON from  T_PSSR_OVERHAUL_TOWER  where #{subId} union
+                 select IDENTIFYING_PERSON  from T_PSSR_OVERHAUL_VALVE where #{subId})
+    </select>
         
     <insert id="insertTPssrOverhaulExchanger" parameterType="TPssrOverhaulExchanger">
         <selectKey keyProperty="id" resultType="long" order="BEFORE">

+ 56 - 0
master/src/main/resources/processes/pssr/pssr1confirm.bpmn

@@ -0,0 +1,56 @@
+<?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="pssr1confirm" name="单确认人确认流程" isExecutable="true">
+    <startEvent id="applyUser" name="Start"></startEvent>
+    <userTask id="confirmUser" name="确认人" activiti:candidateUsers="{confirmUsers}"></userTask>
+    <sequenceFlow id="flow1" sourceRef="applyUser" targetRef="confirmUser">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[1]]></conditionExpression>
+    </sequenceFlow>
+    <userTask id="chargePerson" name="检查内容负责人" activiti:assignee="{chargePerson}"></userTask>
+    <sequenceFlow id="flow2" sourceRef="confirmUser" targetRef="chargePerson">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[1]]></conditionExpression>
+    </sequenceFlow>
+    <sequenceFlow id="flow3" sourceRef="chargePerson" targetRef="confirmUser">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[0]]></conditionExpression>
+    </sequenceFlow>
+    <endEvent id="endevent1" name="End"></endEvent>
+    <sequenceFlow id="flow4" sourceRef="chargePerson" targetRef="endevent1">
+      <conditionExpression xsi:type="tFormalExpression"><![CDATA[1]]></conditionExpression>
+    </sequenceFlow>
+  </process>
+  <bpmndi:BPMNDiagram id="BPMNDiagram_pssr1confirm">
+    <bpmndi:BPMNPlane bpmnElement="pssr1confirm" id="BPMNPlane_pssr1confirm">
+      <bpmndi:BPMNShape bpmnElement="applyUser" id="BPMNShape_applyUser">
+        <omgdc:Bounds height="35.0" width="35.0" x="160.0" y="250.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="confirmUser" id="BPMNShape_confirmUser">
+        <omgdc:Bounds height="55.0" width="105.0" x="240.0" y="240.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="chargePerson" id="BPMNShape_chargePerson">
+        <omgdc:Bounds height="55.0" width="105.0" x="390.0" y="240.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
+        <omgdc:Bounds height="35.0" width="35.0" x="540.0" y="250.0"></omgdc:Bounds>
+      </bpmndi:BPMNShape>
+      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
+        <omgdi:waypoint x="195.0" y="267.0"></omgdi:waypoint>
+        <omgdi:waypoint x="240.0" y="267.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
+        <omgdi:waypoint x="345.0" y="267.0"></omgdi:waypoint>
+        <omgdi:waypoint x="390.0" y="267.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
+        <omgdi:waypoint x="442.0" y="295.0"></omgdi:waypoint>
+        <omgdi:waypoint x="442.0" y="353.0"></omgdi:waypoint>
+        <omgdi:waypoint x="371.0" y="353.0"></omgdi:waypoint>
+        <omgdi:waypoint x="292.0" y="353.0"></omgdi:waypoint>
+        <omgdi:waypoint x="292.0" y="295.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+      <bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
+        <omgdi:waypoint x="495.0" y="267.0"></omgdi:waypoint>
+        <omgdi:waypoint x="540.0" y="267.0"></omgdi:waypoint>
+      </bpmndi:BPMNEdge>
+    </bpmndi:BPMNPlane>
+  </bpmndi:BPMNDiagram>
+</definitions>

+ 9 - 1
ui/src/api/pssr/approve.js

@@ -50,4 +50,12 @@ export function exportApprove(query) {
     method: 'get',
     params: query
   })
-}
+}
+
+// pssr发起审批
+export function doApprove(subId) {
+  return request({
+    url: '/pssr/approve/doApprove/'+subId,
+    method: 'post'
+  })
+}

+ 38 - 2
ui/src/views/pssr/overhaulExchanger/index.vue

@@ -104,9 +104,22 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-s-promotion"
+          size="mini"
+          :disabled="subStatus!=0"
+          @click="handleApprove"
+          v-hasPermi="['pssr:overhaulExchanger:edit']"
+        >确认内容
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <H2>蒸汽裂解装置{{ unitDes }}岗位换热器检修清单</H2>
+    </div>
     <el-table v-loading="loading" :data="overhaulExchangerList" @selection-change="handleSelectionChange"
               :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center"/>
@@ -175,7 +188,13 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item label="确认人" prop="confirmedPerson">
-          <el-input v-model="form.confirmedPerson" placeholder="请输入确认人"/>
+          <el-select v-model="form.confirmedPerson" clearable filterable style="width: 100%;"
+                     placeholder="请选择确认人">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注"/>
@@ -237,6 +256,7 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {groupList} from "@/api/pssr/region";
 import {listUserNoPage} from "@/api/system/user";
+import {doApprove} from "@/api/pssr/approve";
 
 export default {
   name: "OverhaulExchanger",
@@ -252,6 +272,10 @@ export default {
       regionGroupOptions: [],
       unitOptions: [],
       userOptions: [],
+      region: null,
+      unit: null,
+      unitDes: null,
+      subStatus: null,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -332,6 +356,12 @@ export default {
     groupList({}).then(res => {
       this.regionGroupOptions = res.data;
     });
+    getSubcontent(this.subId).then(res => {
+      this.unit = res.data.unit
+      this.region = res.data.region
+      this.unitDes = res.data.unitDes
+      this.subStatus = res.data.approveStatus
+    })
   },
   methods: {
     /** 查询检修项目-换热器列表 */
@@ -455,6 +485,12 @@ export default {
         this.download(response.msg);
       })
     },
+    /** 确认按钮操作*/
+    handleApprove() {
+     doApprove(this.subId).then(res=>{
+       this.msgSuccess("已发起确认流程");
+     })
+    },
     /** 导入按钮操作 */
     handleImport() {
       this.upload.title = "用户导入";

+ 56 - 10
ui/src/views/pssr/overhaulFilter/index.vue

@@ -87,10 +87,21 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-s-promotion"
+          size="mini"
+          :disabled="subStatus!=0"
+          @click="handleApprove"
+          v-hasPermi="['pssr:overhaulFilter:edit']"
+        >确认内容
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
     <div style="width: 100%;text-align: center;margin-bottom: 15px">
-      <H2>蒸汽裂解装置{{ unitDes }}阀门更换、下线维修清单</H2>
+      <H2>蒸汽裂解装置{{ unitDes }}岗位过滤器清洗工作清单</H2>
     </div>
     <el-table v-loading="loading" :data="overhaulFilterList" @selection-change="handleSelectionChange"
               :height="clientHeight" border>
@@ -141,9 +152,9 @@
 
     <!-- 添加或修改检修项目-过滤器对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
         <el-form-item label="装置" prop="plant">
-          <el-select v-model="form.plant" clearable filterable style="width: 100%;" placeholder="请选择装置">
+          <el-select v-model="form.plant" clearable filterable style="width: 100%;" placeholder="请选择装置" disabled>
             <el-option
               v-for="(values, key) in regionGroupOptions"
               :label="key"
@@ -154,7 +165,7 @@
         </el-form-item>
         <el-form-item label="单元" prop="unit">
           <el-select v-model="form.unit" clearable filterable style="width: 100%;" placeholder="请选择单元"
-                     :disabled="!form.region">
+                     disabled>
             <el-option v-for="item in unitOptions"
                        :label="item.unit"
                        :value="item.unit"
@@ -185,7 +196,13 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item label="负责人" prop="respPerson">
-          <el-input v-model="form.respPerson" placeholder="请输入负责人"/>
+          <el-select v-model="form.respPerson" clearable filterable style="width: 100%;"
+                     placeholder="请选择确认人">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注"/>
@@ -248,6 +265,7 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {groupList} from "@/api/pssr/region";
 import {getSubcontent} from "@/api/pssr/subcontent";
 import {listUserNoPage} from "@/api/system/user";
+import {doApprove} from "@/api/pssr/approve";
 
 export default {
   name: "OverhaulFilter",
@@ -266,6 +284,7 @@ export default {
       region: null,
       unit: null,
       unitDes: null,
+      subStatus: null,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -327,7 +346,26 @@ export default {
       // 表单参数
       form: {},
       // 表单校验
-      rules: {}
+      rules: {
+        plant:[
+          {required:true,message:"区域不得为空",trigger:"blur"}
+        ],
+        strainerLocation:[
+          {required:true,message:"过滤网位置不得为空",trigger:"blur"}
+        ],
+        pidNo:[
+          {required:true,message:"图号不得为空",trigger:"blur"}
+        ],
+        isoDwgNo:[
+          {required:true,message:"管线号不得为空",trigger:"blur"}
+        ],
+        flangeSize:[
+          {required:true,message:"法兰尺寸不得为空",trigger:"blur"}
+        ],
+        qtyNum:[
+          {required:true,message:"QTY数量不得为空",trigger:"blur"}
+        ],
+      }
     };
   },
   watch: {
@@ -339,7 +377,7 @@ export default {
   created() {
     //设置表格高度对应屏幕高度
     this.$nextTick(() => {
-      this.clientHeight = document.body.clientHeight - 300
+      this.clientHeight = document.body.clientHeight - 320
     })
     this.getList();
     this.getTreeselect();
@@ -353,6 +391,7 @@ export default {
       this.unit = res.data.unit
       this.region = res.data.region
       this.unitDes = res.data.unitDes
+      this.subStatus = res.data.approveStatus
     })
   },
   methods: {
@@ -382,8 +421,8 @@ export default {
         id: null,
         subId: this.subId,
         approveId: null,
-        plant: null,
-        unit: null,
+        plant: this.region,
+        unit: this.unit,
         strainerLocation: null,
         pidNo: null,
         isoDwgNo: null,
@@ -506,7 +545,14 @@ export default {
     // 提交上传文件
     submitFileForm() {
       this.$refs.upload.submit();
-    }
+    },
+
+    /** 确认按钮操作*/
+    handleApprove() {
+      doApprove(this.subId).then(res=>{
+        this.msgSuccess("已发起确认流程");
+      })
+    },
   }
 };
 </script>

+ 40 - 3
ui/src/views/pssr/overhaulPipe/index.vue

@@ -78,9 +78,22 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-s-promotion"
+          size="mini"
+          :disabled="subStatus!=0"
+          @click="handleApprove"
+          v-hasPermi="['pssr:overhaulPipe:edit']"
+        >确认内容
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <H2>蒸汽裂解装置{{ unitDes }}岗位管线更换清单</H2>
+    </div>
     <el-table v-loading="loading" :data="overhaulPipeList" @selection-change="handleSelectionChange"
               :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center"/>
@@ -137,7 +150,13 @@
           <el-input v-model="form.pidNo" placeholder="请输入P&ID图号"/>
         </el-form-item>
         <el-form-item label="确认人" prop="confirmer">
-          <el-input v-model="form.confirmer" placeholder="请输入确认人"/>
+          <el-select v-model="form.confirmer" clearable filterable style="width: 100%;"
+                     placeholder="请选择确认人">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="完成时间" prop="confirmationDate">
           <el-date-picker clearable size="small" style="width: 200px"
@@ -207,6 +226,7 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {groupList} from "@/api/pssr/region";
 import {listUserNoPage} from "@/api/system/user";
+import {doApprove} from "@/api/pssr/approve";
 
 export default {
   name: "OverhaulPipe",
@@ -222,6 +242,10 @@ export default {
       regionGroupOptions: [],
       unitOptions: [],
       userOptions: [],
+      region: null,
+      unit: null,
+      unitDes: null,
+      subStatus: null,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -301,6 +325,12 @@ export default {
     groupList({}).then(res => {
       this.regionGroupOptions = res.data;
     });
+    getSubcontent(this.subId).then(res => {
+      this.unit = res.data.unit
+      this.region = res.data.region
+      this.unitDes = res.data.unitDes
+      this.subStatus = res.data.approveStatus
+    })
   },
   methods: {
     /** 查询检修项目-管线列表 */
@@ -449,7 +479,14 @@ export default {
     // 提交上传文件
     submitFileForm() {
       this.$refs.upload.submit();
-    }
+    },
+
+    /** 确认按钮操作*/
+    handleApprove() {
+      doApprove(this.subId).then(res=>{
+        this.msgSuccess("已发起确认流程");
+      })
+    },
   }
 };
 </script>

+ 40 - 3
ui/src/views/pssr/overhaulPump/index.vue

@@ -87,9 +87,22 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-s-promotion"
+          size="mini"
+          :disabled="subStatus!=0"
+          @click="handleApprove"
+          v-hasPermi="['pssr:overhaulPump:edit']"
+        >确认内容
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <H2>蒸汽裂解装置{{ unitDes }}岗位泵更换清单</H2>
+    </div>
     <el-table v-loading="loading" :data="overhaulPumpList" @selection-change="handleSelectionChange"
               :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center"/>
@@ -158,7 +171,13 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item label="确认人" prop="confirmedPerson">
-          <el-input v-model="form.confirmedPerson" placeholder="请输入确认人"/>
+          <el-select v-model="form.confirmedPerson" clearable filterable style="width: 100%;"
+                     placeholder="请选择确认人">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注"/>
@@ -220,6 +239,7 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {groupList} from "@/api/pssr/region";
 import {listUserNoPage} from "@/api/system/user";
+import {doApprove} from "@/api/pssr/approve";
 
 export default {
   name: "OverhaulPump",
@@ -235,6 +255,10 @@ export default {
       regionGroupOptions: [],
       unitOptions: [],
       userOptions: [],
+      region: null,
+      unit: null,
+      unitDes: null,
+      subStatus: null,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -315,6 +339,12 @@ export default {
     groupList({}).then(res => {
       this.regionGroupOptions = res.data;
     });
+    getSubcontent(this.subId).then(res => {
+      this.unit = res.data.unit
+      this.region = res.data.region
+      this.unitDes = res.data.unitDes
+      this.subStatus = res.data.approveStatus
+    })
   },
   methods: {
     /** 查询检修项目-泵列表 */
@@ -464,7 +494,14 @@ export default {
     // 提交上传文件
     submitFileForm() {
       this.$refs.upload.submit();
-    }
+    },
+
+    /** 确认按钮操作*/
+    handleApprove() {
+      doApprove(this.subId).then(res=>{
+        this.msgSuccess("已发起确认流程");
+      })
+    },
   }
 };
 </script>

+ 40 - 2
ui/src/views/pssr/overhaulTower/index.vue

@@ -88,9 +88,23 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-s-promotion"
+          size="mini"
+          :disabled="subStatus!=0"
+          @click="handleApprove"
+          v-hasPermi="['pssr:overhaulTower:edit']"
+        >确认内容
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <H2>蒸汽裂解装置{{ unitDes }}岗位塔罐检修清单</H2>
+    </div>
     <el-table v-loading="loading" :data="overhaulTowerList" @selection-change="handleSelectionChange"
               :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center"/>
@@ -159,7 +173,13 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item label="确认人" prop="confirmedPerson">
-          <el-input v-model="form.confirmedPerson" placeholder="请输入确认人"/>
+          <el-select v-model="form.confirmedPerson" clearable filterable style="width: 100%;"
+                     placeholder="请选择确认人">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注"/>
@@ -221,6 +241,7 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {groupList} from "@/api/pssr/region";
 import {listUserNoPage} from "@/api/system/user";
+import {doApprove} from "@/api/pssr/approve";
 
 export default {
   name: "OverhaulTower",
@@ -236,6 +257,10 @@ export default {
       regionGroupOptions: [],
       unitOptions: [],
       userOptions: [],
+      region: null,
+      unit: null,
+      unitDes: null,
+      subStatus: null,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -316,6 +341,12 @@ export default {
     groupList({}).then(res => {
       this.regionGroupOptions = res.data;
     });
+    getSubcontent(this.subId).then(res => {
+      this.unit = res.data.unit
+      this.region = res.data.region
+      this.unitDes = res.data.unitDes
+      this.subStatus = res.data.approveStatus
+    })
   },
   methods: {
     /** 查询检修项目-塔罐列表 */
@@ -465,7 +496,14 @@ export default {
     // 提交上传文件
     submitFileForm() {
       this.$refs.upload.submit();
-    }
+    },
+
+    /** 确认按钮操作*/
+    handleApprove() {
+      doApprove(this.subId).then(res=>{
+        this.msgSuccess("已发起确认流程");
+      })
+    },
   }
 };
 </script>

+ 56 - 10
ui/src/views/pssr/overhaulValve/index.vue

@@ -85,25 +85,43 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-s-promotion"
+          size="mini"
+          :disabled="subStatus!=0"
+          @click="handleApprove"
+          v-hasPermi="['pssr:overhaulValve:edit']"
+        >确认内容
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
+    <div style="width: 100%;text-align: center;margin-bottom: 15px">
+      <H2>蒸汽裂解装置{{ unitDes }}岗位阀门更换、下线维修清单</H2>
+    </div>
     <el-table v-loading="loading" :data="overhaulValveList" @selection-change="handleSelectionChange"
               :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center"/>
-      <el-table-column label="升级改型更换/更换/维修" align="center" prop="changeType" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="升级改型更换/更换/维修" align="center" prop="changeType" :show-overflow-tooltip="true"
+                       width="180"/>
       <el-table-column label="连接形式" align="center" prop="connectionForm" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="ITP" align="center" prop="itp" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="施工队" align="center" prop="constructionTeam" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="项目" align="center" prop="item" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="装置" align="center" prop="plant" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="阀门位置" align="center" prop="valvePosition" :show-overflow-tooltip="true" width="180"/>
-      <el-table-column label="阀门信息描述" align="center" prop="vavleInfoDes" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="阀门信息描述" align="center" prop="vavleInfoDes" :show-overflow-tooltip="true"
+                       width="180"/>
       <el-table-column label="类型" align="center" prop="type" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="尺寸" align="center" prop="pipeSize" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="等级" align="center" prop="valveClass" :show-overflow-tooltip="true" width="180"/>
-      <el-table-column label="需求数量" align="center" prop="quantityRequired" :show-overflow-tooltip="true" width="180"/>
-      <el-table-column label="缺陷和常见故障" align="center" prop="faultCommon" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="需求数量" align="center" prop="quantityRequired" :show-overflow-tooltip="true"
+                       width="180"/>
+      <el-table-column label="缺陷和常见故障" align="center" prop="faultCommon" :show-overflow-tooltip="true"
+                       width="180"/>
       <el-table-column label="介质" align="center" prop="medium" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="图号" align="center" prop="pidNo" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="完成日期" align="center" prop="doneDate" width="100">
@@ -111,7 +129,8 @@
           <span>{{ parseTime(scope.row.doneDate, '{y}-{m}-{d}') }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="确认人" align="center" prop="identifyingPerson" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="确认人" align="center" prop="identifyingPerson" :show-overflow-tooltip="true"
+                       width="180"/>
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
         <template slot-scope="scope">
@@ -145,10 +164,12 @@
 
     <!-- 添加或修改检修项目-阀门对话框 -->
     <el-dialog :close-on-click-modal="false" :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="130px">
         <el-form-item label="升级改型更换/更换/维修" prop="changeType">
-          <el-select v-model="form.changeType" placeholder="请选择升级改型更换/更换/维修">
-            <el-option label="请选择字典生成" value=""/>
+          <el-select v-model="form.changeType" placeholder="请选择升级改型更换/更换/维修" clearable size="small">
+            <el-option label="升级改型更换" value="升级改型更换"/>
+            <el-option label="更换" value="更换"/>
+            <el-option label="维修" value="维修"/>
           </el-select>
         </el-form-item>
         <el-form-item label="连接形式" prop="connectionForm">
@@ -204,7 +225,13 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item label="确认人" prop="identifyingPerson">
-          <el-input v-model="form.identifyingPerson" placeholder="请输入确认人"/>
+          <el-select v-model="form.identifyingPerson" clearable filterable style="width: 100%;"
+                     placeholder="请选择确认人">
+            <el-option v-for="user in userOptions"
+                       :label="user.nickName"
+                       :value="user.userId+''"
+                       :key="user.userId"/>
+          </el-select>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注"/>
@@ -266,6 +293,8 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {groupList} from "@/api/pssr/region";
 import {listUserNoPage} from "@/api/system/user";
+import {getSubcontent} from "@/api/pssr/subcontent";
+import {doApprove} from "@/api/pssr/approve";
 
 export default {
   name: "OverhaulValve",
@@ -281,6 +310,10 @@ export default {
       regionGroupOptions: [],
       unitOptions: [],
       userOptions: [],
+      region: null,
+      unit: null,
+      unitDes: null,
+      subStatus: null,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -372,6 +405,12 @@ export default {
     groupList({}).then(res => {
       this.regionGroupOptions = res.data;
     });
+    getSubcontent(this.subId).then(res => {
+      this.unit = res.data.unit
+      this.region = res.data.region
+      this.unitDes = res.data.unitDes
+      this.subStatus = res.data.approveStatus
+    })
   },
   methods: {
     /** 查询检修项目-阀门列表 */
@@ -532,7 +571,14 @@ export default {
     // 提交上传文件
     submitFileForm() {
       this.$refs.upload.submit();
-    }
+    },
+
+    /** 确认按钮操作*/
+    handleApprove() {
+      doApprove(this.subId).then(res=>{
+        this.msgSuccess("已发起确认流程");
+      })
+    },
   }
 };
 </script>

+ 1 - 1
ui/src/views/training/bccnew/firstplan/index_student.vue

@@ -552,6 +552,7 @@ export default {
       timer = window.setInterval(function () {
         updateFirstLearnTime(row).then(res => {
           _this.learnTime = res.data
+          row.timer = res.data;
         });
         this.$nextTick(() => {
           getFirstplan(row.id).then(res => {
@@ -582,7 +583,6 @@ export default {
       this.file.open = true;
       this.file.data = row
       console.log(row)
-      this.learnTime = row.timer;
       if (row.timer === '' || row.timer == null) {
         this.learnTime = 0
       }

+ 20 - 23
ui/src/views/training/bccnew/tsnew/score_student.vue

@@ -16,7 +16,7 @@
       </el-table-column>
       <el-table-column label="培训主题" align="center" prop="topic" :show-overflow-tooltip="true" fixed="left"
                        width="180"/>
-<!--      <el-table-column label="培训计划" align="center" prop="courseDay" :show-overflow-tooltip="true" width="180"/>-->
+      <!--      <el-table-column label="培训计划" align="center" prop="courseDay" :show-overflow-tooltip="true" width="180"/>-->
       <el-table-column label="培训内容" align="center" prop="content" :show-overflow-tooltip="true" width="180"/>
       <el-table-column label="培训状态" align="center" prop="planStatus" :show-overflow-tooltip="true" width="180">
         <template slot-scope="scope">
@@ -71,7 +71,7 @@
       @pagination="getList"
     />
 
-    <el-dialog  :close-on-click-modal="false" :visible.sync="file.open" width="30%" append-to-body>
+    <el-dialog :close-on-click-modal="false" :visible.sync="file.open" width="30%" append-to-body>
       <el-descriptions class="margin-top" title="学习资料" :column="1" size="medium" border>
         <el-descriptions-item label-style="width:180px">
           <template slot="label">
@@ -117,7 +117,7 @@
                :visible.sync="pdf.open" width="1300px" height="800px" :center="true" append-to-body
                @close="handleClose">
       <div style="margin-top: -60px;float: right;margin-right: 40px;">
-        <br/>累计学习时长:{{learnTime == null ? "0" : learnTime}} min
+        <br/>累计学习时长:{{ learnTime == null ? "0" : learnTime }} min
       </div>
       <div style="margin-top: -30px">
         <iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"
@@ -420,37 +420,33 @@ export default {
       if (this.planType === 1) {
         timer = window.setInterval(function () {
           updateLjLearnTime(row).then(res => {
-            this.$nextTick(() => {
-              _this.file.data.timer = res.data
-              _this.learnTime=res.data;
-            })
+            _this.file.data.timer = res.data
+            _this.learnTime = res.data;
+            row.timer = res.data;
           })
         }, 60000);
       } else if (this.planType === 2) {
         timer = window.setInterval(function () {
           updateYsLearnTime(row).then(res => {
-            this.$nextTick(() => {
-              _this.file.data.timer = res.data
-              _this.learnTime=res.data;
-            })
+            _this.file.data.timer = res.data
+            _this.learnTime = res.data;
+            row.timer = res.data;
           })
         }, 60000);
       } else if (this.planType === 3) {
         timer = window.setInterval(function () {
           updateFlLearnTime(row).then(res => {
-            this.$nextTick(() => {
-              _this.file.data.timer = res.data
-              _this.learnTime=res.data;
-            })
+            _this.file.data.timer = res.data
+            _this.learnTime = res.data;
+            row.timer = res.data;
           })
         }, 60000);
       } else if (this.planType === 4) {
         timer = window.setInterval(function () {
           updateFtLearnTime(row).then(res => {
-            this.$nextTick(() => {
-              _this.file.data.timer = res.data
-              _this.learnTime=res.data;
-            })
+            _this.file.data.timer = res.data
+            _this.learnTime = res.data;
+            row.timer = res.data;
           })
         }, 60000);
       }
@@ -469,19 +465,20 @@ export default {
         let item = this.dsdtList[i];
         if (item.id === row.id) {
           if (row.id !== this.dsdtList[i - 1].id) {
-            if (this.dsdtList[i - 1].planStatus !== 5&&this.dsdtList[i - 1].planStatus !== 3&&this.dsdtList[i - 1].planStatus !== 1) {
+            if (this.dsdtList[i - 1].planStatus !== 5 && this.dsdtList[i - 1].planStatus !== 3 && this.dsdtList[i - 1].planStatus !== 1) {
               this.$alert('您必须完成上一项考试才可学习当前资料!', "注意", {dangerouslyUseHTMLString: true});
               return;
             }
-          }else{
+          } else {
             num++;
           }
         }
       }
       this.file.open = true;
       this.file.data = row
+      this.learnTime = row.timer;
       if (row.timer === '' || row.timer == null) {
-        this.file.data.timer = 0
+        this.learnTime = 0;
       }
       if (row.timerNeed === '' || row.timerNeed == null) {
         this.file.data.timerNeed = 0
@@ -712,7 +709,7 @@ export default {
     //合并单元格
     mergeMethod({row, column, rowIndex, columnIndex}) {
       // console.log(row)
-      if ([1, 3, 5,6, 7, 8, 9, 10, 11, 12, 13].includes(columnIndex)) {
+      if ([1, 3, 5, 6, 7, 8, 9, 10, 11, 12, 13].includes(columnIndex)) {
         const _row = this.setTable(this.dsdtList).merge[rowIndex];
         const _col = _row > 0 ? 1 : 0;
         return {