lsc 2 년 전
부모
커밋
8f958790c2
4개의 변경된 파일113개의 추가작업 그리고 50개의 파일을 삭제
  1. BIN
      src/assets/icon/thirdToolList/plwork.png
  2. 12 0
      src/components/pages/addCourse.vue
  3. 1 1
      src/components/pages/addCourseGM.vue
  4. 100 49
      src/components/pages/student/addCourse.vue

BIN
src/assets/icon/thirdToolList/plwork.png


+ 12 - 0
src/components/pages/addCourse.vue

@@ -977,6 +977,18 @@
                                 </div>
                               </div>
                             </div>
+                            <div class="tool">
+                              <div class="whiteBIcon" @click="addTools(50, itemTaskIndex, toolIndex)">
+                                <img src="../../assets/icon/thirdToolList/plwork.png" alt />
+                                <div style="margin: 5px 0">批量上传</div>
+                              </div>
+                              <div class="check" @click="addTools(50, itemTaskIndex, toolIndex)">
+                                <img src="../../assets/icon/checkNo.png" alt v-if="itemTool.tool.indexOf(50) == -1" />
+                                <div class="checkDiv" v-else>
+                                  <img src="../../assets/icon/checkedIs.png" alt /><span>已选择</span>
+                                </div>
+                              </div>
+                            </div>
                             <div class="tool">
                               <div class="whiteBIcon" @click="openTools(itemTaskIndex, 40, toolIndex)">
                                 <img src="../../assets/icon/thirdToolList/eval.png" alt />

+ 1 - 1
src/components/pages/addCourseGM.vue

@@ -694,7 +694,7 @@
                       <div class="line" style="width: 90%"></div>
                     </div>
                   </div>
-                  <div class="toolChoose" style="padding: 0 0 0 30px">
+                  <div class="toolChoose" style="padding: 0 0 30px 30px">
                     <div class="tools">
                       <div class="leftTools" style="
                           width: 95%;

+ 100 - 49
src/components/pages/student/addCourse.vue

@@ -72,9 +72,9 @@
             <div class="navTop">辅助导航</div>
             <div class="navBottom">
               <div class="navTask" :class="{
-  isNavTask: isClickColor > 0 && isClickColor == tIndex + 1,
-}" v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
-  .taskJson" :key="tIndex" @click="goToTask(tIndex)">
+                isNavTask: isClickColor > 0 && isClickColor == tIndex + 1,
+              }" v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
+.taskJson" :key="tIndex" @click="goToTask(tIndex)">
                 <div>任务{{ tIndex + 1 }}</div>
                 <el-tooltip effect="light" :content="t.task" placement="top">
                   <div>{{ t.task }}</div>
@@ -95,14 +95,14 @@
               <el-breadcrumb separator-class="el-icon-arrow-right" style="margin-top: 15px">
                 <!-- /studentCourse -->
                 <el-breadcrumb-item :to="{
-  path:
-    fpath + '?userid=' +
-    userid +
-    '&oid=' +
-    oid +
-    '&org=' +
-    org,
-}">学生项目</el-breadcrumb-item>
+                  path:
+                    fpath + '?userid=' +
+                    userid +
+                    '&oid=' +
+                    oid +
+                    '&org=' +
+                    org,
+                }">学生项目</el-breadcrumb-item>
                 <el-breadcrumb-item>
                   <span style="color: rgb(15, 126, 255)">添加项目</span>
                 </el-breadcrumb-item>
@@ -110,14 +110,14 @@
             </div>
             <div v-if="steps == 1 || steps == 2 || steps == 3" class="stepsWord">
               {{
-    steps == 1
-      ? "第一步"
-      : steps == 2
-        ? "第二步"
-        : steps == 3
-          ? "第三步"
-          : ""
-}}
+  steps == 1
+  ? "第一步"
+  : steps == 2
+    ? "第二步"
+    : steps == 3
+      ? "第三步"
+      : ""
+              }}
             </div>
           </div>
           <div class="rightBox" v-if="this.steps == 1">
