Browse Source

新增作业收缩展开功能

zengyicheng 2 years ago
parent
commit
e5c8dec3a4
1 changed files with 467 additions and 37 deletions
  1. 467 37
      src/components/studyStudent.vue

+ 467 - 37
src/components/studyStudent.vue

@@ -276,11 +276,7 @@
                     <div class="title">查看文档</div>
                     <el-form class="textBox">
                       <el-form-item class="textTitle">
-                        <div
-                          style="
-                            font-size: 22px;
-                          "
-                        >
+                        <div style="font-size: 22px">
                           {{ text.name }}
                         </div>
                       </el-form-item>
@@ -1834,7 +1830,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -1859,7 +1872,10 @@
                           border-radius: 15px;
                           box-shadow: 0 0 6px 1px #dfdada;
                         "
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                         :class="w.type == 1 ? 'isTypeOne' : ''"
                       >
@@ -2030,6 +2046,13 @@
                           </div>
                         </div>
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -2060,7 +2083,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                     </div>
                     <div
                       class="worksDetailBox"
@@ -2078,7 +2118,10 @@
                           border-radius: 15px;
                           box-shadow: 0 0 6px 1px #dfdada;
                         "
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                         :class="w.type == 1 ? 'isTypeOne' : ''"
                       >
@@ -2160,6 +2203,13 @@
                           </div>
                         </div>
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -2467,7 +2517,25 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
+
                       <el-button
                         type="text"
                         @click="jump()"
@@ -2485,7 +2553,10 @@
                         "
                       >
                         <div
-                          v-for="(w, wIndex) in worksStudent[toolIndex]"
+                          v-for="(w, wIndex) in isCloseList[toolIndex]
+                            .isClose == 0
+                            ? worksStudent[toolIndex]
+                            : worksStudent[toolIndex].slice(0, 2)"
                           :key="wIndex"
                           class="isWorksName"
                           @click="
@@ -2503,6 +2574,13 @@
                             alt
                           />
                         </div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                          style="cursor: pointer;"
+                        >
+                          更多
+                        </div> -->
                         <!-- <div class="works" style="
                             width: 200px;
                             height: 140px;
@@ -2608,7 +2686,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -2626,7 +2721,10 @@
                         "
                       >
                         <div
-                          v-for="(w, wIndex) in worksStudent[toolIndex]"
+                          v-for="(w, wIndex) in isCloseList[toolIndex]
+                            .isClose == 0
+                            ? worksStudent[toolIndex]
+                            : worksStudent[toolIndex].slice(0, 2)"
                           :key="wIndex"
                           class="isWorksName"
                           @click="
@@ -2650,6 +2748,13 @@
                             alt
                           />
                         </div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                          style="cursor: pointer;"
+                        >
+                          更多
+                        </div> -->
                       </div>
                     </div>
 
@@ -2681,7 +2786,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -2699,7 +2821,10 @@
                     >
                       <div
                         class="works"
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                       >
                         <div
@@ -2799,6 +2924,13 @@
                           </div>
                         </div>
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -2828,7 +2960,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -2853,7 +3002,10 @@
                           border-radius: 15px;
                           box-shadow: 0 0 6px 1px #dfdada;
                         "
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                       >
                         <!-- @click="previewImg(w.works)" @click="commentOther(w, toolIndex, wIndex)"-->
@@ -2929,6 +3081,13 @@
                           </div>
                         </div>
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -2958,7 +3117,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -2983,7 +3159,10 @@
                           border-radius: 15px;
                           box-shadow: 0 0 6px 1px #dfdada;
                         "
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                       >
                         <!-- @click="previewImg(w.works)" -->
@@ -3059,6 +3238,13 @@
                           </div>
                         </div>
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -3088,7 +3274,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -3113,7 +3316,10 @@
                           border-radius: 15px;
                           box-shadow: 0 0 6px 1px #dfdada;
                         "
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                       >
                         <!-- @click="previewImg(w.works)" -->
@@ -3189,6 +3395,13 @@
                           </div>
                         </div>
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -3218,7 +3431,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -3243,7 +3473,10 @@
                           border-radius: 15px;
                           box-shadow: 0 0 6px 1px #dfdada;
                         "
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                       >
                         <!-- @click="previewImg(w.works)" -->
@@ -3319,6 +3552,13 @@
                           </div>
                         </div>
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -3348,7 +3588,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -3367,7 +3624,10 @@
                       <div
                         class="works"
                         style="width: 240px; height: 140px; overflow: hidden"
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                         :class="w.type == 1 ? 'isTypeOne' : ''"
                       >
@@ -3403,6 +3663,13 @@
                           <div>{{ w.sName }}</div>
                         </div>
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -3432,7 +3699,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -3457,7 +3741,10 @@
                           border-radius: 15px;
                           box-shadow: 0 0 6px 1px #dfdada;
                         "
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                         :class="w.type == 1 ? 'isTypeOne' : ''"
                       >
@@ -3511,6 +3798,13 @@
                           </div>
                         </div>
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -3616,7 +3910,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -3633,7 +3944,10 @@
                       "
                     >
                       <div
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                         class="isWorksName"
                         @click="openXz(w, toolIndex)"
