Browse Source

Merge branch 'beta' into alpha

lsc 5 months ago
parent
commit
da4cf96d94

+ 1 - 1
dist/index.html

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

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.99e723e2460e896d1a5107cb819d6dfc.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.99e723e2460e896d1a5107cb819d6dfc.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.dc47f591b6b6eadadfd41709629ede28.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.4b3908490bc4f2ed6be2.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.4b3908490bc4f2ed6be2.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.264e3d6e7c524117db80.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/vendor.264e3d6e7c524117db80.js.map


+ 305 - 0
src/assets/css/markdownCss.css

@@ -0,0 +1,305 @@
+.vditor-reset ul ul ul {
+    list-style-type: square
+}
+
+.vditor-reset ul ul {
+    list-style-type: circle
+}
+
+.vditor-reset ul {
+    list-style-type: disc
+}
+
+.vditor-reset ol,.vditor-reset ul {
+    padding-left: 2em;
+    margin-top: 0;
+    margin-bottom: 16px
+}
+
+.vditor-reset li+li {
+    margin-top: .25em
+}
+
+.vditor-reset audio {
+    max-width: 100%
+}
+
+.vditor-reset audio:focus {
+    outline: none
+}
+
+.vditor-reset video {
+    max-height: 90vh;
+    max-width: 100%
+}
+
+.vditor-reset img {
+    max-width: 100%
+}
+
+.vditor-reset img.emoji {
+    cursor: auto;
+    max-width: 20px;
+    vertical-align: sub
+}
+
+.vditor-reset h1, .vditor-reset h2 {
+    padding-bottom: 0.3em;
+    border-bottom: 1px solid #eaecef;
+}
+
+.vditor-reset hr {
+    background-color: #eaecef;
+}
+
+.vditor-reset blockquote {
+    color: #6a737d;
+    border-left: .25em solid #eaecef
+}
+
+.vditor-reset iframe {
+    border: 1px solid #d1d5da
+}
+
+.vditor-reset table tr {
+    border-top: 1px solid #c6cbd1;
+    background-color: #fafbfc
+}
+
+.vditor-reset table td, .vditor-reset table th {
+    border: 1px solid #dfe2e5
+}
+
+.vditor-reset table tbody tr:nth-child(2n) {
+    background-color: #fff
+}
+
+.vditor-reset code:not(.hljs):not(.highlight-chroma) {
+    background-color: rgba(27, 31, 35, .05);
+}
+
+.vditor-reset kbd {
+    color: #24292e;
+    background-color: #fafbfc;
+    border: solid 1px #d1d5da;
+    box-shadow: inset 0 -1px 0 #d1d5da;
+}
+
+.vditor-speech {
+    background-color: #f6f8fa;
+    border: 1px solid #d1d5da;
+    color: #586069;
+}
+
+.vditor-speech--current, .vditor-speech:hover {
+    color: #4285f4;
+}
+
+.vditor-linkcard a {
+    background-color: #f6f8fa;
+}
+
+.vditor-linkcard a:visited .vditor-linkcard__abstract {
+    color: rgba(88, 96, 105, 0.36);
+}
+
+.vditor-linkcard__title {
+    color: #24292e;
+}
+
+.vditor-linkcard__abstract {
+    color: #586069;
+}
+
+.vditor-linkcard__site {
+    color: #4285f4;
+}
+
+.vditor-linkcard__image {
+    background-color: rgba(88, 96, 105, 0.36);
+}
+
+
+.vditor-reset h1,.vditor-reset h2,.vditor-reset h3,.vditor-reset h4,.vditor-reset h5,.vditor-reset h6 {
+    margin-top: 24px;
+    margin-bottom: 16px;
+    font-weight: 600;
+    line-height: 1.25
+}
+
+.vditor-reset h1:hover .vditor-anchor svg,.vditor-reset h2:hover .vditor-anchor svg,.vditor-reset h3:hover .vditor-anchor svg,.vditor-reset h4:hover .vditor-anchor svg,.vditor-reset h5:hover .vditor-anchor svg,.vditor-reset h6:hover .vditor-anchor svg {
+    visibility: visible
+}
+
+.vditor-reset h1 {
+    font-size: 1.75em
+}
+
+.vditor-reset h2 {
+    font-size: 1.55em
+}
+
+.vditor-reset h3 {
+    font-size: 1.38em
+}
+
+.vditor-reset h4 {
+    font-size: 1.25em
+}
+
+.vditor-reset h5 {
+    font-size: 1.13em
+}
+
+.vditor-reset h6 {
+    font-size: 1em
+}
+
+.vditor-reset hr {
+    height: 2px;
+    padding: 0;
+    margin: 24px 0;
+    background-color: #eaecef;
+    border: 0
+}
+
+.vditor-reset p {
+    margin-top: 0;
+    margin-bottom: 16px
+}
+
+.vditor-reset blockquote {
+    padding: 0 1em;
+    color: #6a737d;
+    border-left: .25em solid #eaecef;
+    margin: 0 0 16px 0
+}
+
+.vditor-reset blockquote>:first-child {
+    margin-top: 0
+}
+
+.vditor-reset blockquote>:last-child {
+    margin-bottom: 0
+}
+
+.vditor-reset ins>iframe {
+    border: 0
+}
+
+.vditor-reset iframe {
+    border: 1px solid #d1d5da;
+    max-width: 100%;
+    -webkit-box-sizing: border-box;
+    box-sizing: border-box
+}
+
+.vditor-reset iframe.iframe__video {
+    min-width: 80%;
+    min-height: 36vh
+}
+
+.vditor-reset table {
+    border-collapse: collapse;
+    empty-cells: show;
+    margin-bottom: 16px;
+    overflow: auto;
+    border-spacing: 0;
+    display: block;
+    word-break: keep-all;
+    width: 100%
+}
+
+.vditor-reset table tr {
+    background-color: #fafbfc;
+    border-top: 1px solid #c6cbd1
+}
+
+.vditor-reset table td,.vditor-reset table th {
+    padding: 6px 13px;
+    border: 1px solid #dfe2e5;
+    word-break: normal;
+    white-space: nowrap
+}
+
+.vditor-reset table td:first-child:after,.vditor-reset table th:first-child:after {
+    content: "";
+    display: inline-block;
+    vertical-align: top;
+    min-height: 24px
+}
+
+.vditor-reset table th {
+    font-weight: 600
+}
+
+.vditor-reset table tbody tr:nth-child(2n) {
+    background-color: #fff
+}
+
+.vditor-reset code:not(.hljs):not(.highlight-chroma) {
+    padding: .2em .4em;
+    margin: 0;
+    font-size: 85%;
+    border-radius: 3px;
+    font-family: mononoki,Consolas,Liberation Mono,Menlo,Courier,monospace,Apple Color Emoji,Segoe UI Emoji,Noto Color Emoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
+    word-break: break-word;
+    background-size: 20px 20px;
+    white-space: pre-wrap
+}
+
+.vditor-reset pre {
+    margin: 1em 0
+}
+
+.vditor-reset pre>code {
+    margin: 0;
+    font-size: 85%;
+    padding: .5em;
+    border-radius: 5px;
+    display: block;
+    overflow: auto;
+    white-space: pre;
+    font-family: mononoki,Consolas,Liberation Mono,Menlo,Courier,monospace,Apple Color Emoji,Segoe UI Emoji,Noto Color Emoji,Segoe UI Symbol,Android Emoji,EmojiSymbols;
+    background-size: 20px 20px;
+    background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8AgMAAABHkjHhAAAACVBMVEWAgIBaWlo+Pj7rTFvWAAAAA3RSTlMHCAw+VhR4AAAA+klEQVQoz4WSMW7EQAhFPxKWNh2FCx+HkaZI6RRb5DYbyVfIJXLKDCFoMbaTKSw/8ZnPAPjaH2xgZcUNUDADD7D9LtDBCLZ45fbkvo/30K8yeI64pPwl6znd/3n/Oe93P3ho9qeh72btTFzqkz0rsJle8Zr81OLEwZ1dv/713uWqvu2pl+k0fy7MWtj9r/tN5q/02z89qa/L4Dc2LvM93kezPfXlME/O86EbY/V9GB9ePX8G1/6W+/9h1dq/HGfTfzT3j/xNo7522Bfnqe5jO/fvhVthlfk434v3iO9zG/UOphyPeinPl1J8Gtaa7xPTa/Dk+RIs4deMvwGvcGsmsCvJ0AAAAABJRU5ErkJggg==);
+    word-break: normal;
+    word-wrap: normal
+}
+
+.vditor-reset pre:hover div.vditor-copy {
+    display: block
+}
+
+
+.vditor-reset kbd {
+    display: inline-block;
+    padding: 3px 5px;
+    font: 11px Consolas,Liberation Mono,Menlo,Courier,monospace;
+    line-height: 10px;
+    color: #24292e;
+    vertical-align: middle;
+    background-color: #fafbfc;
+    border: 1px solid #d1d5da;
+    border-radius: 3px;
+    -webkit-box-shadow: inset 0 -1px 0 #d1d5da;
+    box-shadow: inset 0 -1px 0 #d1d5da
+}
+
+.vditor-reset summary {
+    cursor: pointer
+}
+
+.vditor-reset summary:focus {
+    outline: none
+}
+
+.vditor-reset svg {
+    height: auto;
+    width: auto;
+    stroke-width: initial
+}
+
+.vditor-reset blockquote:last-child,.vditor-reset hr:last-child,.vditor-reset ol:last-child,.vditor-reset p:last-child,.vditor-reset pre:last-child,.vditor-reset ul:last-child {
+    margin-bottom: 0
+}

