Browse Source

Merge branch 'beta' into HK

lsc 2 years ago
parent
commit
aea165ccea

+ 4 - 0
dist/index.html

@@ -25,7 +25,11 @@
       height: 100%;
       height: 100%;
       width: 100%;
       width: 100%;
       background: #e6eaf0;
       background: #e6eaf0;
+<<<<<<< HEAD
     }</style><link href=./static/css/app.eaf2eb2119d9f9ebee1debe766014fc1.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.f583576dfec9dfc9a295.js></script><script type=text/javascript src=./static/js/vendor.47326b7cf726c651fd28.js></script><script type=text/javascript src=./static/js/app.464e2055dcd94525bcf8.js></script></body></html><script>function stopSafari() {
     }</style><link href=./static/css/app.eaf2eb2119d9f9ebee1debe766014fc1.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.f583576dfec9dfc9a295.js></script><script type=text/javascript src=./static/js/vendor.47326b7cf726c651fd28.js></script><script type=text/javascript src=./static/js/app.464e2055dcd94525bcf8.js></script></body></html><script>function stopSafari() {
+=======
+    }</style><link href=./static/css/app.c764478e04636122660c437d64e22827.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.f1661c5ebfd33221b88f.js></script><script type=text/javascript src=./static/js/app.74e42c5345eddca1fec4.js></script></body></html><script>function stopSafari() {
+>>>>>>> beta
     //阻止safari浏览器双击放大功能
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.c764478e04636122660c437d64e22827.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.c764478e04636122660c437d64e22827.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.464e2055dcd94525bcf8.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.74e42c5345eddca1fec4.js


File diff suppressed because it is too large
+ 1 - 0
dist/static/js/app.74e42c5345eddca1fec4.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.f583576dfec9dfc9a295.js.map


BIN
src/assets/icon/new/ai.png


BIN
src/assets/icon/new/icon-show.png


BIN
src/assets/icon/new/icon-slide.png


BIN
src/assets/icon/new/icon-slide2.png


+ 0 - 0
src/components/json.json


File diff suppressed because it is too large
+ 169 - 165
src/components/json2.json


+ 107 - 27
src/components/pages/addCourse.vue

@@ -138,6 +138,9 @@
                     </div>
                     </div>
                   </div>
                   </div>
                   <div class="right_first">
                   <div class="right_first">
+                    <div class="ai_box">
+                      <div class="ai_content" @click="openAI"><img src="../../assets/icon/new/ai.png"/><span>AI共创</span></div>
+                    </div>
                     <div>
                     <div>
                       <div class="uploadFm" @click="choosePicVisible = true" v-if="cover.length == 0">
                       <div class="uploadFm" @click="choosePicVisible = true" v-if="cover.length == 0">
                         <img src="../../assets/icon/addPoster.png" alt="" />
                         <img src="../../assets/icon/addPoster.png" alt="" />
@@ -160,6 +163,7 @@
                   <button class="c_pub_button_add pub_btn_add_img" @click="
                   <button class="c_pub_button_add pub_btn_add_img" @click="
                     (dialogVisibleClass = true),
                     (dialogVisibleClass = true),
                     (classSearch = ''),
                     (classSearch = ''),
+                    (gradeId = ''),
                     getClass()
                     getClass()
                     ">添加班级</button>
                     ">添加班级</button>
                   <div v-if="checkboxList2.length" class="wb_j_box_p_box">
                   <div v-if="checkboxList2.length" class="wb_j_box_p_box">
@@ -412,9 +416,9 @@
                 </div>
                 </div>
               </div>
               </div>
               <div class="rb_c_box_right">
               <div class="rb_c_box_right">
-                <div class="rb_c_box_btn">
+                <!-- <div class="rb_c_box_btn">
                   <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
                   <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3">智能粘贴</button>
-                </div>
+                </div> -->
                 <div class="basic_box">
                 <div class="basic_box">
                   <div style="
                   <div style="
                   display: flex;
                   display: flex;
@@ -448,6 +452,7 @@
                       ">
                       ">
                       <img src="../../assets/icon/new/addStage.png" alt />
                       <img src="../../assets/icon/new/addStage.png" alt />
                     </div>
                     </div>
+                    <button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask" v-if="steps == 3" style="margin: 0 0 0 auto;">智能粘贴</button>
                   </div>
                   </div>
 
 
                   <div style="margin: 0 0 40px 0; padding: 0 20px 0 20px"
                   <div style="margin: 0 0 40px 0; padding: 0 20px 0 20px"
@@ -474,6 +479,7 @@
                   添加任务
                   添加任务
                 </div> -->
                 </div> -->
                     <div class="taskBorder" :style="{ minHeight: unitJson[unitIndex].easy && 'unset' }"
                     <div class="taskBorder" :style="{ minHeight: unitJson[unitIndex].easy && 'unset' }"
+                      :class="{smallTaskBorder:itemTask.isFold === 1}"
                       v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
                       v-for="(itemTask, itemTaskIndex) in item.taskJson" :key="itemTaskIndex">
                       <div v-if="unitJson[unitIndex].easy != 1">
                       <div v-if="unitJson[unitIndex].easy != 1">
                         <div :style="{
                         <div :style="{
@@ -499,13 +505,15 @@
                                   itemTaskIndex
                                   itemTaskIndex
                                 ].task
                                 ].task
                                   " />
                                   " />
+                                  <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2" class="show_taskD show" @click="fold2(itemTaskIndex)"><img src="../../assets/icon/new/icon-slide.png" />收起任务描述</div>
+                                <div v-else-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" class="show_taskD" @click="fold2(itemTaskIndex)"><img src="../../assets/icon/new/icon-slide.png" />展开任务描述</div>
                             </div>
                             </div>
                             <div class="remove" v-if="item.taskJson.length > 1 &&
                             <div class="remove" v-if="item.taskJson.length > 1 &&
                               (!unitJson[unitIndex].easy ||
                               (!unitJson[unitIndex].easy ||
                                 unitJson[unitIndex].easy == 6)
                                 unitJson[unitIndex].easy == 6)
                               " @click="deleteTask(itemTaskIndex)" style="margin-right: 10px;"></div>
                               " @click="deleteTask(itemTaskIndex)" style="margin-right: 10px;"></div>
                           </div>
                           </div>
-                          <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1" style="
+                          <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2" style="
                           display: flex;
                           display: flex;
                           margin: 20px 0;
                           margin: 20px 0;
                           flex-direction: row;
                           flex-direction: row;
@@ -515,7 +523,7 @@
                             <div class="lineTitle">任务描述</div>
                             <div class="lineTitle">任务描述</div>
                             <!-- <div class="line"></div> -->
                             <!-- <div class="line"></div> -->
                           </div>
                           </div>
-                          <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1">
+                          <div v-if="easyArray.indexOf(unitJson[unitIndex].easy) == -1 && !itemTask.isFold2">
                             <editor-bar style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
                             <editor-bar style="margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
                               itemTaskIndex
                               itemTaskIndex
                             ].taskDetail
                             ].taskDetail
@@ -2151,6 +2159,10 @@
         <div class="people_top">
         <div class="people_top">
           <div class="people_top_right">
           <div class="people_top_right">
             <div class="people_search">
             <div class="people_search">
+              <el-select v-model="gradeId" placeholder="请选择年级" class="student_input" clearable @change="getClass()">
+                <el-option label="全部" value=""></el-option>
+                <el-option v-for="(item, index) in gradeList" :key="index" :label="item.name" :value="item.id"></el-option>
+              </el-select>
               <el-input placeholder="搜索班级名称" v-model="classSearch" @input="getClass()"></el-input>
               <el-input placeholder="搜索班级名称" v-model="classSearch" @input="getClass()"></el-input>
               <!-- @click="getClass()" 
               <!-- @click="getClass()" 
                 @keyup.enter.native="getClass()"
                 @keyup.enter.native="getClass()"
@@ -2162,7 +2174,7 @@
           </div>
           </div>
           <div class="people_nav">选择班级</div>
           <div class="people_nav">选择班级</div>
         </div>
         </div>
-        <el-checkbox-group v-model="checkboxList2" class="people_name people_name2" @change="InviteChange">
+        <el-checkbox-group v-model="checkboxList2" class="people_name people_name2" @change="InviteChange" v-if="grade2.length" >
           <div v-for="item in grade2" :key="item.id" class="p_box">
           <div v-for="item in grade2" :key="item.id" class="p_box">
             <el-checkbox :label="item.id">
             <el-checkbox :label="item.id">
               {{ item.name }}
               {{ item.name }}
@@ -2174,6 +2186,7 @@
             <img src="../../assets/icon/rightInvite.png" class="inviteImg" v-if="isInvite(item.id)" /> -->
             <img src="../../assets/icon/rightInvite.png" class="inviteImg" v-if="isInvite(item.id)" /> -->
           </div>
           </div>
         </el-checkbox-group>
         </el-checkbox-group>
+        <div v-if="!grade2.length" style="padding:20px 10px">暂无数据</div>
       </div>
       </div>
       <span slot="footer" class="dialog-footer">
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisibleClass = false">取 消</el-button>
         <el-button @click="dialogVisibleClass = false">取 消</el-button>