@@ -148,8 +148,8 @@
                             <span>{{ item.name }}</span>
                             <el-checkbox-group v-model="courseTypeId" v-if="CourseTypeJson[item.id].length > 0">
                               <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id" :label="item1.id">{{
-    item1.name
-}}</el-checkbox>
+                                item1.name
+                              }}</el-checkbox>
                             </el-checkbox-group>
                             <div v-else style="font-size: 14px; margin-left: -8px">
                               暂无
@@ -459,8 +459,8 @@
                     第{{ index + 1 }}阶段
                   </div>
                   <img src="../../../assets/line.png" class="cru_line" :style="{
-  left: offsetLetfPx + 'px',
-}" />
+                    left: offsetLetfPx + 'px',
+                  }" />
                 </div>
                 <div class="addStageImg" @click="addunit()">
                   <img src="../../../assets/icon/add.png" alt />
@@ -516,10 +516,10 @@
                           <div style="width:auto">
                             <input type="text" placeholder="输入任务名称" class="binfo_input" style="border-radius: 4px"
                               v-model="
-  unitJson[unitIndex].chapterInfo[0].taskJson[
-    itemTaskIndex
-  ].task
-" />
+                                unitJson[unitIndex].chapterInfo[0].taskJson[
+                                  itemTaskIndex
+                                ].task
+                              " />
                           </div>
                         </div>
                         <div style="
@@ -539,10 +539,10 @@
                           <div style="width:auto">
                             <input type="text" placeholder="输入负责人" class="binfo_input" style="border-radius: 4px"
                               v-model="
-  unitJson[unitIndex].chapterInfo[0].taskJson[
-    itemTaskIndex
-  ].people
-" />
+                                unitJson[unitIndex].chapterInfo[0].taskJson[
+                                  itemTaskIndex
+                                ].people
+                              " />
                           </div>
                         </div>
                         <div class="remove" v-if="item.taskJson.length > 1" @click="deleteTask(itemTaskIndex)"
@@ -581,10 +581,10 @@
                       </div>
                       <div>
                         <editor-bar style="width: 90% !important; margin: 0" placeholder="请输入任务描述" v-model="
-  unitJson[unitIndex].chapterInfo[0].taskJson[
-    itemTaskIndex
-  ].taskDetail
-" @change="change"></editor-bar>
+                          unitJson[unitIndex].chapterInfo[0].taskJson[
+                            itemTaskIndex
+                          ].taskDetail
+                        " @change="change"></editor-bar>
                       </div>
                     </div>
                   </div>
@@ -714,8 +714,8 @@
           </div>
           <div class="info_btnBox">
             <button class="info_btn" v-if="steps == 1" @click="
-  goTo(fpath + '?userid=' + userid + '&oid=' + oid + '&org=' + org)
-">
+              goTo(fpath + '?userid=' + userid + '&oid=' + oid + '&org=' + org)
+            ">
               返回项目
             </button>
             <button class="info_btn" v-if="steps > 1 && steps != 6" @click="lastSteps">
@@ -814,9 +814,10 @@
           </div>
         </div>
         <el-checkbox-group v-model="checkboxList" class="people_name">
-          <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{ item.name ? item.name :
-    "暂无学生可选"
-}}</el-checkbox>
+          <el-checkbox v-for="item in studentJuri" :key="item.userid" :label="item.userid">{{
+            item.name ? item.name :
+              "暂无学生可选"
+          }}</el-checkbox>
         </el-checkbox-group>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -969,7 +970,7 @@
               <div class="a_add_input a_add_input_choice">
                 <el-radio-group v-model="testJson.testJson[index1].answer" v-if="testJson.testJson[index1].type == 1">
                   <el-radio v-for="(item2, checkIndex) in testJson.testJson[index1]
