소스 검색

王子文

wangggziwen 3 년 전
부모
커밋
c8999601ec

+ 16 - 0
master/src/main/java/com/ruoyi/project/training/spec/controller/TStPlanController.java

@@ -39,6 +39,21 @@ public class TStPlanController extends BaseController
     @Autowired
     private ITStSuccessorService tStSuccessorService;
 
+    /**
+     * 根据STAFF_ID查询培训计划列表
+     * @autor 王子文
+     * @date 2022年4月20日
+     * @param tStPlan 培训计划对象
+     * @return 培训计划列表
+     */
+    @PreAuthorize("@ss.hasPermi('spec:plan:list')")
+    @GetMapping("/listByStaffId")
+    public TableDataInfo listByStaffId(TStPlan tStPlan) {
+        startPage();
+        List<TStPlan> list = tStPlanService.selectTStPlanListByStaffId(tStPlan);
+        return getDataTable(list);
+    }
+
     /**
      * 根据导师ID查询学员列表
      * @autor 王子文
@@ -49,6 +64,7 @@ public class TStPlanController extends BaseController
     @PreAuthorize("@ss.hasPermi('spec:plan:list')")
     @GetMapping("/getSuccessorListByMentorId")
     public AjaxResult getSuccessorListByMentorId(TStSuccessor tStSuccessor) {
+        getUserId();
         List<TStSuccessor> tStSuccessors = tStSuccessorService.selectTStSuccessorListByMentorId(tStSuccessor);
         return AjaxResult.success(tStSuccessors);
     }

+ 104 - 0
master/src/main/java/com/ruoyi/project/training/spec/controller/TStPlanFeedbackController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.project.training.spec.controller;
+
+import java.util.List;
+
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.framework.aspectj.lang.annotation.Log;
+import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
+import com.ruoyi.project.training.spec.domain.TStPlanFeedback;
+import com.ruoyi.project.training.spec.service.ITStPlanFeedbackService;
+import com.ruoyi.framework.web.controller.BaseController;
+import com.ruoyi.framework.web.domain.AjaxResult;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.framework.web.page.TableDataInfo;
+
+/**
+ * 专项培训反馈Controller
+ *
+ * @author ruoyi
+ * @date 2022-04-20
+ */
+@RestController
+@RequestMapping("/spec/feedback")
+public class TStPlanFeedbackController extends BaseController
+{
+    @Autowired
+    private ITStPlanFeedbackService tStPlanFeedbackService;
+
+    /**
+     * 查询专项培训反馈列表
+     */
+    @PreAuthorize("@ss.hasPermi('spec:feedback:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(TStPlanFeedback tStPlanFeedback)
+    {
+        startPage();
+        List<TStPlanFeedback> list = tStPlanFeedbackService.selectTStPlanFeedbackList(tStPlanFeedback);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出专项培训反馈列表
+     */
+    @PreAuthorize("@ss.hasPermi('spec:feedback:export')")
+    @Log(title = "专项培训反馈", businessType = BusinessType.EXPORT)
+    @GetMapping("/export")
+    public AjaxResult export(TStPlanFeedback tStPlanFeedback)
+    {
+        List<TStPlanFeedback> list = tStPlanFeedbackService.selectTStPlanFeedbackList(tStPlanFeedback);
+        ExcelUtil<TStPlanFeedback> util = new ExcelUtil<TStPlanFeedback>(TStPlanFeedback.class);
+        return util.exportExcel(list, "feedback");
+    }
+
+    /**
+     * 获取专项培训反馈详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('spec:feedback:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(tStPlanFeedbackService.selectTStPlanFeedbackById(id));
+    }
+
+    /**
+     * 新增专项培训反馈
+     */
+    @PreAuthorize("@ss.hasPermi('spec:feedback:add')")
+    @Log(title = "专项培训反馈", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody TStPlanFeedback tStPlanFeedback)
+    {
+        return toAjax(tStPlanFeedbackService.insertTStPlanFeedback(tStPlanFeedback));
+    }
+
+    /**
+     * 修改专项培训反馈
+     */
+    @PreAuthorize("@ss.hasPermi('spec:feedback:edit')")
+    @Log(title = "专项培训反馈", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody TStPlanFeedback tStPlanFeedback)
+    {
+        return toAjax(tStPlanFeedbackService.updateTStPlanFeedback(tStPlanFeedback));
+    }
+
+    /**
+     * 删除专项培训反馈
+     */
+    @PreAuthorize("@ss.hasPermi('spec:feedback:remove')")
+    @Log(title = "专项培训反馈", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(tStPlanFeedbackService.deleteTStPlanFeedbackByIds(ids));
+    }
+}

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

@@ -79,6 +79,28 @@ public class TStPlan extends BaseEntity
     /** 审核状态 */
     private Long approveStatus;
 
+    /** 科目成绩 */
+    private String score;
+
+    /** 综合评价 */
+    private String overallComment;
+
+    public String getOverallComment() {
+        return overallComment;
+    }
+
+    public void setOverallComment(String overallComment) {
+        this.overallComment = overallComment;
+    }
+
+    public String getScore() {
+        return score;
+    }
+
+    public void setScore(String score) {
+        this.score = score;
+    }
+
     public Long getApproveStatus() {
         return approveStatus;
     }

+ 130 - 0
master/src/main/java/com/ruoyi/project/training/spec/domain/TStPlanFeedback.java

@@ -0,0 +1,130 @@
+package com.ruoyi.project.training.spec.domain;
+
+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;
+
+/**
+ * 专项培训反馈对象 t_st_plan_feedback
+ *
+ * @author ruoyi
+ * @date 2022-04-20
+ */
+public class TStPlanFeedback extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 专项培训计划编号 */
+    @Excel(name = "专项培训计划编号")
+    private Long planId;
+
+    /** 问题1 */
+    @Excel(name = "问题1")
+    private String question1;
+
+    /** 问题2 */
+    @Excel(name = "问题2")
+    private String question2;
+
+    /** 问题3 */
+    @Excel(name = "问题3")
+    private String question3;
+
+    /** 答案1 */
+    @Excel(name = "答案1")
+    private String answer1;
+
+    /** 答案2 */
+    @Excel(name = "答案2")
+    private String answer2;
+
+    /** 答案3 */
+    @Excel(name = "答案3")
+    private String answer3;
+
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getPlanId() {
+        return planId;
+    }
+
+    public void setPlanId(Long planId) {
+        this.planId = planId;
+    }
+
+    public String getQuestion1() {
+        return question1;
+    }
+
+    public void setQuestion1(String question1) {
+        this.question1 = question1;
+    }
+
+    public String getQuestion2() {
+        return question2;
+    }
+
+    public void setQuestion2(String question2) {
+        this.question2 = question2;
+    }
+
+    public String getQuestion3() {
+        return question3;
+    }
+
+    public void setQuestion3(String question3) {
+        this.question3 = question3;
+    }
+
+    public String getAnswer1() {
+        return answer1;
+    }
+
+    public void setAnswer1(String answer1) {
+        this.answer1 = answer1;
+    }
+
+    public String getAnswer2() {
+        return answer2;
+    }
+
+    public void setAnswer2(String answer2) {
+        this.answer2 = answer2;
+    }
+
+    public String getAnswer3() {
+        return answer3;
+    }
+
+    public void setAnswer3(String answer3) {
+        this.answer3 = answer3;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("planId", getPlanId())
+                .append("question1", getQuestion1())
+                .append("question2", getQuestion2())
+                .append("question3", getQuestion3())
+                .append("answer1", getAnswer1())
+                .append("answer2", getAnswer2())
+                .append("answer3", getAnswer3())
+            .toString();
+    }
+}

+ 63 - 0
master/src/main/java/com/ruoyi/project/training/spec/mapper/TStPlanFeedbackMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.project.training.spec.mapper;
+
+import java.util.List;
+import com.ruoyi.framework.aspectj.lang.annotation.DataScope;
+import com.ruoyi.project.training.spec.domain.TStPlanFeedback;
+
+/**
+ * 专项培训反馈Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2022-04-20
+ */
+public interface TStPlanFeedbackMapper 
+{
+    /**
+     * 查询专项培训反馈
+     * 
+     * @param id 专项培训反馈ID
+     * @return 专项培训反馈
+     */
+    public TStPlanFeedback selectTStPlanFeedbackById(Long id);
+
+    /**
+     * 查询专项培训反馈列表
+     * 
+     * @param tStPlanFeedback 专项培训反馈
+     * @return 专项培训反馈集合
+     */
+    @DataScope(deptAlias = "d")
+    public List<TStPlanFeedback> selectTStPlanFeedbackList(TStPlanFeedback tStPlanFeedback);
+
+    /**
+     * 新增专项培训反馈
+     * 
+     * @param tStPlanFeedback 专项培训反馈
+     * @return 结果
+     */
+    public int insertTStPlanFeedback(TStPlanFeedback tStPlanFeedback);
+
+    /**
+     * 修改专项培训反馈
+     * 
+     * @param tStPlanFeedback 专项培训反馈
+     * @return 结果
+     */
+    public int updateTStPlanFeedback(TStPlanFeedback tStPlanFeedback);
+
+    /**
+     * 删除专项培训反馈
+     * 
+     * @param id 专项培训反馈ID
+     * @return 结果
+     */
+    public int deleteTStPlanFeedbackById(Long id);
+
+    /**
+     * 批量删除专项培训反馈
+     * 
+     * @param ids 需要删除的数据ID
+     * @return 结果
+     */
+    public int deleteTStPlanFeedbackByIds(Long[] ids);
+}

+ 9 - 0
master/src/main/java/com/ruoyi/project/training/spec/mapper/TStPlanMapper.java

@@ -12,6 +12,15 @@ import com.ruoyi.project.training.spec.domain.TStPlan;
  */
 public interface TStPlanMapper
 {
+    /**
+     * 根据STAFF_ID查询培训计划列表
+     * @autor 王子文
+     * @date 2022年4月20日
+     * @param tStPlan 培训计划对象
+     * @return 培训计划列表
+     */
+    List<TStPlan> selectTStPlanListByStaffId(TStPlan tStPlan);
+
     /**
      * 查询培训计划
      *

+ 61 - 0
master/src/main/java/com/ruoyi/project/training/spec/service/ITStPlanFeedbackService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.project.training.spec.service;
+
+import java.util.List;
+import com.ruoyi.project.training.spec.domain.TStPlanFeedback;
+
+/**
+ * 专项培训反馈Service接口
+ * 
+ * @author ruoyi
+ * @date 2022-04-20
+ */
+public interface ITStPlanFeedbackService 
+{
+    /**
+     * 查询专项培训反馈
+     * 
+     * @param id 专项培训反馈ID
+     * @return 专项培训反馈
+     */
+    public TStPlanFeedback selectTStPlanFeedbackById(Long id);
+
+    /**
+     * 查询专项培训反馈列表
+     * 
+     * @param tStPlanFeedback 专项培训反馈
+     * @return 专项培训反馈集合
+     */
+    public List<TStPlanFeedback> selectTStPlanFeedbackList(TStPlanFeedback tStPlanFeedback);
+
+    /**
+     * 新增专项培训反馈
+     * 
+     * @param tStPlanFeedback 专项培训反馈
+     * @return 结果
+     */
+    public int insertTStPlanFeedback(TStPlanFeedback tStPlanFeedback);
+
+    /**
+     * 修改专项培训反馈
+     * 
+     * @param tStPlanFeedback 专项培训反馈
+     * @return 结果
+     */
+    public int updateTStPlanFeedback(TStPlanFeedback tStPlanFeedback);
+
+    /**
+     * 批量删除专项培训反馈
+     * 
+     * @param ids 需要删除的专项培训反馈ID
+     * @return 结果
+     */
+    public int deleteTStPlanFeedbackByIds(Long[] ids);
+
+    /**
+     * 删除专项培训反馈信息
+     * 
+     * @param id 专项培训反馈ID
+     * @return 结果
+     */
+    public int deleteTStPlanFeedbackById(Long id);
+}

+ 9 - 0
master/src/main/java/com/ruoyi/project/training/spec/service/ITStPlanService.java

@@ -11,6 +11,15 @@ import com.ruoyi.project.training.spec.domain.TStPlan;
  */
 public interface ITStPlanService
 {
+    /**
+     * 根据STAFF_ID查询培训计划列表
+     * @autor 王子文
+     * @date 2022年4月20日
+     * @param tStPlan 培训计划对象
+     * @return 培训计划列表
+     */
+    List<TStPlan> selectTStPlanListByStaffId(TStPlan tStPlan);
+
     /**
      * 查询培训计划
      *

+ 93 - 0
master/src/main/java/com/ruoyi/project/training/spec/service/impl/TStPlanFeedbackServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.project.training.spec.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.project.training.spec.mapper.TStPlanFeedbackMapper;
+import com.ruoyi.project.training.spec.domain.TStPlanFeedback;
+import com.ruoyi.project.training.spec.service.ITStPlanFeedbackService;
+
+/**
+ * 专项培训反馈Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-04-20
+ */
+@Service
+public class TStPlanFeedbackServiceImpl implements ITStPlanFeedbackService
+{
+    @Autowired
+    private TStPlanFeedbackMapper tStPlanFeedbackMapper;
+
+    /**
+     * 查询专项培训反馈
+     *
+     * @param id 专项培训反馈ID
+     * @return 专项培训反馈
+     */
+    @Override
+    public TStPlanFeedback selectTStPlanFeedbackById(Long id)
+    {
+        return tStPlanFeedbackMapper.selectTStPlanFeedbackById(id);
+    }
+
+    /**
+     * 查询专项培训反馈列表
+     *
+     * @param tStPlanFeedback 专项培训反馈
+     * @return 专项培训反馈
+     */
+    @Override
+    public List<TStPlanFeedback> selectTStPlanFeedbackList(TStPlanFeedback tStPlanFeedback)
+    {
+        return tStPlanFeedbackMapper.selectTStPlanFeedbackList(tStPlanFeedback);
+    }
+
+    /**
+     * 新增专项培训反馈
+     *
+     * @param tStPlanFeedback 专项培训反馈
+     * @return 结果
+     */
+    @Override
+    public int insertTStPlanFeedback(TStPlanFeedback tStPlanFeedback)
+    {
+        return tStPlanFeedbackMapper.insertTStPlanFeedback(tStPlanFeedback);
+    }
+
+    /**
+     * 修改专项培训反馈
+     *
+     * @param tStPlanFeedback 专项培训反馈
+     * @return 结果
+     */
+    @Override
+    public int updateTStPlanFeedback(TStPlanFeedback tStPlanFeedback)
+    {
+        return tStPlanFeedbackMapper.updateTStPlanFeedback(tStPlanFeedback);
+    }
+
+    /**
+     * 批量删除专项培训反馈
+     *
+     * @param ids 需要删除的专项培训反馈ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTStPlanFeedbackByIds(Long[] ids)
+    {
+        return tStPlanFeedbackMapper.deleteTStPlanFeedbackByIds(ids);
+    }
+
+    /**
+     * 删除专项培训反馈信息
+     *
+     * @param id 专项培训反馈ID
+     * @return 结果
+     */
+    @Override
+    public int deleteTStPlanFeedbackById(Long id)
+    {
+        return tStPlanFeedbackMapper.deleteTStPlanFeedbackById(id);
+    }
+}

+ 12 - 0
master/src/main/java/com/ruoyi/project/training/spec/service/impl/TStPlanServiceImpl.java

@@ -19,6 +19,18 @@ public class TStPlanServiceImpl implements ITStPlanService
     @Autowired
     private TStPlanMapper tStPlanMapper;
 
+    /**
+     * 根据STAFF_ID查询培训计划列表
+     * @autor 王子文
+     * @date 2022年4月20日
+     * @param tStPlan 培训计划对象
+     * @return 培训计划列表
+     */
+    @Override
+    public List<TStPlan> selectTStPlanListByStaffId(TStPlan tStPlan) {
+        return tStPlanMapper.selectTStPlanListByStaffId(tStPlan);
+    }
+
     /**
      * 查询培训计划
      *

+ 84 - 0
master/src/main/resources/mybatis/training/spec/TStPlanFeedbackMapper.xml

@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.project.training.spec.mapper.TStPlanFeedbackMapper">
+    
+    <resultMap type="TStPlanFeedback" id="TStPlanFeedbackResult">
+        <result property="id"    column="id"    />
+        <result property="planId"    column="plan_id"    />
+        <result property="question"    column="question"    />
+        <result property="answer"    column="answer"    />
+        <result property="deptName" column="dept_name" />
+    </resultMap>
+
+    <sql id="selectTStPlanFeedbackVo">
+        select id,plan_id,QUESTION1,QUESTION2,QUESTION3,ANSWER1,ANSWER2,ANSWER3 from t_st_plan_feedback
+    </sql>
+
+    <select id="selectTStPlanFeedbackList" parameterType="TStPlanFeedback" resultMap="TStPlanFeedbackResult">
+        <include refid="selectTStPlanFeedbackVo"/>
+        <where>  
+            <if test="planId != null "> and plan_id = #{planId}</if>
+            <if test="question != null  and question != ''"> and question = #{question}</if>
+            <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+    
+    <select id="selectTStPlanFeedbackById" parameterType="Long" resultMap="TStPlanFeedbackResult">
+        <include refid="selectTStPlanFeedbackVo"/>
+        where plan_id = #{id}
+    </select>
+        
+    <insert id="insertTStPlanFeedback" parameterType="TStPlanFeedback">
+        <selectKey keyProperty="id" resultType="long" order="BEFORE">
+            SELECT seq_t_st_plan_feedback.NEXTVAL as id FROM DUAL
+        </selectKey>
+        insert into t_st_plan_feedback
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="planId != null">plan_id,</if>
+            <if test="question1 != null">question1,</if>
+            <if test="question2 != null">question2,</if>
+            <if test="question3 != null">question3,</if>
+            <if test="answer1 != null">answer1,</if>
+            <if test="answer2 != null">answer2,</if>
+            <if test="answer3 != null">answer3,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="planId != null">#{planId},</if>
+            <if test="question1 != null">#{question1},</if>
+            <if test="question2 != null">#{question2},</if>
+            <if test="question3 != null">#{question3},</if>
+            <if test="answer1 != null">#{answer1},</if>
+            <if test="answer2 != null">#{answer2},</if>
+            <if test="answer3 != null">#{answer3},</if>
+         </trim>
+    </insert>
+
+    <update id="updateTStPlanFeedback" parameterType="TStPlanFeedback">
+        update t_st_plan_feedback
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="planId != null">plan_id = #{planId},</if>
+            <if test="question != null">question = #{question},</if>
+            <if test="answer != null">answer = #{answer},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <update id="deleteTStPlanFeedbackById" parameterType="Long">
+        update t_st_plan_feedback set del_flag = 2 where id = #{id}
+    </update>
+
+    <update id="deleteTStPlanFeedbackByIds" parameterType="String">
+        update t_st_plan_feedback set del_flag = 2 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </update>
+    
+</mapper>

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

@@ -22,6 +22,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="classContent"    column="class_content"    />
         <result property="studyState"    column="study_state"    />
         <result property="deptName" column="dept_name" />
+        <result property="score" column="score" />
+        <result property="overallComment" column="overall_comment" />
     </resultMap>
 
     <sql id="selectTStPlanVo">
@@ -34,6 +36,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         left join sys_user u on d.staff_id = u.staffid
     </sql>
 
+    <!--王子文 2022年4月20日 09点30分 添加-->
+    <!--根据STAFF_ID查询培训计划列表-->
+    <select id="selectTStPlanListByStaffId" parameterType="TStPlan" resultMap="TStPlanResult">
+        <include refid="selectTStPlanVo"/>
+        <where>
+            <if test="staffId != null  and staffId != ''"> and staff_id = #{staffId}</if>
+            and d.del_flag = 0
+        </where>
+        <!-- 数据范围过滤 -->
+        ${params.dataScope}
+    </select>
+
     <select id="selectTStPlanList" parameterType="TStPlan" resultMap="TStPlanResult">
         <include refid="selectTStPlanVo"/>
         <where>
@@ -109,6 +123,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="classHour != null">class_hour = #{classHour},</if>
             <if test="classContent != null">class_content = #{classContent},</if>
             <if test="studyState != null">study_state = #{studyState},</if>
+            <if test="score != null">score = #{score},</if>
+            <if test="overallComment != null">overall_comment = #{overallComment},</if>
         </trim>
         where id = #{id}
     </update>

+ 9 - 0
ui/src/api/training/spec/plan.js

@@ -1,5 +1,14 @@
 import request from '@/utils/request'
 
+// 根据STAFF_ID查询培训计划列表
+export function listPlanByStaffId(query) {
+  return request({
+    url: '/spec/plan/listByStaffId',
+    method: 'get',
+    params: query
+  })
+}
+
 // 根据导师ID查询学员列表
 export function getSuccessorListByMentorId(query) {
   return request({

+ 113 - 1
ui/src/views/training/spec/plan/index.vue

@@ -134,6 +134,22 @@
       </el-table-column>
       <el-table-column label="操作" align="center" fixed="right" class-name="small-padding fixed-width">
         <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleComment(scope.row)"
+            v-hasPermi="['spec:plan:edit']"
+            v-if="scope.row.studyState == 3"
+          >评价</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            v-hasPermi="['spec:plan:edit']"
+            @click="handleDetail(scope.row)"
+            v-if="scope.row.studyState == 2"
+          >详情</el-button>
           <el-button
             size="mini"
             type="text"
@@ -331,11 +347,56 @@
         <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
       </div>
     </el-dialog>
+    <!-- 评价对话框 -->
+    <el-dialog v-dialogDrag :title="comment.title" :visible.sync="comment.open" width="700px" append-to-body>
+      <h3 style="margin-bottom:20px;text-align:center;">学员反馈</h3>
+      <el-table
+        :data="tableData"
+        border
+        style="width: 100%"
+      >
+        <el-table-column
+          prop="id"
+          label="编号"
+          width="50">
+        </el-table-column>
+        <el-table-column
+          prop="question"
+          label="问题"
+          width="250">
+        </el-table-column>
+        <el-table-column
+          prop="answer"
+          label="答案">
+        </el-table-column>
+      </el-table>
+      <h3 style="margin-top:50px;margin-bottom:20px;text-align:center;">导师反馈</h3>
+      <el-form label-width="80px">
+        <el-form-item label="科目成绩">
+          <el-input v-model="commentParams.score" />
+        </el-form-item>
+        <el-form-item label="综合评价">
+          <el-input v-model="commentParams.overallComment" type="textarea" rows="6"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="handleAddComment()">{{ $t('提 交') }}</el-button>
+        <el-button @click="comment.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
+    <!-- 查看培训详情对话框 -->
+    <el-dialog v-dialogDrag :title="detail.title" :visible.sync="detail.open" width="700px" append-to-body>
+      
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="detail.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
     <plan-approve v-if="planApproveVisible" ref="planApprove" @refreshDataList="getList"></plan-approve>
   </div>
 </template>
 
 <script>
+import { listFeedback, getFeedback, addFeedback, updateFeedback, delFeedback, exportFeedback } from "@/api/training/spec/feedback";
 import { listPlan, getPlan, delPlan, addPlan, updatePlan, exportPlan, importTemplate, getSuccessorListByMentorId } from "@/api/training/spec/plan";
 import { allFileList, delCommonfile } from "@/api/common/commonfile";
 import { treeselect } from "@/api/system/dept";
@@ -349,6 +410,26 @@ export default {
   components: { Treeselect,PlanApprove },
   data() {
     return {
+      commentParams: {
+        id: 0,
+        score: null,
+        overallComment: ""
+      },
+      // 查看培训详情参数
+      detail: {
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: ""
+      },
+      // 评价参数
+      comment: {
+        id: 0,
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: ""
+      },
       // 遮罩层
       loading: true,
       planApproveVisible: false,
@@ -446,7 +527,8 @@ export default {
           pageNum: 1,
           pageTotalNum: 1,
           loadedRatio: 0,
-        },
+      },
+      tableData: [],
     };
   },
   watch: {
@@ -468,6 +550,36 @@ export default {
     this.getSuccessorOptions();
   },
   methods: {
+    /** 评价提交处理 */
+    handleAddComment() {
+      this.commentParams.id = this.comment.id;
+      updatePlan(this.commentParams).then(response => {
+        this.comment.open = false;
+        this.msgSuccess("已结束学习");
+        this.getList();
+      });
+    },
+    /** 查看培训详情处理 */
+    handleDetail(row) {
+      this.detail.id = row.id;
+      this.detail.title = row.plantName + this.$t('详情');
+      this.detail.open = true;
+    },
+    /** 评价处理 */
+    handleComment(row) {
+      this.comment.id = row.id;
+      this.comment.title = row.plantName + this.$t('评价');
+      this.comment.open = true;
+      getFeedback(row.id).then(response => {
+        let feedbackObject = response.data;
+        let data1 = { id: 1, question: feedbackObject.question1, answer: feedbackObject.answer1};
+        let data2 = { id: 2, question: feedbackObject.question2, answer: feedbackObject.answer2};
+        let data3 = { id: 3, question: feedbackObject.question3, answer: feedbackObject.answer3};
+        this.tableData.push(data1);
+        this.tableData.push(data2);
+        this.tableData.push(data3);
+      });
+    },
     /** 文件下载处理 */
     handleDownload(row) {
       var name = row.fileName;