@@ -3647,6 +3961,13 @@
                           alt
                         />
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                       <!-- <div
                         class="works"
                         style="
@@ -3850,7 +4171,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -3868,7 +4206,10 @@
                     >
                       <!-- @click="openXz(w, toolIndex)" -->
                       <div
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                         class="isWorksName"
                         @click="openSen(w, toolIndex)"
@@ -3882,6 +4223,13 @@
                           alt
                         />
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -3911,7 +4259,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -3936,7 +4301,10 @@
                           border-radius: 15px;
                           box-shadow: 0 0 6px 1px #dfdada;
                         "
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                         :class="w.type == 1 ? 'isTypeOne' : ''"
                       >
@@ -4016,6 +4384,13 @@
                           </div>
                         </div>
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -4122,7 +4497,24 @@
                         worksStudent[toolIndex].length > 0
                       "
                     >
-                      <span>作业预览</span>
+                      <div class="worksTop">
+                        <div>作业预览</div>
+                        <!-- <div
+                          @click="contract(toolIndex)"
+                          v-if="
+                            worksStudent[toolIndex].length > 2 &&
+                            isCloseList[toolIndex].isClose == 0
+                          "
+                        >
+                          收缩
+                        </div>
+                        <div
+                          @click="contract(toolIndex)"
+                          v-if="isCloseList[toolIndex].isClose == 1"
+                        >
+                          展开
+                        </div> -->
+                      </div>
                       <el-button
                         type="text"
                         @click="jump()"
@@ -4147,7 +4539,10 @@
                           border-radius: 15px;
                           box-shadow: 0 0 6px 1px #dfdada;
                         "
-                        v-for="(w, wIndex) in worksStudent[toolIndex]"
+                        v-for="(w, wIndex) in isCloseList[toolIndex].isClose ==
+                        0
+                          ? worksStudent[toolIndex]
+                          : worksStudent[toolIndex].slice(0, 2)"
                         :key="wIndex"
                         :class="w.type == 1 ? 'isTypeOne' : ''"
                       >
@@ -4227,6 +4622,13 @@
                           </div>
                         </div>
                       </div>
+                      <!-- <div
+                        @click="contract(toolIndex)"
+                        v-if="isCloseList[toolIndex].isClose == 1"
+                        style="cursor: pointer;"
+                      >
+                        更多
+                      </div> -->
                     </div>
                     <div style="font-size: 18px">未提交</div>
                     <div class="noWorksS">
@@ -5893,7 +6295,7 @@
           </div>
           <el-form class="textBox" style="height: 90%">
             <el-form-item class="textTitle">
-              <div style="font-size: 22px;">
+              <div style="font-size: 22px">
                 {{ fullUrl.name }}
               </div>
             </el-form-item>
@@ -7434,6 +7836,7 @@ export default {
       addPzDialog: false,
       pzConText: "",
       worksStudent: [],
+      isCloseList: [],
       workStudent: [],
       groupStudent: [],
       groupStudentUid: [],
@@ -7872,6 +8275,7 @@ export default {
           console.error(err);
         });
     },
+
     selectCStudent() {
       let params = {
         cid: this.classId,
@@ -8591,6 +8995,12 @@ export default {
           var f = res.data[3];
           for (var i = 0; i < a.length; i++) {
             this.worksStudent[i] = [];
+            if (
+              !this.isCloseList[i] ||
+              this.isCloseList[i].isClose == undefined
+            ) {
+              this.isCloseList[i] = { isClose: 0 };
+            }
             this.groupStudent[i] = [];
             this.groupStudentUid[i] = [];
             this.isWorksS[i] = [];
@@ -8600,6 +9010,7 @@ export default {
                 this.groupStudent[i][gA] = [];
                 this.groupStudentUid[i][gA] = [];
                 this.worksStudent[i][gA] = [];
+                this.isCloseList[i][gA] = [];
 
                 for (var g = 0; g < f.length; g++) {
                   if (
@@ -11528,7 +11939,7 @@ export default {
       const loading = _this.$loading.service({
         background: "rgba(255, 255, 255, 0.7)",
         target: document.body,
-        text:'文件加载中...'
+        text: "文件加载中...",
       });
       // _this.$message.success("文件下载中...");
       x.onload = function (e) {
@@ -12028,6 +12439,14 @@ export default {
           });
       });
     },
+    contract(i) {
+      if (this.isCloseList[i].isClose == 0) {
+        this.isCloseList[i].isClose = 1;
+      } else {
+        this.isCloseList[i].isClose = 0;
+      }
+      this.$forceUpdate();
+    },
   },
   directives: {
     // 使用局部注册指令的方式
@@ -15325,4 +15744,15 @@ ol {
   height: 100%;
   object-fit: cover;
 }
+
+.worksTop {
+  display: flex;
+  flex-direction: row;
+  align-items: center;
+}
+.worksTop > div:nth-child(2) {
+  margin-left: 10px;
+  font-size: 16px;
+  cursor: pointer;
+}
 </style>