jiangbiao 1 rok temu
rodzic
commit
cd98a817f2
33 zmienionych plików z 2853 dodań i 283 usunięć
  1. 4 0
      master/src/main/java/com/ruoyi/framework/web/controller/BaseController.java
  2. 6 6
      master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsFirstplanController.java
  3. 3 3
      master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsFirstplanTmplController.java
  4. 23 17
      master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsNewController.java
  5. 8 8
      master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsYsplanTmplController.java
  6. 10 0
      master/src/main/java/com/ruoyi/project/training/bccnew/domain/TTsNew.java
  7. 0 1
      master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFirstplanMapper.java
  8. 0 1
      master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFirstplanTmplMapper.java
  9. 0 1
      master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFlplanMapper.java
  10. 0 1
      master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFlplanTmplMapper.java
  11. 0 1
      master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFtplanMapper.java
  12. 0 1
      master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFtplanTmplMapper.java
  13. 0 1
      master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsLjplanMapper.java
  14. 0 1
      master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsLjplanTmplMapper.java
  15. 0 1
      master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsNewMapper.java
  16. 0 1
      master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsYsplanMapper.java
  17. 0 1
      master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsYsplanTmplMapper.java
  18. 1 1
      master/src/main/resources/mybatis/training/bccnew/TTsNewMapper.xml
  19. 13 13
      ui/src/api/training/bccnew/ysPlan.js
  20. 5 0
      ui/src/router/index.js
  21. 75 62
      ui/src/views/training/bccnew/firstPlanTmpl/index.vue
  22. 2 117
      ui/src/views/training/bccnew/firstplan/index.vue
  23. 534 0
      ui/src/views/training/bccnew/firstplan/index_student.vue
  24. 192 3
      ui/src/views/training/bccnew/flPlan/index.vue
  25. 191 3
      ui/src/views/training/bccnew/ftPlan/index.vue
  26. 191 3
      ui/src/views/training/bccnew/ljPlan/index.vue
  27. 7 6
      ui/src/views/training/bccnew/tsnew/index.vue
  28. 754 0
      ui/src/views/training/bccnew/tsnew/index_s.vue
  29. 4 4
      ui/src/views/training/bccnew/tsnew/score.vue
  30. 496 0
      ui/src/views/training/bccnew/tsnew/score_student.vue
  31. 5 5
      ui/src/views/training/bccnew/tsnew/trainingPlan.vue
  32. 120 0
      ui/src/views/training/bccnew/tsnew/trainingPlan_student.vue
  33. 209 21
      ui/src/views/training/bccnew/ysPlan/index.vue

+ 4 - 0
master/src/main/java/com/ruoyi/framework/web/controller/BaseController.java

@@ -125,4 +125,8 @@ public class BaseController
         LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
         return loginUser.getUser().getNickName();
     }
+    protected String getBaseStaffId () {
+        LoginUser loginUser = SpringUtils.getBean(TokenService.class).getLoginUser(ServletUtils.getRequest());
+        return loginUser.getUser().getStaffId();
+    }
 }

+ 6 - 6
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsFirstplanController.java