+ 1 - 1
src/components/classRoomHelper/component/countdown.vue

@@ -655,7 +655,7 @@ export default {
       choiceBehavior: [],
       memorandumList: [],
       memorandumLoading: false,
-      showBtnType: 0, //0:所有事件  1:计时事件
+      showBtnType: 1, //0:所有事件  1:计时事件
       exportLoading: false
     };
   },

+ 19 - 3
src/components/classRoomHelper/component/dialogArea.vue

@@ -440,7 +440,8 @@ export default {
       saveUid: "",
       aiTalkList: [],
       aiIsTalk: false,
-      aiTalkUid: ""
+      aiTalkUid: "",
+			userName:"",
     };
   },
   computed: {
@@ -829,13 +830,13 @@ export default {
       };
     },
     //保存消息
-    insertChat(_uid) {
+    async insertChat(_uid) {
       if (_uid == "") return;
       let _data = this.chatList.find(i => i.uid == _uid);
       if (!_data) return;
       let params = {
         userId: this.userid,
-        userName: "qgt",
+        userName: this.userName?this.userName:await this.getUser(this.userid),
         groupId: "602def61-005d-11ee-91d8-005056b8q12w",
         answer: _data.aiContent,
         problem: _data.content,
@@ -849,6 +850,21 @@ export default {
       this.ajax
         .post("https://gpt4.cocorobo.cn/insert_chat", params)
         .then(res => {});
+    },
+		getUser(uid) {
+      return new Promise(resolve => {
+        let params = { uid: uid };
+        this.ajax
+          .get(this.$store.state.api + "getUser", params)
+          .then(res => {
+            let data = res.data[0][0];
+						this.userName = data.username;
+						resolve(data.username)
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      });
     },
     // 获取对应的聊天记录
     getChatList() {

File diff suppressed because it is too large
+ 42 - 13
src/components/classRoomHelper/component/searchArea.vue


+ 14 - 4
src/components/classRoomHelper/component/taskArea.vue

@@ -1243,7 +1243,7 @@ ${_textData}
             this.aiBoxLoading = false;
             this.showCard = 1;
             this.saveTaskList(1);
-            this.$message.success("一键出题成功");
+            // this.$message.success("一键出题成功");
           } else {
             this.$message.error("一键出题失败");
           }
@@ -1675,8 +1675,14 @@ ${taskText}
                   this.selectDefaultTaskList();
                 });
               } else {
-                this.showCard = 0;
+								this.showCard = 0;
                 this.aiBoxLoading = false;
+								if(['1'].includes(this.ttype)){
+									this.getTopic();
+								}else{
+									this.showCard = 0;
+                	this.aiBoxLoading = false;
+								}
               }
             });
           }