-  .testItem" :key="checkIndex" :label="checkIndex">
+                  .testItem" :key="checkIndex" :label="checkIndex">
                     <el-input v-model="testJson.testJson[index1].checkList[checkIndex]" placeholder="请输入选项..."
                       style="width: 300px; margin-right: 10px"></el-input>
                   </el-radio>
@@ -977,7 +978,7 @@
                 <el-checkbox-group v-model="testJson.testJson[index1].answer"
                   v-if="testJson.testJson[index1].type == '2'">
                   <el-checkbox v-for="(item2, checkIndex) in testJson.testJson[index1]
-  .testItem" :key="checkIndex" :label="checkIndex">
+                  .testItem" :key="checkIndex" :label="checkIndex">
                     <el-input v-model="testJson.testJson[index1].checkList[checkIndex]" placeholder="请输入选项..."
                       style="width: 300px; margin-right: 10px"></el-input>
                   </el-checkbox>
@@ -1672,7 +1673,7 @@ export default {
       inputShow: true,
       toolIndex: 0,
       cidType: 0,
-      cidttt:1,
+      cidttt: 1,
       answerQ: "",
       grade: [],
       courseUserid: "",
@@ -1751,6 +1752,7 @@ export default {
         }
         if (cPan == 2) {
           this.unitIndex = oldValue;
+          this.isDelete = 2
           return;
         }
         for (var i = 0; i < this.unitJson.length; i++) {
@@ -2079,12 +2081,12 @@ export default {
               this.$message.error("请将信息填写完整");
               return;
             } else {
+              this.steps++;
               if (this.userid != this.courseUserid) {
                 this.updateWork2();
               } else {
                 this.updateWork();
               }
-              this.steps++;
             }
           }
         } else if (this.steps == 4) {
@@ -2135,12 +2137,12 @@ export default {
               this.$message.error("请将信息填写完整");
               return;
             } else {
+              this.steps++
               if (this.userid != this.courseUserid) {
                 this.updateWork2();
               } else {
                 this.updateWork();
               }
-              this.steps++;
             }
           }
         } else if (this.steps == 4) {
@@ -2712,6 +2714,48 @@ export default {
       }
     },
     addunit() {
+      if (this.cid != "") {
+        let _unitIndex = this.unitIndex;
+        let cPan = 1;
+        for (
+          var j = 0;
+          j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
+          j++
+        ) {
+          if (
+            !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].task
+          ) {
+            this.$message.error("请填写任务名称");
+            cPan = 2
+            break;
+          }
+          if (
+            !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].people
+          ) {
+            this.$message.error("请填写负责人");
+            cPan = 2
+            break;
+          }
+          if (
+            !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].time
+          ) {
+            this.$message.error("请填写任务完成时间");
+            cPan = 2
+            break;
+          }
+          if (this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList) {
+            this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList =
+              this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].eList.filter(
+                (ele) => {
+                  return ele.value != "";
+                }
+              );
+          }
+        }
+        if (cPan == 2) {
+          return;
+        }
+      }
       this.unitJson.push({
         dyName: "", //单元标题
         isUpdate: 1,
@@ -3013,7 +3057,9 @@ export default {
       }
 
       if (cPan == 2) {
-        this.steps--;
+        if (this.steps != 3) {
+          this.steps--;
+        }
         return;
       }
       for (var i = 0; i < this.unitJson.length; i++) {
@@ -3110,7 +3156,9 @@ export default {
         }
       }
       if (cPan == 2) {
-        this.steps--;
+        if (this.steps != 3) {
+          this.steps--;
+        }
         return;
       }
       let params = [
@@ -3176,7 +3224,9 @@ export default {
         }
       }
       if (cPan == 2) {
-        this.steps--;
+        if (this.steps != 3) {
+          this.steps--;
+        }
         return;
       }
       for (var i = 0; i < this.unitJson.length; i++) {
@@ -7292,7 +7342,8 @@ ol {
   display: flex;
   align-items: center;
 }
-.proMan .title img{
+
+.proMan .title img {
   margin-right: 5px;
   height: 17px;
   width: 17px;