Преглед изворни кода

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-student-table into beta

SanHQin пре 3 месеци
родитељ
комит
386127951a

+ 1 - 1
dist/index.html

@@ -27,7 +27,7 @@
     html,
     body{
       font-family: '黑体';
-    }</style><link href=./static/css/app.5798ede8b48e44bf4147cb85fdeffc34.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.264e3d6e7c524117db80.js></script><script type=text/javascript src=./static/js/app.bca0b082b5d20e4bfe57.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.8ece4f25f27ec1e9c6f89dc030d954b8.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.264e3d6e7c524117db80.js></script><script type=text/javascript src=./static/js/app.a230ed7fbc298438f01c.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/css/app.5798ede8b48e44bf4147cb85fdeffc34.css


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/css/app.5798ede8b48e44bf4147cb85fdeffc34.css.map


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/css/app.8ece4f25f27ec1e9c6f89dc030d954b8.css


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/css/app.8ece4f25f27ec1e9c6f89dc030d954b8.css.map


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/app.a230ed7fbc298438f01c.js


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/app.a230ed7fbc298438f01c.js.map


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 102 - 11
src/components/easy2/commpont/markDialog.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="markDialog" v-loading="vLoading">
     <div
-      style="overflow: auto;overflow-x: hidden;width: 315px;box-sizing: content-box;border-right: 1px rgba(231, 231, 231, 1) solid;"
+      style="width: 315px;box-sizing: content-box;border-right: 1px rgba(231, 231, 231, 1) solid;"
     >
       <div class="left">
         <div v-loading="ScLoading">
@@ -38,7 +38,19 @@
                       {{ e.detail }}
                     </div>
                   </el-tooltip>
-                  <el-rate :disabled="tType == 2" disabled-void-color @change="submit" v-model="e.cog"></el-rate>
+
+                  <div
+                    class="starB"
+                    @contextmenu.prevent="handleRightClick(index, $event)"
+                  >
+                    <div class="hangBlock">右键清空分数</div>
+                    <el-rate
+                      :disabled="tType == 2"
+                      disabled-void-color
+                      @change="submit"
+                      v-model="e.cog"
+                    ></el-rate>
+                  </div>
                 </div>
               </div>
               <div
@@ -63,7 +75,19 @@
                       {{ e.detail }}
                     </div>
                   </el-tooltip>
-                  <el-rate :disabled="tType == 2" disabled-void-color @change="submit" v-model="e.cog"></el-rate>
+
+                  <div
+                    class="starB"
+                    @contextmenu.prevent="handleRightClick(index, $event)"
+                  >
+                    <div class="hangBlock">右键清空分数</div>
+                    <el-rate
+                      :disabled="tType == 2"
+                      disabled-void-color
+                      @change="submit"
+                      v-model="e.cog"
+                    ></el-rate>
+                  </div>
                 </div>
               </div>
             </div>
@@ -86,7 +110,7 @@
           <div class="AreaCss">
             <el-input
               type="textarea"
-              :placeholder="tType == 1 ?'您可在此输入评语':'暂无评语'"
+              :placeholder="tType == 1 ? '您可在此输入评语' : '暂无评语'"
               v-model="textarea"
               @blur="submit"
               :disabled="tType == 2"
@@ -98,7 +122,8 @@
                   currentUid.type == 10 ||
                   currentUid.type == 13 ||
                   isMarkCom == 1) &&
-                  !isMarkSco && tType == 1
+                  !isMarkSco &&
+                  tType == 1
               "
               class="anewC"
               @click="anewEva"
@@ -594,10 +619,11 @@ export default {
     this.selectSWorksData();
   },
   methods: {
-    setZero(index){
+    setZero(index) {
       console.log(index);
-      console.log('scoTitList',this.scoTitList);
+      console.log("scoTitList", this.scoTitList);
     },
+    // 重新生成
     async anewEva() {
       this.ScLoading = true;
 
@@ -760,7 +786,8 @@ export default {
             console.log("dArray", dArray);
             this.textarea = dArray[0].comment;
           }
-          this.submit()
+          // 上传评语
+          this.submit();
           this.$message.success("重新生成完成");
 
           this.ScLoading = false;
@@ -806,7 +833,47 @@ export default {
         }
       });
     },
