lsc il y a 11 mois
Parent
commit
3920ac1e14

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.d77257d7d6e226c97d8f6ad9ce790d0a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.85f22e7b4ab99591785c.js></script><script type=text/javascript src=./static/js/app.82aba29f7eade0c11919.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.75367a9062a005011cb2fed60332e80c.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.571c38d63f24b1ae9e16.js></script><script type=text/javascript src=./static/js/vendor.85f22e7b4ab99591785c.js></script><script type=text/javascript src=./static/js/app.cd92a86063552d753f5f.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/css/app.75367a9062a005011cb2fed60332e80c.css


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/css/app.75367a9062a005011cb2fed60332e80c.css.map


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/js/app.cd92a86063552d753f5f.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/js/app.cd92a86063552d753f5f.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/js/manifest.571c38d63f24b1ae9e16.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
+}

+ 154 - 74
src/components/pages/aiAddCourse/addCourse.vue

@@ -678,7 +678,7 @@
                   <div class="outline_detail" v-loading="cpoteLoading.cpote1">
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入概念群"
                       v-model="cpote.cpote1" v-if="cpote.cpote1s"></textarea>
-                    <div class="markBox" v-html="MarkdownT(cpote.cpote1)" v-else></div>
+                    <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote1)" v-else></div>
                     <div class="op_box">
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                       <div style="display: flex;">
@@ -703,7 +703,7 @@
                   <div class="outline_detail" v-loading="cpoteLoading.cpote2">
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入问题链"
                       v-model="cpote.cpote2" v-if="cpote.cpote2s"></textarea>
-                    <div class="markBox" v-html="MarkdownT(cpote.cpote2)" v-else></div>
+                    <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote2)" v-else></div>
                     <div class="op_box">
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                       <div style="display: flex;">
@@ -728,7 +728,7 @@
                   <div class="outline_detail" v-loading="cpoteLoading.cpote3">
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入目标层"
                       v-model="cpote.cpote3" v-if="cpote.cpote3s"></textarea>
-                    <div class="markBox" v-html="MarkdownT(cpote.cpote3)" v-else></div>
+                    <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote3)" v-else></div>
                     <div class="op_box">
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                       <div style="display: flex;">
@@ -753,7 +753,7 @@
                   <div class="outline_detail" v-loading="cpoteLoading.cpote4">
                     <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入任务簇"
                       v-model="cpote.cpote4" v-if="cpote.cpote4s"></textarea>
-                      <div class="markBox" v-html="MarkdownT(cpote.cpote4)" v-else></div>
+                      <div class="markBox vditor-reset" v-html="MarkdownT(cpote.cpote4)" v-else></div>
                     <div class="op_box">
                       <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                       <div style="display: flex;">
@@ -790,7 +790,7 @@
                     <div class="outline_detail" v-loading="taskDetailLoading5.indexOf('task-' + index) !== -1">
                       <textarea v-autoHeight="100" rows="4" class="binfo_input binfo_textarea" cols placeholder="请输入教案"
                         v-model="item.taskDetail3" v-if="item.isTask3"></textarea>
-                      <div class="markBox" v-html="MarkdownT(item.taskDetail3)" v-else></div>
+                      <div class="markBox vditor-reset" v-html="MarkdownT(item.taskDetail3)" v-else></div>
                       <div class="op_box">
                         <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
                         <div style="display: flex;">
@@ -1288,8 +1288,8 @@
                           学习内容
                           <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="istemplate == 1">
                             <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
-                              @contextmenu.prevent="openAiDialog(1, 'aiTask',()=>{this.loading = false})"
-                              @click="openAiDialog(2, 'aiTask',()=>{this.loading = false})">生成任务</button>
+                              @contextmenu.prevent="openAiDialog(1, 'aiTask',()=>{loading = false})"
+                              @click="openAiDialog(2, 'aiTask',()=>{loading = false})">生成任务</button>
                           </el-tooltip>
                         </div>
                       </div>
@@ -5238,7 +5238,7 @@
     </aiDialog>
     <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"
       @retrunCourse="retrunCourse" :templateid="templateid"></tipsDialog>
-    <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId"></aiCreateDialog>
+    <aiCreateDialog :dialogVisibleAiCreate.sync="dialogVisibleAiCreate" :courseName="courseName" @createAiPpt="createAiPpt" :infoData="infoData" :courseTypeId="courseTypeId" :CourseTypeJson="CourseTypeJson"></aiCreateDialog>
     <aiCreateVideoDialog :dialogVisibleAiCreateVideo.sync="dialogVisibleAiCreateVideo" :courseName="courseName" @createAiVideo="createAiVideo"></aiCreateVideoDialog>
   </div>
 </template>
