|
@@ -102,6 +102,12 @@
|
|
|
@click="getWorkData(scope.row)"
|
|
|
>查看课程</el-button
|
|
|
>
|
|
|
+ <!-- <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="getStudnet(scope.row)"
|
|
|
+ >查看报告</el-button
|
|
|
+ > -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -179,16 +185,78 @@
|
|
|
</div>
|
|
|
<span slot="footer" class="dialog-footer"> </span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog
|
|
|
+ title="选择学生"
|
|
|
+ :visible.sync="signDialog"
|
|
|
+ width="500px"
|
|
|
+ :before-close="handleClose"
|
|
|
+ class="dialog_diy check_diy"
|
|
|
+ >
|
|
|
+ <div>
|
|
|
+ <div>
|
|
|
+ <el-table
|
|
|
+ v-loading="isLoading2"
|
|
|
+ ref="table"
|
|
|
+ :data="res2"
|
|
|
+ border
|
|
|
+ :height="400"
|
|
|
+ :fit="true"
|
|
|
+ style="width: 100%"
|
|
|
+ :row-class-name="tableRowClassName"
|
|
|
+ :header-cell-style="{ background: 'rgb(238,238,238)' }"
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ prop="sName"
|
|
|
+ label="姓名"
|
|
|
+ min-width="20"
|
|
|
+ ></el-table-column>
|
|
|
+ <el-table-column label="操作" min-width="20">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="small"
|
|
|
+ @click="getReport(scope.row)"
|
|
|
+ >查看报告</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <div style="margin-top: 10px">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ :page-size="10"
|
|
|
+ :total="total2"
|
|
|
+ @current-change="handleCurrentChange2"
|
|
|
+ ></el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="signDialog = false">关闭</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <div class="report_box" v-if="reportVisible">
|
|
|
+ <studentReport
|
|
|
+ :checkCourse="checkCourse"
|
|
|
+ :checkStudent="checkStudent"
|
|
|
+ ></studentReport>
|
|
|
+ </div>
|
|
|
+ <div class="cancelbox" v-if="reportVisible">
|
|
|
+ <el-button @click="cancelR" type="primary" size="small">返回</el-button>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import WorkDate from "./components/workData";
|
|
|
import Report from "./components/report";
|
|
|
+import studentReport from "./components/studentReport";
|
|
|
export default {
|
|
|
components: {
|
|
|
WorkDate,
|
|
|
Report,
|
|
|
+ studentReport,
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -211,6 +279,14 @@ export default {
|
|
|
dialogVisible: false,
|
|
|
dialogVisibleBao: false,
|
|
|
dataJson: {},
|
|
|
+ signDialog: false,
|
|
|
+ isLoading2: false,
|
|
|
+ page2: 1,
|
|
|
+ total2: 0,
|
|
|
+ res2: [],
|
|
|
+ checkCourse: "",
|
|
|
+ reportVisible: false,
|
|
|
+ checkStudent: "",
|
|
|
};
|
|
|
},
|
|
|
mounted() {
|
|
@@ -249,6 +325,10 @@ export default {
|
|
|
this.page = val;
|
|
|
this.getProject();
|
|
|
},
|
|
|
+ handleCurrentChange2(val) {
|
|
|
+ this.page2 = val;
|
|
|
+ this.getStudnet();
|
|
|
+ },
|
|
|
//获取班级列表
|
|
|
getClass() {
|
|
|
this.isLoading = true;
|
|
@@ -301,6 +381,38 @@ export default {
|
|
|
this.dataJson = "";
|
|
|
this.dialogVisible = false;
|
|
|
},
|
|
|
+ cancelR(row) {
|
|
|
+ this.checkStudent = row.userid
|
|
|
+ this.reportVisible = false;
|
|
|
+ },
|
|
|
+ getStudnet(row) {
|
|
|
+ //获取作业
|
|
|
+ this.signDialog = true;
|
|
|
+ this.isLoading2 = true;
|
|
|
+ this.checkCourse = row.courseId;
|
|
|
+ let params = {
|
|
|
+ cid: row.courseId,
|
|
|
+ uname: "",
|
|
|
+ stage: "",
|
|
|
+ task: "",
|
|
|
+ page: this.page2,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "getCourseWorks3", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.isLoading2 = false;
|
|
|
+ this.total2 = res.data[0].length > 0 ? res.data[0][0].num : 0;
|
|
|
+ this.res2 = res.data[0];
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.isLoading2 = false;
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getReport() {
|
|
|
+ this.reportVisible = true;
|
|
|
+ this.signDialog = false;
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
this.page = 1;
|
|
@@ -351,7 +463,8 @@ export default {
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
|
|
|
-.student_table >>> .el-table,.student_table >>> .el-table__body-wrapper{
|
|
|
+.student_table >>> .el-table,
|
|
|
+.student_table >>> .el-table__body-wrapper {
|
|
|
height: auto !important;
|
|
|
}
|
|
|
|
|
@@ -376,6 +489,9 @@ export default {
|
|
|
.dialog_diy >>> .el-dialog__headerbtn .el-dialog__close:hover {
|
|
|
color: #fff;
|
|
|
}
|
|
|
+.check_diy >>> .el-dialog__body {
|
|
|
+ padding-bottom: 0;
|
|
|
+}
|
|
|
.dialog_diy >>> .el-dialog__body,
|
|
|
.dialog_diy >>> .el-dialog__footer {
|
|
|
background: #fafafa;
|
|
@@ -412,4 +528,19 @@ export default {
|
|
|
padding: 0 90px 0px 0px;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
+
|
|
|
+.report_box {
|
|
|
+ height: 100%;
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ /* background: #fff; */
|
|
|
+ background: rgb(231, 242, 252);
|
|
|
+ overflow: auto;
|
|
|
+ z-index: 1;
|
|
|
+ width: 100%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translateX(-50%);
|
|
|
+ padding: 20px;
|
|
|
+ box-sizing: border-box;
|
|
|
+}
|
|
|
</style>
|