瀏覽代碼

-导师带徒添加考试详情

jiangbiao 1 年之前
父節點
當前提交
73ff85629b

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

@@ -70,6 +70,10 @@ public class TTsFirstplanController extends BaseController {
                 list.get(i).setStudy(0);
             }
         }
+        for (TTsFirstplan firstplan : list) {
+            TTsNew tsNew = tTsNewService.selectTTsNewById(firstplan.getNewId());
+            firstplan.setStaffId(tsNew.getStaffId());
+        }
         startPage();
         return getDataTable(list);
     }
@@ -91,13 +95,22 @@ public class TTsFirstplanController extends BaseController {
                 list.get(i).setStudy(0);
             }
         }
+        for (TTsFirstplan firstplan : list) {
+            TTsNew tsNew = tTsNewService.selectTTsNewById(firstplan.getNewId());
+            firstplan.setStaffId(tsNew.getStaffId());
+        }
         return AjaxResult.success(list);
     }
 
     @GetMapping("/listAllByTrainer")
     public AjaxResult listAllByTrainer(TTsFirstplan tTsFirstplan) {
         tTsFirstplan.setTrainer(getNickName());
-        return AjaxResult.success(tTsFirstplanService.selectTTsFirstplanList(tTsFirstplan));
+        List<TTsFirstplan> list = tTsFirstplanService.selectTTsFirstplanList(tTsFirstplan);
+        for (TTsFirstplan firstplan : list) {
+            TTsNew tsNew = tTsNewService.selectTTsNewById(firstplan.getNewId());
+            firstplan.setStaffId(tsNew.getStaffId());
+        }
+        return AjaxResult.success(list);
     }
 
     /**

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

@@ -142,8 +142,18 @@ public class TTsFirstplan extends BaseEntity
 
     private String nickName;
 
+    private String staffId;
+
     private Integer study;
 
+    public String getStaffId() {
+        return staffId;
+    }
+
+    public void setStaffId(String staffId) {
+        this.staffId = staffId;
+    }
+
     public Integer getStudy() {
         return study;
     }

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

@@ -331,6 +331,18 @@
         @click="handleStudy(file.data)"
       >查看附件
       </el-button>
+      <el-button
+        size="mini"
+        type="primary"
+        icon="el-icon-view"
+        @click="handlePaperDetail(file.data)"
+      >考试明细</el-button>
+    </el-dialog>
+
+    <el-dialog :visible.sync="paperopen" title="考试明细" width="60%" append-to-body>
+      <div class="el-dialog-div">
+        <my-paper-list :exam-id="examId" :staff-id="studentStaffId" />
+      </div>
     </el-dialog>
 
     <el-dialog :close-on-click-modal="false" element-loading-background="rgba(0,0,0,0.2)"
@@ -445,11 +457,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {listExam} from "@/api/training/elearn/exam";
 import {allFileList, delCommonfile} from "@/api/common/commonfile";
 import {getStaffId} from "@/api/plant/staffmgr";
+import MyPaperList from "@/views/training/elearn/userExam/paper.vue";
 
 var timer = null;
 export default {
   name: "FirstplanBccnew",
-  components: {Treeselect},
+  components: {MyPaperList, Treeselect},
   props: {
     newId: {
       default: null
@@ -460,6 +473,8 @@ export default {
   data() {
     return {
       staffId:null,
+      examId: null,
+      studentStaffId: null,
       file: {
         open: false,
         data: {}
@@ -500,8 +515,9 @@ export default {
         },
         pType: 'trainingFirst',
         pId: null,
-        form: {}
+        form: {},
       },
+      paperopen:false,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -590,6 +606,12 @@ export default {
     this.getStaffId();
   },
   methods: {
+    handlePaperDetail(row){
+      console.log(row)
+      this.examId = row.examId+""
+      this.studentStaffId = row.staffId
+      this.paperopen = true
+    },
     getStaffId(){
       getStaffId().then(res=>{
         this.staffId = res.data;

+ 24 - 1
ui/src/views/training/bccnew/firstplan/index_t.vue

@@ -198,6 +198,20 @@
         @click="handleStudy(file.data)"
       >查看附件
       </el-button>
+      <el-button
+        size="mini"
+        type="primary"
+        icon="el-icon-view"
+        @click="handlePaperDetail(file.data)"
+      >考试明细</el-button>
+    </el-dialog>
+
+    <el-dialog :visible.sync="open" title="考试明细" width="60%" append-to-body>
+
+      <div class="el-dialog-div">
+        <my-paper-list :exam-id="examId" :staff-id="studentStaffId" />
+      </div>
+
     </el-dialog>
 
     <el-dialog :close-on-click-modal="false" element-loading-background="rgba(0,0,0,0.2)"
@@ -312,14 +326,17 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {listExam} from "@/api/training/elearn/exam";
 import {allFileList, delCommonfile} from "@/api/common/commonfile";
 import {getStaffId} from "@/api/plant/staffmgr";
+import MyPaperList from "@/views/training/elearn/userExam/paper.vue";
 
 var timer = null;
 export default {
   name: "Firstplan-t-Bccnew",
-  components: {Treeselect},
+  components: {MyPaperList, Treeselect},
   data() {
     return {
       staffId: null,
+      examId: null,
+      studentStaffId: null,
       file: {
         open: false,
         data: {}
@@ -452,6 +469,12 @@ export default {
     this.getStaffId();
   },
   methods: {
+    handlePaperDetail(row){
+      console.log(row)
+      this.examId = row.examId+""
+      this.studentStaffId = row.staffId
+      this.open = true
+    },
     getStaffId() {
       getStaffId().then(res => {
         this.staffId = res.data;