@@ -1812,7 +1818,7 @@ Instruction: Based on the context, follow "Format example", write content
 3. 请确保解析清晰、易懂,适合对应年级的学生理解。
 
 ##Format example
-{analyze:"题目解析内容",knowledgePoint:"分析考核的知识点"}
+{"analyze":"题目解析内容","knowledgePoint":"分析考核的知识点"}
 
 ##数据
 ${_choiceText}
@@ -1835,9 +1841,13 @@ ${_choiceText}
           .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
           .then(res => {
             let _data = res.data.FunctionResponse.message;
+						// console.log(_data)
             _data = _data.replaceAll("```json", "").replaceAll("```", "");
+						// console.log(_data)
             const match = _data.match(/{[^}]*"analyze"[^}]*}/);
+						// console.log(match)
             let _result = JSON.parse(match[0]);
+						// console.log(_result)
             resolve({ ..._result, uuid: data.uuid });
           })
           .catch(e => {
@@ -1850,7 +1860,7 @@ ${_choiceText}
   },
   mounted() {
     this.selectDefaultTaskList();
-    this.insertMemorandum(`打开<span class="btn">任务</span>面板`);
+    this.insertMemorandum(`打开<span class="btn">测验</span>面板`);
     // this.getTopic();
   }
 };

+ 24 - 4
src/components/classRoomHelper/index.vue

