ly hace 3 años
padre
commit
444ec9ebba

+ 10 - 0
master/src/main/java/com/ruoyi/project/training/spec/domain/TStPlan.java

@@ -101,12 +101,22 @@ public class TStPlan extends BaseEntity
 
     private Long yearPlanId;
 
+    private Long year;
+
     private Integer editFlag;
 
     public Long getYearPlanId() {
         return yearPlanId;
     }
 
+    public Long getYear() {
+        return year;
+    }
+
+    public void setYear(Long year) {
+        this.year = year;
+    }
+
     public void setYearPlanId(Long yearPlanId) {
         this.yearPlanId = yearPlanId;
     }

+ 2 - 0
master/src/main/resources/mybatis/training/spec/TStPlanMapper.xml

@@ -57,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         LEFT JOIN SYS_USER u1 on d.updater_code = u1.USER_ID
         LEFT JOIN SYS_USER u2 on d.creater_code = u2.USER_ID
         left join T_ST_SUCCESSOR suc on d.STAFF_ID = suc.STAFF_ID
+        left join T_ST_YEARPlAN yp on d.year_plan_id = yp.id
     </sql>
 
     <!-- 查询季度培训计划列表 -->
@@ -126,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectTStPlanVo"/>
         <where>
             <if test="yearPlanId != null  and yearPlanId != ''"> and d.year_plan_id = #{yearPlanId}</if>
+            <if test="year != null  and year != ''"> and yp.plan_year = #{year}</if>
             <if test="staffId != null  and staffId != ''"> and d.staff_id = #{staffId}</if>
             <if test="plantName != null  and plantName != ''"> and plant_name like concat(concat('%', #{plantName}), '%')</if>
             <if test="startDate != null "> and start_date = #{startDate}</if>

+ 24 - 23
ui/src/views/training/spec/successor/staffResume.vue

@@ -44,20 +44,7 @@
         </div>
       </div>
     </el-card>
-    <div style="margin-top: 7px;margin-bottom: -14px">
-      <el-form :model="queryDeviceParams" ref="queryRegularForm" label-width="68px" :inline="true">
-        <el-form-item :label="$t('年份')" prop="year">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="queryDeviceParams.year"
-                          type="year"
-                          value-format="yyyy"
-                          :placeholder="$t('请选择') + $t('年份')">
-          </el-date-picker>
-        </el-form-item>
-        <el-button type="cyan" icon="el-icon-search" size="mini" @click="staffQuery" style="margin-left: 20px;">
-          {{ $t('搜索') }}</el-button>
-      </el-form>
-    </div>
+
     <el-card>
       <div slot="header" class="clearfix">
         <span>公司级培养</span>
@@ -97,9 +84,23 @@
     </el-card>
     <el-card>
       <div slot="header" class="clearfix">
-        <span> 专项培养</span>
+        <span> 专项培养</span><div style="float: right;margin-bottom: -14px">
+        <el-form :model="queryDeviceParams" ref="queryRegularForm" label-width="68px" :inline="true">
+          <el-form-item :label="$t('年份')" prop="year">
+            <el-date-picker clearable size="small" style="width: 200px"
+                            v-model="queryDeviceParams.year"
+                            type="year"
+                            value-format="yyyy"
+                            :placeholder="$t('请选择') + $t('年份')">
+            </el-date-picker>
+          </el-form-item>
+          <el-button type="cyan" icon="el-icon-search" size="mini" @click="staffPlanQuery" style="margin-left: 20px;">
+            {{ $t('搜索') }}</el-button>
+        </el-form>
+      </div>
       </div>
-      <el-table :data="planList"  border>
+
+      <el-table :data="planList" v-loading="planLoading"  border>
         <el-table-column label="培养内容" align="center" prop="plantName" :show-overflow-tooltip="true"/>
         <el-table-column label="开始日期" align="center" prop="startDate" width="100">
           <template slot-scope="scope">
@@ -132,7 +133,8 @@ export default {
   data() {
     return {
       // 遮罩层
-      loading: true,
+      loading: false,
+      planLoading: false,
       visible: false,
       // 选中数组
       ids: [],
@@ -240,6 +242,7 @@ export default {
       this.visible = true
       this.staff = row.staff
       this.queryParams.staffId = row.staff.staffid
+      this.getNowTime()
       this.getPlanList()
       this.getParticipants()
       this.getDevice()
@@ -254,17 +257,17 @@ export default {
     },
     /** 查询培养计划列表 */
     getPlanList() {
-      this.loading = true;
+      this.planLoading = true;
       this.queryParams.year = this.queryDeviceParams.year
       listPlan(this.queryParams).then(response => {
         this.planList = response.rows;
         this.total = response.total;
-        this.loading = false;
+        this.planLoading = false;
       });
     },
     getParticipants() {
       this.queryCompanyParams.staffId = this.staff.staffid
-      this.queryCompanyParams.year = this.queryDeviceParams.year
+      // this.queryCompanyParams.year = this.queryDeviceParams.year
       listParticipants(this.queryCompanyParams).then(response => {
         this.participantsList = response.rows;
       });
@@ -275,10 +278,8 @@ export default {
         this.devicceList = response.rows;
       });
     },
-    staffQuery (){
+    staffPlanQuery (){
       this.getPlanList()
-      this.getParticipants()
-      this.getDevice()
     },
     // 装置名称字典翻译
     plantCodeFormat(row, column) {