lsc 1 年之前
父節點
當前提交
eca974c23d

+ 1 - 1
dist/index.html

@@ -18,7 +18,7 @@
       border-radius: 10px;
       -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
       background-color: rgba(0, 0, 0, 0.1);
-    }</style><link href=./static/css/app.586a8dbedaa4ab1fec6e0b7c0e9ec4fb.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.e81042531bab735dba9a.js></script><script type=text/javascript src=./static/js/app.3302ca586d6660d066cf.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.0db680e26a1bcc3e647815911377e562.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.e81042531bab735dba9a.js></script><script type=text/javascript src=./static/js/app.0738897b9cf870206af8.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.0db680e26a1bcc3e647815911377e562.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.0db680e26a1bcc3e647815911377e562.css.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.586a8dbedaa4ab1fec6e0b7c0e9ec4fb.css.map


二進制
dist/static/img/pickPeople.bcaffba.png


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.0738897b9cf870206af8.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.0738897b9cf870206af8.js.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.3302ca586d6660d066cf.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 9 - 2
src/components/courseDetail.vue

@@ -313,7 +313,7 @@
                               第{{ index + 1 }}阶段 {{ item.name }}
                             </div>
                           </el-tooltip>
-                          <div
+                          <!-- <div
                             style="
                               font-size: 14px;
                               font-weight: 400;
@@ -322,7 +322,7 @@
                             "
                           >
                             查看
-                          </div>
+                          </div> -->
                         </div>
                       </div>
 
@@ -643,6 +643,13 @@
                                 />
                                 <div>海龟编程</div>
                               </div>
+                              <div v-if="item3.tool == 65">
+                                <img
+                                  src="../assets/icon/firstToolList/pickPeople.png"
+                                  alt
+                                />
+                                <div>挑人</div>
+                              </div>
                               <div v-if="item3.tool == undefined">
                                 <img
                                   src="../assets/icon/empytool.png"

+ 220 - 44
src/components/easy2/studyStudent.vue

@@ -755,6 +755,28 @@
                           </div>
                         </div>
                       </div>
+                      <div class="tool">
+                          <div class="whiteBIcon" @click="addTools2(65)">
+                            <img
+                              src="../../assets/icon/firstToolList/pickPeople.png"
+                              alt
+                            />
+                            <div style="margin: 5px 0">挑人</div>
+                          </div>
+                          <div class="check" @click="addTools2(65)">
+                            <img
+                              src="../../assets/icon/checkNo.png"
+                              alt
+                              v-if="checktoolArray.indexOf(65) == -1"
+                            />
+                            <div class="checkDiv" v-else>
+                              <img
+                                src="../../assets/icon/checkedIs.png"
+                                alt
+                              /><span>已选择</span>
+                            </div>
+                          </div>
+                        </div>
                     </div>
                     <div class="toolSort" v-if="toolType == 1">
                       <div class="tool">
@@ -1801,6 +1823,14 @@
                             />
                             <div style="margin: 5px 0">海龟编程</div>
                           </div>
+                          <div v-if="tooC == 65">
+                            <img
+                              @click="addTools(tooC, toolIndex, taskCount)"
+                              src="../../assets/icon/firstToolList/pickPeople.png"
+                              alt
+                            />
+                            <div style="margin: 5px 0">挑人</div>
+                          </div>
                         </div>
                       </div>
                     </div>
@@ -5863,17 +5893,6 @@
                   "
                   class="worksBox"
                 >
-                  <div class="noWorksS">
-                    <div
-                      v-for="(s, sIndex) in noWorksS[toolIndex]"
-                      :key="sIndex"
-                      class="noWorksName"
-                      @click="teacherWorkSubmit(48, toolIndex, taskCount, s)"
-                      :class="{ isWork: s.type == '2' }"
-                    >
-                      {{ s.student }}
-                    </div>
-                  </div>
                   <div
                     class="zuoyeYulan"
                     v-if="
@@ -5999,6 +6018,17 @@
                       </div>
                     </div>
                   </div>
+                  <div class="noWorksS">
+                    <div
+                      v-for="(s, sIndex) in noWorksS[toolIndex]"
+                      :key="sIndex"
+                      class="noWorksName"
+                      @click="teacherWorkSubmit(48, toolIndex, taskCount, s)"
+                      :class="{ isWork: s.type == '2' }"
+                    >
+                      {{ s.student }}
+                    </div>
+                  </div>
                 </div>
                 <div
                   v-if="
