11wqe1 6 months ago
parent
commit
b6860617a1
2 changed files with 66 additions and 57 deletions
  1. 51 34
      src/components/easy2/commpont/markDialog.vue
  2. 15 23
      src/components/easy2/studyStudent.vue

+ 51 - 34
src/components/easy2/commpont/markDialog.vue

@@ -36,7 +36,7 @@
                       {{ e.value }}
                     </div>
                   </el-tooltip>
-                  <el-rate v-model="e.cog"></el-rate>
+                  <el-rate @change="submit" v-model="e.cog"></el-rate>
                 </div>
               </div>
               <div
@@ -56,7 +56,7 @@
                       {{ e.value }}
                     </div>
                   </el-tooltip>
-                  <el-rate v-model="e.cog"></el-rate>
+                  <el-rate @change="submit" v-model="e.cog"></el-rate>
                 </div>
               </div>
             </div>
@@ -81,10 +81,12 @@
               type="textarea"
               placeholder="您可在此输入评语"
               v-model="textarea"
-              style="padding-bottom: 10px;"
+               @blur="submit"
             >
+            <!-- style="padding-bottom: 10px;" -->
+
             </el-input>
-            <div
+            <!-- <div
               class="AreaBtn"
               v-if="
                 currentUid.type == 10 || currentUid.type == 13 || isMarkCom == 1
@@ -92,25 +94,14 @@
               @click="generateMsg(currentUid)"
             >
               <span>重新生成</span>
-            </div>
+            </div> -->
           </div>
 
           <div
             style="width:100%;display:flex;height: 25px;;justify-content: space-between;"
           >
-            <div
-              class="ScrBtn"
-              @click="AIsubmit(currentUid)"
-              v-if="
-                currentUid.type == 10 || currentUid.type == 13 || isMarkCom == 1
-              "
-            >
-              <img
-                src="../../../assets/icon/newIcons/Brootper.svg"
-                alt=""
-              />AI评分
-            </div>
-            <div v-else></div>
+            
+            <div ></div>
 
             <div style="display: flex;">
               <div
@@ -118,15 +109,28 @@
                 @click="reset"
                 style="color: rgba(0, 0, 0, 0.6);background-color: rgba(243, 247, 253, 1);border: none;"
               >
-                重置
+                清空
               </div>
               <div
+                class="ScrBtn"
+                style="margin-left: 10px;"
+                @click="AIsubmit(currentUid)"
+                v-if="
+                  currentUid.type == 10 || currentUid.type == 13 || isMarkCom == 1
+                "
+              >
+                <img
+                  src="../../../assets/icon/newIcons/Brootper.svg"
+                  alt=""
+                />AI评分
+              </div>
+              <!-- <div
                 class="ScrBtn"
                 @click="submit"
                 style="margin-left: 10px;color:#fff;border: none;background-color: rgba(54, 129, 252, 1);"
               >
                 确认
-              </div>
+              </div> -->
             </div>
           </div>
         </div>
@@ -143,7 +147,7 @@
               :key="index"
               :class="['schPer', i.userid == DgUid ? 'selBlock' : '']"
               style="cursor: pointer;"
-              @click="cutPer(i.userid)"
+              @click="cutPer(i.userid,index)"
             >
               <img v-if="i.headportrait" :src="i.headportrait" alt="" />
               <img
@@ -210,10 +214,12 @@
           </div>
           <div class="cutStuBtn">
             <div>
-              <span @click="prevStu" style="cursor: pointer;">上一个</span>
+              <span v-if="current == 0"  style="cursor: pointer;color:#ccc">上一个</span>
+              <span v-else @click="prevStu" style="cursor: pointer;color: rgba(54, 129, 252, 1)">上一个</span>
             </div>
             <div>
-              <span @click="nextStu" style="cursor: pointer;">下一个</span>
+              <span v-if="current >= workList.length -1"  style="cursor: pointer;color: #ccc">下一个</span>
+              <span v-else @click="nextStu" style="cursor: pointer;color: rgba(54, 129, 252, 1)">下一个</span>
             </div>
             <!-- <div><span @click="prevStu" v-if="this.current > 0">上一个</span></div>
             <div><span @click="nextStu" v-if="this.current < this.workList.length-1">下一个</span></div> -->
@@ -369,6 +375,7 @@
 </template>
 
 <script>
