lsc 2 vuotta sitten
vanhempi
commit
1ea50f8a91
2 muutettua tiedostoa jossa 36 lisäystä ja 23 poistoa
  1. 28 15
      src/components/pages/addCourse.vue
  2. 8 8
      src/components/pages/student/addCourse.vue

+ 28 - 15
src/components/pages/addCourse.vue

@@ -203,7 +203,7 @@
                     </div>-->
                     <div style="margin: 0 30px 0 0;width:150px">
                       <div class="bInfo_title">添加班级</div>
-                      <div class="addPeople" @click="dialogVisibleClass = true">
+                      <div class="addPeople" @click="dialogVisibleClass = true,classSearch = '',getClass()">
                         添加班级
                       </div>
                       <div v-if="checkboxList2.length"
@@ -1787,10 +1787,18 @@
       :before-close="handleClose" class="addNewPP">
       <div class="people" style="height: 300px">
         <div class="people_top">
+          <div class="people_top_right">
+            <div class="people_search">
+              <el-input placeholder="搜索班级名称" v-model="classSearch" @keyup.enter.native="getClass()"></el-input>
+              <div class="search_img" @click="getClass()">
+                <img src="../../assets/icon/search.png" alt />
+              </div>
+            </div>
+          </div>
           <div class="people_nav">选择班级</div>
         </div>
         <el-checkbox-group v-model="checkboxList2" class="people_name">
-          <div v-for="(item, index) in grade" :key="item.id">
+          <div v-for="(item, index) in grade2" :key="item.id">
             <el-checkbox :label="item.id">
               {{ item.name ? item.name : "暂无班级可选" }}
             </el-checkbox>