+    // 评分点击右键
+    handleRightClick(val, event) {
+      // 阻止默认的右键菜单弹出
+      event.preventDefault();
+
+      this.scoTitList[val].cog = 0;
+
+      let data = this.scoTitList.map(e => {
+        return e.detail + ":" + e.cog;
+      });
+
+      const processedData = {};
+
+      data.forEach(item => {
+        const [key, value] = item.split(":");
+        processedData[key] = Number(value) ? Number(value) : 0;
+      });
+
+      processedData.content = this.textarea;
+      // console.log(processedData);
+      let params = {
+        cid: this.cid,
+        s: this.stage,
+        t: this.task,
+        tool: this.toolIndex ? this.toolIndex : "",
+        rate: JSON.stringify(processedData),
+        uid: this.DgUid
+      };
+      // return console.log(params);
+      this.ajax
+        .get(this.$store.state.api + "updateWorksEvaTwo", params)
+        .then(res => {
+          this.ScLoading = false;
+        })
+        .catch(err => {
+          this.$message.error("评价失败");
+          console.error(err);
+        });
 
+      // 在这里执行右键点击后的操作,使用传递的参数
+    },
     // 老师提交评分
     submit() {
       let data = this.scoTitList.map(e => {
@@ -1040,7 +1107,7 @@ export default {
 
     // ai打分
     aiGet2(messages, _fileid, work) {
-      if (!this.markScoreVisible) return console.log('弹框关闭了');
+      if (!this.markScoreVisible) return console.log("弹框关闭了");
 
       let _this = this;
 
@@ -1056,7 +1123,7 @@ export default {
         userId: this.cUserid,
         file_ids: _fileid ? [_fileid] : [],
         isImage: work.type == 1 ? true : "",
-        model: _fileid ? "gpt-4o-2024-08-06"  : "gpt-4o-2024-08-06"
+        model: _fileid ? "gpt-4o-2024-08-06" : "gpt-4o-2024-08-06"
       };
       this.ajax
         .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
@@ -1932,9 +1999,33 @@ export default {
   background-color: #fff;
   bottom: 3px;
   right: 22px;
-  color: #3681FC;
+  color: #3681fc;
   cursor: pointer;
   font-size: 14px;
   transform: translate(0px, 2px);
 }
+
+.starB {
+  position: relative;
+}
+
+.starB:hover .hangBlock {
+  display: block;
+}
+
+.hangBlock {
+  display: none;
+  position: absolute;
+  right: 0%;
+  top: 50%;
+  color: rgba(0, 0, 0, 0.9);
+  font-family: PingFang SC;
+  padding: 5px 10px;
+  font-size: 12px;
+  box-sizing: border-box;
+  transform: translate(100%, -50%);
+  background-color: #fff;
+  border-radius: 6px;
+  box-shadow: 0px 5px 7px 0px rgba(0, 0, 0, 0.3);
+}
 </style>

+ 29 - 6
src/components/index.vue

@@ -61,7 +61,8 @@
       </div>
       <div class="body_student" v-loading="loading">
         <div class="typeCheck">
-          <el-switch v-model="typeCheck"></el-switch><span>分类显示</span>
+          <div><el-switch v-model="orderBy"></el-switch><span>按名字排序</span></div>
+          <div><el-switch v-model="typeCheck"></el-switch><span>分类显示</span></div>
         </div>
         <div>
           <div class="main_box">
@@ -261,6 +262,7 @@ export default {
       typeE: [],
       loading: "",
       typeCheck: false,
+      orderBy: false,
       CourseType3: [],
       pTypeCheck:[],
       pTypeCheckName: [],
@@ -275,7 +277,16 @@ export default {
         this.page = 1
         this.selectAll2()
       }
-    }
+    },
+    orderBy(newValue, oldValue) {
+      this.loading = true
+      if (this.typeCheck) {
+        this.selectAll()
+      } else {
+        this.page = 1
+        this.selectAll2()
+      }
+    },
   },
   methods: {
     search(){
@@ -543,9 +554,10 @@ export default {
         classid: this.classId,
         org: this.org,
         page: this.page,
+        orderBy: this.orderBy ? '2' : '1'
       };
       this.ajax
-        .get(this.$store.state.api + "selectTypeCourse2Mode", params)
+        .get(this.$store.state.api + "selectTypeCourse2Mode2", params)
         .then((res) => {
           this.loading = false;
           this.isListAjax = false;
@@ -619,10 +631,11 @@ export default {
         classid: this.classId,
         org: this.org,
         page: this.page,
-        pageSize:this.pageSize
+        pageSize:this.pageSize,
+        orderBy: this.orderBy ? '2' : '1'
       };
       this.ajax
-        .get(this.$store.state.api + "selectTypeCourse2", params)
+        .get(this.$store.state.api + "selectTypeCourse22", params)
         .then((res) => {
           this.loading = false;
           this.isListAjax = false;
@@ -1267,6 +1280,10 @@ export default {
   font-weight: 700;
 }
 
+.typeCheck > div + div{
+  margin-left: 10px;
+}
+
 .typeCheck {
   display: flex;
   align-items: center;
@@ -1274,7 +1291,13 @@ export default {
   margin-bottom: 10px;
 }
 
-.typeCheck>span {
+.typeCheck > div{
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+}
+
+.typeCheck > div >span {
   margin-left: 10px;
 }
 

Неке датотеке нису приказане због велике количине промена