@@ -6010,17 +6040,6 @@
                   "
                   class="worksBox"
                 >
-                  <div class="noWorksS">
-                    <div
-                      v-for="(s, sIndex) in noWorksS[toolIndex]"
-                      :key="sIndex"
-                      class="noWorksName"
-                      @click="teacherWorkSubmit(52, toolIndex, taskCount, s)"
-                      :class="{ isWork: s.type == '2' }"
-                    >
-                      {{ s.student }}
-                    </div>
-                  </div>
                   <div
                     class="zuoyeYulan"
                     v-if="
@@ -6146,6 +6165,17 @@
                       </div>
                     </div>
                   </div>
+                  <div class="noWorksS">
+                    <div
+                      v-for="(s, sIndex) in noWorksS[toolIndex]"
+                      :key="sIndex"
+                      class="noWorksName"
+                      @click="teacherWorkSubmit(52, toolIndex, taskCount, s)"
+                      :class="{ isWork: s.type == '2' }"
+                    >
+                      {{ s.student }}
+                    </div>
+                  </div>
                 </div>
               </div>
             </div>
@@ -8182,17 +8212,6 @@
                   "
                   class="worksBox"
                 >
-                  <div class="noWorksS">
-                    <div
-                      v-for="(s, sIndex) in noWorksS[toolIndex]"
-                      :key="sIndex"
-                      class="noWorksName"
-                      @click="teacherWorkSubmit(48, toolIndex, taskCount, s)"
-                      :class="{ isWork: s.type == '2' }"
-                    >
-                      {{ s.student }}
-                    </div>
-                  </div>
                   <div
                     class="zuoyeYulan"
                     v-if="
@@ -8316,6 +8335,17 @@
                       </div>
                     </div>
                   </div>
+                  <div class="noWorksS">
+                    <div
+                      v-for="(s, sIndex) in noWorksS[toolIndex]"
+                      :key="sIndex"
+                      class="noWorksName"
+                      @click="teacherWorkSubmit(48, toolIndex, taskCount, s)"
+                      :class="{ isWork: s.type == '2' }"
+                    >
+                      {{ s.student }}
+                    </div>
+                  </div>
                 </div>
                 <div
                   v-if="
@@ -8327,17 +8357,6 @@
                   "
                   class="worksBox"
                 >
-                  <div class="noWorksS">
-                    <div
-                      v-for="(s, sIndex) in noWorksS[toolIndex]"
-                      :key="sIndex"
-                      class="noWorksName"
-                      @click="teacherWorkSubmit(52, toolIndex, taskCount, s)"
-                      :class="{ isWork: s.type == '2' }"
-                    >
-                      {{ s.student }}
-                    </div>
-                  </div>
                   <div
                     class="zuoyeYulan"
                     v-if="
@@ -8461,6 +8480,17 @@
                       </div>
                     </div>
                   </div>
+                  <div class="noWorksS">
+                    <div
+                      v-for="(s, sIndex) in noWorksS[toolIndex]"
+                      :key="sIndex"
+                      class="noWorksName"
+                      @click="teacherWorkSubmit(52, toolIndex, taskCount, s)"
+                      :class="{ isWork: s.type == '2' }"
+                    >
+                      {{ s.student }}
+                    </div>
+                  </div>
                 </div>
               </div>
             </div>
@@ -11571,6 +11601,18 @@
       :dialogVisibleWordCloud.sync="dialogVisibleWordCloud"
       :data="wordCloudData"
     ></wordCloud>
+    <el-dialog
+      title="挑人"
+      :visible.sync="dialogVisiblePickPeople"
+      width="650px"
+      :before-close="handleClose"
+      class="dialog_diy"
+      center
+    >
+      <div class="pick_box">
+        <div class="noWorksName" :class="{isSelectName: isPickStudent.indexOf(item.userid) !== -1}" v-for="(item,index) in uploadStudentJuri" :key="index" @click="pickStudent(item)">{{item.name}}</div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -11646,6 +11688,7 @@ export default {
       dialogVisibleDeleteGroup: false,
       dialogVisibleSname: false,
       dialogVisibleVideo: false,
+      dialogVisiblePickPeople: false,
       worksSName: "",
       classJuri: [],
       uploadStudentJuri: [],
@@ -11921,6 +11964,7 @@ export default {
       worksSid: "",
       dialogVisibleWordCloud: false,
       wordCloudData: [],
+      isPickStudent: [],
     };
   },
   methods: {
@@ -12602,6 +12646,28 @@ export default {
           console.error(err);
         });
     },
