Browse Source

学生管理

11wqe1 4 days ago
parent
commit
a7949321c3

+ 1 - 1
src/components/pages/pptEasy/addCourse2.vue

@@ -18,7 +18,7 @@
                 <el-input 
                   class="title-input" 
                   ref="titleInputRef"
-                  v-model:value="titleValue" 
+                  v-model="titleValue" 
                   @blur="handleUpdateTitle()" 
                   v-if="editingTitle" 
                 ></el-input>

+ 17 - 1
src/components/pages/studentManageNew/component/addstu.vue

@@ -11,7 +11,7 @@
           </div>
         </div>
       </template>
-      <div class="addStuBox">
+      <div class="addStuBox" v-loading="userSuffixloading">
         <div class="bar_box" v-if="boxType != 1">
           <div
             v-for="item in stuListTypeList"
@@ -266,6 +266,7 @@ export default {
       role: this.$route.query.role,
       cascaderDataPath: [],
 
+      userSuffixloading:false,
       deltypy:0,
       stuexcel:[],
       impbox:[],
@@ -403,6 +404,11 @@ export default {
 
     // 上传Excel添加学生
     handleChange(file) {
+      if (this.userSuffix == "") {
+        this.$message.error("正在获取后缀,请重新上传");
+        this.getUser();
+        return;
+      }
       let _this = this;
       // 通过DOM取文件数据
       var rABS = false; //是否将文件读取为二进制字符串
@@ -523,6 +529,13 @@ export default {
         this.$message.error("请选择所属班级");
         return;
       }
+
+      if (this.userSuffix == "") {
+        this.$message.error("正在获取后缀,请重新添加");
+        this.getUser();
+        return;
+      }
+
       let mail = "";
       if (
         this.org != "" &&
@@ -691,13 +704,16 @@ export default {
       let params = {
         userid: this.userid,
       };
+      this.userSuffixloading = true;
       this.ajax
         .get(this.$store.state.api + "selectUser", params)
         .then((res) => {
           this.userSuffix = res.data[0][0].accountNumber.split("@")[1];
+          this.userSuffixloading = false;
         })
         .catch((err) => {
           console.error(err);
+          this.userSuffixloading = false;
         });
     },
   },

+ 6 - 6
src/components/pages/studentManageNew/component/table.vue

@@ -153,7 +153,7 @@
         </div>
         <div
           @click="addStudent"
-          v-if="boxType == 1 && interestType == 1"
+          v-if="boxType == 1 && interestType == 1 && activeinfo.createuserid == userid"
           class="action_btn"
         >
           <i class="el-icon-plus"></i>
@@ -175,7 +175,7 @@
       >
         <el-table-column
           type="selection"
-          v-if="boxType == 0"
+          v-if="boxType == 0 || (boxType == 1 && interestType == 1)"
           width="55px"
         >
         </el-table-column>
@@ -259,7 +259,7 @@
                       删除
                     </div>
                   </template>
-                  <template v-if="boxType == 1 && interestType == 0">
+                  <template v-if="boxType == 1 && interestType == 0 && scope.row.createuserid == userid">
                     <!-- <div @click="viewStudent(scope.row)">查看</div> -->
                     <div @click="editInterestCla(scope.row)">编辑</div>
                     <div @click="deleteCla(scope.row.id,0,scope.row.createuserid)">删除</div>
@@ -300,7 +300,7 @@
           selectedData.length
         "
       >
-        <div class="page_box_area">
+        <div class="page_box_area" v-if="boxType == 0">
           <div style="display: flex; align-items: center; gap: 10px">
             <!-- <el-checkbox
               @change="handleCheckedAllSelection"
@@ -536,7 +536,7 @@ export default {
       oid: this.$route.query.oid,
       role: this.$route.query.role,
       activeId: "", // 当前选中的班级id
-
+      activeinfo: {}, // 当前选中的班级信息
       eidl:require('../../../../assets/stuImg/eidl.svg'),
       eidh:require('../../../../assets/stuImg/eidh.svg'),
 
@@ -1202,7 +1202,7 @@ export default {
       // console.log('111');
       console.log(row, column, event);
 
-      if (row.createuserid != this.userid) return
+      // if (row.createuserid != this.userid) return
       
       if (this.boxType == 1 && this.interestType == 0) {
         this.interestType = 1;