|
@@ -20,6 +20,16 @@
|
|
|
<el-option value="1" label="他人课程"></el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
+ <div class="head_left">
|
|
|
+ <el-input
|
|
|
+ v-model="courseName"
|
|
|
+ class="student_input"
|
|
|
+ placeholder="请输入课程名称"
|
|
|
+ ></el-input>
|
|
|
+ <el-button class="course_button" @click="searchCourse"
|
|
|
+ >查询</el-button
|
|
|
+ >
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="student_table">
|
|
|
<div class="course_box">
|
|
@@ -132,6 +142,7 @@ export default {
|
|
|
groupA: "0",
|
|
|
classX: "",
|
|
|
course: [],
|
|
|
+ courseName:"",
|
|
|
mr: require("../../assets/icon/kc1.png"),
|
|
|
};
|
|
|
},
|
|
@@ -230,6 +241,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ searchCourse(){
|
|
|
+ this.page = 1;
|
|
|
+ this.searchCourse();
|
|
|
+ },
|
|
|
getCourse() {
|
|
|
const loading = this.openLoading(
|
|
|
document.querySelector(".student_table")
|
|
@@ -254,6 +269,25 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
+ searchCourse(){
|
|
|
+ this.isLoading = true;
|
|
|
+ let params = {
|
|
|
+ cu: "",
|
|
|
+ cn: this.courseName,
|
|
|
+ page: this.page,
|
|
|
+ };
|
|
|
+ this.ajax
|
|
|
+ .get(this.$store.state.api + "searchCourse", params)
|
|
|
+ .then((res) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
|
|
|
+ this.course = res.data[0];
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ this.isLoading = false;
|
|
|
+ console.error(err);
|
|
|
+ });
|
|
|
+ },
|
|
|
deleteCourse(cid) {
|
|
|
const loading = this.openLoading(
|
|
|
document.querySelector(".student_table")
|
|
@@ -539,4 +573,22 @@ export default {
|
|
|
.three_bottom > div:hover {
|
|
|
color: #79a2ff;
|
|
|
}
|
|
|
+.head_left {
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+.student_input >>> .el-input__inner {
|
|
|
+ height: 40px;
|
|
|
+ width: 190px;
|
|
|
+ font-size: 13px;
|
|
|
+ padding: 0 10px;
|
|
|
+}
|
|
|
+.course_button {
|
|
|
+ color: #fff;
|
|
|
+ background: #2268bc;
|
|
|
+ width: 75px;
|
|
|
+ height: 40px;
|
|
|
+ padding: 0 !important;
|
|
|
+ font-size: 12px;
|
|
|
+ line-height: 40px;
|
|
|
+}
|
|
|
</style>
|