@@ -23,7 +23,7 @@
         :openMegaphone="openMegaphone"
         ref="taskAreaRef"
         :fileId="fileId"
-        v-if="itemType == 2"
+        v-show="itemType == 2"
       />
       <countdown
         ref="countdownRef"
@@ -114,7 +114,7 @@
             :src="require('../../assets/icon/course/task.png')"
           />
           <!-- <span :style="`background:url(${itemType==2?require('../../assets/icon/course/task_active.png'):require('../../assets/icon/course/task.png')});`"></span> -->
-          <div>任务</div>
+          <div>测验</div>
         </div>
 
         <div
@@ -370,13 +370,22 @@ export default {
 			getWangLoading:false,
 			canUseWangData:false,
 			wangData:"",
+			languageSetting:0,
     };
   },
   mounted() {
+		let setting = this.courseDetail.setting;
+		if(setting){
+			setting = JSON.parse(setting);
+			if(setting.languageSetting){
+				this.languageSetting = setting.languageSetting;
+			}
+		}
     this.setWidth();
     this.getFileId();
 		this.firstEnterTime = new Date().getTime();
 		this.getWantSearch();
+		
 		setTimeout(()=>{
 			this.canGetTips = true;
 			this.getTipsList()
@@ -411,7 +420,7 @@ export default {
         });
         _textData += "\n";
       });
-			let _msg = `Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
+			let _msg = `Language: ${this.getLang()}
 ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
 Instruction: Based on the context, follow "Format example", write content
 
