shi'sen'yuan 3 年之前
父节点
当前提交
f54bbd8fdf

+ 14 - 0
master/src/main/java/com/ruoyi/project/plant/domain/TTargetreview.java

@@ -126,6 +126,14 @@ public class TTargetreview extends BaseEntity
     /** 对应的targetlistIID */
     private Long listId;
 
+    /** 当前累积量 */
+    @Excel(name = "当前累积量")
+    private String total;
+
+    /** 当前累积量状态 */
+    @Excel(name = "当前累积量状态")
+    private String totalStatus;
+
     public void setId(Long id)
     {
         this.id = id;
@@ -354,6 +362,12 @@ public class TTargetreview extends BaseEntity
     public void setListId(Long listId) { this.listId = listId; }
 
     public Long getListId() { return listId; }
+    public void setTotal(String total) { this.total = total; }
+
+    public String getTotal() { return total; }
+    public void setTotalStatus(String totalStatus) { this.totalStatus = totalStatus; }
+
+    public String getTotalStatus() { return totalStatus; }
 
     @Override
     public String toString() {

+ 12 - 0
master/src/main/java/com/ruoyi/project/plant/service/impl/TTargetreviewServiceImpl.java

@@ -61,6 +61,12 @@ public class TTargetreviewServiceImpl implements ITTargetreviewService
     public int insertTTargetreview(TTargetreview tTargetreview)
     {
         //单元格背景颜色状态整改
+        if (tTargetreview.getTotal() == "" || tTargetreview.getTotal() == null) {
+            tTargetreview.setTotalStatus(null);
+        }else if (tTargetreview.getTotalStatus() != null) {
+        }else {
+            tTargetreview.setTotalStatus("2");
+        }
         if (tTargetreview.getFirstquarter() == "" || tTargetreview.getFirstquarter() == null) {
             tTargetreview.setFirstquarterStatus(null);
         }else if (tTargetreview.getFirstquarterStatus() != null) {
@@ -98,6 +104,12 @@ public class TTargetreviewServiceImpl implements ITTargetreviewService
     public int updateTTargetreview(TTargetreview tTargetreview)
     {
         //单元格背景颜色状态整改
+        if (tTargetreview.getTotal() == "" || tTargetreview.getTotal() == null) {
+            tTargetreview.setTotalStatus(null);
+        }else if (tTargetreview.getTotalStatus() != null) {
+        }else {
+            tTargetreview.setTotalStatus("2");
+        }
         if (tTargetreview.getFirstquarter() == "" || tTargetreview.getFirstquarter() == null) {
             tTargetreview.setFirstquarterStatus(null);
         }else if (tTargetreview.getFirstquarterStatus() != null) {

+ 9 - 1
master/src/main/resources/mybatis/plant/TTargetreviewMapper.xml

@@ -36,10 +36,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="listId"    column="list_id"    />
         <result property="deptName" column="dept_name" />
         <result property="parentId"       column="parent_id"      />
+        <result property="total"    column="total"    />
+        <result property="totalStatus"    column="total_status"    />
     </resultMap>
 
     <sql id="selectTTargetreviewVo">
-        select d.id, l.item, l.description, l.targets, d.firstquarter, d.halfyear, d.threequarter, d.annual, l.year, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.firstquarter_status, d.halfyear_status, d.threequarter_status, d.annual_status, l.parent_id, s.dept_name, a.action_item, a.principal, a.expected_date, a.completion_date, d.deviation_info, d.list_id from t_targetreview d
+        select d.id, l.item, l.description, l.targets, d.total, d.total_status, d.firstquarter, d.halfyear, d.threequarter, d.annual, l.year, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.remarks, d.firstquarter_status, d.halfyear_status, d.threequarter_status, d.annual_status, l.parent_id, s.dept_name, a.action_item, a.principal, a.expected_date, a.completion_date, d.deviation_info, d.list_id from t_targetreview d
       left join sys_dept s on s.dept_id = d.dept_id
       left join t_targetlist l on l.id = d.list_id
       left join t_targetaction a on a.targetreview_id = d.id
@@ -97,6 +99,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="parentId != null">parent_id,</if>
             <if test="deviationInfo != null">deviation_info,</if>
             <if test="listId != null">list_id,</if>
+            <if test="total != null">total,</if>
+            <if test="totalStatus != null">total_status,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="id != null">#{id},</if>
@@ -125,6 +129,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="parentId != null">#{parentId},</if>
             <if test="deviationInfo != null">#{deviationInfo},</if>
             <if test="listId != null">#{listId},</if>
+            <if test="total != null">#{total},</if>
+            <if test="totalStatus != null">#{totalStatus},</if>
          </trim>
     </insert>
 
@@ -160,6 +166,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="parentId != null">parent_id = #{parentId},</if>
             <if test="deviationInfo != null">deviation_info = #{deviationInfo},</if>
             <if test="listId != null">list_id = #{listId},</if>
+            <if test="total != null">total = #{total},</if>
+            <if test="totalStatus != null">total_status = #{totalStatus},</if>
         </trim>
         where id = #{id}
     </update>

+ 1 - 0
ui/src/lang/en.js

@@ -136,6 +136,7 @@ export default {
   KPI考核: 'KPI Assessment',
   能源消耗: 'Energy Consumption',
   KPI名称: 'KPI',
+  当前累积量: 'Total',
   一季度: '1st Quarter',
   二季度: '2nd Quarter',
   三季度: '3rd Quarter',

+ 1 - 0
ui/src/lang/zh.js

@@ -136,6 +136,7 @@ export default {
   KPI考核: 'KPI考核',
   能源消耗: '能源消耗',
   KPI名称: 'KPI名称',
+  当前累积量: '当前累积量',
   一季度: '一季度',
   二季度: '二季度',
   三季度: '三季度',

+ 44 - 7
ui/src/views/plant/targetreview/index.vue

@@ -72,6 +72,21 @@
       <el-table-column label="ITEM" align="center" prop="item" width="80" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('内容')" align="center" prop="description" width="400" :show-overflow-tooltip="true"/>
       <el-table-column :label="$t('目标')" align="center" prop="targets" width="200"/>
+      <el-table-column :label="$t('当前累积量')" align="center" prop="total" width="200">
+        <template slot-scope="scope" v-if="scope.row.total != null">
+          <el-dropdown placement="bottom" trigger="click">
+            <span class="el-dropdown-link">
+              <span>{{scope.row.total}}</span>
+              <i class="el-icon-caret-bottom"></i>
+            </span>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item @click.native="statusFinish(0, scope.row)">{{ $t('已完成') }}</el-dropdown-item>
+              <el-dropdown-item @click.native="statusCare(0, scope.row)">{{ $t('注意') }}</el-dropdown-item>
+              <el-dropdown-item @click.native="statusUrgent(0, scope.row)">{{ $t('紧急') }}</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </template>
+      </el-table-column>
       <el-table-column :label="$t('一季度')" align="center" prop="firstquarter" width="200">
         <template slot-scope="scope" v-if="scope.row.firstquarter != null">
           <el-dropdown placement="bottom" trigger="click">
@@ -196,6 +211,9 @@
         <el-form-item :label="$t('目标')" prop="targets">
           <el-input v-model="form.targets" :placeholder="$t('请输入') + $t('目标')" />
         </el-form-item>
+        <el-form-item :label="$t('当前累积量')" prop="total">
+          <el-input v-model="form.total" :placeholder="$t('请输入') + $t('当前累积量')" />
+        </el-form-item>
         <el-form-item :label="$t('一季度')" prop="firstquarter">
           <el-input v-model="form.firstquarter" :placeholder="$t('请输入') + $t('一季度')" />
         </el-form-item>
@@ -483,15 +501,18 @@
       //根据分数显示颜色提示
       tableCellClassName({ row, column, rowIndex, columnIndex }) {
         if (columnIndex == 5){
-          return this.changeColor(row.firstquarterStatus)
+          return this.changeColor(row.totalStatus)
         }
         if (columnIndex == 6){
-          return this.changeColor(row.halfyearStatus)
+          return this.changeColor(row.firstquarterStatus)
         }
         if (columnIndex == 7){
-          return this.changeColor(row.threequarterStatus)
+          return this.changeColor(row.halfyearStatus)
         }
         if (columnIndex == 8){
+          return this.changeColor(row.threequarterStatus)
+        }
+        if (columnIndex == 9){
           return this.changeColor(row.annualStatus)
         }
       },
@@ -522,7 +543,9 @@
       //变换季度状态
       statusFinish (index, row) {
         this.form = row;
-        if (index == 1) {
+        if (index == 0) {
+          this.form.totalStatus = 1;
+        }else if (index == 1) {
           this.form.firstquarterStatus = 1;
         }else if (index == 2) {
           this.form.halfyearStatus = 1;
@@ -539,7 +562,9 @@
       },
       statusCare (index, row) {
         this.form = row;
-        if (index == 1) {
+        if (index == 0) {
+          this.form.totalStatus = 2;
+        }else if (index == 1) {
           this.form.firstquarterStatus = 2;
         }else if (index == 2) {
           this.form.halfyearStatus = 2;
@@ -556,7 +581,9 @@
       },
       statusUrgent (index, row) {
         this.form = row;
-        if (index == 1) {
+        if (index == 0) {
+          this.form.totalStatus = 3;
+        }else if (index == 1) {
           this.form.firstquarterStatus = 3;
         }else if (index == 2) {
           this.form.halfyearStatus = 3;
@@ -579,6 +606,7 @@
           item: null,
           description: null,
           targets: null,
+          total: null,
           firstquarter: null,
           halfyear: null,
           threequarter: null,
@@ -595,6 +623,7 @@
           halfyearStatus: null,
           threequarterStatus: null,
           annualStatus: null,
+          totalStatus: null,
           deviationInfo: null
         };
         this.resetForm("form");
@@ -922,7 +951,7 @@
             colspan: _col
           };
         }
-        if (columnIndex === 14 ) {
+        if (columnIndex === 10 ) {
           const _row = this.setTable(this.targetreviewList).merge[rowIndex];
           const _col = _row > 0 ? 1 : 0;
           return {
@@ -938,6 +967,14 @@
             colspan: _col
           };
         }
+        if (columnIndex === 16 ) {
+          const _row = this.setTable(this.targetreviewList).merge[rowIndex];
+          const _col = _row > 0 ? 1 : 0;
+          return {
+            rowspan: _row,
+            colspan: _col
+          };
+        }
       },
       setTable(tableData) {
         let spanArr = [],