wangggziwen пре 3 година
родитељ
комит
d4bff5db4a

+ 9 - 1
master/src/main/java/com/ruoyi/project/training/spec/controller/TStPlanController.java

@@ -2,6 +2,8 @@ package com.ruoyi.project.training.spec.controller;
 
 import java.util.List;
 
+import com.ruoyi.project.system.domain.SysUser;
+import com.ruoyi.project.system.service.ISysUserService;
 import com.ruoyi.project.training.spec.domain.TStSuccessor;
 import com.ruoyi.project.training.spec.service.ITStSuccessorService;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -39,6 +41,9 @@ public class TStPlanController extends BaseController
     @Autowired
     private ITStSuccessorService tStSuccessorService;
 
+    @Autowired
+    private ISysUserService sysUserService;
+
     /**
      * 根据STAFF_ID查询培训计划列表
      * @autor 王子文
@@ -49,6 +54,10 @@ public class TStPlanController extends BaseController
     @PreAuthorize("@ss.hasPermi('spec:plan:list')")
     @GetMapping("/listByStaffId")
     public TableDataInfo listByStaffId(TStPlan tStPlan) {
+        Long userId = getUserId();
+        SysUser sysUser = sysUserService.selectUserById(userId);
+        String staffId = sysUser.getStaffId();
+        tStPlan.setStaffId(staffId);
         startPage();
         List<TStPlan> list = tStPlanService.selectTStPlanListByStaffId(tStPlan);
         return getDataTable(list);
@@ -64,7 +73,6 @@ 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);
     }

+ 1 - 1
master/src/main/resources/application.yml

@@ -9,7 +9,7 @@ ruoyi:
   # 实例演示开关
   demoEnabled: true
   # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /u03/cpmsfile/uploadPath)
-  profile: /u03/cpmsfile/uploadPath
+  profile: D:/ruoyi/uploadPath
   # 邮件中链接跳转路径 示例(本地:http://localhost/#,服务器:http://47.114.101.16:8080/cpms/index.html#)
   requestJumpPath: https://cpms.basf-ypc.net.cn/cpms/index.html#
   # 获取ip地址开关

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

@@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <!-- 王子文 2022年4月19日 10点28分 -->
         <!-- 添加 表连接 sys_user u -->
         <!-- 添加 结果字段 u.nick_name -->
-        select d.id, d.staff_id,d.APPROVE_STATUS, u.nick_name, d.plant_name, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.start_date, d.end_date, d.class_hour, d.class_content, d.study_state ,s.dept_name from t_st_plan d
+        select d.overall_comment, d.score, d.id, d.staff_id,d.APPROVE_STATUS, u.nick_name, d.plant_name, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.start_date, d.end_date, d.class_hour, d.class_content, d.study_state ,s.dept_name from t_st_plan d
         left join sys_dept s on s.dept_id = d.dept_id
         left join sys_user u on d.staff_id = u.staffid
     </sql>

+ 31 - 1
ui/src/views/training/spec/myplan/index.vue

@@ -357,7 +357,26 @@
     </el-dialog>
     <!-- 查看培训详情对话框 -->
     <el-dialog v-dialogDrag :title="detail.title" :visible.sync="detail.open" width="700px" append-to-body>
-      
+      <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>
       <div slot="footer" class="dialog-footer">
         <el-button @click="detail.open = false">{{ $t('返 回') }}</el-button>
       </div>
@@ -397,6 +416,7 @@ export default {
   components: { Treeselect,PlanApprove },
   data() {
     return {
+      tableData: [],
       // 反馈对话框参数
       feedbackParams: {
         planId: 0,
@@ -582,9 +602,19 @@ export default {
     },
     /** 查看培训详情处理 */
     handleDetail(row) {
+      this.tableData = [];
       this.detail.id = row.id;
       this.detail.title = row.plantName + this.$t('详情');
       this.detail.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) {

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

@@ -398,7 +398,36 @@
     </el-dialog>
     <!-- 查看培训详情对话框 -->
     <el-dialog v-dialogDrag :title="detail.title" :visible.sync="detail.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" readonly/>
+        </el-form-item>
+        <el-form-item label="综合评价">
+          <el-input v-model="commentParams.overallComment" type="textarea" rows="6" readonly/>
+        </el-form-item>
+      </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="detail.open = false">{{ $t('返 回') }}</el-button>
       </div>
@@ -578,12 +607,28 @@ export default {
     },
     /** 查看培训详情处理 */
     handleDetail(row) {
+      this.tableData = [];
+      this.commentParams = {},
       this.detail.id = row.id;
       this.detail.title = row.plantName + this.$t('详情');
       this.detail.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);
+      });
+      getPlan(row.id).then(response => {
+        this.commentParams.score = response.data.score;
+        this.commentParams.overallComment = response.data.overallComment;
+      });
     },
     /** 评价处理 */
     handleComment(row) {
+      this.tableData = [];
       this.comment.id = row.id;
       this.comment.title = row.plantName + this.$t('评价');
       this.comment.open = true;