Sfoglia il codice sorgente

feat(ehs): 添加RC状态字段并优化界面显示逻辑

- 在TRcaudit实体类中新增rcStatus属性及其getter/setter方法
- 更新TRcauditMapper.xml配置文件,增加rc_status字段的映射和SQL支持
- 修改RC审计助手界面,根据homeType控制RC状态和备注字段的显示
- 调整装置程序清单界面,增加“其他”类型的标签页及相关逻辑
- 优化表单布局,将控制室文件版本和归属部门分开排列
- 移除部分不必要的@DataScope注解,调整代码结构提高可读性- 新增装置程序清单其他导入模板的下载支持
jiangbiao 1 mese fa
parent
commit
3a280188de

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

@@ -151,6 +151,9 @@ public class CommonController extends BaseController
         } else if( type.equals("plantproglistmaterials") ) {
             downloadname = "装置程序清单培训材料导入模板.xlsx";
             url = "static/template/document/plantproglistmaterials.xlsx";
+        }else if( type.equals("plantproglistother") ) {
+            downloadname = "装置程序清单其他导入模板.xlsx";
+            url = "static/template/document/plantproglistother.xlsx";
         } else if( type.equals("officesupply") ) {
             downloadname = "办公用品管理导入模板.xlsx";
             url = "static/template/affair/officesupply.xlsx";

+ 4 - 4
master/src/main/java/com/ruoyi/project/document/mapper/TLdpeMaintenanceMapper.java

@@ -1,9 +1,9 @@
 package com.ruoyi.project.document.mapper;
 
-import java.util.List;
-import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
 import com.ruoyi.project.document.domain.TLdpeMaintenance;
 
+import java.util.List;
+
 /**
  * 预防性维护策略Mapper接口
  * 
@@ -22,11 +22,11 @@ public interface TLdpeMaintenanceMapper
 
     /**
      * 查询预防性维护策略列表
-     * 
+     *
      * @param tLdpeMaintenance 预防性维护策略
      * @return 预防性维护策略集合
      */
-    @DataScope(deptAlias = "d")
+//    @DataScope(deptAlias = "d")
     public List<TLdpeMaintenance> selectTLdpeMaintenanceList(TLdpeMaintenance tLdpeMaintenance);
 
     /**

+ 11 - 2
master/src/main/java/com/ruoyi/project/ehs/domain/TRcaudit.java

@@ -1,12 +1,12 @@
 package com.ruoyi.project.ehs.domain;
 
-import java.util.Date;
-import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.framework.aspectj.lang.annotation.Excel;
 import com.ruoyi.framework.web.domain.BaseEntity;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 
+import java.util.Date;
+
 /**
  * RC审计助手对象 t_rcaudit
  *
@@ -81,9 +81,18 @@ public class TRcaudit extends BaseEntity
 
     /** 部门名称 */
     private String deptName;
+    private String rcStatus;
 
     private int fileNum;
 
+    public String getRcStatus() {
+        return rcStatus;
+    }
+
+    public void setRcStatus(String rcStatus) {
+        this.rcStatus = rcStatus;
+    }
+
     public void setId(Long id)
     {
         this.id = id;

+ 4 - 3
master/src/main/java/com/ruoyi/project/ehs/mapper/TRcauditMapper.java

@@ -1,12 +1,12 @@
 package com.ruoyi.project.ehs.mapper;
 
-import java.util.List;
-import java.util.Map;
-
 import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
 import com.ruoyi.project.common.domain.DataEntity;
 import com.ruoyi.project.ehs.domain.TRcaudit;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * RC审计助手Mapper接口
  * 
@@ -64,5 +64,6 @@ public interface TRcauditMapper
      */
     public int deleteTRcauditByIds(Long[] ids);
 
+    @DataScope(deptAlias = "d")
     DataEntity selectNaData(Map param);
 }

+ 5 - 1
master/src/main/resources/mybatis/ehs/TRcauditMapper.xml

@@ -24,10 +24,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="deptId"    column="dept_id"    />
         <result property="deptName" column="dept_name" />
         <result property="fileNum" column="file_num" />
+        <result property="rcStatus" column="rc_status" />
     </resultMap>
 
     <sql id="selectTRcauditVo">
-        select p.name_cn as menuName, d.id, d.plant_code, d.rc_code, d.menuid, d.name_cn, d.name_en, d.yes, d.no, d.na, d.link, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id ,s.dept_name, d.file_num from t_rcaudit d
+        select p.name_cn as menuName,d.rc_status, d.id, d.plant_code, d.rc_code, d.menuid, d.name_cn, d.name_en, d.yes, d.no, d.na, d.link, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.remarks, d.dept_id ,s.dept_name, d.file_num from t_rcaudit d
       left join sys_dept s on s.dept_id = d.dept_id
       left join t_rcauditmenu p on p.serial_num = d.menuid and d.dept_id = p.dept_id and p.del_flag=0
     </sql>
@@ -73,6 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remarks != null">remarks,</if>
             <if test="fileNum != null">file_num,</if>
             <if test="deptId != null">dept_id,</if>
+            <if test="rcStatus != null">rc_status,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -93,12 +95,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remarks != null">#{remarks},</if>
             <if test="fileNum != null">#{fileNum},</if>
             <if test="deptId != null">#{deptId},</if>
+            <if test="rcStatus != null">#{rcStatus},</if>
          </trim>
     </insert>
 
     <update id="updateTRcaudit" parameterType="TRcaudit">
         update t_rcaudit
         <trim prefix="SET" suffixOverrides=",">
+            <if test="rcStatus != null and rcStatus != ''">rc_status = #{rcStatus},</if>
             <if test="plantCode != null and plantCode != ''">plant_code = #{plantCode},</if>
             <if test="rcCode != null and rcCode != ''">rc_code = #{rcCode},</if>
             <if test="menuid != null and menuid != ''">menuid = #{menuid},</if>

BIN
master/src/main/resources/static/template/document/plantproglistother.xlsx


+ 15 - 3
ui/src/views/components/PlantProgList/index.vue

@@ -143,7 +143,7 @@
       </el-table-column>
       <el-table-column :label="$t('密级分类')" align="center" prop="classify" width="100" v-if="this.itemNum !== '5'"
                        :formatter="classifyFormat"/>
-      <el-table-column :label="$t('文件更新状态(控制室)')" align="center" v-if="[5,6].includes(this.itemNum)">
+      <el-table-column :label="$t('文件更新状态(控制室)')" align="center"  v-if="homeType==6">
         <template slot-scope="scope">
           <span v-if="scope.row.revision == scope.row.versionKzs"></span>
           <span v-else style="color: #ff6d6d">{{ $t('未更新') }}</span>
@@ -350,8 +350,8 @@
         </el-row>
         <el-row>
           <el-col :span="12">
-            <el-form-item :label="$t('备注')" prop="remarks">
-              <el-input v-model="form.remarks" :placeholder="$t('请输入') + $t('备注')"/>
+            <el-form-item :label="$t('控制室文件版本')" prop="versionKzs" v-if="homeType==6">
+              <el-input v-model="form.versionKzs" :placeholder="$t('请输入') + $t('控制室文件版本')"/>
             </el-form-item>
           </el-col>
           <el-col :span="12">
@@ -361,6 +361,13 @@
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item :label="$t('备注')" prop="remarks">
+              <el-input v-model="form.remarks" :placeholder="$t('请输入') + $t('备注')"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
@@ -554,6 +561,7 @@ export default {
   data() {
     return {
       imgs: [],
+      homeType: null,
       jpgList: [],
       ppt: false,
       pptView: false,
@@ -712,6 +720,10 @@ export default {
       this.$refs.tree.filter(val);
     }
   },
+  mounted() {
+    console.log(this.$store.state.user.homeType)
+    this.homeType = this.$store.state.user.homeType
+  },
   created() {
     //设置表格高度对应屏幕高度
     this.$nextTick(() => {

+ 18 - 1
ui/src/views/document/plantproglist/index.vue

@@ -19,6 +19,9 @@
       <el-tab-pane :label="$t('培训材料')" name="sixth">
         <list item="6" typename="plantproglistmaterials" v-if="isSixth"></list>
       </el-tab-pane>
+      <el-tab-pane :label="$t('其他')"  name="seventh">
+        <list item="7" typename="plantproglistother" v-if="isSeventh"></list>
+      </el-tab-pane>
     </el-tabs>
   </div>
 </template>
@@ -40,7 +43,8 @@ export default {
       isThird: false,
       isFourth: false,
       isFifth: false,
-      isSixth: false
+      isSixth: false,
+      isSeventh: false
     }
   },
   methods: {
@@ -53,6 +57,7 @@ export default {
         this.isFourth = false
         this.isFifth = false
         this.isSixth = false
+        this.isSeventh = false
       } else if (tab.name === 'second') {
         this.isFirst = false
         this.isSecond = true
@@ -60,6 +65,7 @@ export default {
         this.isFourth = false
         this.isFifth = false
         this.isSixth = false
+        this.isSeventh = false
       }else if (tab.name === 'third') {
         this.isFirst = false
         this.isSecond = false
@@ -67,6 +73,7 @@ export default {
         this.isFourth = false
         this.isFifth = false
         this.isSixth = false
+        this.isSeventh = false
       }else if (tab.name === 'fourth') {
         this.isFirst = false
         this.isSecond = false
@@ -74,6 +81,7 @@ export default {
         this.isFourth = true
         this.isFifth = false
         this.isSixth = false
+        this.isSeventh = false
       }else if (tab.name === 'fifth') {
         this.isFirst = false
         this.isSecond = false
@@ -81,6 +89,7 @@ export default {
         this.isFourth = false
         this.isFifth = true
         this.isSixth = false
+        this.isSeventh = false
       }else if (tab.name === 'sixth') {
         this.isFirst = false
         this.isSecond = false
@@ -88,6 +97,14 @@ export default {
         this.isFourth = false
         this.isFifth = false
         this.isSixth = true
+        this.isSeventh = false
+      } else if (tab.name === 'seventh') {
+        this.isFirst = false
+        this.isSecond = false
+        this.isThird = false
+        this.isFourth = false
+        this.isFifth = false
+        this.isSeventh = true
       }
     }
   }

+ 16 - 0
ui/src/views/ehs/rcaudit/index.vue

@@ -105,6 +105,8 @@
               <svg-icon icon-class="roundGrey" v-if="scope.row.link === null"></svg-icon>
             </template>
           </el-table-column>
+          <el-table-column label="RC状态" align="center" prop="rcStatus" v-if="homeType==6"/>
+          <el-table-column label="备注" align="center" prop="remarks" v-if="homeType==6"/>
           <el-table-column :label="$t('操作')" align="center" fixed="right" width="190" class-name="small-padding fixed-width">
             <template slot-scope="scope">
               <el-button
@@ -188,6 +190,13 @@
             <el-form-item :label="$t('链接')" prop="link">
               <el-input v-model="form.link" :placeholder="$t('请输入') + $t('链接')" />
             </el-form-item>
+            <el-form-item :label="$t('RC状态')" prop="link" v-if="homeType==6">
+              <el-select v-model="form.rcStatus" :placeholder="$t('请选择') + $t('RC状态')">
+                <el-option label="已完成" value="已完成"></el-option>
+                <el-option label="进行中" value="进行中"></el-option>
+                <el-option label="未开始" value="未开始"></el-option>
+              </el-select>
+            </el-form-item>
             <el-form-item :label="$t('备注')" prop="remarks">
               <el-input v-model="form.remarks" :placeholder="$t('请输入') + $t('备注')" />
             </el-form-item>
@@ -343,6 +352,7 @@
     data() {
       return {
         drawer: false,
+        homeType: null,
         direction: 'rtl',
         // 遮罩层
         loading: true,
@@ -438,6 +448,7 @@
           pageNum: 1,
           pageSize: 20,
           menuid: null,
+          rcStatus: null,
         },
         //查询目录参数
         menuQueryParams: {
@@ -496,6 +507,10 @@
         }, 13)
       })
     },
+    mounted() {
+      console.log(this.$store.state.user.homeType)
+      this.homeType = this.$store.state.user.homeType
+    },
     created() {
       //设置表格高度对应屏幕高度
       this.$nextTick(() => {
@@ -584,6 +599,7 @@
           updatedate: null,
           remarks: null,
           deptId: null,
+          rcStatus: null,
           fileNum: null
         };
         this.resetForm("form");