@@ -3043,7 +3056,7 @@ export default {
       lineType: 0,
       lineType: 0,
       chapCount: 0,
       chapCount: 0,
       courseName: "",
       courseName: "",
-      isTeacherSee: true,
+      isTeacherSee: false,
       courseText: "",
       courseText: "",
       preTime: 0,
       preTime: 0,
       formLabelWidth: "100px",
       formLabelWidth: "100px",
@@ -3092,6 +3105,7 @@ export default {
       dialogVisiblePreTime: false,
       dialogVisiblePreTime: false,
       uploadJson: [],
       uploadJson: [],
       classJuri: [],
       classJuri: [],
+      gradeList: [],
       cover: [], //课程封面
       cover: [], //课程封面
       myWord: [],
       myWord: [],
       evaJuri: [],
       evaJuri: [],
@@ -3172,6 +3186,7 @@ export default {
       checkboxList2: [],
       checkboxList2: [],
       checkboxList3: [],
       checkboxList3: [],
       classSearch: "",
       classSearch: "",
+      gradeId:"",
       number: "",
       number: "",
       tTitle: "",
       tTitle: "",
       tdetail: "",
       tdetail: "",
@@ -3386,6 +3401,9 @@ export default {
     },
     },
   },
   },
   methods: {
   methods: {
+    openAI(){
+      window.parent.postMessage({ tools: "64" }, "*");
+    },
     setMan() {
     setMan() {
       // let teacherJuri = this.teacherJuri2;
       // let teacherJuri = this.teacherJuri2;
       this.ManAarray = [];
       this.ManAarray = [];
@@ -3515,7 +3533,7 @@ export default {
     },
     },
     navSteps(s) {
     navSteps(s) {
       if (this.courseName == "") {
       if (this.courseName == "") {
-        this.$message.error("请将信息填写完整");
+        this.$message.error("请补充填写课程名称");
         return;
         return;
       }
       }
       if (this.cidType == 0) {
       if (this.cidType == 0) {
@@ -3594,13 +3612,13 @@ export default {
               }
               }
             }
             }
           } else {
           } else {
-            this.$message.error("请将信息填写完整");
+            this.$message.error("请补充填写课程名称");
             return;
             return;
           }
           }
         } else if (this.steps == 3) {
         } else if (this.steps == 3) {
           if (this.cid == "" || this.cid == undefined) {
           if (this.cid == "" || this.cid == undefined) {
             if (this.courseName == "") {
             if (this.courseName == "") {
-              this.$message.error("请将信息填写完整");
+              this.$message.error("请补充填写课程名称");
               return;
               return;
             } else {
             } else {
               this.addWork();
               this.addWork();
@@ -3608,7 +3626,7 @@ export default {
             }
             }
           } else {
           } else {
             if (this.courseName == "") {
             if (this.courseName == "") {
-              this.$message.error("请将信息填写完整");
+              this.$message.error("请补充填写课程名称");
               return;
               return;
             } else {
             } else {
               if (this.userid != this.courseUserid && this.role != "1") {
               if (this.userid != this.courseUserid && this.role != "1") {
@@ -3634,7 +3652,7 @@ export default {
             }
             }
             this.steps++;
             this.steps++;
           } else {
           } else {
-            this.$message.error("请将信息填写完整");
+            this.$message.error("请补充填写课程名称");
             return;
             return;
           }
           }
         } else if (this.steps == 2) {
         } else if (this.steps == 2) {
@@ -3649,7 +3667,7 @@ export default {
         } else if (this.steps == 3) {
         } else if (this.steps == 3) {
           if (this.cid == "" || this.cid == undefined) {
           if (this.cid == "" || this.cid == undefined) {
             if (this.courseName == "") {
             if (this.courseName == "") {
-              this.$message.error("请将信息填写完整");
+              this.$message.error("请补充填写课程名称");
               return;
               return;
             } else {
             } else {
               this.addWork();
               this.addWork();
@@ -3657,7 +3675,7 @@ export default {
             }
             }
           } else {
           } else {
             if (this.courseName == "") {
             if (this.courseName == "") {
-              this.$message.error("请将信息填写完整");
+              this.$message.error("请补充填写课程名称");
               return;
               return;
             } else {
             } else {
               if (this.userid != this.courseUserid && this.role != "1") {
               if (this.userid != this.courseUserid && this.role != "1") {
@@ -4721,18 +4739,19 @@ export default {
       el.getElementsByTagName("input")[0].click();
       el.getElementsByTagName("input")[0].click();
     },
     },
     fold(i, e) {
     fold(i, e) {
-      var a = e.currentTarget.parentElement.parentElement;
-      var b = e.currentTarget.parentElement;
       if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0) {
       if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold == 0) {
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 1;
-        a.className += " smallTaskBorder";
-        b.className += " funBlockTop";
       } else {
       } else {
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
-        a.className = "taskBorder";
-        b.className = "funBlock";
       }
       }
-      console.log(e);
+    },
+    fold2(i) {
+      if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = false;
+      } else {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
+      }
+      this.$forceUpdate();
     },
     },
     deleteHomeworkBox(unitIndex, index, i) {
     deleteHomeworkBox(unitIndex, index, i) {
       this.unitJson[unitIndex].chapterInfo[index].taskJson[
       this.unitJson[unitIndex].chapterInfo[index].taskJson[
@@ -4789,14 +4808,29 @@ export default {
     searchStudent() {
     searchStudent() {
       this.getStudent();
       this.getStudent();
     },
     },
+    selectGrage() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectGrageBySchool", params)
+        .then((res) => {
+          this.gradeList = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
     //获取班级列表
     //获取班级列表
     getClass() {
     getClass() {
       let params = {
       let params = {
         oid: this.oid,
         oid: this.oid,
+        gid: this.gradeId,
         cn: this.classSearch,
         cn: this.classSearch,
       };
       };
       this.ajax
       this.ajax
-        .get(this.$store.state.api + "selectClassBySchoolSearch", params)
+        .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
         .then((res) => {
         .then((res) => {
           if (!this.grade.length) {
           if (!this.grade.length) {
             this.grade = res.data[0];
             this.grade = res.data[0];
@@ -7655,6 +7689,7 @@ export default {
     this.getStudent();
     this.getStudent();
     this.getTeacher();
     this.getTeacher();
     this.getClass();
     this.getClass();
+    this.selectGrage();
     this.getTemplate();
     this.getTemplate();
     // this.selectType();
     // this.selectType();
     this.selectEva();
     this.selectEva();
@@ -7993,6 +8028,7 @@ export default {
   overflow: auto;
   overflow: auto;
   position: relative;
   position: relative;
   height: 40px;
   height: 40px;
+  max-width: calc(100% - 175px);
 }
 }
 
 
 .cru_selectBox::-webkit-scrollbar {
 .cru_selectBox::-webkit-scrollbar {
@@ -8074,8 +8110,27 @@ export default {
 
 
 .chapter_contentbox .cc_input {
 .chapter_contentbox .cc_input {
   width: 100%;
   width: 100%;
+  display:flex;
+}
+
+.show_taskD{
+  min-width:fit-content;
+  margin-left: 10px;
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  cursor: pointer;
+  color: #717C8D;
 }
 }
 
 
+.show_taskD > img{
+  width:15px;
+  margin-right:5px;
+}
+
+.show_taskD.show > img{
+  transform: rotate(180deg);
+}
 .remove {
 .remove {
   background-image: url("../../assets/icon/new/delete_u.png");
   background-image: url("../../assets/icon/new/delete_u.png");
   cursor: pointer;
   cursor: pointer;
@@ -8225,7 +8280,7 @@ export default {
   box-sizing: border-box;
   box-sizing: border-box;
   position: relative;
   position: relative;
   padding: 20px 15px;
   padding: 20px 15px;
-  height: 200px;
+  height: auto;
   overflow-y: auto;
   overflow-y: auto;
   overflow-x: hidden;
   overflow-x: hidden;
 }
 }
@@ -8323,7 +8378,7 @@ export default {
   flex-direction: column;
   flex-direction: column;
   flex-wrap: nowrap;
   flex-wrap: nowrap;
   width: calc(100% - 400px);
   width: calc(100% - 400px);
-  padding: 0 100px 0 0;
+  padding: 0 0 0 0;
   box-sizing: border-box;
   box-sizing: border-box;
 }
 }
 
 
@@ -8335,6 +8390,30 @@ export default {
   border-left: 1px solid #E0E2ED;
   border-left: 1px solid #E0E2ED;
   box-sizing: border-box;
   box-sizing: border-box;
   padding-bottom:20px;
   padding-bottom:20px;
+  flex-direction: column;
+}
+
+.ai_box{
+  width: 204px;
+    display: flex;
+    justify-content: flex-end;
+    margin-bottom: 15px;
+}
+.ai_content{
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  padding: 7px 20px;
+  box-sizing: border-box;
+  box-shadow: 0px 0px 12px 1px rgba(0,0,0,0.16);
+  border-radius: 12px;
+  font-weight: 700;
+  cursor: pointer;
+}
+
+.ai_content>img{
+  width: 40px;
+  margin-right: 5px;
 }
 }
 
 
 .c_info_title {
 .c_info_title {
@@ -8369,7 +8448,7 @@ export default {
   /* justify-content: space-between; */
   /* justify-content: space-between; */
   /* align-items: center; */
   /* align-items: center; */
   flex-direction: column;
   flex-direction: column;
-  padding: 10px 25px 0;
+  padding: 10px 10px 0;
   box-sizing: border-box;
   box-sizing: border-box;
 }
 }
 
 
@@ -8410,7 +8489,7 @@ export default {
 .people_name {
 .people_name {
   display: flex;
   display: flex;
   justify-content: flex-start;
   justify-content: flex-start;
-  padding: 20px 0 0 25px;
+  padding: 20px 10px;
   flex-direction: column;
   flex-direction: column;
   flex-wrap: wrap;
   flex-wrap: wrap;
 }
 }
@@ -9239,6 +9318,7 @@ ol {
   display: flex;
   display: flex;
   flex-direction: row;
   flex-direction: row;
   align-items: center;
   align-items: center;
+  margin-right:10px;
 }
 }
 
 
 .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
 .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
@@ -10009,7 +10089,7 @@ ol {
 .uploadFm {
 .uploadFm {
   border: 1px dashed #ccc;
   border: 1px dashed #ccc;
   width: 202px;
   width: 202px;
-  height: 102px;
+  height: 130px;
   position: relative;
   position: relative;
   cursor: pointer;
   cursor: pointer;
   display: flex;
   display: flex;
@@ -10713,7 +10793,7 @@ ol {
 .rb_c_box_right>.basic_box {
 .rb_c_box_right>.basic_box {
   background: #F0F4FA;
   background: #F0F4FA;
   border-radius: 8px;
   border-radius: 8px;
-  height: calc(100% - 50px);
+  height: calc(100% - 0px);
   overflow: auto;
   overflow: auto;
 }
 }
 </style>
 </style>

+ 87 - 6
src/components/pages/class.vue

@@ -27,13 +27,19 @@
         <el-table v-if="ctype == 1" ref="table" :key="1" :data="tableData" border :height="tableHeight" :fit="true"
         <el-table v-if="ctype == 1" ref="table" :key="1" :data="tableData" border :height="tableHeight" :fit="true"
           v-loading="isLoading" style="width: 100%; height: 60%" :header-cell-style="{ background: '#f1f1f1' }"
           v-loading="isLoading" style="width: 100%; height: 60%" :header-cell-style="{ background: '#f1f1f1' }"
           :row-class-name="tableRowClassName">
           :row-class-name="tableRowClassName">
-          <el-table-column prop="name" label="班级名称" min-width="40%" align="center">
+          <el-table-column prop="name" label="班级名称" align="center">
           </el-table-column>
           </el-table-column>
-          <el-table-column prop="pnum" label="人数" min-width="40%" align="center">
+          <el-table-column label="所属年级" align="center">
+            <template slot-scope="{row}">
+              {{ getGrade(row.pid) }}
+            </template>
+          </el-table-column>
+          <el-table-column prop="pnum" label="人数" align="center">
           </el-table-column>
           </el-table-column>
-          <el-table-column label="操作" min-width="20%">
+          <el-table-column label="操作" width="400px">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <el-button type="primary" size="small" @click="getStudent(scope.row.id)">查看学生</el-button>
               <el-button type="primary" size="small" @click="getStudent(scope.row.id)">查看学生</el-button>
+              <el-button type="primary" size="small" @click="updateG(scope.row.pid, scope.row.id)">修改年级</el-button>
               <el-button type="primary" size="small" @click="openUpdate(scope.row.id, scope.row.name)">修改</el-button>
               <el-button type="primary" size="small" @click="openUpdate(scope.row.id, scope.row.name)">修改</el-button>
               <el-button type="primary" size="small" @click="deleteClass(scope.row.id)">删除</el-button>
               <el-button type="primary" size="small" @click="deleteClass(scope.row.id)">删除</el-button>
             </template>
             </template>
@@ -82,11 +88,10 @@
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div class="userImg">
               <div class="userImg">
                 <div class="tx">
                 <div class="tx">
-                  <img :src="
-                    scope.row.headportrait != null
+                  <img :src="scope.row.headportrait != null
                       ? scope.row.headportrait
                       ? scope.row.headportrait
                       : tx
                       : tx
-                  " alt />
+                    " alt />
                 </div>
                 </div>
                 <div style="
                 <div style="
                           width: 150px;
                           width: 150px;
@@ -230,6 +235,20 @@
         <el-button type="primary" @click="insertClass">确 定</el-button>
         <el-button type="primary" @click="insertClass">确 定</el-button>
       </span>
       </span>
     </el-dialog>
     </el-dialog>
+    <el-dialog title="修改年级" :visible.sync="dialogVisibleGrade" :append-to-body="true" width="25%"
+      :before-close="handleClose" class="dialog_diy">
+      <el-form>
+        <el-form-item label="选择年级" :label-width="formLabelWidth">
+          <el-select v-model="gid" placeholder="请选择班级" class="student_input" style="margin:0 10px" clearable>
+            <el-option v-for="(item, index) in grade" :key="index" :label="item.name" :value="item.id"></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisibleGrade = false">取 消</el-button>
+        <el-button type="primary" @click="updateGrade">确 定</el-button>
+      </span>
+    </el-dialog>
     <el-dialog title="修改班级" :visible.sync="dialogVisible1" :append-to-body="true" width="25%" :before-close="handleClose"
     <el-dialog title="修改班级" :visible.sync="dialogVisible1" :append-to-body="true" width="25%" :before-close="handleClose"
       class="dialog_diy">
       class="dialog_diy">
       <el-form>
       <el-form>
@@ -337,14 +356,31 @@ export default {
       page3: 1,
       page3: 1,
       isLoading2: false,
       isLoading2: false,
       searchTN: "",
       searchTN: "",
+      grade: [],
+      gid: "",
+      dialogVisibleGrade: false
     };
     };
   },
   },
   created() {
   created() {
     this.page = 1;
     this.page = 1;
     this.getClass();
     this.getClass();
     this.getClass2();
     this.getClass2();
+    this.selectGrage()
     this.getSchoolName();
     this.getSchoolName();
   },
   },
+  computed: {
+    getGrade() {
+      return function (gid) {
+        let name = ''
+        this.grade.forEach(element => {
+          if (element.id == gid) {
+            name = element.name
+          }
+        });
+        return name ? name : '暂无'
+      }
+    }
+  },
   mounted() {
   mounted() {
     this.$nextTick(function () {
     this.$nextTick(function () {
       this.tableHeight =
       this.tableHeight =
@@ -364,6 +400,21 @@ export default {
     });
     });
   },
   },
   methods: {
   methods: {
+    //获取班级列表
+    selectGrage() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectGrageBySchool", params)
+        .then((res) => {
+          this.grade = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
     tableRowClassName({ row, rowIndex }) {
     tableRowClassName({ row, rowIndex }) {
       if ((rowIndex + 1) % 2 === 0) {
       if ((rowIndex + 1) % 2 === 0) {
         return "even_row";
         return "even_row";
@@ -396,6 +447,36 @@ export default {
       this.page = 1;
       this.page = 1;
       this.getClass();
       this.getClass();
     },
     },
+    updateG(gid, id) {
+      this.gid = gid;
+      this.classid = id;
+      this.dialogVisibleGrade = true;
+    },
+    updateGrade() {
+      this.$confirm("确定修改吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let params = [{
+            cid: this.gid,
+            student: JSON.stringify([this.classid])
+          }];
+          this.ajax
+            .post(this.$store.state.api + "addGradeClass", params)
+            .then((res) => {
+              this.gid = '';
+              this.classid = '';
+              this.dialogVisibleGrade = false
+              this.getClass();
+            })
+            .catch((err) => {
+              console.error(err);
+            });
+        })
+        .catch(() => { });
+    },
     openUpdate(id, n) {
     openUpdate(id, n) {
       this.classid = id;
       this.classid = id;
       this.className1 = n;
       this.className1 = n;

File diff suppressed because it is too large
+ 277 - 373
src/components/pages/course.vue


+ 39 - 2
src/components/pages/data.vue

@@ -12,7 +12,10 @@
       margin: 0;
       margin: 0;
     "
     "
   >
   >
-    <div class="pb_content_body" style="position: relative; width: 100%">
+    <div
+      class="pb_content_body"
+      style="position: relative; width: 100%; height: 100%"
+    >
       <div style="width: 100%; margin: 0px auto">
       <div style="width: 100%; margin: 0px auto">
         <div class="formTop">
         <div class="formTop">
           <div class="tx">
           <div class="tx">
@@ -56,6 +59,9 @@
               <el-radio label="女"></el-radio>
               <el-radio label="女"></el-radio>
             </el-radio-group>
             </el-radio-group>
           </el-form-item>
           </el-form-item>
+          <el-form-item label="教研室" v-if="ruleForm.type == '老师'">
+            <div>{{ ccName ? ccName : '暂无' }}</div>
+          </el-form-item>
           <el-form-item label="姓名" prop="name">
           <el-form-item label="姓名" prop="name">
             <el-input
             <el-input
               v-model="ruleForm.name"
               v-model="ruleForm.name"
@@ -230,6 +236,7 @@ export default {
         org: "",
         org: "",
         headportrait: "",
         headportrait: "",
       },
       },
+      ccName:"",
       opassword: "",
       opassword: "",
       password: "",
       password: "",
       password1: "",
       password1: "",
@@ -349,7 +356,13 @@ export default {
             this.ruleForm.org = res.data[0][0].org
             this.ruleForm.org = res.data[0][0].org
               ? res.data[0][0].org.split(",")[0]
               ? res.data[0][0].org.split(",")[0]
               : "";
               : "";
-            this.ruleForm.type = res.data[0][0].type == 1 ? "老师" : res.data[0][0].type == 2 ? "学生" : "管理员";
+            this.ruleForm.type =
+              res.data[0][0].type == 1
+                ? "老师"
+                : res.data[0][0].type == 2
+                ? "学生"
+                : "管理员";
+            this.getCcName(res.data[0][0].organizeid);
             console.log(res.data[0][0]);
             console.log(res.data[0][0]);
           }
           }
         })
         })
@@ -357,6 +370,30 @@ export default {
           console.error(err);
           console.error(err);
         });
         });
     },
     },
+    getCcName(oid) {
+      let params = { oid: oid };
+      this.ajax
+        .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
+        .then((res) => {
+          var cBox = res.data[0];
+          var str = this.ruleForm.cclassid;
+          var arr = str.split(",");
+          for (var k = 0; k < cBox.length; k++) {
+            for (var i = 0; i < arr.length; i++) {
+              if (cBox[k].id == arr[i]) {
+                if (this.ccName == "") {
+                  this.ccName = cBox[k].name;
+                } else {
+                  this.ccName += "," + cBox[k].name;
+                }
+              }
+            }
+          }
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
     updatePassword() {
     updatePassword() {
       if (this.password.length < 6) {
       if (this.password.length < 6) {
         this.$message.error("密码长度不少于6位");
         this.$message.error("密码长度不少于6位");

+ 138 - 40
src/components/pages/easy/addCourse.vue

@@ -81,6 +81,9 @@
                     </div>
                     </div>
                   </div>
                   </div>
                   <div class="right_first">
                   <div class="right_first">
+                    <div class="ai_box">
+                      <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
+                    </div>
                     <div>
                     <div>
                       <div class="uploadFm" @click="choosePicVisible = true" v-if="cover.length == 0">
                       <div class="uploadFm" @click="choosePicVisible = true" v-if="cover.length == 0">
                         <img src="../../../assets/icon/addPoster.png" alt="" />
                         <img src="../../../assets/icon/addPoster.png" alt="" />
@@ -103,6 +106,7 @@
                   <button class="c_pub_button_add pub_btn_add_img" @click="
                   <button class="c_pub_button_add pub_btn_add_img" @click="
                     (dialogVisibleClass = true),
                     (dialogVisibleClass = true),
                     (classSearch = ''),
                     (classSearch = ''),
+                    (gradeId = ''),
                     getClass()
                     getClass()
                     ">添加班级</button>
                     ">添加班级</button>
                   <div v-if="checkboxList2.length" class="wb_j_box_p_box">
                   <div v-if="checkboxList2.length" class="wb_j_box_p_box">
@@ -116,12 +120,7 @@
               <div class="right_title">课程简要描述</div>
               <div class="right_title">课程简要描述</div>
               <div style="width: 95%; padding: 15px 0px 15px 20px">
               <div style="width: 95%; padding: 15px 0px 15px 20px">
                 <div style="width: 55%">
                 <div style="width: 55%">
-                  <textarea rows="8" class="binfo_input" cols v-model="courseText" :placeholder="'1、课程内容说明' +
-                    '\n' +
-                    '2、课程学习知识目标' +
-                    '\n' +
-                    '3、课程学习技能目标'
-                    "></textarea>
+                  <textarea rows="8" class="binfo_input" cols v-model="courseText"></textarea>
                 </div>
                 </div>
               </div>
               </div>
             </div>
             </div>
@@ -384,12 +383,14 @@
                                     itemTaskIndex
                                     itemTaskIndex
                                   ].task
                                   ].task
                                   " />
                                   " />
+                                <div v-if="!itemTask.isFold2" class="show_taskD show" @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
+                                <div v-else class="show_taskD" @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述</div>
                             </div>
                             </div>
                             <div class="remove" v-if="item.taskJson.length > 1" @click="deleteTask(itemTaskIndex)"></div>
                             <div class="remove" v-if="item.taskJson.length > 1" @click="deleteTask(itemTaskIndex)"></div>
                           </div>
                           </div>
                         </div>
                         </div>
                       </div>
                       </div>
-                      <div style="margin: 25px 0">
+                      <div style="margin: 25px 0" v-if="!itemTask.isFold2">
                         <!-- <editor-bar style="width: 90% !important; margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
                         <!-- <editor-bar style="width: 90% !important; margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
                           itemTaskIndex
                           itemTaskIndex
                         ].taskDetail
                         ].taskDetail
@@ -3092,18 +3093,7 @@
             </div>
             </div>
           </div>
           </div>
           <div class="info_btnBox">
           <div class="info_btnBox">
-            <button class="c_pub_button_return pub_btn_return_img" @click="
-              goTo(
-                '/course?userid=' +
-                userid +
-                '&oid=' +
-                oid +
-                '&org=' +
-                org +
-                '&role=' +
-                role
-              )
-              ">
+            <button class="c_pub_button_return pub_btn_return_img" @click="lastSteps">
               返回课程
               返回课程
             </button>
             </button>
             <button class="c_pub_button_confirm pub_btn_finish_img" @click="nextSteps" v-if="this.steps == 1">
             <button class="c_pub_button_confirm pub_btn_finish_img" @click="nextSteps" v-if="this.steps == 1">
@@ -3224,6 +3214,10 @@
         <div class="people_top">
         <div class="people_top">
           <div class="people_top_right">
           <div class="people_top_right">
             <div class="people_search">
             <div class="people_search">
+              <el-select v-model="gradeId" placeholder="请选择年级" class="student_input" clearable @change="getClass()">
+                <el-option label="全部" value=""></el-option>
+                <el-option v-for="(item, index) in gradeList" :key="index" :label="item.name" :value="item.id"></el-option>
+              </el-select>
               <el-input placeholder="搜索班级名称" v-model="classSearch" @input="getClass()"></el-input>
               <el-input placeholder="搜索班级名称" v-model="classSearch" @input="getClass()"></el-input>
               <!-- @click="getClass()" 
               <!-- @click="getClass()" 
                 @keyup.enter.native="getClass()"
                 @keyup.enter.native="getClass()"
@@ -3235,7 +3229,7 @@
           </div>
           </div>
           <div class="people_nav">选择班级</div>
           <div class="people_nav">选择班级</div>
         </div>
         </div>
-        <el-checkbox-group v-model="checkboxList2" class="people_name people_name2" @change="InviteChange">
+        <el-checkbox-group v-model="checkboxList2" class="people_name people_name2" @change="InviteChange" v-if="grade2.length" >
           <div v-for="item in grade2" :key="item.id" class="p_box">
           <div v-for="item in grade2" :key="item.id" class="p_box">
             <el-checkbox :label="item.id">
             <el-checkbox :label="item.id">
               {{ item.name }}
               {{ item.name }}
@@ -3244,9 +3238,10 @@
               邀请码:{{ getInviteCodeC(item.id) }}</div> -->
               邀请码:{{ getInviteCodeC(item.id) }}</div> -->
             <!-- <div class="inviteCode" :class="{ noneInvite: !isInvite(item.id) }" v-if="checkboxList2.indexOf(item.id) != -1"
             <!-- <div class="inviteCode" :class="{ noneInvite: !isInvite(item.id) }" v-if="checkboxList2.indexOf(item.id) != -1"
               @click="OpenInviteD(item.id)">随机码设置</div>
               @click="OpenInviteD(item.id)">随机码设置</div>
-            <img src="../../../assets/icon/rightInvite.png" class="inviteImg" v-if="isInvite(item.id)" /> -->
+            <img src="../../assets/icon/rightInvite.png" class="inviteImg" v-if="isInvite(item.id)" /> -->
           </div>
           </div>
         </el-checkbox-group>
         </el-checkbox-group>
+        <div v-if="!grade2.length" style="padding:20px 10px">暂无数据</div>
       </div>
       </div>
       <span slot="footer" class="dialog-footer">
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisibleClass = false">取 消</el-button>
         <el-button @click="dialogVisibleClass = false">取 消</el-button>
@@ -4116,7 +4111,7 @@ export default {
       lineType: 0,
       lineType: 0,
       chapCount: 0,
       chapCount: 0,
       courseName: "",
       courseName: "",
-      isTeacherSee: true,
+      isTeacherSee: false,
       courseText: "",
       courseText: "",
       preTime: 0,
       preTime: 0,
       formLabelWidth: "100px",
       formLabelWidth: "100px",
@@ -4165,6 +4160,7 @@ export default {
       dialogVisiblePreTime: false,
       dialogVisiblePreTime: false,
       uploadJson: [],
       uploadJson: [],
       classJuri: [],
       classJuri: [],
+      gradeList: [],
       cover: [], //课程封面
       cover: [], //课程封面
       myWord: [],
       myWord: [],
       evaJuri: [],
       evaJuri: [],
@@ -4245,6 +4241,7 @@ export default {
       checkboxList2: [],
       checkboxList2: [],
       checkboxList3: [],
       checkboxList3: [],
       classSearch: "",
       classSearch: "",
+      gradeId:"",
       number: "",
       number: "",
       tTitle: "",
       tTitle: "",
       tdetail: "",
       tdetail: "",
@@ -4459,6 +4456,9 @@ export default {
     },
     },
   },
   },
   methods: {
   methods: {
+    openAI(){
+      window.parent.postMessage({ tools: "64" }, "*");
+    },
     setMan() {
     setMan() {
       // let teacherJuri = this.teacherJuri2;
       // let teacherJuri = this.teacherJuri2;
       this.ManAarray = [];
       this.ManAarray = [];
@@ -4578,28 +4578,57 @@ export default {
       return _guid;
       return _guid;
     },
     },
     lastSteps() {
     lastSteps() {
-      this.goTo(
-        "/course?userid=" +
-        this.userid +
-        "&oid=" +
-        this.oid +
-        "&org=" +
-        this.org +
-        "&role=" +
-        this.role
-      );
+      this
+        .$confirm("是否保存?", "提示", {
+          confirmButtonText: "保存",
+          cancelButtonText: "不保存",
+          type: "warning",
+        })
+        .then(() => {
+          if (this.cid == "" || this.cid == undefined) {
+            if (this.courseName == "") {
+              this.$message.error("请补充填写课程名称");
+              return;
+            } else {
+              this.addWork();
+            }
+          } else {
+            if (this.courseName == "") {
+              this.$message.error("请补充填写课程名称");
+              return;
+            } else {
+              if (this.userid != this.courseUserid && this.role != "1") {
+                this.updateWork2();
+              } else {
+                this.updateWork();
+              }
+            }
+          }
+        })
+        .catch(() => {
+          this.goTo(
+            "/course?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        });
     },
     },
     nextSteps() {
     nextSteps() {
       if (this.cid == "" || this.cid == undefined) {
       if (this.cid == "" || this.cid == undefined) {
         if (this.courseName == "") {
         if (this.courseName == "") {
-          this.$message.error("请将信息填写完整");
+          this.$message.error("请补充填写课程名称");
           return;
           return;
         } else {
         } else {
           this.addWork();
           this.addWork();
         }
         }
       } else {
       } else {
         if (this.courseName == "") {
         if (this.courseName == "") {
-          this.$message.error("请将信息填写完整");
+          this.$message.error("请补充填写课程名称");
           return;
           return;
         } else {
         } else {
           if (this.userid != this.courseUserid && this.role != "1") {
           if (this.userid != this.courseUserid && this.role != "1") {
@@ -5688,6 +5717,14 @@ export default {
       }
       }
       console.log(e);
       console.log(e);
     },
     },
+    fold2(i) {
+      if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = false;
+      } else {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
+      }
+      this.$forceUpdate();
+    },
     deleteHomeworkBox(unitIndex, index, i) {
     deleteHomeworkBox(unitIndex, index, i) {
       this.unitJson[unitIndex].chapterInfo[index].taskJson[
       this.unitJson[unitIndex].chapterInfo[index].taskJson[
         this.taskCount
         this.taskCount
@@ -5743,14 +5780,29 @@ export default {
     searchStudent() {
     searchStudent() {
       this.getStudent();
       this.getStudent();
     },
     },
+    selectGrage() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectGrageBySchool", params)
+        .then((res) => {
+          this.gradeList = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
     //获取班级列表
     //获取班级列表
     getClass() {
     getClass() {
       let params = {
       let params = {
         oid: this.oid,
         oid: this.oid,
+        gid: this.gradeId,
         cn: this.classSearch,
         cn: this.classSearch,
       };
       };
       this.ajax
       this.ajax
-        .get(this.$store.state.api + "selectClassBySchoolSearch", params)
+        .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
         .then((res) => {
         .then((res) => {
           if (!this.grade.length) {
           if (!this.grade.length) {
             this.grade = res.data[0];
             this.grade = res.data[0];
@@ -8629,6 +8681,7 @@ export default {
     this.getStudent();
     this.getStudent();
     this.getTeacher();
     this.getTeacher();
     this.getClass();
     this.getClass();
+    this.selectGrage();
     this.getTemplate();
     this.getTemplate();
     // this.selectType();
     // this.selectType();
     this.selectEva();
     this.selectEva();
@@ -9057,6 +9110,26 @@ export default {
 
 
 .chapter_contentbox .cc_input {
 .chapter_contentbox .cc_input {
   width: 100%;
   width: 100%;
+  display:flex;
+}
+
+.show_taskD{
+  min-width:fit-content;
+  margin-left: 10px;
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  cursor: pointer;
+  color: #717C8D;
+}
+
+.show_taskD > img{
+  width:15px;
+  margin-right:5px;
+}
+
+.show_taskD.show > img{
+  transform: rotate(180deg);
 }
 }
 
 
 .remove {
 .remove {
@@ -9210,7 +9283,7 @@ export default {
   box-sizing: border-box;
   box-sizing: border-box;
   position: relative;
   position: relative;
   padding: 20px 15px;
   padding: 20px 15px;
-  height: 200px;
+  height: auto;
   overflow-y: auto;
   overflow-y: auto;
   overflow-x: hidden;
   overflow-x: hidden;
 }
 }
@@ -9308,7 +9381,7 @@ export default {
   flex-direction: column;
   flex-direction: column;
   flex-wrap: nowrap;
   flex-wrap: nowrap;
   width: calc(100% - 400px);
   width: calc(100% - 400px);
-  padding: 0 100px 0 0;
+  padding: 0 0 0 0;
   box-sizing: border-box;
   box-sizing: border-box;
 }
 }
 
 
@@ -9320,6 +9393,30 @@ export default {
   border-left: 1px solid #E0E2ED;
   border-left: 1px solid #E0E2ED;
   box-sizing: border-box;
   box-sizing: border-box;
   padding-bottom:20px;
   padding-bottom:20px;
+  flex-direction: column;
+}
+
+.ai_box{
+  width: 204px;
+    display: flex;
+    justify-content: flex-end;
+    margin-bottom: 15px;
+}
+.ai_content{
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  padding: 7px 20px;
+  box-sizing: border-box;
+  box-shadow: 0px 0px 12px 1px rgba(0,0,0,0.16);
+  border-radius: 12px;
+  font-weight: 700;
+  cursor: pointer;
+}
+
+.ai_content>img{
+  width: 40px;
+  margin-right: 5px;
 }
 }
 
 
 .right_title {
 .right_title {
@@ -9348,7 +9445,7 @@ export default {
   /* justify-content: space-between; */
   /* justify-content: space-between; */
   /* align-items: center; */
   /* align-items: center; */
   flex-direction: column;
   flex-direction: column;
-  padding: 10px 25px 0;
+  padding: 10px 10px 0;
   box-sizing: border-box;
   box-sizing: border-box;
 }
 }
 
 
@@ -9389,7 +9486,7 @@ export default {
 .people_name {
 .people_name {
   display: flex;
   display: flex;
   justify-content: flex-start;
   justify-content: flex-start;
-  padding: 20px 0 0 25px;
+  padding: 20px 10px;
   flex-direction: column;
   flex-direction: column;
   flex-wrap: wrap;
   flex-wrap: wrap;
 }
 }
@@ -10169,6 +10266,7 @@ ol {
   display: flex;
   display: flex;
   flex-direction: row;
   flex-direction: row;
   align-items: center;
   align-items: center;
+  margin-right:10px;
 }
 }
 
 
 .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
 .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
@@ -10922,7 +11020,7 @@ ol {
 .uploadFm {
 .uploadFm {
   border: 1px dashed #ccc;
   border: 1px dashed #ccc;
   width: 202px;
   width: 202px;
-  height: 102px;
+  height: 130px;
   position: relative;
   position: relative;
   cursor: pointer;
   cursor: pointer;
   display: flex;
   display: flex;

+ 64 - 84
src/components/pages/grade/index.vue

@@ -15,7 +15,7 @@
         <div class="student_head">
         <div class="student_head">
           <div class="student_search">
           <div class="student_search">
             <span>
             <span>
-              <el-input placeholder="请输入级名称" v-model="sClassName" clearable>
+              <el-input placeholder="请输入级名称" v-model="sClassName" clearable>
               </el-input>
               </el-input>
             </span>
             </span>
             <el-button type="primary" @click="searchClass">查询</el-button>
             <el-button type="primary" @click="searchClass">查询</el-button>
@@ -35,7 +35,7 @@
               <template slot-scope="scope">
               <template slot-scope="scope">
                 <el-button type="primary" size="small" @click="getStudent(scope.row.id)">查看班级</el-button>
                 <el-button type="primary" size="small" @click="getStudent(scope.row.id)">查看班级</el-button>
                 <el-button type="primary" size="small" @click="openUpdate(scope.row.id, scope.row.name)">修改</el-button>
                 <el-button type="primary" size="small" @click="openUpdate(scope.row.id, scope.row.name)">修改</el-button>
-                <el-button type="primary" size="small" @click="deleteClass(scope.row.id)">删除</el-button>
+                <el-button type="primary" size="small" @click="deleteGrade(scope.row.id)">删除</el-button>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
           </el-table>
           </el-table>
@@ -53,23 +53,20 @@
                 border-radius: 5px;
                 border-radius: 5px;
               ">
               ">
         <div class="pb_head top">
         <div class="pb_head top">
-          <span>查看班级</span>
+          <span>查看班级-{{getGrade(cid)}} </span>
           <div class="student_button" style="border-radius: 4px;">
           <div class="student_button" style="border-radius: 4px;">
             <el-button type="primary" class="bgColor" @click="ctype = 1, getClass()">返回</el-button>
             <el-button type="primary" class="bgColor" @click="ctype = 1, getClass()">返回</el-button>
           </div>
           </div>
         </div>
         </div>
         <div class="student_head">
         <div class="student_head">
-          <div class="head_left">
-            <el-input v-model="sPhoneUser" class="student_input" placeholder="请输入用户名"></el-input>
-            <el-select disabled v-model="cid" placeholder="请选择班级" class="student_input" @change="searchStudent"
-              style="margin:0 10px">
-              <el-option label="所有人" value=""></el-option>
-              <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
-            </el-select>
+          <div class="student_search">
+            <span>
+              <el-input v-model="sPhoneUser"  placeholder="请输入班级" style="margin:0 10px 0 0"></el-input>
+            </span>
             <el-button class="student_button" @click="searchStudent">查询</el-button>
             <el-button class="student_button" @click="searchStudent">查询</el-button>
           </div>
           </div>
-          <div class="head_right">
-            <el-button @click="addStudent">添加学生</el-button>
+          <div>
+            <el-button @click="addStudent" class="student_button">添加班级</el-button>
           </div>
           </div>
         </div>
         </div>
       </div>
       </div>
@@ -78,43 +75,20 @@
           <el-table v-if="ctype == 2" :key="2" ref="table2" :data="tableData2" border :height="tableHeight" :fit="true"
           <el-table v-if="ctype == 2" :key="2" ref="table2" :data="tableData2" border :height="tableHeight" :fit="true"
             v-loading="isLoading" style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
             v-loading="isLoading" style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
             :row-class-name="tableRowClassName">
             :row-class-name="tableRowClassName">
-            <el-table-column label="姓名" min-width="10" align="center">
+            <el-table-column label="班级" min-width="10" align="center">
               <template slot-scope="scope">
               <template slot-scope="scope">
-                <div class="userImg">
-                  <div class="tx">
-                    <img :src="
-                      scope.row.headportrait != null
-                        ? scope.row.headportrait
-                        : tx
-                    " alt />
-                  </div>
-                  <div style="
-                            width: 150px;
-                            text-align: left;
-                            white-space: nowrap;
-                            overflow: hidden;
-                            text-overflow: ellipsis;
-                          ">
+                <div>
                     {{ scope.row.name }}
                     {{ scope.row.name }}
-                  </div>
                 </div>
                 </div>
               </template>
               </template>
             </el-table-column>
             </el-table-column>
-            <el-table-column label="学生账号" min-width="15" align="center">
-              <template slot-scope="scope">
-                <div>{{ scope.row.un ? scope.row.un : "" }}</div>
-              </template>
-            </el-table-column>
-            <el-table-column prop="classname2" label="班级" min-width="15" align="center">
+            <el-table-column prop="pnum" label="学生数" min-width="15" align="center">
             </el-table-column>
             </el-table-column>
             <el-table-column label="操作" width="250px">
             <el-table-column label="操作" width="250px">
               <template slot-scope="scope">
               <template slot-scope="scope">
                 <div class="btnBox">
                 <div class="btnBox">
                   <el-button class="de_button" type="primary" size="small"
                   <el-button class="de_button" type="primary" size="small"
-                    @click="iniPassword(scope.row.userid)">初始化密码</el-button>
-                  <el-button class="de_button" type="primary" size="small" @click="updateStudentA(scope.row)">修改</el-button>
-                  <el-button class="de_button" type="primary" size="small"
-                    @click="deleteClassStudent(scope.row.userid)">移除</el-button>
+                    @click="deleteClassStudent(scope.row.id)">移除</el-button>
                   <!-- <div class="delete">
                   <!-- <div class="delete">
                     <img src="../../../assets/remove.png" alt @click="deleteStudent(scope.row.userid, scope.row.state)" />
                     <img src="../../../assets/remove.png" alt @click="deleteStudent(scope.row.userid, scope.row.state)" />
                   </div> -->
                   </div> -->
@@ -218,61 +192,55 @@
           <el-button class="right" @click="updateStudent">修改</el-button>
           <el-button class="right" @click="updateStudent">修改</el-button>
         </span>
         </span>
       </el-dialog>
       </el-dialog>
-      <el-dialog title="添加班级" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
+      <el-dialog title="添加年级" :visible.sync="dialogVisible" :append-to-body="true" width="400px" :before-close="handleClose"
         class="dialog_diy">
         class="dialog_diy">
         <el-form>
         <el-form>
-          <el-form-item label="班级名称" :label-width="formLabelWidth">
-            <el-input v-model="className" auto-complete="off" placeholder="请输入级..."></el-input>
+          <el-form-item label="添加年级" :label-width="formLabelWidth">
+            <el-input v-model="className" auto-complete="off" placeholder="请输入级..."></el-input>
           </el-form-item>
           </el-form-item>
         </el-form>
         </el-form>
         <span slot="footer" class="dialog-footer">
         <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false">取 消</el-button>
           <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="insertClass">确 定</el-button>
+          <el-button type="primary" @click="insertGrade">确 定</el-button>
         </span>
         </span>
       </el-dialog>
       </el-dialog>
-      <el-dialog title="修改级" :visible.sync="dialogVisible1" :append-to-body="true" width="25%" :before-close="handleClose"
+      <el-dialog title="修改级" :visible.sync="dialogVisible1" :append-to-body="true" width="25%" :before-close="handleClose"
         class="dialog_diy">
         class="dialog_diy">
         <el-form>
         <el-form>
-          <el-form-item label="级名称" :label-width="formLabelWidth">
-            <el-input v-model="className1" auto-complete="off" placeholder="请输入级..."></el-input>
+          <el-form-item label="级名称" :label-width="formLabelWidth">
+            <el-input v-model="className1" auto-complete="off" placeholder="请输入级..."></el-input>
           </el-form-item>
           </el-form-item>
         </el-form>
         </el-form>
         <span slot="footer" class="dialog-footer">
         <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible1 = false">取 消</el-button>
           <el-button @click="dialogVisible1 = false">取 消</el-button>
-          <el-button type="primary" @click="updateClass">确 定</el-button>
+          <el-button type="primary" @click="updateGrade">确 定</el-button>
         </span>
         </span>
       </el-dialog>
       </el-dialog>
-      <el-dialog title="添加学生" :visible.sync="dialogVisibleMember" :append-to-body="true" width="500px" height="80%"
+      <el-dialog title="选择班级" :visible.sync="dialogVisibleMember" :append-to-body="true" width="500px" height="80%"
         :before-close="handleClose" class="addNewPP">
         :before-close="handleClose" class="addNewPP">
         <div class="people">
         <div class="people">
           <div class="people_top">
           <div class="people_top">
             <div class="people_top_right">
             <div class="people_top_right">
               <div class="people_search">
               <div class="people_search">
-                <el-input placeholder="搜索学生姓名" v-model="searchTN" @keyup.enter.native="getClassStudent"></el-input>
+                <el-input placeholder="搜索班级名称" v-model="searchTN" @keyup.enter.native="getClassStudent"></el-input>
                 <div class="search_img" @click="getClassStudent">
                 <div class="search_img" @click="getClassStudent">
                   <img src="../../../assets/icon/search.png" alt />
                   <img src="../../../assets/icon/search.png" alt />
                 </div>
                 </div>
               </div>
               </div>
             </div>
             </div>
-            <div class="people_nav">选择成员</div>
+            <div class="people_nav">选择班级</div>
           </div>
           </div>
           <div class="t_j_box" style="
           <div class="t_j_box" style="
                     padding: 20px 0 0 25px;
                     padding: 20px 0 0 25px;
                     width: calc(100% - 55px);
                     width: calc(100% - 55px);
                     margin-left: 25px;
                     margin-left: 25px;
                   ">
                   ">
-            <span>姓名</span>
-            <span>账号</span>
+            <span>班级</span>
           </div>
           </div>
           <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length" v-loading="isLoading2">
           <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length" v-loading="isLoading2">
-            <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
+            <el-checkbox v-for="item in teacherJuri" :key="item.id" :label="item.id">
               <div class="t_j_box">
               <div class="t_j_box">
-                <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
-                  <span>{{ item.name ? item.name : "暂无姓名" }}</span>
-                </el-tooltip>
-                <el-tooltip placement="top" :content="item.username">
-                  <span>{{ item.username }}</span>
-                </el-tooltip>
+                  <span>{{ item.name  }}</span>
               </div>
               </div>
             </el-checkbox>
             </el-checkbox>
           </el-checkbox-group>
           </el-checkbox-group>
@@ -345,6 +313,19 @@
       this.getClass2();
       this.getClass2();
       this.getSchoolName();
       this.getSchoolName();
     },
     },
+    computed: {
+      getGrade() {
+        return function (gid) {
+          let name = ''
+          this.classJuri.forEach(element => {
+            if (element.id == gid) {
+              name = element.name
+            }
+          });
+          return name ? name : '暂无'
+        }
+      }
+    },
     mounted() {
     mounted() {
       this.$nextTick(function () {
       this.$nextTick(function () {
         this.tableHeight =
         this.tableHeight =
@@ -401,19 +382,19 @@
         this.className1 = n;
         this.className1 = n;
         this.dialogVisible1 = true;
         this.dialogVisible1 = true;
       },
       },
-      //新增
-      insertClass() {
+      //新增
+      insertGrade() {
         let params = {
         let params = {
           name: this.className,
           name: this.className,
           oid: this.oid,
           oid: this.oid,
           uid: this.userid,
           uid: this.userid,
         };
         };
         this.ajax
         this.ajax
-          .get(this.$store.state.api + "insertClass", params)
+          .get(this.$store.state.api + "insertGrade", params)
           .then((res) => {
           .then((res) => {
             if (res.data[0] && res.data[0][0].classname == 1) {
             if (res.data[0] && res.data[0][0].classname == 1) {
               this.$message({
               this.$message({
-                message: "不能与其他级名称相同!",
+                message: "不能与其他级名称相同!",
                 type: "error",
                 type: "error",
               });
               });
             } else {
             } else {
@@ -435,19 +416,19 @@
             console.error(err);
             console.error(err);
           });
           });
       },
       },
-      //修改
-      updateClass() {
+      //修改
+      updateGrade() {
         let params = {
         let params = {
           id: this.classid,
           id: this.classid,
           n: this.className1,
           n: this.className1,
           oid: this.oid,
           oid: this.oid,
         };
         };
         this.ajax
         this.ajax
-          .get(this.$store.state.api + "updateClass", params)
+          .get(this.$store.state.api + "updateGrade", params)
           .then((res) => {
           .then((res) => {
             if (res.data[0] && res.data[0][0].classname == 1) {
             if (res.data[0] && res.data[0][0].classname == 1) {
               this.$message({
               this.$message({
-                message: "不能与其他级名称相同!",
+                message: "不能与其他级名称相同!",
                 type: "error",
                 type: "error",
               });
               });
             } else {
             } else {
@@ -469,7 +450,7 @@
             console.error(err);
             console.error(err);
           });
           });
       },
       },
-      //获取级列表
+      //获取级列表
       getClass() {
       getClass() {
         this.isLoading = true;
         this.isLoading = true;
         let params = {
         let params = {
@@ -480,7 +461,7 @@
           page: this.page,
           page: this.page,
         };
         };
         this.ajax
         this.ajax
-          .get(this.$store.state.api + "selectClass", params)
+          .get(this.$store.state.api + "selectGrade", params)
           .then((res) => {
           .then((res) => {
             this.isLoading = false;
             this.isLoading = false;
             this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
             this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
@@ -491,20 +472,20 @@
             console.error(err);
             console.error(err);
           });
           });
       },
       },
-      //删除
-      deleteClass(id) {
+      //删除
+      deleteGrade(id) {
         let params = {
         let params = {
           id: id,
           id: id,
         };
         };
         if (this.time()) {
         if (this.time()) {
-          this.$confirm("确定删除此级吗?", "提示", {
+          this.$confirm("确定删除此级吗?", "提示", {
             confirmButtonText: "确定",
             confirmButtonText: "确定",
             cancelButtonText: "取消",
             cancelButtonText: "取消",
             type: "warning",
             type: "warning",
           })
           })
             .then(() => {
             .then(() => {
               this.ajax
               this.ajax
-                .get(this.$store.state.api + "deleteClass", params)
+                .get(this.$store.state.api + "deleteGrade", params)
                 .then((res) => {
                 .then((res) => {
                   this.$message({
                   this.$message({
                     message: "删除成功",
                     message: "删除成功",
@@ -633,7 +614,7 @@
           this.$message.error("学生姓名不能为空");
           this.$message.error("学生姓名不能为空");
           return;
           return;
         } else if (!this.userinfo.classid) {
         } else if (!this.userinfo.classid) {
-          this.$message.error("请为学生选择级");
+          this.$message.error("请为学生选择级");
           return;
           return;
         } else if (
         } else if (
           this.userinfo.phonenumber &&
           this.userinfo.phonenumber &&
@@ -702,14 +683,14 @@
       },
       },
       deleteClassStudent(id) {
       deleteClassStudent(id) {
         let params = [{ uid: id, cid: this.cid }];
         let params = [{ uid: id, cid: this.cid }];
-        this.$confirm("确定移除此学生在本班级吗?", "提示", {
+        this.$confirm("确定在本年级移除此班级吗?", "提示", {
           confirmButtonText: "确定",
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           cancelButtonText: "取消",
           type: "warning",
           type: "warning",
         })
         })
           .then(() => {
           .then(() => {
             this.ajax
             this.ajax
-              .post(this.$store.state.api + "deleteClassStudent", params)
+              .post(this.$store.state.api + "deleteGradeClass", params)
               .then((res) => {
               .then((res) => {
                 this.$message({
                 this.$message({
                   message: "操作成功",
                   message: "操作成功",
@@ -731,7 +712,7 @@
           oid: this.oid,
           oid: this.oid,
         };
         };
         this.ajax
         this.ajax
-          .get(this.$store.state.api + "selectClassBySchool", params)
+          .get(this.$store.state.api + "selectGrageBySchool", params)
           .then((res) => {
           .then((res) => {
             this.isLoading = false;
             this.isLoading = false;
             this.classJuri = res.data[0];
             this.classJuri = res.data[0];
@@ -771,14 +752,13 @@
         this.ctype = 2
         this.ctype = 2
         this.isLoading = true;
         this.isLoading = true;
         let params = {
         let params = {
-          oid: this.oid,
           cid: this.cid,
           cid: this.cid,
-          cu: "",
+          oid: this.oid,
           cn: this.sPhoneUser,
           cn: this.sPhoneUser,
           page: this.page2,
           page: this.page2,
         };
         };
         this.ajax
         this.ajax
-          .get(this.$store.state.api + "selectStudent2", params)
+          .get(this.$store.state.api + "selectClass2", params)
           .then((res) => {
           .then((res) => {
             this.isLoading = false;
             this.isLoading = false;
             this.total2 = res.data[0].length > 0 ? res.data[0][0].num : 0;
             this.total2 = res.data[0].length > 0 ? res.data[0][0].num : 0;
@@ -800,7 +780,7 @@
           num: this.pageSize3,
           num: this.pageSize3,
         };
         };
         this.ajax
         this.ajax
-          .get(this.$store.state.api + "getClassStudent", params)
+          .get(this.$store.state.api + "getGradeClass", params)
           .then((res) => {
           .then((res) => {
             this.isLoading2 = false;
             this.isLoading2 = false;
             this.total3 = res.data[0].length > 0 ? res.data[0][0].num : 0;
             this.total3 = res.data[0].length > 0 ? res.data[0][0].num : 0;
@@ -813,7 +793,7 @@
       },
       },
       addClassStudent() {
       addClassStudent() {
         if (!this.checkboxList3.length) {
         if (!this.checkboxList3.length) {
-          this.$message.error('请选择要添加班级的学生');
+          this.$message.error('请选择要添加班级');
           return;
           return;
         }
         }
         let params = [{
         let params = [{
@@ -821,7 +801,7 @@
           student: JSON.stringify(this.checkboxList3)
           student: JSON.stringify(this.checkboxList3)
         }];
         }];
         this.ajax
         this.ajax
-          .post(this.$store.state.api + "addClassStudent", params)
+          .post(this.$store.state.api + "addGradeClass", params)
           .then((res) => {
           .then((res) => {
             this.checkboxList3 = []
             this.checkboxList3 = []
             this.dialogVisibleMember = false
             this.dialogVisibleMember = false
@@ -1198,7 +1178,7 @@
   }
   }
   
   
   .t_j_box span:nth-child(1) {
   .t_j_box span:nth-child(1) {
-    width: 50%;
+    width: 100%;
     overflow: hidden;
     overflow: hidden;
     margin-right: 10px;
     margin-right: 10px;
     text-overflow: ellipsis;
     text-overflow: ellipsis;

+ 232 - 83
src/components/pages/student.vue

@@ -1,27 +1,53 @@
 <template>
 <template>
   <div class="pb_content" style="background: unset">
   <div class="pb_content" style="background: unset">
-    <div class="pb_content_body" style="
-          background: #fff;
-          padding: 0px 25px;
-          box-sizing: border-box;
-          border-radius: 5px;
-        ">
+    <div
+      class="pb_content_body"
+      style="
+        background: #fff;
+        padding: 0px 25px;
+        box-sizing: border-box;
+        border-radius: 5px;
+      "
+    >
       <div class="pb_head">
       <div class="pb_head">
         <span>学生管理</span>
         <span>学生管理</span>
       </div>
       </div>
       <div class="student_head">
       <div class="student_head">
         <div class="head_left">
         <div class="head_left">
-          <el-input v-model="sPhoneUser" class="student_input" placeholder="请输入用户名"></el-input>
-          <el-select v-model="cid" placeholder="请选择班级" class="student_input" @change="searchStudent">
+          <el-input
+            v-model="sPhoneUser"
+            class="student_input"
+            placeholder="请输入用户名"
+          ></el-input>
+          <el-select
+            v-model="cid"
+            placeholder="请选择班级"
+            class="student_input"
+            @change="searchStudent"
+          >
             <el-option label="所有人" value=""></el-option>
             <el-option label="所有人" value=""></el-option>
-            <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
+            <el-option
+              v-for="(item, index) in classJuri"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
           </el-select>
           </el-select>
-          <el-button class="student_button" @click="searchStudent">查询</el-button>
+          <el-button class="student_button" @click="searchStudent"
+            >查询</el-button
+          >
         </div>
         </div>
         <div class="head_right">
         <div class="head_right">
           <el-button @click="addStudent">添加学生</el-button>
           <el-button @click="addStudent">添加学生</el-button>
-          <el-upload v-show="false" class="upload-demo newCss" :http-request="handleChange" :on-remove="handleRemove"
-            action="#" :file-list="fileListUpload" accept=".xlsx">
+          <el-upload
+            v-show="false"
+            class="upload-demo newCss"
+            :http-request="handleChange"
+            :on-remove="handleRemove"
+            action="#"
+            :file-list="fileListUpload"
+            accept=".xlsx"
+          >
             <el-button size="primary" type="primary">批量添加</el-button>
             <el-button size="primary" type="primary">批量添加</el-button>
             <div slot="tip" class="el-upload__tip" style="margin-left: 10px">
             <div slot="tip" class="el-upload__tip" style="margin-left: 10px">
               只能上传xlsx文件,且不超过500kb
               只能上传xlsx文件,且不超过500kb
@@ -34,26 +60,39 @@
     </div>
     </div>
     <div class="pb_content_body">
     <div class="pb_content_body">
       <div class="student_table">
       <div class="student_table">
-        <el-table ref="table" :data="tableData" border :height="tableHeight" :fit="true" v-loading="isLoading"
-          style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
-          :row-class-name="tableRowClassName">
+        <el-table
+          ref="table"
+          :data="tableData"
+          border
+          :height="tableHeight"
+          :fit="true"
+          v-loading="isLoading"
+          style="width: 100%"
+          :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+          :row-class-name="tableRowClassName"
+        >
           <el-table-column label="姓名" min-width="10" align="center">
           <el-table-column label="姓名" min-width="10" align="center">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div class="userImg">
               <div class="userImg">
                 <div class="tx">
                 <div class="tx">
-                  <img :src="
-                    scope.row.headportrait != null
-                      ? scope.row.headportrait
-                      : tx
-                  " alt />
+                  <img
+                    :src="
+                      scope.row.headportrait != null
+                        ? scope.row.headportrait
+                        : tx
+                    "
+                    alt
+                  />
                 </div>
                 </div>
-                <div style="
-                      width: 150px;
-                      text-align: left;
-                      white-space: nowrap;
-                      overflow: hidden;
-                      text-overflow: ellipsis;
-                    ">
+                <div
+                  style="
+                    width: 150px;
+                    text-align: left;
+                    white-space: nowrap;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                  "
+                >
                   {{ scope.row.name }}
                   {{ scope.row.name }}
                 </div>
                 </div>
               </div>
               </div>
@@ -77,19 +116,41 @@
             align="center"
             align="center"
           >
           >
           </el-table-column>-->
           </el-table-column>-->
-          <el-table-column prop="classname2" label="班级" min-width="15" align="center">
+          <el-table-column
+            prop="classname2"
+            label="班级"
+            min-width="15"
+            align="center"
+          >
           </el-table-column>
           </el-table-column>
           <el-table-column label="操作" width="250px">
           <el-table-column label="操作" width="250px">
             <template slot-scope="scope">
             <template slot-scope="scope">
               <div class="btnBox">
               <div class="btnBox">
-                <el-button class="de_button" type="primary" size="small" style="
-                      width: auto;
-                      padding: 5px !important;
-                      line-height: 15px;
-                    " @click="iniPassword(scope.row.userid)">初始化密码</el-button>
-                <el-button class="de_button" type="primary" size="small" @click="updateStudentA(scope.row)">修改</el-button>
+                <el-button
+                  class="de_button"
+                  type="primary"
+                  size="small"
+                  style="
+                    width: auto;
+                    padding: 5px !important;
+                    line-height: 15px;
+                  "
+                  @click="iniPassword(scope.row.userid)"
+                  >初始化密码</el-button
+                >
+                <el-button
+                  class="de_button"
+                  type="primary"
+                  size="small"
+                  @click="updateStudentA(scope.row)"
+                  >修改</el-button
+                >
                 <div class="delete">
                 <div class="delete">
-                  <img src="../../assets/remove.png" alt @click="deleteStudent(scope.row.userid, scope.row.state)" />
+                  <img
+                    src="../../assets/remove.png"
+                    alt
+                    @click="deleteStudent(scope.row.userid, scope.row.state)"
+                  />
                 </div>
                 </div>
               </div>
               </div>
             </template>
             </template>
@@ -97,12 +158,23 @@
         </el-table>
         </el-table>
       </div>
       </div>
       <div class="student_page">
       <div class="student_page">
-        <el-pagination background layout="prev, pager, next" :page-size="10" :total="total" v-if="page"
-          @current-change="handleCurrentChange"></el-pagination>
+        <el-pagination
+          background
+          layout="prev, pager, next"
+          :page-size="10"
+          :total="total"
+          v-if="page"
+          @current-change="handleCurrentChange"
+        ></el-pagination>
       </div>
       </div>
     </div>
     </div>
-    <el-dialog :visible.sync="dialogVisible" :append-to-body="true" width="700px" :before-close="handleClose"
-      class="add_student">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :append-to-body="true"
+      width="700px"
+      :before-close="handleClose"
+      class="add_student"
+    >
       <div slot="title" class="header-title">
       <div slot="title" class="header-title">
         <div class="logoImg">
         <div class="logoImg">
           <img src="../../assets/logo.png" alt />
           <img src="../../assets/logo.png" alt />
@@ -112,30 +184,64 @@
       <el-form>
       <el-form>
         <el-form-item label="学生姓名" :label-width="formLabelWidth">
         <el-form-item label="学生姓名" :label-width="formLabelWidth">
           <span>
           <span>
-            <el-input placeholder="请输入学生姓名" clearable v-model="sName" class="add_input"></el-input>
+            <el-input
+              placeholder="请输入学生姓名"
+              clearable
+              v-model="sName"
+              class="add_input"
+            ></el-input>
           </span>
           </span>
         </el-form-item>
         </el-form-item>
         <el-form-item label="学生学号" :label-width="formLabelWidth">
         <el-form-item label="学生学号" :label-width="formLabelWidth">
           <span>
           <span>
-            <el-input placeholder="请输入学生学号" clearable v-model="sId" class="add_input"></el-input>
+            <el-input
+              placeholder="请输入学生学号"
+              clearable
+              v-model="sId"
+              class="add_input"
+            ></el-input>
           </span>
           </span>
         </el-form-item>
         </el-form-item>
         <el-form-item label="学生手机号" :label-width="formLabelWidth">
         <el-form-item label="学生手机号" :label-width="formLabelWidth">
           <span>
           <span>
-            <el-input placeholder="请输入学生手机号" clearable v-model="sPhone" class="add_input"></el-input>
+            <el-input
+              placeholder="请输入学生手机号"
+              clearable
+              v-model="sPhone"
+              class="add_input"
+            ></el-input>
           </span>
           </span>
         </el-form-item>
         </el-form-item>
         <el-form-item label="学生账号" :label-width="formLabelWidth">
         <el-form-item label="学生账号" :label-width="formLabelWidth">
           <span>
           <span>
-            <el-input placeholder="请输入学生账号" clearable v-model="sMail" class="add_input"></el-input>
+            <el-input
+              placeholder="请输入学生账号"
+              clearable
+              v-model="sMail"
+              class="add_input"
+            ></el-input>
           </span>
           </span>
         </el-form-item>
         </el-form-item>
         <el-form-item label="所属学校" :label-width="formLabelWidth">
         <el-form-item label="所属学校" :label-width="formLabelWidth">
-          <el-input disabled style="width: 300px" v-model="schoolName"></el-input>
+          <el-input
+            disabled
+            style="width: 300px"
+            v-model="schoolName"
+          ></el-input>
         </el-form-item>
         </el-form-item>
         <el-form-item label="班级" :label-width="formLabelWidth">
         <el-form-item label="班级" :label-width="formLabelWidth">
-          <el-select multiple collapse-tags v-model="sByClass" placeholder="请选择班级">
-            <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
+          <el-select
+            multiple
+            collapse-tags
+            v-model="sByClass"
+            placeholder="请选择班级"
+          >
+            <el-option
+              v-for="(item, index) in classJuri"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
         <div style="text-align: center; color: #adb3b7">
         <div style="text-align: center; color: #adb3b7">
@@ -146,8 +252,13 @@
         <el-button class="right" @click="insertStudent">确认</el-button>
         <el-button class="right" @click="insertStudent">确认</el-button>
       </span>
       </span>
     </el-dialog>
     </el-dialog>
-    <el-dialog :visible.sync="dialogVisibleUpdate" :append-to-body="true" width="700px" :before-close="handleClose"
-      class="add_student">
+    <el-dialog
+      :visible.sync="dialogVisibleUpdate"
+      :append-to-body="true"
+      width="700px"
+      :before-close="handleClose"
+      class="add_student"
+    >
       <div slot="title" class="header-title">
       <div slot="title" class="header-title">
         <div class="logoImg">
         <div class="logoImg">
           <img src="../../assets/logo.png" alt />
           <img src="../../assets/logo.png" alt />
@@ -157,30 +268,64 @@
       <el-form>
       <el-form>
         <el-form-item label="学生名称" :label-width="formLabelWidth">
         <el-form-item label="学生名称" :label-width="formLabelWidth">
           <span>
           <span>
-            <el-input placeholder="请输入学生姓名" clearable v-model="userinfo.name" class="add_input"></el-input>
+            <el-input
+              placeholder="请输入学生姓名"
+              clearable
+              v-model="userinfo.name"
+              class="add_input"
+            ></el-input>
           </span>
           </span>
         </el-form-item>
         </el-form-item>
         <el-form-item label="学生学号" :label-width="formLabelWidth">
         <el-form-item label="学生学号" :label-width="formLabelWidth">
           <span>
           <span>
-            <el-input placeholder="请输入学生学号" clearable v-model="userinfo.studentid" class="add_input"></el-input>
+            <el-input
+              placeholder="请输入学生学号"
+              clearable
+              v-model="userinfo.studentid"
+              class="add_input"
+            ></el-input>
           </span>
           </span>
         </el-form-item>
         </el-form-item>
         <el-form-item label="学生手机号" :label-width="formLabelWidth">
         <el-form-item label="学生手机号" :label-width="formLabelWidth">
           <span>
           <span>
-            <el-input placeholder="请输入学生手机号" clearable v-model="userinfo.phonenumber" class="add_input"></el-input>
+            <el-input
+              placeholder="请输入学生手机号"
+              clearable
+              v-model="userinfo.phonenumber"
+              class="add_input"
+            ></el-input>
           </span>
           </span>
         </el-form-item>
         </el-form-item>
         <el-form-item label="学生账号" :label-width="formLabelWidth">
         <el-form-item label="学生账号" :label-width="formLabelWidth">
           <span>
           <span>
-            <el-input placeholder="请输入学生账号" clearable v-model="userinfo.un" class="add_input"></el-input>
+            <el-input
+              placeholder="请输入学生账号"
+              clearable
+              v-model="userinfo.un"
+              class="add_input"
+            ></el-input>
           </span>
           </span>
         </el-form-item>
         </el-form-item>
         <el-form-item label="所属学校" :label-width="formLabelWidth">
         <el-form-item label="所属学校" :label-width="formLabelWidth">
-          <el-input disabled style="width: 300px" v-model="schoolName"></el-input>
+          <el-input
+            disabled
+            style="width: 300px"
+            v-model="schoolName"
+          ></el-input>
         </el-form-item>
         </el-form-item>
         <el-form-item label="班级" :label-width="formLabelWidth">
         <el-form-item label="班级" :label-width="formLabelWidth">
-          <el-select multiple collapse-tags v-model="userinfo.classid" placeholder="请选择班级">
-            <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
+          <el-select
+            multiple
+            collapse-tags
+            v-model="userinfo.classid"
+            placeholder="请选择班级"
+          >
+            <el-option
+              v-for="(item, index) in classJuri"
+              :key="index"
+              :label="item.name"
+              :value="item.id"
+            ></el-option>
           </el-select>
           </el-select>
         </el-form-item>
         </el-form-item>
         <div style="text-align: center; color: #adb3b7">
         <div style="text-align: center; color: #adb3b7">
@@ -224,6 +369,7 @@ export default {
       sPhoneUser: "",
       sPhoneUser: "",
       userid: this.$route.query.userid,
       userid: this.$route.query.userid,
       oid: this.$route.query.oid,
       oid: this.$route.query.oid,
+      org: this.$route.query.org,
       cid: "",
       cid: "",
       tx: require("../../assets/avatar.png"),
       tx: require("../../assets/avatar.png"),
     };
     };
@@ -303,7 +449,8 @@ export default {
         this.$message.error("请为学生选择班级");
         this.$message.error("请为学生选择班级");
         return;
         return;
       } else if (
       } else if (
-        this.sPhone != "" && !/^[1][3,4,5,7,8][0-9]{9}$/.test(this.sPhone)
+        this.sPhone != "" &&
+        !/^[1][3,4,5,7,8][0-9]{9}$/.test(this.sPhone)
       ) {
       ) {
         this.$message.error("手机号格式不正确");
         this.$message.error("手机号格式不正确");
         return;
         return;
@@ -371,10 +518,11 @@ export default {
           ph: this.sPhone,
           ph: this.sPhone,
           sid: this.sId,
           sid: this.sId,
           cid: this.sByClass.join(","),
           cid: this.sByClass.join(","),
+          org: this.org,
         },
         },
       ];
       ];
       this.ajax
       this.ajax
-        .post(this.$store.state.api + "batchRegistration", params)
+        .post(this.$store.state.api + "batchRegistrationOrg", params)
         .then((res) => {
         .then((res) => {
           // console.log(res.data.uid, res.data.ph, res.data.oid, res.data.cid);
           // console.log(res.data.uid, res.data.ph, res.data.oid, res.data.cid);
           // this.isLoading = false;
           // this.isLoading = false;
@@ -390,11 +538,12 @@ export default {
               cid: res.data.cid,
               cid: res.data.cid,
               intro: "",
               intro: "",
               sex: "0",
               sex: "0",
+              org: this.org,
             },
             },
           ];
           ];
           this.ajax
           this.ajax
             // .post(this.$store.state.api + "updateUser", params)
             // .post(this.$store.state.api + "updateUser", params)
-            .post(this.$store.state.api + "updateUserByEdu", params)
+            .post(this.$store.state.api + "updateUserByEduOrg", params)
             .then((res) => {
             .then((res) => {
               console.log(res);
               console.log(res);
             })
             })
@@ -481,7 +630,7 @@ export default {
       if (this.fileTemp) {
       if (this.fileTemp) {
         if (
         if (
           this.fileTemp.type ==
           this.fileTemp.type ==
-          "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
+            "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" ||
           this.fileTemp.type == "application/vnd.ms-excel"
           this.fileTemp.type == "application/vnd.ms-excel"
         ) {
         ) {
           this.importCount = 1;
           this.importCount = 1;
@@ -955,7 +1104,7 @@ export default {
               console.error(err);
               console.error(err);
             });
             });
         })
         })
-        .catch(() => { });
+        .catch(() => {});
     },
     },
     iniPassword(id) {
     iniPassword(id) {
       this.$confirm("确定" + "初始化" + "此学生的密码吗?", "提示", {
       this.$confirm("确定" + "初始化" + "此学生的密码吗?", "提示", {
@@ -982,12 +1131,12 @@ export default {
               console.error(err);
               console.error(err);
             });
             });
         })
         })
-        .catch(() => { });
+        .catch(() => {});
     },
     },
     updateStudentA(res) {
     updateStudentA(res) {
       this.userinfo = JSON.parse(JSON.stringify(res));
       this.userinfo = JSON.parse(JSON.stringify(res));
       this.userinfoA = JSON.parse(JSON.stringify(res));
       this.userinfoA = JSON.parse(JSON.stringify(res));
-      this.userinfo.classid = this.userinfo.classid.split(",")
+      this.userinfo.classid = this.userinfo.classid.split(",");
       this.dialogVisibleUpdate = true;
       this.dialogVisibleUpdate = true;
     },
     },
     updateStudent() {
     updateStudent() {
@@ -1073,7 +1222,7 @@ export default {
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>
-.pb_head>span:nth-child(2) {
+.pb_head > span:nth-child(2) {
   font-size: 20px;
   font-size: 20px;
   margin-left: 5px;
   margin-left: 5px;
   color: #828282;
   color: #828282;
@@ -1107,7 +1256,7 @@ export default {
   align-items: baseline;
   align-items: baseline;
 }
 }
 
 
-.student_input>>>.el-input__inner {
+.student_input >>> .el-input__inner {
   height: 30px;
   height: 30px;
   width: 190px;
   width: 190px;
   font-size: 13px;
   font-size: 13px;
@@ -1124,7 +1273,7 @@ export default {
   line-height: 30px;
   line-height: 30px;
 }
 }
 
 
-.head_right>button:nth-child(1) {
+.head_right > button:nth-child(1) {
   color: #fff;
   color: #fff;
   background: #2268bc;
   background: #2268bc;
   width: 70px;
   width: 70px;
@@ -1134,7 +1283,7 @@ export default {
   line-height: 30px;
   line-height: 30px;
 }
 }
 
 
-.head_right>button:nth-child(2) {
+.head_right > button:nth-child(2) {
   color: #fff;
   color: #fff;
   background: #2268bc;
   background: #2268bc;
   width: 70px;
   width: 70px;
@@ -1144,7 +1293,7 @@ export default {
   line-height: 30px;
   line-height: 30px;
 }
 }
 
 
-.head_right>div {
+.head_right > div {
   font-size: 12px;
   font-size: 12px;
   line-height: 40px;
   line-height: 40px;
   margin-left: 10px;
   margin-left: 10px;
@@ -1153,16 +1302,16 @@ export default {
   cursor: pointer;
   cursor: pointer;
 }
 }
 
 
-.student_table>>>.el-table--border td {
+.student_table >>> .el-table--border td {
   border-right: 0px !important;
   border-right: 0px !important;
 }
 }
 
 
-.student_table>>>.el-table,
-.student_table>>>.el-table__body-wrapper {
+.student_table >>> .el-table,
+.student_table >>> .el-table__body-wrapper {
   height: auto !important;
   height: auto !important;
 }
 }
 
 
-.el-table>>>.even_row {
+.el-table >>> .even_row {
   background-color: #f1f1f1 !important;
   background-color: #f1f1f1 !important;
 }
 }
 
 
@@ -1176,30 +1325,30 @@ export default {
   line-height: 25px;
   line-height: 25px;
 }
 }
 
 
-.add_student>>>.el-dialog__header {
+.add_student >>> .el-dialog__header {
   padding: 20px 20px 10px;
   padding: 20px 20px 10px;
   text-align: center;
   text-align: center;
   background: #32455b;
   background: #32455b;
 }
 }
 
 
-.add_student>>>.el-dialog__title {
+.add_student >>> .el-dialog__title {
   font-size: 14px !important;
   font-size: 14px !important;
   color: #fff !important;
   color: #fff !important;
 }
 }
 
 
-.add_student>>>.el-dialog__headerbtn {
+.add_student >>> .el-dialog__headerbtn {
   font-size: 20px !important;
   font-size: 20px !important;
 }
 }
 
 
-.add_student>>>.el-form-item__label {
+.add_student >>> .el-form-item__label {
   margin-left: 65px;
   margin-left: 65px;
 }
 }
 
 
-.add_student>>>.el-form-item {
+.add_student >>> .el-form-item {
   display: flex;
   display: flex;
 }
 }
 
 
-.add_student>>>.el-form-item__content {
+.add_student >>> .el-form-item__content {
   margin: 0 !important;
   margin: 0 !important;
 }
 }
 
 
@@ -1207,7 +1356,7 @@ export default {
   width: 365px;
   width: 365px;
 }
 }
 
 
-.add_student>>>.el-dialog__footer {
+.add_student >>> .el-dialog__footer {
   text-align: center !important;
   text-align: center !important;
 }
 }
 
 
@@ -1226,7 +1375,7 @@ export default {
   width: 30px;
   width: 30px;
 }
 }
 
 
-.logoImg>img {
+.logoImg > img {
   width: 100%;
   width: 100%;
   height: 100%;
   height: 100%;
 }
 }
@@ -1240,7 +1389,7 @@ export default {
   line-height: 0px !important;
   line-height: 0px !important;
 }
 }
 
 
-.upload-demo>>>.el-button {
+.upload-demo >>> .el-button {
   color: #fff;
   color: #fff;
   background: #2268bc;
   background: #2268bc;
   width: 70px;
   width: 70px;
@@ -1269,8 +1418,8 @@ export default {
   margin-left: 10px;
   margin-left: 10px;
 }
 }
 
 
-.tx>img,
-.delete>img {
+.tx > img,
+.delete > img {
   width: 100%;
   width: 100%;
   height: 100%;
   height: 100%;
 }
 }
@@ -1290,7 +1439,7 @@ export default {
   margin-right: 10px;
   margin-right: 10px;
 }
 }
 
 
-.student_input>>>.el-input__icon {
+.student_input >>> .el-input__icon {
   line-height: unset;
   line-height: unset;
 }
 }
 
 

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

@@ -7037,9 +7037,7 @@ export default {
       this.ajax
       this.ajax
         .get(this.$store.state.api + "getCourseTemplateTs", params)
         .get(this.$store.state.api + "getCourseTemplateTs", params)
         .then((res) => {
         .then((res) => {
-          this.templateArray = res.data[0].filter(el => {
-            return el.oid
-          });
+          this.templateArray = res.data[0];
           this.getTemplateOrg();
           this.getTemplateOrg();
           this.$forceUpdate();
           this.$forceUpdate();
         })
         })
@@ -7054,10 +7052,12 @@ export default {
         .then((res) => {
         .then((res) => {
           if (res.data[0].length) {
           if (res.data[0].length) {
             let ta = res.data[0].filter(el => {
             let ta = res.data[0].filter(el => {
-            return el.oid
-          });
-            let newArr2 = this.templateArray.filter(x => !ta.some(y => y.id === x.id));
-            this.templateArray = [...newArr2, ...this.templateArray];
+              return el.oid
+            });
+            this.templateArray = [...ta, ...this.templateArray];
+            this.templateArray = this.templateArray.sort(function(a, b) {
+              return b.create_at < a.create_at? -1 : 1
+            })
           }
           }
           this.$forceUpdate();
           this.$forceUpdate();
         })
         })

+ 22 - 0
src/components/pages/studio/addCourse.vue

@@ -6966,9 +6966,31 @@ export default {
         .get(this.$store.state.api + "getCourseTemplateTStudio", params)
         .get(this.$store.state.api + "getCourseTemplateTStudio", params)
         .then((res) => {
         .then((res) => {
           this.templateArray = res.data[0];
           this.templateArray = res.data[0];
+          this.getTemplateOrg();
+          this.$forceUpdate();
         })
         })
         .catch((err) => {});
         .catch((err) => {});
     },
     },
+    getTemplateOrg() {
+      let params = {
+        oid: this.org,
+      };
+      this.ajax
+        .get(this.$store.state.api + "getCourseTemplateTStudio", params)
+        .then((res) => {
+          if (res.data[0].length) {
+            let ta = res.data[0].filter(el => {
+              return el.oid
+            });
+            this.templateArray = [...ta, ...this.templateArray];
+            this.templateArray = this.templateArray.sort(function(a, b) {
+              return b.create_at < a.create_at? -1 : 1
+            })
+          }
+          this.$forceUpdate();
+        })
+        .catch((err) => { });
+    },
     clearChoose() {
     clearChoose() {
       this.clearArray.splice(this.templateC.id, 1);
       this.clearArray.splice(this.templateC.id, 1);
       this.dialogVisible2 = false;
       this.dialogVisible2 = false;

+ 140 - 59
src/components/pages/task/addCourse.vue

@@ -95,6 +95,9 @@
                     </div>
                     </div>
                   </div>
                   </div>
                   <div class="right_first">
                   <div class="right_first">
+                    <div class="ai_box">
+                      <div class="ai_content" @click="openAI"><img src="../../../assets/icon/new/ai.png"/><span>AI共创</span></div>
+                    </div>
                     <div>
                     <div>
                       <div class="uploadFm" @click="choosePicVisible = true" v-if="cover.length == 0">
                       <div class="uploadFm" @click="choosePicVisible = true" v-if="cover.length == 0">
                         <img src="../../../assets/icon/addPoster.png" alt="" />
                         <img src="../../../assets/icon/addPoster.png" alt="" />
@@ -117,6 +120,7 @@
                   <button class="c_pub_button_add pub_btn_add_img" @click="
                   <button class="c_pub_button_add pub_btn_add_img" @click="
                     (dialogVisibleClass = true),
                     (dialogVisibleClass = true),
                     (classSearch = ''),
                     (classSearch = ''),
+                    (gradeId = ''),
                     getClass()
                     getClass()
                     ">添加班级</button>
                     ">添加班级</button>
                   <div v-if="checkboxList2.length" class="wb_j_box_p_box">
                   <div v-if="checkboxList2.length" class="wb_j_box_p_box">
@@ -139,13 +143,6 @@
                     class="binfo_input"
                     class="binfo_input"
                     cols
                     cols
                     v-model="courseText"
                     v-model="courseText"
-                    :placeholder="
-                      '1、课程内容说明' +
-                      '\n' +
-                      '2、课程学习知识目标' +
-                      '\n' +
-                      '3、课程学习技能目标'
-                    "
                   ></textarea>
                   ></textarea>
                 </div>
                 </div>
               </div>
               </div>
@@ -251,6 +248,8 @@
                                   ].task
                                   ].task
                                 "
                                 "
                               />
                               />
+                              <div v-if="!itemTask.isFold2" class="show_taskD show" @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />收起任务描述</div>
+                                <div v-else class="show_taskD" @click="fold2(itemTaskIndex)"><img src="../../../assets/icon/new/icon-slide.png" />展开任务描述</div>
                             </div>
                             </div>
                             <div
                             <div
                               class="remove"
                               class="remove"
@@ -260,7 +259,7 @@
                           </div>
                           </div>
                         </div>
                         </div>
                       </div>
                       </div>
-                      <div style="margin: 25px 0">
+                      <div style="margin: 25px 0" v-if="!itemTask.isFold2">
                         <!-- <editor-bar style="width: 90% !important; margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
                         <!-- <editor-bar style="width: 90% !important; margin: 0" placeholder="请输入任务描述" v-model="unitJson[unitIndex].chapterInfo[0].taskJson[
                           itemTaskIndex
                           itemTaskIndex
                         ].taskDetail
                         ].taskDetail
@@ -5042,18 +5041,7 @@
           <div class="info_btnBox">
           <div class="info_btnBox">
             <button
             <button
               class="c_pub_button_return pub_btn_return_img"
               class="c_pub_button_return pub_btn_return_img"
-              @click="
-                goTo(
-                  '/course?userid=' +
-                    userid +
-                    '&oid=' +
-                    oid +
-                    '&org=' +
-                    org +
-                    '&role=' +
-                    role
-                )
-              "
+              @click="lastSteps"
             >
             >
               返回课程
               返回课程
             </button>
             </button>
@@ -5249,24 +5237,17 @@
         <el-button type="primary" @click="isAddPP">确定</el-button>
         <el-button type="primary" @click="isAddPP">确定</el-button>
       </span>
       </span>
     </el-dialog>
     </el-dialog>
-    <el-dialog
-      title="添加班级"
-      :visible.sync="dialogVisibleClass"
-      :append-to-body="true"
-      width="400px"
-      height="80%"
-      :before-close="handleClose"
-      class="addNewPP"
-    >
+    <el-dialog title="添加班级" :visible.sync="dialogVisibleClass" :append-to-body="true" width="400px" height="80%"
+      :before-close="handleClose" class="addNewPP">
       <div class="people" style="height: 300px">
       <div class="people" style="height: 300px">
         <div class="people_top">
         <div class="people_top">
           <div class="people_top_right">
           <div class="people_top_right">
             <div class="people_search">
             <div class="people_search">
-              <el-input
-                placeholder="搜索班级名称"
-                v-model="classSearch"
-                @input="getClass()"
-              ></el-input>
+              <el-select v-model="gradeId" placeholder="请选择年级" class="student_input" clearable @change="getClass()">
+                <el-option label="全部" value=""></el-option>
+                <el-option v-for="(item, index) in gradeList" :key="index" :label="item.name" :value="item.id"></el-option>
+              </el-select>
+              <el-input placeholder="搜索班级名称" v-model="classSearch" @input="getClass()"></el-input>
               <!-- @click="getClass()" 
               <!-- @click="getClass()" 
                 @keyup.enter.native="getClass()"
                 @keyup.enter.native="getClass()"
                -->
                -->
@@ -5277,11 +5258,7 @@
           </div>
           </div>
           <div class="people_nav">选择班级</div>
           <div class="people_nav">选择班级</div>
         </div>
         </div>
-        <el-checkbox-group
-          v-model="checkboxList2"
-          class="people_name people_name2"
-          @change="InviteChange"
-        >
+        <el-checkbox-group v-model="checkboxList2" class="people_name people_name2" @change="InviteChange" v-if="grade2.length" >
           <div v-for="item in grade2" :key="item.id" class="p_box">
           <div v-for="item in grade2" :key="item.id" class="p_box">
             <el-checkbox :label="item.id">
             <el-checkbox :label="item.id">
               {{ item.name }}
               {{ item.name }}
@@ -5290,9 +5267,10 @@
               邀请码:{{ getInviteCodeC(item.id) }}</div> -->
               邀请码:{{ getInviteCodeC(item.id) }}</div> -->
             <!-- <div class="inviteCode" :class="{ noneInvite: !isInvite(item.id) }" v-if="checkboxList2.indexOf(item.id) != -1"
             <!-- <div class="inviteCode" :class="{ noneInvite: !isInvite(item.id) }" v-if="checkboxList2.indexOf(item.id) != -1"
               @click="OpenInviteD(item.id)">随机码设置</div>
               @click="OpenInviteD(item.id)">随机码设置</div>
-            <img src="../../../assets/icon/rightInvite.png" class="inviteImg" v-if="isInvite(item.id)" /> -->
+            <img src="../../assets/icon/rightInvite.png" class="inviteImg" v-if="isInvite(item.id)" /> -->
           </div>
           </div>
         </el-checkbox-group>
         </el-checkbox-group>
+        <div v-if="!grade2.length" style="padding:20px 10px">暂无数据</div>
       </div>
       </div>
       <span slot="footer" class="dialog-footer">
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisibleClass = false">取 消</el-button>
         <el-button @click="dialogVisibleClass = false">取 消</el-button>
@@ -6729,7 +6707,7 @@ export default {
       lineType: 0,
       lineType: 0,
       chapCount: 0,
       chapCount: 0,
       courseName: "",
       courseName: "",
-      isTeacherSee: true,
+      isTeacherSee: false,
       courseText: "",
       courseText: "",
       preTime: 0,
       preTime: 0,
       formLabelWidth: "100px",
       formLabelWidth: "100px",
@@ -6778,6 +6756,7 @@ export default {
       dialogVisiblePreTime: false,
       dialogVisiblePreTime: false,
       uploadJson: [],
       uploadJson: [],
       classJuri: [],
       classJuri: [],
+      gradeList: [],
       cover: [], //课程封面
       cover: [], //课程封面
       myWord: [],
       myWord: [],
       evaJuri: [],
       evaJuri: [],
@@ -6858,6 +6837,7 @@ export default {
       checkboxList2: [],
       checkboxList2: [],
       checkboxList3: [],
       checkboxList3: [],
       classSearch: "",
       classSearch: "",
+      gradeId:"",
       number: "",
       number: "",
       tTitle: "",
       tTitle: "",
       tdetail: "",
       tdetail: "",
@@ -7072,6 +7052,9 @@ export default {
     },
     },
   },
   },
   methods: {
   methods: {
+    openAI(){
+      window.parent.postMessage({ tools: "64" }, "*");
+    },
     setMan() {
     setMan() {
       // let teacherJuri = this.teacherJuri2;
       // let teacherJuri = this.teacherJuri2;
       this.ManAarray = [];
       this.ManAarray = [];
@@ -7191,28 +7174,57 @@ export default {
       return _guid;
       return _guid;
     },
     },
     lastSteps() {
     lastSteps() {
-      this.goTo(
-        "/course?userid=" +
-          this.userid +
-          "&oid=" +
-          this.oid +
-          "&org=" +
-          this.org +
-          "&role=" +
-          this.role
-      );
+      this
+        .$confirm("是否保存?", "提示", {
+          confirmButtonText: "保存",
+          cancelButtonText: "不保存",
+          type: "warning",
+        })
+        .then(() => {
+          if (this.cid == "" || this.cid == undefined) {
+            if (this.courseName == "") {
+              this.$message.error("请补充填写课程名称");
+              return;
+            } else {
+              this.addWork();
+            }
+          } else {
+            if (this.courseName == "") {
+              this.$message.error("请补充填写课程名称");
+              return;
+            } else {
+              if (this.userid != this.courseUserid && this.role != "1") {
+                this.updateWork2();
+              } else {
+                this.updateWork();
+              }
+            }
+          }
+        })
+        .catch(() => {
+          this.goTo(
+            "/course?userid=" +
+            this.userid +
+            "&oid=" +
+            this.oid +
+            "&org=" +
+            this.org +
+            "&role=" +
+            this.role
+          );
+        });
     },
     },
     nextSteps() {
     nextSteps() {
       if (this.cid == "" || this.cid == undefined) {
       if (this.cid == "" || this.cid == undefined) {
         if (this.courseName == "") {
         if (this.courseName == "") {
-          this.$message.error("请将信息填写完整");
+          this.$message.error("请补充填写课程名称");
           return;
           return;
         } else {
         } else {
           this.addWork();
           this.addWork();
         }
         }
       } else {
       } else {
         if (this.courseName == "") {
         if (this.courseName == "") {
-          this.$message.error("请将信息填写完整");
+          this.$message.error("请补充填写课程名称");
           return;
           return;
         } else {
         } else {
           if (this.userid != this.courseUserid && this.role != "1") {
           if (this.userid != this.courseUserid && this.role != "1") {
@@ -8288,6 +8300,14 @@ export default {
       }
       }
       console.log(e);
       console.log(e);
     },
     },
+    fold2(i) {
+      if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2) {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = false;
+      } else {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold2 = true;
+      }
+      this.$forceUpdate();
+    },
     deleteHomeworkBox(unitIndex, index, i) {
     deleteHomeworkBox(unitIndex, index, i) {
       this.unitJson[unitIndex].chapterInfo[index].taskJson[
       this.unitJson[unitIndex].chapterInfo[index].taskJson[
         this.taskCount
         this.taskCount
@@ -8343,14 +8363,29 @@ export default {
     searchStudent() {
     searchStudent() {
       this.getStudent();
       this.getStudent();
     },
     },
+    selectGrage() {
+      let params = {
+        oid: this.oid,
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectGrageBySchool", params)
+        .then((res) => {
+          this.gradeList = res.data[0];
+        })
+        .catch((err) => {
+          this.isLoading = false;
+          console.error(err);
+        });
+    },
     //获取班级列表
     //获取班级列表
     getClass() {
     getClass() {
       let params = {
       let params = {
         oid: this.oid,
         oid: this.oid,
+        gid: this.gradeId,
         cn: this.classSearch,
         cn: this.classSearch,
       };
       };
       this.ajax
       this.ajax
-        .get(this.$store.state.api + "selectClassBySchoolSearch", params)
+        .get(this.$store.state.api + "selectClassBySchoolSearch2", params)
         .then((res) => {
         .then((res) => {
           if (!this.grade.length) {
           if (!this.grade.length) {
             this.grade = res.data[0];
             this.grade = res.data[0];
@@ -11201,6 +11236,7 @@ export default {
     this.getStudent();
     this.getStudent();
     this.getTeacher();
     this.getTeacher();
     this.getClass();
     this.getClass();
+    this.selectGrage();
     this.getTemplate();
     this.getTemplate();
     // this.selectType();
     // this.selectType();
     this.selectEva();
     this.selectEva();
@@ -11628,6 +11664,26 @@ export default {
 
 
 .chapter_contentbox .cc_input {
 .chapter_contentbox .cc_input {
   width: 100%;
   width: 100%;
+  display:flex;
+}
+
+.show_taskD{
+  min-width:fit-content;
+  margin-left: 10px;
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  cursor: pointer;
+  color: #717C8D;
+}
+
+.show_taskD > img{
+  width:15px;
+  margin-right:5px;
+}
+
+.show_taskD.show > img{
+  transform: rotate(180deg);
 }
 }
 
 
 .remove {
 .remove {
@@ -11781,7 +11837,7 @@ export default {
   box-sizing: border-box;
   box-sizing: border-box;
   position: relative;
   position: relative;
   padding: 20px 15px;
   padding: 20px 15px;
-  height: 200px;
+  height: auto;
   overflow-y: auto;
   overflow-y: auto;
   overflow-x: hidden;
   overflow-x: hidden;
 }
 }
@@ -11879,7 +11935,7 @@ export default {
   flex-direction: column;
   flex-direction: column;
   flex-wrap: nowrap;
   flex-wrap: nowrap;
   width: calc(100% - 400px);
   width: calc(100% - 400px);
-  padding: 0 100px 0 0;
+  padding: 0 0 0 0;
   box-sizing: border-box;
   box-sizing: border-box;
 }
 }
 
 
@@ -11891,6 +11947,30 @@ export default {
   border-left: 1px solid #E0E2ED;
   border-left: 1px solid #E0E2ED;
   box-sizing: border-box;
   box-sizing: border-box;
   padding-bottom:20px;
   padding-bottom:20px;
+  flex-direction: column;
+}
+
+.ai_box{
+  width: 204px;
+    display: flex;
+    justify-content: flex-end;
+    margin-bottom: 15px;
+}
+.ai_content{
+  display: flex;
+  align-items: center;
+  font-size: 14px;
+  padding: 7px 20px;
+  box-sizing: border-box;
+  box-shadow: 0px 0px 12px 1px rgba(0,0,0,0.16);
+  border-radius: 12px;
+  font-weight: 700;
+  cursor: pointer;
+}
+
+.ai_content>img{
+  width: 40px;
+  margin-right: 5px;
 }
 }
 
 
 .right_title {
 .right_title {
@@ -11919,7 +11999,7 @@ export default {
   /* justify-content: space-between; */
   /* justify-content: space-between; */
   /* align-items: center; */
   /* align-items: center; */
   flex-direction: column;
   flex-direction: column;
-  padding: 10px 25px 0;
+  padding: 10px 10px 0;
   box-sizing: border-box;
   box-sizing: border-box;
 }
 }
 
 
@@ -11960,7 +12040,7 @@ export default {
 .people_name {
 .people_name {
   display: flex;
   display: flex;
   justify-content: flex-start;
   justify-content: flex-start;
-  padding: 20px 0 0 25px;
+  padding: 20px 10px;
   flex-direction: column;
   flex-direction: column;
   flex-wrap: wrap;
   flex-wrap: wrap;
 }
 }
@@ -12741,6 +12821,7 @@ ol {
   display: flex;
   display: flex;
   flex-direction: row;
   flex-direction: row;
   align-items: center;
   align-items: center;
+  margin-right:10px;
 }
 }
 
 
 .all_choose > .el-checkbox-group > .el-checkbox >>> .el-checkbox__label {
 .all_choose > .el-checkbox-group > .el-checkbox >>> .el-checkbox__label {
@@ -13496,7 +13577,7 @@ ol {
 .uploadFm {
 .uploadFm {
   border: 1px dashed #ccc;
   border: 1px dashed #ccc;
   width: 202px;
   width: 202px;
-  height: 102px;
+  height: 130px;
   position: relative;
   position: relative;
   cursor: pointer;
   cursor: pointer;
   display: flex;
   display: flex;

+ 1293 - 0
src/components/pages/teacherOffice/index.vue

@@ -0,0 +1,1293 @@
+<template>
+    <div class="pb_content" style="background: unset">
+      <div v-if="ctype == 1" class="pb_content_body" style="
+                background: #fff;
+                padding: 0px 25px;
+                box-sizing: border-box;
+                border-radius: 5px;
+              ">
+        <div class="pb_head top">
+          <span>教研室管理</span>
+          <div class="student_button" style="border-radius: 4px;">
+            <el-button type="primary" class="bgColor" @click="dialogVisible = true">添加教研室</el-button>
+          </div>
+        </div>
+        <div class="student_head">
+          <div class="student_search">
+            <span>
+              <el-input placeholder="请输入教研室名称" v-model="sClassName" clearable>
+              </el-input>
+            </span>
+            <el-button type="primary" @click="searchClass">查询</el-button>
+          </div>
+        </div>
+      </div>
+      <div class="pb_content_body" v-if="ctype == 1">
+        <div class="student_table">
+          <el-table v-if="ctype == 1" ref="table" :key="1" :data="tableData" border :height="tableHeight" :fit="true"
+            v-loading="isLoading" style="width: 100%; height: 60%" :header-cell-style="{ background: '#f1f1f1' }"
+            :row-class-name="tableRowClassName">
+            <el-table-column prop="name" label="教研室名称" align="center">
+            </el-table-column>
+            <el-table-column prop="pnum" label="人数" align="center">
+            </el-table-column>
+            <el-table-column label="操作" width="400px">
+              <template slot-scope="scope">
+                <el-button type="primary" size="small" @click="getStudent(scope.row.id)">查看老师</el-button>
+                <!-- <el-button type="primary" size="small" @click="updateG(scope.row.pid, scope.row.id)">修改年级</el-button> -->
+                <el-button type="primary" size="small" @click="openUpdate(scope.row.id, scope.row.name)">修改</el-button>
+                <el-button type="primary" size="small" @click="deleteClass(scope.row.id)">删除</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>
+      </div>
+      <div v-if="ctype == 2" class="pb_content_body" style="
+                background: #fff;
+                padding: 0px 25px;
+                box-sizing: border-box;
+                border-radius: 5px;
+              ">
+        <div class="pb_head top">
+          <span>查看老师-{{ getGrade(cid) }}</span>
+          <div class="student_button" style="border-radius: 4px;">
+            <el-button type="primary" class="bgColor" @click="ctype = 1, getClass()">返回</el-button>
+          </div>
+        </div>
+        <div class="student_head">
+          <div class="head_left">
+            <el-input v-model="sPhoneUser" class="student_input" placeholder="请输入用户名" style="margin:0 10px"></el-input>
+            <!-- <el-select disabled v-model="cid" placeholder="请选择教研室" class="student_input" @change="searchStudent"
+              style="margin:0 10px">
+              <el-option label="所有人" value=""></el-option>
+              <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
+            </el-select> -->
+            <el-button class="student_button" @click="searchStudent">查询</el-button>
+          </div>
+          <div class="head_right">
+            <el-button @click="addStudent">添加老师</el-button>
+          </div>
+        </div>
+      </div>
+      <div class="pb_content_body" v-if="ctype == 2">
+        <div class="student_table">
+          <el-table v-if="ctype == 2" :key="2" ref="table2" :data="tableData2" border :height="tableHeight" :fit="true"
+            v-loading="isLoading" style="width: 100%" :header-cell-style="{ background: '#f1f1f1', fontSize: '17px' }"
+            :row-class-name="tableRowClassName">
+            <el-table-column label="姓名" min-width="10" align="center">
+              <template slot-scope="scope">
+                <div class="userImg">
+                  <div class="tx">
+                    <img :src="scope.row.headportrait != null
+                        ? scope.row.headportrait
+                        : tx
+                      " alt />
+                  </div>
+                  <div style="
+                            width: 150px;
+                            text-align: left;
+                            white-space: nowrap;
+                            overflow: hidden;
+                            text-overflow: ellipsis;
+                          ">
+                    {{ scope.row.name }}
+                  </div>
+                </div>
+              </template>
+            </el-table-column>
+            <el-table-column label="老师账号" min-width="15" align="center">
+              <template slot-scope="scope">
+                <div>{{ scope.row.un ? scope.row.un : "" }}</div>
+              </template>
+            </el-table-column>
+            <el-table-column prop="classname2" label="教研室" min-width="15" align="center">
+            </el-table-column>
+            <el-table-column label="操作" width="250px">
+              <template slot-scope="scope">
+                <div class="btnBox">
+                  <el-button class="de_button" type="primary" size="small"
+                    @click="iniPassword(scope.row.userid)" v-show="false">初始化密码</el-button>
+                  <!-- <el-button class="de_button" type="primary" size="small" @click="updateStudentA(scope.row)">修改</el-button> -->
+                  <el-button class="de_button" type="primary" size="small"
+                    @click="deleteClassStudent(scope.row.userid)">移除</el-button>
+                  <!-- <div class="delete">
+                    <img src="../../../assets/remove.png" alt @click="deleteStudent(scope.row.userid, scope.row.state)" />
+                  </div> -->
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <div class="student_page">
+          <el-pagination background layout="prev, pager, next" :page-size="10" :total="total2" v-if="page2"
+            @current-change="handleCurrentChange2"></el-pagination>
+        </div>
+      </div>
+      <el-dialog :visible.sync="dialogVisibleAddStudent" :append-to-body="true" width="700px" :before-close="handleClose"
+        class="add_student">
+        <div slot="title" class="header-title">
+          <div class="logoImg">
+            <img src="../../../assets/logo.png" alt />
+          </div>
+          <div class="title_add_student">添加老师</div>
+        </div>
+        <el-form>
+          <el-form-item label="老师姓名" :label-width="formLabelWidth">
+            <span>
+              <el-input placeholder="请输入老师姓名" clearable v-model="sName" class="add_input"></el-input>
+            </span>
+          </el-form-item>
+          <el-form-item label="老师学号" :label-width="formLabelWidth">
+            <span>
+              <el-input placeholder="请输入老师学号" clearable v-model="sId" class="add_input"></el-input>
+            </span>
+          </el-form-item>
+          <el-form-item label="老师手机号" :label-width="formLabelWidth">
+            <span>
+              <el-input placeholder="请输入老师手机号" clearable v-model="sPhone" class="add_input"></el-input>
+            </span>
+          </el-form-item>
+          <el-form-item label="老师账号" :label-width="formLabelWidth">
+            <span>
+              <el-input placeholder="请输入老师账号" clearable v-model="sMail" class="add_input"></el-input>
+            </span>
+          </el-form-item>
+          <el-form-item label="所属学校" :label-width="formLabelWidth">
+            <el-input disabled style="width: 300px" v-model="schoolName"></el-input>
+          </el-form-item>
+          <el-form-item label="教研室" :label-width="formLabelWidth">
+            <el-select v-model="cid" placeholder="请选择教研室" disabled>
+              <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
+            </el-select>
+          </el-form-item>
+          <div style="text-align: center; color: #adb3b7">
+            注:添加老师的账号密码为123456
+          </div>
+        </el-form>
+        <span slot="footer" class="dialog-footer flex">
+          <el-button class="right" @click="insertStudent">确认</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog :visible.sync="dialogVisibleUpdate" :append-to-body="true" width="700px" :before-close="handleClose"
+        class="add_student">
+        <div slot="title" class="header-title">
+          <div class="logoImg">
+            <img src="../../../assets/logo.png" alt />
+          </div>
+          <div class="title_add_student">修改老师</div>
+        </div>
+        <el-form>
+          <el-form-item label="老师名称" :label-width="formLabelWidth">
+            <span>
+              <el-input placeholder="请输入老师姓名" clearable v-model="userinfo.name" class="add_input"></el-input>
+            </span>
+          </el-form-item>
+          <el-form-item label="老师学号" :label-width="formLabelWidth">
+            <span>
+              <el-input placeholder="请输入老师学号" clearable v-model="userinfo.studentid" class="add_input"></el-input>
+            </span>
+          </el-form-item>
+          <el-form-item label="老师手机号" :label-width="formLabelWidth">
+            <span>
+              <el-input placeholder="请输入老师手机号" clearable v-model="userinfo.phonenumber" class="add_input"></el-input>
+            </span>
+          </el-form-item>
+          <el-form-item label="老师账号" :label-width="formLabelWidth">
+            <span>
+              <el-input placeholder="请输入老师账号" clearable v-model="userinfo.un" class="add_input"></el-input>
+            </span>
+          </el-form-item>
+          <el-form-item label="所属学校" :label-width="formLabelWidth">
+            <el-input disabled style="width: 300px" v-model="schoolName"></el-input>
+          </el-form-item>
+          <el-form-item label="教研室" :label-width="formLabelWidth">
+            <el-select multiple collapse-tags v-model="userinfo.classid" placeholder="请选择教研室">
+              <el-option v-for="(item, index) in classJuri" :key="index" :label="item.name" :value="item.id"></el-option>
+            </el-select>
+          </el-form-item>
+          <div style="text-align: center; color: #adb3b7">
+            注:添加老师的账号密码为123456
+          </div>
+        </el-form>
+        <span slot="footer" class="dialog-footer flex">
+          <el-button class="right" @click="updateStudent">修改</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog title="添加教研室" :visible.sync="dialogVisible" :append-to-body="true" width="25%" :before-close="handleClose"
+        class="dialog_diy">
+        <el-form>
+          <el-form-item label="教研室名称" :label-width="formLabelWidth">
+            <el-input v-model="className" auto-complete="off" placeholder="请输入教研室..."></el-input>
+          </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisible = false">取 消</el-button>
+          <el-button type="primary" @click="insertClass">确 定</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog title="修改年级" :visible.sync="dialogVisibleGrade" :append-to-body="true" width="25%"
+        :before-close="handleClose" class="dialog_diy">
+        <el-form>
+          <el-form-item label="选择年级" :label-width="formLabelWidth">
+            <el-select v-model="gid" placeholder="请选择教研室" class="student_input" style="margin:0 10px" clearable>
+              <el-option v-for="(item, index) in grade" :key="index" :label="item.name" :value="item.id"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisibleGrade = false">取 消</el-button>
+          <el-button type="primary" @click="updateGrade">确 定</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog title="修改教研室" :visible.sync="dialogVisible1" :append-to-body="true" width="25%" :before-close="handleClose"
+        class="dialog_diy">
+        <el-form>
+          <el-form-item label="教研室名称" :label-width="formLabelWidth">
+            <el-input v-model="className1" auto-complete="off" placeholder="请输入教研室..."></el-input>
+          </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisible1 = false">取 消</el-button>
+          <el-button type="primary" @click="updateClass">确 定</el-button>
+        </span>
+      </el-dialog>
+      <el-dialog title="添加老师" :visible.sync="dialogVisibleMember" :append-to-body="true" width="500px" height="80%"
+        :before-close="handleClose" class="addNewPP">
+        <div class="people">
+          <div class="people_top">
+            <div class="people_top_right">
+              <div class="people_search">
+                <el-input placeholder="搜索老师姓名" v-model="searchTN" @keyup.enter.native="getClassStudent"></el-input>
+                <div class="search_img" @click="getClassStudent">
+                  <img src="../../../assets/icon/search.png" alt />
+                </div>
+              </div>
+            </div>
+            <div class="people_nav">选择成员</div>
+          </div>
+          <div class="t_j_box" style="
+                    padding: 20px 0 0 25px;
+                    width: calc(100% - 55px);
+                    margin-left: 25px;
+                  ">
+            <span>姓名</span>
+            <span>账号</span>
+          </div>
+          <el-checkbox-group v-model="checkboxList3" class="people_name" v-if="teacherJuri.length" v-loading="isLoading2">
+            <el-checkbox v-for="item in teacherJuri" :key="item.userid" :label="item.userid">
+              <div class="t_j_box">
+                <el-tooltip placement="top" :content="item.name ? item.name : '暂无姓名'">
+                  <span>{{ item.name ? item.name : "暂无姓名" }}</span>
+                </el-tooltip>
+                <el-tooltip placement="top" :content="item.username">
+                  <span>{{ item.username }}</span>
+                </el-tooltip>
+              </div>
+            </el-checkbox>
+          </el-checkbox-group>
+          <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
+        </div>
+        <div style="margin-top: 10px;">
+          <el-pagination background layout="prev, pager, next" :page-size="pageSize3" :total="total3"
+            v-if="page3 && teacherJuri.length" style="padding-bottom: 20px"
+            @current-change="handleCurrentChange3"></el-pagination>
+        </div>
+        <span slot="footer" class="dialog-footer">
+          <el-button @click="dialogVisibleMember = false">取 消</el-button>
+          <el-button type="primary" @click="addClassStudent">确定</el-button>
+        </span>
+      </el-dialog>
+    </div>
+  </template>
+  
+  <script>
+  import TaskListHeader from 'gantt-elastic/src/components/TaskList/TaskListHeader.vue';
+  
+  export default {
+    data() {
+      return {
+        tableHeight: "500px",
+        isLoading: false,
+        formLabelWidth: "100px",
+        sClassName: "",
+        className: "",
+        className1: "",
+        classid: "",
+        dialogVisible: false,
+        dialogVisible1: false,
+        dialogVisibleUpdate: false,
+        dialogVisibleAddStudent: false,
+        tableData: [],
+        page: 1,
+        total: 0,
+        tableData2: [],
+        page2: 1,
+        total2: 0,
+        userid: this.$route.query.userid,
+        oid: this.$route.query.oid,
+        cid: "",
+        ctype: 1,
+        sName: "",
+        sPhone: "",
+        sId: "",
+        schoolName: "",
+        sByClass: "",
+        sMail: "",
+        classJuri: [],
+        userinfo: {},
+        userinfoA: {},
+        sPhoneUser: "",
+        tx: require("../../../assets/avatar.png"),
+        dialogVisibleMember: false,
+        checkboxList3: [],
+        teacherJuri: [],
+        pageSize3: 10,
+        total3: 0,
+        page3: 1,
+        isLoading2: false,
+        searchTN: "",
+        grade: [],
+        gid: "",
+        dialogVisibleGrade: false
+      };
+    },
+    created() {
+      this.page = 1;
+      this.getClass();
+      this.getClass2();
+      this.selectGrage()
+      this.getSchoolName();
+    },
+    computed: {
+      getGrade() {
+        return function (gid) {
+          let name = ''
+          this.grade.forEach(element => {
+            if (element.id == gid) {
+              name = element.name
+            }
+          });
+          return name ? name : '暂无'
+        }
+      }
+    },
+    mounted() {
+      this.$nextTick(function () {
+        this.tableHeight =
+          window.innerHeight - this.$refs.table.$el.offsetTop - 200;
+        if (this.tableHeight <= 530) {
+          this.tableHeight = 530;
+        }
+        // 监听窗口大小变化
+        let self = this;
+        window.onresize = function () {
+          self.tableHeight =
+            window.innerHeight - self.$refs.table.$el.offsetTop - 200;
+          if (self.tableHeight <= 530) {
+            self.tableHeight = 530;
+          }
+        };
+      });
+    },
+    methods: {
+      //获取教研室列表
+      selectGrage() {
+        let params = {
+          oid: this.oid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
+          .then((res) => {
+            this.grade = res.data[0];
+          })
+          .catch((err) => {
+            this.isLoading = false;
+            console.error(err);
+          });
+      },
+      tableRowClassName({ row, rowIndex }) {
+        if ((rowIndex + 1) % 2 === 0) {
+          return "even_row";
+        } else {
+          return "";
+        }
+      },
+      handleCurrentChange(val) {
+        this.page = val;
+        this.getClass();
+      },
+      handleClose(done) {
+        done();
+      },
+      time() {
+        if (!this.now) {
+          this.now = new Date().getTime();
+          return true;
+        } else {
+          let time = new Date().getTime();
+          if (time - this.now > 3000) {
+            this.now = time;
+            return true;
+          } else {
+            return false;
+          }
+        }
+      },
+      searchClass() {
+        this.page = 1;
+        this.getClass();
+      },
+      updateG(gid, id) {
+        this.gid = gid;
+        this.classid = id;
+        this.dialogVisibleGrade = true;
+      },
+      updateGrade() {
+        this.$confirm("确定修改吗?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            let params = [{
+              cid: this.gid,
+              student: JSON.stringify([this.classid])
+            }];
+            this.ajax
+              .post(this.$store.state.api + "addGradeClass", params)
+              .then((res) => {
+                this.gid = '';
+                this.classid = '';
+                this.dialogVisibleGrade = false
+                this.getClass();
+              })
+              .catch((err) => {
+                console.error(err);
+              });
+          })
+          .catch(() => { });
+      },
+      openUpdate(id, n) {
+        this.classid = id;
+        this.className1 = n;
+        this.dialogVisible1 = true;
+      },
+      //新增教研室
+      insertClass() {
+        let params = {
+          name: this.className,
+          oid: this.oid,
+          uid: this.userid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "insertTeacherOffice", params)
+          .then((res) => {
+            if (res.data[0] && res.data[0][0].classname == 1) {
+              this.$message({
+                message: "不能与其他教研室名称相同!",
+                type: "error",
+              });
+            } else {
+              this.$message({
+                message: "新增成功",
+                type: "success",
+              });
+              this.dialogVisible = false;
+              this.sClassName = "";
+              this.getClass();
+              this.className = "";
+            }
+          })
+          .catch((err) => {
+            this.$message({
+              message: "新增失败",
+              type: "error",
+            });
+            console.error(err);
+          });
+      },
+      //修改教研室
+      updateClass() {
+        let params = {
+          id: this.classid,
+          n: this.className1,
+          oid: this.oid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "updateTeacherOffice", params)
+          .then((res) => {
+            if (res.data[0] && res.data[0][0].classname == 1) {
+              this.$message({
+                message: "不能与其他教研室名称相同!",
+                type: "error",
+              });
+            } else {
+              this.$message({
+                message: "修改成功",
+                type: "success",
+              });
+              this.dialogVisible1 = false;
+              this.getClass();
+              this.classid = "";
+              this.className1 = "";
+            }
+          })
+          .catch((err) => {
+            this.$message({
+              message: "修改失败",
+              type: "error",
+            });
+            console.error(err);
+          });
+      },
+      //获取教研室列表
+      getClass() {
+        this.isLoading = true;
+        let params = {
+          // username: this.$store.state.userInfo.userid,
+          cu: "",
+          oid: this.oid,
+          cn: this.sClassName,
+          page: this.page,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectTeacherOffice", 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);
+          });
+      },
+      //删除教研室
+      deleteClass(id) {
+        let params = {
+          id: id,
+        };
+        if (this.time()) {
+          this.$confirm("确定删除此教研室吗?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning",
+          })
+            .then(() => {
+              this.ajax
+                .get(this.$store.state.api + "deleteClass", params)
+                .then((res) => {
+                  this.$message({
+                    message: "删除成功",
+                    type: "success",
+                  });
+                  if (this.page != 1 && this.tableData.length == 1) {
+                    this.page - 1;
+                  }
+                  this.getClass();
+                })
+                .catch((err) => {
+                  this.$message.error("删除失败");
+                  console.error(err);
+                });
+            })
+            .catch(() => { });
+        }
+      },
+      addStudent() {
+        // this.dialogVisibleAddStudent = true;
+        // (this.sName = ""), (this.sPhone = ""), (this.sByClass = ""), this.sMail;
+        // this.getClass2();
+        this.dialogVisibleMember = true
+        this.searchTN = ""
+        this.getClassStudent();
+      },
+      //新增老师
+      insertStudent() {
+        if (this.sName === "") {
+          this.$message.error("老师姓名不能为空");
+          return;
+        } else if (
+          this.sPhone != "" &&
+          !/^[1][3,4,5,7,8][0-9]{9}$/.test(this.sPhone)
+        ) {
+          this.$message.error("手机号格式不正确");
+          return;
+        } else if (
+          !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(this.sMail)
+        ) {
+          this.$message.error("邮箱格式不正确");
+          return;
+        }
+  
+        if (this.time()) {
+          let params = { un: this.sMail };
+          this.ajax
+            .get(this.$store.state.api + "findMail", params)
+            .then((res) => {
+              if (res.data[0].length > 0) {
+                this.$message.error("此老师账号已被注册");
+              } else {
+                this.add_Student();
+              }
+            })
+            .catch((err) => {
+              console.error(err);
+            });
+        }
+      },
+      add_Student() {
+        let params = [
+          {
+            username: this.sMail,
+            userpassword: 123456,
+            alias: this.sName,
+            oid: this.oid,
+            ph: this.sPhone,
+            sid: this.sId,
+            cid: this.cid,
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "batchRegistration", params)
+          .then((res) => {
+  
+            let params = [
+              {
+                userid: res.data.uid,
+                username: this.sName,
+                sid: this.sId,
+                type: 2,
+                oid: res.data.oid,
+                phone: res.data.ph,
+                cid: res.data.cid,
+                intro: "",
+                sex: "0",
+              },
+            ];
+            this.ajax
+              .post(this.$store.state.api + "updateUserByEdu", params)
+              .then((res) => {
+                console.log(res);
+              })
+              .catch((err) => {
+                console.error(err);
+              });
+            this.$message({
+              message: "新增成功",
+              type: "success",
+            });
+            this.dialogVisibleAddStudent = false;
+            this.sPhone = "";
+            this.sName = "";
+            this.sByClass = [];
+            this.sMail = "";
+            this.getStudent(this.cid);
+          })
+          .catch((err) => {
+            this.isLoading = false;
+            this.$message({
+              message: "新增失败",
+              type: "error",
+            });
+            console.error(err);
+          });
+      },
+      updateStudentA(res) {
+        this.userinfo = JSON.parse(JSON.stringify(res));
+        this.userinfoA = JSON.parse(JSON.stringify(res));
+        this.userinfo.classid = this.userinfo.classid.split(",")
+        this.dialogVisibleUpdate = true;
+      },
+      updateStudent() {
+        if (this.userinfo.name === "") {
+          this.$message.error("老师姓名不能为空");
+          return;
+        } else if (!this.userinfo.classid) {
+          this.$message.error("请为老师选择教研室");
+          return;
+        } else if (
+          this.userinfo.phonenumber &&
+          !/^[1][3,4,5,7,8][0-9]{9}$/.test(this.userinfo.phonenumber)
+        ) {
+          this.$message.error("手机号格式不正确");
+          return;
+        } else if (
+          !/^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/.test(
+            this.userinfo.un
+          )
+        ) {
+          this.$message.error("邮箱格式不正确");
+          return;
+        }
+  
+        if (this.time()) {
+          if (this.userinfoA.un != this.userinfo.un) {
+            let params = { un: this.userinfo.un };
+            this.ajax
+              .get(this.$store.state.api + "findMail", params)
+              .then((res) => {
+                if (res.data[0].length > 0) {
+                  this.$message.error("此老师账号已被注册");
+                } else {
+                  this.update_Student();
+                }
+              })
+              .catch((err) => {
+                console.error(err);
+              });
+          } else {
+            this.update_Student();
+          }
+        }
+      },
+      update_Student() {
+        let params = [
+          {
+            userid: this.userinfo.userid,
+            username: this.userinfo.un,
+            alias: this.userinfo.name,
+            ph: this.userinfo.phonenumber,
+            sid: this.userinfo.studentid,
+            cid: this.userinfo.classid.join(","),
+          },
+        ];
+        this.ajax
+          .post(this.$store.state.api + "updateStudentInfo", params)
+          .then((res) => {
+            this.$message({
+              message: "修改成功",
+              type: "success",
+            });
+            this.dialogVisibleUpdate = false;
+            this.getStudent(this.cid);
+          })
+          .catch((err) => {
+            this.isLoading = false;
+            this.$message({
+              message: "修改失败",
+              type: "error",
+            });
+            console.error(err);
+          });
+      },
+      deleteClassStudent(id) {
+        let params = [{ uid: id, cid: this.cid }];
+        this.$confirm("确定在本教研室移除此老师吗?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            this.ajax
+              .post(this.$store.state.api + "deleteClassTeacher", params)
+              .then((res) => {
+                this.$message({
+                  message: "操作成功",
+                  type: "success",
+                });
+                this.getStudent(this.cid);
+              })
+              .catch((err) => {
+                this.$message.error("操作失败");
+                console.error(err);
+              });
+          })
+          .catch(() => { });
+      },
+      //获取教研室列表
+      getClass2() {
+        this.isLoading = true;
+        let params = {
+          oid: this.oid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
+          .then((res) => {
+            this.isLoading = false;
+            this.classJuri = res.data[0];
+          })
+          .catch((err) => {
+            this.isLoading = false;
+            console.error(err);
+          });
+      },
+      getSchoolName() {
+        let params = {
+          oid: this.oid,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectSchoolName2", params)
+          .then((res) => {
+            this.schoolName = res.data[0][0].name;
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      searchStudent() {
+        this.page2 = 1;
+        this.getStudent(this.cid);
+      },
+      handleCurrentChange2(val) {
+        this.page2 = val;
+        this.getStudent(this.cid);
+      },
+      handleCurrentChange3(val) {
+        this.page3 = val;
+        this.getClassStudent();
+      },
+      getStudent(cid) {
+        this.cid = cid
+        this.ctype = 2
+        this.isLoading = true;
+        let params = {
+          oid: this.oid,
+          cid: this.cid,
+          cu: "",
+          cn: this.sPhoneUser,
+          page: this.page2,
+        };
+        this.ajax
+          .get(this.$store.state.api + "selectTeacher2", params)
+          .then((res) => {
+            this.isLoading = false;
+            this.total2 = res.data[0].length > 0 ? res.data[0][0].num : 0;
+            this.tableData2 = res.data[0];
+            this.getClass2();
+          })
+          .catch((err) => {
+            this.isLoading = false;
+            console.error(err);
+          });
+      },
+      getClassStudent() {
+        this.isLoading2 = true;
+        let params = {
+          oid: this.oid,
+          cid: this.cid,
+          cn: this.searchTN,
+          page: this.page3,
+          num: this.pageSize3,
+        };
+        this.ajax
+          .get(this.$store.state.api + "getClassTeacher", params)
+          .then((res) => {
+            this.isLoading2 = false;
+            this.total3 = res.data[0].length > 0 ? res.data[0][0].num : 0;
+            this.teacherJuri = res.data[0];
+          })
+          .catch((err) => {
+            this.isLoading2 = false;
+            console.error(err);
+          });
+      },
+      addClassStudent() {
+        if (!this.checkboxList3.length) {
+          this.$message.error('请选择要添加教研室的老师');
+          return;
+        }
+        let params = [{
+          cid: this.cid,
+          student: JSON.stringify(this.checkboxList3)
+        }];
+        this.ajax
+          .post(this.$store.state.api + "addClassTeacher", params)
+          .then((res) => {
+            this.$message.success("添加成功")
+            this.checkboxList3 = []
+            this.dialogVisibleMember = false
+            this.getStudent(this.cid)
+          })
+          .catch((err) => {
+            console.error(err);
+          });
+      },
+      iniPassword(id) {
+        this.$confirm("确定" + "初始化" + "此老师的密码吗?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            let params = [
+              {
+                uid: id,
+                pa: 123456,
+              },
+            ];
+            this.ajax
+              .post(this.$store.state.api + "iniPassword", params)
+              .then((res) => {
+                this.$message({
+                  message: "初始化密码成功!",
+                  type: "success",
+                });
+              })
+              .catch((err) => {
+                console.error(err);
+              });
+          })
+          .catch(() => { });
+      },
+    },
+  };
+  </script>
+  
+  <style scoped>
+  .dialog_diy>>>.el-dialog__header {
+    background: #3d67bc !important;
+    padding: 15px 20px;
+  }
+  
+  .dialog_diy>>>.el-dialog__title {
+    color: #fff;
+  }
+  
+  .student_table>>>.el-table--border td {
+    border-right: 0px !important;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn {
+    top: 19px;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
+    color: #fff;
+  }
+  
+  .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
+    color: #fff;
+  }
+  
+  .student_head>>>.el-button--primary {
+    background-color: #2268bc;
+  }
+  
+  .xls_button {
+    font-size: 14px;
+    cursor: pointer;
+    text-decoration: underline;
+    color: rgb(34, 104, 188);
+  }
+  
+  .pb_head {
+    margin: 0 !important;
+    width: 100% !important;
+  }
+  
+  .student_page {
+    margin-top: 10px;
+  }
+  
+  .student_head {
+    margin-top: 10px;
+    padding-bottom: 15px;
+    display: flex;
+    justify-content: space-between;
+  }
+  
+  .student_search {
+    display: flex;
+    width: 300px;
+  }
+  
+  .student_search span {
+    margin: 0 10px 0 0;
+  }
+  
+  .student_button {
+    display: flex;
+    height: 40px;
+  }
+  
+  .student_button .el-button--primary {
+    /* margin-right: 10px; */
+  }
+  
+  .upload-demo {
+    display: flex;
+    flex-direction: column;
+    align-items: end;
+    /* position: relative; */
+    width: 100px;
+    overflow: hidden;
+  }
+  
+  .student_table {
+    margin: 20px 0;
+  }
+  
+  .el-table>>>.even_row {
+    background-color: #f1f1f1;
+  }
+  
+  .top {
+    display: flex;
+    justify-content: space-between;
+  }
+  
+  .bgColor {
+    background: #2167bc;
+  }
+  
+  .student_table>>>.el-table,
+  .student_table>>>.el-table__body-wrapper {
+    height: auto !important;
+  }
+  
+  .student_head {
+    margin-top: 10px;
+    padding-bottom: 10px;
+    display: flex;
+    justify-content: space-between;
+  }
+  
+  .head_left {
+    display: flex;
+    align-items: center;
+  }
+  
+  .head_right {
+    display: flex;
+    flex-direction: row;
+    flex-wrap: nowrap;
+    align-items: baseline;
+  }
+  
+  .student_input>>>.el-input__inner {
+    width: 190px;
+    font-size: 13px;
+    padding: 0 10px;
+  }
+  
+  .student_button {
+    color: #fff;
+    background: #2268bc;
+  }
+  
+  .head_right>button:nth-child(1) {
+    color: #fff;
+    background: #2268bc;
+  }
+  
+  
+  .head_right>div {
+    line-height: 40px;
+    margin-left: 10px;
+    color: #2a6dbe;
+    text-decoration: underline;
+    cursor: pointer;
+  }
+  
+  .userImg {
+    display: flex;
+    flex-direction: row;
+    justify-content: center;
+    align-items: center;
+  }
+  
+  .tx {
+    width: 40px;
+    margin-right: 10px;
+  }
+  
+  .delete {
+    width: 25px;
+    height: 25px;
+    cursor: pointer;
+    margin-left: 10px;
+  }
+  
+  .tx>img,
+  .delete>img {
+    width: 100%;
+    height: 100%;
+  }
+  
+  .btnBox {
+    display: flex;
+    align-items: center;
+  }
+  
+  .add_student>>>.el-dialog__header {
+    padding: 20px 20px 10px;
+    text-align: center;
+    background: #32455b;
+  }
+  
+  .add_student>>>.el-dialog__title {
+    font-size: 14px !important;
+    color: #fff !important;
+  }
+  
+  .add_student>>>.el-dialog__headerbtn {
+    font-size: 20px !important;
+  }
+  
+  .add_student>>>.el-form-item__label {
+    margin-left: 65px;
+  }
+  
+  .add_student>>>.el-form-item {
+    display: flex;
+  }
+  
+  .add_student>>>.el-form-item__content {
+    margin: 0 !important;
+  }
+  
+  .add_input {
+    width: 365px;
+  }
+  
+  .add_student>>>.el-dialog__footer {
+    text-align: center !important;
+  }
+  
+  .right {
+    width: 250px;
+    color: #fff;
+    background: #0e72e6;
+    margin-bottom: 20px;
+  }
+  
+  .header-title {
+    display: flex;
+  }
+  
+  .logoImg {
+    width: 30px;
+  }
+  
+  .logoImg>img {
+    width: 100%;
+    height: 100%;
+  }
+  
+  .title_add_student {
+    margin: 0 auto;
+    color: #fff;
+  }
+  
+  .upload-demo {
+    line-height: 0px !important;
+  }
+  
+  .upload-demo>>>.el-button {
+    color: #fff;
+    background: #2268bc;
+    width: 70px;
+    height: 30px;
+    padding: 0 !important;
+    font-size: 12px;
+    line-height: 0 !important;
+  }
+  
+  .people {
+    border: 1px solid rgb(229 229 229);
+    height: 495px;
+    border-radius: 5px;
+    width: 100%;
+    overflow: auto;
+  }
+  
+  .people_top {
+    display: flex;
+    width: 100%;
+    /* justify-content: space-between; */
+    /* align-items: center; */
+    flex-direction: column;
+    padding: 10px 25px 0;
+    box-sizing: border-box;
+  }
+  
+  .people_nav,
+  .people_top_right {
+    /* padding: 20px 0 0 20px; */
+  }
+  
+  .people_top_right {
+    height: 40px;
+    margin-bottom: 10px;
+  }
+  
+  .people_search {
+    display: flex;
+    position: relative;
+  }
+  
+  .people_search>>>.el-input__inner {
+    /* height: 25px; */
+    width: 95%;
+  }
+  
+  .search_img {
+    width: 20px;
+    height: 20px;
+    position: absolute;
+    right: 30px;
+    top: 50%;
+    transform: translateY(-50%);
+  }
+  
+  .search_img>img {
+    width: 100%;
+    height: 100%;
+  }
+  
+  .people_name {
+    display: flex;
+    justify-content: flex-start;
+    padding: 10px 0 0 25px;
+    flex-direction: column;
+    flex-wrap: nowrap;
+    height: calc(100% - 140px);
+    overflow-y: auto;
+    overflow-x: hidden;
+    flex-direction: column;
+  }
+  
+  .people_name>>>.el-checkbox {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    margin-bottom: 10px;
+  }
+  
+  .people_name>>>.el-checkbox__label {
+    text-overflow: ellipsis;
+    overflow: hidden;
+    width: 100%;
+  }
+  
+  .addNewPP>>>.el-dialog__body {
+    padding: 5px 20px;
+  }
+  
+  .t_j_box {
+    display: flex;
+  }
+  
+  .t_j_box span:nth-child(1) {
+    width: 50%;
+    overflow: hidden;
+    margin-right: 10px;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  
+  .t_j_box span:nth-child(2) {
+    width: 50%;
+    overflow: hidden;
+    margin-right: 10px;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+  }
+  </style>
+  

+ 8 - 0
src/router/index.js

@@ -3,6 +3,7 @@ import Router from 'vue-router'
 import ElementUI from 'element-ui'
 import ElementUI from 'element-ui'
 import 'element-ui/lib/theme-chalk/index.css'
 import 'element-ui/lib/theme-chalk/index.css'
 import classA from '@/components/pages/class'
 import classA from '@/components/pages/class'
+import teacherOffice from '@/components/pages/teacherOffice'
 import grade from '@/components/pages/grade'
 import grade from '@/components/pages/grade'
 import classGM from '@/components/pages/classGM'
 import classGM from '@/components/pages/classGM'
 import course from '@/components/pages/course'
 import course from '@/components/pages/course'
@@ -114,6 +115,13 @@ export default new Router({
             meta: {
             meta: {
                 requireAuth: ''
                 requireAuth: ''
             }
             }
+        },{
+            path: '/teacherOffice',
+            name: 'teacherOffice',
+            component: teacherOffice,
+            meta: {
+                requireAuth: ''
+            }
         }, 
         }, 
         {
         {
             path: '/classGM',
             path: '/classGM',

Some files were not shown because too many files changed in this diff