lsc 1 年之前
父节点
当前提交
f113f8860d

+ 1 - 1
dist/index.html

@@ -25,7 +25,7 @@
       height: 100%;
       width: 100%;
       background: #e6eaf0;
-    }</style><link href=./static/css/app.ac8a8b09500d63097b84522fd15f510c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.1b8e037bd3fbbd358d74.js></script><script type=text/javascript src=./static/js/app.113d5d82859a6da56a42.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.522811d44c4ce498ed5569229ec2fe73.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3512a67a6213c2df4180.js></script><script type=text/javascript src=./static/js/vendor.1b8e037bd3fbbd358d74.js></script><script type=text/javascript src=./static/js/app.51f26eed99cfc68ddaf8.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

文件差异内容过多而无法显示
+ 0 - 0
dist/static/css/app.522811d44c4ce498ed5569229ec2fe73.css


文件差异内容过多而无法显示
+ 0 - 0
dist/static/css/app.522811d44c4ce498ed5569229ec2fe73.css.map


文件差异内容过多而无法显示
+ 0 - 0
dist/static/css/app.ac8a8b09500d63097b84522fd15f510c.css


文件差异内容过多而无法显示
+ 0 - 0
dist/static/css/app.ac8a8b09500d63097b84522fd15f510c.css.map


二进制
dist/static/img/down.60f07ad.png


二进制
dist/static/img/downC.d085d2d.png


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.113d5d82859a6da56a42.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.51f26eed99cfc68ddaf8.js


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/app.51f26eed99cfc68ddaf8.js.map


文件差异内容过多而无法显示
+ 0 - 0
dist/static/js/manifest.3512a67a6213c2df4180.js.map


二进制
src/assets/icon/new/down.png


二进制
src/assets/icon/new/downC.png


二进制
src/assets/icon/new/icon_stage.png


二进制
src/assets/icon/new/icon_stage_a.png


+ 272 - 4
src/components/pages/addCourse.vue

@@ -481,8 +481,8 @@
               <div class="rb_c_box_left" v-if="steps == 3 && unitJson[unitIndex].easy != 1">
                 <div class="stepsBottom">
                   <!-- <div class="navTop">辅助导航</div> -->