@@ -13210,7 +13210,7 @@ ${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '#目标层\n'+thi
 任务描述:该描述是教师给与学生的指示(用于指导学生如何进行每个教学活动),对应到学生活动,你应该用友好,但是又清晰明确的口吻来撰写。
 评价标准:至少3条评价标准,这个评价是教师用来评价学生表现的,需要包含评价维度,以及该维度中教师期待学生的表现,句式为学生应该能....
 平台工具:
-工具名:**从工具列表**中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,只在这几个工具里选
+工具名:**从工具列表**中选择0~2个工具用于学生阶段性成果提交:工具列表:电子白板,文档,思维导图,表格,作业提交,问答,选择题,只在这几个工具里选
 工具指引:以友好,明确的口吻告诉学生该如何使用该工具
 
 # Format example
@@ -13779,7 +13779,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
       }
       this.ajax
         .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
-        .then((response) => {
+        .then(async (response) => {
           console.log(response);
           let data = response.data.FunctionResponse
           if (data.message) {
@@ -13791,8 +13791,12 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
               "文档": { tool: 52, type: 1 },
               "思维导图": { tool: 3, type: 1 },
               "表格": { tool: 48, type: 1 },
-              "作业提交": { tool: 16, type: 2 }
+              "作业提交": { tool: 16, type: 2 },
+              "问答": { tool: 15, type: 2 },
+              "选择题": { tool: 45, type: 2 },
             }
+            // answerQ:"sssssssssssssss"
+
             for (var i = 0; i < tArray.length; i++) {
               let _task = tArray[i]
               _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail = _task.detail
@@ -13800,16 +13804,23 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
               _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose = []
               if (_task.toolChoose.length) {
                 for (var j = 0; j < _task.toolChoose.length; j++) {
-                  _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
-                    {
+                  let _json = {
                       tool: toolsJson[_task.toolChoose[j].tool] ? [toolsJson[_task.toolChoose[j].tool].tool] : [],
                       toolDetail: _task.toolChoose[j].detail,
                       toolType: toolsJson[_task.toolChoose[j].tool] ? toolsJson[_task.toolChoose[j].tool].type : 0,
                       askCount: 1,
                       askTitle: "",
                       askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
-                    },
-                  )
+                    }
+                  
+                  if(_task.toolChoose[j].tool == '问答'){
+                    let answerQ = await _this.aiCreateQuestion(15, i)
+                    _json.answerQ = answerQ.answerQ 
+                  }else if(_task.toolChoose[j].tool == '选择题'){
+                    let testJson = await _this.aiCreateQuestion(45, i)
+                    _json.testJson = {"testCount":testJson.length,"testTitle":"","testJson":testJson} 
+                  }
+                  _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(_json)
                 }
               } else {
                 _this.unitJson[0].chapterInfo[0].taskJson[i].toolChoose.push(
@@ -13836,6 +13847,134 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
           console.log(error);
         });
     },
+    async aiCreateQuestion(type, task) {
+      let _this = this
+      return new Promise((resolve, reject) => {
+        let fileid = []
+        if (_this.infoData.length) {
+          for (var i = 0; i < _this.infoData.length; i++) {
+            if(_this.infoData[i].fileid){
+              fileid.push(_this.infoData[i].fileid)
+            }
+          }
+        }
+
+        let sub = []
+        let mclass = []
+        if (this.courseTypeId.length) {
+          for (var i = 0; i < this.courseTypeId.length; i++) {
+            let _sid = this.courseTypeId[i]
+            for (var j = 0; j < this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'].length; j++) {
+              if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
+                mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
+              }
+              if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
+                sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
+              }
+            }
+          }
+        }
+        let messages = ""
+        if(type == 15){
+          messages = `NOTICE
+Role: 作为学生的学习指导Agent,你熟悉熟悉PBL(基于问题的学习)和5EX教学模型,能够根据学生的学情数据(当前的学习任务设计、学习表现数据、作业数据等)生成自适应的学习任务和对应的5道考核题目。
+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
+## 任务
+根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成1道问答题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以数组的格式
+
+## 限制
+- 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
+- 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
+
+## 课程简介
+课程名字:${_this.courseName}
+${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
+${sub.length ? '学科:' + sub.join(",") : ''}
+${mclass.length ? '面向年级:' + mclass.join(",") : ''}
+
+## 教案
+${this.teacherText[task].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
+
+# formate example
+{answerQ:"问题"}
+`
+        }else if(type == 45){
+          messages = `NOTICE
+Role: 作为学生的学习指导Agent,你熟悉熟悉PBL(基于问题的学习)和5EX教学模型,能够根据学生的学情数据(当前的学习任务设计、学习表现数据、作业数据等)生成自适应的学习任务和对应的5道考核题目。
+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
+## 任务
+根据本任务的#教案,在考虑到面向学生年级(<面向年级>)以及相对应的学科(<课程学科>)的基础上生成5道单选题。题目的意义是测试学生对本教学任务知识点的掌握情况,你的题目应当是有意义的。然后根据Format example的要求返回要以数组的格式
+
+## 限制
+- 生成题目禁止重复。
+- 生成题目应该充分考虑学生年级<面向年级>和面向学科<课程学科>,你的题目应有教学意义。
+- 请严格按照以下格式要求输出内容,题目必须是单选题。
+- 你仅仅需要输出题目,其他什么内容都不需要输出。禁止输出题目以外的任何内容。
+
+## 课程简介
+课程名字:${_this.courseName}
+${_this.courseText ? '课程简要描述:' + _this.courseText : ''}
+${sub.length ? '学科:' + sub.join(",") : ''}
+${mclass.length ? '面向年级:' + mclass.join(",") : ''}
+
+## 教案
+${this.teacherText[task].detail.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
+
+# formate example
+[{"teststitle":"题目内容","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"},{"teststitle":"题目内容","testItem":"选项数量(数字)","checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":"答案(数字)","type":"1"}]
+`
+        }
+
+        let parm = {
+          assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
+          message: [{"type":"text", "text":messages}],
+          session_name: uuidv4(),
+          userId: this.userid,
+          file_ids: fileid.length ? [...fileid] : '',
+        }
+        this.ajax
+          .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm)
+          .then((response) => {
+            console.log(response);
+            let data = response.data.FunctionResponse
+            if (data.message) {
+              console.log(data.message);
+              try {
+                let tArray = JSON.parse(data.message.replaceAll('```json','').replaceAll('```',''))
+                resolve(tArray)
+              } catch (error) {
+                if(type == 15){
+                  resolve({answerQ: "题目"})
+                }else if(type == 45){
+                  resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
+                }
+              }
+
+            }else if(type == 15){
+              resolve({answerQ: "题目"})
+            }else if(type == 45){
+              resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
+            }
+          })
+          .catch((error) => {
+
+            if(type == 15){
+              resolve({answerQ: "题目"})
+            }else if(type == 45){
+              resolve([{"teststitle":"题目1","testItem":4,"checkList":["选项1","选项2","选项3","选项4"],"timuList":[],"answer":0,"type":"1"}])
+            }
+            console.log(error);
+          });
+        });
+    },
     async aiGet4(messages, callback, clickType) {
       let _this = this
 
@@ -19050,63 +19189,4 @@ ol {
   border-radius: 5px;
 }
 
-/* table 样式 */
-.markBox >>> table {
-  border-top: 1px solid #ccc;
-  border-left: 1px solid #ccc;
-}
-
-.markBox >>> table td,
-.markBox >>> table th {
-  border-bottom: 1px solid #ccc;
-  border-right: 1px solid #ccc;
-  /* padding: 20px 5px; */
-  padding: 5px 10px;
-  max-width: 0px;
-  height: 30px;
-  vertical-align: baseline;
-  box-sizing: border-box;
-}
-
-.markBox >>> table th {
-  border-bottom: 2px solid #ccc;
-  text-align: center;
-}
-
-/* blockquote 样式 */
-.markBox >>> blockquote {
-  display: block;
-  border-left: 8px solid #d0e5f2;
-  padding: 5px 10px;
-  margin: 10px 0;
-  line-height: 1.4;
-  font-size: 100%;
-  background-color: #f1f1f1;
-}
-
-/* code 样式 */
-.markBox >>> code {
-  display: inline-block;
-  /* *display: inline; */
-  zoom: 1;
-  background-color: #f1f1f1;
-  border-radius: 3px;
-  padding: 3px 5px;
-  margin: 0 3px;
-}
-
-.markBox >>> pre code {
-  display: block;
-}
-
-/* ul ol 样式 */
-.markBox >>> ul,
-ol {
-  margin: 10px 0 10px 20px;
-}
-
-.markBox >>> li,ul{
-  list-style: none;
-
-}
 </style>

+ 5 - 1
src/components/pages/aiAddCourse/aiCreateDialog.vue

@@ -57,6 +57,10 @@ export default {
             type: Array,
             default: "",
         },
+        CourseTypeJson: {
+            type: Object,
+            default: ()=>({}),
+        }
     },
     // 根据用户给你的参考资料
     data() {
@@ -406,7 +410,7 @@ ${mclass.length ? "#参考资料\n面向年级:" + mclass.join(",") : ""}
                 // 现在你有了一个 Blob 对象
                 console.log(blob);
 
-                const file = new File([blob], "aiPpt.pptx", {
+                const file = new File([blob], this.courseName+".pptx", {
                     type: "application/vnd.openxmlformats-officedocument.presentationml.presentation",
                 });
                 console.log(pres);

+ 1 - 0
src/main.js

@@ -20,6 +20,7 @@ import Clipboard from "clipboard";
 import hevueImgPreview from './components/tools/hevue-img-preview'
 import './assets/css/button.css'
 import './assets/css/dialog.css'
+import './assets/css/markdownCss.css'
 import VueAudio from 'vue-audio-better'
 
 const echarts = require('echarts');

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff