wangggziwen 2 gadi atpakaļ
vecāks
revīzija
52396d22b7

+ 80 - 10
master/src/main/java/com/ruoyi/project/process/controller/TMocController.java

@@ -65,14 +65,12 @@ public class TMocController extends BaseController
     private ITCommonfileService commonfileService;
 
     /**
-     * 查询MOC管理列表
+     * 遍历MOC filelist
+     * 设置isEhsCheck、isTrainingset、ispssr
+     *
+     * @param list MOC list
      */
-    @PreAuthorize("@ss.hasPermi('process:moc:list')")
-    @GetMapping("/list")
-    public TableDataInfo list(TMoc tMoc)
-    {
-        startPage();
-        List<TMoc> list = tMocService.selectTMocList(tMoc);
+    private void getFiles(List<TMoc> list) {
         for (TMoc m : list) {
             TCommonfile commonfile = new TCommonfile();
             commonfile.setpId(m.getId());
@@ -98,6 +96,78 @@ public class TMocController extends BaseController
                 }
             }
         }
+    }
+
+    /**
+     * 查询临时MOC管理列表 - 仪表联锁旁路
+     */
+    @PreAuthorize("@ss.hasPermi('process:moc:list')")
+    @GetMapping("/listinterlock")
+    public TableDataInfo listInterlock(TMoc tMoc)
+    {
+        tMoc.setTimeliness(2L);
+        tMoc.setTempCategory(3L);
+        startPage();
+        List<TMoc> list = tMocService.selectTMocList(tMoc);
+        this.getFiles(list);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询临时MOC管理列表 - 临时设施、其它
+     */
+    @PreAuthorize("@ss.hasPermi('process:moc:list')")
+    @GetMapping("/listfacility")
+    public TableDataInfo listFacility(TMoc tMoc)
+    {
+        tMoc.setTimeliness(2L);
+        tMoc.setTempCategory(2L);
+        startPage();
+        List<TMoc> list = tMocService.selectTMocList(tMoc);
+        this.getFiles(list);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询临时MOC管理列表 - 带压消漏清单
+     */
+    @PreAuthorize("@ss.hasPermi('process:moc:list')")
+    @GetMapping("/listaquifier")
+    public TableDataInfo listAquifier(TMoc tMoc)
+    {
+        tMoc.setTimeliness(2L);
+        tMoc.setTempCategory(1L);
+        startPage();
+        List<TMoc> list = tMocService.selectTMocList(tMoc);
+        this.getFiles(list);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询临时MOC管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('process:moc:list')")
+    @GetMapping("/listtemporary")
+    public TableDataInfo listTemporary(TMoc tMoc)
+    {
+        tMoc.setTimeliness(2L);
+        startPage();
+        List<TMoc> list = tMocService.selectTMocList(tMoc);
+        this.getFiles(list);
+        return getDataTable(list);
+    }
+
+    /**
+     * 查询永久MOC管理列表
+     */
+    @PreAuthorize("@ss.hasPermi('process:moc:list')")
+    @GetMapping("/listpermanent")
+    public TableDataInfo list(TMoc tMoc)
+    {
+        tMoc.setTimeliness(1L);
+        startPage();
+        List<TMoc> list = tMocService.selectTMocList(tMoc);
+        this.getFiles(list);
         return getDataTable(list);
     }
 
@@ -261,9 +331,9 @@ public class TMocController extends BaseController
     {
         tMoc.setUpdaterCode(getUserId().toString());
         tMoc.setUpdatedate(new Date());
-        if (tMoc.getChangeNature().equals("12")) {
-            tMoc.setTemporaryState("14");
-        }
+//        if (tMoc.getChangeNature().equals("12")) {
+//            tMoc.setTemporaryState("14");
+//        }
         return toAjax(tMocService.updateTMoc(tMoc));
     }
 

+ 49 - 0
master/src/main/java/com/ruoyi/project/process/domain/TMoc.java

@@ -198,6 +198,55 @@ public class TMoc extends BaseEntity
     @Excel(name = "PSSR编号")
     private String pssrNo;
 
+    /** 时效性,永久/临时MOC */
+    @Excel(name = "时效性,永久/临时MOC")
+    private Long timeliness;
+
+    /** 临时MOC类别 */
+    @Excel(name = "临时MOC类别")
+    private Long tempCategory;
+
+    /** 到期时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
+    @Excel(name = "到期时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date expTime;
+
+    /** 临时MOC状态 */
+    @Excel(name = "临时MOC状态")
+    private Long tempState;
+
+    public Long getTimeliness() {
+        return timeliness;
+    }
+
+    public void setTimeliness(Long timeliness) {
+        this.timeliness = timeliness;
+    }
+
+    public Long getTempCategory() {
+        return tempCategory;
+    }
+
+    public void setTempCategory(Long tempCategory) {
+        this.tempCategory = tempCategory;
+    }
+
+    public Date getExpTime() {
+        return expTime;
+    }
+
+    public void setExpTime(Date expTime) {
+        this.expTime = expTime;
+    }
+
+    public Long getTempState() {
+        return tempState;
+    }
+
+    public void setTempState(Long tempState) {
+        this.tempState = tempState;
+    }
+
     public String getCompanyMocNo() {
         return companyMocNo;
     }

+ 21 - 1
master/src/main/resources/mybatis/process/TMocMapper.xml

@@ -51,10 +51,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="docUpdate"    column="doc_update"    />
         <result property="pssrNo"    column="pssr_no"    />
         <result property="deptName" column="dept_name" />
+        <result property="timeliness"    column="timeliness"    />
+        <result property="tempCategory"    column="temp_category"    />
+        <result property="expTime"    column="exp_time"    />
+        <result property="tempState"    column="temp_state"    />
     </resultMap>
 
     <sql id="selectTMocVo">
-        select d.id, d.plant_code, d.moc_no, d.plant_number, d.notice_letter, d.work_letter, d.cte_no, d.invest_cost, d.category, d.significance, d.classification, d.area, d.dash_control, d.title, d.owner, d.approve_time, d.estimate_endtime, d.endtime, d.true_state, d.change_nature, d.over_time, d.risk_level, d.training, d.pssr, d.ehs_check, d.ehs_db, d.pid_master, d.pssr_db, d.capex, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.temporary_state, d.sop_update, d.company_moc_no, d.project_no, d.moc_type, d.mc_time, d.mc_detail, d.doc_update, d.pssr_no ,s.dept_name from t_moc d
+        select d.id, d.plant_code, d.moc_no, d.plant_number, d.notice_letter, d.work_letter, d.cte_no, d.invest_cost, d.category, d.significance, d.classification, d.area, d.dash_control, d.title, d.owner, d.approve_time, d.estimate_endtime, d.endtime, d.true_state, d.change_nature, d.over_time, d.risk_level, d.training, d.pssr, d.ehs_check, d.ehs_db, d.pid_master, d.pssr_db, d.capex, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.temporary_state, d.sop_update, d.company_moc_no, d.project_no, d.moc_type, d.mc_time, d.mc_detail, d.doc_update, d.pssr_no ,d.timeliness, d.temp_category, d.exp_time, d.temp_state ,s.dept_name from t_moc d
       left join sys_dept s on s.dept_id = d.dept_id
     </sql>
 
@@ -96,6 +100,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="mcDetail != null  and mcDetail != ''"> and mc_detail like concat(concat('%', #{mcDetail}), '%') </if>
             <if test="docUpdate != null  and docUpdate != ''"> and doc_update = #{docUpdate}</if>
             <if test="pssrNo != null  and pssrNo != ''"> and pssr_no like concat(concat('%', #{pssrNo}), '%') </if>
+            <if test="timeliness != null "> and timeliness = #{timeliness}</if>
+            <if test="tempCategory != null "> and temp_category = #{tempCategory}</if>
+            <if test="expTime != null "> and exp_time = #{expTime}</if>
+            <if test="tempState != null "> and temp_state = #{tempState}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->
@@ -159,6 +167,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="mcDetail != null">mc_detail,</if>
             <if test="docUpdate != null">doc_update,</if>
             <if test="pssrNo != null">pssr_no,</if>
+            <if test="timeliness != null">timeliness,</if>
+            <if test="tempCategory != null">temp_category,</if>
+            <if test="expTime != null">exp_time,</if>
+            <if test="tempState != null">temp_state,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -206,6 +218,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="mcDetail != null">#{mcDetail},</if>
             <if test="docUpdate != null">#{docUpdate},</if>
             <if test="pssrNo != null">#{pssrNo},</if>
+            <if test="timeliness != null">#{timeliness},</if>
+            <if test="tempCategory != null">#{tempCategory},</if>
+            <if test="expTime != null">#{expTime},</if>
+            <if test="tempState != null">#{tempState},</if>
          </trim>
     </insert>
 
@@ -260,6 +276,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="mcDetail != null">mc_detail = #{mcDetail},</if>
             <if test="docUpdate != null">doc_update = #{docUpdate},</if>
             <if test="pssrNo != null">pssr_no = #{pssrNo},</if>
+            <if test="timeliness != null">timeliness = #{timeliness},</if>
+            <if test="tempCategory != null">temp_category = #{tempCategory},</if>
+            <if test="expTime != null">exp_time = #{expTime},</if>
+            <if test="tempState != null">temp_state = #{tempState},</if>
         </trim>
         where id = #{id}
     </update>

+ 34 - 2
ui/src/api/process/moc.js

@@ -1,9 +1,41 @@
 import request from '@/utils/request'
 
 // 查询MOC管理列表
-export function listMoc(query) {
+export function listPermanent(query) {
   return request({
-    url: '/process/moc/list',
+    url: '/process/moc/listpermanent',
+    method: 'get',
+    params: query
+  })
+}
+
+export function listTemporary(query) {
+  return request({
+    url: '/process/moc/listtemporary',
+    method: 'get',
+    params: query
+  })
+}
+
+export function listAquifier(query) {
+  return request({
+    url: '/process/moc/listaquifier',
+    method: 'get',
+    params: query
+  })
+}
+
+export function listFacility(query) {
+  return request({
+    url: '/process/moc/listfacility',
+    method: 'get',
+    params: query
+  })
+}
+
+export function listInterlock(query) {
+  return request({
+    url: '/process/moc/listinterlock',
     method: 'get',
     params: query
   })

+ 13 - 0
ui/src/views/process/moc/aquifier/index.vue

@@ -0,0 +1,13 @@
+<template>
+    <div>带压消漏清单</div>
+</template>
+
+<script>
+    export default {
+        name: "index.vue"
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 13 - 0
ui/src/views/process/moc/facility/index.vue

@@ -0,0 +1,13 @@
+<template>
+    <div>临时设施、其它</div>
+</template>
+
+<script>
+    export default {
+        name: "index.vue"
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 88 - 1419
ui/src/views/process/moc/index.vue

@@ -1,1434 +1,103 @@
 <template>
-  <div class="app-container-list">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item :label="$t('MOC编号')" label-width="50" prop="mocNo">
-        <el-input
-          v-model="queryParams.mocNo"
-          :placeholder="$t('请输入') + $t('MOC编号')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('区域')" prop="area">
-        <el-input
-          v-model="queryParams.area"
-          :placeholder="$t('请输入') + $t('区域')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item :label="$t('标题')" prop="title">
-        <el-input
-          v-model="queryParams.title"
-          :placeholder="$t('请输入') + $t('标题')"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <!--<el-form-item :label="$t('CTE工作号')" label-width="120" prop="cteNo">-->
-        <!--<el-input-->
-          <!--v-model="queryParams.cteNo"-->
-          <!--:placeholder="$t('请输入') + $t('CTE工作号')"-->
-          <!--clearable-->
-          <!--size="small"-->
-          <!--@keyup.enter.native="handleQuery"-->
-        <!--/>-->
-      <!--</el-form-item>-->
-      <!--<el-form-item :label="$t('实施情况')" prop="trueState" label-width="150">-->
-        <!--<el-select v-model="queryParams.trueState" :placeholder="$t('请选择') + $t('实施情况')" clearable size="small">-->
-          <!--<el-option-->
-            <!--v-for="dict in trueStateOptions"-->
-            <!--:key="dict.dictValue"-->
-            <!--:label="dict.dictLabel"-->
-            <!--:value="dict.dictValue"-->
-          <!--/>-->
-        <!--</el-select>-->
-      <!--</el-form-item>-->
-      <!--<el-form-item :label="$t('变更性质')" prop="changeNature" label-width="150">-->
-        <!--<el-select v-model="queryParams.changeNature" :placeholder="$t('请选择') + $t('变更性质')" clearable size="small">-->
-          <!--<el-option-->
-            <!--v-for="dict in changeNatureOptions"-->
-            <!--:key="dict.dictValue"-->
-            <!--:label="dict.dictLabel"-->
-            <!--:value="dict.dictValue"-->
-          <!--/>-->
-        <!--</el-select>-->
-      <!--</el-form-item>-->
-      <el-form-item>
-        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
-      </el-form-item>
-    </el-form>
-
-    <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['process:moc:add']"
-        >{{ $t('新增') }}</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['process:moc:edit']"
-        >{{ $t('修改') }}</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['process:moc:remove']"
-        >{{ $t('删除') }}</el-button>
-      </el-col>
-        <!--<el-col :span="1.5">-->
-            <!--<el-button-->
-                    <!--type="info"-->
-                    <!--icon="el-icon-upload2"-->
-                    <!--size="mini"-->
-                    <!--@click="handleImport"-->
-                    <!--v-hasPermi="['process:moc:edit']"-->
-            <!--&gt;{{ $t('导入') }}</el-button>-->
-        <!--</el-col>-->
-      <!--<el-col :span="1.5">-->
-        <!--<el-button-->
-          <!--type="warning"-->
-          <!--icon="el-icon-download"-->
-          <!--size="mini"-->
-          <!--@click="handleExport"-->
-          <!--v-hasPermi="['process:moc:export']"-->
-        <!--&gt;{{ $t('导出') }}</el-button>-->
-      <!--</el-col>-->
-      <!--<el-col :span="1.5">-->
-        <!--<el-button-->
-          <!--type="primary"-->
-          <!--icon="el-icon-s-data"-->
-          <!--size="mini"-->
-          <!--@click="handleData"-->
-        <!--&gt;{{ $t('数据分析') }}</el-button>-->
-      <!--</el-col>-->
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="mocList" @selection-change="handleSelectionChange" :cell-style="tableCellStyle" :cell-class-name="tableCellClassName" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column :label="$t('MOC编号')" align="center" width="120" prop="mocNo" :show-overflow-tooltip="true"/>
-      <!--<el-table-column :label="$t('装置编号')" align="center" width="120" prop="plantNumber" :show-overflow-tooltip="true"/>-->
-      <el-table-column :label="$t('公司MOC编号')" align="center" width="120" prop="companyMocNo" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('项目号')" align="center" width="120" prop="projectNo" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('区域')" align="center" prop="area" :formatter="areaFormat" />
-      <el-table-column :label="$t('标题')" align="center" width="320" prop="title" :show-overflow-tooltip="true"/>
-      <el-table-column prop="mocType" label="":show-overflow-tooltip="true" :formatter="mocTypeFormat" >
-        <template slot="header">
-          类型
-          <span
-            @click="mocTypeInfo.open = true"
-            id="moc-type">
-            <i class="el-icon-question"></i>
-          </span>
-        </template>
-      </el-table-column>
-      <el-table-column :label="$t('负责人')" align="center" prop="owner" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('申请时间')" align="center" prop="approveTime" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.approveTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <!--<el-table-column :label="$t('完成时间')" align="center" prop="endtime" width="100">-->
-        <!--<template slot-scope="scope">-->
-          <!--<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>-->
-        <!--</template>-->
-      <!--</el-table-column>-->
-      <!--<el-table-column :label="$t('实施情况')" align="center" prop="trueState" :formatter="trueStateFormat" />-->
-      <!--<el-table-column :label="$t('变更性质')" align="center" prop="changeNature" :formatter="changeNatureFormat" />-->
-      <!--<el-table-column :label="$t('到期时间')" align="center" prop="overTime" width="100">-->
-        <!--<template slot-scope="scope">-->
-          <!--<span v-if="scope.row.overTime !== 'N.A.'">{{ parseTime(scope.row.overTime, '{y}-{m}-{d}') }}</span>-->
-          <!--<span v-if="scope.row.overTime === 'N.A.'">{{ scope.row.overTime }}</span>-->
-        <!--</template>-->
-      <!--</el-table-column>-->
-      <!--<el-table-column :label="$t('临时MOC状态')" align="center" prop="temporaryState" :formatter="temporaryStateFormat" />-->
-      <el-table-column :label="$t('MC时间')" align="center" prop="mcTime" :show-overflow-tooltip="true" width="100"/>
-      <el-table-column :label="$t('MC情况')" align="center" prop="mcDetail" :show-overflow-tooltip="true" width="100" :formatter="mcDetailFormat" />
-      <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"width="130" />
-      <el-table-column :label="$t('风险等级')" align="center" prop="riskLevel" :formatter="riskLevelFormat" />
-      <el-table-column :label="$t('EHS评估/审查')" align="center" width="130" prop="ehsCheck" :show-overflow-tooltip="true">
-        <template slot-scope="scope">
-          <span> {{scope.row.ehsCheck}}</span>
-          <el-button icon="el-icon-folder" style="color:#6e96fa" v-if="scope.row.ehsCheck !== null" @click="handleDoc(scope.row , 'moc-ehsCheck')"  circle></el-button>
-        </template>
-      </el-table-column>
-      <el-table-column :label="$t('培训')" align="center" width="130" prop="training" :show-overflow-tooltip="true">
-        <template slot-scope="scope">
-          <span> {{scope.row.training}}</span>
-          <el-button icon="el-icon-folder" style="color:#6e96fa;" v-if="scope.row.training !== null" @click="handleDoc(scope.row , 'moc-training')"  circle></el-button>
-        </template>
-      </el-table-column>
-      <el-table-column :label="$t('SOP更新')" align="center" prop="sopUpdate" :formatter="sopUpdateFormat" />
-      <el-table-column :label="$t('PID更新')" align="center" prop="pidMaster" :formatter="pidMasterFormat" />
-      <el-table-column :label="$t('文档更新')" align="center" prop="docUpdate" :formatter="docUpdateFormat" />
-      <el-table-column label="PSSR" align="center" width="130" prop="pssr" :show-overflow-tooltip="true">
-        <template slot-scope="scope">
-          <span> {{scope.row.pssr}}</span>
-          <el-button icon="el-icon-folder" style="color:#6e96fa;" v-if="scope.row.pssr !== null" @click="handleDoc(scope.row , 'moc-pssr')"  circle></el-button>
-        </template>
-      </el-table-column>
-      <el-table-column :label="$t('PSSR编号')" align="center" prop="pssrNo" width="130" />
-      <!--<el-table-column :label="$t('通知单')" align="center" prop="noticeLetter" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('工作单')" align="center" prop="workLetter" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('CTE工作号')" align="center" prop="cteNo" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('投资费用(RMB)')" align="center" prop="investCost" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('类别')" align="center" prop="category" :formatter="categoryFormat" />
-      <el-table-column :label="$t('重要性')" align="center" prop="significance" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('分类')" align="center" width="120" prop="classification" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('仪表控制')" align="center" prop="dashControl" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('预计完成时间')" align="center" prop="estimateEndtime" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.estimateEndtime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column :label="$t('EHS审查数据库')" align="center" prop="ehsDb" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('PSSR数据库')" align="center" prop="pssrDb" :show-overflow-tooltip="true"/>
-      <el-table-column :label="$t('CAPEX计划')" align="center" prop="capex" :show-overflow-tooltip="true"/>-->
-      <el-table-column :label="$t('操作')" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
-        <template slot-scope="scope">
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-hasPermi="['process:moc:edit']"
-          >{{ $t('修改') }}</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['process:moc:remove']"
-          >{{ $t('删除') }}</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
-
-    <pagination
-      v-show="total>0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
-    <!-- 添加或修改MOC管理对话框 -->
-    <el-dialog v-dialogDrag :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item :label="$t('装置名称')" prop="plantCode">
-          <el-select v-model="form.plantCode" :placeholder="$t('请选择') + $t('装置名称')">
-            <el-option
-              v-for="dict in plantCodeOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item :label="$t('MOC编号')" prop="mocNo">
-          <el-input v-model="form.mocNo" :placeholder="$t('请输入') + $t('MOC编号')" />
-        </el-form-item>
-        <el-form-item :label="$t('公司MOC编号')" prop="companyMocNo">
-          <el-input v-model="form.companyMocNo" :placeholder="$t('请输入') + $t('公司MOC编号')" />
-        </el-form-item>
-        <el-form-item :label="$t('项目号')" prop="projectNo">
-          <el-input v-model="form.projectNo" :placeholder="$t('请输入') + $t('项目号')" />
-        </el-form-item>
-        <el-form-item :label="$t('区域')" prop="area">
-          <el-select v-model="form.area" :placeholder="$t('请选择') + $t('区域')">
-            <el-option
-              v-for="dict in areaOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item :label="$t('标题')" prop="title">
-          <el-input v-model="form.title" :placeholder="$t('请输入') + $t('标题')" />
-        </el-form-item>
-        <el-form-item :label="$t('MOC类型')" prop="mocType">
-          <el-select v-model="form.mocType" :placeholder="$t('请选择') + $t('MOC类型')">
-            <el-option
-              v-for="dict in mocTypeOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item :label="$t('负责人')" prop="owner">
-          <el-input v-model="form.owner" :placeholder="$t('请输入') + $t('负责人')" />
-        </el-form-item>
-        <el-form-item :label="$t('申请时间')" prop="approveTime">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.approveTime"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          :placeholder="$t('请选择') + $t('申请时间')">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item :label="$t('MC时间')" prop="mcTime">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.mcTime"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          :placeholder="$t('请选择') + $t('MC时间')">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item :label="$t('MC情况')" prop="mcDetail">
-          <el-select v-model="form.mcDetail" :placeholder="$t('请选择') + $t('MC情况')">
-            <el-option
-              v-for="dict in mcDetailOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <!--<el-form-item :label="$t('完成时间')" prop="endtime">-->
-          <!--<el-date-picker clearable size="small" style="width: 200px"-->
-                          <!--v-model="form.endtime"-->
-                          <!--type="date"-->
-                          <!--value-format="yyyy-MM-dd"-->
-                          <!--:placeholder="$t('请选择') + $t('完成时间')">-->
-          <!--</el-date-picker>-->
-        <!--</el-form-item>-->
-        <!--<el-form-item :label="$t('实施情况')" prop="trueState">-->
-          <!--<el-select v-model="form.trueState" :placeholder="$t('请选择') + $t('实施情况')" @change="changeTrueState($event)">-->
-            <!--<el-option-->
-              <!--v-for="dict in trueStateOptions"-->
-              <!--:key="dict.dictValue"-->
-              <!--:label="dict.dictLabel"-->
-              <!--:value="dict.dictValue"-->
-            <!--&gt;</el-option>-->
-          <!--</el-select>-->
-        <!--</el-form-item>-->
-        <!--<el-form-item :label="$t('变更性质')" prop="changeNature">-->
-          <!--<el-select v-model="form.changeNature" :placeholder="$t('请选择') + $t('变更性质')" @change="changeChangeNature($event)">-->
-            <!--<el-option-->
-              <!--v-for="dict in changeNatureOptions"-->
-              <!--:key="dict.dictValue"-->
-              <!--:label="dict.dictLabel"-->
-              <!--:value="dict.dictValue"-->
-            <!--&gt;</el-option>-->
-          <!--</el-select>-->
-        <!--</el-form-item>-->
-        <!--<el-form-item :label="$t('到期时间')" prop="overTime">-->
-          <!--<el-date-picker clearable size="small" style="width: 200px"-->
-                          <!--v-model="form.overTime"-->
-                          <!--type="date"-->
-                          <!--value-format="yyyy-MM-dd"-->
-                          <!--:placeholder="$t('请选择') + $t('到期时间')">-->
-          <!--</el-date-picker>-->
-        <!--</el-form-item>-->
-        <!--<el-form-item :label="$t('临时MOC状态')" prop="temporaryState">-->
-          <!--<el-select v-model="form.temporaryState" :placeholder="$t('请选择') + $t('临时MOC状态')">-->
-            <!--<el-option-->
-              <!--v-for="dict in temporaryStateOptions"-->
-              <!--:key="dict.dictValue"-->
-              <!--:label="dict.dictLabel"-->
-              <!--:value="dict.dictValue"-->
-            <!--&gt;</el-option>-->
-          <!--</el-select>-->
-        <!--</el-form-item>-->
-        <el-form-item :label="$t('备注')" prop="remarks">
-          <el-input v-model="form.remarks" type="textarea" :placeholder="$t('请输入') + $t('备注')" />
-        </el-form-item>
-        <el-form-item :label="$t('风险等级')" prop="riskLevel">
-          <el-select v-model="form.riskLevel" :placeholder="$t('请选择') + $t('风险等级')">
-            <el-option
-              v-for="dict in riskLevelOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item :label="$t('EHS评估/审查')" prop="ehsCheck">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.ehsCheck"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          :placeholder="$t('请选择') + $t('EHS评估/审查')">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item :label="$t('培训')" prop="training">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.training"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          :placeholder="$t('请选择') + $t('培训')"
-                          :picker-options="trainingDatePicker">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item :label="$t('PID更新')" prop="pidMaster">
-          <el-select v-model="form.pidMaster" :placeholder="$t('请选择') + $t('PID更新')">
-            <el-option
-              v-for="dict in pidMasterOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item :label="$t('SOP更新')" prop="sopUpdate">
-          <el-select v-model="form.sopUpdate" :placeholder="$t('请选择') + $t('SOP更新')">
-            <el-option
-              v-for="dict in sopUpdateOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item :label="$t('文档更新')" prop="docUpdate">
-          <el-select v-model="form.docUpdate" :placeholder="$t('请选择') + $t('文档更新')">
-            <el-option
-              v-for="dict in docUpdateOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="PSSR" prop="pssr">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.pssr"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          :placeholder="$t('请选择') + 'PSSR'"
-                          :picker-options="pssrDatePicker">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item :label="$t('PSSR编号')" prop="pssrNo">
-          <el-input v-model="form.pssrNo" :placeholder="$t('请输入') + $t('PSSR编号')" />
-        </el-form-item>
-        <!--<el-form-item :label="$t('装置编号')" prop="plantNumber">
-          <el-input v-model="form.plantNumber" :placeholder="$t('请输入') + $t('装置编号')" />
-        </el-form-item>
-        <el-form-item :label="$t('通知单')" prop="noticeLetter">
-          <el-input v-model="form.noticeLetter" :placeholder="$t('请输入') + $t('通知单')" />
-        </el-form-item>
-        <el-form-item :label="$t('工作单')" prop="workLetter">
-          <el-input v-model="form.workLetter" :placeholder="$t('请输入') + $t('工作单')" />
-        </el-form-item>
-        <el-form-item :label="$t('CTE工作号')" prop="cteNo">
-          <el-input v-model="form.cteNo" :placeholder="$t('请输入') + $t('CTE工作号')" />
-        </el-form-item>
-        <el-form-item :label="$t('投资费用(RMB)')" prop="investCost">
-          <el-input v-model="form.investCost" :placeholder="$t('请输入') + $t('投资费用(RMB)')" />
-        </el-form-item>
-        <el-form-item :label="$t('类别')" prop="category">
-          <el-select v-model="form.category" :placeholder="$t('请选择') + $t('类别')">
-            <el-option
-              v-for="dict in categoryOptions"
-              :key="dict.dictValue"
-              :label="dict.dictLabel"
-              :value="dict.dictValue"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item :label="$t('重要性')" prop="significance">
-          <el-input v-model="form.significance" :placeholder="$t('请输入') + $t('重要性')" />
-        </el-form-item>
-        <el-form-item :label="$t('分类')" prop="classification">
-          <el-input v-model="form.classification" :placeholder="$t('请输入') + $t('分类')" />
-        </el-form-item>
-        <el-form-item :label="$t('仪表控制')" prop="dashControl">
-          <el-input v-model="form.dashControl" :placeholder="$t('请输入') + $t('仪表控制')" />
-        </el-form-item>
-        <el-form-item :label="$t('预计完成时间')" prop="estimateEndtime">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.estimateEndtime"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          :placeholder="$t('请选择') + $t('预计完成时间')">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item :label="$t('EHS审查数据库')" prop="ehsDb">
-          <el-input v-model="form.ehsDb" :placeholder="$t('请输入') + $t('EHS审查数据库')" />
-        </el-form-item>
-        <el-form-item :label="$t('PSSR数据库')" prop="pssrDb">
-          <el-input v-model="form.pssrDb" :placeholder="$t('请输入') + $t('PSSR数据库')" />
-        </el-form-item>
-        <el-form-item :label="$t('CAPEX计划')" prop="capex">
-          <el-input v-model="form.capex" :placeholder="$t('请输入') + $t('CAPEX计划')" />
-        </el-form-item>-->
-        <el-form-item :label="$t('归属部门')" prop="deptId">
-          <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" :placeholder="$t('请选择') + $t('归属部门')" />
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
-        <el-button @click="cancel">{{ $t('取 消') }}</el-button>
-      </div>
-    </el-dialog>
-      <!-- 用户导入对话框 -->
-      <el-dialog v-dialogDrag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-          <el-upload
-                  ref="upload"
-                  :limit="1"
-                  accept=".xlsx, .xls"
-                  :headers="upload.headers"
-                  :action="upload.url"
-                  :disabled="upload.isUploading"
-                  :on-progress="handleFileUploadProgress"
-                  :on-success="handleFileSuccess"
-                  :auto-upload="false"
-                  drag
-          >
-              <i class="el-icon-upload"></i>
-              <div class="el-upload__text">
-                  {{ $t('将文件拖到此处,或') }}
-                  <em>{{ $t('点击上传') }}</em>
-              </div>
-              <div class="el-upload__tip" slot="tip">
-                  <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
-                  <el-link type="info" style="font-size:12px" @click="importTemplate">{{ $t('下载模板') }}</el-link>
-              </div>
-              <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
-                <input name="type" :value="upload.type" hidden />
-              </form>
-              <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
-          </el-upload>
-          <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>
-              <el-button @click="upload.open = false">{{ $t('取 消') }}</el-button>
-          </div>
-      </el-dialog>
-    <!-- 报告附件对话框 -->
-    <el-dialog v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px" append-to-body >
-      <el-upload v-hasPermi="['training:trainingrecords:file']"
-                 ref="doc"
-                 :limit="50"
-                 :headers="doc.headers"
-                 :action="doc.url + '?pType=' + doc.pType + '&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>
-      <el-table :data="doc.commonfileList" 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" width="220" class-name="small-padding fixed-width">
-          <template slot-scope="scope">
-            <el-button
-              v-if="scope.row.fileName.endsWith('pdf')"
-              size="mini"
-              type="text"
-              icon="el-icon-view"
-              @click="handleSee(scope.row)"
-            >{{ $t('预览') }}</el-button>
-            <el-button v-hasPermi="['training:trainingrecords:file']"  type="text" size="small" v-if="scope.row.isEdit" @click="save(scope.row)">{{ $t('保存') }}</el-button>
-            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">{{ $t('取消') }}</el-button>
-<!--            <el-button v-hasPermi="['training:trainingrecords:file']" v-if="!scope.row.isEdit" @click="edit(scope.row)" icon="el-icon-edit" type="text" size="mini">编辑</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-hasPermi="['training:trainingrecords:file']"
-            >{{ $t('删除') }}</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" 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 :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
-        </div>
-      </el-dialog>
-      <div slot="footer" class="dialog-footer">
-        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
-        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
-      </div>
-    </el-dialog>
-    <!-- MOC类型说明对话框 -->
-    <el-dialog v-dialogDrag :title="mocTypeInfo.title" :visible.sync="mocTypeInfo.open" width="1000px" append-to-body>
-      <el-image
-        style="width: 947px; height: 394px"
-        :src="require('@/assets/image/moc/mocTypeInfo.png')"
-        fit="fill"></el-image>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="mocTypeInfo.open = false">{{ $t('确 定') }}</el-button>
-      </div>
-    </el-dialog>
-    <el-drawer
-      :title="$t('数据分析')"
-      size="600px"
-      :visible.sync="drawer"
-      :direction="direction">
-<!--      <el-row style="padding-left: 20px;">-->
-<!--      <el-form :model="chartParams" :inline="true"  label-width="68px">-->
-<!--        <el-form-item :label="$t('年份')" label-width="50" prop="year">-->
-<!--          <el-select v-model="chartParams.year" placeholder="请选择年份" clearable size="small">-->
-<!--            <el-option-->
-<!--              v-for="item in yearOption"-->
-<!--              :key="item"-->
-<!--              :label="item"-->
-<!--              :value="item"-->
-<!--            />-->
-<!--          </el-select>-->
-<!--        </el-form-item>-->
-<!--        <el-form-item>-->
-<!--          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>-->
-<!--        </el-form-item>-->
-<!--      </el-form>-->
-<!--      </el-row>-->
-      <el-row>
-        <el-col>
-          <el-card class="box-card" shadow="hover">
-            <div slot="header" class="clearfix">
-              <span>{{ $t('实施情况统计') }}</span>
-            </div>
-            <div class="text item">
-              <true-state-data> </true-state-data>
-            </div>
-          </el-card>
-        </el-col>
-      </el-row>
-      <el-row>
-        <el-col>
-          <el-card class="box-card" shadow="hover">
-            <div slot="header" class="clearfix">
-              <span>{{ $t('申请统计') }}</span>
-            </div>
-            <div class="text item">
-              <year-chart> </year-chart>
-            </div>
-          </el-card>
-        </el-col>
-      </el-row>
-      <el-row>
-        <el-col>
-          <el-card class="box-card" shadow="hover">
-            <div slot="header" class="clearfix">
-              <span>{{ $t('变更性质') +$t('空格')+ $t('统计') }}</span>
-            </div>
-            <div class="text item">
-              <change-data> </change-data>
-            </div>
-          </el-card>
-        </el-col>
-      </el-row>
-      <el-row>
-        <el-col>
-          <el-card class="box-card" shadow="hover">
-            <div slot="header" class="clearfix">
-              <span>{{ $t('类别') +$t('空格')+ $t('统计') }}</span>
-            </div>
-            <div class="text item">
-              <category-data> </category-data>
-            </div>
-          </el-card>
-        </el-col>
-      </el-row>
-      <el-row>
-        <el-col>
-          <el-card class="box-card" shadow="hover">
-            <div slot="header" class="clearfix">
-              <span>{{ $t('风险等级统计') }}</span>
-            </div>
-            <div class="text item">
-              <risk-data></risk-data>
-            </div>
-          </el-card>
-        </el-col>
-      </el-row>
-    </el-drawer>
+  <div class="app-container" style="padding: 0 0 0 0">
+    <el-tabs type="border-card"v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="永久MOC" name="first">
+        <PermanentMoc item="1" typename="" v-if="isFirst"></PermanentMoc>
+      </el-tab-pane>
+      <el-tab-pane label="临时MOC" name="second">
+        <TemporaryMoc item="2" typename="" v-if="isSecond"></TemporaryMoc>
+      </el-tab-pane>
+      <el-tab-pane label="带压消漏清单" name="third">
+        <Aquifier item="3" typename="" v-if="isThird"></Aquifier>
+      </el-tab-pane>
+      <el-tab-pane label="临时设施、其它" name="fourth">
+        <Facility item="4" typename="" v-if="isFourth"></Facility>
+      </el-tab-pane>
+      <el-tab-pane label="仪表联锁旁路" name="fifth">
+        <Interlock item="5" typename="" v-if="isFifth"></Interlock>
+      </el-tab-pane>
+      <el-tab-pane label="汇总" name="sixth">
+        <Summary item="6" typename="" v-if="isSixth"></Summary>
+      </el-tab-pane>
+    </el-tabs>
   </div>
 </template>
 
 <script>
-import { listMoc, getMoc, delMoc, addMoc, updateMoc, exportMoc } from "@/api/process/moc";
-import { treeselect } from "@/api/system/dept";
-import { getToken } from "@/utils/auth";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import YearChart from "./yearChart";
-import TrueStateData from "./trueStateData";
-import ChangeData from "./changeData";
-import CategoryData from "./categoryData";
-import RiskData from "./riskData";
+  import PermanentMoc from '@/views/process/moc/permanentMoc/index.vue'
+  import TemporaryMoc from '@/views/process/moc/temporaryMoc/index.vue'
+  import Aquifier from '@/views/process/moc/aquifier/index.vue'
+  import Facility from '@/views/process/moc/facility/index.vue'
+  import Interlock from '@/views/process/moc/interlock/index.vue'
+  import Summary from '@/views/process/moc/summary/index.vue'
 
-import {addCommonfile, allFileList, delCommonfile, updateCommonfile} from "@/api/common/commonfile";
-
-export default {
-  name: "Moc",
-  components: {RiskData, CategoryData, ChangeData, TrueStateData, YearChart, Treeselect},
-  data() {
-    return {
-      mocTypeInfo: {
-        open: false,
-        title: 'MOC类型说明'
-      },
-      drawer: false,
-      direction: 'rtl',
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: false,
-      // 总条数
-      total: 0,
-      // MOC管理表格数据
-      mocList: [],
-      // 弹出层标题
-      title: "",
-      // 部门树选项
-      deptOptions: undefined,
-      clientHeight:300,
-      // 是否显示弹出层
-      open: false,
-      // 装置字典
-      plantCodeOptions: [],
-      // 类别字典
-      categoryOptions: [],
-      // 区域字典
-      areaOptions: [],
-      // PID MASTER更新字典
-      pidMasterOptions: [],
-      // 临时MOC状态字典
-      temporaryStateOptions: [],
-      // SOP更新字典
-      sopUpdateOptions: [],
-      // 文件更新字典
-      docUpdateOptions:[],
-      // 实施情况字典
-      trueStateOptions: [],
-      // 变更性质字典
-      changeNatureOptions: [],
-      // 风险等级字典
-      riskLevelOptions: [],
-      // MOC类型字典
-      mocTypeOptions: [],
-      // MC情况字典
-      mcDetailOptions: [],
-      //时间选择限制
-      ehsCheckDate: '',
-      trainingDatePicker: this.pickerOptionsTraining(),
-      pssrDatePicker: this.pickerOptionsPssr(),
-      // 用户导入参数
-      upload: {
-        //下载模板请求地址
-        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
-        //下载模板类型
-        type: 'moc',
-        // 是否显示弹出层(用户导入)
-        open: false,
-        // 弹出层标题(用户导入)
-        title: "",
-        // 是否禁用上传
-        isUploading: false,
-        // 是否更新已经存在的用户数据
-        updateSupport: 0,
-        // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
-        // 上传的地址
-        url: process.env.VUE_APP_BASE_API + "/process/moc/importData"
-      },
-      // 报告附件参数
-      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,
-        queryParams: {
-          pId: null,
-          pType: 'moc'
-        },
-        pType: 'moc',
-        pId: null,
-        form: {}
-      },
-      pdf : {
-        title: '',
-        pdfUrl: '',
-        numPages: null,
-        open: false,
-        pageNum: 1,
-        pageTotalNum: 1,
-        loadedRatio: 0,
-      },
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 20,
-        plantCode: null,
-        mocNo: null,
-        plantNumber: null,
-        noticeLetter: null,
-        workLetter: null,
-        cteNo: null,
-        investCost: null,
-        category: null,
-        significance: null,
-        classification: null,
-        area: null,
-        dashControl: null,
-        title: null,
-        owner: null,
-        approveTime: null,
-        estimateEndtime: null,
-        endtime: null,
-        trueState: null,
-        changeNature: null,
-        overTime: null,
-        riskLevel: null,
-        training: null,
-        pssr: null,
-        ehsCheck: null,
-        ehsDb: null,
-        pidMaster: null,
-        pssrDb: null,
-        capex: null,
-        remarks: null
-      },
-      chartParams: {
-        year : 2021
-      },
-      yearOption: [2020,2021],
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {},
-      commonRules: {
-        plantCode: [
-          { required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "change" }
-        ],
-        trueState: [
-          { required: true, message: this.$t('实施情况') + this.$t('不能为空'), trigger: "change" }
-        ],
-        deptId: [
-          { required: true, message: this.$t('部门编号') + this.$t('不能为空'), trigger: "blur" }
-        ]
-      },
-      chooseRules: {
-        plantCode: [
-          { required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "change" }
-        ],
-        mocNo: [
-          { required: true, message: this.$t('MOC编号') + this.$t('不能为空'), trigger: "blur" }
-        ],
-        area: [
-          { required: true, message: this.$t('区域') + this.$t('不能为空'), trigger: "change" }
-        ],
-        title: [
-          { required: true, message: this.$t('标题') + this.$t('不能为空'), trigger: "blur" }
-        ],
-        owner: [
-          { required: true, message: this.$t('负责人') + this.$t('不能为空'), trigger: "blur" }
-        ],
-        approveTime: [
-          { required: true, message: this.$t('申请时间') + this.$t('不能为空'), trigger: "blur" }
-        ],
-        endtime: [
-          { required: true, message: this.$t('完成时间') + this.$t('不能为空'), trigger: "blur" }
-        ],
-        trueState: [
-          { required: true, message: this.$t('实施情况') + this.$t('不能为空'), trigger: "change" }
-        ],
-        overTime: [
-          { required: true, message: this.$t('到期时间') + this.$t('不能为空'), trigger: "blur" }
-        ],
-        riskLevel: [
-          { required: true, message: this.$t('风险等级') + this.$t('不能为空'), trigger: "change" }
-        ],
-        ehsCheck: [
-          { required: true, message: this.$t('EHS审查') + this.$t('不能为空'), trigger: "blur" }
-        ],
-        pidMaster: [
-          { required: true, message: this.$t('PID更新') + this.$t('不能为空'), trigger: "blur" }
-        ],
-        sopUpdate: [
-          { required: true, message: this.$t('SOP更新') + this.$t('不能为空'), trigger: "blur" }
-        ],
-        deptId: [
-          { required: true, message: this.$t('部门编号') + this.$t('不能为空'), trigger: "blur" }
-        ]
-      },
-      temporaryRules: {
-        overTime: [
-          { required: true, message: this.$t('到期时间') + this.$t('不能为空'), trigger: "blur" }
-        ],
-        deptId: [
-          { required: true, message: this.$t('部门编号') + this.$t('不能为空'), trigger: "blur" }
-        ]
-      },
-    };
-  },
-  watch: {
-    // 根据名称筛选部门树
-    deptName(val) {
-        this.$refs.tree.filter(val);
-    }
-   },
-  created() {
-    //设置表格高度对应屏幕高度
-    this.$nextTick(() => {
-        this.clientHeight = (document.body.clientHeight - 80) * 0.8
-    })
-    this.getList();
-    this.getTreeselect();
-    this.getDicts("MC_DETAIL").then(response => {
-      this.mcDetailOptions = response.data;
-    });
-    this.getDicts("MOC_TYPE").then(response => {
-      this.mocTypeOptions = response.data;
-    });
-    this.getDicts("PLANT_DIVIDE").then(response => {
-      this.plantCodeOptions = response.data;
-    });
-    this.getDicts("MOC_CATEGORY").then(response => {
-      this.categoryOptions = response.data;
-    });
-    this.getDicts("MOC_AREA").then(response => {
-      this.areaOptions = response.data;
-    });
-    this.getDicts("YES_NO_EN").then(response => {
-      this.pidMasterOptions = response.data;
-      this.sopUpdateOptions = response.data;
-      this.docUpdateOptions = response.data;
-    });
-    this.getDicts("MOC_TEMPORARYSTATE").then(response => {
-      this.temporaryStateOptions = response.data;
-    });
-    this.getDicts("MOC_STATE").then(response => {
-      this.trueStateOptions = response.data;
-    });
-    this.getDicts("MOC_CHANGE").then(response => {
-      this.changeNatureOptions = response.data;
-    });
-    this.getDicts("MOC_RISKLEVEL").then(response => {
-      this.riskLevelOptions = response.data;
-    });
-  },
-  methods: {
-    handleMocTypeQuestionOnClick() {
-      alert('123');
-    },
-    /** 查询MOC管理列表 */
-    getList() {
-      this.loading = true;
-      let _this = this
-      listMoc(this.queryParams).then(response => {
-        this.mocList = response.rows;
-        this.mocList.forEach(function (value,key,arr) {
-          if (value.overTime == null) {
-            _this.mocList[key].overTime = "N.A."
-          }
-        });
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-    //根据分数显示颜色提示
-    tableCellStyle({ row, column, rowIndex, columnIndex }) {
-      if (columnIndex == 3 && row.trueState == 10){
-        return "color: rgba(45, 58, 79, 0.98) "
-      }else if (columnIndex == 3 && row.trueState == 12){
-        return "color: rgba(255, 26, 26, 0.98) "
-      }else if (columnIndex == 3 && row.trueState == 14){
-        return "color: rgba(95, 153, 248, 0.98) "
-      }
-    },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-          treeselect().then(response => {
-              this.deptOptions = response.data;
-          });
-     },
-    // 装置字典翻译
-    plantCodeFormat(row, column) {
-      return this.selectDictLabel(this.plantCodeOptions, row.plantCode);
-    },
-    // 类别字典翻译
-    categoryFormat(row, column) {
-      return this.selectDictLabel(this.categoryOptions, row.category);
-    },
-    // 实施情况字典翻译
-    trueStateFormat(row, column) {
-      return this.selectDictLabel(this.trueStateOptions, row.trueState);
-    },
-    // 变更性质字典翻译
-    changeNatureFormat(row, column) {
-      return this.selectDictLabel(this.changeNatureOptions, row.changeNature);
-    },
-    // 风险等级字典翻译
-    riskLevelFormat(row, column) {
-      return this.selectDictLabel(this.riskLevelOptions, row.riskLevel);
-    },
-    // 区域字典翻译
-    areaFormat(row, column) {
-      return this.selectDictLabel(this.areaOptions, row.area);
+  export default {
+    name: "Moc",
+    components: {
+      PermanentMoc, TemporaryMoc, Aquifier, Facility, Interlock, Summary
     },
-    // PID MASTER更新字典翻译
-    pidMasterFormat(row, column) {
-      return this.selectDictLabel(this.pidMasterOptions, row.pidMaster);
-    },
-    // 临时MOC状态字典翻译
-    temporaryStateFormat(row, column) {
-      return this.selectDictLabel(this.temporaryStateOptions, row.temporaryState);
-    },
-    // SOP更新字典翻译
-    sopUpdateFormat(row, column) {
-      return this.selectDictLabel(this.sopUpdateOptions, row.sopUpdate);
-    },
-    // MC情况字典翻译
-    mcDetailFormat(row, column) {
-      return this.selectDictLabel(this.mcDetailOptions, row.mcDetail);
-    },
-    // MOC类型字典翻译
-    mocTypeFormat(row, column) {
-      return this.selectDictLabel(this.mocTypeOptions, row.mocType);
-    },
-    // 文件更新字典翻译
-    docUpdateFormat(row, column) {
-      return this.selectDictLabel(this.docUpdateOptions, row.docUpdate);
-    },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        id: null,
-        plantCode: null,
-        mocNo: null,
-        plantNumber: null,
-        noticeLetter: null,
-        workLetter: null,
-        cteNo: null,
-        investCost: null,
-        category: null,
-        significance: null,
-        classification: null,
-        area: null,
-        dashControl: null,
-        title: null,
-        owner: null,
-        approveTime: null,
-        estimateEndtime: null,
-        endtime: null,
-        trueState: null,
-        changeNature: null,
-        overTime: null,
-        riskLevel: null,
-        training: null,
-        pssr: null,
-        ehsCheck: null,
-        ehsDb: null,
-        pidMaster: null,
-        pssrDb: null,
-        capex: null,
-        delFlag: null,
-        createrCode: null,
-        createdate: null,
-        updaterCode: null,
-        updatedate: null,
-        deptId: null,
-        remarks: null,
-        temporaryState: null,
-        sopUpdate: null
-      };
-      this.resetForm("form");
-    },
-    // 限制时间范围
-    pickerOptionsTraining() {
-      const self = this
+    data() {
       return {
-        disabledDate(time){
-            return time.getTime() < new Date(self.form.ehsCheck).getTime()
-        }
-      }
-    },
-    pickerOptionsPssr() {
-      const self = this
-      return {
-        disabledDate(time){
-          if (self.form.training != null) {
-            return time.getTime() < new Date(self.form.training).getTime()
-          }else {
-            return time.getTime() < new Date(self.form.ehsCheck).getTime()
-          }
-        }
-      }
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = this.$t('新增') + " " + this.$t('MOC管理');
-    },
-    //实施情况Finished变更
-    changeTrueState(val) {
-      if (val == 10) {
-        this.rules = this.chooseRules
-      }else {
-        this.$refs['form'].clearValidate();
-        this.rules = this.commonRules
-      }
-    },
-    changeChangeNature(val) {
-      if (val == 10) {
-        this.rules = this.temporaryRules
-      }else if (val = 12) {
-        this.$refs['form'].clearValidate();
-        this.form.temporaryState = "14";
-        this.form.overTime = "";
-        this.rules = this.commonRules
-      }
-    },
-    //根据分数显示颜色提示
-    tableCellClassName({ row, column, rowIndex, columnIndex }) {
-      if (columnIndex == 13){
-        return this.changeColor(row.isEhsCheck, row.ehsCheck)
+        // 默认第一个Tab
+        activeName: 'first',
+        isFirst: true,
+        isSecond: false,
+        isThird: false,
+        isFourth: false,
+        isFifth: false,
+        isSixth: false
       }
-      if (columnIndex == 14){
-        return this.changeColor(row.isTraining, row.training)
-      }
-      if (columnIndex == 15){
-        return this.changeColor(row.isPssr, row.pssr)
-      }
-    },
-    changeColor (value, dateValue) {
-      if (value !== "1" && dateValue !== null){
-        return 'cellMoc'
-      }
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      this.rules = this.commonRules
-      const id = row.id || this.ids
-      getMoc(id).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = this.$t('修改') + this.$t('MOC管理');
-      });
-    },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.trueState == "10") {
-            if (this.form.mocNo != null && this.form.plantNumber != null && this.form.category != null && this.form.significance != null && this.form.classification != null
-              && this.form.area != null && this.form.title != null && this.form.owner != null && this.form.approveTime != null && this.form.estimateEndtime != null
-              && this.form.endtime != null && this.form.changeNature != null && this.form.riskLevel != null && this.form.training != null && this.form.pssr != null) {
-              if (this.form.id != null) {
-                updateMoc(this.form).then(response => {
-                  this.msgSuccess(this.$t('修改成功'));
-                  this.open = false;
-                  this.getList();
-                });
-              } else {
-                addMoc(this.form).then(response => {
-                  this.msgSuccess(this.$t('新增成功'));
-                  this.open = false;
-                  this.getList();
-                });
-              }
-            } else {
-              this.msgError(this.$t('存在必填项未填,实施情况修改Finished失败'));
-            }
-          }else {
-            if (this.form.id != null) {
-              updateMoc(this.form).then(response => {
-                this.msgSuccess(this.$t('修改成功'));
-                this.open = false;
-                this.getList();
-              });
-            } else {
-              addMoc(this.form).then(response => {
-                this.msgSuccess(this.$t('新增成功'));
-                this.open = false;
-                this.getList();
-              });
-            }
-          }
-        }
-      });
     },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const ids = row.id || this.ids;
-      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          return delMoc(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess(this.$t('删除成功'));
-        })
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm(this.$t('是否确认导出所有MOC管理数据项?'), this.$t('警告'), {
-          confirmButtonText: this.$t('确定'),
-          cancelButtonText: this.$t('取消'),
-          type: "warning"
-        }).then(function() {
-          return exportMoc(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
-    },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = this.$t('用户导入');
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-        this.$refs['downloadFileForm'].submit()
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-        this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-        this.upload.open = false;
-        this.upload.isUploading = false;
-        this.$refs.upload.clearFiles();
-        if (response.data[0] != null) {
-          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败')+"。", this.$t('导入结果'), { dangerouslyUseHTMLString: true });
-        }else {
-          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
-        }
-        this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-        this.$refs.upload.submit();
-      },
-      //数据分析
-      handleData(){
-        var now = new Date();
-        var year = now.getFullYear(); //得到年份
-        this.yearOption = [year-2 , year-1 ,year]
-        this.drawer = true
-      },
-    /** 报告附件按钮操作 */
-    handleDoc(row , fileType) {
-      this.doc.pType = fileType
-      this.doc.queryParams.pType = fileType
-      this.doc.id = row.id;
-      this.doc.title = row.title;
-      this.doc.open = true;
-      this.doc.queryParams.pId = row.id
-      this.doc.pId = row.id
-      this.getFileList()
-      this.$nextTick(() => {
-        this.$refs.doc.clearFiles()
-      })
-    },
-    getFileList (){
-      allFileList(this.doc.queryParams).then(response => {
-        response.forEach(element => {
-          element["isEdit"] = false
-        });
-        response.forEach(element => {
-          element["isAdd"] = false
-        });
-        this.doc.commonfileList = 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()
-    },
-    // 文件下载处理
-    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()
-    },
-    //pdf预览
-    openPdf(){
-        window.open(this.pdf.pdfUrl);//path是文件的全路径地址
-      },
-      handleSee (row){
-        this.pdf.open =true
-        this.pdf.title = row.fileName
-        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
-      },
-    // 取消
-    cancelFile(row, index) {
-      // 如果是新增的数据
-      if (row.isAdd) {
-        this.doc.commonfileList.splice(index, 1)
-      } else {
-        // 不是新增的数据  还原数据
-        for (const i in row.oldRow) {
-          row[i] = row.oldRow[i]
+    methods: {
+      handleClick(tab) {
+        if (tab.name === 'first') {
+          this.isFirst = true
+          this.isSecond = false
+          this.isThird = false
+          this.isFourth = false
+          this.isFifth = false
+          this.isSixth = false
+        } else if (tab.name === 'second') {
+          this.isFirst = false
+          this.isSecond = true
+          this.isThird = false
+          this.isFourth = false
+          this.isFifth = false
+          this.isSixth = false
+        }else if (tab.name === 'third') {
+          this.isFirst = false
+          this.isSecond = false
+          this.isThird = true
+          this.isFourth = false
+          this.isFifth = false
+          this.isSixth = false
+        }else if (tab.name === 'fourth') {
+          this.isFirst = false
+          this.isSecond = false
+          this.isThird = false
+          this.isFourth = true
+          this.isFifth = false
+          this.isSixth = false
+        }else if (tab.name === 'fifth') {
+          this.isFirst = false
+          this.isSecond = false
+          this.isThird = false
+          this.isFourth = false
+          this.isFifth = true
+          this.isSixth = false
+        }else if (tab.name === 'sixth') {
+          this.isFirst = false
+          this.isSecond = false
+          this.isThird = false
+          this.isFourth = false
+          this.isFifth = false
+          this.isSixth = true
         }
-        row.isEdit = false
       }
-    },
-    edit(row) {
-      // 备份原始数据
-      row['oldRow'] = JSON.parse(JSON.stringify(row));
-      this.$nextTick(() => {
-        row.isEdit = true;
-      })
-    },
-    save(row) {
-      row.isEdit = false;
-      var that = this;
-      that.loading = true;
-      this.form = row;
-      if (row.isAdd == true) {
-        addCommonfile(this.form).then(response => {
-          this.msgSuccess(this.$t('新增成功'));
-          this.open = false;
-          this.getList();
-        });
-      }else {
-        updateCommonfile(this.form).then(response => {
-          this.msgSuccess(this.$t('修改成功'));
-          this.open = false;
-          this.getList();
-        });
-      }
-    },
-    /** 删除按钮操作 */
-    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('删除成功'));
-      })
-    },
-  }
-};
+    }
+  };
 </script>
-<style>
-  #moc-type:hover{
-    cursor: pointer;
-  }
-  .text {
-    font-size: 14px;
-  }
-  .item {
-    margin-bottom: 18px;
-  }
-  .clearfix {
-    color: #1e1e1e;
-  }
-  .clearfix:before,
-  .clearfix:after {
-    display: table;
-    content: "";
-  }
-  .clearfix:after {
-    clear: both
-  }
 
-  .box-card {
-    width: 100%;
-  }
-  .el-drawer__body {
-    overflow: auto;
-  }
-  .el-drawer__container ::-webkit-scrollbar {
-    display: none;
-  }
+<style scoped>
+
 </style>

+ 13 - 0
ui/src/views/process/moc/interlock/index.vue

@@ -0,0 +1,13 @@
+<template>
+    <div>仪表联锁旁路</div>
+</template>
+
+<script>
+    export default {
+        name: "index.vue"
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 0 - 0
ui/src/views/process/moc/categoryData.vue → ui/src/views/process/moc/permanentMoc/categoryData.vue


+ 0 - 0
ui/src/views/process/moc/changeData.vue → ui/src/views/process/moc/permanentMoc/changeData.vue


+ 1660 - 0
ui/src/views/process/moc/permanentMoc/index.vue

@@ -0,0 +1,1660 @@
+<template>
+  <div class="app-container-list">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item :label="$t('MOC编号')" label-width="50" prop="mocNo">
+        <el-input
+          v-model="queryParams.mocNo"
+          :placeholder="$t('请输入') + $t('MOC编号')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('公司MOC编号')" label-width="50" prop="companyMocNo">
+        <el-input
+          v-model="queryParams.companyMocNo"
+          :placeholder="$t('请输入') + $t('公司MOC编号')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('项目号')" label-width="50" prop="projectNo">
+        <el-input
+          v-model="queryParams.projectNo"
+          :placeholder="$t('请输入') + $t('项目号')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('区域')" prop="area">
+        <el-select v-model="queryParams.area" :placeholder="$t('请选择') + $t('区域')">
+          <el-option
+            v-for="dict in areaOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('标题')" prop="title">
+        <el-input
+          v-model="queryParams.title"
+          :placeholder="$t('请输入') + $t('标题')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('MOC类型')" prop="mocType">
+        <el-select v-model="queryParams.mocType" :placeholder="$t('请选择') + $t('MOC类型')">
+          <el-option
+            v-for="dict in areaOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('负责人')" prop="owner">
+        <el-input
+          v-model="queryParams.owner"
+          :placeholder="$t('请输入') + $t('负责人')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('申请时间')" prop="approveTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.approveTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        :placeholder="$t('请选择') + $t('申请时间')">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('MC时间')" prop="mcTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.mcTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        :placeholder="$t('请选择') + $t('MC时间')">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('MC情况')" prop="mcDetail">
+        <el-input
+          v-model="queryParams.mcDetail"
+          :placeholder="$t('请输入') + $t('MC情况')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('备注')" prop="remarks">
+        <el-input
+          v-model="queryParams.remarks"
+          :placeholder="$t('请输入') + $t('备注')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('风险等级')" prop="riskLevel">
+        <el-input
+          v-model="queryParams.riskLevel"
+          :placeholder="$t('请输入') + $t('风险等级')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('EHS评估/审查')" prop="ehsCheck">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.ehsCheck"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        :placeholder="$t('请选择') + $t('EHS评估/审查')">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('培训')" prop="training">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.training"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        :placeholder="$t('请选择') + $t('培训')"
+                        :picker-options="trainingDatePicker">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('PID更新')" prop="pidMaster">
+        <el-select v-model="queryParams.pidMaster" :placeholder="$t('请选择') + $t('PID更新')">
+          <el-option
+            v-for="dict in pidMasterOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('SOP更新')" prop="sopUpdate">
+        <el-select v-model="queryParams.sopUpdate" :placeholder="$t('请选择') + $t('SOP更新')">
+          <el-option
+            v-for="dict in sopUpdateOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('文档更新')" prop="docUpdate">
+        <el-select v-model="queryParams.docUpdate" :placeholder="$t('请选择') + $t('文档更新')">
+          <el-option
+            v-for="dict in docUpdateOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="PSSR" prop="pssr">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.pssr"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        :placeholder="$t('请选择') + 'PSSR'"
+                        :picker-options="pssrDatePicker">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('PSSR编号')" prop="pssrNo">
+        <el-input v-model="queryParams.pssrNo" :placeholder="$t('请输入') + $t('PSSR编号')" />
+      </el-form-item>
+      <!--<el-form-item :label="$t('CTE工作号')" label-width="120" prop="cteNo">-->
+        <!--<el-input-->
+          <!--v-model="queryParams.cteNo"-->
+          <!--:placeholder="$t('请输入') + $t('CTE工作号')"-->
+          <!--clearable-->
+          <!--size="small"-->
+          <!--@keyup.enter.native="handleQuery"-->
+        <!--/>-->
+      <!--</el-form-item>-->
+      <!--<el-form-item :label="$t('实施情况')" prop="trueState" label-width="150">-->
+        <!--<el-select v-model="queryParams.trueState" :placeholder="$t('请选择') + $t('实施情况')" clearable size="small">-->
+          <!--<el-option-->
+            <!--v-for="dict in trueStateOptions"-->
+            <!--:key="dict.dictValue"-->
+            <!--:label="dict.dictLabel"-->
+            <!--:value="dict.dictValue"-->
+          <!--/>-->
+        <!--</el-select>-->
+      <!--</el-form-item>-->
+      <!--<el-form-item :label="$t('变更性质')" prop="changeNature" label-width="150">-->
+        <!--<el-select v-model="queryParams.changeNature" :placeholder="$t('请选择') + $t('变更性质')" clearable size="small">-->
+          <!--<el-option-->
+            <!--v-for="dict in changeNatureOptions"-->
+            <!--:key="dict.dictValue"-->
+            <!--:label="dict.dictLabel"-->
+            <!--:value="dict.dictValue"-->
+          <!--/>-->
+        <!--</el-select>-->
+      <!--</el-form-item>-->
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['process:moc:add']"
+        >{{ $t('新增') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['process:moc:edit']"
+        >{{ $t('修改') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['process:moc:remove']"
+        >{{ $t('删除') }}</el-button>
+      </el-col>
+        <!--<el-col :span="1.5">-->
+            <!--<el-button-->
+                    <!--type="info"-->
+                    <!--icon="el-icon-upload2"-->
+                    <!--size="mini"-->
+                    <!--@click="handleImport"-->
+                    <!--v-hasPermi="['process:moc:edit']"-->
+            <!--&gt;{{ $t('导入') }}</el-button>-->
+        <!--</el-col>-->
+      <!--<el-col :span="1.5">-->
+        <!--<el-button-->
+          <!--type="warning"-->
+          <!--icon="el-icon-download"-->
+          <!--size="mini"-->
+          <!--@click="handleExport"-->
+          <!--v-hasPermi="['process:moc:export']"-->
+        <!--&gt;{{ $t('导出') }}</el-button>-->
+      <!--</el-col>-->
+      <!--<el-col :span="1.5">-->
+        <!--<el-button-->
+          <!--type="primary"-->
+          <!--icon="el-icon-s-data"-->
+          <!--size="mini"-->
+          <!--@click="handleData"-->
+        <!--&gt;{{ $t('数据分析') }}</el-button>-->
+      <!--</el-col>-->
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="mocList" @selection-change="handleSelectionChange" :cell-style="tableCellStyle" :cell-class-name="tableCellClassName" :height="clientHeight" border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column :label="$t('MOC编号')" align="center" width="120" prop="mocNo" :show-overflow-tooltip="true"/>
+      <!--<el-table-column :label="$t('装置编号')" align="center" width="120" prop="plantNumber" :show-overflow-tooltip="true"/>-->
+      <el-table-column :label="$t('公司MOC编号')" align="center" width="120" prop="companyMocNo" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('项目号')" align="center" width="120" prop="projectNo" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('区域')" align="center" prop="area" :formatter="areaFormat" />
+      <el-table-column :label="$t('标题')" align="center" width="320" prop="title" :show-overflow-tooltip="true"/>
+      <el-table-column prop="mocType" label="":show-overflow-tooltip="true" :formatter="mocTypeFormat" width="120">
+        <template slot="header">
+          MOC类型
+          <span
+            @click="mocTypeInfo.open = true"
+            id="moc-type">
+            <i class="el-icon-question"></i>
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('负责人')" align="center" prop="owner" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('申请时间')" align="center" prop="approveTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.approveTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <!--<el-table-column :label="$t('完成时间')" align="center" prop="endtime" width="100">-->
+        <!--<template slot-scope="scope">-->
+          <!--<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>-->
+        <!--</template>-->
+      <!--</el-table-column>-->
+      <!--<el-table-column :label="$t('实施情况')" align="center" prop="trueState" :formatter="trueStateFormat" />-->
+      <!--<el-table-column :label="$t('变更性质')" align="center" prop="changeNature" :formatter="changeNatureFormat" />-->
+      <!--<el-table-column :label="$t('到期时间')" align="center" prop="overTime" width="100">-->
+        <!--<template slot-scope="scope">-->
+          <!--<span v-if="scope.row.overTime !== 'N.A.'">{{ parseTime(scope.row.overTime, '{y}-{m}-{d}') }}</span>-->
+          <!--<span v-if="scope.row.overTime === 'N.A.'">{{ scope.row.overTime }}</span>-->
+        <!--</template>-->
+      <!--</el-table-column>-->
+      <!--<el-table-column :label="$t('临时MOC状态')" align="center" prop="temporaryState" :formatter="temporaryStateFormat" />-->
+      <el-table-column :label="$t('MC时间')" align="center" prop="mcTime" :show-overflow-tooltip="true" width="100"/>
+      <el-table-column :label="$t('MC情况')" align="center" prop="mcDetail" :show-overflow-tooltip="true" width="100" :formatter="mcDetailFormat" />
+      <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"width="130" />
+      <el-table-column :label="$t('风险等级')" align="center" prop="riskLevel" :formatter="riskLevelFormat" />
+      <el-table-column :label="$t('EHS评估/审查')" align="center" width="130" prop="ehsCheck" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span> {{scope.row.ehsCheck}}</span>
+          <el-button icon="el-icon-folder" style="color:#6e96fa" v-if="scope.row.ehsCheck !== null" @click="handleDoc(scope.row , 'moc-ehsCheck')"  circle></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('培训')" align="center" width="130" prop="training" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span> {{scope.row.training}}</span>
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" v-if="scope.row.training !== null" @click="handleDoc(scope.row , 'moc-training')"  circle></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('SOP更新')" align="center" prop="sopUpdate" :formatter="sopUpdateFormat" />
+      <el-table-column :label="$t('PID更新')" align="center" prop="pidMaster" :formatter="pidMasterFormat" />
+      <el-table-column :label="$t('文档更新')" align="center" prop="docUpdate" :formatter="docUpdateFormat" />
+      <el-table-column label="PSSR" align="center" width="130" prop="pssr" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span> {{scope.row.pssr}}</span>
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" v-if="scope.row.pssr !== null" @click="handleDoc(scope.row , 'moc-pssr')"  circle></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('PSSR编号')" align="center" prop="pssrNo" width="130" />
+      <!--<el-table-column :label="$t('通知单')" align="center" prop="noticeLetter" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('工作单')" align="center" prop="workLetter" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('CTE工作号')" align="center" prop="cteNo" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('投资费用(RMB)')" align="center" prop="investCost" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('类别')" align="center" prop="category" :formatter="categoryFormat" />
+      <el-table-column :label="$t('重要性')" align="center" prop="significance" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('分类')" align="center" width="120" prop="classification" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('仪表控制')" align="center" prop="dashControl" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('预计完成时间')" align="center" prop="estimateEndtime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.estimateEndtime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('EHS审查数据库')" align="center" prop="ehsDb" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('PSSR数据库')" align="center" prop="pssrDb" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('CAPEX计划')" align="center" prop="capex" :show-overflow-tooltip="true"/>-->
+      <el-table-column :label="$t('操作')" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['process:moc:edit']"
+          >{{ $t('修改') }}</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['process:moc:remove']"
+          >{{ $t('删除') }}</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改MOC管理对话框 -->
+    <el-dialog v-dialogDrag :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <!--<el-form-item :label="$t('装置名称')" prop="plantCode">-->
+          <!--<el-select v-model="form.plantCode" :placeholder="$t('请选择') + $t('装置名称')">-->
+            <!--<el-option-->
+              <!--v-for="dict in plantCodeOptions"-->
+              <!--:key="dict.dictValue"-->
+              <!--:label="dict.dictLabel"-->
+              <!--:value="dict.dictValue"-->
+            <!--&gt;</el-option>-->
+          <!--</el-select>-->
+        <!--</el-form-item>-->
+        <el-form-item :label="$t('MOC编号')" prop="mocNo">
+          <el-input v-model="form.mocNo" :placeholder="$t('请输入') + $t('MOC编号')" />
+        </el-form-item>
+        <el-form-item :label="$t('公司MOC编号')" prop="companyMocNo">
+          <el-input v-model="form.companyMocNo" :placeholder="$t('请输入') + $t('公司MOC编号')" />
+        </el-form-item>
+        <el-form-item :label="$t('项目号')" prop="projectNo">
+          <el-input v-model="form.projectNo" :placeholder="$t('请输入') + $t('项目号')" />
+        </el-form-item>
+        <el-form-item :label="$t('区域')" prop="area">
+          <el-select v-model="form.area" :placeholder="$t('请选择') + $t('区域')">
+            <el-option
+              v-for="dict in areaOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('标题')" prop="title">
+          <el-input v-model="form.title" :placeholder="$t('请输入') + $t('标题')" />
+        </el-form-item>
+        <el-form-item :label="$t('MOC类型')" prop="mocType">
+          <el-select v-model="form.mocType" :placeholder="$t('请选择') + $t('MOC类型')">
+            <el-option
+              v-for="dict in mocTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('负责人')" prop="owner">
+          <el-input v-model="form.owner" :placeholder="$t('请输入') + $t('负责人')" />
+        </el-form-item>
+        <el-form-item :label="$t('申请时间')" prop="approveTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.approveTime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('申请时间')">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('MC时间')" prop="mcTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.mcTime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('MC时间')">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('MC情况')" prop="mcDetail">
+          <el-select v-model="form.mcDetail" :placeholder="$t('请选择') + $t('MC情况')">
+            <el-option
+              v-for="dict in mcDetailOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <!--<el-form-item :label="$t('完成时间')" prop="endtime">-->
+          <!--<el-date-picker clearable size="small" style="width: 200px"-->
+                          <!--v-model="form.endtime"-->
+                          <!--type="date"-->
+                          <!--value-format="yyyy-MM-dd"-->
+                          <!--:placeholder="$t('请选择') + $t('完成时间')">-->
+          <!--</el-date-picker>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item :label="$t('实施情况')" prop="trueState">-->
+          <!--<el-select v-model="form.trueState" :placeholder="$t('请选择') + $t('实施情况')" @change="changeTrueState($event)">-->
+            <!--<el-option-->
+              <!--v-for="dict in trueStateOptions"-->
+              <!--:key="dict.dictValue"-->
+              <!--:label="dict.dictLabel"-->
+              <!--:value="dict.dictValue"-->
+            <!--&gt;</el-option>-->
+          <!--</el-select>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item :label="$t('变更性质')" prop="changeNature">-->
+          <!--<el-select v-model="form.changeNature" :placeholder="$t('请选择') + $t('变更性质')" @change="changeChangeNature($event)">-->
+            <!--<el-option-->
+              <!--v-for="dict in changeNatureOptions"-->
+              <!--:key="dict.dictValue"-->
+              <!--:label="dict.dictLabel"-->
+              <!--:value="dict.dictValue"-->
+            <!--&gt;</el-option>-->
+          <!--</el-select>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item :label="$t('到期时间')" prop="overTime">-->
+          <!--<el-date-picker clearable size="small" style="width: 200px"-->
+                          <!--v-model="form.overTime"-->
+                          <!--type="date"-->
+                          <!--value-format="yyyy-MM-dd"-->
+                          <!--:placeholder="$t('请选择') + $t('到期时间')">-->
+          <!--</el-date-picker>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item :label="$t('临时MOC状态')" prop="temporaryState">-->
+          <!--<el-select v-model="form.temporaryState" :placeholder="$t('请选择') + $t('临时MOC状态')">-->
+            <!--<el-option-->
+              <!--v-for="dict in temporaryStateOptions"-->
+              <!--:key="dict.dictValue"-->
+              <!--:label="dict.dictLabel"-->
+              <!--:value="dict.dictValue"-->
+            <!--&gt;</el-option>-->
+          <!--</el-select>-->
+        <!--</el-form-item>-->
+        <el-form-item :label="$t('备注')" prop="remarks">
+          <el-input v-model="form.remarks" type="textarea" :placeholder="$t('请输入') + $t('备注')" />
+        </el-form-item>
+        <el-form-item :label="$t('风险等级')" prop="riskLevel">
+          <el-select v-model="form.riskLevel" :placeholder="$t('请选择') + $t('风险等级')">
+            <el-option
+              v-for="dict in riskLevelOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('EHS评估/审查')" prop="ehsCheck">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.ehsCheck"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('EHS评估/审查')">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('培训')" prop="training">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.training"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('培训')"
+                          :picker-options="trainingDatePicker">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('PID更新')" prop="pidMaster">
+          <el-select v-model="form.pidMaster" :placeholder="$t('请选择') + $t('PID更新')">
+            <el-option
+              v-for="dict in pidMasterOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('SOP更新')" prop="sopUpdate">
+          <el-select v-model="form.sopUpdate" :placeholder="$t('请选择') + $t('SOP更新')">
+            <el-option
+              v-for="dict in sopUpdateOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('文档更新')" prop="docUpdate">
+          <el-select v-model="form.docUpdate" :placeholder="$t('请选择') + $t('文档更新')">
+            <el-option
+              v-for="dict in docUpdateOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="PSSR" prop="pssr">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.pssr"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + 'PSSR'"
+                          :picker-options="pssrDatePicker">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('PSSR编号')" prop="pssrNo">
+          <el-input v-model="form.pssrNo" :placeholder="$t('请输入') + $t('PSSR编号')" />
+        </el-form-item>
+        <!--<el-form-item :label="$t('装置编号')" prop="plantNumber">
+          <el-input v-model="form.plantNumber" :placeholder="$t('请输入') + $t('装置编号')" />
+        </el-form-item>
+        <el-form-item :label="$t('通知单')" prop="noticeLetter">
+          <el-input v-model="form.noticeLetter" :placeholder="$t('请输入') + $t('通知单')" />
+        </el-form-item>
+        <el-form-item :label="$t('工作单')" prop="workLetter">
+          <el-input v-model="form.workLetter" :placeholder="$t('请输入') + $t('工作单')" />
+        </el-form-item>
+        <el-form-item :label="$t('CTE工作号')" prop="cteNo">
+          <el-input v-model="form.cteNo" :placeholder="$t('请输入') + $t('CTE工作号')" />
+        </el-form-item>
+        <el-form-item :label="$t('投资费用(RMB)')" prop="investCost">
+          <el-input v-model="form.investCost" :placeholder="$t('请输入') + $t('投资费用(RMB)')" />
+        </el-form-item>
+        <el-form-item :label="$t('类别')" prop="category">
+          <el-select v-model="form.category" :placeholder="$t('请选择') + $t('类别')">
+            <el-option
+              v-for="dict in categoryOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('重要性')" prop="significance">
+          <el-input v-model="form.significance" :placeholder="$t('请输入') + $t('重要性')" />
+        </el-form-item>
+        <el-form-item :label="$t('分类')" prop="classification">
+          <el-input v-model="form.classification" :placeholder="$t('请输入') + $t('分类')" />
+        </el-form-item>
+        <el-form-item :label="$t('仪表控制')" prop="dashControl">
+          <el-input v-model="form.dashControl" :placeholder="$t('请输入') + $t('仪表控制')" />
+        </el-form-item>
+        <el-form-item :label="$t('预计完成时间')" prop="estimateEndtime">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.estimateEndtime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('预计完成时间')">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('EHS审查数据库')" prop="ehsDb">
+          <el-input v-model="form.ehsDb" :placeholder="$t('请输入') + $t('EHS审查数据库')" />
+        </el-form-item>
+        <el-form-item :label="$t('PSSR数据库')" prop="pssrDb">
+          <el-input v-model="form.pssrDb" :placeholder="$t('请输入') + $t('PSSR数据库')" />
+        </el-form-item>
+        <el-form-item :label="$t('CAPEX计划')" prop="capex">
+          <el-input v-model="form.capex" :placeholder="$t('请输入') + $t('CAPEX计划')" />
+        </el-form-item>-->
+        <el-form-item :label="$t('归属部门')" prop="deptId">
+          <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" :placeholder="$t('请选择') + $t('归属部门')" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
+        <el-button @click="cancel">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+      <!-- 用户导入对话框 -->
+      <el-dialog v-dialogDrag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+          <el-upload
+                  ref="upload"
+                  :limit="1"
+                  accept=".xlsx, .xls"
+                  :headers="upload.headers"
+                  :action="upload.url"
+                  :disabled="upload.isUploading"
+                  :on-progress="handleFileUploadProgress"
+                  :on-success="handleFileSuccess"
+                  :auto-upload="false"
+                  drag
+          >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">
+                  {{ $t('将文件拖到此处,或') }}
+                  <em>{{ $t('点击上传') }}</em>
+              </div>
+              <div class="el-upload__tip" slot="tip">
+                  <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
+                  <el-link type="info" style="font-size:12px" @click="importTemplate">{{ $t('下载模板') }}</el-link>
+              </div>
+              <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
+                <input name="type" :value="upload.type" hidden />
+              </form>
+              <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
+          </el-upload>
+          <div slot="footer" class="dialog-footer">
+              <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>
+              <el-button @click="upload.open = false">{{ $t('取 消') }}</el-button>
+          </div>
+      </el-dialog>
+    <!-- 报告附件对话框 -->
+    <el-dialog v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px" append-to-body >
+      <el-upload v-hasPermi="['training:trainingrecords:file']"
+                 ref="doc"
+                 :limit="50"
+                 :headers="doc.headers"
+                 :action="doc.url + '?pType=' + doc.pType + '&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>
+      <el-table :data="doc.commonfileList" 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" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}</el-button>
+            <el-button v-hasPermi="['training:trainingrecords:file']"  type="text" size="small" v-if="scope.row.isEdit" @click="save(scope.row)">{{ $t('保存') }}</el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">{{ $t('取消') }}</el-button>
+<!--            <el-button v-hasPermi="['training:trainingrecords:file']" v-if="!scope.row.isEdit" @click="edit(scope.row)" icon="el-icon-edit" type="text" size="mini">编辑</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-hasPermi="['training:trainingrecords:file']"
+            >{{ $t('删除') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" 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 :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- MOC类型说明对话框 -->
+    <el-dialog v-dialogDrag :title="mocTypeInfo.title" :visible.sync="mocTypeInfo.open" width="1000px" append-to-body>
+      <el-image
+        style="width: 947px; height: 394px"
+        :src="require('@/assets/image/moc/mocTypeInfo.png')"
+        fit="fill"></el-image>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="mocTypeInfo.open = false">{{ $t('确 定') }}</el-button>
+      </div>
+    </el-dialog>
+    <el-drawer
+      :title="$t('数据分析')"
+      size="600px"
+      :visible.sync="drawer"
+      :direction="direction">
+<!--      <el-row style="padding-left: 20px;">-->
+<!--      <el-form :model="chartParams" :inline="true"  label-width="68px">-->
+<!--        <el-form-item :label="$t('年份')" label-width="50" prop="year">-->
+<!--          <el-select v-model="chartParams.year" placeholder="请选择年份" clearable size="small">-->
+<!--            <el-option-->
+<!--              v-for="item in yearOption"-->
+<!--              :key="item"-->
+<!--              :label="item"-->
+<!--              :value="item"-->
+<!--            />-->
+<!--          </el-select>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item>-->
+<!--          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>-->
+<!--        </el-form-item>-->
+<!--      </el-form>-->
+<!--      </el-row>-->
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('实施情况统计') }}</span>
+            </div>
+            <div class="text item">
+              <true-state-data> </true-state-data>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('申请统计') }}</span>
+            </div>
+            <div class="text item">
+              <year-chart> </year-chart>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('变更性质') +$t('空格')+ $t('统计') }}</span>
+            </div>
+            <div class="text item">
+              <change-data> </change-data>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('类别') +$t('空格')+ $t('统计') }}</span>
+            </div>
+            <div class="text item">
+              <category-data> </category-data>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('风险等级统计') }}</span>
+            </div>
+            <div class="text item">
+              <risk-data></risk-data>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import { listPermanent, listTemporary, listAquifier, listFacility, listInterlock, getMoc, delMoc, addMoc, updateMoc, exportMoc } from "@/api/process/moc";
+import { treeselect } from "@/api/system/dept";
+import { getToken } from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import YearChart from "./yearChart";
+import TrueStateData from "./trueStateData";
+import ChangeData from "./changeData";
+import CategoryData from "./categoryData";
+import RiskData from "./riskData";
+
+import {addCommonfile, allFileList, delCommonfile, updateCommonfile} from "@/api/common/commonfile";
+
+export default {
+  name: "PermanentMoc",
+  components: {RiskData, CategoryData, ChangeData, TrueStateData, YearChart, Treeselect},
+  data() {
+    var validateDocUpdate = (rule, value, callback) => {
+      if (value == 1) {
+        if (this.form.pidMaster == 0 && this.form.sopUpdate == 0) {
+          return callback(new Error('PID/SOP未更新'));
+        } else {
+          return callback();
+        }
+      } else {
+        return callback();
+      }
+    };
+    return {
+      mocTypeInfo: {
+        open: false,
+        title: 'MOC类型说明'
+      },
+      drawer: false,
+      direction: 'rtl',
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // MOC管理表格数据
+      mocList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight:300,
+      // 是否显示弹出层
+      open: false,
+      // 装置字典
+      plantCodeOptions: [],
+      // 类别字典
+      categoryOptions: [],
+      // 区域字典
+      areaOptions: [],
+      // PID MASTER更新字典
+      pidMasterOptions: [],
+      // 临时MOC状态字典
+      temporaryStateOptions: [],
+      // SOP更新字典
+      sopUpdateOptions: [],
+      // 文件更新字典
+      docUpdateOptions:[],
+      // 实施情况字典
+      trueStateOptions: [],
+      // 变更性质字典
+      changeNatureOptions: [],
+      // 风险等级字典
+      riskLevelOptions: [],
+      // MOC类型字典
+      mocTypeOptions: [],
+      // MC情况字典
+      mcDetailOptions: [],
+      //时间选择限制
+      ehsCheckDate: '',
+      trainingDatePicker: this.pickerOptionsTraining(),
+      pssrDatePicker: this.pickerOptionsPssr(),
+      // 用户导入参数
+      upload: {
+        //下载模板请求地址
+        downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+        //下载模板类型
+        type: 'moc',
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/process/moc/importData"
+      },
+      // 报告附件参数
+      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,
+        queryParams: {
+          pId: null,
+          pType: 'moc'
+        },
+        pType: 'moc',
+        pId: null,
+        form: {}
+      },
+      pdf : {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        plantCode: null,
+        mocNo: null,
+        plantNumber: null,
+        noticeLetter: null,
+        workLetter: null,
+        cteNo: null,
+        investCost: null,
+        category: null,
+        significance: null,
+        classification: null,
+        area: null,
+        dashControl: null,
+        title: null,
+        owner: null,
+        approveTime: null,
+        estimateEndtime: null,
+        endtime: null,
+        trueState: null,
+        changeNature: null,
+        overTime: null,
+        riskLevel: null,
+        training: null,
+        pssr: null,
+        ehsCheck: null,
+        ehsDb: null,
+        pidMaster: null,
+        pssrDb: null,
+        capex: null,
+        remarks: null,
+        companyMocNo: null,
+        projectNo: null,
+        mocType: null,
+        mcTime: null,
+        mcDetail: null,
+        docUpdate: null,
+        pssrNo: null,
+        timeliness: null,
+        tempCategory: null,
+        expTime: null,
+        tempState: null,
+      },
+      chartParams: {
+        year : 2021
+      },
+      yearOption: [2020,2021],
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        mocNo: [
+            { required: true, message: this.$t('MOC编号') + this.$t('不能为空'), trigger: "change" }
+        ],
+        // companyMocNo: [
+        //   { required: true, message: this.$t('公司MOC编号') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // projectNo: [
+        //   { required: true, message: this.$t('项目号') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // area: [
+        //   { required: true, message: this.$t('区域') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // title: [
+        //   { required: true, message: this.$t('标题') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // mocType: [
+        //   { required: true, message: this.$t('MOC类型') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // owner: [
+        //   { required: true, message: this.$t('负责人') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // approveTime: [
+        //   { required: true, message: this.$t('申请时间') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // mcTime: [
+        //   { required: true, message: this.$t('MC时间') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // mcDetail: [
+        //   { required: true, message: this.$t('MC情况') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // remarks: [
+        //   { required: true, message: this.$t('备注') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // riskLevel: [
+        //   { required: true, message: this.$t('风险等级') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // ehsCheck: [
+        //   { required: true, message: this.$t('EHS评估/审查') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // training: [
+        //   { required: true, message: this.$t('培训') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // pidMaster: [
+        //   { required: true, message: this.$t('PID更新') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // sopUpdate: [
+        //   { required: true, message: this.$t('SOP更新') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        docUpdate: [
+          // { required: true, message: this.$t('文档更新') + this.$t('不能为空'), trigger: "change" },
+          { validator: validateDocUpdate, trigger: 'change' }
+        ],
+        // pssr: [
+        //   { required: true, message: this.$t('PSSR') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        // pssrNo: [
+        //   { required: true, message: this.$t('PSSR编号') + this.$t('不能为空'), trigger: "change" }
+        // ],
+        deptId: [
+          { required: true, message: this.$t('归属部门') + this.$t('不能为空'), trigger: "change" }
+        ],
+      },
+      // commonRules: {
+      //   plantCode: [
+      //     { required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "change" }
+      //   ],
+      //   trueState: [
+      //     { required: true, message: this.$t('实施情况') + this.$t('不能为空'), trigger: "change" }
+      //   ],
+      //   deptId: [
+      //     { required: true, message: this.$t('部门编号') + this.$t('不能为空'), trigger: "blur" }
+      //   ]
+      // },
+      // chooseRules: {
+      //   plantCode: [
+      //     { required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "change" }
+      //   ],
+      //   mocNo: [
+      //     { required: true, message: this.$t('MOC编号') + this.$t('不能为空'), trigger: "blur" }
+      //   ],
+      //   area: [
+      //     { required: true, message: this.$t('区域') + this.$t('不能为空'), trigger: "change" }
+      //   ],
+      //   title: [
+      //     { required: true, message: this.$t('标题') + this.$t('不能为空'), trigger: "blur" }
+      //   ],
+      //   owner: [
+      //     { required: true, message: this.$t('负责人') + this.$t('不能为空'), trigger: "blur" }
+      //   ],
+      //   approveTime: [
+      //     { required: true, message: this.$t('申请时间') + this.$t('不能为空'), trigger: "blur" }
+      //   ],
+      //   endtime: [
+      //     { required: true, message: this.$t('完成时间') + this.$t('不能为空'), trigger: "blur" }
+      //   ],
+      //   trueState: [
+      //     { required: true, message: this.$t('实施情况') + this.$t('不能为空'), trigger: "change" }
+      //   ],
+      //   overTime: [
+      //     { required: true, message: this.$t('到期时间') + this.$t('不能为空'), trigger: "blur" }
+      //   ],
+      //   riskLevel: [
+      //     { required: true, message: this.$t('风险等级') + this.$t('不能为空'), trigger: "change" }
+      //   ],
+      //   ehsCheck: [
+      //     { required: true, message: this.$t('EHS审查') + this.$t('不能为空'), trigger: "blur" }
+      //   ],
+      //   pidMaster: [
+      //     { required: true, message: this.$t('PID更新') + this.$t('不能为空'), trigger: "blur" }
+      //   ],
+      //   sopUpdate: [
+      //     { required: true, message: this.$t('SOP更新') + this.$t('不能为空'), trigger: "blur" }
+      //   ],
+      //   docUpdate: [
+      //     { required: true, message: this.$t('SOP更新') + this.$t('不能为空'), trigger: "blur" }
+      //   ],
+      //   deptId: [
+      //     { required: true, message: this.$t('部门编号') + this.$t('不能为空'), trigger: "blur" }
+      //   ]
+      // },
+      // temporaryRules: {
+      //   overTime: [
+      //     { required: true, message: this.$t('到期时间') + this.$t('不能为空'), trigger: "blur" }
+      //   ],
+      //   deptId: [
+      //     { required: true, message: this.$t('部门编号') + this.$t('不能为空'), trigger: "blur" }
+      //   ]
+      // },
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+        this.$refs.tree.filter(val);
+    }
+   },
+  created() {
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+        this.clientHeight = (document.body.clientHeight - 80) * 0.8
+    })
+    this.getList();
+    this.getTreeselect();
+    this.getDicts("MC_DETAIL").then(response => {
+      this.mcDetailOptions = response.data;
+    });
+    this.getDicts("MOC_TYPE").then(response => {
+      this.mocTypeOptions = response.data;
+    });
+    this.getDicts("PLANT_DIVIDE").then(response => {
+      this.plantCodeOptions = response.data;
+    });
+    this.getDicts("MOC_CATEGORY").then(response => {
+      this.categoryOptions = response.data;
+    });
+    this.getDicts("MOC_AREA").then(response => {
+      this.areaOptions = response.data;
+    });
+    this.getDicts("YES_NO_EN").then(response => {
+      this.pidMasterOptions = response.data;
+      this.sopUpdateOptions = response.data;
+      this.docUpdateOptions = response.data;
+    });
+    this.getDicts("MOC_TEMPORARYSTATE").then(response => {
+      this.temporaryStateOptions = response.data;
+    });
+    this.getDicts("MOC_STATE").then(response => {
+      this.trueStateOptions = response.data;
+    });
+    this.getDicts("MOC_CHANGE").then(response => {
+      this.changeNatureOptions = response.data;
+    });
+    this.getDicts("MOC_RISKLEVEL").then(response => {
+      this.riskLevelOptions = response.data;
+    });
+  },
+  methods: {
+    /** 查询MOC管理列表 */
+    getList() {
+      this.loading = true;
+      let _this = this
+      listPermanent(this.queryParams).then(response => {
+        this.mocList = response.rows;
+        this.mocList.forEach(function (value,key,arr) {
+          if (value.overTime == null) {
+            _this.mocList[key].overTime = "N.A."
+          }
+        });
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //根据分数显示颜色提示
+    tableCellStyle({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex == 3 && row.trueState == 10){
+        return "color: rgba(45, 58, 79, 0.98) "
+      }else if (columnIndex == 3 && row.trueState == 12){
+        return "color: rgba(255, 26, 26, 0.98) "
+      }else if (columnIndex == 3 && row.trueState == 14){
+        return "color: rgba(95, 153, 248, 0.98) "
+      }
+    },
+     /** 查询部门下拉树结构 */
+     getTreeselect() {
+          treeselect().then(response => {
+              this.deptOptions = response.data;
+          });
+     },
+    // 装置字典翻译
+    plantCodeFormat(row, column) {
+      return this.selectDictLabel(this.plantCodeOptions, row.plantCode);
+    },
+    // 类别字典翻译
+    categoryFormat(row, column) {
+      return this.selectDictLabel(this.categoryOptions, row.category);
+    },
+    // 实施情况字典翻译
+    trueStateFormat(row, column) {
+      return this.selectDictLabel(this.trueStateOptions, row.trueState);
+    },
+    // 变更性质字典翻译
+    changeNatureFormat(row, column) {
+      return this.selectDictLabel(this.changeNatureOptions, row.changeNature);
+    },
+    // 风险等级字典翻译
+    riskLevelFormat(row, column) {
+      return this.selectDictLabel(this.riskLevelOptions, row.riskLevel);
+    },
+    // 区域字典翻译
+    areaFormat(row, column) {
+      return this.selectDictLabel(this.areaOptions, row.area);
+    },
+    // PID MASTER更新字典翻译
+    pidMasterFormat(row, column) {
+      return this.selectDictLabel(this.pidMasterOptions, row.pidMaster);
+    },
+    // 临时MOC状态字典翻译
+    temporaryStateFormat(row, column) {
+      return this.selectDictLabel(this.temporaryStateOptions, row.temporaryState);
+    },
+    // SOP更新字典翻译
+    sopUpdateFormat(row, column) {
+      return this.selectDictLabel(this.sopUpdateOptions, row.sopUpdate);
+    },
+    // MC情况字典翻译
+    mcDetailFormat(row, column) {
+      return this.selectDictLabel(this.mcDetailOptions, row.mcDetail);
+    },
+    // MOC类型字典翻译
+    mocTypeFormat(row, column) {
+      return this.selectDictLabel(this.mocTypeOptions, row.mocType);
+    },
+    // 文件更新字典翻译
+    docUpdateFormat(row, column) {
+      return this.selectDictLabel(this.docUpdateOptions, row.docUpdate);
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        plantCode: null,
+        mocNo: null,
+        plantNumber: null,
+        noticeLetter: null,
+        workLetter: null,
+        cteNo: null,
+        investCost: null,
+        category: null,
+        significance: null,
+        classification: null,
+        area: null,
+        dashControl: null,
+        title: null,
+        owner: null,
+        approveTime: null,
+        estimateEndtime: null,
+        endtime: null,
+        trueState: null,
+        changeNature: null,
+        overTime: null,
+        riskLevel: null,
+        training: null,
+        pssr: null,
+        ehsCheck: null,
+        ehsDb: null,
+        pidMaster: null,
+        pssrDb: null,
+        capex: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        remarks: null,
+        temporaryState: null,
+        sopUpdate: null
+      };
+      this.resetForm("form");
+    },
+    // 限制时间范围
+    pickerOptionsTraining() {
+      const self = this
+      return {
+        disabledDate(time){
+            return time.getTime() < new Date(self.form.ehsCheck).getTime()
+        }
+      }
+    },
+    pickerOptionsPssr() {
+      const self = this
+      return {
+        disabledDate(time){
+          if (self.form.training != null) {
+            return time.getTime() < new Date(self.form.training).getTime()
+          }else {
+            return time.getTime() < new Date(self.form.ehsCheck).getTime()
+          }
+        }
+      }
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = this.$t('新增') + " " + this.$t('MOC管理');
+    },
+    //实施情况Finished变更
+    changeTrueState(val) {
+      if (val == 10) {
+        // this.rules = this.chooseRules
+      }else {
+        this.$refs['form'].clearValidate();
+        // this.rules = this.commonRules
+      }
+    },
+    changeChangeNature(val) {
+      if (val == 10) {
+        // this.rules = this.temporaryRules
+      }else if (val = 12) {
+        this.$refs['form'].clearValidate();
+        this.form.temporaryState = "14";
+        this.form.overTime = "";
+        // this.rules = this.commonRules
+      }
+    },
+    //根据分数显示颜色提示
+    tableCellClassName({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex == 13){
+        return this.changeColor(row.isEhsCheck, row.ehsCheck)
+      }
+      if (columnIndex == 14){
+        return this.changeColor(row.isTraining, row.training)
+      }
+      if (columnIndex == 15){
+        return this.changeColor(row.isPssr, row.pssr)
+      }
+    },
+    changeColor (value, dateValue) {
+      if (value !== "1" && dateValue !== null){
+        return 'cellMoc'
+      }
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      // this.rules = this.commonRules
+      const id = row.id || this.ids
+      getMoc(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = this.$t('修改') + this.$t('MOC管理');
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.trueState == "10") {
+            if (this.form.mocNo != null && this.form.plantNumber != null && this.form.category != null && this.form.significance != null && this.form.classification != null
+              && this.form.area != null && this.form.title != null && this.form.owner != null && this.form.approveTime != null && this.form.estimateEndtime != null
+              && this.form.endtime != null && this.form.changeNature != null && this.form.riskLevel != null && this.form.training != null && this.form.pssr != null) {
+              if (this.form.id != null) {
+                updateMoc(this.form).then(response => {
+                  this.msgSuccess(this.$t('修改成功'));
+                  this.open = false;
+                  this.getList();
+                });
+              } else {
+                this.form.timeliness = 1;
+                addMoc(this.form).then(response => {
+                  this.msgSuccess(this.$t('新增成功'));
+                  this.open = false;
+                  this.getList();
+                });
+              }
+            } else {
+              this.msgError(this.$t('存在必填项未填,实施情况修改Finished失败'));
+            }
+          }else {
+            if (this.form.id != null) {
+              updateMoc(this.form).then(response => {
+                this.msgSuccess(this.$t('修改成功'));
+                this.open = false;
+                this.getList();
+              });
+            } else {
+              this.form.timeliness = 1;
+              addMoc(this.form).then(response => {
+                this.msgSuccess(this.$t('新增成功'));
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return delMoc(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess(this.$t('删除成功'));
+        })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm(this.$t('是否确认导出所有MOC管理数据项?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return exportMoc(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    },
+      /** 导入按钮操作 */
+      handleImport() {
+          this.upload.title = this.$t('用户导入');
+          this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+        this.$refs['downloadFileForm'].submit()
+      },
+      // 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+        this.upload.isUploading = true;
+      },
+      // 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+        this.upload.open = false;
+        this.upload.isUploading = false;
+        this.$refs.upload.clearFiles();
+        if (response.data[0] != null) {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败')+"。", this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }else {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }
+        this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+        this.$refs.upload.submit();
+      },
+      //数据分析
+      handleData(){
+        var now = new Date();
+        var year = now.getFullYear(); //得到年份
+        this.yearOption = [year-2 , year-1 ,year]
+        this.drawer = true
+      },
+    /** 报告附件按钮操作 */
+    handleDoc(row , fileType) {
+      this.doc.pType = fileType
+      this.doc.queryParams.pType = fileType
+      this.doc.id = row.id;
+      this.doc.title = row.title;
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.id
+      this.doc.pId = row.id
+      this.getFileList()
+      this.$nextTick(() => {
+        this.$refs.doc.clearFiles()
+      })
+    },
+    getFileList (){
+      allFileList(this.doc.queryParams).then(response => {
+        response.forEach(element => {
+          element["isEdit"] = false
+        });
+        response.forEach(element => {
+          element["isAdd"] = false
+        });
+        this.doc.commonfileList = 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()
+    },
+    // 文件下载处理
+    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()
+    },
+    //pdf预览
+    openPdf(){
+        window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+      },
+      handleSee (row){
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      },
+    // 取消
+    cancelFile(row, index) {
+      // 如果是新增的数据
+      if (row.isAdd) {
+        this.doc.commonfileList.splice(index, 1)
+      } else {
+        // 不是新增的数据  还原数据
+        for (const i in row.oldRow) {
+          row[i] = row.oldRow[i]
+        }
+        row.isEdit = false
+      }
+    },
+    edit(row) {
+      // 备份原始数据
+      row['oldRow'] = JSON.parse(JSON.stringify(row));
+      this.$nextTick(() => {
+        row.isEdit = true;
+      })
+    },
+    save(row) {
+      row.isEdit = false;
+      var that = this;
+      that.loading = true;
+      this.form = row;
+      if (row.isAdd == true) {
+        addCommonfile(this.form).then(response => {
+          this.msgSuccess(this.$t('新增成功'));
+          this.open = false;
+          this.getList();
+        });
+      }else {
+        updateCommonfile(this.form).then(response => {
+          this.msgSuccess(this.$t('修改成功'));
+          this.open = false;
+          this.getList();
+        });
+      }
+    },
+    /** 删除按钮操作 */
+    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('删除成功'));
+      })
+    },
+  }
+};
+</script>
+<style>
+  #moc-type:hover{
+    cursor: pointer;
+  }
+  .text {
+    font-size: 14px;
+  }
+  .item {
+    margin-bottom: 18px;
+  }
+  .clearfix {
+    color: #1e1e1e;
+  }
+  .clearfix:before,
+  .clearfix:after {
+    display: table;
+    content: "";
+  }
+  .clearfix:after {
+    clear: both
+  }
+
+  .box-card {
+    width: 100%;
+  }
+  .el-drawer__body {
+    overflow: auto;
+  }
+  .el-drawer__container ::-webkit-scrollbar {
+    display: none;
+  }
+</style>

+ 0 - 0
ui/src/views/process/moc/riskData.vue → ui/src/views/process/moc/permanentMoc/riskData.vue


+ 0 - 0
ui/src/views/process/moc/trueStateData.vue → ui/src/views/process/moc/permanentMoc/trueStateData.vue


+ 0 - 0
ui/src/views/process/moc/yearChart.vue → ui/src/views/process/moc/permanentMoc/yearChart.vue


+ 13 - 0
ui/src/views/process/moc/summary/index.vue

@@ -0,0 +1,13 @@
+<template>
+    <div>汇总</div>
+</template>
+
+<script>
+    export default {
+        name: "index.vue"
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 1748 - 0
ui/src/views/process/moc/temporaryMoc/index.vue

@@ -0,0 +1,1748 @@
+<template>
+  <div class="app-container-list">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item :label="$t('MOC编号')" label-width="50" prop="mocNo">
+        <el-input
+          v-model="queryParams.mocNo"
+          :placeholder="$t('请输入') + $t('MOC编号')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('公司MOC编号')" label-width="50" prop="companyMocNo">
+        <el-input
+          v-model="queryParams.companyMocNo"
+          :placeholder="$t('请输入') + $t('公司MOC编号')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('项目号')" label-width="50" prop="projectNo">
+        <el-input
+          v-model="queryParams.projectNo"
+          :placeholder="$t('请输入') + $t('项目号')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('区域')" prop="area">
+        <el-select v-model="queryParams.area" :placeholder="$t('请选择') + $t('区域')">
+          <el-option
+            v-for="dict in areaOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('标题')" prop="title">
+        <el-input
+          v-model="queryParams.title"
+          :placeholder="$t('请输入') + $t('标题')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('MOC类型')" prop="mocType">
+        <el-select v-model="queryParams.mocType" :placeholder="$t('请选择') + $t('MOC类型')">
+          <el-option
+            v-for="dict in areaOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('负责人')" prop="owner">
+        <el-input
+          v-model="queryParams.owner"
+          :placeholder="$t('请输入') + $t('负责人')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('申请时间')" prop="approveTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.approveTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        :placeholder="$t('请选择') + $t('申请时间')">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('MC时间')" prop="mcTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.mcTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        :placeholder="$t('请选择') + $t('MC时间')">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('MC情况')" prop="mcDetail">
+        <el-input
+          v-model="queryParams.mcDetail"
+          :placeholder="$t('请输入') + $t('MC情况')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('到期时间')" prop="mcTime">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.expTime"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        :placeholder="$t('请选择') + $t('到期时间')">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('临时MOC状态')" prop="mocType">
+        <el-select v-model="queryParams.tempState" :placeholder="$t('请选择') + $t('临时MOC状态')">
+          <el-option
+            v-for="dict in tempStateOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item :label="$t('备注')" prop="remarks">
+        <el-input
+          v-model="queryParams.remarks"
+          :placeholder="$t('请输入') + $t('备注')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('风险等级')" prop="riskLevel">
+        <el-input
+          v-model="queryParams.riskLevel"
+          :placeholder="$t('请输入') + $t('风险等级')"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item :label="$t('EHS评估/审查')" prop="ehsCheck">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.ehsCheck"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        :placeholder="$t('请选择') + $t('EHS评估/审查')">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('培训')" prop="training">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.training"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        :placeholder="$t('请选择') + $t('培训')"
+                        :picker-options="trainingDatePicker">
+        </el-date-picker>
+      </el-form-item>
+      <!--<el-form-item :label="$t('PID更新')" prop="pidMaster">-->
+        <!--<el-select v-model="queryParams.pidMaster" :placeholder="$t('请选择') + $t('PID更新')">-->
+          <!--<el-option-->
+            <!--v-for="dict in pidMasterOptions"-->
+            <!--:key="dict.dictValue"-->
+            <!--:label="dict.dictLabel"-->
+            <!--:value="dict.dictValue"-->
+          <!--&gt;</el-option>-->
+        <!--</el-select>-->
+      <!--</el-form-item>-->
+      <!--<el-form-item :label="$t('SOP更新')" prop="sopUpdate">-->
+        <!--<el-select v-model="queryParams.sopUpdate" :placeholder="$t('请选择') + $t('SOP更新')">-->
+          <!--<el-option-->
+            <!--v-for="dict in sopUpdateOptions"-->
+            <!--:key="dict.dictValue"-->
+            <!--:label="dict.dictLabel"-->
+            <!--:value="dict.dictValue"-->
+          <!--&gt;</el-option>-->
+        <!--</el-select>-->
+      <!--</el-form-item>-->
+      <!--<el-form-item :label="$t('文档更新')" prop="docUpdate">-->
+        <!--<el-select v-model="queryParams.docUpdate" :placeholder="$t('请选择') + $t('文档更新')">-->
+          <!--<el-option-->
+            <!--v-for="dict in docUpdateOptions"-->
+            <!--:key="dict.dictValue"-->
+            <!--:label="dict.dictLabel"-->
+            <!--:value="dict.dictValue"-->
+          <!--&gt;</el-option>-->
+        <!--</el-select>-->
+      <!--</el-form-item>-->
+      <el-form-item label="PSSR" prop="pssr">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.pssr"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        :placeholder="$t('请选择') + 'PSSR'"
+                        :picker-options="pssrDatePicker">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item :label="$t('PSSR编号')" prop="pssrNo">
+        <el-input v-model="queryParams.pssrNo" :placeholder="$t('请输入') + $t('PSSR编号')" />
+      </el-form-item>
+      <!--<el-form-item :label="$t('CTE工作号')" label-width="120" prop="cteNo">-->
+      <!--<el-input-->
+      <!--v-model="queryParams.cteNo"-->
+      <!--:placeholder="$t('请输入') + $t('CTE工作号')"-->
+      <!--clearable-->
+      <!--size="small"-->
+      <!--@keyup.enter.native="handleQuery"-->
+      <!--/>-->
+      <!--</el-form-item>-->
+      <!--<el-form-item :label="$t('实施情况')" prop="trueState" label-width="150">-->
+      <!--<el-select v-model="queryParams.trueState" :placeholder="$t('请选择') + $t('实施情况')" clearable size="small">-->
+      <!--<el-option-->
+      <!--v-for="dict in trueStateOptions"-->
+      <!--:key="dict.dictValue"-->
+      <!--:label="dict.dictLabel"-->
+      <!--:value="dict.dictValue"-->
+      <!--/>-->
+      <!--</el-select>-->
+      <!--</el-form-item>-->
+      <!--<el-form-item :label="$t('变更性质')" prop="changeNature" label-width="150">-->
+      <!--<el-select v-model="queryParams.changeNature" :placeholder="$t('请选择') + $t('变更性质')" clearable size="small">-->
+      <!--<el-option-->
+      <!--v-for="dict in changeNatureOptions"-->
+      <!--:key="dict.dictValue"-->
+      <!--:label="dict.dictLabel"-->
+      <!--:value="dict.dictValue"-->
+      <!--/>-->
+      <!--</el-select>-->
+      <!--</el-form-item>-->
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['process:moc:add']"
+        >{{ $t('新增') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['process:moc:edit']"
+        >{{ $t('修改') }}</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['process:moc:remove']"
+        >{{ $t('删除') }}</el-button>
+      </el-col>
+      <!--<el-col :span="1.5">-->
+      <!--<el-button-->
+      <!--type="info"-->
+      <!--icon="el-icon-upload2"-->
+      <!--size="mini"-->
+      <!--@click="handleImport"-->
+      <!--v-hasPermi="['process:moc:edit']"-->
+      <!--&gt;{{ $t('导入') }}</el-button>-->
+      <!--</el-col>-->
+      <!--<el-col :span="1.5">-->
+      <!--<el-button-->
+      <!--type="warning"-->
+      <!--icon="el-icon-download"-->
+      <!--size="mini"-->
+      <!--@click="handleExport"-->
+      <!--v-hasPermi="['process:moc:export']"-->
+      <!--&gt;{{ $t('导出') }}</el-button>-->
+      <!--</el-col>-->
+      <!--<el-col :span="1.5">-->
+      <!--<el-button-->
+      <!--type="primary"-->
+      <!--icon="el-icon-s-data"-->
+      <!--size="mini"-->
+      <!--@click="handleData"-->
+      <!--&gt;{{ $t('数据分析') }}</el-button>-->
+      <!--</el-col>-->
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading"
+              :data="mocList"
+              @selection-change="handleSelectionChange"
+              :cell-style="tableCellStyle"
+              :cell-class-name="tableCellClassName"
+              :height="clientHeight"
+              border>
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column :label="$t('MOC编号')" align="center" width="120" prop="mocNo" :show-overflow-tooltip="true"/>
+      <!--<el-table-column :label="$t('装置编号')" align="center" width="120" prop="plantNumber" :show-overflow-tooltip="true"/>-->
+      <el-table-column :label="$t('公司MOC编号')" align="center" width="120" prop="companyMocNo" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('项目号')" align="center" width="120" prop="projectNo" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('区域')" align="center" prop="area" :formatter="areaFormat" />
+      <el-table-column :label="$t('标题')" align="center" width="320" prop="title" :show-overflow-tooltip="true"/>
+      <el-table-column prop="mocType" label="":show-overflow-tooltip="true" :formatter="mocTypeFormat" width="120">
+        <template slot="header">
+          MOC类型
+          <span
+            @click="mocTypeInfo.open = true"
+            id="moc-type">
+            <i class="el-icon-question"></i>
+          </span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('负责人')" align="center" prop="owner" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('申请时间')" align="center" prop="approveTime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.approveTime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <!--<el-table-column :label="$t('完成时间')" align="center" prop="endtime" width="100">-->
+      <!--<template slot-scope="scope">-->
+      <!--<span>{{ parseTime(scope.row.endtime, '{y}-{m}-{d}') }}</span>-->
+      <!--</template>-->
+      <!--</el-table-column>-->
+      <!--<el-table-column :label="$t('实施情况')" align="center" prop="trueState" :formatter="trueStateFormat" />-->
+      <!--<el-table-column :label="$t('变更性质')" align="center" prop="changeNature" :formatter="changeNatureFormat" />-->
+      <!--<el-table-column :label="$t('到期时间')" align="center" prop="overTime" width="100">-->
+      <!--<template slot-scope="scope">-->
+      <!--<span v-if="scope.row.overTime !== 'N.A.'">{{ parseTime(scope.row.overTime, '{y}-{m}-{d}') }}</span>-->
+      <!--<span v-if="scope.row.overTime === 'N.A.'">{{ scope.row.overTime }}</span>-->
+      <!--</template>-->
+      <!--</el-table-column>-->
+      <!--<el-table-column :label="$t('临时MOC状态')" align="center" prop="temporaryState" :formatter="temporaryStateFormat" />-->
+      <el-table-column :label="$t('MC时间')" align="center" prop="mcTime" :show-overflow-tooltip="true" width="100"/>
+      <el-table-column :label="$t('MC情况')" align="center" prop="mcDetail" :show-overflow-tooltip="true" width="100" :formatter="mcDetailFormat" />
+      <el-table-column :label="$t('到期时间')" align="center" prop="expTime" :show-overflow-tooltip="true" width="100"/>
+      <el-table-column :label="$t('临时MOC状态')" align="center" prop="mcDetail" :show-overflow-tooltip="true" width="100" :formatter="tempStateFormat" />
+      <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"width="130" />
+      <el-table-column :label="$t('风险等级')" align="center" prop="riskLevel" :formatter="riskLevelFormat" />
+      <el-table-column :label="$t('EHS评估/审查')" align="center" width="130" prop="ehsCheck" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span> {{scope.row.ehsCheck}}</span>
+          <el-button icon="el-icon-folder" style="color:#6e96fa" v-if="scope.row.ehsCheck !== null" @click="handleDoc(scope.row , 'moc-ehsCheck')"  circle></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('培训')" align="center" width="130" prop="training" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span> {{scope.row.training}}</span>
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" v-if="scope.row.training !== null" @click="handleDoc(scope.row , 'moc-training')"  circle></el-button>
+        </template>
+      </el-table-column>
+      <!--<el-table-column :label="$t('SOP更新')" align="center" prop="sopUpdate" :formatter="sopUpdateFormat" />-->
+      <!--<el-table-column :label="$t('PID更新')" align="center" prop="pidMaster" :formatter="pidMasterFormat" />-->
+      <!--<el-table-column :label="$t('文档更新')" align="center" prop="docUpdate" :formatter="docUpdateFormat" />-->
+      <el-table-column label="PSSR" align="center" width="130" prop="pssr" :show-overflow-tooltip="true">
+        <template slot-scope="scope">
+          <span> {{scope.row.pssr}}</span>
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" v-if="scope.row.pssr !== null" @click="handleDoc(scope.row , 'moc-pssr')"  circle></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('PSSR编号')" align="center" prop="pssrNo" width="130" />
+      <!--<el-table-column :label="$t('通知单')" align="center" prop="noticeLetter" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('工作单')" align="center" prop="workLetter" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('CTE工作号')" align="center" prop="cteNo" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('投资费用(RMB)')" align="center" prop="investCost" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('类别')" align="center" prop="category" :formatter="categoryFormat" />
+      <el-table-column :label="$t('重要性')" align="center" prop="significance" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('分类')" align="center" width="120" prop="classification" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('仪表控制')" align="center" prop="dashControl" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('预计完成时间')" align="center" prop="estimateEndtime" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.estimateEndtime, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column :label="$t('EHS审查数据库')" align="center" prop="ehsDb" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('PSSR数据库')" align="center" prop="pssrDb" :show-overflow-tooltip="true"/>
+      <el-table-column :label="$t('CAPEX计划')" align="center" prop="capex" :show-overflow-tooltip="true"/>-->
+      <el-table-column :label="$t('操作')" align="center" fixed="right" width="180" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-circle-close"
+            @click="handleRemove(scope.row)"
+            v-hasPermi="['process:moc:edit']"
+            v-if="scope.row.tempState == 1"
+          >{{ $t('移除') }}</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['process:moc:edit']"
+          >{{ $t('修改') }}</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['process:moc:remove']"
+          >{{ $t('删除') }}</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改MOC管理对话框 -->
+    <el-dialog v-dialogDrag :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <!--<el-form-item :label="$t('装置名称')" prop="plantCode">-->
+        <!--<el-select v-model="form.plantCode" :placeholder="$t('请选择') + $t('装置名称')">-->
+        <!--<el-option-->
+        <!--v-for="dict in plantCodeOptions"-->
+        <!--:key="dict.dictValue"-->
+        <!--:label="dict.dictLabel"-->
+        <!--:value="dict.dictValue"-->
+        <!--&gt;</el-option>-->
+        <!--</el-select>-->
+        <!--</el-form-item>-->
+        <el-form-item :label="$t('MOC编号')" prop="mocNo">
+          <el-input v-model="form.mocNo" :placeholder="$t('请输入') + $t('MOC编号')" />
+        </el-form-item>
+        <el-form-item :label="$t('公司MOC编号')" prop="companyMocNo">
+          <el-input v-model="form.companyMocNo" :placeholder="$t('请输入') + $t('公司MOC编号')" />
+        </el-form-item>
+        <el-form-item :label="$t('项目号')" prop="projectNo">
+          <el-input v-model="form.projectNo" :placeholder="$t('请输入') + $t('项目号')" />
+        </el-form-item>
+        <el-form-item :label="$t('区域')" prop="area">
+          <el-select v-model="form.area" :placeholder="$t('请选择') + $t('区域')">
+            <el-option
+              v-for="dict in areaOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('标题')" prop="title">
+          <el-input v-model="form.title" :placeholder="$t('请输入') + $t('标题')" />
+        </el-form-item>
+        <el-form-item :label="$t('MOC类型')" prop="mocType">
+          <el-select v-model="form.mocType" :placeholder="$t('请选择') + $t('MOC类型')">
+            <el-option
+              v-for="dict in mocTypeOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('负责人')" prop="owner">
+          <el-input v-model="form.owner" :placeholder="$t('请输入') + $t('负责人')" />
+        </el-form-item>
+        <el-form-item :label="$t('申请时间')" prop="approveTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.approveTime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('申请时间')">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('MC时间')" prop="mcTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.mcTime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('MC时间')">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('MC情况')" prop="mcDetail">
+          <el-select v-model="form.mcDetail" :placeholder="$t('请选择') + $t('MC情况')">
+            <el-option
+              v-for="dict in mcDetailOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('到期时间')" prop="mcTime">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.expTime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('到期时间')">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('临时MOC状态')" prop="mocType">
+          <el-select v-model="form.tempState" :placeholder="$t('请选择') + $t('临时MOC状态')">
+            <el-option
+              v-for="dict in tempStateOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <!--<el-form-item :label="$t('完成时间')" prop="endtime">-->
+        <!--<el-date-picker clearable size="small" style="width: 200px"-->
+        <!--v-model="form.endtime"-->
+        <!--type="date"-->
+        <!--value-format="yyyy-MM-dd"-->
+        <!--:placeholder="$t('请选择') + $t('完成时间')">-->
+        <!--</el-date-picker>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item :label="$t('实施情况')" prop="trueState">-->
+        <!--<el-select v-model="form.trueState" :placeholder="$t('请选择') + $t('实施情况')" @change="changeTrueState($event)">-->
+        <!--<el-option-->
+        <!--v-for="dict in trueStateOptions"-->
+        <!--:key="dict.dictValue"-->
+        <!--:label="dict.dictLabel"-->
+        <!--:value="dict.dictValue"-->
+        <!--&gt;</el-option>-->
+        <!--</el-select>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item :label="$t('变更性质')" prop="changeNature">-->
+        <!--<el-select v-model="form.changeNature" :placeholder="$t('请选择') + $t('变更性质')" @change="changeChangeNature($event)">-->
+        <!--<el-option-->
+        <!--v-for="dict in changeNatureOptions"-->
+        <!--:key="dict.dictValue"-->
+        <!--:label="dict.dictLabel"-->
+        <!--:value="dict.dictValue"-->
+        <!--&gt;</el-option>-->
+        <!--</el-select>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item :label="$t('到期时间')" prop="overTime">-->
+        <!--<el-date-picker clearable size="small" style="width: 200px"-->
+        <!--v-model="form.overTime"-->
+        <!--type="date"-->
+        <!--value-format="yyyy-MM-dd"-->
+        <!--:placeholder="$t('请选择') + $t('到期时间')">-->
+        <!--</el-date-picker>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item :label="$t('临时MOC状态')" prop="temporaryState">-->
+        <!--<el-select v-model="form.temporaryState" :placeholder="$t('请选择') + $t('临时MOC状态')">-->
+        <!--<el-option-->
+        <!--v-for="dict in temporaryStateOptions"-->
+        <!--:key="dict.dictValue"-->
+        <!--:label="dict.dictLabel"-->
+        <!--:value="dict.dictValue"-->
+        <!--&gt;</el-option>-->
+        <!--</el-select>-->
+        <!--</el-form-item>-->
+        <el-form-item :label="$t('备注')" prop="remarks">
+          <el-input v-model="form.remarks" type="textarea" :placeholder="$t('请输入') + $t('备注')" />
+        </el-form-item>
+        <el-form-item :label="$t('风险等级')" prop="riskLevel">
+          <el-select v-model="form.riskLevel" :placeholder="$t('请选择') + $t('风险等级')">
+            <el-option
+              v-for="dict in riskLevelOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('EHS评估/审查')" prop="ehsCheck">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.ehsCheck"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('EHS评估/审查')">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('培训')" prop="training">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.training"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('培训')"
+                          :picker-options="trainingDatePicker">
+          </el-date-picker>
+        </el-form-item>
+        <!--<el-form-item :label="$t('PID更新')" prop="pidMaster">-->
+          <!--<el-select v-model="form.pidMaster" :placeholder="$t('请选择') + $t('PID更新')">-->
+            <!--<el-option-->
+              <!--v-for="dict in pidMasterOptions"-->
+              <!--:key="dict.dictValue"-->
+              <!--:label="dict.dictLabel"-->
+              <!--:value="dict.dictValue"-->
+            <!--&gt;</el-option>-->
+          <!--</el-select>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item :label="$t('SOP更新')" prop="sopUpdate">-->
+          <!--<el-select v-model="form.sopUpdate" :placeholder="$t('请选择') + $t('SOP更新')">-->
+            <!--<el-option-->
+              <!--v-for="dict in sopUpdateOptions"-->
+              <!--:key="dict.dictValue"-->
+              <!--:label="dict.dictLabel"-->
+              <!--:value="dict.dictValue"-->
+            <!--&gt;</el-option>-->
+          <!--</el-select>-->
+        <!--</el-form-item>-->
+        <!--<el-form-item :label="$t('文档更新')" prop="docUpdate">-->
+          <!--<el-select v-model="form.docUpdate" :placeholder="$t('请选择') + $t('文档更新')">-->
+            <!--<el-option-->
+              <!--v-for="dict in docUpdateOptions"-->
+              <!--:key="dict.dictValue"-->
+              <!--:label="dict.dictLabel"-->
+              <!--:value="dict.dictValue"-->
+            <!--&gt;</el-option>-->
+          <!--</el-select>-->
+        <!--</el-form-item>-->
+        <el-form-item label="PSSR" prop="pssr">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.pssr"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + 'PSSR'"
+                          :picker-options="pssrDatePicker">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('PSSR编号')" prop="pssrNo">
+          <el-input v-model="form.pssrNo" :placeholder="$t('请输入') + $t('PSSR编号')" />
+        </el-form-item>
+        <!--<el-form-item :label="$t('装置编号')" prop="plantNumber">
+          <el-input v-model="form.plantNumber" :placeholder="$t('请输入') + $t('装置编号')" />
+        </el-form-item>
+        <el-form-item :label="$t('通知单')" prop="noticeLetter">
+          <el-input v-model="form.noticeLetter" :placeholder="$t('请输入') + $t('通知单')" />
+        </el-form-item>
+        <el-form-item :label="$t('工作单')" prop="workLetter">
+          <el-input v-model="form.workLetter" :placeholder="$t('请输入') + $t('工作单')" />
+        </el-form-item>
+        <el-form-item :label="$t('CTE工作号')" prop="cteNo">
+          <el-input v-model="form.cteNo" :placeholder="$t('请输入') + $t('CTE工作号')" />
+        </el-form-item>
+        <el-form-item :label="$t('投资费用(RMB)')" prop="investCost">
+          <el-input v-model="form.investCost" :placeholder="$t('请输入') + $t('投资费用(RMB)')" />
+        </el-form-item>
+        <el-form-item :label="$t('类别')" prop="category">
+          <el-select v-model="form.category" :placeholder="$t('请选择') + $t('类别')">
+            <el-option
+              v-for="dict in categoryOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="dict.dictValue"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item :label="$t('重要性')" prop="significance">
+          <el-input v-model="form.significance" :placeholder="$t('请输入') + $t('重要性')" />
+        </el-form-item>
+        <el-form-item :label="$t('分类')" prop="classification">
+          <el-input v-model="form.classification" :placeholder="$t('请输入') + $t('分类')" />
+        </el-form-item>
+        <el-form-item :label="$t('仪表控制')" prop="dashControl">
+          <el-input v-model="form.dashControl" :placeholder="$t('请输入') + $t('仪表控制')" />
+        </el-form-item>
+        <el-form-item :label="$t('预计完成时间')" prop="estimateEndtime">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.estimateEndtime"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          :placeholder="$t('请选择') + $t('预计完成时间')">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item :label="$t('EHS审查数据库')" prop="ehsDb">
+          <el-input v-model="form.ehsDb" :placeholder="$t('请输入') + $t('EHS审查数据库')" />
+        </el-form-item>
+        <el-form-item :label="$t('PSSR数据库')" prop="pssrDb">
+          <el-input v-model="form.pssrDb" :placeholder="$t('请输入') + $t('PSSR数据库')" />
+        </el-form-item>
+        <el-form-item :label="$t('CAPEX计划')" prop="capex">
+          <el-input v-model="form.capex" :placeholder="$t('请输入') + $t('CAPEX计划')" />
+        </el-form-item>-->
+        <el-form-item :label="$t('归属部门')" prop="deptId">
+          <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" :placeholder="$t('请选择') + $t('归属部门')" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
+        <el-button @click="cancel">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog v-dialogDrag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
+          <el-link type="info" style="font-size:12px" @click="importTemplate">{{ $t('下载模板') }}</el-link>
+        </div>
+        <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
+          <input name="type" :value="upload.type" hidden />
+        </form>
+        <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>
+        <el-button @click="upload.open = false">{{ $t('取 消') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 报告附件对话框 -->
+    <el-dialog v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px" append-to-body >
+      <el-upload v-hasPermi="['training:trainingrecords:file']"
+                 ref="doc"
+                 :limit="50"
+                 :headers="doc.headers"
+                 :action="doc.url + '?pType=' + doc.pType + '&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>
+      <el-table :data="doc.commonfileList" 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" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}</el-button>
+            <el-button v-hasPermi="['training:trainingrecords:file']"  type="text" size="small" v-if="scope.row.isEdit" @click="save(scope.row)">{{ $t('保存') }}</el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">{{ $t('取消') }}</el-button>
+            <!--            <el-button v-hasPermi="['training:trainingrecords:file']" v-if="!scope.row.isEdit" @click="edit(scope.row)" icon="el-icon-edit" type="text" size="mini">编辑</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-hasPermi="['training:trainingrecords:file']"
+            >{{ $t('删除') }}</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" 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 :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- MOC类型说明对话框 -->
+    <el-dialog v-dialogDrag :title="mocTypeInfo.title" :visible.sync="mocTypeInfo.open" width="1000px" append-to-body>
+      <el-image
+        style="width: 947px; height: 394px"
+        :src="require('@/assets/image/moc/mocTypeInfo.png')"
+        fit="fill"></el-image>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="mocTypeInfo.open = false">{{ $t('确 定') }}</el-button>
+      </div>
+    </el-dialog>
+    <el-drawer
+      :title="$t('数据分析')"
+      size="600px"
+      :visible.sync="drawer"
+      :direction="direction">
+      <!--      <el-row style="padding-left: 20px;">-->
+      <!--      <el-form :model="chartParams" :inline="true"  label-width="68px">-->
+      <!--        <el-form-item :label="$t('年份')" label-width="50" prop="year">-->
+      <!--          <el-select v-model="chartParams.year" placeholder="请选择年份" clearable size="small">-->
+      <!--            <el-option-->
+      <!--              v-for="item in yearOption"-->
+      <!--              :key="item"-->
+      <!--              :label="item"-->
+      <!--              :value="item"-->
+      <!--            />-->
+      <!--          </el-select>-->
+      <!--        </el-form-item>-->
+      <!--        <el-form-item>-->
+      <!--          <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>-->
+      <!--        </el-form-item>-->
+      <!--      </el-form>-->
+      <!--      </el-row>-->
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('实施情况统计') }}</span>
+            </div>
+            <div class="text item">
+              <true-state-data> </true-state-data>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('申请统计') }}</span>
+            </div>
+            <div class="text item">
+              <year-chart> </year-chart>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('变更性质') +$t('空格')+ $t('统计') }}</span>
+            </div>
+            <div class="text item">
+              <change-data> </change-data>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('类别') +$t('空格')+ $t('统计') }}</span>
+            </div>
+            <div class="text item">
+              <category-data> </category-data>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row>
+        <el-col>
+          <el-card class="box-card" shadow="hover">
+            <div slot="header" class="clearfix">
+              <span>{{ $t('风险等级统计') }}</span>
+            </div>
+            <div class="text item">
+              <risk-data></risk-data>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+  import { listPermanent, listTemporary, listAquifier, listFacility, listInterlock, getMoc, delMoc, addMoc, updateMoc, exportMoc } from "@/api/process/moc";
+  import { treeselect } from "@/api/system/dept";
+  import { getToken } from "@/utils/auth";
+  import Treeselect from "@riophae/vue-treeselect";
+  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+
+  import {addCommonfile, allFileList, delCommonfile, updateCommonfile} from "@/api/common/commonfile";
+
+  export default {
+    name: "TemporaryMoc",
+    components: { Treeselect },
+    data() {
+      var validateDocUpdate = (rule, value, callback) => {
+        if (value == 1) {
+          if (this.form.pidMaster == 0 && this.form.sopUpdate == 0) {
+            return callback(new Error('PID/SOP未更新'));
+          } else {
+            return callback();
+          }
+        } else {
+          return callback();
+        }
+      };
+      return {
+        mocTypeInfo: {
+          open: false,
+          title: 'MOC类型说明'
+        },
+        drawer: false,
+        direction: 'rtl',
+        // 遮罩层
+        loading: true,
+        // 选中数组
+        ids: [],
+        // 非单个禁用
+        single: true,
+        // 非多个禁用
+        multiple: true,
+        // 显示搜索条件
+        showSearch: false,
+        // 总条数
+        total: 0,
+        // MOC管理表格数据
+        mocList: [],
+        // 弹出层标题
+        title: "",
+        // 部门树选项
+        deptOptions: undefined,
+        clientHeight:300,
+        // 是否显示弹出层
+        open: false,
+        // 装置字典
+        plantCodeOptions: [],
+        // 类别字典
+        categoryOptions: [],
+        // 区域字典
+        areaOptions: [],
+        // PID MASTER更新字典
+        pidMasterOptions: [],
+        // 临时MOC状态字典
+        temporaryStateOptions: [],
+        // 临时MOC状态字典
+        tempStateOptions: [],
+        // SOP更新字典
+        sopUpdateOptions: [],
+        // 文件更新字典
+        docUpdateOptions:[],
+        // 实施情况字典
+        trueStateOptions: [],
+        // 变更性质字典
+        changeNatureOptions: [],
+        // 风险等级字典
+        riskLevelOptions: [],
+        // MOC类型字典
+        mocTypeOptions: [],
+        // MC情况字典
+        mcDetailOptions: [],
+        //时间选择限制
+        ehsCheckDate: '',
+        trainingDatePicker: this.pickerOptionsTraining(),
+        pssrDatePicker: this.pickerOptionsPssr(),
+        // 用户导入参数
+        upload: {
+          //下载模板请求地址
+          downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
+          //下载模板类型
+          type: 'moc',
+          // 是否显示弹出层(用户导入)
+          open: false,
+          // 弹出层标题(用户导入)
+          title: "",
+          // 是否禁用上传
+          isUploading: false,
+          // 是否更新已经存在的用户数据
+          updateSupport: 0,
+          // 设置上传的请求头部
+          headers: { Authorization: "Bearer " + getToken() },
+          // 上传的地址
+          url: process.env.VUE_APP_BASE_API + "/process/moc/importData"
+        },
+        // 报告附件参数
+        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,
+          queryParams: {
+            pId: null,
+            pType: 'moc'
+          },
+          pType: 'moc',
+          pId: null,
+          form: {}
+        },
+        pdf : {
+          title: '',
+          pdfUrl: '',
+          numPages: null,
+          open: false,
+          pageNum: 1,
+          pageTotalNum: 1,
+          loadedRatio: 0,
+        },
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 20,
+          plantCode: null,
+          mocNo: null,
+          plantNumber: null,
+          noticeLetter: null,
+          workLetter: null,
+          cteNo: null,
+          investCost: null,
+          category: null,
+          significance: null,
+          classification: null,
+          area: null,
+          dashControl: null,
+          title: null,
+          owner: null,
+          approveTime: null,
+          estimateEndtime: null,
+          endtime: null,
+          trueState: null,
+          changeNature: null,
+          overTime: null,
+          riskLevel: null,
+          training: null,
+          pssr: null,
+          ehsCheck: null,
+          ehsDb: null,
+          pidMaster: null,
+          pssrDb: null,
+          capex: null,
+          remarks: null,
+          companyMocNo: null,
+          projectNo: null,
+          mocType: null,
+          mcTime: null,
+          mcDetail: null,
+          docUpdate: null,
+          pssrNo: null,
+          timeliness: null,
+          tempCategory: null,
+          expTime: null,
+          tempState: null,
+        },
+        chartParams: {
+          year : 2021
+        },
+        yearOption: [2020,2021],
+        // 表单参数
+        form: {},
+        // 表单校验
+        rules: {
+          mocNo: [
+            { required: true, message: this.$t('MOC编号') + this.$t('不能为空'), trigger: "change" }
+          ],
+          // companyMocNo: [
+          //   { required: true, message: this.$t('公司MOC编号') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // projectNo: [
+          //   { required: true, message: this.$t('项目号') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // area: [
+          //   { required: true, message: this.$t('区域') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // title: [
+          //   { required: true, message: this.$t('标题') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // mocType: [
+          //   { required: true, message: this.$t('MOC类型') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // owner: [
+          //   { required: true, message: this.$t('负责人') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // approveTime: [
+          //   { required: true, message: this.$t('申请时间') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // mcTime: [
+          //   { required: true, message: this.$t('MC时间') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // mcDetail: [
+          //   { required: true, message: this.$t('MC情况') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // remarks: [
+          //   { required: true, message: this.$t('备注') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // riskLevel: [
+          //   { required: true, message: this.$t('风险等级') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // ehsCheck: [
+          //   { required: true, message: this.$t('EHS评估/审查') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // training: [
+          //   { required: true, message: this.$t('培训') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // pidMaster: [
+          //   { required: true, message: this.$t('PID更新') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // sopUpdate: [
+          //   { required: true, message: this.$t('SOP更新') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          docUpdate: [
+            // { required: true, message: this.$t('文档更新') + this.$t('不能为空'), trigger: "change" },
+            { validator: validateDocUpdate, trigger: 'change' }
+          ],
+          // pssr: [
+          //   { required: true, message: this.$t('PSSR') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          // pssrNo: [
+          //   { required: true, message: this.$t('PSSR编号') + this.$t('不能为空'), trigger: "change" }
+          // ],
+          deptId: [
+            { required: true, message: this.$t('归属部门') + this.$t('不能为空'), trigger: "change" }
+          ],
+        },
+        // commonRules: {
+        //   plantCode: [
+        //     { required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "change" }
+        //   ],
+        //   trueState: [
+        //     { required: true, message: this.$t('实施情况') + this.$t('不能为空'), trigger: "change" }
+        //   ],
+        //   deptId: [
+        //     { required: true, message: this.$t('部门编号') + this.$t('不能为空'), trigger: "blur" }
+        //   ]
+        // },
+        // chooseRules: {
+        //   plantCode: [
+        //     { required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "change" }
+        //   ],
+        //   mocNo: [
+        //     { required: true, message: this.$t('MOC编号') + this.$t('不能为空'), trigger: "blur" }
+        //   ],
+        //   area: [
+        //     { required: true, message: this.$t('区域') + this.$t('不能为空'), trigger: "change" }
+        //   ],
+        //   title: [
+        //     { required: true, message: this.$t('标题') + this.$t('不能为空'), trigger: "blur" }
+        //   ],
+        //   owner: [
+        //     { required: true, message: this.$t('负责人') + this.$t('不能为空'), trigger: "blur" }
+        //   ],
+        //   approveTime: [
+        //     { required: true, message: this.$t('申请时间') + this.$t('不能为空'), trigger: "blur" }
+        //   ],
+        //   endtime: [
+        //     { required: true, message: this.$t('完成时间') + this.$t('不能为空'), trigger: "blur" }
+        //   ],
+        //   trueState: [
+        //     { required: true, message: this.$t('实施情况') + this.$t('不能为空'), trigger: "change" }
+        //   ],
+        //   overTime: [
+        //     { required: true, message: this.$t('到期时间') + this.$t('不能为空'), trigger: "blur" }
+        //   ],
+        //   riskLevel: [
+        //     { required: true, message: this.$t('风险等级') + this.$t('不能为空'), trigger: "change" }
+        //   ],
+        //   ehsCheck: [
+        //     { required: true, message: this.$t('EHS审查') + this.$t('不能为空'), trigger: "blur" }
+        //   ],
+        //   pidMaster: [
+        //     { required: true, message: this.$t('PID更新') + this.$t('不能为空'), trigger: "blur" }
+        //   ],
+        //   sopUpdate: [
+        //     { required: true, message: this.$t('SOP更新') + this.$t('不能为空'), trigger: "blur" }
+        //   ],
+        //   docUpdate: [
+        //     { required: true, message: this.$t('SOP更新') + this.$t('不能为空'), trigger: "blur" }
+        //   ],
+        //   deptId: [
+        //     { required: true, message: this.$t('部门编号') + this.$t('不能为空'), trigger: "blur" }
+        //   ]
+        // },
+        // temporaryRules: {
+        //   overTime: [
+        //     { required: true, message: this.$t('到期时间') + this.$t('不能为空'), trigger: "blur" }
+        //   ],
+        //   deptId: [
+        //     { required: true, message: this.$t('部门编号') + this.$t('不能为空'), trigger: "blur" }
+        //   ]
+        // },
+      };
+    },
+    watch: {
+      // 根据名称筛选部门树
+      deptName(val) {
+        this.$refs.tree.filter(val);
+      }
+    },
+    created() {
+      //设置表格高度对应屏幕高度
+      this.$nextTick(() => {
+        this.clientHeight = (document.body.clientHeight - 80) * 0.8
+      })
+      this.getList();
+      this.getTreeselect();
+      this.getDicts("MC_DETAIL").then(response => {
+        this.mcDetailOptions = response.data;
+      });
+      this.getDicts("MOC_TYPE").then(response => {
+        this.mocTypeOptions = response.data;
+      });
+      this.getDicts("PLANT_DIVIDE").then(response => {
+        this.plantCodeOptions = response.data;
+      });
+      this.getDicts("MOC_CATEGORY").then(response => {
+        this.categoryOptions = response.data;
+      });
+      this.getDicts("MOC_AREA").then(response => {
+        this.areaOptions = response.data;
+      });
+      this.getDicts("YES_NO_EN").then(response => {
+        this.pidMasterOptions = response.data;
+        this.sopUpdateOptions = response.data;
+        this.docUpdateOptions = response.data;
+      });
+      this.getDicts("MOC_TEMPORARYSTATE").then(response => {
+        this.temporaryStateOptions = response.data;
+      });
+      this.getDicts("TEMP_STATE").then(response => {
+        this.tempStateOptions = response.data;
+      });
+      this.getDicts("MOC_STATE").then(response => {
+        this.trueStateOptions = response.data;
+      });
+      this.getDicts("MOC_CHANGE").then(response => {
+        this.changeNatureOptions = response.data;
+      });
+      this.getDicts("MOC_RISKLEVEL").then(response => {
+        this.riskLevelOptions = response.data;
+      });
+    },
+    methods: {
+      /** 查询MOC管理列表 */
+      getList() {
+        this.loading = true;
+        let _this = this
+        listTemporary(this.queryParams).then(response => {
+          this.mocList = response.rows;
+          this.mocList.forEach(function (value,key,arr) {
+            if (value.overTime == null) {
+              _this.mocList[key].overTime = "N.A."
+            }
+          });
+          this.total = response.total;
+          this.loading = false;
+        });
+      },
+      tableCellStyle( {row, column, rowIndex, columnIndex} ) {
+        // 移除的数据
+        if (row.tempState == 0) {
+          return "background-color: rgba(0, 255, 0, 0.2);";
+        }
+        // 当前时间
+        let today = new Date();
+        let expTime = new Date(row.expTime);
+        let difference = expTime.getTime() - today.getTime();
+        // 到期时间 - 当前时间 <= 7
+        if (difference <= 7 * 24 * 60 * 60 * 1000) {
+          return "background-color: rgba(255, 0, 0, 0.2);";
+        }
+        // 7 <= 到期时间 - 当前时间 <= 14
+        if (difference >= 7 * 24 * 60 * 60 * 1000
+          && difference <= 14 * 24 * 60 * 60 * 1000) {
+          return "background-color: rgba(255, 255, 0, 0.2);";
+        }
+      },
+      //根据分数显示颜色提示
+      // tableCellStyle({ row, column, rowIndex, columnIndex }) {
+      //   if (columnIndex == 3 && row.trueState == 10){
+      //     return "color: rgba(45, 58, 79, 0.98) "
+      //   }else if (columnIndex == 3 && row.trueState == 12){
+      //     return "color: rgba(255, 26, 26, 0.98) "
+      //   }else if (columnIndex == 3 && row.trueState == 14){
+      //     return "color: rgba(95, 153, 248, 0.98) "
+      //   }
+      // },
+      /** 查询部门下拉树结构 */
+      getTreeselect() {
+        treeselect().then(response => {
+          this.deptOptions = response.data;
+        });
+      },
+      // 装置字典翻译
+      plantCodeFormat(row, column) {
+        return this.selectDictLabel(this.plantCodeOptions, row.plantCode);
+      },
+      // 类别字典翻译
+      categoryFormat(row, column) {
+        return this.selectDictLabel(this.categoryOptions, row.category);
+      },
+      // 实施情况字典翻译
+      trueStateFormat(row, column) {
+        return this.selectDictLabel(this.trueStateOptions, row.trueState);
+      },
+      // 变更性质字典翻译
+      changeNatureFormat(row, column) {
+        return this.selectDictLabel(this.changeNatureOptions, row.changeNature);
+      },
+      // 风险等级字典翻译
+      riskLevelFormat(row, column) {
+        return this.selectDictLabel(this.riskLevelOptions, row.riskLevel);
+      },
+      // 区域字典翻译
+      areaFormat(row, column) {
+        return this.selectDictLabel(this.areaOptions, row.area);
+      },
+      // PID MASTER更新字典翻译
+      pidMasterFormat(row, column) {
+        return this.selectDictLabel(this.pidMasterOptions, row.pidMaster);
+      },
+      // 临时MOC状态字典翻译
+      temporaryStateFormat(row, column) {
+        return this.selectDictLabel(this.temporaryStateOptions, row.temporaryState);
+      },
+      // SOP更新字典翻译
+      sopUpdateFormat(row, column) {
+        return this.selectDictLabel(this.sopUpdateOptions, row.sopUpdate);
+      },
+      // MC情况字典翻译
+      mcDetailFormat(row, column) {
+        return this.selectDictLabel(this.mcDetailOptions, row.mcDetail);
+      },
+      // 临时MOC状态字典翻译
+      tempStateFormat(row, column) {
+        return this.selectDictLabel(this.tempStateOptions, row.tempState);
+      },
+      // MOC类型字典翻译
+      mocTypeFormat(row, column) {
+        return this.selectDictLabel(this.mocTypeOptions, row.mocType);
+      },
+      // 文件更新字典翻译
+      docUpdateFormat(row, column) {
+        return this.selectDictLabel(this.docUpdateOptions, row.docUpdate);
+      },
+      // 取消按钮
+      cancel() {
+        this.open = false;
+        this.reset();
+      },
+      // 表单重置
+      reset() {
+        this.form = {
+          id: null,
+          plantCode: null,
+          mocNo: null,
+          plantNumber: null,
+          noticeLetter: null,
+          workLetter: null,
+          cteNo: null,
+          investCost: null,
+          category: null,
+          significance: null,
+          classification: null,
+          area: null,
+          dashControl: null,
+          title: null,
+          owner: null,
+          approveTime: null,
+          estimateEndtime: null,
+          endtime: null,
+          trueState: null,
+          changeNature: null,
+          overTime: null,
+          riskLevel: null,
+          training: null,
+          pssr: null,
+          ehsCheck: null,
+          ehsDb: null,
+          pidMaster: null,
+          pssrDb: null,
+          capex: null,
+          delFlag: null,
+          createrCode: null,
+          createdate: null,
+          updaterCode: null,
+          updatedate: null,
+          deptId: null,
+          remarks: null,
+          temporaryState: null,
+          sopUpdate: null
+        };
+        this.resetForm("form");
+      },
+      // 限制时间范围
+      pickerOptionsTraining() {
+        const self = this
+        return {
+          disabledDate(time){
+            return time.getTime() < new Date(self.form.ehsCheck).getTime()
+          }
+        }
+      },
+      pickerOptionsPssr() {
+        const self = this
+        return {
+          disabledDate(time){
+            // if (self.form.training != null) {
+            //   return time.getTime() < new Date(self.form.training).getTime()
+            // }else {
+            //   return time.getTime() < new Date(self.form.ehsCheck).getTime()
+            // }
+          }
+        }
+      },
+      /** 搜索按钮操作 */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /** 重置按钮操作 */
+      resetQuery() {
+        this.resetForm("queryForm");
+        this.handleQuery();
+      },
+      // 多选框选中数据
+      handleSelectionChange(selection) {
+        this.ids = selection.map(item => item.id)
+        this.single = selection.length!==1
+        this.multiple = !selection.length
+      },
+      /** 新增按钮操作 */
+      handleAdd() {
+        this.reset();
+        this.open = true;
+        this.title = this.$t('新增') + " " + this.$t('MOC管理');
+      },
+      //实施情况Finished变更
+      changeTrueState(val) {
+        if (val == 10) {
+          // this.rules = this.chooseRules
+        }else {
+          this.$refs['form'].clearValidate();
+          // this.rules = this.commonRules
+        }
+      },
+      changeChangeNature(val) {
+        if (val == 10) {
+          // this.rules = this.temporaryRules
+        }else if (val = 12) {
+          this.$refs['form'].clearValidate();
+          this.form.temporaryState = "14";
+          this.form.overTime = "";
+          // this.rules = this.commonRules
+        }
+      },
+      //根据分数显示颜色提示
+      tableCellClassName({ row, column, rowIndex, columnIndex }) {
+        if (columnIndex == 13){
+          return this.changeColor(row.isEhsCheck, row.ehsCheck)
+        }
+        if (columnIndex == 14){
+          return this.changeColor(row.isTraining, row.training)
+        }
+        if (columnIndex == 15){
+          return this.changeColor(row.isPssr, row.pssr)
+        }
+      },
+      changeColor (value, dateValue) {
+        if (value !== "1" && dateValue !== null){
+          return 'cellMoc'
+        }
+      },
+      /** 修改按钮操作 */
+      handleUpdate(row) {
+        this.reset();
+        // this.rules = this.commonRules
+        const id = row.id || this.ids
+        getMoc(id).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = this.$t('修改') + this.$t('MOC管理');
+        });
+      },
+      /** 移除按钮操作 */
+      handleRemove(row) {
+        this.$confirm(this.$t('是否确认移除?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          updateMoc({id: row.id, tempState: 0});
+        }).then(() => {
+          this.getList();
+          this.msgSuccess(this.$t('移除成功'));
+        })
+      },
+      /** 提交按钮 */
+      submitForm() {
+        this.$refs["form"].validate(valid => {
+          if (valid) {
+            if (this.form.trueState == "10") {
+              if (this.form.mocNo != null && this.form.plantNumber != null && this.form.category != null && this.form.significance != null && this.form.classification != null
+                && this.form.area != null && this.form.title != null && this.form.owner != null && this.form.approveTime != null && this.form.estimateEndtime != null
+                && this.form.endtime != null && this.form.changeNature != null && this.form.riskLevel != null && this.form.training != null && this.form.pssr != null) {
+                if (this.form.id != null) {
+                  updateMoc(this.form).then(response => {
+                    this.msgSuccess(this.$t('修改成功'));
+                    this.open = false;
+                    this.getList();
+                  });
+                } else {
+                  this.form.timeliness = 2;
+                  addMoc(this.form).then(response => {
+                    this.msgSuccess(this.$t('新增成功'));
+                    this.open = false;
+                    this.getList();
+                  });
+                }
+              } else {
+                this.msgError(this.$t('存在必填项未填,实施情况修改Finished失败'));
+              }
+            }else {
+              if (this.form.id != null) {
+                updateMoc(this.form).then(response => {
+                  this.msgSuccess(this.$t('修改成功'));
+                  this.open = false;
+                  this.getList();
+                });
+              } else {
+                this.form.timeliness = 2;
+                addMoc(this.form).then(response => {
+                  this.msgSuccess(this.$t('新增成功'));
+                  this.open = false;
+                  this.getList();
+                });
+              }
+            }
+          }
+        });
+      },
+      /** 删除按钮操作 */
+      handleDelete(row) {
+        const ids = row.id || this.ids;
+        this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return delMoc(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess(this.$t('删除成功'));
+        })
+      },
+      /** 导出按钮操作 */
+      handleExport() {
+        const queryParams = this.queryParams;
+        this.$confirm(this.$t('是否确认导出所有MOC管理数据项?'), this.$t('警告'), {
+          confirmButtonText: this.$t('确定'),
+          cancelButtonText: this.$t('取消'),
+          type: "warning"
+        }).then(function() {
+          return exportMoc(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+      },
+      /** 导入按钮操作 */
+      handleImport() {
+        this.upload.title = this.$t('用户导入');
+        this.upload.open = true;
+      },
+      /** 下载模板操作 */
+      importTemplate() {
+        this.$refs['downloadFileForm'].submit()
+      },
+      // 文件上传中处理
+      handleFileUploadProgress(event, file, fileList) {
+        this.upload.isUploading = true;
+      },
+      // 文件上传成功处理
+      handleFileSuccess(response, file, fileList) {
+        this.upload.open = false;
+        this.upload.isUploading = false;
+        this.$refs.upload.clearFiles();
+        if (response.data[0] != null) {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败')+"。", this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }else {
+          this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), { dangerouslyUseHTMLString: true });
+        }
+        this.getList();
+      },
+      // 提交上传文件
+      submitFileForm() {
+        this.$refs.upload.submit();
+      },
+      //数据分析
+      handleData(){
+        var now = new Date();
+        var year = now.getFullYear(); //得到年份
+        this.yearOption = [year-2 , year-1 ,year]
+        this.drawer = true
+      },
+      /** 报告附件按钮操作 */
+      handleDoc(row , fileType) {
+        this.doc.pType = fileType
+        this.doc.queryParams.pType = fileType
+        this.doc.id = row.id;
+        this.doc.title = row.title;
+        this.doc.open = true;
+        this.doc.queryParams.pId = row.id
+        this.doc.pId = row.id
+        this.getFileList()
+        this.$nextTick(() => {
+          this.$refs.doc.clearFiles()
+        })
+      },
+      getFileList (){
+        allFileList(this.doc.queryParams).then(response => {
+          response.forEach(element => {
+            element["isEdit"] = false
+          });
+          response.forEach(element => {
+            element["isAdd"] = false
+          });
+          this.doc.commonfileList = 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()
+      },
+      // 文件下载处理
+      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()
+      },
+      //pdf预览
+      openPdf(){
+        window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+      },
+      handleSee (row){
+        this.pdf.open =true
+        this.pdf.title = row.fileName
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      },
+      // 取消
+      cancelFile(row, index) {
+        // 如果是新增的数据
+        if (row.isAdd) {
+          this.doc.commonfileList.splice(index, 1)
+        } else {
+          // 不是新增的数据  还原数据
+          for (const i in row.oldRow) {
+            row[i] = row.oldRow[i]
+          }
+          row.isEdit = false
+        }
+      },
+      edit(row) {
+        // 备份原始数据
+        row['oldRow'] = JSON.parse(JSON.stringify(row));
+        this.$nextTick(() => {
+          row.isEdit = true;
+        })
+      },
+      save(row) {
+        row.isEdit = false;
+        var that = this;
+        that.loading = true;
+        this.form = row;
+        if (row.isAdd == true) {
+          addCommonfile(this.form).then(response => {
+            this.msgSuccess(this.$t('新增成功'));
+            this.open = false;
+            this.getList();
+          });
+        }else {
+          updateCommonfile(this.form).then(response => {
+            this.msgSuccess(this.$t('修改成功'));
+            this.open = false;
+            this.getList();
+          });
+        }
+      },
+      /** 删除按钮操作 */
+      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('删除成功'));
+        })
+      },
+    }
+  };
+</script>
+<style>
+  #moc-type:hover{
+    cursor: pointer;
+  }
+  .text {
+    font-size: 14px;
+  }
+  .item {
+    margin-bottom: 18px;
+  }
+  .clearfix {
+    color: #1e1e1e;
+  }
+  .clearfix:before,
+  .clearfix:after {
+    display: table;
+    content: "";
+  }
+  .clearfix:after {
+    clear: both
+  }
+
+  .box-card {
+    width: 100%;
+  }
+  .el-drawer__body {
+    overflow: auto;
+  }
+  .el-drawer__container ::-webkit-scrollbar {
+    display: none;
+  }
+</style>