@@ -688,7 +697,7 @@ let params = {
 			this.canUseWangData = false
 			this.wangData=""
       let _msg = `
-Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
+Language: ${this.getLang()}
 ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
 Instruction: Based on the context, follow "Format example", write content
 
@@ -778,6 +787,17 @@ Instruction: Based on the context, follow "Format example", write content
 					console.log(e);
         });
       // this.getWAntSearchContent(_uuid);
+    },
+		getLang(){
+      let lang = ''
+      if(this.languageSetting == 0){
+        lang = 'Chinese.'
+      }else if(this.languageSetting == 1){
+        lang = 'Traditional Chinese.'
+      }else if(this.languageSetting == 2){
+        lang = 'English.'
+      }
+      return lang
     },
 		getWanData(){
 			if(this.wangData && this.canUseWangData){

+ 12 - 1
src/components/courseDetail.vue

@@ -205,7 +205,7 @@
         <div class="student_body">
           <div class="sLeft" v-if="courseDetail.brief">
             <div class="courseT">课程详情</div>
-            <div class="courseTd" v-html="courseDetail.brief"></div>
+            <div class="courseTd vditor-reset" v-html="MarkdownT(courseDetail.brief)"></div>
           </div>
           <div :class="courseDetail.brief != '' ? 'rightTd' : 'noBRight'">
             <div v-if="tType == 1 || tType == 4" class="checkBox">
@@ -1090,6 +1090,8 @@ import JSZip from "jszip";
 import FileSaver from "file-saver";
 import scoreZong from './scoreZong/get.vue'
 
+import MarkdownIt from "markdown-it";
+
 var OpenCC = require("opencc-js");
 let converter = OpenCC.Converter({
 		from:'hk',
@@ -1187,6 +1189,15 @@ export default {
       tools: JSON.parse(converter(JSON.stringify(tools))),
     };
   },
+  computed: {
+    MarkdownT() {
+      return function (c) {
+        let md = new MarkdownIt();
+        return c
+          ? md.render(c) : "";
+      };
+    },
+  },
   methods: {
 		insertMemorandum(_html,tcid=""){//保存行为操作
 			//variable

+ 104 - 0
src/components/easy2/commpont/evaTable.vue

@@ -0,0 +1,104 @@
+<template>
+  <div>
+    <div class="evaCss">
+        <el-table
+          :data="eList"
+          :header-cell-style="{ background: '#F0F4FA' }"
+          :row-class-name="tableRowClassName"
+          border
+          stripe
+          style="width: 100%"
+        >
+          <el-table-column label="素养" align="center">
+            <template slot-scope="scope">
+              <div
+                style="display:flex;justify-content: center;align-items: center;"
+              >
+                <img
+                  class="blueRootCss"
+                  v-if="
+                    scope.row.isai == 1
+                  "
+                  src="../../../assets/icon/newIcons/blueRoot.png"
+                  alt=""
+                />
+                {{ scope.row.target ? scope.row.target : "-" }}
+              </div>
+            </template></el-table-column
+          >
+
+          <el-table-column label="评价标准" align="center">
+            <template slot-scope="scope"
+              ><div>
+                {{ scope.row.detail != "" ? scope.row.detail : "-" }}
+              </div></template
+            >
+          </el-table-column>
+
+          <el-table-column label="细则" align="center">
+            <template slot-scope="scope"
+              ><div
+                style="display:flex;justify-content: space-around;margin:auto"
+                v-if="scope.row.rule"
+              >
+                <el-popover placement="top" width="350" trigger="hover">
+                  <div
+                    v-html="scope.row.rule"
+                    style="white-space:pre-wrap"
+                  ></div>
+                  <div slot="reference" style="color:#4383FF;cursor: pointer;">
+                    查看
+                  </div>
+                </el-popover>
+              </div>
+              <div v-else>-</div>
+            </template>
+          </el-table-column>
+        </el-table>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: ["eList"],
+//   mounted() {
+//     console.log("eList", this.eList);
+//   },
+  data() {
+    return {};
+  }
+};
+</script>
+
+<style scoped>
+.evaCss {
+  display: flex;
+  flex-direction: row;
+  flex-wrap: nowrap;
+  align-items: flex-start;
+  padding: 0 0 20px;
+  width: 100%;
+}
+
+.evaCss >>> .cell {
+  position: relative;
+  overflow: visible;
+}
+.evaCss >>> .el-table__body-wrapper {
+  overflow: visible;
+}
+.evaCss >>> .el-table {
+  overflow: visible;
+}
+.blueRootCss{
+  display: block;
+  margin-right: 5px;
+}
+.blueRootCss{
+  position: absolute;
+  top:50%;
+  left: 0;
+  transform: translate(-20px,-50%);
+}
+</style>

File diff suppressed because it is too large
+ 511 - 172
src/components/easy2/commpont/markDialog.vue


+ 53 - 248
src/components/easy2/commpont/markScore.vue

@@ -77,6 +77,7 @@ export default {
     "loading",
     "wIndex",
     "toolIndex",
+    "tool"
   ],
 
   data() {
@@ -87,7 +88,8 @@ export default {
       id: this.$route.query.courseId,
       stUid: this.scoCon.userid,
       userid: this.$route.query.userid,
-      total: 0
+      total: 0,
+      textarea:''
     };
   },
 
@@ -95,6 +97,7 @@ export default {
     totalScore() {
       let a = 0;
       let isPing = 0;
+      
       this.scoTitList.forEach(e => {
         if (e.cog || e.cog == "0") {
           a += e.cog * 1;
@@ -102,16 +105,17 @@ export default {
           isPing += 1;
         }
       });
+      
 
       let data = 0;
-      if (isPing == this.scoTit.length) {
+      if (isPing == this.scoTitList.length) {
         this.$emit("updateDocSco", {
           val: this.toolIndex,
           val2: this.wIndex,
           val3: null
         });
       } else {
-        data = (a / this.scoTit.length).toFixed(1);
+        data = (a / this.scoTitList.length).toFixed(1);
         this.$emit("updateDocSco", {
           val: this.toolIndex,
           val2: this.wIndex,
@@ -124,7 +128,12 @@ export default {
   },
 
   mounted() {
-    this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
+    
+    if (this.tool.eList && this.tool.eList.length) {
+      this.scoTitList = JSON.parse(JSON.stringify(this.tool.eList));
+    }else{
+      this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
+    }
     this.getData();
   },
 
@@ -158,19 +167,21 @@ export default {
 
     // 获取单个数据
     getData() {
-      // this.fileId =[]
-      // console.log(' this.scoCon', this.scoTitList);
-      
+
       let params = {
         uid: this.scoCon.userid,
-        cid: this.id
+        cid: this.id,
+        s:this.stage,
+        t:this.task,
+        tool:this.toolIndex ? this.toolIndex :''
       };
       this.ajax
-        .get(this.$store.state.api + "selectWorksEvaScore", params)
+        .get(this.$store.state.api + "selectWorksEvaScoreTwo", params)
         .then(res => {
           // console.log("res", res.data);
 
           if (res.data[0].length > 0) {
+            
             var data2 = [];
             res.data[0].forEach((val, index) => {
               if (val.task == this.task) {
@@ -178,18 +189,18 @@ export default {
                 this.homeworkVal = res.data[0][index];
               }
             });
-            // console.log('data2',data2);
             
             if (data2.length == 0) {
-              this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
+              if (this.tool.eList && this.tool.eList.length) {
+                this.scoTitList = JSON.parse(JSON.stringify(this.tool.eList));
+              }else{
+                this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
+              }
             } else {
               let data = JSON.parse(data2.rate);
               this.scoTitList.forEach((e, index) => {
                 e.cog = null;
                 for (const key in data) {
-                  // if (e.value.endsWith('。')) {
-                  //   e.value = e.value.slice(0, -1); // 如果字符串以句号结尾,则去除最后一个字符
-                  // }
 
                   if (isNaN(parseFloat(e.detail)) && e.detail) {
                     var result = e.detail.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
@@ -219,7 +230,11 @@ export default {
               // console.log(this.scoTitList);
             }
           } else {
-            this.scoTitList = JSON.parse(JSON.stringify(this.scoTit));
+            this.scoTitList.forEach((e, index) => {
+              e.cog = null;
+            }) 
+            this.scoTitList = JSON.parse(JSON.stringify(this.scoTitList));
+
           }
         })
         .catch(err => {
@@ -227,12 +242,21 @@ export default {
         });
     },
     markScoreDigBtn() {
-      this.$emit("markScoreDig", {
-        val: this.stUid,
-        val2: this.toolIndex,
-        tit: this.scoTit,
-        uname:this.scoCon.sName
-      });
+      if (this.tool.eList && this.tool.eList.length) {
+        this.$emit("markScoreDig", {
+          val: this.stUid,
+          val2: this.toolIndex,
+          tit: this.tool.eList,
+          uname:this.scoCon.sName
+        });
+      }else{
+        this.$emit("markScoreDig", {
+          val: this.stUid,
+          val2: this.toolIndex,
+          tit: this.scoTit,
+          uname:this.scoCon.sName
+        });
+      }
     },
     // 重置
     reset() {
@@ -242,233 +266,10 @@ export default {
       });
     },
 
-    // 老师提交评分
-    submit() {
-      let data = this.scoTitList.map(e => {
-        return e.detail + ":" + e.cog;
-      });
-      // console.log("data", data);
-      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.id,
-        s: this.stage,
-        t: this.task,
-        rate: JSON.stringify(processedData),
-        uid: this.stUid
-      };
-      // return console.log(params);
-      this.ajax
-        .get(this.$store.state.api + "updateWorksEva", params)
-        .then(res => {
-          this.$message({
-            message: "评价成功",
-            type: "success"
-          });
-          this.$emit("refreshOther", this.toolIndex);
-        })
-        .catch(err => {
-          this.$message.error("评价失败");
-          console.error(err);
-        });
-    },
-
-    // ai评分
-    AIsubmit() {
-      let tit = this.scoTit;
-      tit.forEach((e, index) => {
-        if (!e.isai) {
-          e.isai = 1;
-        }
-      });
-      let con = JSON.parse(this.scoCon.works);
-      this.$emit("updateLoading", {
-        val: this.toolIndex,
-        val2: this.wIndex,
-        val3: true
-      });
-      let _text = "";
-      for (let i = 0; i < tit.length; i++) {
-        if (tit[i].isai == 1) {
-          _text += `评价名称:${tit[i].value} 评价描述:${tit[i].detail} \n`;
-        }
-      }
-      let laws = "";
-      for (let i = 0; i < tit.length; i++) {
-        if (tit[i].isai == 1) {
-          laws += `评价维度:${tit[i].value} 评价细则:${tit[i].rule} \n`;
-        }
-      }
-
-      //  console.log(_text);
-      let msg = `NOTICE
-      Role: 你是一个专业的项目式学习导师,你要对学生的评价高度负责。你要根据“六级评价细则”给学生作品评分,并生成需要的JSON数据。
-      Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
-      ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
-      Instruction: Based on the context, follow "Format example", write content.
-
-      #Context
-      ##要求
-      根据<评价细则>和<作业内容>的相关性评价作业,判根据细则评价作业,判断该作业属于六级中的哪个等级。如果作业内容与评价细则无关,则直接评为0星。
-      
-
-      
-      ##评分资料
-      评价细则:${laws}
-      作业内容:${con.text}
-
-      # Format example
-      [{'评价名称':'评价等级0-5(数字)'},{'评价名称':'评价等级0-5(数字)'},{'评价名称':'评价等级0-5(数字)'},{'评价名称':'评价等级0-5(数字)'}]
-      `;
-      // console.log(msg);
-      this.aiGet2(msg);
-    },
-
-    // ai打分
-    aiGet2(messages) {
-      // console.log(this.toolIndex, this.wIndex);
-      let _this = this;
-
-      let params = {
-        assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
-        message: [
-          {
-            type: "text",
-            text: messages.replaceAll("\n", " ").replaceAll("*", "")
-          }
-        ],
-        session_name: uuidv4(),
-        userId: this.userid,
-        file_ids: [],
-        model: "gpt-4o-2024-08-06"
-      };
-      this.ajax
-        .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", params)
-        .then(response => {
-          let data = response.data.FunctionResponse;
-          // console.log("data", data);
-          if (data.message) {
-            let dArray = {};
-            try {
-              dArray = JSON.parse(
-                data.message.replaceAll("```json", "").replaceAll("```", "")
-              );
-            } catch (error) {
-              console.log("error_________________" + error);
-              try {
-                let regex = new RegExp("(?<=```json)([\\s\\S]*?)(?=```)");
-
-                let match = data.message.match(regex);
-                dArray = JSON.parse(
-                  match[0]
-                    .replace(/\n/g, "")
-                    .replace(/\s{2,}/g, "")
-                    .replace(/\'/g, '"')
-                );
-              } catch (error) {
-                try {
-                  dArray = JSON.parse(
-                    data.message
-                      .replaceAll("```json", "")
-                      .replaceAll("# Solution", "")
-                      .replaceAll("```", "")
-                      .replace(/\n/g, "")
-                      .replace(/\s{2,}/g, "")
-                      .replace(/\'/g, '"')
-                  );
-                } catch (error) {
-                  console.log("error_________________" + error);
-                }
-                console.log("error_________________" + error);
-              }
-            }
-            // console.log("dArray3", dArray);
-            // _this.submit2(dArray);
-            // 提交评分
-            // if (!dArray) {
-            //   _this.$emit("updateLoading", {val:_this.task,val2:_this.wIndex,val3:false});
-            // }
-            let processedData = {};
-            // return console.log(dArray);
-
-            dArray.forEach(function(item) {
-              let key = Object.keys(item)[0];
-              let value = item[key];
-              processedData[key] = value;
-            });
-
-            for (const key in processedData) {
-              if (!Number.isFinite(processedData[key] * 1)) {
-                processedData[key] = 0;
-              }
-            }
-
-            processedData.content = this.textarea;
-
-            let params = {
-              cid: _this.id,
-              s: _this.stage,
-              t: _this.task,
-              rate: JSON.stringify(processedData),
-              uid: _this.stUid
-            };
-            // console.log(params);
-            _this.ajax
-              .get(_this.$store.state.api + "updateWorksEva", params)
-              .then(res => {
-                _this.$message({
-                  message: "评价成功",
-                  type: "success"
-                });
-                // console.log(_this.wIndex, _this.task);
-                _this.$emit("updateLoading", {
-                  val: _this.toolIndex,
-                  val2: _this.wIndex,
-                  val3: false
-                });
-                _this.$emit("refreshOther", _this.toolIndex);
-                _this.getData();
-                // _this.markScoPopover = false;
-                // _this.$emit("update:loading", false);
-              })
-              .catch(err => {
-                _this.$message.error("评价失败");
-                _this.$emit("updateLoading", {
-                  val: _this.toolIndex,
-                  val2: _this.wIndex,
-                  val3: false
-                });
-                console.error(err);
-              });
-          }
-          this.$forceUpdate();
-
-        })
-        .catch(error => {
-          // _this.markScoPopover = false;
-          // _this.$emit("update:loading", false);
-          _this.$emit("updateLoading", {
-            val: _this.toolIndex,
-            val2: _this.wIndex,
-            val3: false
-          });
-          _this.$message.error("评价失败");
-
-          // _this.loading = false
-          console.log(error);
-        });
-    },
 
 
     // ai循环评分