+import { color } from "echarts";
 import { v4 as uuidv4 } from "uuid";
 
 export default {
@@ -535,13 +542,13 @@ export default {
       this.ajax
         .get(this.$store.state.api + "updateWorksEva", params)
         .then(res => {
-          this.$message({
-            message: "评价成功",
-            type: "success"
-          });
+          // this.$message({
+          //   message: "评价成功",
+          //   type: "success"
+          // });
           this.ScLoading = false;
 
-          this.selectSWorksData();
+          // this.selectSWorksData();
           // this.$emit("refreshOther", this.toolIndex);
         })
         .catch(err => {
@@ -552,10 +559,19 @@ export default {
 
     // 重置
     reset() {
-      this.scoTitList.forEach(e => {
-        e.cog = 0;
-      });
-      this.textarea = "";
+      this.$confirm("是否清空评分和评语?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      })
+        .then(() => {
+          this.scoTitList.forEach(e => {
+            e.cog = 0;
+          });
+          this.textarea = "";
+        })
+        .catch(() => {});
+    
       // this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
     },
 
@@ -824,9 +840,10 @@ export default {
       }
     },
     // 提交列表点击切换
-    cutPer(val) {
+    cutPer(val,index) {
       if (this.ScLoading) return this.$message.info("请稍后,正在ai评价中");
 
+      this.current = index;
       this.DgUid = val;
       this.selectSWorksData();
     },
@@ -1103,7 +1120,7 @@ export default {
 .AreaCss >>> .el-textarea__inner {
   min-height: 150px !important;
   /* max-height: 150px; */
-  padding-bottom: 20px;
+  /* padding-bottom: 20px; */
 }
 .AreaBtn {
   position: absolute;

+ 15 - 23
src/components/easy2/studyStudent.vue

@@ -7645,7 +7645,7 @@
                             v-if="
                               w.userid == userid || tType == 1 || tType == 4
                             "
-                            @click.stop="deleteWorksTwo(w.wid,toolIndex,wIndex)"
+                            @click.stop="deleteWorks(w.wid)"
                             alt
                           />
                         </div>
@@ -15862,13 +15862,12 @@ export default {
         .catch(() => {});
     },
 
-    deleteWorksTwo(id,toolIndex,wIndex) {
-      console.log(id)
-      let mk = `markSco${toolIndex}${wIndex}`
-      console.log(this.$refs[mk][0].homeworkVal)
+    deleteWorksTwo(w,stage,task) {
+      // let mk = `markSco${toolIndex}${wIndex}`
+      // console.log(this.$refs[mk][0].homeworkVal)
 
-      let wid = this.$refs[mk][0].homeworkVal.id
-      console.log('wid',wid);
+      // let wid = this.$refs[mk][0].homeworkVal.id
+      // console.log('wid',wid);
       
       this.$confirm("确定删除此作业吗?", "提示", {
         confirmButtonText: "确定",
@@ -15878,13 +15877,16 @@ export default {
         .then(() => {
           let params = [
             {
-              id: id,
-              wid: wid ? wid : 1
+              id: w.wid,
+              cid: this.id,
+              uid:w.userid,
+              s:stage,
+              t:task
             },
           ];
           // return console.log(params)
           this.ajax
-            .post(this.$store.state.api + "deleteCourseWorkTwo", params)
+            .post(this.$store.state.api + "deleteCourseWorkTwo2", params)
             .then((res) => {
               this.$message({
                 message: "删除成功",
@@ -18282,10 +18284,10 @@ export default {
             let chapInfoListCopy = this.chapInfoList[0].chapterInfo[0].taskJson;
 
             let chap = chapInfoListCopy[this.taskCount].toolChoose
-            console.log('chap',chap)
+            // console.log('chap',chap)
 
             let adc = chap.filter(e=>{return (e.tool[0]==16 || e.tool[0]==52)})
-            console.log('adc',adc)
+            // console.log('adc',adc)
 
             if(adc.length > 0){
               for (let k = chap.length - 1; k >= 0; k--) {
@@ -18303,17 +18305,7 @@ export default {
               }
             }
 
-            // for (let k = chap.length - 1; k >= 0; k--) {
-            //   if (chap[k].tool[0] == 16 || chap[k].tool[0] == 52) {
-            //     this.finalMarkList = k;
-            //     break;
-            //   }
-            //   if (chap[k].tool[0] == 7 || chap[k].tool[0] == 50  || chap[k].tool[0] == 1 || chap[k].tool[0] == 3 || chap[k].tool[0] == 48 || chap[k].tool[0] == 15 || chap[k] == 57) {
-            //     this.finalMarkList = k;
-            //     break;
-            //   }
-            // }
-            console.log('finalMarkList',this.finalMarkList)
+            // console.log('finalMarkList',this.finalMarkList)
 
             for (let k = 0; k < chapInfoListCopy[this.taskCount].eList.length; k++) {
               if(!chapInfoListCopy[this.taskCount].eList[k].rule){