+ 0 - 100
ui/src/views/process/moc2/index.vue

@@ -1,100 +0,0 @@
-<template>
-  <div class="app-container" style="padding: 0 0 0 0">
-    <el-tabs type="border-card"v-model="activeName" @tab-click="handleClick">
-      <el-tab-pane label="永久MOC" name="first">
-        <moc item="1" typename="plantproglistform" v-if="isFirst"></moc>
-      </el-tab-pane>
-      <el-tab-pane label="临时MOC" name="second">
-        2
-        <!--<list item="2" typename="plantproglistprocedure" v-if="isSecond"></list>-->
-      </el-tab-pane>
-      <el-tab-pane label="带压消漏清单" name="third">
-        3
-        <!--<list item="3" typename="plantproglistguide" v-if="isThird"></list>-->
-      </el-tab-pane>
-      <el-tab-pane label="临时设施、其它" name="fourth">
-        4
-        <!--<list item="4" typename="plantproglistbook" v-if="isFourth"></list>-->
-      </el-tab-pane>
-      <el-tab-pane label="仪表联锁旁路" name="fifth">
-        5
-        <!--<list item="5" typename="plantproglistannex" v-if="isFifth"></list>-->
-      </el-tab-pane>
-    </el-tabs>
-  </div>
-</template>
-
-<script>
-  import Moc from '@/views/process/moc/index.vue'
-
-  export default {
-    name: "Moc2",
-    components: {
-      Moc
-    },
-    data() {
-      return {
-        // 默认第一个Tab
-        activeName: 'first',
-        isFirst: true,
-        isSecond: false,
-        isThird: false,
-        isFourth: false,
-        isFifth: false,
-        isSixth: false
-      }
-    },
-    methods: {
-      handleClick(tab) {
-        console.log(tab.name)
-        if (tab.name === 'first') {
-          this.isFirst = true
-          this.isSecond = false
-          this.isThird = false
-          this.isFourth = false
-          this.isFifth = false
-          this.isSixth = false
-        } else if (tab.name === 'second') {
-          this.isFirst = false
-          this.isSecond = true
-          this.isThird = false
-          this.isFourth = false
-          this.isFifth = false
-          this.isSixth = false
-        }else if (tab.name === 'third') {
-          this.isFirst = false
-          this.isSecond = false
-          this.isThird = true
-          this.isFourth = false
-          this.isFifth = false
-          this.isSixth = false
-        }else if (tab.name === 'fourth') {
-          this.isFirst = false
-          this.isSecond = false
-          this.isThird = false
-          this.isFourth = true
-          this.isFifth = false
-          this.isSixth = false
-        }else if (tab.name === 'fifth') {
-          this.isFirst = false
-          this.isSecond = false
-          this.isThird = false
-          this.isFourth = false
-          this.isFifth = true
-          this.isSixth = false
-        }else if (tab.name === 'sixth') {
-          this.isFirst = false
-          this.isSecond = false
-          this.isThird = false
-          this.isFourth = false
-          this.isFifth = false
-          this.isSixth = true
-        }
-      }
-    }
-  };
-</script>
-
-<style scoped>
-
-</style>