|
@@ -3,7 +3,7 @@
|
|
<div class="search">
|
|
<div class="search">
|
|
<div class="student_search">
|
|
<div class="student_search">
|
|
<div>班级筛选</div>
|
|
<div>班级筛选</div>
|
|
- <el-select v-model="classChoose">
|
|
|
|
|
|
+ <el-select v-model="classChoose" @change="searchStudent">
|
|
<el-option label="全部" value="">全部</el-option>
|
|
<el-option label="全部" value="">全部</el-option>
|
|
<el-option
|
|
<el-option
|
|
v-for="(c, cIndex) in classJuri"
|
|
v-for="(c, cIndex) in classJuri"
|
|
@@ -13,43 +13,69 @@
|
|
></el-option>
|
|
></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</div>
|
|
</div>
|
|
- <div>
|
|
|
|
|
|
+ <div class="rightSearch">
|
|
<div class="searchImg">
|
|
<div class="searchImg">
|
|
<img src="../../../assets/icon/search.png" alt="" />
|
|
<img src="../../../assets/icon/search.png" alt="" />
|
|
</div>
|
|
</div>
|
|
<el-input v-model="sName" placeholder="请输入学生姓名或账号"></el-input>
|
|
<el-input v-model="sName" placeholder="请输入学生姓名或账号"></el-input>
|
|
|
|
+ <el-button size="mini" type="primary" @click="searchStudent"
|
|
|
|
+ >查询</el-button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <el-table
|
|
|
|
- :data="tableData"
|
|
|
|
- border
|
|
|
|
- style="width: 100%"
|
|
|
|
- :row-class-name="tableRowClassName"
|
|
|
|
- >
|
|
|
|
- <el-table-column
|
|
|
|
- prop="sName"
|
|
|
|
- align="center"
|
|
|
|
- label="学生姓名"
|
|
|
|
- min-width="20%"
|
|
|
|
|
|
+ <div class="student_table">
|
|
|
|
+ <el-table
|
|
|
|
+ :data="tableData"
|
|
|
|
+ border
|
|
|
|
+ :fit="true"
|
|
|
|
+ v-loading="isLoading"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
|
|
|
|
+ :row-class-name="tableRowClassName"
|
|
>
|
|
>
|
|
- </el-table-column>
|
|
|
|
- <el-table-column prop="cName" align="center" label="班级" min-width="20%">
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column
|
|
|
|
- prop="course"
|
|
|
|
- align="center"
|
|
|
|
- label="课程"
|
|
|
|
- min-width="20%"
|
|
|
|
- >
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="操作" align="center" min-width="20%">
|
|
|
|
- <template>
|
|
|
|
- <el-button size="mini" type="primary" @click="lookEvaCourse"
|
|
|
|
- >报告</el-button
|
|
|
|
- >
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="sName"
|
|
|
|
+ align="center"
|
|
|
|
+ label="学生姓名"
|
|
|
|
+ min-width="20%"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="cName"
|
|
|
|
+ align="center"
|
|
|
|
+ label="班级"
|
|
|
|
+ min-width="20%"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="course"
|
|
|
|
+ align="center"
|
|
|
|
+ label="课程"
|
|
|
|
+ min-width="40%"
|
|
|
|
+ >
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" align="center" min-width="20%">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ type="primary"
|
|
|
|
+ @click="lookEvaCourse(scope.row.userid)"
|
|
|
|
+ >报告</el-button
|
|
|
|
+ >
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="student_page">
|
|
|
|
+ <el-pagination
|
|
|
|
+ background
|
|
|
|
+ layout="prev, pager, next"
|
|
|
|
+ :page-size="10"
|
|
|
|
+ :total="total"
|
|
|
|
+ v-if="page"
|
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
|
+ ></el-pagination>
|
|
|
|
+ </div>
|
|
<el-dialog
|
|
<el-dialog
|
|
title="选择报告"
|
|
title="选择报告"
|
|
:visible.sync="dialogVisible"
|
|
:visible.sync="dialogVisible"
|
|
@@ -59,19 +85,32 @@
|
|
class="dialog_diy"
|
|
class="dialog_diy"
|
|
>
|
|
>
|
|
<div>
|
|
<div>
|
|
- <div v-for="(m, mIndex) in mbCourse" :key="mIndex">
|
|
|
|
- <div>{{ m.name }}</div>
|
|
|
|
- <el-checkbox-group v-model="checkboxList" class="people_name">
|
|
|
|
- <div
|
|
|
|
- v-for="item in mbCourse[mIndex].course"
|
|
|
|
- :key="item.id"
|
|
|
|
- class="p_box"
|
|
|
|
|
|
+ <div
|
|
|
|
+ class="evaBox"
|
|
|
|
+ v-for="(item, index) in mbCourse"
|
|
|
|
+ :key="index"
|
|
|
|
+ v-loading="isLoading1"
|
|
|
|
+ >
|
|
|
|
+ <div>目标体系-{{ item.title }}</div>
|
|
|
|
+ <el-table :data="item.course" border style="width: 100%" stripe>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="title"
|
|
|
|
+ label="项目"
|
|
|
|
+ align="center"
|
|
|
|
+ min-width="15%"
|
|
>
|
|
>
|
|
- <el-checkbox :label="item.id">
|
|
|
|
- {{ item.name }}
|
|
|
|
- </el-checkbox>
|
|
|
|
- </div>
|
|
|
|
- </el-checkbox-group>
|
|
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column align="center" min-width="25%">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <input
|
|
|
|
+ type="checkbox"
|
|
|
|
+ :id="scope.row.courseId"
|
|
|
|
+ :value="scope.row.title"
|
|
|
|
+ @change="isChooseS(scope.row.courseId, index)"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
@@ -86,65 +125,33 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
|
|
+ props: ["ooid"],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
sName: "",
|
|
sName: "",
|
|
classChoose: "",
|
|
classChoose: "",
|
|
- classJuri: [
|
|
|
|
- { id: 1, name: "一年级一班" },
|
|
|
|
- { id: 2, name: "一年级二班" },
|
|
|
|
- { id: 3, name: "一年级三班" },
|
|
|
|
- { id: 4, name: "一年级四班" },
|
|
|
|
- ],
|
|
|
|
- tableData: [
|
|
|
|
- {
|
|
|
|
- sName: "徐家伟",
|
|
|
|
- cName: "四年级二班",
|
|
|
|
- course: "课程1/课程2/课程3",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- sName: "牛倩楠",
|
|
|
|
- cName: "四年级二班",
|
|
|
|
- course: "课程1/课程2",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- sName: "小李",
|
|
|
|
- cName: "四年级二班",
|
|
|
|
- course: "课程1",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- sName: "小王",
|
|
|
|
- cName: "四年级二班",
|
|
|
|
- course: "课程1/课程2/课程3/课程4",
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- sName: "小胡",
|
|
|
|
- cName: "四年级二班",
|
|
|
|
- course: "课程1/课程2/课程3/课程4",
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ isChooseStudent: "",
|
|
|
|
+ page: 1,
|
|
|
|
+ total: 0,
|
|
|
|
+ classJuri: [],
|
|
|
|
+ tableData: [],
|
|
|
|
+ isLoading: false,
|
|
|
|
+ isLoading1: false,
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
- checkboxList: [],
|
|
|
|
- mbCourse: [
|
|
|
|
- {
|
|
|
|
- id: 1,
|
|
|
|
- name: "目标体系名称1",
|
|
|
|
- course: [
|
|
|
|
- { id: 11, name: "设计并制作FEG智能车(5EX课程设计模型)" },
|
|
|
|
- { id: 12, name: "韶关市信息科技教师培训" },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- id: 2,
|
|
|
|
- name: "目标体系名称2",
|
|
|
|
- course: [
|
|
|
|
- { id: 21, name: "设计并制作FEG智能车(5EX课程设计模型)1111" },
|
|
|
|
- { id: 22, name: "韶关市信息科技教师培训1111" },
|
|
|
|
- ],
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ mbCourse: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ ooid: {
|
|
|
|
+ immediate: true,
|
|
|
|
+ deep: true,
|
|
|
|
+ handler(newValue, oldValue) {
|
|
|
|
+ this.getClass();
|
|
|
|
+ this.getSData();
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ },
|
|
|
|
+ },
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
tableRowClassName({ row, rowIndex }) {
|
|
tableRowClassName({ row, rowIndex }) {
|
|
if ((rowIndex + 1) % 2 === 0) {
|
|
if ((rowIndex + 1) % 2 === 0) {
|
|
@@ -156,10 +163,95 @@ export default {
|
|
handleClose(done) {
|
|
handleClose(done) {
|
|
done();
|
|
done();
|
|
},
|
|
},
|
|
- lookEvaCourse() {
|
|
|
|
|
|
+ handleCurrentChange(val) {
|
|
|
|
+ this.page = val;
|
|
|
|
+ this.getSData();
|
|
|
|
+ },
|
|
|
|
+ searchStudent() {
|
|
|
|
+ this.page = 1;
|
|
|
|
+ this.getSData();
|
|
|
|
+ },
|
|
|
|
+ isChooseS(id, i) {
|
|
|
|
+ if (this.mbCourse[i].isChoose.indexOf(id) != -1) {
|
|
|
|
+ this.mbCourse[i].isChoose.splice(
|
|
|
|
+ this.mbCourse[i].isChoose.indexOf(id),
|
|
|
|
+ 1
|
|
|
|
+ );
|
|
|
|
+ } else {
|
|
|
|
+ this.mbCourse[i].isChoose.push(id);
|
|
|
|
+ }
|
|
|
|
+ this.$forceUpdate();
|
|
|
|
+ },
|
|
|
|
+ getClass() {
|
|
|
|
+ let params = {
|
|
|
|
+ oid: this.ooid,
|
|
|
|
+ };
|
|
|
|
+ this.ajax
|
|
|
|
+ .get(this.$store.state.api + "selectClassBySchool", params)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.classJuri = res.data[0];
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {
|
|
|
|
+ console.error(err);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getSData() {
|
|
|
|
+ this.isLoading = true;
|
|
|
|
+ let params = {
|
|
|
|
+ cu: this.sName,
|
|
|
|
+ cn: this.classChoose,
|
|
|
|
+ oid: this.ooid,
|
|
|
|
+ page: this.page,
|
|
|
|
+ };
|
|
|
|
+ this.ajax
|
|
|
|
+ .get(this.$store.state.api + "selectSr", 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);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ getSEvaList() {
|
|
|
|
+ this.isLoading1 = true;
|
|
|
|
+ let params = {
|
|
|
|
+ uid: this.isChooseStudent,
|
|
|
|
+ oid: this.ooid,
|
|
|
|
+ };
|
|
|
|
+ this.ajax
|
|
|
|
+ .get(this.$store.state.api + "selectMrEva", params)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.isLoading1 = false;
|
|
|
|
+ this.mbCourse = res.data[1];
|
|
|
|
+ var courseList = res.data[2];
|
|
|
|
+ for (var i = 0; i < this.mbCourse.length; i++) {
|
|
|
|
+ this.mbCourse[i].course = [];
|
|
|
|
+ this.mbCourse[i].isChoose = [];
|
|
|
|
+ for (var j = 0; j < courseList.length; j++) {
|
|
|
|
+ if (this.mbCourse[i].id == courseList[j].evaId) {
|
|
|
|
+ this.mbCourse[i].course.push(courseList[j]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {
|
|
|
|
+ this.isLoading1 = false;
|
|
|
|
+ console.error(err);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ lookEvaCourse(id) {
|
|
|
|
+ this.isChooseStudent = id;
|
|
|
|
+ this.getSEvaList();
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
+ created() {
|
|
|
|
+ this.getClass();
|
|
|
|
+ this.getSData();
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
@@ -227,19 +319,19 @@ export default {
|
|
.student_search > div:nth-child(1) {
|
|
.student_search > div:nth-child(1) {
|
|
margin-right: 10px;
|
|
margin-right: 10px;
|
|
}
|
|
}
|
|
-.people_name {
|
|
|
|
|
|
+/* .people_name {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: flex-start;
|
|
justify-content: flex-start;
|
|
padding: 20px 0 0 25px;
|
|
padding: 20px 0 0 25px;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
-}
|
|
|
|
|
|
+} */
|
|
|
|
|
|
.p_box {
|
|
.p_box {
|
|
position: relative;
|
|
position: relative;
|
|
}
|
|
}
|
|
|
|
|
|
-.people_name >>> .el-checkbox {
|
|
|
|
|
|
+/* .people_name >>> .el-checkbox {
|
|
width: 100%;
|
|
width: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
align-items: center;
|
|
align-items: center;
|
|
@@ -250,9 +342,37 @@ export default {
|
|
text-overflow: ellipsis;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
width: calc(100%);
|
|
width: calc(100%);
|
|
-}
|
|
|
|
|
|
+} */
|
|
|
|
|
|
.people_name2 >>> .el-checkbox__label {
|
|
.people_name2 >>> .el-checkbox__label {
|
|
width: calc(100% - 130px);
|
|
width: calc(100% - 130px);
|
|
}
|
|
}
|
|
|
|
+.student_table >>> .el-table--border td {
|
|
|
|
+ border-right: 0px !important;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.student_table >>> .el-table,
|
|
|
|
+.student_table >>> .el-table__body-wrapper {
|
|
|
|
+ height: auto !important;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.student_page {
|
|
|
|
+ margin-top: 10px;
|
|
|
|
+}
|
|
|
|
+.rightSearch {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ flex-wrap: nowrap;
|
|
|
|
+ align-items: center;
|
|
|
|
+}
|
|
|
|
+.rightSearch >>> .el-button {
|
|
|
|
+ margin-left: 5px;
|
|
|
|
+ height: 35px;
|
|
|
|
+ width: 80px;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+}
|
|
|
|
+.evaBox,
|
|
|
|
+.evaBox > div:nth-child(1) {
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|