11wqe1 11 months ago
parent
commit
c396f5352e

+ 21 - 3
src/components/pages/components/studentReport.vue

@@ -3,8 +3,8 @@
     <div class="sr_head">
       学生成长报告
       <div class="sr_headBtnS">
-        <el-button v-if="seatNum > 0" type="primary" size="small" @click="upStu">上一位</el-button>
-        <el-button  style="margin-left: 10px;" v-if="seatNum < studentList.length-1" type="primary" size="small" @click="nextStu">下一位</el-button>
+        <el-button v-if="seatNum > 0 && typeNum !=1" type="primary" size="small" @click="upStu">上一位</el-button>
+        <el-button  style="margin-left: 10px;" v-if="seatNum < studentList.length-1 && typeNum !=1" type="primary" size="small" @click="nextStu">下一位</el-button>
         <el-button style="margin-left: 10px;" type="primary" size="small" @click="downloadFile('https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/student01-%E5%AD%A6%E7%94%9F%E6%88%90%E9%95%BF%E6%8A%A5%E5%91%8A1719315423787.pdf');">导出报告</el-button>
         <el-button style="margin-left: 10px;" @click="pageBack" type="primary" size="small">返回</el-button>
       </div>
@@ -59,7 +59,25 @@ import CoursePie from "./report/coursePie.vue";
 import CourseDetailReport from "./report/courseDetailReport.vue";
 import worksDetail3 from "./worksDetail3.vue";
 export default {
-  props: ["checkCourse", "checkStudent","oid"],
+  // props: ["checkCourse", "checkStudent","oid","typeNum"],
+  props: {
+    checkCourse: {
+            type: String,
+            default: '',
+    },
+    checkStudent: {
+          type: String,
+          default: '',
+    },
+    oid: {
+          type: String,
+          default: '',
+    },
+    typeNum: {
+          type: Number,
+          default: 0,
+    }
+  },
   components: {
     StudentInfo,
     CourseInfo,

File diff suppressed because it is too large
+ 266 - 205
src/components/pages/components/studentWorksDetail.vue


+ 5 - 1
src/components/pages/components/workData.vue

@@ -163,6 +163,10 @@
               <span style="margin: 0 5px;">
                 <i class="el-icon-arrow-right"></i>
               </span>
+              <span @click="pageBack" style="height: 100%;cursor: pointer;">查看课程</span>
+              <span style="margin: 0 5px;">
+                <i class="el-icon-arrow-right"></i>
+              </span>
               <div style="font-weight: 600;color: rgba(0, 0, 0, 0.9);">查看作业</div>
             </div>
             <div class="JsonTit">
@@ -1057,7 +1061,7 @@ export default {
 }
 .JsonTit{
   width: 100%;
-  padding: 20px 0;
+  padding: 20px 0 0;
   display: flex;
   justify-content: space-between;
   align-items: center;

+ 10 - 7
src/components/pages/components/worksDetail2.vue

@@ -80,7 +80,7 @@
               v-model="chooseTask"
               placeholder="请选择任务"
               @change="searchWork2"
-              v-if="DState == 1"
+              v-if="DState == 1 && cutTabNum != 0"
             >
               <el-option label="所有任务" value></el-option>
               <el-option
@@ -97,7 +97,7 @@
               v-model="chooseTask"
               placeholder="请选择任务"
               @change="searchWork2"
-              v-else
+               v-if="DState != 1 && cutTabNum != 0"
             >
               <el-option label="所有任务" value></el-option>
               <el-option
@@ -124,7 +124,7 @@
     <div class="pb_content_body">
       <div class="cutTab">
         <div :class="[cutTabNum == 0 ? 'ctrlBtn2' : 'ctrlBtn']"  @click="cutTabData(0)">按学生查看</div>
-        <div v-if="DState == 1" :class="[cutTabNum ==1 ? 'ctrlBtn2' : 'ctrlBtn']" @click="cutTabData(1)">按阶段查看</div>
+        <!-- <div v-if="DState == 1" :class="[cutTabNum ==1 ? 'ctrlBtn2' : 'ctrlBtn']" @click="cutTabData(1)">按阶段查看</div> -->
         <div :class="[cutTabNum == 2  ? 'ctrlBtn2' : 'ctrlBtn']" @click="cutTabData(2)">按任务查看</div>
 
       </div>
@@ -171,7 +171,7 @@
             min-width="20"
             align="center"
             show-overflow-tooltip
-            v-if="DState == 1"
+            v-if="DState == 1 && cutTabNum != 0"
           >
             <template slot-scope="scope">
               <div>
@@ -189,6 +189,7 @@
             label="任务"
             min-width="20"
             align="center"
+            v-if="cutTabNum != 0"
             show-overflow-tooltip
           >
             <template slot-scope="scope">
@@ -208,7 +209,7 @@
           <el-table-column
             prop="time"
             label="时间"
-            width="100px"
+            min-width="20"
             align="center" 
           ></el-table-column>
           <el-table-column align="center" label="操作" width="260px">
@@ -233,7 +234,7 @@
                 @click="
                   lookWork2(scope.row.id, scope.row.userid, scope.row.courseid)
                 "
-                >导出作业</el-button
+                >导出作业</el-button
               >
               <!-- <el-button
                 class="de_button"
@@ -3910,6 +3911,8 @@ export default {
       this.dyList2[s].isOpen = !this.dyList2[s].isOpen;
     },
     openTask(s, i, dyi, navi) {
+      console.log('openTask',s, i, dyi, navi);
+
       if (!this.dyList2[dyi].taskList[navi].isWork) {
         this.$message.warning("该任务暂时没提交作业");
       } else {
@@ -5219,7 +5222,7 @@ font-size: 14px !important;
 
 .answerbox1 > div:nth-child(2) {
   margin-left: 10px;
-  width: 265px;
+  /* width: 265px; */
   max-height: 147px;
   overflow: auto;
 }

+ 2 - 1
src/components/pages/studentWorks.vue

@@ -44,7 +44,7 @@
             <div
               class="returnWorks"
               @click="
-                goTo('/works?userid=' + userid + '&oid=' + oid + '&org=' + org)
+                goTo('/works?userid=' + userid + '&oid=' + oid + '&org=' + org + '&tNum=1')
               "
             >
               <el-button>返回</el-button>
@@ -165,6 +165,7 @@ export default {
     };
   },
   mounted() {
+   
     this.$nextTick(function () {
       this.tableHeight =
         window.innerHeight - this.$refs.table.$el.offsetTop - 200;

+ 192 - 5
src/components/pages/works.vue

@@ -67,7 +67,11 @@
           >
         </div>
         <div class="student_head">
-          <div class="student_search">
+          <div class="cutTab" >
+            <div @click="cutTabBtn(0)" :class="[ cutTabNum==0 ? 'cutTabTwo':'']">按课程查看</div>
+            <div @click="cutTabBtn(1)" :class="[ cutTabNum==1 ? 'cutTabTwo':'']">按学生查看</div>
+          </div>
+          <div class="student_search" v-if="cutTabNum==0">
             <div>班级筛选</div>
             <el-select v-model="classChoose" @change="search">
               <el-option label="全部" value="">全部</el-option>
@@ -103,6 +107,25 @@
               @input="search"
             ></el-input>
           </div>
+
+          <div class="student_search" v-if="cutTabNum==1">
+            <div>学生筛选</div>
+              <el-select v-model="classChoose" @change="search">
+                <el-option label="所有班级" value="">所有班级</el-option>
+                <el-option
+                  v-for="item in classJuri"
+                  :key="item.id"
+                  :label="item.name"
+                  :value="item.id"
+                >
+                </el-option>
+              </el-select>
+              <el-input
+                v-model="cn"
+                placeholder="筛选学生名称"
+                @input="search"
+              ></el-input>
+          </div>
           <!-- <div
             style="
               margin-left: 10px;
@@ -130,6 +153,7 @@
             :fit="true"
             v-loading="isLoading"
             style="width: 100%"
+            v-show="cutTabNum == 0"
             :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
             :row-class-name="tableRowClassName"
           >
@@ -202,6 +226,42 @@
               </template>
             </el-table-column>
           </el-table>
+          <el-table
+            v-if="cutTabNum == 1"
+            ref="table"
+            :data="tableData"
+            border
+            :height="tableHeight"
+            :fit="true"
+            v-loading="isLoading"
+            style="width: 100%"
+            :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+            :row-class-name="tableRowClassName"
+          >
+            <el-table-column
+              prop="name"
+              label="学生名称"
+              min-width="30"
+              align="center"
+            ></el-table-column>
+            <el-table-column
+              prop="className"
+              label="班级"
+              min-width="40"
+              align="center"
+            ></el-table-column>
+            <el-table-column label="操作" min-width="30">
+              <template slot-scope="scope">
+                <el-button
+                  type="primary"
+                  size="small"
+                  @click="getStuWorkData(scope.row)"
+                  >查看课程</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+         
         </div>
         <div class="student_page">
           <el-pagination
@@ -209,6 +269,7 @@
             layout="prev, pager, next"
             :page-size="10"
             :total="total"
+            :current-page.sync="page"
             v-if="page"
             @current-change="handleCurrentChange"
           ></el-pagination>
@@ -233,6 +294,22 @@
       </span>
     </el-dialog>-->
   
+    <div class="sdetailBox" v-if="dialogVisibleS">
+      <StudentWorksDetail
+        :uid="dataJson.userid"
+        :username="dataJson.name"
+        :ooid="oid"
+        :oorg="org"
+         @StuCancel="StuCancel"
+        :dialogVisibleS.sync="dialogVisibleS"
+      ></StudentWorksDetail>
+      <!-- <div class="cancelbox" v-if="dialogVisibleS">
+        <el-button @click="StuCancel" type="primary" size="small"
+          >返回</el-button
+        >
+      </div> -->
+    </div>
+
     <WorkDate
       :dataJson="dataJson"
       :uid="userid"
@@ -362,12 +439,14 @@ import WorkDate from "./components/workData";
 import Report from "./components/report";
 import studentReport from "./components/studentReport";
 import "../../common/aws-sdk-2.235.1.min.js";
+import StudentWorksDetail from "./components/studentWorksDetail.vue";
 
 export default {
   components: {
     WorkDate,
     Report,
     studentReport,
+    StudentWorksDetail
   },
   data() {
     return {
@@ -407,6 +486,9 @@ export default {
       checkStudent: "",
       userAarray: [],
       uname: "",
+      cutTabNum:0,
+      tableData:[],
+      dialogVisibleS:false
     };
   },
   mounted() {
@@ -431,6 +513,37 @@ export default {
     goTo(path) {
       this.$router.push(path);
     },
+    getAllStudent() {
+      this.isLoading = true;
+      let params = {
+        oid: this.oid,
+        cn: this.cn,
+        cid: this.classChoose,
+        page: this.page,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectAllStudent", params)
+        .then((res) => {
+          this.isLoading = false;
+          this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
+          this.tableData = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
+    cutTabBtn(val){
+      this.page = 1
+      this.cn=''
+      this.classChoose=''
+      this.cutTabNum = val;
+      if (val == 0) {
+        this.getProject()
+      }else{
+        this.getAllStudent()
+      }
+    },
     tableRowClassName({ row, rowIndex }) {
       if ((rowIndex + 1) % 2 === 0) {
         return "even_row";
@@ -443,7 +556,11 @@ export default {
     },
     handleCurrentChange(val) {
       this.page = val;
-      this.getProject();
+      if (this.cutTabNum == 0) {
+        this.getProject()
+      }else{
+        this.getAllStudent()
+      }
     },
     handleCurrentChange2(val) {
       this.page2 = val;
@@ -510,16 +627,29 @@ export default {
     },
     search() {
       this.page = 1;
-      this.getProject();
+      // this.getProject();
+      if (this.cutTabNum == 0) {
+        this.getProject()
+      }else{
+        this.getAllStudent()
+      }
     },
     getWorkData(res) {
       this.dataJson = res;
       this.dialogVisible = true;
     },
+    getStuWorkData(row) {
+      this.dataJson = row;
+      this.dialogVisibleS = true;
+    },
     cancel() {
       this.dataJson = "";
       this.dialogVisible = false;
     },
+    StuCancel() {
+      this.dataJson = [];
+      this.dialogVisibleS = false;
+    },
     cancelR() {
       this.checkStudent = "";
       this.reportVisible = false;
@@ -643,7 +773,9 @@ export default {
   },
   created() {
     this.page = 1;
+
     // this.getClass();
+    this.getAllStudent()
     this.getEva();
     this.getProject();
   },
@@ -688,8 +820,8 @@ export default {
 .student_head {
   margin-top: 10px;
   padding-bottom: 15px;
-  display: flex;
-  justify-content: space-between;
+  /* display: flex;
+  justify-content: space-between; */
 }
 .student_search {
   display: flex;
@@ -807,5 +939,60 @@ export default {
 .student_search >>> .el-input {
   width: auto !important;
 }
+.cutTab{
+  width: 100%;
+  display: flex;
+  padding: 15px 0;
+  justify-content: flex-start;
+  font-size: 14px;
+  font-weight: 600;
+}
+.cutTab > div{
+  margin-right: 10px;
+  padding-bottom: 5px;
+  cursor: pointer;
+  position: relative;
+}
+.cutTabTwo{
+  color: #409EFF;
+}
+.cutTabTwo:after {
+    content: '';
+    position: absolute;
+    bottom: -6px;
+    right: 0;
+    height: 2px;
+    width: 30%;
+    background-color: #409EFF;
+    left: 50%;
+    transform: translateX(-50%);
+}
 
+.sdetailBox {
+  height: 100%;
+  position: absolute;
+  top: 0;
+  background: #fff;
+  overflow: auto;
+  z-index: 1;
+  width: 95%;
+  left: 50%;
+  -webkit-transform: translateX(-50%);
+  transform: translateX(-50%);
+  padding: 20px;
+  -webkit-box-sizing: border-box;
+  box-sizing: border-box;
+}
+.cancelbox {
+  position: absolute;
+  z-index: 2;
+  left: 50%;
+  top: 7%;
+  width: 95%;
+  transform: translateX(-50%);
+  display: flex;
+  justify-content: flex-end;
+  padding: 0 90px 0px 0px;
+  box-sizing: border-box;
+}
 </style>

Some files were not shown because too many files changed in this diff