@@ -2654,6 +2662,7 @@ export default {
       checkboxList: [],
       checkboxList2: [],
       checkboxList3: [],
+      classSearch:"",
       number: "",
       tTitle: "",
       tdetail: "",
@@ -2675,6 +2684,7 @@ export default {
       cidType: 0,
       answerQ: "",
       grade: [],
+      grade2: [],
       courseUserid: "",
       timer: null,
       timer2: null,
@@ -3543,8 +3553,8 @@ export default {
             [file.name.split(".").length - 1].toLocaleUpperCase()
           ) != -1
         ) {
-          if (file.size / 1024 / 1024 > 10) {
-            this.$message.error("上传文件大于10兆,请重新选择文件!");
+          if (file.size / 1024 / 1024 > 50) {
+            this.$message.error("上传文件大于50兆,请重新选择文件!");
             this.inputShow = true;
             var a = _this.$refs.upload1.uploadFiles;
             a.splice(a.length - 1, a.length);
@@ -3556,8 +3566,8 @@ export default {
             .split(".")
           [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
         ) {
-          if (file.size / 1024 / 1024 > 5) {
-            this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
+          if (file.size / 1024 / 1024 > 50) {
+            this.$message.error("添加成上传文件大于50兆,请重新选择文件!");
             this.inputShow = true;
             var a = _this.$refs.upload1.uploadFiles;
             a.splice(a.length - 1, a.length);
@@ -3706,8 +3716,8 @@ export default {
             [file.name.split(".").length - 1].toLocaleUpperCase()
           ) != -1
         ) {
-          if (file.size / 1024 / 1024 > 10) {
-            this.$message.error("上传文件大于10兆,请重新选择文件!");
+          if (file.size / 1024 / 1024 > 50) {
+            this.$message.error("上传文件大于50兆,请重新选择文件!");
             this.inputShow = true;
             var a = _this.$refs.upload1.uploadFiles;
             a.splice(a.length - 1, a.length);
@@ -3719,8 +3729,8 @@ export default {
             .split(".")
           [file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
         ) {
-          if (file.size / 1024 / 1024 > 5) {
-            this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
+          if (file.size / 1024 / 1024 > 50) {
+            this.$message.error("添加成上传文件大于50兆,请重新选择文件!");
             this.inputShow = true;
             var a = _this.$refs.upload1.uploadFiles;
             a.splice(a.length - 1, a.length);
@@ -4000,11 +4010,15 @@ export default {
     getClass() {
       let params = {
         oid: this.oid,
+        cn: this.classSearch,
       };
       this.ajax
-        .get(this.$store.state.api + "selectClassBySchool", params)
+        .get(this.$store.state.api + "selectClassBySchoolSearch", params)
         .then((res) => {
-          this.grade = res.data[0];
+          if(!this.grade.length){
+            this.grade = res.data[0];
+          }
+          this.grade2 = res.data[0];
           this.classJuri = res.data[0];
         })
         .catch((err) => {
@@ -5715,7 +5729,6 @@ export default {
         .then((res) => {
           this.CourseType = res.data;
           let _courseTypeId = []
-
           for (var i = 0; i < res.data[0].length; i++) {
             if (!this.cid) {
               this.courseTypeId[res.data[0][i].id] = [];
@@ -5750,7 +5763,7 @@ export default {
               }
               if (res.data[3].length > 0) {
                 for (var j = 0; j < res.data[3].length; j++) {
-                  if (this.courseTypeId.indexOf(res.data[3][j].id) != -1 && _courseTypeId.indexOf(res.data[2][j].id) == -1) {
+                  if (this.courseTypeId.indexOf(res.data[3][j].id) != -1 && _courseTypeId.indexOf(res.data[3][j].id) == -1) {
                     _courseTypeId.push(res.data[3][j].id)
                   }
                   if (res.data[0][i].id == res.data[3][j].pid) {
@@ -6711,7 +6724,7 @@ export default {
 }
 
 .add_info_box2::after {
-  content: '提示:支持上传10M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。';
+  content: '提示:支持上传50M以内的PPT和Word文件、5M以内的Excel文件, PDF文件不限制大小。';
   color: red;
   font-size: 14px;
   margin-bottom: 10px;

+ 8 - 8
src/components/pages/student/addCourse.vue

@@ -3852,8 +3852,8 @@ export default {
                             .split(".")[file.name.split(".").length - 1].toLocaleUpperCase()
                     ) != -1
                 ) {
-                    if (file.size / 1024 / 1024 > 10) {
-                        this.$message.error("上传文件大于10兆,请重新选择文件!");
+                    if (file.size / 1024 / 1024 > 50) {
+                        this.$message.error("上传文件大于50兆,请重新选择文件!");
                         this.inputShow = true;
                         // loading.close();
                         return;
@@ -3862,8 +3862,8 @@ export default {
                     file.name
                         .split(".")[file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
                 ) {
-                    if (file.size / 1024 / 1024 > 5) {
-                        this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
+                    if (file.size / 1024 / 1024 > 50) {
+                        this.$message.error("添加成上传文件大于50兆,请重新选择文件!");
                         this.inputShow = true;
                         // loading.close();
                         return;
@@ -3997,8 +3997,8 @@ export default {
                             .split(".")[file.name.split(".").length - 1].toLocaleUpperCase()
                     ) != -1
                 ) {
-                    if (file.size / 1024 / 1024 > 10) {
-                        this.$message.error("上传文件大于10兆,请重新选择文件!");
+                    if (file.size / 1024 / 1024 > 50) {
+                        this.$message.error("上传文件大于50兆,请重新选择文件!");
                         this.inputShow = true;
                         // loading.close();
                         return;
@@ -4007,8 +4007,8 @@ export default {
                     file.name
                         .split(".")[file.name.split(".").length - 1].toLocaleUpperCase() != "PDF"
                 ) {
-                    if (file.size / 1024 / 1024 > 5) {
-                        this.$message.error("添加成上传文件大于5兆,请重新选择文件!");
+                    if (file.size / 1024 / 1024 > 50) {
+                        this.$message.error("添加成上传文件大于50兆,请重新选择文件!");
                         this.inputShow = true;
                         // loading.close();
                         return;