-                  <div class="navBottom">
-                    <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
+                  <div class="navBottom" v-if="courseState == 2">
+                    <!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
                       <div class="nt_taskBox" style="width: 100%;">
                         <div class="nt_taskTitle"
                           style="font-size: 16px;min-width: fit-content;margin-right: 10px;font-weight: 700;">阶段 {{
@@ -493,7 +493,7 @@
                           </el-tooltip>
                         </div>
                       </div>
-                    </div>
+                    </div> -->
                     <div v-for="(t, tIndex) in unitJson[unitIndex].chapterInfo[0]
                       .taskJson" :key="tIndex" :class="{
                           dragOverTop: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex > tIndex,
@@ -537,6 +537,57 @@
                       </div>
                     </div>
                   </div>
+                  <div class="navBottom" v-if="courseState == 1">
+                    <div v-for="(stage, stageIndex) in unitJson" :key="stageIndex" class="stageBox" >
+                      <div @click="unitSet2(stageIndex)" class="navStage" :class="{
+                          isNavStage: stageIndex == unitIndex,
+                          isNavStageOpen: stage.toolOpen
+                      }">
+                          <div class="nt_taskBox">
+                            <div class="nt_taskTitle">第{{ stageIndex + 1 }}阶段:</div>
+                            <div class="nt_taskName">
+                              <el-tooltip effect="light" :content="stage.dyName ? stage.dyName : '未命名阶段'" placement="top">
+                                <span>{{ stage.dyName ? stage.dyName : '未命名阶段' }}</span>
+                              </el-tooltip>
+                            </div>
+                          </div>
+                      </div>
+                      <div v-for="(t, tIndex) in unitJson[stageIndex].chapterInfo[0]
+                        .taskJson" :key="`${stageIndex}-${tIndex}`" :class="{
+                            dragOverTop: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex > tIndex && stageIndex == unitIndex,
+                            dragOverBottom: newIndex === tIndex && typeIndex == 'task-'+tIndex && oldIndex < tIndex && stageIndex == unitIndex,
+                          }" :style="{display:stage.toolOpen ? 'block' : 'none'}">
+                        <div @dragstart="dragTaskStart(t, tIndex)" @dragover.prevent="dragTaskOver(tIndex)"
+                            @dragend="dragTaskEnd()" draggable @click="goToTask2(tIndex, stageIndex)" class="navTask" :class="{
+                          isNavTask:
+                            isClickColor > 0 && isClickColor == tIndex + 1 && stageIndex == unitIndex,
+                          isNavOpen: t.toolOpen
+                        }">
+                          <div
+                          style="left: 8px;"
+                            class="chapter_upload_drag"
+                          ></div>
+                          <div class="nt_taskBox">
+                            <div class="nt_taskTitle">任务{{ tIndex + 1 }}:</div>
+                            <div class="nt_taskName">
+                              <el-tooltip effect="light" :content="t.task ? t.task : '未命名任务'" placement="top">
+                                <span>{{ t.task ? t.task : '未命名任务' }}</span>
+                              </el-tooltip>
+                            </div>
+                          </div>
+                        </div>
+                        <div class="gjBox" v-if="t.toolChoose.length && t.toolOpen">
+                          <div v-for="(tool, toolIndex2) in t.toolChoose" :key="toolIndex2"
+                            @click="jumpGj2(tIndex, toolIndex2, stageIndex)">
+                            <div class="gjCss" :class="{ isGjCss: toolIndexType == `gj${tIndex}${toolIndex2}${stageIndex}` }">
+                              <div>工具{{ toolIndex2 + 1 }}:</div>
+                              <div>{{ toolsData[tool.tool[0]] && toolsData[tool.tool[0]].name }}</div>
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                    </div>
+                  </div>
                 </div>
               </div>
               <div class="rb_c_box_right">
@@ -4823,9 +4874,81 @@ export default {
       this.$refs.stepBox.scrollTop = 0;
     },
     unitSet(i) {
+      if(this.unitIndex == i){
+        return;
+      }
       this.unitIndex = i;
       this.isClickColor = 1
 
+      // this.$refs.rightboxR.scrollTop = 0;
+      this.$refs.unitBox.scrollTop = 0
+    },
+    panUnitJson(){
+      let _unitIndex = this.unitIndex;
+        let cPan = 1;
+        for (
+          var j = 0;
+          j < this.unitJson[_unitIndex].chapterInfo[0].taskJson.length;
+          j++
+        ) {
+          this.unitJson[_unitIndex].chapterInfo[0].taskJson[
+            j
+          ].proVisible = false;
+          this.unitJson[_unitIndex].chapterInfo[0].taskJson[
+            j
+          ].proVisible2 = false;
+          if (
+            this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
+              .length > 1
+          ) {
+            for (
+              var z = 0;
+              z <
+              this.unitJson[_unitIndex].chapterInfo[0].taskJson[j].toolChoose
+                .length;
+              z++
+            ) {
+              if (
+                !this.unitJson[_unitIndex].chapterInfo[0].taskJson[j]
+                  .toolChoose[z].tool.length
+              ) {
+                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 != "";
+                }
+              );
+          }
+        }
+        return cPan;
+    },
+    unitSet2(i) {
+      if(this.panUnitJson() == 2){
+        return;
+      }
+      if(this.unitJson[i].toolOpen){
+        this.unitJson[i].toolOpen = false
+        this.updateWork()
+        this.$forceUpdate()
+        return
+      }else {
+        this.unitJson[i].toolOpen = true
+      }
+      this.$forceUpdate()
+      if(this.unitIndex == i){
+        return;
+      }
+      this.unitIndex = i;
+      this.isClickColor = 1
+
+      
       // this.$refs.rightboxR.scrollTop = 0;
       this.$refs.unitBox.scrollTop = 0
     },
@@ -9187,6 +9310,33 @@ export default {
       }
       this.$forceUpdate();
     },