-    async aiupdetaSco(messages, uid, stage, task,_fileid) {
+    async aiupdetaSco(messages, uid, stage, task,_fileid,work) {
       let _this = this;
       let params = {
         assistant_id: "6063369f-289a-11ef-8bf4-12e77c4cb76b",
@@ -481,6 +282,7 @@ export default {
         session_name: uuidv4(),
         userId: this.userid,
         file_ids: _fileid ? [_fileid] : [],
+        isImage: work == 0 ? true : '',
         model: "gpt-4o-2024-08-06"
       };
       return new Promise((resolve,reject) => {
@@ -558,7 +360,7 @@ export default {
                   // let key2 = key.match(/[\u4e00-\u9fa5a-zA-Z]+/g).join("");
 
 
-                  if (key != "评语") {
+                  if (key != "comment") {
                   let isNumK = /^\d+(\.\d+)?$/.test(processedData[key]);
 
                     if (result.indexOf(key2) != -1 && isNumK) {
@@ -609,7 +411,7 @@ export default {
                 }
               }
               for (const key in processedData) {
-                if (key == "评语") {
+                if (key == "comment") {
                   processedDataCopy.content = processedData[key];
                 }
               }
@@ -617,14 +419,17 @@ export default {
                 cid: _this.id,
                 s: stage,
                 t: task,
+                tool: this.toolIndex ? this.toolIndex : '',
                 rate: JSON.stringify(processedDataCopy),
                 uid: uid
               };
               // console.log("params", params);
               _this.ajax
-                .get(_this.$store.state.api + "updateWorksEva", params)
+                .get(_this.$store.state.api + "updateWorksEvaTwo", params)
                 .then(res => {
                   console.log('999999999999999999999999999999999999999999999999999');
+                  this.getData()
+                  this.$emit('refreshOther',{tid:this.toolIndex,wid:this.wIndex})
                   
                   return resolve(1);
                   

File diff suppressed because it is too large
+ 193 - 286
src/components/easy2/studyStudent.vue


+ 1 - 1
src/main.js

@@ -18,7 +18,7 @@ import VueCookies from 'vue-cookies'
 import hevueImgPreview from './components/tools/hevue-img-preview'
 import drag from './components/directive/el-drag-dialog';
 import VueAudio from 'vue-audio-better'
-
+import './assets/css/markdownCss.css'
 
 Vue.use(VideoPlayer).use(VueAudio).use(VueCookies).use(hevueImgPreview, {
     clickMaskCLose: true

Some files were not shown because too many files changed in this diff