@@ -38,7 +38,7 @@ public class TTsFirstplanController extends BaseController {
     /**
      * 查询进组培训列表
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:list')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:list')")
     @GetMapping("/list")
     public TableDataInfo list(TTsFirstplan tTsFirstplan) {
         startPage();
@@ -49,7 +49,7 @@ public class TTsFirstplanController extends BaseController {
     /**
      * 导出进组培训列表
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:export')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:export')")
     @Log(title = "进组培训", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TTsFirstplan tTsFirstplan) {
@@ -61,7 +61,7 @@ public class TTsFirstplanController extends BaseController {
     /**
      * 获取进组培训详细信息
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:query')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id) {
         return AjaxResult.success(tTsFirstplanService.selectTTsFirstplanById(id));
@@ -70,7 +70,7 @@ public class TTsFirstplanController extends BaseController {
     /**
      * 新增进组培训
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:add')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:add')")
     @Log(title = "进组培训", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TTsFirstplan tTsFirstplan) {
@@ -104,7 +104,7 @@ public class TTsFirstplanController extends BaseController {
     /**
      * 修改进组培训
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:edit')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:edit')")
     @Log(title = "进组培训", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TTsFirstplan tTsFirstplan) {
@@ -114,7 +114,7 @@ public class TTsFirstplanController extends BaseController {
     /**
      * 删除进组培训
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:remove')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:firstplan:remove')")
     @Log(title = "进组培训", businessType = BusinessType.DELETE)
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids) {

+ 3 - 3
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsFirstplanTmplController.java

@@ -94,15 +94,15 @@ public class TTsFirstplanTmplController extends BaseController {
     }
 
     @Log(title = "附件上传", businessType = BusinessType.UPDATE)
-    @PostMapping("/uploadFile")
-    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, Long id) throws IOException {
+    @PostMapping("/uploadFile/{id}")
+    public AjaxResult uploadFile(@RequestParam("file") MultipartFile file, @PathVariable Long id) throws IOException {
         if (!file.isEmpty()) {
             String url = FileUploadUtils.upload(RuoYiConfig.getFilePath("/bccnew"), file);
             TTsFirstplanTmpl entity = tTsFirstplanTmplService.selectTTsFirstplanTmplById(id);
             entity.setFileUrl(url);
             entity.setFileName(file.getOriginalFilename());
             tTsFirstplanTmplService.updateTTsFirstplanTmpl(entity);
-            return AjaxResult.success();
+            return AjaxResult.success(id);
         }
         return AjaxResult.error("上传失败,请联系管理员");
     }

+ 23 - 17
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsNewController.java

@@ -25,7 +25,10 @@ import java.io.InputStream;
 import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import java.time.format.DateTimeFormatter;
-import java.util.*;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -90,10 +93,13 @@ public class TTsNewController extends BaseController {
     /**
      * 查询导师带徒列表
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:list')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:list')")
     @GetMapping("/list")
     public TableDataInfo list(TTsNew tTsNew) {
         startPage();
+        if ("1".equals(tTsNew.getIsStudent())) {
+                tTsNew.setStaffId(getBaseStaffId());
+        }
         List<TTsNew> list = tTsNewService.selectTTsNewList(tTsNew);
         //线程池
         ExecutorService executorService = Executors.newFixedThreadPool(10);
@@ -127,7 +133,7 @@ public class TTsNewController extends BaseController {
                         List<TTsYsplan> ysPlansNow = tTsYsplanService.selectTTsYsplanListByNewId(tTsYsplan);
                         secAll = ysPlansAll.size();
                         secNow = ysPlansNow.size();
-                    }else if (t.getPlanType() == 3) {
+                    } else if (t.getPlanType() == 3) {
                         TTsFlplan tTsFlplan = new TTsFlplan();
                         tTsFlplan.setNewId(t.getNewId());
                         List<TTsFlplan> flPlansAll = tTsFlplanService.selectTTsFlplanListByNewId(tTsFlplan);
@@ -135,7 +141,7 @@ public class TTsNewController extends BaseController {
                         List<TTsFlplan> flPlansNow = tTsFlplanService.selectTTsFlplanListByNewId(tTsFlplan);
                         secAll = flPlansAll.size();
                         secNow = flPlansNow.size();
-                    }else if (t.getPlanType() == 4) {
+                    } else if (t.getPlanType() == 4) {
                         TTsFtplan tTsFtplan = new TTsFtplan();
                         tTsFtplan.setNewId(t.getNewId());
                         List<TTsFtplan> ftPlansAll = tTsFtplanService.selectTTsFtplanListByNewId(tTsFtplan);
@@ -170,7 +176,7 @@ public class TTsNewController extends BaseController {
     /**
      * 导出导师带徒列表
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:export')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:export')")
     @Log(title = "导师带徒", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TTsNew tTsNew) {
@@ -182,7 +188,7 @@ public class TTsNewController extends BaseController {
     /**
      * 获取导师带徒详细信息
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:query')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:query')")
     @GetMapping(value = "/{newId}")
     public AjaxResult getInfo(@PathVariable("newId") Long newId) {
         return AjaxResult.success(tTsNewService.selectTTsNewById(newId));
@@ -191,7 +197,7 @@ public class TTsNewController extends BaseController {
     /**
      * 新增导师带徒
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:add')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:add')")
     @Log(title = "导师带徒", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TTsNew tTsNew) throws IOException {
@@ -324,7 +330,7 @@ public class TTsNewController extends BaseController {
             TTsLjplan ljplan = new TTsLjplan();
             ljplan.setNewId(newId);
             List<TTsLjplan> tTsLjplans = tTsLjplanService.selectTTsLjplanListByNewId(ljplan);
-            planList = new RowRenderData[tTsLjplans.size()+1];
+            planList = new RowRenderData[tTsLjplans.size() + 1];
             planList[0] = Rows.create("Training Plan 详细计划", "Planned Training Date 计划培训日期", "Training Topics 培训主题", "Expected Training Requirement 培训预期达到的要求");
             int i = 0;
             for (TTsLjplan plan : tTsLjplans) {
@@ -336,7 +342,7 @@ public class TTsNewController extends BaseController {
             TTsYsplan ysplan = new TTsYsplan();
             ysplan.setNewId(newId);
             List<TTsYsplan> tTsYsplans = tTsYsplanService.selectTTsYsplanListByNewId(ysplan);
-            planList = new RowRenderData[tTsYsplans.size()+1];
+            planList = new RowRenderData[tTsYsplans.size() + 1];
             planList[0] = Rows.create("Training Plan 详细计划", "Planned Training Date 计划培训日期", "Training Topics 培训主题", "Expected Training Requirement 培训预期达到的要求");
             int i = 0;
             for (TTsYsplan plan : tTsYsplans) {
@@ -348,7 +354,7 @@ public class TTsNewController extends BaseController {
             TTsFlplan flplan = new TTsFlplan();
             flplan.setNewId(newId);
             List<TTsFlplan> tTsFlplans = tTsFlplanService.selectTTsFlplanListByNewId(flplan);
-            planList = new RowRenderData[tTsFlplans.size()+1];
+            planList = new RowRenderData[tTsFlplans.size() + 1];
             planList[0] = Rows.create("Training Plan 详细计划", "Planned Training Date 计划培训日期", "Training Topics 培训主题", "Expected Training Requirement 培训预期达到的要求");
             int i = 0;
             for (TTsFlplan plan : tTsFlplans) {
@@ -360,7 +366,7 @@ public class TTsNewController extends BaseController {
             TTsFtplan ftplan = new TTsFtplan();
             ftplan.setNewId(newId);
             List<TTsFtplan> tTsFtplans = tTsFtplanService.selectTTsFtplanListByNewId(ftplan);
-            planList = new RowRenderData[tTsFtplans.size()+1];
+            planList = new RowRenderData[tTsFtplans.size() + 1];
             planList[0] = Rows.create("Training Plan 详细计划", "Planned Training Date 计划培训日期", "Training Topics 培训主题", "Expected Training Requirement 培训预期达到的要求");
             int i = 0;
             for (TTsFtplan plan : tTsFtplans) {
@@ -404,7 +410,7 @@ public class TTsNewController extends BaseController {
             TTsLjplan ljplan = new TTsLjplan();
             ljplan.setNewId(newId);
             List<TTsLjplan> tTsLjplans = tTsLjplanService.selectTTsLjplanListByNewId(ljplan);
-            planList = new RowRenderData[tTsLjplans.size()+2];
+            planList = new RowRenderData[tTsLjplans.size() + 2];
             planList[0] = Rows.create("Training Topics 培训主题", "", "Training Date 培训日期", "Training Effectiveness Evaluation* 培训效果评价*", "Training Effectiveness Acknowledgement 培训效果确认", "", "Mentor comment 导师意见");
             planList[1] = Rows.create("", "", "", "", "Trainee 学徒", "Tutor 导师", "Proceed to next topic or not 是否转至下一主题");
             int i = 1;
@@ -417,7 +423,7 @@ public class TTsNewController extends BaseController {
             TTsYsplan ysplan = new TTsYsplan();
             ysplan.setNewId(newId);
             List<TTsYsplan> tTsYsplans = tTsYsplanService.selectTTsYsplanListByNewId(ysplan);
-            planList = new RowRenderData[tTsYsplans.size()+2];
+            planList = new RowRenderData[tTsYsplans.size() + 2];
             planList[0] = Rows.create("Training Topics 培训主题", "", "Training Date 培训日期", "Training Effectiveness Evaluation* 培训效果评价*", "Training Effectiveness Acknowledgement 培训效果确认", "", "Mentor comment 导师意见");
             planList[1] = Rows.create("", "", "", "", "Trainee 学徒", "Tutor 导师", "Proceed to next topic or not 是否转至下一主题");
             int i = 1;
@@ -430,7 +436,7 @@ public class TTsNewController extends BaseController {
             TTsFlplan flplan = new TTsFlplan();
             flplan.setNewId(newId);
             List<TTsFlplan> tTsFlplans = tTsFlplanService.selectTTsFlplanListByNewId(flplan);
-            planList = new RowRenderData[tTsFlplans.size()+2];
+            planList = new RowRenderData[tTsFlplans.size() + 2];
             planList[0] = Rows.create("Training Topics 培训主题", "", "Training Date 培训日期", "Training Effectiveness Evaluation* 培训效果评价*", "Training Effectiveness Acknowledgement 培训效果确认", "", "Mentor comment 导师意见");
             planList[1] = Rows.create("", "", "", "", "Trainee 学徒", "Tutor 导师", "Proceed to next topic or not 是否转至下一主题");
             int i = 1;
@@ -443,7 +449,7 @@ public class TTsNewController extends BaseController {
             TTsFtplan ftplan = new TTsFtplan();
             ftplan.setNewId(newId);
             List<TTsFtplan> tTsFtplans = tTsFtplanService.selectTTsFtplanListByNewId(ftplan);
-            planList = new RowRenderData[tTsFtplans.size()+2];
+            planList = new RowRenderData[tTsFtplans.size() + 2];
             planList[0] = Rows.create("Training Topics 培训主题", "", "Training Date 培训日期", "Training Effectiveness Evaluation* 培训效果评价*", "Training Effectiveness Acknowledgement 培训效果确认", "", "Mentor comment 导师意见");
             planList[1] = Rows.create("", "", "", "", "Trainee 学徒", "Tutor 导师", "Proceed to next topic or not 是否转至下一主题");
             int i = 1;
@@ -515,7 +521,7 @@ public class TTsNewController extends BaseController {
     /**
      * 修改导师带徒
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:edit')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:edit')")
     @Log(title = "导师带徒", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TTsNew tTsNew) {
@@ -525,7 +531,7 @@ public class TTsNewController extends BaseController {
     /**
      * 删除导师带徒
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:remove')")
+//    @PreAuthorize("@ss.hasPermi('bccnew:tsnew:remove')")
     @Log(title = "导师带徒", businessType = BusinessType.DELETE)
     @DeleteMapping("/{newIds}")
     public AjaxResult remove(@PathVariable Long[] newIds) {

+ 8 - 8
master/src/main/java/com/ruoyi/project/training/bccnew/controller/TTsYsplanTmplController.java

@@ -26,7 +26,7 @@ import org.springframework.web.multipart.MultipartFile;
  * @date 2024-06-13
  */
 @RestController
-@RequestMapping("/bccnew/yaPlan")
+@RequestMapping("/bccnew/ysPlan")
 public class TTsYsplanTmplController extends BaseController
 {
     @Autowired
@@ -35,7 +35,7 @@ public class TTsYsplanTmplController extends BaseController
     /**
      * 查询压缩培训模版列表
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:yaPlan:list')")
+    @PreAuthorize("@ss.hasPermi('bccnew:ysPlan:list')")
     @GetMapping("/list")
     public TableDataInfo list(TTsYsplanTmpl tTsYsplanTmpl)
     {
@@ -47,20 +47,20 @@ public class TTsYsplanTmplController extends BaseController
     /**
      * 导出压缩培训模版列表
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:yaPlan:export')")
+    @PreAuthorize("@ss.hasPermi('bccnew:ysPlan:export')")
     @Log(title = "压缩培训模版", businessType = BusinessType.EXPORT)
     @GetMapping("/export")
     public AjaxResult export(TTsYsplanTmpl tTsYsplanTmpl)
     {
         List<TTsYsplanTmpl> list = tTsYsplanTmplService.selectTTsYsplanTmplList(tTsYsplanTmpl);
         ExcelUtil<TTsYsplanTmpl> util = new ExcelUtil<TTsYsplanTmpl>(TTsYsplanTmpl.class);
-        return util.exportExcel(list, "yaPlan");
+        return util.exportExcel(list, "ysPlan");
     }
 
     /**
      * 获取压缩培训模版详细信息
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:yaPlan:query')")
+    @PreAuthorize("@ss.hasPermi('bccnew:ysPlan:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
@@ -70,7 +70,7 @@ public class TTsYsplanTmplController extends BaseController
     /**
      * 新增压缩培训模版
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:yaPlan:add')")
+    @PreAuthorize("@ss.hasPermi('bccnew:ysPlan:add')")
     @Log(title = "压缩培训模版", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody TTsYsplanTmpl tTsYsplanTmpl)
@@ -81,7 +81,7 @@ public class TTsYsplanTmplController extends BaseController
     /**
      * 修改压缩培训模版
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:yaPlan:edit')")
+    @PreAuthorize("@ss.hasPermi('bccnew:ysPlan:edit')")
     @Log(title = "压缩培训模版", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody TTsYsplanTmpl tTsYsplanTmpl)
@@ -92,7 +92,7 @@ public class TTsYsplanTmplController extends BaseController
     /**
      * 删除压缩培训模版
      */
-    @PreAuthorize("@ss.hasPermi('bccnew:yaPlan:remove')")
+    @PreAuthorize("@ss.hasPermi('bccnew:ysPlan:remove')")
     @Log(title = "压缩培训模版", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)

+ 10 - 0
master/src/main/java/com/ruoyi/project/training/bccnew/domain/TTsNew.java

@@ -17,6 +17,8 @@ public class TTsNew extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
 
+    private String isStudent;
+
     /** 唯一标识ID */
     private Long newId;
 
@@ -104,6 +106,14 @@ public class TTsNew extends BaseEntity
     /** 导师带徒考评表word地址 */
     private String appraisalFormWordPath;
 
+    public String getIsStudent() {
+        return isStudent;
+    }
+
+    public void setIsStudent(String isStudent) {
+        this.isStudent = isStudent;
+    }
+
     public String getMentorAgreementWordPath() {
         return mentorAgreementWordPath;
     }

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFirstplanMapper.java

@@ -27,7 +27,6 @@ public interface TTsFirstplanMapper
      * @param tTsFirstplan 进组培训
      * @return 进组培训集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTsFirstplan> selectTTsFirstplanList(TTsFirstplan tTsFirstplan);
 
     /**

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFirstplanTmplMapper.java

@@ -26,7 +26,6 @@ public interface TTsFirstplanTmplMapper
      * @param tTsFirstplanTmpl 进组培训模版
      * @return 进组培训模版集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTsFirstplanTmpl> selectTTsFirstplanTmplList(TTsFirstplanTmpl tTsFirstplanTmpl);
 
     /**

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFlplanMapper.java

@@ -26,7 +26,6 @@ public interface TTsFlplanMapper
      * @param tTsFlplan 分离培训
      * @return 分离培训集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTsFlplan> selectTTsFlplanList(TTsFlplan tTsFlplan);
 
     public List<TTsFlplan> selectTTsFlplanListByNewId(TTsFlplan tTsFlplan);

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFlplanTmplMapper.java

@@ -26,7 +26,6 @@ public interface TTsFlplanTmplMapper
      * @param tTsFlplanTmpl 分离培训模版
      * @return 分离培训模版集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTsFlplanTmpl> selectTTsFlplanTmplList(TTsFlplanTmpl tTsFlplanTmpl);
 
     /**

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFtplanMapper.java

@@ -26,7 +26,6 @@ public interface TTsFtplanMapper
      * @param tTsFtplan 芳烃培训
      * @return 芳烃培训集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTsFtplan> selectTTsFtplanList(TTsFtplan tTsFtplan);
     public List<TTsFtplan> selectTTsFtplanListByNewId(TTsFtplan tTsFtplan);
 

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsFtplanTmplMapper.java

@@ -26,7 +26,6 @@ public interface TTsFtplanTmplMapper
      * @param tTsFtplanTmpl 芳烃培训模版
      * @return 芳烃培训模版集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTsFtplanTmpl> selectTTsFtplanTmplList(TTsFtplanTmpl tTsFtplanTmpl);
 
     /**

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsLjplanMapper.java

@@ -26,7 +26,6 @@ public interface TTsLjplanMapper
      * @param tTsLjplan 裂解培训
      * @return 裂解培训集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTsLjplan> selectTTsLjplanList(TTsLjplan tTsLjplan);
     public List<TTsLjplan> selectTTsLjplanListByNewId(TTsLjplan tTsLjplan);
 

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsLjplanTmplMapper.java

@@ -26,7 +26,6 @@ public interface TTsLjplanTmplMapper
      * @param tTsLjplanTmpl 裂解培训模版
      * @return 裂解培训模版集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTsLjplanTmpl> selectTTsLjplanTmplList(TTsLjplanTmpl tTsLjplanTmpl);
 
     /**

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsNewMapper.java

@@ -26,7 +26,6 @@ public interface TTsNewMapper
      * @param tTsNew 导师带徒
      * @return 导师带徒集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTsNew> selectTTsNewList(TTsNew tTsNew);
 
     /**

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsYsplanMapper.java

@@ -26,7 +26,6 @@ public interface TTsYsplanMapper
      * @param tTsYsplan 转岗培训
      * @return 转岗培训集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTsYsplan> selectTTsYsplanList(TTsYsplan tTsYsplan);
     public List<TTsYsplan> selectTTsYsplanListByNewId(TTsYsplan tTsYsplan);
 

+ 0 - 1
master/src/main/java/com/ruoyi/project/training/bccnew/mapper/TTsYsplanTmplMapper.java

@@ -26,7 +26,6 @@ public interface TTsYsplanTmplMapper
      * @param tTsYsplanTmpl 压缩培训模版
      * @return 压缩培训模版集合
      */
-    @DataScope(deptAlias = "d")
     public List<TTsYsplanTmpl> selectTTsYsplanTmplList(TTsYsplanTmpl tTsYsplanTmpl);
 
     /**

+ 1 - 1
master/src/main/resources/mybatis/training/bccnew/TTsNewMapper.xml

@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTTsNewList" parameterType="TTsNew" resultMap="TTsNewResult">
         <include refid="selectTTsNewVo"/>
         <where>
-            <if test="staffId != null  and staffId != ''"> and staff_id = #{staffId}</if>
+            <if test="staffId != null  and staffId != ''"> and d.staff_id = #{staffId}</if>
             <if test="name != null  and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
             <if test="createrCode != null  and createrCode != ''"> and creater_code = #{createrCode}</if>
             <if test="createdate != null "> and createdate = #{createdate}</if>

+ 13 - 13
ui/src/api/training/bccnew/ysPlan.js

@@ -1,53 +1,53 @@
 import request from '@/utils/request'
 
 // 查询压缩培训模版列表
-export function listYaPlan(query) {
+export function listYsPlan(query) {
   return request({
-    url: '/bccnew/yaPlan/list',
+    url: '/bccnew/ysPlan/list',
     method: 'get',
     params: query
   })
 }
 
 // 查询压缩培训模版详细
-export function getYaPlan(id) {
+export function getYsPlan(id) {
   return request({
-    url: '/bccnew/yaPlan/' + id,
+    url: '/bccnew/ysPlan/' + id,
     method: 'get'
   })
 }
 
 // 新增压缩培训模版
-export function addYaPlan(data) {
+export function addYsPlan(data) {
   return request({
-    url: '/bccnew/yaPlan',
+    url: '/bccnew/ysPlan',
     method: 'post',
     data: data
   })
 }
 
 // 修改压缩培训模版
-export function updateYaPlan(data) {
+export function updateYsPlan(data) {
   return request({
-    url: '/bccnew/yaPlan',
+    url: '/bccnew/ysPlan',
     method: 'put',
     data: data
   })
 }
 
 // 删除压缩培训模版
-export function delYaPlan(id) {
+export function delYsPlan(id) {
   return request({
-    url: '/bccnew/yaPlan/' + id,
+    url: '/bccnew/ysPlan/' + id,
     method: 'delete'
   })
 }
 
 // 导出压缩培训模版
-export function exportYaPlan(query) {
+export function exportYsPlan(query) {
   return request({
-    url: '/bccnew/yaPlan/export',
+    url: '/bccnew/ysPlan/export',
     method: 'get',
     params: query
   })
-}
+}

+ 5 - 0
ui/src/router/index.js

@@ -343,6 +343,11 @@ export const constantRoutes = [
         component: (resolve) => require(['@/views/training/bccnew/tsnew/trainingPlan.vue'], resolve),
         name: 'trainingPlan',
         meta: { title: '导师带徒培训计划' }
+      },{
+        path: 'trainingPlan_s/:newId(\\d+)',
+        component: (resolve) => require(['@/views/training/bccnew/tsnew/trainingPlan_student.vue'], resolve),
+        name: 'trainingPlans',
+        meta: { title: '导师带徒培训计划' }
       },
     ]
   },

+ 75 - 62
ui/src/views/training/bccnew/firstPlanTmpl/index.vue

@@ -93,7 +93,6 @@
     <el-table v-loading="loading" :data="firstPlanTmplList" @selection-change="handleSelectionChange"
               :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center"/>
-      <el-table-column label="培训员工编号" align="center" prop="newId" :show-overflow-tooltip="true"/>
       <el-table-column label="课程编号" align="center" prop="courseCode" :show-overflow-tooltip="true"/>
       <el-table-column label="培训主题" align="center" prop="topic" :show-overflow-tooltip="true"/>
       <el-table-column label="培训内容" align="center" prop="content" :show-overflow-tooltip="true"/>
@@ -101,14 +100,9 @@
       <el-table-column label="培训小时" align="center" prop="courseHour" :show-overflow-tooltip="true"/>
       <el-table-column label="培训类型" align="center" prop="courseType" :show-overflow-tooltip="true"/>
       <el-table-column label="讲师" align="center" prop="trainer" :show-overflow-tooltip="true"/>
-      <el-table-column label="培训日期" align="center" prop="courseDate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.courseDate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="考核情况" align="center" prop="assess" :show-overflow-tooltip="true"/>
+      <el-table-column label="应学习时长" align="center" prop="timerNeed" :show-overflow-tooltip="true"/>
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" fixed="right" width="230" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -130,9 +124,10 @@
             size="mini"
             type="text"
             icon="el-icon-folder"
-            @click="doc.open=true"
-            v-hasPermi="['newstaff:tnNew:edit']"
-          >学习资料</el-button>
+            @click="uploadFile(scope.row)"
+            v-hasPermi="['bccnew:firstPlanTmpl:edit']"
+          >学习资料
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -146,11 +141,8 @@
     />
 
     <!-- 添加或修改进组培训模版对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="培训员工编号" prop="newId">
-          <el-input v-model="form.newId" placeholder="请输入培训员工编号"/>
-        </el-form-item>
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="130px">
         <el-form-item label="课程编号" prop="courseCode">
           <el-input v-model="form.courseCode" placeholder="请输入课程编号"/>
         </el-form-item>
@@ -172,16 +164,8 @@
         <el-form-item label="讲师" prop="trainer">
           <el-input v-model="form.trainer" placeholder="请输入讲师"/>
         </el-form-item>
-        <el-form-item label="培训日期" prop="courseDate">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.courseDate"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          placeholder="选择培训日期">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="考核情况" prop="assess">
-          <el-input v-model="form.assess" placeholder="请输入考核情况"/>
+        <el-form-item label="应学习时长(分)" prop="timerNeed">
+          <el-input-number v-model="form.timerNeed" placeholder="请输入应学习时长" style="width: 100%"/>
         </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注"/>
@@ -225,17 +209,19 @@
     </el-dialog>
 
 
-    <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px" append-to-body >
-      <el-upload v-hasPermi="['training:trainingrecords:file']"
-                 ref="doc"
-                 :limit="50"
-                 :headers="doc.headers"
-                 :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
-                 :disabled="doc.isUploading"
-                 :on-progress="handleFileDocProgress"
-                 :on-success="handleFileDocSuccess"
-                 :auto-upload="true"
-                 drag
+    <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px"
+               append-to-body>
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url+'/'+doc.id"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :file-list="doc.file"
+        :auto-upload="true"
+        drag
       >
         <i class="el-icon-upload"></i>
         <div class="el-upload__text">
@@ -246,43 +232,53 @@
       <el-table :data="doc.commonfileList" border>
         <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
           <template slot-scope="scope">
-            <a  class="link-type"  @click="handleDownload(scope.row)">
+            <a class="link-type" @click="handleDownload(scope.row)">
               <span>{{ scope.row.fileName }}</span>
             </a>
           </template>
         </el-table-column>
-        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true" width="80" />
-        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <!--        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true"-->
+        <!--                         width="80"/>-->
+        <!--        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>-->
         <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
           <template slot-scope="scope">
             <el-button
-              v-if="scope.row.fileName.endsWith('pdf')"
+              v-if="scope.row.fileName!=null&&scope.row.fileName.endsWith('pdf')"
               size="mini"
               type="text"
               icon="el-icon-view"
               @click="handleSee(scope.row)"
-            >{{ $t('预览') }}</el-button>
-            <el-button v-hasPermi="['training:trainingrecords:file']"  type="text" size="small" v-if="scope.row.isEdit" @click="save(scope.row)">保存</el-button>
-            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">取消</el-button>
+            >{{ $t('预览') }}
+            </el-button>
+            <el-button v-hasPermi="['training:trainingrecords:file']" type="text" size="small" v-if="scope.row.isEdit"
+                       @click="save(scope.row)">保存
+            </el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">
+              取消
+            </el-button>
             <el-button
               size="mini"
               type="text"
               icon="el-icon-download"
               @click="handleDownload(scope.row)"
-            >{{ $t('下载') }}</el-button>
+            >{{ $t('下载') }}
+            </el-button>
             <el-button
               size="mini"
               type="text"
               icon="el-icon-delete"
               @click="handleDeleteDoc(scope.row)"
               v-hasPermi="['training:trainingrecords:file']"
-            >{{ $t('删除') }}</el-button>
+            >{{ $t('删除') }}
+            </el-button>
           </template>
         </el-table-column>
       </el-table>
-      <el-dialog  :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px" append-to-body>
+      <el-dialog :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px"
+                 append-to-body>
         <div style="margin-top: -60px;float: right;margin-right: 40px;">
-          <el-button size="mini" type="text" @click="openPdf">{{$t('新页面打开PDF')}}</el-button></div>
+          <el-button size="mini" type="text" @click="openPdf">{{ $t('新页面打开PDF') }}</el-button>
+        </div>
         <div style="margin-top: -30px">
           <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
         </div>
@@ -311,7 +307,6 @@ import {treeselect} from "@/api/system/dept";
 import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
-import {delCommonfile} from "@/api/common/commonfile";
 
 export default {
   name: "FirstPlanTmpl",
@@ -319,10 +314,9 @@ export default {
   // components: { Editor },
   data() {
     return {
-
       // 报告附件参数
       doc: {
-        file: "",
+        file: null,
         // 是否显示弹出层(报告附件)
         open: false,
         // 弹出层标题(报告附件)
@@ -333,8 +327,9 @@ export default {
         updateSupport: 0,
         // 报告附件上传位置编号
         ids: 0,
+        id: null,
         // 设置上传的请求头部
-        headers: { Authorization: "Bearer " + getToken() },
+        headers: {Authorization: "Bearer " + getToken()},
         // 上传的地址
         url: process.env.VUE_APP_BASE_API + "/bccnew/firstPlanTmpl/uploadFile",
         commonfileList: null,
@@ -346,7 +341,7 @@ export default {
         pId: null,
         form: {}
       },
-      pdf : {
+      pdf: {
         title: '',
         pdfUrl: '',
         numPages: null,
@@ -433,6 +428,16 @@ export default {
     this.getTreeselect();
   },
   methods: {
+    uploadFile(row) {
+      this.doc.file = null;
+      this.doc.commonfileList = [];
+      this.doc.open = true;
+      this.doc.id = row.id;
+      getFirstPlanTmpl(row.id).then(res => {
+        if (res.data.fileUrl != null)
+          this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
+      })
+    },
     // 文件下载处理
     handleDownload(row) {
       var name = row.fileName;
@@ -444,14 +449,14 @@ export default {
       a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
       a.click()
     },
-    openPdf(){
+    openPdf() {
       window.open(this.pdf.pdfUrl);//path是文件的全路径地址
     },
-    handleSee (row){
+    handleSee(row) {
       // window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
-      this.pdf.open =true
+      this.pdf.open = true
       this.pdf.title = row.fileName
-      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
     },
     /** 删除按钮操作 */
     handleDeleteDoc(row) {
@@ -460,11 +465,11 @@ export default {
         confirmButtonText: this.$t('确定'),
         cancelButtonText: this.$t('取消'),
         type: "warning"
-      }).then(function() {
-        return delCommonfile(ids);
+      }).then(function () {
+        return updateFirstPlanTmpl({id: row.id, fileUrl: '', fileName: ''});
       }).then(() => {
-        this.getFileList()
         this.msgSuccess(this.$t('删除成功'));
+        this.doc.commonfileList = [];
       })
     },
     // 上传中处理
@@ -475,8 +480,16 @@ export default {
     //附件上传成功处理
     handleFileDocSuccess(response, file, fileList) {
       this.doc.isUploading = false;
-      this.$alert(response.msg, this.$t('导入结果'), { dangerouslyUseHTMLString: true });
-      this.getFileList()
+      this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      this.getList();
+      this.doc.commonfileList = [];
+      getFirstPlanTmpl(response.data).then(res => {
+        if (res.data.fileUrl != null) {
+          this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
+          fileList = null
+          file = null
+        }
+      })
     },
     /** 查询进组培训模版列表 */
     getList() {

+ 2 - 117
ui/src/views/training/bccnew/firstplan/index.vue

@@ -1,15 +1,6 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="培训员工编号" prop="newId">
-        <el-input
-          v-model="queryParams.newId"
-          placeholder="请输入培训员工编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
       <el-form-item label="课程编号" prop="courseCode">
         <el-input
           v-model="queryParams.courseCode"
@@ -28,112 +19,6 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="培训天" prop="courseDay">
-        <el-input
-          v-model="queryParams.courseDay"
-          placeholder="请输入培训天"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="培训小时" prop="courseHour">
-        <el-input
-          v-model="queryParams.courseHour"
-          placeholder="请输入培训小时"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="培训类型" prop="courseType">
-        <el-select v-model="queryParams.courseType" placeholder="请选择培训类型" clearable size="small">
-          <el-option label="请选择字典生成" value=""/>
-        </el-select>
-      </el-form-item>
-      <el-form-item label="讲师" prop="trainer">
-        <el-input
-          v-model="queryParams.trainer"
-          placeholder="请输入讲师"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="培训日期" prop="courseDate">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.courseDate"
-                        type="date"
-                        value-format="yyyy-MM-dd"
-                        placeholder="选择培训日期">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="考核情况" prop="assess">
-        <el-input
-          v-model="queryParams.assess"
-          placeholder="请输入考核情况"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建人" prop="createrCode">
-        <el-input
-          v-model="queryParams.createrCode"
-          placeholder="请输入创建人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="createdate">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.createdate"
-                        type="date"
-                        value-format="yyyy-MM-dd"
-                        placeholder="选择创建时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="修改人" prop="updaterCode">
-        <el-input
-          v-model="queryParams.updaterCode"
-          placeholder="请输入修改人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="修改时间" prop="updatedate">
-        <el-date-picker clearable size="small" style="width: 200px"
-                        v-model="queryParams.updatedate"
-                        type="date"
-                        value-format="yyyy-MM-dd"
-                        placeholder="选择修改时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="部门编号" prop="deptId">
-        <el-input
-          v-model="queryParams.deptId"
-          placeholder="请输入部门编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="备注" prop="remarks">
-        <el-input
-          v-model="queryParams.remarks"
-          placeholder="请输入备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="培训状态" prop="planStatus">
-        <el-select v-model="queryParams.planStatus" placeholder="请选择培训状态" clearable size="small">
-          <el-option label="请选择字典生成" value=""/>
-        </el-select>
-      </el-form-item>
       <el-form-item>
         <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -362,7 +247,7 @@
       </el-button>
     </el-dialog>
 
-    <el-dialog :close-on-click-modal="false" v-loading="pdf.loadingFlash" element-loading-background="rgba(0,0,0,0.2)"
+    <el-dialog :close-on-click-modal="false"  element-loading-background="rgba(0,0,0,0.2)"
                v-dialogDrag :title="pdf.title"
                :visible.sync="pdf.open" width="1300px" height="800px" :center="true" append-to-body
                @close="handleClose">
@@ -498,7 +383,7 @@ export default {
     })
     this.getList();
     this.getTreeselect();
-    this.getDicts("training_newstaff_status").then(response => {
+    this.getDicts("training_bccnew_status").then(response => {
       this.planStatusOptions = response.data;
     });
   },

+ 534 - 0
ui/src/views/training/bccnew/firstplan/index_student.vue

@@ -0,0 +1,534 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="课程编号" prop="courseCode">
+        <el-input
+          v-model="queryParams.courseCode"
+          placeholder="请输入课程编号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="培训主题" prop="topic">
+        <el-input
+          v-model="queryParams.topic"
+          placeholder="请输入培训主题"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-table v-loading="loading" :data="firstplanList" @selection-change="handleSelectionChange" :height="clientHeight"
+              border>
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="课程编号" align="center" prop="courseCode" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="培训主题" align="center" prop="topic" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="培训内容" align="center" prop="content" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="培训天" align="center" prop="courseDay" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="培训小时" align="center" prop="courseHour" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="培训类型" align="center" prop="courseType" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="讲师" align="center" prop="trainer" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="培训日期" align="center" prop="courseDate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.courseDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="考核情况" align="center" prop="assess" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="第一次成绩" align="center" prop="score1" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="第二次成绩" align="center" prop="score2" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="第三次成绩" align="center" prop="score3" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="培训状态" align="center" prop="planStatus" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-folder"
+            @click="openFileDialog(scope.row)"
+          >学习资料
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改进组培训对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="130px">
+        <el-form-item label="课程编号" prop="courseCode">
+          <el-input v-model="form.courseCode" placeholder="请输入课程编号"/>
+        </el-form-item>
+        <el-form-item label="培训主题" prop="topic">
+          <el-input v-model="form.topic" placeholder="请输入培训主题"/>
+        </el-form-item>
+        <el-form-item label="培训内容">
+          <el-input v-model="form.content" placeholder="请输入培训内容"/>
+        </el-form-item>
+        <el-form-item label="培训天" prop="courseDay">
+          <el-input v-model="form.courseDay" placeholder="请输入培训天"/>
+        </el-form-item>
+        <el-form-item label="培训小时" prop="courseHour">
+          <el-input v-model="form.courseHour" placeholder="请输入培训小时"/>
+        </el-form-item>
+        <el-form-item label="培训类型" prop="courseType">
+          <el-input v-model="form.courseType" placeholder="请输入培训类型"/>
+          <el-option label="请选择字典生成" value=""/>
+        </el-form-item>
+        <el-form-item label="讲师" prop="trainer">
+          <el-input v-model="form.trainer" placeholder="请输入讲师"/>
+        </el-form-item>
+        <el-form-item label="培训日期" prop="courseDate">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.courseDate"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择培训日期">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="考核情况" prop="assess">
+          <el-input v-model="form.assess" placeholder="请输入考核情况"/>
+        </el-form-item>
+        <el-form-item label="培训状态">
+          <el-select v-model="form.planStatus" placeholder="请选择培训状态">
+            <el-option
+              v-for="dict in planStatusOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="parseInt(dict.dictValue)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
+        </el-form-item>
+        <el-form-item label="归属部门" prop="deptId">
+          <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-checkbox v-model="upload.updateSupport"/>
+          是否更新已经存在的用户数据
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :visible.sync="file.open" width="30%" append-to-body>
+      <el-descriptions class="margin-top" title="学习资料" :column="1" size="" border>
+        <el-descriptions-item label-style="width:180px">
+          <template slot="label">
+            <i class="el-icon-user"></i>
+            资料名
+          </template>
+          {{ file.data.fileName }}
+        </el-descriptions-item>
+        <el-descriptions-item label-style="width:180px">
+          <template slot="label">
+            <i class="el-icon-mobile-phone"></i>
+            学习进度
+          </template>
+          <el-progress :text-inside="true" :stroke-width="20" :percentage="getCountTime()"
+                       status="success"></el-progress>
+        </el-descriptions-item>
+        <el-descriptions-item label-style="width:180px">
+          <template slot="label">
+            <i class="el-icon-mobile-phone"></i>
+            应学习时长(分)
+          </template>
+          {{ file.data.timerNeed }}
+        </el-descriptions-item>
+        <el-descriptions-item label-style="width:180px">
+          <template slot="label">
+            <i class="el-icon-mobile-phone"></i>
+            已学习时长(分)
+          </template>
+          {{ file.data.timer }}
+        </el-descriptions-item>
+      </el-descriptions>
+      <el-button
+        class="mt10"
+        type="primary"
+        icon="el-icon-video-play"
+        @click="handleStudy(file.data)"
+      >开始学习
+      </el-button>
+    </el-dialog>
+
+    <el-dialog :close-on-click-modal="false" v-loading="pdf.loadingFlash" element-loading-background="rgba(0,0,0,0.2)"
+               v-dialogDrag :title="pdf.title"
+               :visible.sync="pdf.open" width="1300px" height="800px" :center="true" append-to-body
+               @close="handleClose">
+      <div style="margin-top: -30px">
+        <iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"
+                v-if="ppt"></iframe>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import {
+  addFirstplan,
+  delFirstplan,
+  exportFirstplan,
+  getFirstplan,
+  importTemplate,
+  listFirstplan,
+  updateFirstLearnTime,
+  updateFirstplan
+} from "@/api/training/bccnew/firstplan";
+import {treeselect} from "@/api/system/dept";
+import {getToken} from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+
+var timer = null;
+export default {
+  name: "FirstplanBccnew_s",
+  components: {Treeselect},
+  props: {
+    newId: {
+      default: null
+    },
+    planType: {}
+  },
+  // components: { Editor },
+  data() {
+    return {
+      file: {
+        open: false,
+        data: {}
+      },
+      ppt: false,
+      pdf: {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+        loadingFlash: false,
+      },
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 进组培训表格数据
+      firstplanList: [],
+      // 培训状态字典
+      planStatusOptions: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight: 300,
+      // 是否显示弹出层
+      open: false,
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/bccnew/firstplan/importData"
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        newId: this.newId,
+        courseCode: null,
+        topic: null,
+        content: null,
+        courseDay: null,
+        courseHour: null,
+        courseType: null,
+        trainer: null,
+        courseDate: null,
+        assess: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        remarks: null,
+        planStatus: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {}
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
+  created() {
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 250
+    })
+    this.getList();
+    this.getTreeselect();
+    this.getDicts("training_bccnew_status").then(response => {
+      this.planStatusOptions = response.data;
+    });
+  },
+  methods: {
+    handleClose() {
+      window.clearInterval(timer);
+      this.getList();
+    },
+    handleStudy(row) {
+      //office预览
+      this.pdf.loadingFlash = true
+      this.pdf.open = true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = ""
+      this.ppt = true
+      //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if (row.fileName!=null && row.fileName.endsWith('pdf')) {
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+        this.loadingFlash = false
+      }
+      let _this = this;
+      timer = window.setInterval(function () {
+        updateFirstLearnTime(row).then(res => {
+        })
+      }, 60000);
+    },
+    getCountTime() {
+      if (this.file.data.timerNeed === 0)
+        return 0;
+      return (this.file.data.timer / this.file.data.timerNeed * 100).toFixed(2)
+    },
+    openFileDialog(row) {
+      this.file.open = true;
+      this.file.data = row
+      console.log(row)
+      if (row.timer === '' || row.timer == null) {
+        this.file.data.timer = 0
+      }
+      if (row.timerNeed === '' || row.timerNeed == null) {
+        this.file.data.timerNeed = 0
+      }
+      console.log(this.file.data)
+    },
+    /** 查询进组培训列表 */
+    getList() {
+      this.loading = true;
+      listFirstplan(this.queryParams).then(response => {
+        this.firstplanList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        newId: null,
+        courseCode: null,
+        topic: null,
+        content: null,
+        courseDay: null,
+        courseHour: null,
+        courseType: null,
+        trainer: null,
+        courseDate: null,
+        assess: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        remarks: null,
+        planStatus: 0
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加进组培训";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getFirstplan(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改进组培训";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateFirstplan(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addFirstplan(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delFirstplan(ids);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有进组培训数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportFirstplan(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    }
+  }
+};
+</script>

+ 192 - 3
ui/src/views/training/bccnew/flPlan/index.vue

@@ -117,6 +117,14 @@
             @click="handleDelete(scope.row)"
             v-hasPermi="['training:flPlan:remove']"
           >删除</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-folder"
+            @click="uploadFile(scope.row)"
+            v-hasPermi="['bccnew:flPlan:edit']"
+          >学习资料
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -164,12 +172,12 @@
         <el-form-item label="考核情况" prop="assess">
           <el-input v-model="form.assess" placeholder="请输入考核情况" />
         </el-form-item>
+        <el-form-item label="应学习时长(分)" prop="timerNeed">
+          <el-input-number v-model="form.timerNeed" placeholder="请输入应学习时长" style="width: 100%"/>
+        </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注" />
         </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -206,6 +214,87 @@
               <el-button @click="upload.open = false">取 消</el-button>
           </div>
       </el-dialog>
+
+    <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px"
+               append-to-body>
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url+'/'+doc.id"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :file-list="doc.file"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a class="link-type" @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <!--        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true"-->
+        <!--                         width="80"/>-->
+        <!--        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>-->
+        <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName!=null&&scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}
+            </el-button>
+            <el-button v-hasPermi="['training:trainingrecords:file']" type="text" size="small" v-if="scope.row.isEdit"
+                       @click="save(scope.row)">保存
+            </el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">
+              取消
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+              v-hasPermi="['training:trainingrecords:file']"
+            >{{ $t('删除') }}
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px"
+                 append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{ $t('新页面打开PDF') }}</el-button>
+        </div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -216,6 +305,7 @@ import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Editor from '@/components/Editor/index.vue';
+import {getFirstPlanTmpl, updateFirstPlanTmpl} from "@/api/training/bccnew/firstPlanTmpl";
 
 export default {
   name: "FlPlan",
@@ -223,6 +313,42 @@ export default {
   // components: { Editor },
   data() {
     return {
+      // 报告附件参数
+      doc: {
+        file: null,
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        id: null,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/bccnew/flPlanTmpl/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'bccnew'
+        },
+        pType: 'bccnew',
+        pId: null,
+        form: {}
+      },
+      pdf: {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
       // 遮罩层
       loading: true,
       // 选中数组
@@ -302,6 +428,69 @@ export default {
     this.getTreeselect();
   },
   methods: {
+    uploadFile(row) {
+      this.doc.file = null;
+      this.doc.commonfileList = [];
+      this.doc.open = true;
+      this.doc.id = row.id;
+      getFirstPlanTmpl(row.id).then(res => {
+        if (res.data.fileUrl != null)
+          this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
+      })
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    openPdf() {
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee(row) {
+      // window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
+      this.pdf.open = true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return updateFirstPlanTmpl({id: row.id, fileUrl: '', fileName: ''});
+      }).then(() => {
+        this.msgSuccess(this.$t('删除成功'));
+        this.doc.commonfileList = [];
+      })
+    },
+    // 上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      this.getList();
+      this.doc.commonfileList = [];
+      getFirstPlanTmpl(response.data).then(res => {
+        if (res.data.fileUrl != null) {
+          this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
+          fileList = null
+          file = null
+        }
+      })
+    },
     /** 查询分离培训模版列表 */
     getList() {
       this.loading = true;

+ 191 - 3
ui/src/views/training/bccnew/ftPlan/index.vue

@@ -117,6 +117,14 @@
             @click="handleDelete(scope.row)"
             v-hasPermi="['bccnew:ftPlan:remove']"
           >删除</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-folder"
+            @click="uploadFile(scope.row)"
+            v-hasPermi="['bccnew:ftPlan:edit']"
+          >学习资料
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -164,12 +172,12 @@
         <el-form-item label="考核情况" prop="assess">
           <el-input v-model="form.assess" placeholder="请输入考核情况" />
         </el-form-item>
+        <el-form-item label="应学习时长(分)" prop="timerNeed">
+          <el-input-number v-model="form.timerNeed" placeholder="请输入应学习时长" style="width: 100%"/>
+        </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注" />
         </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -206,6 +214,86 @@
               <el-button @click="upload.open = false">取 消</el-button>
           </div>
       </el-dialog>
+    <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px"
+               append-to-body>
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url+'/'+doc.id"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :file-list="doc.file"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a class="link-type" @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <!--        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true"-->
+        <!--                         width="80"/>-->
+        <!--        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>-->
+        <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName!=null&&scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}
+            </el-button>
+            <el-button v-hasPermi="['training:trainingrecords:file']" type="text" size="small" v-if="scope.row.isEdit"
+                       @click="save(scope.row)">保存
+            </el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">
+              取消
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+              v-hasPermi="['training:trainingrecords:file']"
+            >{{ $t('删除') }}
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px"
+                 append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{ $t('新页面打开PDF') }}</el-button>
+        </div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -216,6 +304,7 @@ import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Editor from '@/components/Editor/index.vue';
+import {getFirstPlanTmpl, updateFirstPlanTmpl} from "@/api/training/bccnew/firstPlanTmpl";
 
 export default {
   name: "FtPlan",
@@ -223,6 +312,42 @@ export default {
   // components: { Editor },
   data() {
     return {
+      // 报告附件参数
+      doc: {
+        file: null,
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        id: null,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/bccnew/ftPlanTmpl/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'bccnew'
+        },
+        pType: 'bccnew',
+        pId: null,
+        form: {}
+      },
+      pdf: {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
       // 遮罩层
       loading: true,
       // 选中数组
@@ -302,6 +427,69 @@ export default {
     this.getTreeselect();
   },
   methods: {
+    uploadFile(row) {
+      this.doc.file = null;
+      this.doc.commonfileList = [];
+      this.doc.open = true;
+      this.doc.id = row.id;
+      getFirstPlanTmpl(row.id).then(res => {
+        if (res.data.fileUrl != null)
+          this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
+      })
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    openPdf() {
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee(row) {
+      // window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
+      this.pdf.open = true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return updateFirstPlanTmpl({id: row.id, fileUrl: '', fileName: ''});
+      }).then(() => {
+        this.msgSuccess(this.$t('删除成功'));
+        this.doc.commonfileList = [];
+      })
+    },
+    // 上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      this.getList();
+      this.doc.commonfileList = [];
+      getFirstPlanTmpl(response.data).then(res => {
+        if (res.data.fileUrl != null) {
+          this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
+          fileList = null
+          file = null
+        }
+      })
+    },
     /** 查询芳烃培训模版列表 */
     getList() {
       this.loading = true;

+ 191 - 3
ui/src/views/training/bccnew/ljPlan/index.vue

@@ -117,6 +117,14 @@
             @click="handleDelete(scope.row)"
             v-hasPermi="['bccnew:ljPlan:remove']"
           >删除</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-folder"
+            @click="uploadFile(scope.row)"
+            v-hasPermi="['bccnew:ljPlan:edit']"
+          >学习资料
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -164,12 +172,12 @@
         <el-form-item label="考核情况" prop="assess">
           <el-input v-model="form.assess" placeholder="请输入考核情况" />
         </el-form-item>
+        <el-form-item label="应学习时长(分)" prop="timerNeed">
+          <el-input-number v-model="form.timerNeed" placeholder="请输入应学习时长" style="width: 100%"/>
+        </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注" />
         </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -206,6 +214,86 @@
               <el-button @click="upload.open = false">取 消</el-button>
           </div>
       </el-dialog>
+    <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px"
+               append-to-body>
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url+'/'+doc.id"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :file-list="doc.file"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a class="link-type" @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <!--        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true"-->
+        <!--                         width="80"/>-->
+        <!--        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>-->
+        <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName!=null&&scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}
+            </el-button>
+            <el-button v-hasPermi="['training:trainingrecords:file']" type="text" size="small" v-if="scope.row.isEdit"
+                       @click="save(scope.row)">保存
+            </el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">
+              取消
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+              v-hasPermi="['training:trainingrecords:file']"
+            >{{ $t('删除') }}
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px"
+                 append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{ $t('新页面打开PDF') }}</el-button>
+        </div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -216,6 +304,7 @@ import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Editor from '@/components/Editor/index.vue';
+import {getFirstPlanTmpl, updateFirstPlanTmpl} from "@/api/training/bccnew/firstPlanTmpl";
 
 export default {
   name: "LjPlan",
@@ -223,6 +312,42 @@ export default {
   // components: { Editor },
   data() {
     return {
+      // 报告附件参数
+      doc: {
+        file: null,
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        id: null,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/bccnew/ljPlanTmpl/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'bccnew'
+        },
+        pType: 'bccnew',
+        pId: null,
+        form: {}
+      },
+      pdf: {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
       // 遮罩层
       loading: true,
       // 选中数组
@@ -302,6 +427,69 @@ export default {
     this.getTreeselect();
   },
   methods: {
+    uploadFile(row) {
+      this.doc.file = null;
+      this.doc.commonfileList = [];
+      this.doc.open = true;
+      this.doc.id = row.id;
+      getFirstPlanTmpl(row.id).then(res => {
+        if (res.data.fileUrl != null)
+          this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
+      })
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    openPdf() {
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee(row) {
+      // window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
+      this.pdf.open = true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return updateFirstPlanTmpl({id: row.id, fileUrl: '', fileName: ''});
+      }).then(() => {
+        this.msgSuccess(this.$t('删除成功'));
+        this.doc.commonfileList = [];
+      })
+    },
+    // 上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      this.getList();
+      this.doc.commonfileList = [];
+      getFirstPlanTmpl(response.data).then(res => {
+        if (res.data.fileUrl != null) {
+          this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
+          fileList = null
+          file = null
+        }
+      })
+    },
     /** 查询裂解培训模版列表 */
     getList() {
       this.loading = true;

+ 7 - 6
ui/src/views/training/bccnew/tsnew/index.vue

@@ -156,21 +156,21 @@
       </el-table-column>
       <el-table-column label="带徒协议" align="center" prop="agreement" width="80">
         <template slot-scope="scope">
-          <el-button  icon="el-icon-folder" style="color:#6e96fa;" @click="" circle></el-button>
+          <el-button  icon="el-icon-folder" style="color:#6e96fa;" @click="handleDownloadWord(scope.row, 'mentorAgreement')" circle></el-button>
         </template>
       </el-table-column>
       <el-table-column label="带徒目标" align="center" prop="target" width="80">
         <template slot-scope="scope">
-          <el-button  icon="el-icon-folder" style="color:#6e96fa;" @click="" circle></el-button>
+          <el-button  icon="el-icon-folder" style="color:#6e96fa;" @click="handleDownloadWord(scope.row, 'targetPlan')" circle></el-button>
         </template>
       </el-table-column>
       <el-table-column label="培训考评" align="center" prop="tnNew-score" width="80">
         <template slot-scope="scope">
-          <el-button  icon="el-icon-folder" style="color:#6e96fa;" @click="" circle></el-button>
+          <el-button  icon="el-icon-folder" style="color:#6e96fa;" @click="handleDownloadWord(scope.row, 'appraisalForm')" circle></el-button>
         </template>
       </el-table-column>
       <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="100"/>
-      <el-table-column label="操作" align="center" fixed="right"  class-name="small-padding fixed-width" width="150">
+      <el-table-column label="操作" align="center" fixed="right"  class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -184,12 +184,13 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['newstaff:tnNew:edit']"
-          >修改</el-button>
+          >修改 </el-button>
           <el-dropdown  size="mini">
             <span class="el-dropdown-link">
               <el-button
                 type="text"
                 size="mini"
+                icon="el-icon-download"
               >下载<i class="el-icon-arrow-down"></i></el-button>
             </span>
             <el-dropdown-menu slot="dropdown">
@@ -551,7 +552,7 @@ export default {
     })
     this.getList();
     this.getTreeselect();
-    this.getDicts("training_newstaff_status").then(response => {
+    this.getDicts("training_bccnew_status").then(response => {
       this.planStatusOptions = response.data;
     });
     this.getDicts("training_newstaff_type").then(response => {

+ 754 - 0
ui/src/views/training/bccnew/tsnew/index_s.vue

@@ -0,0 +1,754 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="年度培训标题" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入年度培训标题"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="培训状态" prop="planStatus">
+        <el-select v-model="queryParams.planStatus" placeholder="请选择培训状态" clearable size="small">
+          <el-option
+            v-for="dict in planStatusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="开始时间" prop="startdate">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.startdate"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        placeholder="选择开始时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="结束时间" prop="enddate">
+        <el-date-picker clearable size="small" style="width: 200px"
+                        v-model="queryParams.enddate"
+                        type="date"
+                        value-format="yyyy-MM-dd"
+                        placeholder="选择结束时间">
+        </el-date-picker>
+      </el-form-item>
+      <el-form-item label="培训类型 " prop="planType">
+        <el-select v-model="queryParams.planType" placeholder="请选择培训类型" clearable size="small">
+          <el-option
+            v-for="dict in planTypeOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+
+    <el-table v-loading="loading" :data="tnNewList" @selection-change="handleSelectionChange" :height="clientHeight"
+              border>
+      <el-table-column type="selection" width="55" align="center"/>
+      <!--      <el-table-column label="培训员工编号" align="center" prop="staffId" :show-overflow-tooltip="true"/>-->
+      <el-table-column label="新员工" align="center" prop="staffName" width="100"/>
+      <el-table-column label="培训状态" align="center" prop="planStatus" width="100" :formatter="planStatusFormat">
+        <template slot-scope="scope">
+          <el-tag v-if="scope.row.planStatus == 1" size="small" type="success">已完成</el-tag>
+          <el-tag v-else-if="scope.row.planStatus == 0" size="small" type="info">未完成</el-tag>
+        </template>
+      </el-table-column>
+      <el-table-column label="进度" align="center" width="160">
+        <template slot-scope="scope">
+          <el-progress :percentage="scope.row.planFinish"></el-progress>
+        </template>
+      </el-table-column>
+      <el-table-column label="开始时间" align="center" prop="startdate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.startdate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="结束时间" align="center" prop="enddate" width="100">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.enddate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <!--      <el-table-column label="导师员工编号" align="center" prop="mentorStaffId" :show-overflow-tooltip="true"/>-->
+      <el-table-column label="导师" align="center" prop="mentorStaffName" width="100"/>
+      <el-table-column label="岗位" align="center" prop="planType" width="100">
+        <template slot-scope="scope">
+          <span v-if="scope.row.planType == 1" size="small" type="success">裂解</span>
+          <span v-else-if="scope.row.planType == 2" size="small" type="success">压缩</span>
+          <span v-else-if="scope.row.planType == 3" size="small" type="success">分离</span>
+          <span v-else-if="scope.row.planType == 4" size="small" type="success">芳烃</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="三级教育记录卡" align="center" prop="three" width="80">
+        <template slot-scope="scope">
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tsNew-three')"
+                     circle></el-button>
+        </template>
+      </el-table-column>
+
+      <el-table-column label="上岗能力评测表" align="center" prop="firstplan-score" width="80">
+        <template slot-scope="scope">
+          <el-button icon="el-icon-folder" style="color:#6e96fa;"
+                     @click="handleDoc(scope.row , 'tsNew-firstplan-score')" circle></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="导师提名表" align="center" prop="agreement" width="80">
+        <template slot-scope="scope">
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDoc(scope.row , 'tsNew-teacher-order')"
+                     circle></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="带徒协议" align="center" prop="agreement" width="80">
+        <template slot-scope="scope">
+          <el-button icon="el-icon-folder" style="color:#6e96fa;"
+                     @click="handleDownloadWord(scope.row, 'mentorAgreement')" circle></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="带徒目标" align="center" prop="target" width="80">
+        <template slot-scope="scope">
+          <el-button icon="el-icon-folder" style="color:#6e96fa;" @click="handleDownloadWord(scope.row, 'targetPlan')"
+                     circle></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="培训考评" align="center" prop="tnNew-score" width="80">
+        <template slot-scope="scope">
+          <el-button icon="el-icon-folder" style="color:#6e96fa;"
+                     @click="handleDownloadWord(scope.row, 'appraisalForm')" circle></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="100"/>
+      <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-view"
+            @click="planList(scope.row)"
+          >培训计划
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改新员工培训对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="培训员工" prop="mentorStaffId">
+          <el-select v-model="form.staffId" filterable :placeholder="$t('请选择')+$t('培训员工')">
+            <el-option
+              v-for="item in userOption"
+              :key="item.staffid"
+              :label="item.name +'  '+ item.deptName"
+              :value="item.staffid"
+              :disabled="item.disabled">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="培训状态">
+          <el-select v-model="form.planStatus" placeholder="请选择培训状态">
+            <el-option
+              v-for="dict in planStatusOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="parseInt(dict.dictValue)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="开始时间" prop="startdate">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.startdate"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择开始时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="结束时间" prop="enddate">
+          <el-date-picker clearable size="small" style="width: 200px"
+                          v-model="form.enddate"
+                          type="date"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择结束时间">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="导师员工" prop="mentorStaffId">
+          <el-select v-model="form.mentorStaffId" filterable :placeholder="$t('请选择')+$t('导师员工')">
+            <el-option
+              v-for="item in userOption"
+              :key="item.staffid"
+              :label="item.name +'  '+ item.deptName"
+              :value="item.staffid"
+              :disabled="item.disabled">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="岗位" prop="planType">
+          <el-radio-group v-model="form.planType">
+            <el-radio
+              key="1"
+              :label="1"
+            >裂解
+            </el-radio>
+            <el-radio
+              key="2"
+              :label="2"
+            >压缩
+            </el-radio>
+            <el-radio
+              key="3"
+              :label="3"
+            >分离
+            </el-radio>
+            <el-radio
+              key="4"
+              :label="4"
+            >芳烃
+            </el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="备注" prop="remarks">
+          <el-input v-model="form.remarks" placeholder="请输入备注"/>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 用户导入对话框 -->
+    <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls"
+        :headers="upload.headers"
+        :action="upload.url + '?updateSupport=' + upload.updateSupport"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          将文件拖到此处,或
+          <em>点击上传</em>
+        </div>
+        <div class="el-upload__tip" slot="tip">
+          <el-checkbox v-model="upload.updateSupport"/>
+          是否更新已经存在的用户数据
+          <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
+        </div>
+        <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+    <!-- 报告附件对话框 -->
+    <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px"
+               append-to-body>
+      <el-upload v-hasPermi="['training:trainingrecords:file']"
+                 ref="doc"
+                 :limit="50"
+                 :headers="doc.headers"
+                 :action="doc.url + '?pType=' + doc.pType + '&pId=' + doc.pId"
+                 :disabled="doc.isUploading"
+                 :on-progress="handleFileDocProgress"
+                 :on-success="handleFileDocSuccess"
+                 :auto-upload="true"
+                 drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a class="link-type" @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true"
+                         width="80"/>
+        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>
+        <!--        <el-table-column :label="$t('培训日期')" align="center" prop="pDate"  width="150">-->
+        <!--          <template slot-scope="scope">-->
+        <!--            <el-date-picker-->
+        <!--              v-if="scope.row.isEdit"-->
+        <!--              v-model="scope.row.pDate"-->
+        <!--              type="date"-->
+        <!--              value-format="yyyy-MM-dd"-->
+        <!--              placeholder="日期">-->
+        <!--            </el-date-picker>-->
+        <!--            <span v-else>{{ parseTime(scope.row.pDate, '{y}-{m}-{d}') }}</span>-->
+        <!--          </template>-->
+        <!--        </el-table-column>-->
+        <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}
+            </el-button>
+            <el-button v-hasPermi="['training:trainingrecords:file']" type="text" size="small" v-if="scope.row.isEdit"
+                       @click="save(scope.row)">保存
+            </el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">
+              取消
+            </el-button>
+            <!--            <el-button v-hasPermi="['training:trainingrecords:file']" v-if="!scope.row.isEdit" @click="edit(scope.row)" icon="el-icon-edit" type="text" size="mini">编辑</el-button>-->
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+              v-hasPermi="['training:trainingrecords:file']"
+            >{{ $t('删除') }}
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px"
+                 append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{ $t('新页面打开PDF') }}</el-button>
+        </div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  addTsnew,
+  delTsnew,
+  exportTsnew,
+  getTsnew,
+  importTemplate,
+  listTsnew,
+  updateTsnew
+} from "@/api/training/bccnew/tsnew";
+import {treeselect} from "@/api/system/dept";
+import {getToken} from "@/utils/auth";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+import {listStaff} from "@/api/training/newstaff/tnNew";
+import {allFileList, delCommonfile} from "@/api/common/commonfile";
+
+export default {
+  name: "Tsnew",
+  components: {Treeselect},
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      // 总条数
+      total: 0,
+      // 新员工培训表格数据
+      tnNewList: [],
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      clientHeight: 300,
+      // 培训状态字典
+      planStatusOptions: [],
+      // 培训类型 1-新员工 2-转岗字典
+      planTypeOptions: [],
+      userOption: [],
+      // 是否显示弹出层
+      open: false,
+      // 用户导入参数
+      upload: {
+        // 是否显示弹出层(用户导入)
+        open: false,
+        // 弹出层标题(用户导入)
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/newstaff/tsNew/importData"
+      },
+      // 报告附件参数
+      doc: {
+        file: "",
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/common/commonfile/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'traning'
+        },
+        pType: 'traning',
+        pId: null,
+        form: {}
+      },
+      pdf: {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        name: null,
+        isStudent: '1',
+        planStatus: null,
+        startdate: null,
+        enddate: null,
+        planType: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {}
+    };
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
+  created() {
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 250
+    })
+    this.getList();
+    this.getTreeselect();
+    this.getDicts("training_bccnew_status").then(response => {
+      this.planStatusOptions = response.data;
+    });
+    this.getDicts("training_newstaff_type").then(response => {
+      this.planTypeOptions = response.data;
+    });
+    listStaff(this.queryParams).then(response => {
+      this.userOption = response.data;
+    });
+  },
+  methods: {
+    // 文件下载处理
+    handleDownloadWord(row, type) {
+      console.log(row)
+      if (type == 'mentorAgreement') {
+        var name = row.mentorAgreementWordPath;
+        var url = row.mentorAgreementWordPath;
+      } else if (type == 'targetPlan') {
+        var name = row.targetPlanWordPath;
+        var url = row.targetPlanWordPath;
+      } else if (type == 'appraisalForm') {
+        var name = row.appraisalFormWordPath;
+        var url = row.appraisalFormWordPath;
+      }
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      console.log(url)
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    /** 查询新员工培训列表 */
+    getList() {
+      this.loading = true;
+      listTsnew(this.queryParams).then(response => {
+        this.tnNewList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    // 培训状态字典翻译
+    planStatusFormat(row, column) {
+      return this.selectDictLabel(this.planStatusOptions, row.planStatus);
+    },
+    // 培训类型 1-新员工 2-转岗字典翻译
+    planTypeFormat(row, column) {
+      return this.selectDictLabel(this.planTypeOptions, row.planType);
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        newId: null,
+        staffId: null,
+        name: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        planStatus: 0,
+        planYear: null,
+        startdate: null,
+        enddate: null,
+        mentorStaffId: null,
+        planType: null,
+        remarks: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.newId)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    planList(row) {
+      const newId = row.newId
+      this.$router.push("/training/bccnew/trainingPlan_s/" + newId);
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加新员工培训";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const newId = row.newId || this.ids
+      getTsnew(newId).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改新员工培训";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.newId != null) {
+            updateTsnew(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addTsnew(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const newIds = row.newId || this.ids;
+      this.$confirm('是否确认删除?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return delTsnew(newIds);
+      }).then(() => {
+        this.getList();
+        this.msgSuccess("删除成功");
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有新员工培训数据项?', "警告", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(function () {
+        return exportTsnew(queryParams);
+      }).then(response => {
+        this.download(response.msg);
+      })
+    },
+    /** 导入按钮操作 */
+    handleImport() {
+      this.upload.title = "用户导入";
+      this.upload.open = true;
+    },
+    /** 下载模板操作 */
+    importTemplate() {
+      importTemplate().then(response => {
+        this.download(response.msg);
+      });
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
+      this.getList();
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    /** 报告附件按钮操作 */
+    handleDoc(row, fileType) {
+      this.doc.pType = fileType
+      this.doc.queryParams.pType = fileType
+      this.doc.id = row.id;
+      this.doc.title = this.$t('附件');
+      this.doc.open = true;
+      this.doc.queryParams.pId = row.newId
+      this.doc.pId = row.newId
+      this.getFileList()
+      this.$nextTick(() => {
+        this.$refs.doc.clearFiles()
+      })
+    },
+    getFileList() {
+      allFileList(this.doc.queryParams).then(response => {
+        response.forEach(element => {
+          element["isEdit"] = false
+        });
+        response.forEach(element => {
+          element["isAdd"] = false
+        });
+        this.doc.commonfileList = response;
+      });
+    },
+    //附件上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      this.getFileList()
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    openPdf() {
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee(row) {
+      // window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
+      this.pdf.open = true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return delCommonfile(ids);
+      }).then(() => {
+        this.getFileList()
+        this.msgSuccess(this.$t('删除成功'));
+      })
+    },
+  }
+};
+</script>

+ 4 - 4
ui/src/views/training/bccnew/tsnew/score.vue

@@ -201,7 +201,7 @@
       </el-button>
     </el-dialog>
 
-    <el-dialog :close-on-click-modal="false" v-loading="pdf.loadingFlash" element-loading-background="rgba(0,0,0,0.2)"
+    <el-dialog :close-on-click-modal="false"  element-loading-background="rgba(0,0,0,0.2)"
                v-dialogDrag :title="pdf.title"
                :visible.sync="pdf.open" width="1300px" height="800px" :center="true" append-to-body
                @close="handleClose">
@@ -248,6 +248,7 @@ import Treeselect from "@riophae/vue-treeselect";
 
 var timer = null;
 export default {
+  name:"score",
   props: {
     newId: {},
     planType: {}
@@ -315,7 +316,7 @@ export default {
     })
     this.getList();
     this.getTreeselect();
-    this.getDicts("training_newstaff_status").then(response => {
+    this.getDicts("training_bccnew_status").then(response => {
       this.planStatusOptions = response.data;
     });
   },
@@ -326,7 +327,6 @@ export default {
     },
     handleStudy(row) {
       //office预览
-      this.pdf.loadingFlash = true
       this.pdf.open = true
       this.pdf.title = row.fileName
       this.pdf.pdfUrl = ""
@@ -334,7 +334,7 @@ export default {
       //如果是PDF等直接可以打开的就不调接口,否则调用接口
       if (row.fileName.endsWith('pdf')) {
         this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
-        this.loadingFlash = false
+
       }
       let _this = this;
       if (this.planType === 1) {

+ 496 - 0
ui/src/views/training/bccnew/tsnew/score_student.vue

@@ -0,0 +1,496 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="10" class="mb8">
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+    <el-table v-loading="loading" :data="dsdtList" :height="clientHeight" @selection-change="handleSelectionChange"
+              border>
+      <el-table-column type="selection" width="55" align="center" fixed="left"/>
+      <el-table-column label="课程编号" align="center" prop="courseCode" :show-overflow-tooltip="true" fixed="left"
+                       width="180"/>
+      <el-table-column label="培训主题" align="center" prop="topic" :show-overflow-tooltip="true" fixed="left"
+                       width="180"/>
+      <el-table-column label="培训内容" align="center" prop="content" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="培训天" align="center" prop="courseDay" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="培训小时" align="center" prop="courseHour" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="详细计划" align="center" prop="detailPlan" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="讲师" align="center" prop="trainer" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="培训日期" align="center" prop="courseDate" width=" 180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.courseDate, '{y}-{m}-{d}') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="考核情况" align="center" prop="assess" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="培训状态" align="center" prop="planStatus" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="第一次成绩" align="center" prop="score1" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="第二次成绩" align="center" prop="score2" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="第三次成绩" align="center" prop="score3" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true" width="180"/>
+      <el-table-column label="操作" align="center" fixed="right" width="230" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-folder"
+            @click="openFileDialog(scope.row)"
+          >学习资料
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <el-dialog :visible.sync="file.open" width="30%" append-to-body>
+      <el-descriptions class="margin-top" title="学习资料" :column="1" size="medium" border>
+        <el-descriptions-item label-style="width:180px">
+          <template slot="label">
+            <i class="el-icon-user"></i>
+            资料名
+          </template>
+          {{ file.data.fileName }}
+        </el-descriptions-item>
+        <el-descriptions-item label-style="width:180px">
+          <template slot="label">
+            <i class="el-icon-mobile-phone"></i>
+            学习进度
+          </template>
+          <el-progress :text-inside="true" :stroke-width="20" :percentage="getCountTime()"
+                       status="success"></el-progress>
+        </el-descriptions-item>
+        <el-descriptions-item label-style="width:180px">
+          <template slot="label">
+            <i class="el-icon-mobile-phone"></i>
+            应学习时长(分)
+          </template>
+          {{ file.data.timerNeed }}
+        </el-descriptions-item>
+        <el-descriptions-item label-style="width:180px">
+          <template slot="label">
+            <i class="el-icon-mobile-phone"></i>
+            已学习时长(分)
+          </template>
+          {{ file.data.timer }}
+        </el-descriptions-item>
+      </el-descriptions>
+      <el-button
+        class="mt10"
+        type="primary"
+        icon="el-icon-video-play"
+        @click="handleStudy(file.data)"
+      >开始学习
+      </el-button>
+    </el-dialog>
+
+    <el-dialog :close-on-click-modal="false"  element-loading-background="rgba(0,0,0,0.2)"
+               v-dialogDrag :title="pdf.title"
+               :visible.sync="pdf.open" width="1300px" height="800px" :center="true" append-to-body
+               @close="handleClose">
+      <div style="margin-top: -30px">
+        <iframe id="iFrame" class="iframe-html" :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"
+                v-if="ppt"></iframe>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  addLjplandsdt,
+  delLjplandsdt,
+  getLjplandsdt,
+  listLjplandsdt,
+  updateLjLearnTime,
+  updateLjplandsdt
+} from "@/api/training/bccnew/ljplandsdt";
+import {
+  addYsplandsdt,
+  delYsplandsdt,
+  getYsplandsdt,
+  listYsplandsdt, updateYsLearnTime,
+  updateYsplandsdt
+} from "@/api/training/bccnew/ysplandsdt";
+import {
+  addFlplandsdt,
+  delFlplandsdt,
+  getFlplandsdt,
+  listFlplandsdt, updateFlLearnTime,
+  updateFlplandsdt
+} from "@/api/training/bccnew/flplandsdt";
+import {
+  addFtplandsdt,
+  delFtplandsdt,
+  getFtplandsdt,
+  listFtplandsdt, updateFtLearnTime,
+  updateFtplandsdt
+} from "@/api/training/bccnew/ftplandsdt";
+import {treeselect} from "@/api/system/dept";
+import Treeselect from "@riophae/vue-treeselect";
+
+var timer = null;
+export default {
+  name:"score_s",
+  props: {
+    newId: {},
+    planType: {}
+  },
+  components: {Treeselect},
+  data() {
+    return {
+      file: {
+        open: false,
+        data: {}
+      },
+      ppt: false,
+      pdf: {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+        loadingFlash: false,
+      },
+      // 选中数组
+      ids: [],
+      // 总条数
+      total: 0,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: false,
+      loading: true,
+      // 弹出层标题
+      title: "",
+      // 部门树选项
+      deptOptions: undefined,
+      // 培训状态字典
+      planStatusOptions: [],
+      clientHeight: 300,
+      // 是否显示弹出层
+      open: false,
+      dsdtList: [],
+      queryParams: {
+        pageNum: 1,
+        pageSize: 20,
+        newId: this.newId
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {}
+    }
+  },
+  watch: {
+    // 根据名称筛选部门树
+    deptName(val) {
+      this.$refs.tree.filter(val);
+    }
+  },
+  created() {
+    //设置表格高度对应屏幕高度
+    this.$nextTick(() => {
+      this.clientHeight = document.body.clientHeight - 250
+    })
+    this.getList();
+    this.getTreeselect();
+    this.getDicts("training_bccnew_status").then(response => {
+      this.planStatusOptions = response.data;
+    });
+  },
+  methods: {
+    handleClose() {
+      window.clearInterval(timer);
+      this.getList();
+    },
+    handleStudy(row) {
+      //office预览
+      this.pdf.open = true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = ""
+      this.ppt = true
+      //如果是PDF等直接可以打开的就不调接口,否则调用接口
+      if (row.fileName.endsWith('pdf')) {
+        this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+
+      }
+      let _this = this;
+      if (this.planType === 1) {
+        timer = window.setInterval(function () {
+          updateLjLearnTime(row).then(res => {
+          })
+        }, 60000);
+      } else if (this.planType === 2) {
+        timer = window.setInterval(function () {
+          updateYsLearnTime(row).then(res => {
+          })
+        }, 60000);
+      } else if (this.planType === 3) {
+        timer = window.setInterval(function () {
+          updateFlLearnTime(row).then(res => {
+          })
+        }, 60000);
+      } else if (this.planType === 4) {
+        timer = window.setInterval(function () {
+          updateFtLearnTime(row).then(res => {
+          })
+        }, 60000);
+      }
+    },
+    getCountTime() {
+      if (this.file.data.timerNeed === 0)
+        return 0;
+      return (this.file.data.timer / this.file.data.timerNeed * 100).toFixed(2)
+    },
+    openFileDialog(row) {
+      this.file.open = true;
+      this.file.data = row
+      console.log(row)
+      if (row.timer === '' || row.timer == null) {
+        this.file.data.timer = 0
+      }
+      if (row.timerNeed === '' || row.timerNeed == null) {
+        this.file.data.timerNeed = 0
+      }
+      console.log(this.file.data)
+    },
+    getList() {
+      if (this.planType == 1) {
+        listLjplandsdt(this.queryParams).then(res => {
+          this.dsdtList = res.rows;
+          this.total = res.total;
+          this.loading = false;
+        })
+      } else if (this.planType == 2) {
+        listYsplandsdt(this.queryParams).then(res => {
+          this.dsdtList = res.rows;
+          this.total = res.total;
+          this.loading = false;
+        })
+      } else if (this.planType == 3) {
+        listFlplandsdt(this.queryParams).then(res => {
+          this.dsdtList = res.rows;
+          this.total = res.total;
+          this.loading = false;
+        })
+      } else if (this.planType == 4) {
+        listFtplandsdt(this.queryParams).then(res => {
+          this.dsdtList = res.rows;
+          this.total = res.total;
+          this.loading = false;
+        })
+      }
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 查询部门下拉树结构 */
+    getTreeselect() {
+      treeselect().then(response => {
+        this.deptOptions = response.data;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        newId: this.newId,
+        courseCode: null,
+        topic: null,
+        content: null,
+        courseDay: null,
+        courseHour: null,
+        detailPlan: null,
+        trainer: null,
+        courseDate: null,
+        assess: null,
+        delFlag: null,
+        createrCode: null,
+        createdate: null,
+        updaterCode: null,
+        updatedate: null,
+        deptId: null,
+        remarks: null,
+        planStatus: 0,
+        score1: null,
+        score2: null,
+        score3: null
+      };
+      this.resetForm("form");
+    }, /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      if (this.planType == 1) {
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return delLjplandsdt(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+      } else if (this.planType == 2) {
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return delYsplandsdt(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+      } else if (this.planType == 3) {
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return delFlplandsdt(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+      } else if (this.planType == 4) {
+        this.$confirm('是否确认删除?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function () {
+          return delFtplandsdt(ids);
+        }).then(() => {
+          this.getList();
+          this.msgSuccess("删除成功");
+        })
+      }
+    },
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      if (this.planType == 1) {
+        getLjplandsdt(id).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改课程";
+        });
+      } else if (this.planType == 2) {
+        getYsplandsdt(id).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改课程";
+        });
+      } else if (this.planType == 3) {
+        getFlplandsdt(id).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改课程";
+        });
+      } else if (this.planType == 4) {
+        getFtplandsdt(id).then(response => {
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改课程";
+        });
+      }
+    },
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加课程";
+    }, /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            if (this.planType == 1) {
+              updateLjplandsdt(this.form).then(response => {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else if (this.planType == 2) {
+              updateYsplandsdt(this.form).then(response => {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else if (this.planType == 3) {
+              updateFlplandsdt(this.form).then(response => {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            } else if (this.planType == 4) {
+              updateFtplandsdt(this.form).then(response => {
+                this.msgSuccess("修改成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          } else {
+            if (this.planType == 1) {
+              addLjplandsdt(this.form).then(response => {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            } else if (this.planType == 2) {
+              addYsplandsdt(this.form).then(response => {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            } else if (this.planType == 3) {
+              addFlplandsdt(this.form).then(response => {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            } else if (this.planType == 4) {
+              addFtplandsdt(this.form).then(response => {
+                this.msgSuccess("新增成功");
+                this.open = false;
+                this.getList();
+              });
+            }
+          }
+        }
+      });
+    },
+  }
+};
+
+
+</script>
+
+<style scoped>
+
+</style>

+ 5 - 5
ui/src/views/training/bccnew/tsnew/trainingPlan.vue

@@ -1,19 +1,19 @@
 <template>
   <div class="app-container" style="padding: 0 0 0 0">
     <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
-      <el-tab-pane label="进组前培训" name="first">
+      <el-tab-pane label="装置级培训" name="first">
         <firstplan-bccnew :newId="newId"  item="1" typename="firstplan" v-if="isFirst"></firstplan-bccnew>
       </el-tab-pane>
-      <el-tab-pane label="裂解" name="second" v-if="planType == 1">
+      <el-tab-pane label="导师带徒(裂解" name="second" v-if="planType == 1">
         <score :newId="newId" :planType="1" v-if="isSecond"/>
       </el-tab-pane>
-      <el-tab-pane label="压缩" name="third" v-if="planType == 2">
+      <el-tab-pane label="导师带徒(压缩" name="third" v-if="planType == 2">
         <score :newId="newId" :planType="2" v-if="isThird"/>
       </el-tab-pane>
-      <el-tab-pane label="分离" name="fourth" v-if="planType == 3">
+      <el-tab-pane label="导师带徒(分离" name="fourth" v-if="planType == 3">
         <score :newId="newId" :planType="3" v-if="isFourth"/>
       </el-tab-pane>
-      <el-tab-pane label="芳烃" name="fifth" v-if="planType == 4">
+      <el-tab-pane label="导师带徒(芳烃" name="fifth" v-if="planType == 4">
         <score :newId="newId" :planType="4" v-if="isFifth"/>
       </el-tab-pane>
     </el-tabs>

+ 120 - 0
ui/src/views/training/bccnew/tsnew/trainingPlan_student.vue

@@ -0,0 +1,120 @@
+<template>
+  <div class="app-container" style="padding: 0 0 0 0">
+    <el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="装置级培训" name="first">
+        <firstplan-bccnew_s :newId="newId"  item="1" typename="firstplan" v-if="isFirst"></firstplan-bccnew_s>
+      </el-tab-pane>
+      <el-tab-pane label="导师带徒(裂解)" name="second" v-if="planType == 1">
+        <score_s :newId="newId" :planType="1" v-if="isSecond"/>
+      </el-tab-pane>
+      <el-tab-pane label="导师带徒(压缩)" name="third" v-if="planType == 2">
+        <score_s :newId="newId" :planType="2" v-if="isThird"/>
+      </el-tab-pane>
+      <el-tab-pane label="导师带徒(分离)" name="fourth" v-if="planType == 3">
+        <score_s :newId="newId" :planType="3" v-if="isFourth"/>
+      </el-tab-pane>
+      <el-tab-pane label="导师带徒(芳烃)" name="fifth" v-if="planType == 4">
+        <score_s :newId="newId" :planType="4" v-if="isFifth"/>
+      </el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+<script>
+import List from "@/views/training/newstaff/firstplan/index.vue";
+import Score from "@/views/training/bccnew/tsnew/score.vue";
+import {listLjplandsdt} from "@/api/training/bccnew/ljplandsdt";
+import {listYsplandsdt} from "@/api/training/bccnew/ysplandsdt";
+import {listFlplandsdt} from "@/api/training/bccnew/flplandsdt";
+import {listFtplandsdt} from "@/api/training/bccnew/ftplandsdt";
+import {getTsnew} from "@/api/training/bccnew/tsnew";
+import Firstplan from "@/views/training/newstaff/firstplan/index.vue";
+import FirstplanBccnew from "@/views/training/bccnew/firstplan/index.vue";
+import FirstplanBccnew_s from "@/views/training/bccnew/firstplan/index_student.vue";
+import Score_s from "@/views/training/bccnew/tsnew/score_student.vue";
+
+export default {
+  name: "trainingPlan_s",
+  components: {Score_s, FirstplanBccnew_s, FirstplanBccnew, Firstplan, Score, List},
+  data() {
+    return {
+      dsdtList: [],
+      clientHeight: 300,
+      // 默认第一个Tab
+      activeName: 'first',
+      isFirst: true,
+      isSecond: false,
+      isThird: false,
+      isFourth: false,
+      isFifth: false,
+      isSixth: false,
+      planType: 1,
+      newId: ''
+    }
+  },
+  created() {
+    //设置表格高度对应屏幕高度
+    this.newId = this.$route.params && this.$route.params.newId;
+    getTsnew(this.newId).then(response => {
+      this.planType = response.data.planType;
+    });
+  },
+  methods: {
+    handleClick(tab) {
+      console.log(tab.name)
+      this.dsdtList = [];
+      if (tab.name === 'first') {
+        this.isFirst = true
+        this.isSecond = false
+        this.isThird = false
+        this.isFourth = false
+        this.isFifth = false
+        this.isSix1th = false
+      } else if (tab.name === 'second') {
+        this.isFirst = false
+        this.isSecond = true
+        this.isThird = false
+        this.isFourth = false
+        this.isFifth = false
+        this.isSixth = false
+      } else if (tab.name === 'third') {
+        this.isFirst = false
+        this.isSecond = false
+        this.isThird = true
+        this.isFourth = false
+        this.isFifth = false
+        this.isSixth = false
+      } else if (tab.name === 'fourth') {
+        this.isFirst = false
+        this.isSecond = false
+        this.isThird = false
+        this.isFourth = true
+        this.isFifth = false
+        this.isSixth = false
+      } else if (tab.name === 'fifth') {
+        listLjplandsdt({newId: this.newId}).then(res => {
+          this.dsdtList = res.data;
+        })
+        this.isFirst = false
+        this.isSecond = false
+        this.isThird = false
+        this.isFourth = false
+        this.isFifth = true
+        this.isSixth = false
+      } else if (tab.name === 'sixth') {
+        listLjplandsdt({newId: this.newId}).then(res => {
+          this.dsdtList = res.data;
+        })
+        this.isFirst = false
+        this.isSecond = false
+        this.isThird = false
+        this.isFourth = false
+        this.isFifth = false
+        this.isSixth = true
+      }
+    }
+  }
+};
+</script>
+<style scoped>
+
+</style>

+ 209 - 21
ui/src/views/training/bccnew/ysPlan/index.vue

@@ -41,7 +41,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['bccnew:yaPlan:add']"
+          v-hasPermi="['bccnew:ysPlan:add']"
         >新增</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -51,7 +51,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-          v-hasPermi="['bccnew:yaPlan:edit']"
+          v-hasPermi="['bccnew:ysPlan:edit']"
         >修改</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -61,7 +61,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-          v-hasPermi="['bccnew:yaPlan:remove']"
+          v-hasPermi="['bccnew:ysPlan:remove']"
         >删除</el-button>
       </el-col>
         <el-col :span="1.5">
@@ -70,7 +70,7 @@
                     icon="el-icon-upload2"
                     size="mini"
                     @click="handleImport"
-                    v-hasPermi="['bccnew:yaPlan:edit']"
+                    v-hasPermi="['bccnew:ysPlan:edit']"
             >导入</el-button>
         </el-col>
       <el-col :span="1.5">
@@ -79,13 +79,13 @@
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-hasPermi="['bccnew:yaPlan:export']"
+          v-hasPermi="['bccnew:ysPlan:export']"
         >导出</el-button>
       </el-col>
 	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="yaPlanList" @selection-change="handleSelectionChange" :height="clientHeight" border>
+    <el-table v-loading="loading" :data="ysPlanList" @selection-change="handleSelectionChange" :height="clientHeight" border>
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="课程编号" align="center" prop="courseCode" :show-overflow-tooltip="true"/>
       <el-table-column label="培训主题" align="center" prop="topic" :show-overflow-tooltip="true"/>
@@ -108,15 +108,23 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['bccnew:yaPlan:edit']"
+            v-hasPermi="['bccnew:ysPlan:edit']"
           >修改</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['bccnew:yaPlan:remove']"
+            v-hasPermi="['bccnew:ysPlan:remove']"
           >删除</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-folder"
+            @click="uploadFile(scope.row)"
+            v-hasPermi="['bccnew:ysPlan:edit']"
+          >学习资料
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -167,12 +175,12 @@
         <el-form-item label="考核情况" prop="assess">
           <el-input v-model="form.assess" placeholder="请输入考核情况" />
         </el-form-item>
+        <el-form-item label="应学习时长(分)" prop="timerNeed">
+          <el-input-number v-model="form.timerNeed" placeholder="请输入应学习时长" style="width: 100%"/>
+        </el-form-item>
         <el-form-item label="备注" prop="remarks">
           <el-input v-model="form.remarks" placeholder="请输入备注" />
         </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -209,16 +217,97 @@
               <el-button @click="upload.open = false">取 消</el-button>
           </div>
       </el-dialog>
+    <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px"
+               append-to-body>
+      <el-upload
+        ref="doc"
+        :limit="50"
+        :headers="doc.headers"
+        :action="doc.url+'/'+doc.id"
+        :disabled="doc.isUploading"
+        :on-progress="handleFileDocProgress"
+        :on-success="handleFileDocSuccess"
+        :file-list="doc.file"
+        :auto-upload="true"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">
+          {{ $t('将文件拖到此处,或') }}
+          <em>{{ $t('点击上传') }}</em>
+        </div>
+      </el-upload>
+      <el-table :data="doc.commonfileList" border>
+        <el-table-column :label="$t('文件名')" align="center" prop="fileName" :show-overflow-tooltip="true">
+          <template slot-scope="scope">
+            <a class="link-type" @click="handleDownload(scope.row)">
+              <span>{{ scope.row.fileName }}</span>
+            </a>
+          </template>
+        </el-table-column>
+        <!--        <el-table-column :label="$t('大小(Kb)')" align="center" prop="fileSize" :show-overflow-tooltip="true"-->
+        <!--                         width="80"/>-->
+        <!--        <el-table-column :label="$t('上传人')" align="center" prop="creator" :show-overflow-tooltip="true" width="120"/>-->
+        <el-table-column :label="$t('操作')" align="center" width="220" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <el-button
+              v-if="scope.row.fileName!=null&&scope.row.fileName.endsWith('pdf')"
+              size="mini"
+              type="text"
+              icon="el-icon-view"
+              @click="handleSee(scope.row)"
+            >{{ $t('预览') }}
+            </el-button>
+            <el-button v-hasPermi="['training:trainingrecords:file']" type="text" size="small" v-if="scope.row.isEdit"
+                       @click="save(scope.row)">保存
+            </el-button>
+            <el-button type="text" size="small" v-if="scope.row.isEdit" @click="cancelFile(scope.row, scope.$index)">
+              取消
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-download"
+              @click="handleDownload(scope.row)"
+            >{{ $t('下载') }}
+            </el-button>
+            <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-delete"
+              @click="handleDeleteDoc(scope.row)"
+              v-hasPermi="['training:trainingrecords:file']"
+            >{{ $t('删除') }}
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-dialog :close-on-click-modal="false" v-dialogDrag :title="pdf.title" :visible.sync="pdf.open" width="1300px"
+                 append-to-body>
+        <div style="margin-top: -60px;float: right;margin-right: 40px;">
+          <el-button size="mini" type="text" @click="openPdf">{{ $t('新页面打开PDF') }}</el-button>
+        </div>
+        <div style="margin-top: -30px">
+          <iframe :src="pdf.pdfUrl" frameborder="0" width="100%" height="700px"></iframe>
+        </div>
+      </el-dialog>
+
+      <div slot="footer" class="dialog-footer">
+        <!--        <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>-->
+        <el-button @click="doc.open = false">{{ $t('返 回') }}</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listYaPlan, getYaPlan, delYaPlan, addYaPlan, updateYaPlan, exportYaPlan, importTemplate} from "@/api/training/bccnew/ysPlan";
+import { listYsPlan, getYsPlan, delYsPlan, addYsPlan, updateYsPlan, exportYsPlan, importTemplate} from "@/api/training/bccnew/ysPlan";
 import { treeselect } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Editor from '@/components/Editor/index.vue';
+import {getFirstPlanTmpl, updateFirstPlanTmpl} from "@/api/training/bccnew/firstPlanTmpl";
 
 export default {
   name: "YsPlan",
@@ -226,6 +315,42 @@ export default {
   // components: { Editor },
   data() {
     return {
+      // 报告附件参数
+      doc: {
+        file: null,
+        // 是否显示弹出层(报告附件)
+        open: false,
+        // 弹出层标题(报告附件)
+        title: "附件",
+        // 是否禁用上传
+        isUploading: false,
+        // 是否更新已经存在的用户数据
+        updateSupport: 0,
+        // 报告附件上传位置编号
+        ids: 0,
+        id: null,
+        // 设置上传的请求头部
+        headers: {Authorization: "Bearer " + getToken()},
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/bccnew/ysPlanTmpl/uploadFile",
+        commonfileList: null,
+        queryParams: {
+          pId: null,
+          pType: 'bccnew'
+        },
+        pType: 'bccnew',
+        pId: null,
+        form: {}
+      },
+      pdf: {
+        title: '',
+        pdfUrl: '',
+        numPages: null,
+        open: false,
+        pageNum: 1,
+        pageTotalNum: 1,
+        loadedRatio: 0,
+      },
       // 遮罩层
       loading: true,
       // 选中数组
@@ -239,7 +364,7 @@ export default {
       // 总条数
       total: 0,
       // 压缩培训模版表格数据
-      yaPlanList: [],
+      ysPlanList: [],
       // 弹出层标题
       title: "",
       // 部门树选项
@@ -260,7 +385,7 @@ export default {
             // 设置上传的请求头部
             headers: { Authorization: "Bearer " + getToken() },
             // 上传的地址
-            url: process.env.VUE_APP_BASE_API + "/bccnew/yaPlan/importData"
+            url: process.env.VUE_APP_BASE_API + "/bccnew/ysPlan/importData"
         },
       // 查询参数
       queryParams: {
@@ -305,11 +430,74 @@ export default {
     this.getTreeselect();
   },
   methods: {
+    uploadFile(row) {
+      this.doc.file = null;
+      this.doc.commonfileList = [];
+      this.doc.open = true;
+      this.doc.id = row.id;
+      getFirstPlanTmpl(row.id).then(res => {
+        if (res.data.fileUrl != null)
+          this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
+      })
+    },
+    // 文件下载处理
+    handleDownload(row) {
+      var name = row.fileName;
+      var url = row.fileUrl;
+      var suffix = url.substring(url.lastIndexOf("."), url.length);
+      const a = document.createElement('a')
+      a.setAttribute('download', name)
+      a.setAttribute('target', '_blank')
+      a.setAttribute('href', process.env.VUE_APP_BASE_API + url)
+      a.click()
+    },
+    openPdf() {
+      window.open(this.pdf.pdfUrl);//path是文件的全路径地址
+    },
+    handleSee(row) {
+      // window.open(process.env.VUE_APP_BASE_API +'/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl);//path是文件的全路径地址
+      this.pdf.open = true
+      this.pdf.title = row.fileName
+      this.pdf.pdfUrl = process.env.VUE_APP_BASE_API + '/pdf/web/viewer.html?file=' + process.env.VUE_APP_BASE_API + row.fileUrl
+    },
+    /** 删除按钮操作 */
+    handleDeleteDoc(row) {
+      const ids = row.id || this.ids;
+      this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
+        confirmButtonText: this.$t('确定'),
+        cancelButtonText: this.$t('取消'),
+        type: "warning"
+      }).then(function () {
+        return updateFirstPlanTmpl({id: row.id, fileUrl: '', fileName: ''});
+      }).then(() => {
+        this.msgSuccess(this.$t('删除成功'));
+        this.doc.commonfileList = [];
+      })
+    },
+    // 上传中处理
+    handleFileDocProgress(event, file, fileList) {
+      this.doc.file = file;
+      this.doc.isUploading = true;
+    },
+    //附件上传成功处理
+    handleFileDocSuccess(response, file, fileList) {
+      this.doc.isUploading = false;
+      this.$alert(response.msg, this.$t('导入结果'), {dangerouslyUseHTMLString: true});
+      this.getList();
+      this.doc.commonfileList = [];
+      getFirstPlanTmpl(response.data).then(res => {
+        if (res.data.fileUrl != null) {
+          this.doc.commonfileList.push({fileUrl: res.data.fileUrl, fileName: res.data.fileName, id: res.data.id})
+          fileList = null
+          file = null
+        }
+      })
+    },
     /** 查询压缩培训模版列表 */
     getList() {
       this.loading = true;
-      listYaPlan(this.queryParams).then(response => {
-        this.yaPlanList = response.rows;
+      listYsPlan(this.queryParams).then(response => {
+        this.ysPlanList = response.rows;
         this.total = response.total;
         this.loading = false;
       });
@@ -375,7 +563,7 @@ export default {
     handleUpdate(row) {
       this.reset();
       const id = row.id || this.ids
-      getYaPlan(id).then(response => {
+      getYsPlan(id).then(response => {
         this.form = response.data;
         this.open = true;
         this.title = "修改压缩培训模版";
@@ -386,13 +574,13 @@ export default {
       this.$refs["form"].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
-            updateYaPlan(this.form).then(response => {
+            updateYsPlan(this.form).then(response => {
               this.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addYaPlan(this.form).then(response => {
+            addYsPlan(this.form).then(response => {
               this.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -409,7 +597,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-          return delYaPlan(ids);
+          return delYsPlan(ids);
         }).then(() => {
           this.getList();
           this.msgSuccess("删除成功");
@@ -423,7 +611,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-          return exportYaPlan(queryParams);
+          return exportYsPlan(queryParams);
         }).then(response => {
           this.download(response.msg);
         })