+    goToTask2(i, stage) {
+      this.toolIndexType = ''
+      if (this.isClickColor == (i + 1) && this.unitIndex == stage) {
+        if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
+          this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
+        } else {
+          this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true
+        }
+        this.$forceUpdate();
+        return;
+      }
+      if(this.unitIndex != stage){
+        if(this.panUnitJson() == 2){
+          return;
+        }
+        this.unitSet(stage)
+      }
+      if (this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen) {
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = false
+      } else {
+        document.querySelectorAll(".basic_box")[0].scrollTop =
+          document.querySelectorAll(".taskBorder")[i].offsetTop - 100;
+        this.isClickColor = i + 1;
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolOpen = true
+      }
+      this.$forceUpdate();
+    },
     taskMove(type, index) {
       this.$confirm(
         "切换任务顺序将删除所有工具的提交成果,是否继续此操作?",
@@ -9575,13 +9725,39 @@ export default {
         this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
         setTimeout(() => {
           target.scrollIntoView(true);
-          this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[j].isFold3 = true
+          this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[j].isFold3 = false
           setTimeout(() => {
             this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
           }, 0);
         }, 0);
       }
     },
+    jumpGj2(i, j, k) {
+      if(this.unitIndex != k){
+        if(this.panUnitJson() == 2){
+          return;
+        }
+        this.unitSet(k)
+      }
+      setTimeout(() => {
+        if ((i + 1) != this.isClickColor) {
+          this.isClickColor = (i + 1)
+        }
+        var a = document.scrollingElement;
+        this.toolIndexType = `gj${i}${j}${k}`
+        let target = document.querySelector(`#gj${i}${j}`);
+        if (target) {
+          this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].isFold = 0;
+          setTimeout(() => {
+            target.scrollIntoView(true);
+            this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[j].isFold3 = false
+            setTimeout(() => {
+              this.$refs.unitBox.scrollTop = this.$refs.unitBox.scrollTop - 100;
+            }, 0);
+          }, 0);
+        }
+      }, 0);
+    },
     dragStart(val, i, j) {
       console.log(this.taskCount);
 
@@ -12956,6 +13132,98 @@ ol {
   overflow: auto;
 }
 
+.navStage {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: center;
+  padding: 10px 10px 10px 0;
+  cursor: pointer;
+  background: #ffffff;
+  width: 95%;
+  margin: 10px auto 0;
+  box-sizing: border-box;
+  border-radius: 5px;
+  flex-wrap: wrap;
+  position: relative;
+}
+
+.navStage::before {
+  content: '';
+  display: block;
+  width: 16px;
+  height: 16px;
+  background-image: url(../../assets/icon/new/icon_stage.png);
+  background-size: 100%;
+  margin-left: 10px;
+}
+
+.navStage::after {
+  content: '';
+  display: block;
+  width: 16px;
+  height: 16px;
+  background-image: url(../../assets/icon/new/down.png);
+  transform: rotate(-90deg);
+  background-size: 100%;
+  margin-left: 10px;
+  transition: all .5s;
+}
+
+.isNavStageOpen::after {
+  transform: rotate(0deg);
+}
+
+.isNavStage {
+  background: #0061FF;
+}
+
+.isNavStage::before{
+  background-image: url(../../assets/icon/new/icon_stage_a.png);
+}
+
+.isNavStage::after{
+  background-image: url(../../assets/icon/new/downC.png);
+}
+
+.isNavStage .nt_taskName {
+  font-weight: bold !important;
+  color: #FFFFFF !important;
+}
+
+.isNavStage .nt_taskTitle {
+  font-weight: bold !important;
+  color: #fff !important;
+}
+
+
+.navStage .nt_taskBox {
+  width: calc(100% - 53px);
+  padding: 0 0 0 5px;
+  box-sizing: border-box;
+  box-sizing: border-box;
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: baseline;
+}
+
+.navStage .nt_taskTitle {
+  color: #060E17;
+  line-height: 25px;
+  font-size: 16px;
+}
+
+.navStage .nt_taskName {
+  max-width: calc(100% - 75px);
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  font-size: 16px;
+  color: #060E17;
+}
+
+
 .navTask {
   display: flex;
   flex-direction: row;

+ 1 - 1
src/components/pages/easy/addCourse.vue

@@ -9862,7 +9862,7 @@ export default {
       let target = document.querySelector(`#gj${i}${j}`);
       if (target) {
         target.scrollIntoView(true);
-        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[j].isFold3 = true
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[j].isFold3 = false
         // setTimeout(() => {
         //   this.$refs.rightboxR.scrollTop = this.$refs.rightboxR.scrollTop - 100;
         // }, 0);

+ 1 - 1
src/components/pages/task/addCourse.vue

@@ -10159,7 +10159,7 @@ export default {
       let target = document.querySelector(`#gj${i}${j}`);
       if (target) {
         target.scrollIntoView(true);
-        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[j].isFold3 = true
+        this.unitJson[this.unitIndex].chapterInfo[0].taskJson[i].toolChoose[j].isFold3 = false
         // setTimeout(() => {
         //   this.$refs.rightboxR.scrollTop = this.$refs.rightboxR.scrollTop - 100;
         // }, 0);

+ 19 - 0
src/components/pages/test/add/setInfo/aiCreate.vue

@@ -0,0 +1,19 @@
+<template>
+  <div class="mc_box">
+    ai创建
+  </div>
+</template>
+
+<script>
+export default {
+
+}
+</script>
+
+<style scoped>
+.mc_box {
+    width: 90%;
+    margin: 10px auto;
+    display: flex;
+}
+</style>

+ 17 - 3
src/components/pages/test/add/setInfo/index.vue

@@ -40,11 +40,14 @@
                 <div class="c_info_title">创建评测内容</div>
                 <div class="c_info_box">
                     <div class="c_info_tab">
-                        <!-- <span :class="{ active: type == 1 }" @click="type = 1">智能创建</span> -->
+                        <span :class="{ active: type == 1 }" @click="type = 1">智能创建</span>
                         <span :class="{ active: type == 2 }" @click="type = 2">手动创建</span>
                         <!-- <span :class="{ active: type == 3 }" @click="type = 3">题库导入</span> -->
+                        <el-button type="primary" size="mini" @click="nextSteps" class="skip_btn">跳过</el-button>
+                        
                     </div>
                     <div class="c_info_tab_box">
+                        <aiCreate v-if="type == 1" :aiJson.sync="aiJson" @nextSteps="nextSteps"></aiCreate>
                         <manualCreate v-if="type == 2" :manualJson.sync="manualJson" @nextSteps="nextSteps"></manualCreate>
                     </div>
                 </div>
@@ -55,9 +58,11 @@
 
 <script>
 import manualCreate from './manualCreated.vue';
+import aiCreate from './aiCreate.vue';
 export default {
     components: {
-        manualCreate
+        manualCreate,
+        aiCreate
     },
     props: {
         title:{
@@ -84,7 +89,8 @@ export default {
             courseName: "",
             isTeacherSee: false,
             type: 2,
-            manualJson:[]
+            manualJson:[],
+            aiJson:[]
         }
     },
     methods: {
@@ -175,6 +181,8 @@ export default {
         nextSteps(){
             if(this.type == 2){
                 this.$emit("update:cJson", this.manualJson)
+            }else if(this.type == 1){
+                this.$emit("update:cJson", this.aiJson)
             }
             this.$emit('update:steps',this.steps+1)
             console.log(this.cJson);
@@ -186,6 +194,7 @@ export default {
         this.courseName = this.depthCopy(this.title)
         this.isTeacherSee = this.depthCopy(this.see)
         this.manualJson = this.depthCopy(this.cJson)
+        this.aiJson = this.depthCopy(this.cJson)
         this.$forceUpdate()
         this.selectAllType();
     }
@@ -409,4 +418,9 @@ export default {
 .c_info_tab_box {
     overflow: hidden;
 }
+
+.skip_btn{
+    position: absolute;
+    right: 20px;
+}
 </style>

部分文件因为文件数量过多而无法显示