|
@@ -157,7 +157,7 @@
|
|
? pTypeCheck.indexOf(item.id) != -1
|
|
? pTypeCheck.indexOf(item.id) != -1
|
|
: true)
|
|
: true)
|
|
">{{ item.name }}:</span>
|
|
">{{ item.name }}:</span>
|
|
- <el-checkbox-group v-model="courseTypeId" v-if="
|
|
|
|
|
|
+ <el-checkbox-group v-model="courseTypeId" @change="typeChange" v-if="
|
|
CourseTypeJson[item.id].length > 0 &&
|
|
CourseTypeJson[item.id].length > 0 &&
|
|
(oid == '69893dca-1d47-11ed-8c78-005056b86db5'
|
|
(oid == '69893dca-1d47-11ed-8c78-005056b86db5'
|
|
? pTypeCheck.indexOf(item.id) != -1
|
|
? pTypeCheck.indexOf(item.id) != -1
|
|
@@ -747,6 +747,166 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
|
|
|
|
+ <div style="position: relative;
|
|
|
|
+ background: #fff;
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
+ padding: 1px 20px 10px;
|
|
|
|
+ width: 100%;
|
|
|
|
+ border-radius: 10px;">
|
|
|
|
+ <div style="
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ align-items: center;
|
|
|
|
+ " :style="{
|
|
|
|
+ margin: true
|
|
|
|
+ ? '20px 0 10px'
|
|
|
|
+ : '20px 0 0',
|
|
|
|
+ }">
|
|
|
|
+ <div style="margin-bottom: 10px;width:100%;font-weight:bold" class="lineTitle">
|
|
|
|
+ 参考标准
|
|
|
|
+ <div class="add_info_box" style="margin: 0 0 0 auto">
|
|
|
|
+ <button class="c_pub_button_add pub_btn_add_img" @click="addImg($event)">
|
|
|
|
+ 上传参考标准
|
|
|
|
+ <input type="file" accept=".docx,.doc,.ppt,.pptx,.md,.txt,.pdf" multiple="multiple" style="display: none" v-if="inputShow" @change="
|
|
|
|
+ beforeUploadInfo2(
|
|
|
|
+ $event,
|
|
|
|
+ 19
|
|
|
|
+ )
|
|
|
|
+ " />
|
|
|
|
+ </button>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div>
|
|
|
|
+ <div class="add_chapters_box add_c_none" v-if="
|
|
|
|
+ knowInfoData &&
|
|
|
|
+ knowInfoData.length == 0
|
|
|
|
+ ">
|
|
|
|
+ <img src="../../../assets/icon/new/c_none.png" alt /><span>暂时还没有内容,快去添加吧</span>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-else class="add_chapters_box" style="display: flex; flex-direction: column">
|
|
|
|
+ <div class="chapter_upload" v-for="(item1, index1) in knowInfoData" :key="item1.id" @click="
|
|
|
|
+ getChapterData(
|
|
|
|
+ $event,
|
|
|
|
+ index1,
|
|
|
|
+ item1.type
|
|
|
|
+ )
|
|
|
|
+ " >
|
|
|
|
+ <div class="chapter_upload_o" style="
|
|
|
|
+ position: relative;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ ">
|
|
|
|
+ <div class="chapter_upload_check" :class="{ checked: knowFileids.indexOf(item1.fileid) != -1 }" @click="checkKnowInfoData(item1.fileid)"></div>
|
|
|
|
+ <div class="chapter_upload_l" style="padding: 1px 0 0 10px">
|
|
|
|
+ <div v-if="item1.type == 2" class="chapter_upload_l_i2"></div>
|
|
|
|
+ <div v-if="item1.type == 3" class="chapter_upload_l_i3" style="margin-left: 1px">
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="item1.type == 6" class="chapter_upload_l_i6" style="margin-left: 1px">
|
|
|
|
+ </div>
|
|
|
|
+ <!-- <div v-if="item1.type == 7" class="chapter_upload_l_i8" style="margin-left: 1px"></div> -->
|
|
|
|
+ <div v-if="item1.type == 8" class="chapter_upload_l_i8" style="margin-left: 1px">
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="item1.type == 14" class="chapter_upload_l_i14" style="margin-left: 1px">
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="item1.type == 12" class="chapter_upload_l_i12" style="margin-left: 1px">
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="item1.type == 13" class="chapter_upload_l_i13" style="margin-left: 1px">
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="chapter_upload_n">
|
|
|
|
+ <input readonly="true" v-if="
|
|
|
|
+ item1.type == 2 ||
|
|
|
|
+ item1.type == 3 ||
|
|
|
|
+ item1.type == 12 ||
|
|
|
|
+ item1.type == 13 ||
|
|
|
|
+ item1.type == 7
|
|
|
|
+ " :placeholder="item1.name" @click.stop="
|
|
|
|
+ checkChpater3($event, index1, item1)
|
|
|
|
+ " style="
|
|
|
|
+ border: none;
|
|
|
|
+ outline: none;
|
|
|
|
+ width: 80%;
|
|
|
|
+ minwidth: 215px;
|
|
|
|
+ z-index: 99;
|
|
|
|
+ font-size: 14px;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ " />
|
|
|
|
+ <input :placeholder="item1.name" v-if="item1.type == 6" style="
|
|
|
|
+ border: none;
|
|
|
|
+ outline: none;
|
|
|
|
+ width: 80%;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ " readonly="true" @click="
|
|
|
|
+ selectAttText(index1)
|
|
|
|
+ " />
|
|
|
|
+ <input :placeholder="item1.title ? item1.title : '链接'
|
|
|
|
+ " v-if="item1.type == 8" style="
|
|
|
|
+ border: none;
|
|
|
|
+ outline: none;
|
|
|
|
+ width: 80%;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ " readonly="true" @click="selectLine(index1)" />
|
|
|
|
+ <input :placeholder="item1.title ? item1.title : '链接'
|
|
|
|
+ " v-if="item1.type == 14" style="
|
|
|
|
+ border: none;
|
|
|
|
+ outline: none;
|
|
|
|
+ width: 80%;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ " readonly="true" @click="
|
|
|
|
+ openUpdateSource(index1)
|
|
|
|
+ " />
|
|
|
|
+ </div>
|
|
|
|
+ <div class="chapter_upload_ic">
|
|
|
|
+ <div class="chapter_upload_noSee" v-if="item1.type == 12"></div>
|
|
|
|
+ <div class="chapter_upload_ic_check" v-if="item1.type == 3" @click.stop="
|
|
|
|
+ checkChpater3($event, index1, item1)
|
|
|
|
+ ">
|
|
|
|
+ <div></div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="chapter_upload_ic_r" @click.stop="
|
|
|
|
+ deleteKnowInfoData(
|
|
|
|
+ $event,
|
|
|
|
+ index1
|
|
|
|
+ )
|
|
|
|
+ ">
|
|
|
|
+ <div></div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <div v-if="
|
|
|
|
+ knowinfoproVisible
|
|
|
|
+ " class="mask">
|
|
|
|
+ <div class="progressBox">
|
|
|
|
+ <div class="lbox">
|
|
|
|
+ <img src="../../../assets/loading.gif" />上传中,请稍后
|
|
|
|
+ </div>
|
|
|
|
+ <div style="margin-bottom: 10px">
|
|
|
|
+ <span>{{
|
|
|
|
+ knowinfoisFinishSize
|
|
|
|
+ }}</span>
|
|
|
|
+ /
|
|
|
|
+ <span>{{
|
|
|
|
+ knowinfoisAllSize
|
|
|
|
+ }}</span>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
<div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
|
|
<div class="whiteBg" style="background: #fff; margin: 0 0 10px;padding: 0 0 15px;" v-if="(!yiKeTemplateArray.includes(templateid))">
|
|
<div style="position: relative;
|
|
<div style="position: relative;
|
|
background: #fff;
|
|
background: #fff;
|
|
@@ -776,11 +936,13 @@
|
|
)
|
|
)
|
|
" />
|
|
" />
|
|
</button>
|
|
</button>
|
|
- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
|
|
|
+ <!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="knowFileids.length">
|
|
<button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
|
|
<button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
|
|
@contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
|
|
@contextmenu.prevent="openAiDialog(1, 'aiSearchFile')"
|
|
@click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
|
|
@click="openAiDialog(2, 'aiSearchFile')">智能检索资料</button>
|
|
- </el-tooltip>
|
|
|
|
|
|
+ </el-tooltip> -->
|
|
|
|
+ <button class="c_pub_button_confirm" style="margin: 0 0 0 auto;"
|
|
|
|
+ @click="openAiDialog(2, 'aiSearchFile2')" v-if="knowFileids.length">智能检索资料</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -1710,6 +1872,9 @@
|
|
: "下一步" }}
|
|
: "下一步" }}
|
|
</button>
|
|
</button>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
|
+ <button class="c_pub_button_confirm" v-if="isOutline2" @click="exportTeachPlan">
|
|
|
|
+ {{ "导出教案" }}
|
|
|
|
+ </button>
|
|
<!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
|
|
<!-- <el-tooltip effect="light" content="右键单击可配置提示词" placement="top" v-if="isOutline2 && cidType == 0">
|
|
<button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
|
|
<button class="c_pub_button_confirm" @click="nextSteps(2, 2)" @contextmenu.prevent="nextSteps(1, 2)" :class="{
|
|
pub_btn_next_img: steps != 3,
|
|
pub_btn_next_img: steps != 3,
|
|
@@ -4981,11 +5146,16 @@
|
|
@contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
|
|
@contextmenu.prevent="openAiDialog(1, 'aiRateRuleA', itemTaskIndex)"
|
|
@click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
|
|
@click="openAiDialog(2, 'aiRateRuleA', itemTaskIndex)">一键生成评价细则</div>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
- <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom" v-if="itemTask.eList && itemTask.eList.length">
|
|
<div class="r_pub_button_op" style="margin-left:10px;"
|
|
<div class="r_pub_button_op" style="margin-left:10px;"
|
|
@contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
|
|
@contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
|
|
@click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
|
|
@click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
|
+ <div class="r_pub_button_op" style="margin-left:10px;"
|
|
|
|
+ @contextmenu.prevent="openAiDialog(1, 'aiTaskG3', itemTaskIndex)"
|
|
|
|
+ @click="openAiDialog(2, 'aiTaskG3', itemTaskIndex)">{{ (itemTask.eList && itemTask.eList.length) ? '重新生成评价' : '生成评价' }}</div>
|
|
|
|
+ </el-tooltip>
|
|
</div>
|
|
</div>
|
|
<!-- <div class="line" style="width: 90%"></div> -->
|
|
<!-- <div class="line" style="width: 90%"></div> -->
|
|
</div>
|
|
</div>
|
|
@@ -6999,6 +7169,7 @@ import wpdf from "../test/file/wPdf2.vue";
|
|
import wOffice from "../test/file/wOffice.vue";
|
|
import wOffice from "../test/file/wOffice.vue";
|
|
import htmlDocx from "html-docx-js/dist/html-docx";
|
|
import htmlDocx from "html-docx-js/dist/html-docx";
|
|
import TurndownService from 'turndown';
|
|
import TurndownService from 'turndown';
|
|
|
|
+import JSZip from "jszip";
|
|
|
|
|
|
var OpenCC = require("opencc-js");
|
|
var OpenCC = require("opencc-js");
|
|
let converter = OpenCC.Converter({
|
|
let converter = OpenCC.Converter({
|
|
@@ -7466,7 +7637,14 @@ export default {
|
|
interSetting: false,
|
|
interSetting: false,
|
|
chatid: "",
|
|
chatid: "",
|
|
languageSetting: 0, //0中文 1繁体 2英文
|
|
languageSetting: 0, //0中文 1繁体 2英文
|
|
- isQuote: {}
|
|
|
|
|
|
+ isQuote: {},
|
|
|
|
+ knowFileArray: [],
|
|
|
|
+ knowInfoData: [],
|
|
|
|
+ knowinfoproVisible: false,
|
|
|
|
+ knowinfoisFinishSize: 0,
|
|
|
|
+ knowinfoisAllSize: 0,
|
|
|
|
+ knowinfoprogress: 0,
|
|
|
|
+ knowFileids: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
directives: {
|
|
directives: {
|
|
@@ -9075,6 +9253,43 @@ export default {
|
|
const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
|
const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
|
await this.beforeUploadHtml(file, index)
|
|
await this.beforeUploadHtml(file, index)
|
|
},
|
|
},
|
|
|
|
+ async generateExport(a, html, index) {
|
|
|
|
+ // <html lang="en">
|
|
|
|
+
|
|
|
|
+ // 将html文件中需要用到的数据挂载到store上
|
|
|
|
+ const content = `<!DOCTYPE html>
|
|
|
|
+ <html xmlns:v='urn:schemas-microsoft-com:vml'xmlns:o='urn:schemas-microsoft-com:office:office'xmlns:w='urn:schemas-microsoft-com:office:word'xmlns:m='http://schemas.microsoft.com/office/2004/12/omml'xmlns='http://www.w3.org/TR/REC-html40'>
|
|
|
|
+ <head>
|
|
|
|
+ <!--[if gte mso 9]><xml><w:WordDocument><w:View>Print</w:View><w:TrackMoves>false</w:TrackMoves><w:TrackFormatting/><w:ValidateAgainstSchemas/><w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid><w:IgnoreMixedContent>false</w:IgnoreMixedContent><w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText><w:DoNotPromoteQF/><w:LidThemeOther>EN-US</w:LidThemeOther><w:LidThemeAsian>ZH-CN</w:LidThemeAsian><w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript><w:Compatibility><w:BreakWrappedTables/><w:SnapToGridInCell/><w:WrapTextWithPunct/><w:UseAsianBreakRules/><w:DontGrowAutofit/><w:SplitPgBreakAndParaMark/><w:DontVertAlignCellWithSp/><w:DontBreakConstrainedForcedTables/><w:DontVertAlignInTxbx/><w:Word11KerningPairs/><w:CachedColBalance/><w:UseFELayout/></w:Compatibility><w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel><m:mathPr><m:mathFont m:val='Cambria Math'/><m:brkBin m:val='before'/><m:brkBinSub m:val='--'/><m:smallFrac m:val='off'/><m:dispDef/><m:lMargin m:val='0'/> <m:rMargin m:val='0'/><m:defJc m:val='centerGroup'/><m:wrapIndent m:val='1440'/><m:intLim m:val='subSup'/><m:naryLim m:val='undOvr'/></m:mathPr></w:WordDocument></xml><![endif]-->
|
|
|
|
+ <meta charset="UTF-8">
|
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
+ <title>${a}</title>
|
|
|
|
+ <style>
|
|
|
|
+ table {
|
|
|
|
+ border-collapse: collapse; /* 折叠边框 */
|
|
|
|
+ width: 100%;
|
|
|
|
+ }
|
|
|
|
+ th, td {
|
|
|
|
+ border: 1px solid black; /* 线条样式 */
|
|
|
|
+ padding: 8px;
|
|
|
|
+ text-align: left;
|
|
|
|
+ }
|
|
|
|
+ </style>
|
|
|
|
+ </head>
|
|
|
|
+ <body>
|
|
|
|
+ ${html}
|
|
|
|
+ </body>
|
|
|
|
+ </html>`;
|
|
|
|
+ // debugger
|
|
|
|
+ const blob = htmlDocx.asBlob(content)
|
|
|
|
+ // debugger
|
|
|
|
+ const dname = `${a}.docx`;
|
|
|
|
+ // 创建文件流
|
|
|
|
+
|
|
|
|
+ const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
|
|
|
+ return file
|
|
|
|
+ },
|
|
beforeUploadHtml(event, index) {
|
|
beforeUploadHtml(event, index) {
|
|
var file = event;
|
|
var file = event;
|
|
var credentials = {
|
|
var credentials = {
|
|
@@ -9233,6 +9448,12 @@ export default {
|
|
type: 3,
|
|
type: 3,
|
|
fileid: fileid == 1 ? '' : fileid,
|
|
fileid: fileid == 1 ? '' : fileid,
|
|
})
|
|
})
|
|
|
|
+ _this.infoData.push({
|
|
|
|
+ name: file.name,
|
|
|
|
+ url: data.Location,
|
|
|
|
+ type: 3,
|
|
|
|
+ fileid: fileid == 1 ? '' : fileid,
|
|
|
|
+ });
|
|
console.log(data.Location);
|
|
console.log(data.Location);
|
|
callback ? callback() : ''
|
|
callback ? callback() : ''
|
|
}
|
|
}
|
|
@@ -9985,6 +10206,11 @@ export default {
|
|
_this.pingjiainfoisFinishSize[tindex] = 0;
|
|
_this.pingjiainfoisFinishSize[tindex] = 0;
|
|
_this.pingjiainfoisAllSize[tindex] = event.target.files.length;
|
|
_this.pingjiainfoisAllSize[tindex] = event.target.files.length;
|
|
// _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
|
|
// _this.pingjiainfoisAllSize[tindex] = (file.size / 1024 / 1024).toFixed(2);
|
|
|
|
+ }else if(type == 19){
|
|
|
|
+ _this.knowinfoprogress = 0;
|
|
|
|
+ _this.knowinfoproVisible = true;
|
|
|
|
+ _this.knowinfoisFinishSize = 0;
|
|
|
|
+ _this.knowinfoisAllSize = event.target.files.length;
|
|
}else{
|
|
}else{
|
|
_this.infoprogress = 0;
|
|
_this.infoprogress = 0;
|
|
_this.infoproVisible = true;
|
|
_this.infoproVisible = true;
|
|
@@ -10068,6 +10294,8 @@ export default {
|
|
_this.xuanzeinfoisFinishSize = cfindex2;
|
|
_this.xuanzeinfoisFinishSize = cfindex2;
|
|
}else if(type == 18){
|
|
}else if(type == 18){
|
|
_this.pingjiainfoisFinishSize[tindex] = cfindex2;
|
|
_this.pingjiainfoisFinishSize[tindex] = cfindex2;
|
|
|
|
+ }else if(type == 19){
|
|
|
|
+ _this.knowinfoisFinishSize = cfindex2;
|
|
}else {
|
|
}else {
|
|
_this.infoisFinishSize = cfindex2;
|
|
_this.infoisFinishSize = cfindex2;
|
|
}
|
|
}
|
|
@@ -10084,6 +10312,8 @@ export default {
|
|
_this.xuanzeinfoproVisible = false;
|
|
_this.xuanzeinfoproVisible = false;
|
|
}else if(type == 18){
|
|
}else if(type == 18){
|
|
_this.pingjiainfoproVisible[tindex] = false;
|
|
_this.pingjiainfoproVisible[tindex] = false;
|
|
|
|
+ }else if(type == 19){
|
|
|
|
+ _this.knowinfoproVisible = false;
|
|
}else{
|
|
}else{
|
|
_this.infoproVisible = false;
|
|
_this.infoproVisible = false;
|
|
}
|
|
}
|
|
@@ -10106,6 +10336,8 @@ export default {
|
|
_this.xuanzeinfoisFinishSize = cfindex2;
|
|
_this.xuanzeinfoisFinishSize = cfindex2;
|
|
}else if(type == 18){
|
|
}else if(type == 18){
|
|
_this.pingjiainfoisFinishSize[tindex] = cfindex2;
|
|
_this.pingjiainfoisFinishSize[tindex] = cfindex2;
|
|
|
|
+ }else if(type == 19){
|
|
|
|
+ _this.knowinfoisFinishSize = cfindex2;
|
|
}else {
|
|
}else {
|
|
_this.infoisFinishSize = cfindex2;
|
|
_this.infoisFinishSize = cfindex2;
|
|
}
|
|
}
|
|
@@ -10121,6 +10353,8 @@ export default {
|
|
_this.xuanzeinfoproVisible = false;
|
|
_this.xuanzeinfoproVisible = false;
|
|
}else if(type == 18){
|
|
}else if(type == 18){
|
|
_this.pingjiainfoproVisible[tindex] = false;
|
|
_this.pingjiainfoproVisible[tindex] = false;
|
|
|
|
+ }else if(type == 19){
|
|
|
|
+ _this.knowinfoproVisible = false;
|
|
}else{
|
|
}else{
|
|
_this.infoproVisible = false;
|
|
_this.infoproVisible = false;
|
|
}
|
|
}
|
|
@@ -10314,6 +10548,17 @@ export default {
|
|
type: _type,
|
|
type: _type,
|
|
fileid: fileid == 1 ? '' : fileid,
|
|
fileid: fileid == 1 ? '' : fileid,
|
|
});
|
|
});
|
|
|
|
+ }else if (type == 19) {
|
|
|
|
+ _this.knowInfoData.push({
|
|
|
|
+ name: fileName,
|
|
|
|
+ url: data.Location,
|
|
|
|
+ uid: fileUid,
|
|
|
|
+ type: _type,
|
|
|
|
+ fileid: fileid == 1 ? '' : fileid,
|
|
|
|
+ });
|
|
|
|
+ if(fileid != 1){
|
|
|
|
+ _this.knowFileids.push(fileid)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
console.log(data.Location);
|
|
console.log(data.Location);
|
|
console.log(fileName,'----------',fileid);
|
|
console.log(fileName,'----------',fileid);
|
|
@@ -10935,6 +11180,62 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ arrayToArray(arrayo, arrayt) {
|
|
|
|
+ let array1 = arrayo;
|
|
|
|
+ let array2 = arrayt;
|
|
|
|
+
|
|
|
|
+ let commonElements = [];
|
|
|
|
+
|
|
|
|
+ for (let i = 0; i < array1.length; i++) {
|
|
|
|
+ for (let j = 0; j < array2.length; j++) {
|
|
|
|
+ if (array1[i] === array2[j]) {
|
|
|
|
+ commonElements.push(array1[i]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return commonElements;
|
|
|
|
+ },
|
|
|
|
+ typeChange(){
|
|
|
|
+ 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['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
|
|
|
|
+ if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
|
|
|
|
+ sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ 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)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ sub = JSON.parse(converter(JSON.stringify(sub)))
|
|
|
|
+ mclass = JSON.parse(converter(JSON.stringify(mclass)))
|
|
|
|
+ for(var fi = 0; fi < this.knowFileArray.length; fi++){
|
|
|
|
+ let _file = this.knowFileArray[fi]
|
|
|
|
+ let fileM = _file.grade ? converter(_file.grade).split('/') : 1
|
|
|
|
+ let fileS = _file.name ? converter(_file.name).split('/') : 1
|
|
|
|
+ let _sub = fileS == 1 ? [1] : this.arrayToArray(fileS, sub)
|
|
|
|
+ let _mclass = fileM == 1 ? [1] : this.arrayToArray(fileM, mclass)
|
|
|
|
+ let fileids = this.knowInfoData.map((item) => item.fileid)
|
|
|
|
+
|
|
|
|
+ if(_sub.length > 0 && _mclass.length > 0 && fileids.indexOf(_file.fileid) == -1){
|
|
|
|
+ this.knowInfoData.push({
|
|
|
|
+ name: _file.filename,
|
|
|
|
+ url: _file.url,
|
|
|
|
+ uid: '',
|
|
|
|
+ type: 3,
|
|
|
|
+ fileid: _file.fileid,
|
|
|
|
+ });
|
|
|
|
+ this.knowFileids.push(_file.fileid)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ },
|
|
getChapterData(e, i, j, ic, type) {
|
|
getChapterData(e, i, j, ic, type) {
|
|
e.stopPropagation();
|
|
e.stopPropagation();
|
|
this.updataC = true;
|
|
this.updataC = true;
|
|
@@ -10977,6 +11278,13 @@ export default {
|
|
this.infoData.push({...file})
|
|
this.infoData.push({...file})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ checkKnowInfoData(fileid){
|
|
|
|
+ if(this.knowFileids.indexOf(fileid) == -1){
|
|
|
|
+ this.knowFileids.push(fileid)
|
|
|
|
+ }else {
|
|
|
|
+ this.knowFileids.splice(this.knowFileids.indexOf(fileid), 1)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
deleteInfoData(e, ic) {
|
|
deleteInfoData(e, ic) {
|
|
e.stopPropagation();
|
|
e.stopPropagation();
|
|
let _this = this;
|
|
let _this = this;
|
|
@@ -11006,6 +11314,8 @@ export default {
|
|
type: "warning",
|
|
type: "warning",
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
|
|
+ let fileid = _this.infoData2[ic].fileid;
|
|
|
|
+ _this.infoData = _this.infoData.filter((item) => item.fileid != fileid);
|
|
_this.infoData2.splice(
|
|
_this.infoData2.splice(
|
|
ic,
|
|
ic,
|
|
1
|
|
1
|
|
@@ -11015,6 +11325,28 @@ export default {
|
|
return;
|
|
return;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ deleteKnowInfoData(e, ic) {
|
|
|
|
+ e.stopPropagation();
|
|
|
|
+ let _this = this;
|
|
|
|
+ _this
|
|
|
|
+ .$confirm("确定删除此项?", "提示", {
|
|
|
|
+ confirmButtonText: "确定",
|
|
|
|
+ cancelButtonText: "取消",
|
|
|
|
+ type: "warning",
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ if(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid) != -1){
|
|
|
|
+ _this.knowFileids.splice(_this.knowFileids.indexOf(_this.knowInfoData[ic].fileid), 1)
|
|
|
|
+ }
|
|
|
|
+ _this.knowInfoData.splice(
|
|
|
|
+ ic,
|
|
|
|
+ 1
|
|
|
|
+ );
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ return;
|
|
|
|
+ });
|
|
|
|
+ },
|
|
deletemubiaoInfoData(e, ic) {
|
|
deletemubiaoInfoData(e, ic) {
|
|
e.stopPropagation();
|
|
e.stopPropagation();
|
|
let _this = this;
|
|
let _this = this;
|
|
@@ -11541,6 +11873,9 @@ export default {
|
|
if(type == 2){
|
|
if(type == 2){
|
|
this.retrunCourse()
|
|
this.retrunCourse()
|
|
}
|
|
}
|
|
|
|
+ if(type == 3){
|
|
|
|
+ this.steps = 4
|
|
|
|
+ }
|
|
})
|
|
})
|
|
.catch((err) => {
|
|
.catch((err) => {
|
|
this.$message.error("网络不佳");
|
|
this.$message.error("网络不佳");
|
|
@@ -16056,11 +16391,9 @@ export default {
|
|
}else if(pan == 'aiOutline2'){
|
|
}else if(pan == 'aiOutline2'){
|
|
this.aiJson['aiOutlineTask'] = string
|
|
this.aiJson['aiOutlineTask'] = string
|
|
this.aiJson['aiOutlineDetail'] = string2
|
|
this.aiJson['aiOutlineDetail'] = string2
|
|
- this.aiText2 = ''
|
|
|
|
}else if(pan == 'aiTeacher3'){
|
|
}else if(pan == 'aiTeacher3'){
|
|
this.aiJson['aiCpoteTask'] = string
|
|
this.aiJson['aiCpoteTask'] = string
|
|
this.aiJson['teacherDetail2'] = string2
|
|
this.aiJson['teacherDetail2'] = string2
|
|
- this.aiText2 = ''
|
|
|
|
}else if(pan == 'aiTask2'){
|
|
}else if(pan == 'aiTask2'){
|
|
this.aiJson['aiTask'] = string
|
|
this.aiJson['aiTask'] = string
|
|
}else if(pan == 'aiTask3'){
|
|
}else if(pan == 'aiTask3'){
|
|
@@ -16079,6 +16412,8 @@ export default {
|
|
}else {
|
|
}else {
|
|
this.aiJson[pan] = string
|
|
this.aiJson[pan] = string
|
|
}
|
|
}
|
|
|
|
+ this.aiText2 = ''
|
|
|
|
+ this.aiText3 = ''
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
},
|
|
},
|
|
editTask3(index){
|
|
editTask3(index){
|
|
@@ -16146,6 +16481,39 @@ export default {
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
this.openAiDialog(2, 'aitargetTextDetail',1)
|
|
this.openAiDialog(2, 'aitargetTextDetail',1)
|
|
}, 500);
|
|
}, 500);
|
|
|
|
+ },
|
|
|
|
+ async exportTeachPlan(){
|
|
|
|
+ this.loading = true
|
|
|
|
+ const zip = new JSZip();
|
|
|
|
+ let md = new MarkdownIt();
|
|
|
|
+ for(var i = 0; i < this.unitJson[0].chapterInfo[0].taskJson.length; i++){
|
|
|
|
+ let _task = this.unitJson[0].chapterInfo[0].taskJson[i]
|
|
|
|
+ let name = _task.task+'-教案'
|
|
|
|
+ let _html = _task.taskDetail3 ? md.render(_task.taskDetail3) : ''
|
|
|
|
+ if(!this.cid){
|
|
|
|
+ await this.generate(name, _html, i)
|
|
|
|
+ }
|
|
|
|
+ let file = await this.generateExport(name, _html, i)
|
|
|
|
+
|
|
|
|
+ zip.file(`${name}.docx`, file, { binary: true })
|
|
|
|
+ }
|
|
|
|
+ zip.generateAsync({ type: "blob" }).then((content) => {
|
|
|
|
+ // 生成二进制流
|
|
|
|
+ saveAs(
|
|
|
|
+ content,
|
|
|
|
+ this.courseName + "-" + "教案.zip"
|
|
|
|
+ ); // 利用file-saver保存文件 自定义文件名
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ this.loading = false
|
|
|
|
+ if(!this.cid){
|
|
|
|
+ this.addWork(3)
|
|
|
|
+ }else{
|
|
|
|
+ this.steps = 4;
|
|
|
|
+ }
|
|
|
|
+ }, 2000);
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
clickGenTT2(){
|
|
clickGenTT2(){
|
|
if (this.courseName == "") {
|
|
if (this.courseName == "") {
|
|
@@ -16337,6 +16705,17 @@ export default {
|
|
this.aiText2 = this.aiJson.aiTaskG2
|
|
this.aiText2 = this.aiJson.aiTaskG2
|
|
this.aiText3 = this.aiJson.aiTaskG3
|
|
this.aiText3 = this.aiJson.aiTaskG3
|
|
this.aiCallBack = [callback, index]
|
|
this.aiCallBack = [callback, index]
|
|
|
|
+ } else if (type == "aiTaskG3") {
|
|
|
|
+ if (this.taskGLoading[callback] && (this.taskGLoading[callback][0][2])) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "请回答完毕后再次发送",
|
|
|
|
+ type: "warning"
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ this.aitype = type
|
|
|
|
+ this.aiText = this.aiJson.aiTaskG3
|
|
|
|
+ this.aiCallBack = callback
|
|
} else if (type == "aiDetail1") {
|
|
} else if (type == "aiDetail1") {
|
|
if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
|
|
if (this.ttaskDetailLoading.indexOf('task-' + index) !== -1) {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -16574,6 +16953,41 @@ export default {
|
|
|
|
|
|
this.aitype = type
|
|
this.aitype = type
|
|
this.aiText = this.aiJson.aiSearchFile
|
|
this.aiText = this.aiJson.aiSearchFile
|
|
|
|
+ } else if (type == 'aiSearchFile2'){
|
|
|
|
+ if(this.fileSLoading) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: "请回答完毕后再次发送",
|
|
|
|
+ type: "warning"
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.aitype = type
|
|
|
|
+ this.aiText = `用户将提供给你一份课程基本信息(包含课程标题,年级,学科),你的任务是,针对课程基本信息,分学科的去你的知识库中寻找与该课程匹配的内容(每个学科都返回至少5条),输出匹配到的课标原文和原文的文件名。返回原文,返回原文。输出语言为简体中文。尽可能地找到匹配内容。
|
|
|
|
+
|
|
|
|
+#输出样例
|
|
|
|
+<学科1>:关键词
|
|
|
|
+- 匹配到的内容1
|
|
|
|
+- 匹配到的内容2
|
|
|
|
+- 匹配到的内容3
|
|
|
|
+- 匹配到的内容4
|
|
|
|
+- 匹配到的内容5
|
|
|
|
+
|
|
|
|
+<学科2>:关键词
|
|
|
|
+- 匹配到的内容1
|
|
|
|
+- 匹配到的内容2
|
|
|
|
+- 匹配到的内容3
|
|
|
|
+- 匹配到的内容4
|
|
|
|
+- 匹配到的内容5
|
|
|
|
+
|
|
|
|
+...
|
|
|
|
+<学科n>:关键词
|
|
|
|
+- 匹配到的内容1
|
|
|
|
+- 匹配到的内容2
|
|
|
|
+- 匹配到的内容3
|
|
|
|
+- 匹配到的内容4
|
|
|
|
+- 匹配到的内容5
|
|
|
|
+`
|
|
} else if (type == 'aiRateRule'){
|
|
} else if (type == 'aiRateRule'){
|
|
this.aitype = type
|
|
this.aitype = type
|
|
this.aiText = this.aiJson.aiRateRule
|
|
this.aiText = this.aiJson.aiRateRule
|
|
@@ -16888,10 +17302,10 @@ ${msg3}
|
|
}
|
|
}
|
|
this.taskGLoading[_task][0] = true
|
|
this.taskGLoading[_task][0] = true
|
|
this.taskGLoading[_task][1] = true
|
|
this.taskGLoading[_task][1] = true
|
|
- this.taskGLoading[_task][2] = true
|
|
|
|
|
|
+ // this.taskGLoading[_task][2] = true
|
|
this.aiGetG321(message1, _task)
|
|
this.aiGetG321(message1, _task)
|
|
this.aiGetG322(message2, _task)
|
|
this.aiGetG322(message2, _task)
|
|
- this.aiGetG323(message3, _task)
|
|
|
|
|
|
+ // this.aiGetG323(message3, _task)
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
let message1 = `NOTICE
|
|
let message1 = `NOTICE
|
|
@@ -16975,12 +17389,40 @@ ${msg3}
|
|
}
|
|
}
|
|
this.taskGLoading[this.aiCallBack[0]][0] = true
|
|
this.taskGLoading[this.aiCallBack[0]][0] = true
|
|
this.taskGLoading[this.aiCallBack[0]][1] = true
|
|
this.taskGLoading[this.aiCallBack[0]][1] = true
|
|
- this.taskGLoading[this.aiCallBack[0]][2] = true
|
|
|
|
|
|
+ // this.taskGLoading[this.aiCallBack[0]][2] = true
|
|
this.aiGetG321(message1, this.aiCallBack[0])
|
|
this.aiGetG321(message1, this.aiCallBack[0])
|
|
this.aiGetG322(message2, this.aiCallBack[0])
|
|
this.aiGetG322(message2, this.aiCallBack[0])
|
|
- this.aiGetG323(message3, this.aiCallBack[0])
|
|
|
|
|
|
+ // this.aiGetG323(message3, this.aiCallBack[0])
|
|
}
|
|
}
|
|
this.aiCallBack[1] ? this.aiCallBack[1]() : ''
|
|
this.aiCallBack[1] ? this.aiCallBack[1]() : ''
|
|
|
|
+ } else if (this.aitype == "aiTaskG3") {
|
|
|
|
+let message3 = `NOTICE
|
|
|
|
+Role: 你是一名教师,你正在使用一个在线学习平台来教授学生,你已经完成了教案,你现在需要将教案变为学生上课用的任务单(work sheet)。该在线学习平台为每个任务提供了资源区(视频,ppt,阅读资料将放在这里),多种互动工具(学生点击工具即可上传他们的作业或者回答,这些互动工具类似kahoot一样允许教师轻松收集,统计,追踪学生作业),以及和任务绑定的目标和评价系统。
|
|
|
|
+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.
|
|
|
|
+
|
|
|
|
+# Context
|
|
|
|
+## 要求
|
|
|
|
+${msg3}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+## 参考资料
|
|
|
|
+教学任务教案:${this.unitJson[0].chapterInfo[0].taskJson[this.aiCallBack].taskDetail3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')}
|
|
|
|
+
|
|
|
|
+# 输出格式与要求
|
|
|
|
+核心素养:从教案中提取
|
|
|
|
+目标:从教案中提取
|
|
|
|
+评价标准:从教案中提取评价标准
|
|
|
|
+
|
|
|
|
+# Format example
|
|
|
|
+{"elist":[{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5},{"value":"目标","detail":"评价标准",target:"核心素养","score":5}]}`
|
|
|
|
+ if(!this.taskGLoading[this.aiCallBack]){
|
|
|
|
+ this.taskGLoading[this.aiCallBack] = []
|
|
|
|
+ }
|
|
|
|
+ this.taskGLoading[this.aiCallBack][2] = true
|
|
|
|
+ this.aiGetG323(message3, this.aiCallBack)
|
|
|
|
+
|
|
} else if (this.aitype == "aiDetail1") {
|
|
} else if (this.aitype == "aiDetail1") {
|
|
this.aiDetail(msg, this.aiIndex)
|
|
this.aiDetail(msg, this.aiIndex)
|
|
} else if (this.aitype == "aiDetail2") {
|
|
} else if (this.aitype == "aiDetail2") {
|
|
@@ -17088,6 +17530,16 @@ ${msg}。相关信息内容至少要有300tokens,可以是markdown格式
|
|
this.aiSearchFile(messages,()=>{
|
|
this.aiSearchFile(messages,()=>{
|
|
this.fileSLoading = false
|
|
this.fileSLoading = false
|
|
})
|
|
})
|
|
|
|
+ } else if (this.aitype == 'aiSearchFile2'){
|
|
|
|
+ let messages = `${msg}
|
|
|
|
+
|
|
|
|
+课程名字:${this.courseName}
|
|
|
|
+${sub.length ? '学科:' + sub.join(",") : ''}
|
|
|
|
+${mclass.length ? '年级:' + mclass.join(",") : ''}`
|
|
|
|
+ this.fileSLoading = true
|
|
|
|
+ this.aiSearchFile2(messages,()=>{
|
|
|
|
+ this.fileSLoading = false
|
|
|
|
+ })
|
|
} else if (this.aitype == 'aiRateRule'){
|
|
} else if (this.aitype == 'aiRateRule'){
|
|
this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
|
|
this.againEva(msg, this.aiCallBack[0], this.aiCallBack[1])
|
|
} else if (this.aitype == 'aiRateRuleA'){
|
|
} else if (this.aitype == 'aiRateRuleA'){
|
|
@@ -17228,6 +17680,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -17399,6 +17852,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
let _this = this
|
|
let _this = this
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -17572,7 +18026,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
|
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
_this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
|
|
_this.$message.error('哎呀,网络波动了...小可正在为您重新生成中...')
|
|
- _this.aiGet2(messages, callback);
|
|
|
|
|
|
+ // _this.aiGet2(messages, callback);
|
|
console.log("error_________________" + error);
|
|
console.log("error_________________" + error);
|
|
}
|
|
}
|
|
console.log("error_________________" + error);
|
|
console.log("error_________________" + error);
|
|
@@ -17759,6 +18213,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
let _this = this
|
|
let _this = this
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -18295,6 +18750,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
let _this = this
|
|
let _this = this
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -18563,6 +19019,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
let _this = this
|
|
let _this = this
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -18845,6 +19302,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
let _this = this
|
|
let _this = this
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -18921,6 +19379,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
let _this = this
|
|
let _this = this
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -19064,6 +19523,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
let _this = this
|
|
let _this = this
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -19152,6 +19612,7 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
let _this = this
|
|
let _this = this
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -19169,6 +19630,8 @@ ${this.courseText && this.aiCallBack == 2 ? '注意,优化原有的<参考内
|
|
if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
|
|
if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
|
|
mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
|
|
mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+ for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
|
|
if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
|
|
if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
|
|
sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
|
|
sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
|
|
}
|
|
}
|
|
@@ -19312,6 +19775,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','')
|
|
}
|
|
}
|
|
let _this = this
|
|
let _this = this
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -19337,6 +19801,8 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[task].taskDetail3.replaceAll('#','')
|
|
if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
|
|
if (_sid == this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].id) {
|
|
mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
|
|
mclass.push(this.CourseTypeJson['34628934-d02f-11ec-8c78-005056b86db5'][j].name)
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+ for (var j = 0; j < this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'].length; j++) {
|
|
if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
|
|
if (_sid == this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].id) {
|
|
sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
|
|
sub.push(this.CourseTypeJson['34629907-d02f-11ec-8c78-005056b86db5'][j].name)
|
|
}
|
|
}
|
|
@@ -19483,6 +19949,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replace
|
|
let _this = this
|
|
let _this = this
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -19819,6 +20286,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replace
|
|
const _tindex2 = index
|
|
const _tindex2 = index
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -20005,6 +20473,7 @@ ${msg}
|
|
const _tindex2 = index
|
|
const _tindex2 = index
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -20138,6 +20607,7 @@ ${target ? '课程目标:' + target.replaceAll('#','').replaceAll('*','').repl
|
|
const _tindex2 = index
|
|
const _tindex2 = index
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -20350,6 +20820,7 @@ ${taskArray.length ? '其他任务大纲内容' + taskArray.join(',') : ''}
|
|
const _tindex2 = index
|
|
const _tindex2 = index
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -20521,6 +20992,7 @@ ${_this.aiCallBack.taskDetail}
|
|
const _tindex3 = tindex
|
|
const _tindex3 = tindex
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -20696,6 +21168,7 @@ ${msg} 输出格式和内容要求参考#格式与要求
|
|
const _tindex2 = index
|
|
const _tindex2 = index
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -20872,6 +21345,7 @@ ${msg} 优化核心素养、目标、评价标准,输出格式和内容要求
|
|
const _tindex2 = index
|
|
const _tindex2 = index
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -21061,6 +21535,7 @@ ${_text2}`
|
|
const _tindex2 = index
|
|
const _tindex2 = index
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -21288,6 +21763,7 @@ ${(_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" || _this.templatei
|
|
let _index = _this.aitype.replace("aiC","c")
|
|
let _index = _this.aitype.replace("aiC","c")
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
if (_this.infoData.length) {
|
|
if (_this.infoData.length) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
for (var i = 0; i < _this.infoData.length; i++) {
|
|
if(_this.infoData[i].fileid){
|
|
if(_this.infoData[i].fileid){
|
|
@@ -22074,14 +22550,35 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
for(var i = 0; i < res.data[1].length; i++){
|
|
for(var i = 0; i < res.data[1].length; i++){
|
|
fileIds.push(res.data[0][i].fileid)
|
|
fileIds.push(res.data[0][i].fileid)
|
|
}
|
|
}
|
|
- this.fileidArray = fileIds
|
|
|
|
|
|
+ this.fileIds = fileIds
|
|
}
|
|
}
|
|
if(res.data[2].length){
|
|
if(res.data[2].length){
|
|
fileIds = []
|
|
fileIds = []
|
|
for(var i = 0; i < res.data[2].length; i++){
|
|
for(var i = 0; i < res.data[2].length; i++){
|
|
fileIds.push(res.data[0][i].fileid)
|
|
fileIds.push(res.data[0][i].fileid)
|
|
}
|
|
}
|
|
- this.fileidArray = fileIds
|
|
|
|
|
|
+ this.fileIds = fileIds
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ })
|
|
|
|
+ .catch((err) => {
|
|
|
|
+ console.error(err);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
|
|
+ selectKnowFileid(){
|
|
|
|
+ let params = {
|
|
|
|
+ oid: this.oid,
|
|
|
|
+ sta: 'cn'
|
|
|
|
+ };
|
|
|
|
+ this.ajax
|
|
|
|
+ .get(this.$store.state.api + "selectKnowFileid", params)
|
|
|
|
+ .then((res) => {
|
|
|
|
+ this.knowFileArray = res.data[0]
|
|
|
|
+ if(res.data[1].length){
|
|
|
|
+ this.knowFileArray = res.data[1]
|
|
|
|
+ }
|
|
|
|
+ if(res.data[2].length){
|
|
|
|
+ this.knowFileArray = res.data[2]
|
|
}
|
|
}
|
|
|
|
|
|
})
|
|
})
|
|
@@ -22322,9 +22819,27 @@ ${this.targetCourseText && this.aiCallBack == 2 ? '注意,优化原有的<参
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- if(sub.length){
|
|
|
|
- let _fileid = _this.importFileid(sub)
|
|
|
|
- fileid = [...fileid, ..._fileid]
|
|
|
|
|
|
+ // if(sub.length){
|
|
|
|
+ // let _fileid = _this.importFileid(sub)
|
|
|
|
+ // fileid = [...fileid, ..._fileid]
|
|
|
|
+ // }
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
|
|
+
|
|
|
|
+ if (_this.infoData.length) {
|
|
|
|
+ for (var i = 0; i < _this.infoData.length; i++) {
|
|
|
|
+ if(_this.infoData[i].fileid){
|
|
|
|
+ fileid.push(_this.infoData[i].fileid)
|
|
|
|
+ }else {
|
|
|
|
+ let _fileid = await _this.createFileid(_this.infoData[i].url)
|
|
|
|
+ if(_fileid){
|
|
|
|
+ _this.infoData[i].fileid = _fileid == 1 ? '' : _fileid
|
|
|
|
+ _this.$forceUpdate();
|
|
|
|
+ if(_fileid != 1){
|
|
|
|
+ fileid.push(_fileid)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
_this.isTargetCancelToken2 = _this.ajax.setCancelSource();
|
|
_this.isTargetCancelToken2 = _this.ajax.setCancelSource();
|
|
|
|
|
|
@@ -22556,6 +23071,7 @@ ${msg}
|
|
let _this = this
|
|
let _this = this
|
|
|
|
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
let fileid = _this.isFileSearch ? [..._this.fileIds] : []
|
|
|
|
+ fileid = [...fileid, ..._this.knowFileids]
|
|
|
|
|
|
console.log('fileid=========',fileid)
|
|
console.log('fileid=========',fileid)
|
|
// let params = JSON.stringify({
|
|
// let params = JSON.stringify({
|
|
@@ -22735,6 +23251,47 @@ ${msg}
|
|
console.log(error);
|
|
console.log(error);
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ async aiSearchFile2(messages, callback) {
|
|
|
|
+ let _this = this
|
|
|
|
+
|
|
|
|
+ let fileid = [..._this.knowFileids]
|
|
|
|
+
|
|
|
|
+ console.log('fileid=========',fileid)
|
|
|
|
+
|
|
|
|
+ this.isFileCancelToken = this.ajax.setCancelSource();
|
|
|
|
+
|
|
|
|
+ let parm = {
|
|
|
|
+ assistant_id: 'f8e1ebb2-2e0d-11ef-8bf4-12e77c4cb76b',
|
|
|
|
+ message: [{"type":"text", "text":this.languageSetting == 1 ? converter2(messages.replaceAll('\n', " ").replaceAll('*', "")) : messages.replaceAll('\n', " ").replaceAll('*', "")}],
|
|
|
|
+ session_name: uuidv4(),
|
|
|
|
+ userId: this.userid,
|
|
|
|
+ file_ids: fileid.length ? [...fileid] : '',
|
|
|
|
+ model: 'gpt-4o-2024-08-06',
|
|
|
|
+ temperature: 0.1,
|
|
|
|
+ }
|
|
|
|
+ this.ajax
|
|
|
|
+ .post("https://gpt4.cocorobo.cn/ai_agent_park_chat", parm, this.isFileCancelToken)
|
|
|
|
+ .then((response) => {
|
|
|
|
+ console.log(response);
|
|
|
|
+ let data = response.data.FunctionResponse
|
|
|
|
+ if (data.message) {
|
|
|
|
+ console.log(data.message);
|
|
|
|
+ let content = data.message
|
|
|
|
+ let name = '参考资料'
|
|
|
|
+ let md = new MarkdownIt();
|
|
|
|
+ let _html = content ? md.render(content) : ''
|
|
|
|
+ _this.generate2(name, _html, 0, callback)
|
|
|
|
+
|
|
|
|
+ _this.isFileCancelToken = null
|
|
|
|
+ _this.$forceUpdate();
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ .catch((error) => {
|
|
|
|
+ callback ? callback() : ''
|
|
|
|
+ _this.isFileCancelToken = null
|
|
|
|
+ console.log(error);
|
|
|
|
+ });
|
|
|
|
+ },
|
|
createFileid(url) {
|
|
createFileid(url) {
|
|
let _this = this
|
|
let _this = this
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
@@ -22843,7 +23400,8 @@ ${msg}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
this.selectFileid();
|
|
this.selectFileid();
|
|
- this.selectAiFileid();
|
|
|
|
|
|
+ // this.selectAiFileid();
|
|
|
|
+ this.selectKnowFileid();
|
|
this.getStudent();
|
|
this.getStudent();
|
|
this.getTeacher();
|
|
this.getTeacher();
|
|
this.getClass();
|
|
this.getClass();
|