2 Ревизии f3c4a902ad ... 4cc15a0e10

Автор SHA1 Съобщение Дата
  lsc 4cc15a0e10 Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-teacher-table into beta преди 1 седмица
  lsc bcf9f41555 update преди 1 седмица
променени са 2 файла, в които са добавени 178 реда и са изтрити 56 реда
  1. 7 7
      src/components/pages/aiEasy/addCourse.vue
  2. 171 49
      src/components/pages/easy/addCourse.vue

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

@@ -272,7 +272,7 @@
                     </div>
                   </div>
                   <div class="wb_j_box_content">
-                    <!-- <div class="wb_j_box_btn" @click="openMember">
+                    <div class="wb_j_box_btn" @click="openMember">
                       <div class="wb_j_box_title">协同人员</div>
                       <div class="wb_j_box_btn_c">
                         <el-tooltip effect="dark" :content="getListMan2(checkboxList3)" placement="top"
@@ -284,7 +284,7 @@
                         <div v-else class="wb_j_box_span">请选择协同人员</div>
                         <div class="wb_j_box_arrow"></div>
                       </div>
-                    </div> -->
+                    </div>
                   </div>
                 </div>
               </div>
@@ -26909,7 +26909,7 @@ ${msg}
   position: relative;
 }
 
-.people_search>>>.el-input__inner {
+.people_search >>> .el-input__inner {
   /* height: 25px; */
   width: 100%;
 }
@@ -26923,7 +26923,7 @@ ${msg}
   transform: translateY(-50%);
 }
 
-.search_img>img {
+.search_img > img {
   width: 100%;
   height: 100%;
 }
@@ -26940,20 +26940,20 @@ ${msg}
   position: relative;
 }
 