+    selectPickStudent() {
+      const loading = this.$loading.service({
+        background: "rgba(255, 255, 255, 0.7)",
+        target: document.body,
+      });
+      let params = {
+        cid: this.uploadCid,
+        oid: this.oid,
+        cn: "",
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSnameByCidGroup", params)
+        .then((res) => {
+          loading.close();
+          this.uploadStudentJuri = res.data[0]
+          this.dialogVisiblePickPeople = true;
+        })
+        .catch((err) => {
+          loading.close();
+          console.error(err);
+        });
+    },
     arrayToArray(arrayo, arrayt) {
       let array1 = arrayo;
       let array2 = arrayt;
@@ -15251,6 +15317,7 @@ export default {
           _this.selectSWorks(gindex);
           _this.selectStudent();
           _this.selectSLook();
+          _this.getPick();
           if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
             _this.setCTask();
           }
@@ -15270,6 +15337,7 @@ export default {
 
             _this.selectStudent();
             _this.selectSLook();
+            _this.getPick();
             if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
               _this.setCTask();
             }
@@ -16501,6 +16569,19 @@ export default {
         window.parent.postMessage({ tools: "61" }, "*");
       } else if (t == 63) {
         window.parent.postMessage({ tools: "63" }, "*");
+      } else if (t == 65) {
+        if (this.tType == 2) {
+          this.$message.error("不支持学生使用");
+          return;
+        }
+        this.uploadCid = this.tcid;
+        if (!this.uploadCid) {
+          this.$message.error(
+            "提示:未添加班级权限,请添加班级或从班级入口进入。"
+          );
+          return;
+        }
+        this.selectPickStudent()
       } else if (t == 26) {
         window.parent.postMessage(
           {
@@ -16632,6 +16713,14 @@ export default {
               )
             )
           : { text: "" };
+        if (this.worksStudent[i].length) {
+          for (var k = 0; k < this.worksStudent[i].length; k++) {
+            if (this.userid == this.worksStudent[i][k].userid) {
+              this.wordJson = JSON.parse(this.worksStudent[i][k].works);
+              break;
+            }
+          }
+        }
         this.dialogVisibleWord = true;
       } else if (t == 49) {
         this.groupJson =
@@ -16676,6 +16765,14 @@ export default {
               )
             )
           : { text: "" };
+        if (this.worksStudent[i].length) {
+          for (var k = 0; k < this.worksStudent[i].length; k++) {
+            if (this.sStudent.userid == this.worksStudent[i][k].userid) {
+              this.wordJson = JSON.parse(this.worksStudent[i][k].works);
+              break;
+            }
+          }
+        }
         this.dialogVisibleWordTeacher = true; //文档
       } else if (t == 4) {
         this.radio = [];
@@ -17795,6 +17892,78 @@ export default {
       this.wordCloudData = array;
       this.dialogVisibleWordCloud = true;
     },
+    pickStudent(stu){
+      if(this.isPickStudent.indexOf(stu.userid) !== -1){
+        return;
+      }
+      this.$confirm(`是否让${stu.name}同学回答问题?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let params = [{
+            uid:stu.userid,
+            cid:this.id,
+            stage:this.courseType,
+            task:this.taskCount,
+            tool:this.toolindex
+          }]
+          this.ajax
+            .post(this.$store.state.api + "updateCoursePick", params)
+            .then((res) => {
+              this.$message.success("操作成功")
+              this.getPick()
+            })
+            .catch((err) => {
+              this.$message.error("网络不佳");
+              console.error(err);
+            });
+        })
+        .catch(() => {});
+    },
+    getPick(){
+      let params = {
+        cid:this.id
+      }
+      this.ajax
+            .get(this.$store.state.api + "getPick", params)
+            .then((res) => {
+              let array = []
+              for(var i = 0; i < res.data[0].length;i++){
+                array.push(res.data[0][i].userid)
+              }
+              this.isPickStudent = array
+              if(array.indexOf(this.userid) !== -1){
+                this.$confirm("你被老师选到啦!", "提示", {
+                  confirmButtonText: "确定",
+                  showCancelButton:false,
+                  closeOnClickModal:false,
+                  type: "warning",
+                })
+                  .then(() => {
+                    let pa = [{
+                      uid: this.userid,
+                      cid: this.id
+                    }]
+                    this.ajax
+                      .post(this.$store.state.api + "deletePick", pa)
+                      .then((res) => {
+                        this.getPick()
+                      })
+                      .catch((err) => {
+                        this.$message.error("网络不佳");
+                        console.error(err);
+                      });
+                  })
+                  .catch(() => {});
+              }
+            })
+            .catch((err) => {
+              this.$message.error("网络不佳");
+              console.error(err);
+            });
+    }
   },
   directives: {
     // 使用局部注册指令的方式
@@ -19482,6 +19651,7 @@ export default {
   position: relative;
 }
 
+.isSelectName,
 .noWorksName:hover {
   background: #3383fa;
   color: #fff;
@@ -21687,4 +21857,10 @@ ol {
   float: right;
   margin-left: 10px;
 }
+
+.pick_box{
+  display: flex;
+  align-items: flex-start;
+  flex-wrap: wrap;
+}
 </style>

+ 220 - 44
src/components/easy3/studyStudent.vue

@@ -741,6 +741,28 @@
                           </div>
                         </div>
                       </div>
+                      <div class="tool">
+                          <div class="whiteBIcon" @click="addTools2(65)">
+                            <img
+                              src="../../assets/icon/firstToolList/pickPeople.png"
+                              alt
+                            />
+                            <div style="margin: 5px 0">挑人</div>
+                          </div>
+                          <div class="check" @click="addTools2(65)">
+                            <img
+                              src="../../assets/icon/checkNo.png"
+                              alt
+                              v-if="checktoolArray.indexOf(65) == -1"
+                            />
+                            <div class="checkDiv" v-else>
+                              <img
+                                src="../../assets/icon/checkedIs.png"
+                                alt
+                              /><span>已选择</span>
+                            </div>
+                          </div>
+                        </div>
                     </div>
                     <div class="toolSort" v-if="toolType == 1">
                       <div class="tool">
@@ -1791,6 +1813,14 @@
                             />
                             <div style="margin: 5px 0">海龟编程</div>
                           </div>
+                          <div v-if="tooC == 65">
+                            <img
+                              @click="addTools(tooC, toolIndex, taskCount)"
+                              src="../../assets/icon/firstToolList/pickPeople.png"
+                              alt
+                            />
+                            <div style="margin: 5px 0">挑人</div>
+                          </div>
                         </div>
                       </div>
                     </div>
@@ -5853,17 +5883,6 @@
                   "
                   class="worksBox"
                 >
-                  <div class="noWorksS">
-                    <div
-                      v-for="(s, sIndex) in noWorksS[toolIndex]"
-                      :key="sIndex"
-                      class="noWorksName"
-                      @click="teacherWorkSubmit(48, toolIndex, taskCount, s)"
-                      :class="{ isWork: s.type == '2' }"
-                    >
-                      {{ s.student }}
-                    </div>
-                  </div>
                   <div
                     class="zuoyeYulan"
                     v-if="
@@ -5989,6 +6008,17 @@
                       </div>
                     </div>
                   </div>
+                  <div class="noWorksS">
+                    <div
+                      v-for="(s, sIndex) in noWorksS[toolIndex]"
+                      :key="sIndex"
+                      class="noWorksName"
+                      @click="teacherWorkSubmit(48, toolIndex, taskCount, s)"
+                      :class="{ isWork: s.type == '2' }"
+                    >
+                      {{ s.student }}
+                    </div>
+                  </div>
                 </div>
                 <div
                   v-if="
@@ -6000,17 +6030,6 @@
                   "
                   class="worksBox"
                 >
-                  <div class="noWorksS">
-                    <div
-                      v-for="(s, sIndex) in noWorksS[toolIndex]"
-                      :key="sIndex"
-                      class="noWorksName"
-                      @click="teacherWorkSubmit(52, toolIndex, taskCount, s)"
-                      :class="{ isWork: s.type == '2' }"
-                    >
-                      {{ s.student }}
-                    </div>
-                  </div>
                   <div
                     class="zuoyeYulan"
                     v-if="
@@ -6136,6 +6155,17 @@
                       </div>
                     </div>
                   </div>
+                  <div class="noWorksS">
+                    <div
+                      v-for="(s, sIndex) in noWorksS[toolIndex]"
+                      :key="sIndex"
+                      class="noWorksName"
+                      @click="teacherWorkSubmit(52, toolIndex, taskCount, s)"
+                      :class="{ isWork: s.type == '2' }"
+                    >
+                      {{ s.student }}
+                    </div>
+                  </div>
                 </div>
               </div>
             </div>
@@ -8172,17 +8202,6 @@
                   "
                   class="worksBox"
                 >
-                  <div class="noWorksS">
-                    <div
-                      v-for="(s, sIndex) in noWorksS[toolIndex]"
-                      :key="sIndex"
-                      class="noWorksName"
-                      @click="teacherWorkSubmit(48, toolIndex, taskCount, s)"
-                      :class="{ isWork: s.type == '2' }"
-                    >
-                      {{ s.student }}
-                    </div>
-                  </div>
                   <div
                     class="zuoyeYulan"
                     v-if="
@@ -8306,6 +8325,17 @@
                       </div>
                     </div>
                   </div>
+                  <div class="noWorksS">
+                    <div
+                      v-for="(s, sIndex) in noWorksS[toolIndex]"
+                      :key="sIndex"
+                      class="noWorksName"
+                      @click="teacherWorkSubmit(48, toolIndex, taskCount, s)"
+                      :class="{ isWork: s.type == '2' }"
+                    >
+                      {{ s.student }}
+                    </div>
+                  </div>
                 </div>
                 <div
                   v-if="
@@ -8317,17 +8347,6 @@
                   "
                   class="worksBox"
                 >
-                  <div class="noWorksS">
-                    <div
-                      v-for="(s, sIndex) in noWorksS[toolIndex]"
-                      :key="sIndex"
-                      class="noWorksName"
-                      @click="teacherWorkSubmit(52, toolIndex, taskCount, s)"
-                      :class="{ isWork: s.type == '2' }"
-                    >
-                      {{ s.student }}
-                    </div>
-                  </div>
                   <div
                     class="zuoyeYulan"
                     v-if="
@@ -8451,6 +8470,17 @@
                       </div>
                     </div>
                   </div>
+                  <div class="noWorksS">
+                    <div
+                      v-for="(s, sIndex) in noWorksS[toolIndex]"
+                      :key="sIndex"
+                      class="noWorksName"
+                      @click="teacherWorkSubmit(52, toolIndex, taskCount, s)"
+                      :class="{ isWork: s.type == '2' }"
+                    >
+                      {{ s.student }}
+                    </div>
+                  </div>
                 </div>
               </div>
             </div>
@@ -11561,6 +11591,18 @@
       :dialogVisibleWordCloud.sync="dialogVisibleWordCloud"
       :data="wordCloudData"
     ></wordCloud>
+    <el-dialog
+      title="挑人"
+      :visible.sync="dialogVisiblePickPeople"
+      width="650px"
+      :before-close="handleClose"
+      class="dialog_diy"
+      center
+    >
+      <div class="pick_box">
+        <div class="noWorksName" :class="{isSelectName: isPickStudent.indexOf(item.userid) !== -1}" v-for="(item,index) in uploadStudentJuri" :key="index" @click="pickStudent(item)">{{item.name}}</div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -11636,6 +11678,7 @@ export default {
       dialogVisibleDeleteGroup: false,
       dialogVisibleSname: false,
       dialogVisibleVideo: false,
+      dialogVisiblePickPeople: false,
       isClose: 0,
       worksSName: "",
       classJuri: [],
@@ -11911,6 +11954,7 @@ export default {
       worksSid: "",
       dialogVisibleWordCloud: false,
       wordCloudData: [],
+      isPickStudent: [],
     };
   },
   methods: {
@@ -12592,6 +12636,28 @@ export default {
           console.error(err);
         });
     },
+    selectPickStudent() {
+      const loading = this.$loading.service({
+        background: "rgba(255, 255, 255, 0.7)",
+        target: document.body,
+      });
+      let params = {
+        cid: this.uploadCid,
+        oid: this.oid,
+        cn: "",
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSnameByCidGroup", params)
+        .then((res) => {
+          loading.close();
+          this.uploadStudentJuri = res.data[0]
+          this.dialogVisiblePickPeople = true;
+        })
+        .catch((err) => {
+          loading.close();
+          console.error(err);
+        });
+    },
     arrayToArray(arrayo, arrayt) {
       let array1 = arrayo;
       let array2 = arrayt;
@@ -15117,6 +15183,7 @@ export default {
           _this.selectSWorks(gindex);
           _this.selectStudent();
           _this.selectSLook();
+          _this.getPick();
           if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
             _this.setCTask();
           }
@@ -15136,6 +15203,7 @@ export default {
 
             _this.selectStudent();
             _this.selectSLook();
+            _this.getPick();
             if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
               _this.setCTask();
             }
@@ -16367,6 +16435,19 @@ export default {
         window.parent.postMessage({ tools: "61" }, "*");
       } else if (t == 63) {
         window.parent.postMessage({ tools: "63" }, "*");
+      } else if (t == 65) {
+        if (this.tType == 2) {
+          this.$message.error("不支持学生使用");
+          return;
+        }
+        this.uploadCid = this.tcid;
+        if (!this.uploadCid) {
+          this.$message.error(
+            "提示:未添加班级权限,请添加班级或从班级入口进入。"
+          );
+          return;
+        }
+        this.selectPickStudent()
       } else if (t == 26) {
         window.parent.postMessage(
           {
@@ -16498,6 +16579,14 @@ export default {
               )
             )
           : { text: "" };
+        if (this.worksStudent[i].length) {
+          for (var k = 0; k < this.worksStudent[i].length; k++) {
+            if (this.userid == this.worksStudent[i][k].userid) {
+              this.wordJson = JSON.parse(this.worksStudent[i][k].works);
+              break;
+            }
+          }
+        }
         this.dialogVisibleWord = true;
       } else if (t == 49) {
         this.groupJson =
@@ -16542,6 +16631,14 @@ export default {
               )
             )
           : { text: "" };
+        if (this.worksStudent[i].length) {
+          for (var k = 0; k < this.worksStudent[i].length; k++) {
+            if (this.sStudent.userid == this.worksStudent[i][k].userid) {
+              this.wordJson = JSON.parse(this.worksStudent[i][k].works);
+              break;
+            }
+          }
+        }
         this.dialogVisibleWordTeacher = true; //文档
       } else if (t == 4) {
         this.radio = [];
@@ -17661,6 +17758,78 @@ export default {
       this.wordCloudData = array;
       this.dialogVisibleWordCloud = true;
     },
+    pickStudent(stu){
+      if(this.isPickStudent.indexOf(stu.userid) !== -1){
+        return;
+      }
+      this.$confirm(`是否让${stu.name}同学回答问题?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let params = [{
+            uid:stu.userid,
+            cid:this.id,
+            stage:this.courseType,
+            task:this.taskCount,
+            tool:this.toolindex
+          }]
+          this.ajax
+            .post(this.$store.state.api + "updateCoursePick", params)
+            .then((res) => {
+              this.$message.success("操作成功")
+              this.getPick()
+            })
+            .catch((err) => {
+              this.$message.error("网络不佳");
+              console.error(err);
+            });
+        })
+        .catch(() => {});
+    },
+    getPick(){
+      let params = {
+        cid:this.id
+      }
+      this.ajax
+            .get(this.$store.state.api + "getPick", params)
+            .then((res) => {
+              let array = []
+              for(var i = 0; i < res.data[0].length;i++){
+                array.push(res.data[0][i].userid)
+              }
+              this.isPickStudent = array
+              if(array.indexOf(this.userid) !== -1){
+                this.$confirm("你被老师选到啦!", "提示", {
+                  confirmButtonText: "确定",
+                  showCancelButton:false,
+                  closeOnClickModal:false,
+                  type: "warning",
+                })
+                  .then(() => {
+                    let pa = [{
+                      uid: this.userid,
+                      cid: this.id
+                    }]
+                    this.ajax
+                      .post(this.$store.state.api + "deletePick", pa)
+                      .then((res) => {
+                        this.getPick()
+                      })
+                      .catch((err) => {
+                        this.$message.error("网络不佳");
+                        console.error(err);
+                      });
+                  })
+                  .catch(() => {});
+              }
+            })
+            .catch((err) => {
+              this.$message.error("网络不佳");
+              console.error(err);
+            });
+    }
   },
   directives: {
     // 使用局部注册指令的方式
@@ -19343,6 +19512,7 @@ export default {
   position: relative;
 }
 
+.isSelectName,
 .noWorksName:hover {
   background: #3383fa;
   color: #fff;
@@ -21569,4 +21739,10 @@ ol {
   float: right;
   margin-left: 10px;
 }
+
+.pick_box{
+  display: flex;
+  align-items: flex-start;
+  flex-wrap: wrap;
+}
 </style>

+ 160 - 0
src/components/studyStudent.vue

@@ -755,6 +755,28 @@
                             </div>
                           </div>
                         </div>
+                        <div class="tool">
+                          <div class="whiteBIcon" @click="addTools2(65)">
+                            <img
+                              src="../assets/icon/firstToolList/pickPeople.png"
+                              alt
+                            />
+                            <div style="margin: 5px 0">挑人</div>
+                          </div>
+                          <div class="check" @click="addTools2(65)">
+                            <img
+                              src="../assets/icon/checkNo.png"
+                              alt
+                              v-if="checktoolArray.indexOf(65) == -1"
+                            />
+                            <div class="checkDiv" v-else>
+                              <img
+                                src="../assets/icon/checkedIs.png"
+                                alt
+                              /><span>已选择</span>
+                            </div>
+                          </div>
+                        </div>
                       </div>
                       <div class="toolSort" v-if="toolType == 1">
                         <div class="tool">
@@ -1765,6 +1787,14 @@
                             />
                             <div style="margin: 5px 0">海龟编程</div>
                           </div>
+                          <div v-if="tooC == 65">
+                            <img
+                              @click="addTools(tooC, toolIndex, taskCount)"
+                              src="../assets/icon/firstToolList/pickPeople.png"
+                              alt
+                            />
+                            <div style="margin: 5px 0">挑人</div>
+                          </div>
                         </div>
                       </div>
                     </div>
@@ -10172,6 +10202,18 @@
       :dialogVisibleWordCloud.sync="dialogVisibleWordCloud"
       :data="wordCloudData"
     ></wordCloud>
+    <el-dialog
+      title="挑人"
+      :visible.sync="dialogVisiblePickPeople"
+      width="650px"
+      :before-close="handleClose"
+      class="dialog_diy"
+      center
+    >
+      <div class="pick_box">
+        <div class="noWorksName" :class="{isSelectName: isPickStudent.indexOf(item.userid) !== -1}" v-for="(item,index) in uploadStudentJuri" :key="index" @click="pickStudent(item)">{{item.name}}</div>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -10248,6 +10290,7 @@ export default {
       dialogVisibleDeleteGroup: false,
       dialogVisibleSname: false,
       dialogVisibleVideo: false,
+      dialogVisiblePickPeople: false,
       worksSName: "",
       classJuri: [],
       uploadStudentJuri: [],
@@ -10524,6 +10567,7 @@ export default {
       worksSName2: "",
       worksSid: "",
       wordCloudData: [],
+      isPickStudent: [],
     };
   },
   methods: {
@@ -11361,6 +11405,28 @@ export default {
           console.error(err);
         });
     },
+    selectPickStudent() {
+      const loading = this.$loading.service({
+        background: "rgba(255, 255, 255, 0.7)",
+        target: document.body,
+      });
+      let params = {
+        cid: this.uploadCid,
+        oid: this.oid,
+        cn: "",
+      };
+      this.ajax
+        .get(this.$store.state.api + "selectSnameByCidGroup", params)
+        .then((res) => {
+          loading.close();
+          this.uploadStudentJuri = res.data[0]
+          this.dialogVisiblePickPeople = true;
+        })
+        .catch((err) => {
+          loading.close();
+          console.error(err);
+        });
+    },
     arrayToArray(arrayo, arrayt) {
       let array1 = arrayo;
       let array2 = arrayt;
@@ -14292,6 +14358,7 @@ export default {
 
           _this.selectStudent();
           _this.selectSLook();
+          _this.getPick();
           if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
             _this.setCTask();
           }
@@ -14316,6 +14383,7 @@ export default {
 
             _this.selectStudent();
             _this.selectSLook();
+            _this.getPick();
             if (_this.courseDetail.userid == _this.userid && _this.IsFollow) {
               _this.setCTask();
             }
@@ -15611,6 +15679,19 @@ export default {
         window.parent.postMessage({ tools: "61" }, "*");
       } else if (t == 63) {
         window.parent.postMessage({ tools: "63" }, "*");
+      } else if (t == 65) {
+        if (this.tType == 2) {
+          this.$message.error("不支持学生使用");
+          return;
+        }
+        this.uploadCid = this.tcid;
+        if (!this.uploadCid) {
+          this.$message.error(
+            "提示:未添加班级权限,请添加班级或从班级入口进入。"
+          );
+          return;
+        }
+        this.selectPickStudent()
       } else if (t == 26) {
         window.parent.postMessage(
           {
@@ -16762,6 +16843,78 @@ export default {
       this.wordCloudData = array;
       this.dialogVisibleWordCloud = true;
     },
+    pickStudent(stu){
+      if(this.isPickStudent.indexOf(stu.userid) !== -1){
+        return;
+      }
+      this.$confirm(`是否让${stu.name}同学回答问题?`, "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning",
+      })
+        .then(() => {
+          let params = [{
+            uid:stu.userid,
+            cid:this.id,
+            stage:this.courseType,
+            task:this.taskCount,
+            tool:this.toolindex
+          }]
+          this.ajax
+            .post(this.$store.state.api + "updateCoursePick", params)
+            .then((res) => {
+              this.$message.success("操作成功")
+              this.getPick()
+            })
+            .catch((err) => {
+              this.$message.error("网络不佳");
+              console.error(err);
+            });
+        })
+        .catch(() => {});
+    },
+    getPick(){
+      let params = {
+        cid:this.id
+      }
+      this.ajax
+            .get(this.$store.state.api + "getPick", params)
+            .then((res) => {
+              let array = []
+              for(var i = 0; i < res.data[0].length;i++){
+                array.push(res.data[0][i].userid)
+              }
+              this.isPickStudent = array
+              if(array.indexOf(this.userid) !== -1){
+                this.$confirm("你被老师选到啦!", "提示", {
+                  confirmButtonText: "确定",
+                  showCancelButton:false,
+                  closeOnClickModal:false,
+                  type: "warning",
+                })
+                  .then(() => {
+                    let pa = [{
+                      uid: this.userid,
+                      cid: this.id
+                    }]
+                    this.ajax
+                      .post(this.$store.state.api + "deletePick", pa)
+                      .then((res) => {
+                        this.getPick()
+                      })
+                      .catch((err) => {
+                        this.$message.error("网络不佳");
+                        console.error(err);
+                      });
+                  })
+                  .catch(() => {});
+              }
+            })
+            .catch((err) => {
+              this.$message.error("网络不佳");
+              console.error(err);
+            });
+    }
   },
   directives: {
     // 使用局部注册指令的方式
@@ -18481,6 +18634,7 @@ export default {
   border: 1px solid #CAD1DC !important;
 }
 
+.isSelectName,
 .noWorksName:hover {
   background: #3383fa !important;
   color: #fff !important;
@@ -20630,4 +20784,10 @@ ol {
   width: 100%;
   height: 100%;
 }
+
+.pick_box{
+  display: flex;
+  align-items: flex-start;
+  flex-wrap: wrap;
+}
 </style>

+ 10 - 1
src/components/wordCloud/index.vue

@@ -3,12 +3,13 @@
         <el-dialog title="词云" :visible.sync="dialogVisibleWordCloud" :append-to-body="true" width="800px"
             :before-close="handleClose" class="dialog_diy dialog_diy3">
             <div class="wordCloud__tagBall" :style="{ width: `500px`, height: `500px` }" @mouseenter="stop"
-                @mouseleave="start">
+                @mouseleave="start" v-if="data.length">
                 <span class="wordCloud__tag" v-for="(item, index) of data" :key="index"
                     :style="{ color: color[index % color.length], ...contentEle[index].style }"
                     :title="item.name ">{{ item.name }}</span>
                     <!-- + item.value -->
             </div>
+            <div class="noneBox" v-else>暂无内容</div>
         </el-dialog>
     </div>
 </template>
@@ -302,4 +303,12 @@ button {
     display: flex;
     justify-content: center;
 }
+
+.noneBox{
+    height:500px;
+    width:100%;
+    display:flex;
+    align-items:center;
+    justify-content:center;
+}
 </style>

部分文件因文件數量過多而無法顯示