-.people_name>>>.el-checkbox {
+.people_name >>> .el-checkbox {
   width: 100%;
   display: flex;
   align-items: center;
   margin-bottom: 10px;
 }
 
-.people_name>>>.el-checkbox__label {
+.people_name >>> .el-checkbox__label {
   text-overflow: ellipsis;
   overflow: hidden;
   width: calc(100%);
 }
 
-.people_name2>>>.el-checkbox__label {
+.people_name2 >>> .el-checkbox__label {
   width: calc(100% - 130px);
 }
 

+ 171 - 49
src/components/pages/easy/addCourse.vue

@@ -231,6 +231,26 @@
                     </div>
                   </div>
                 </div>
+                <div class="wb_j_box_content">
+                  <div class="wb_j_box_btn" @click="openMember">
+                      <div class="wb_j_box_title">协同人员</div>
+                      <div class="wb_j_box_btn_c">
+                        <!-- <el-tooltip
+                          effect="dark"
+                          :content="getListMan2(checkboxList3)"
+                          placement="top"
+                          v-if="checkboxList3.length"
+                          popper-class="text_tooltip2"
+                        > -->
+                        <div class="wb_j_box_span" v-if="checkboxList3.length">
+                          {{ getListMan2(checkboxList3) }}
+                        </div>
+                        <!-- </el-tooltip> -->
+                        <div v-else class="wb_j_box_span">请选择协同人员</div>
+                        <div class="wb_j_box_arrow"></div>
+                      </div>
+                    </div>
+                </div>
                 <div style="margin-left: auto;">
                   <button
                     class="c_pub_button_add pub_btn_paste_img"
@@ -6561,49 +6581,82 @@
       :before-close="handleClose"
       class="addNewPP customWidth"
     >
-      <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="getTeacher"
-              ></el-input>
-              <div class="search_img" @click="getTeacher">
-                <img src="../../../assets/icon/search.png" alt />
-              </div>
-            </div>
+      <div style="display: flex;justify-content: space-between;">
+        <div style="width: 100px;overflow: auto;overflow-x: hidden; height: 350px;flex-shrink:0;padding-right: 10px;">
+          <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == ''}" @click="getTeacher('')">
+              全部
+          </div>
+          <div class="CollaborativeCss" :class="{CollaborativeCss2:i.id == collid}" @click="getTeacher(i.id)" v-for="(i) in CollaborativeTeaList" :key="i.id">
+            <el-tooltip
+              placement="top"
+              :content="i.name"
+              >
+              <span>{{i.name}}</span>
+            </el-tooltip>
+          </div>
+          <div class="CollaborativeCss" :class="{CollaborativeCss2:collid == '1xpz'}" @click="getTeacherCopy()">
+              其他
           </div>
-          <div class="people_nav">选择成员</div>
         </div>
-        <el-checkbox-group
-          v-model="checkboxList3"
-          class="people_name"
-          v-if="teacherJuri.length"
-        >
-          <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 : '暂无姓名'"
+        <div style="width: calc(100% - 100px);" v-loading="CollLoading">
+          <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="getTeacher(collid)"
+                    ></el-input>
+                    <div class="search_img" @click="getTeacher(collid)">
+                      <img src="../../../assets/icon/search.png" alt />
+                    </div>
+                  </div>
+                </div>
+                <div class="people_nav" style="display: flex; align-items: center">
+                  <div class="check_class_left_title">选择成员</div>
+                  <div style="display: flex; align-items: center; margin-left: auto">
+                    <el-checkbox
+                      v-model="checkAll2"
+                      @change="handleCheckAllChange2"
+                      class="all_check"
+                      >全选</el-checkbox
+                    >
+                  </div>
+                </div>
+              </div>
+              <el-checkbox-group
+                v-model="checkboxList3"
+                class="people_name"
+                v-if="teacherJuri.length"
+                @change="InviteChange2"
               >
-                <span>{{ item.name ? item.name : "暂无姓名" }}</span>
-              </el-tooltip>
-              <el-tooltip placement="top" :content="item.username">
-                <span>{{ item.username }}</span>
-              </el-tooltip>
-              <el-tooltip placement="top" :content="item.school">
-                <span>{{ item.school }}</span>
-              </el-tooltip>
+                <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.split('@')[0]">
+                      <span>{{ item.username.split('@')[0] }}</span>
+                    </el-tooltip>
+                    <el-tooltip placement="top" :content="item.school">
+                      <span>{{ item.school }}</span>
+                    </el-tooltip>
+                  </div>
+                </el-checkbox>
+              </el-checkbox-group>
+              <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
             </div>
-          </el-checkbox>
-        </el-checkbox-group>
-        <div style="text-align: center; margin-top: 10px" v-else>暂无数据</div>
+
+        </div>
+
       </div>
       <span slot="footer" class="dialog-footer">
         <el-button @click="dialogVisibleMember = false">取 消</el-button>
@@ -8390,6 +8443,7 @@ export default {
       publicTool: 0,
       searchPeople: "",
       searchTN: "",
+      collid: '',
       userid: this.$route.query.userid,
       oid: this.$route.query.oid,
       org: this.$route.query.org,
@@ -8629,6 +8683,23 @@ export default {
         return this.ManAarray.length ? _people2 : "";
       };
     },
+    getListMan2() {
+      return function (list) {
+        console.log('getListMan2',list);
+        let _people2 = [];
+        if (this.ManAarray.length) {
+          list.slice(0, 10).forEach(people => {
+            let data = this.ManAarray.find(man => man.userid === people && people !== this.courseUserid)
+            let name = data ? data.name || "" : "";
+            if (name) {
+              _people2.push(name);
+            }
+          });
+        }
+
+        return _people2.join("、");
+      };
+    },
     isInvite() {
       return function(cid) {
         let array = [];
@@ -10295,25 +10366,31 @@ export default {
           console.error(err);
         });
     },
-    getTeacher() {
+    getTeacher(val) {
+      this.CollLoading=true
+
+      this.collid = ''
+      this.collid = !val ? '' : val
       let params = {
         oid:
           this.org && this.org != "undefined" && this.org != "null"
             ? this.org
             : this.oid,
         cu: "",
-        cn: this.searchTN
+        cn: this.searchTN,
+        coll: this.collid
       };
       this.ajax
         .get(
           this.$store.state.api +
             (this.org && this.org != "undefined" && this.org != "null"
-              ? "selectTeacherAddOrg"
-              : "selectTeacherAdd"),
+              ? "selectCollaborativeMembersOrg"
+              : "selectCollaborativeMembers"),
           params
         )
-        .then(res => {
+        .then((res) => {
           let teacherJuri = res.data[0];
+          this.CollaborativeTeaList = res.data[1];
           for (var i = 0; i < teacherJuri.length; i++) {
             if (teacherJuri[i].userid == this.userid) {
               teacherJuri.splice(i, 1);
@@ -10321,9 +10398,32 @@ export default {
             }
           }
           this.teacherJuri = teacherJuri;
+
+          let _check = [];
+          let _check2 = [];
+          for (var i = 0; i < this.teacherJuri.length; i++) {
+            var gid = this.teacherJuri[i].userid;
+            _check.push(gid);
+          }
+          for (var i = 0; i < this.checkboxList3.length; i++) {
+            var _id = this.checkboxList3[i];
+            if (_check.indexOf(_id) !== -1) {
+              _check2.push(_id);
+            }
+          }
+
+          if (_check2.length==0 && _check.length==0) {
+
+          }else{
+            this.checkAll2 = _check2.length === _check.length;
+          }
+
+          this.CollLoading=false
+
         })
-        .catch(err => {
+        .catch((err) => {
           console.error(err);
+          this.CollLoading=false
         });
     },
     searchStudent() {
@@ -15245,7 +15345,8 @@ export default {
 
 .people {
   border: 1px solid rgb(229 229 229);
-  height: 495px;
+  /* height: 495px; */
+  height: 350px;
   border-radius: 5px;
   width: 100%;
   overflow: auto;
@@ -15278,14 +15379,14 @@ export default {
 
 .people_search >>> .el-input__inner {
   /* height: 25px; */
-  width: 95%;
+  width: 100%;
 }
 
 .search_img {
   width: 20px;
   height: 20px;
   position: absolute;
-  right: 30px;
+  right: 10px;
   top: 50%;
   transform: translateY(-50%);
 }
@@ -16066,7 +16167,28 @@ ol {
 }
 
 .customWidth >>> .el-dialog {
-  min-width: 500px !important;
+  min-width: 600px !important;
+}
+.CollaborativeCss {
+  width: 100%;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  box-sizing: border-box;
+  padding: 10px 0;
+  cursor: pointer;
+}
+
+.CollaborativeCss >>> .el-tooltip {
+  overflow: hidden;
+  white-space: nowrap;
+  text-overflow: ellipsis;
+}
+.CollaborativeCss2 {
+  background: #e0eafb;
+  color: #3681fc;
+  font-weight: 700;
+  border-radius: 5px;
 }
 
 .a_addBox {