|
@@ -209,6 +209,8 @@
|
|
</div>
|
|
</div>
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
</div>
|
|
</div>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="info_box_t" v-if="!yiKeTemplateArray.includes(templateid)">
|
|
<div class="info_box_t_box">
|
|
<div class="info_box_t_box">
|
|
<span>生成风格:</span>
|
|
<span>生成风格:</span>
|
|
<div class="mode_box">
|
|
<div class="mode_box">
|
|
@@ -2265,11 +2267,14 @@
|
|
: istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
|
|
: istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
|
|
}">
|
|
}">
|
|
<div class="rb_c_box">
|
|
<div class="rb_c_box">
|
|
- <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1" :style="{width: stepShow ? '270px' : '50px',minWidth: stepShow ? '270px' : '50px',height: stepShow ? '100%' : '45px'}">
|
|
|
|
|
|
+ <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1" :style="{width: stepShow ? '270px' : '0',minWidth: stepShow ? '270px' : '0',height: stepShow ? '100%' : '0',marginRight: stepShow ? '10px' : '0'}">
|
|
|
|
+ <div class="close_btn" @click="stepShow = !stepShow" :class="!stepShow ? 'close_btn_voice' : ''" style="left: 0;right: unset;top: 5px;transform: rotate(180deg);">
|
|
|
|
+ <img src="../../../assets/icon/course/arrow.svg" >
|
|
|
|
+ </div>
|
|
<div class="rb_c_nav">
|
|
<div class="rb_c_nav">
|
|
- <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1" v-show="stepShow">目录</span>
|
|
|
|
|
|
+ <span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1" v-show="stepShow" style="margin-left: auto">目录</span>
|
|
<!-- <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span> -->
|
|
<!-- <span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span> -->
|
|
- <span class="button-toggle" @click="stepShow = !stepShow" style="margin-left: auto">{{ stepShow ? '收缩' : '展开' }}</span>
|
|
|
|
|
|
+ <!-- <span class="button-toggle" @click="stepShow = !stepShow">{{ stepShow ? '收缩' : '展开' }}</span> -->
|
|
</div>
|
|
</div>
|
|
<div class="stepsBottom" v-if="stepsNav == 1" :style="{
|
|
<div class="stepsBottom" v-if="stepsNav == 1" :style="{
|
|
height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
|
|
height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
|
|
@@ -9602,7 +9607,13 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
|
|
// type: "text/plain;charset='utf-8'",
|
|
// type: "text/plain;charset='utf-8'",
|
|
// });
|
|
// });
|
|
// const file = new File([blob], dname, { type: 'application/msword' });
|
|
// const file = new File([blob], dname, { type: 'application/msword' });
|
|
- const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
|
|
|
|
|
+ let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
|
|
|
+ let params = convertApi.createParams()
|
|
|
|
+ params.add('file', file)
|
|
|
|
+ let result = await convertApi.convert('docx', 'docx', params)
|
|
|
|
+ file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
|
|
|
|
+ return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
|
|
|
|
+ });
|
|
await this.beforeUploadHtml(file, index, callback)
|
|
await this.beforeUploadHtml(file, index, callback)
|
|
},
|
|
},
|
|
async generateExport(a, html, index) {
|
|
async generateExport(a, html, index) {
|
|
@@ -9639,13 +9650,20 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
|
|
const dname = `${a}.docx`;
|
|
const dname = `${a}.docx`;
|
|
// 创建文件流
|
|
// 创建文件流
|
|
|
|
|
|
- const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
|
|
|
|
|
+ let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
|
|
|
+ let params = convertApi.createParams()
|
|
|
|
+ params.add('file', file)
|
|
|
|
+ let result = await convertApi.convert('docx', 'docx', params)
|
|
|
|
+ file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
|
|
|
|
+ return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
|
|
|
|
+ });
|
|
|
|
+
|
|
// 执行下载
|
|
// 执行下载
|
|
saveAs(file, dname);
|
|
saveAs(file, dname);
|
|
// return file
|
|
// return file
|
|
},
|
|
},
|
|
async generateExport2(a, html, index) {
|
|
async generateExport2(a, html, index) {
|
|
- return new Promise((resolve) => {
|
|
|
|
|
|
+ return new Promise(async (resolve) => {
|
|
// <html lang="en">
|
|
// <html lang="en">
|
|
|
|
|
|
// 将html文件中需要用到的数据挂载到store上
|
|
// 将html文件中需要用到的数据挂载到store上
|
|
@@ -9679,7 +9697,14 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
|
|
const dname = `${a}`;
|
|
const dname = `${a}`;
|
|
// 创建文件流
|
|
// 创建文件流
|
|
|
|
|
|
- const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
|
|
|
|
|
+ let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
|
|
|
+ let params = convertApi.createParams()
|
|
|
|
+ params.add('file', file)
|
|
|
|
+ let result = await convertApi.convert('docx', 'docx', params)
|
|
|
|
+ file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
|
|
|
|
+ return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
|
|
|
|
+ });
|
|
|
|
+
|
|
resolve(file); // 通过 Promise 返回 File 对象
|
|
resolve(file); // 通过 Promise 返回 File 对象
|
|
});
|
|
});
|
|
},
|
|
},
|
|
@@ -9782,8 +9807,13 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
|
|
// type: "text/plain;charset='utf-8'",
|
|
// type: "text/plain;charset='utf-8'",
|
|
// });
|
|
// });
|
|
// const file = new File([blob], dname, { type: 'application/msword' });
|
|
// const file = new File([blob], dname, { type: 'application/msword' });
|
|
- const file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
|
|
|
-
|
|
|
|
|
|
+ let file = new File([blob], dname, { type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' });
|
|
|
|
+ let params = convertApi.createParams()
|
|
|
|
+ params.add('file', file)
|
|
|
|
+ let result = await convertApi.convert('docx', 'docx', params)
|
|
|
|
+ file = await fetch(result.files[0].Url).then(res => res.blob()).then(blob => {
|
|
|
|
+ return new File([blob], result.files[0].FileName, { type: 'application/octet-stream' });
|
|
|
|
+ });
|
|
await this.beforeUploadHtml2(file, index, callback)
|
|
await this.beforeUploadHtml2(file, index, callback)
|
|
},
|
|
},
|
|
beforeUploadHtml2(event, index, callback) {
|
|
beforeUploadHtml2(event, index, callback) {
|
|
@@ -16505,6 +16535,8 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[index].taskDetail3.replaceAll('#',''
|
|
if (_this.cover.length || attempts >= 3) {
|
|
if (_this.cover.length || attempts >= 3) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
+ _this.searchFileName = JSON.parse(JSON.stringify(_this.courseName))
|
|
|
|
+ _this.findMatchingContents()
|
|
_this.imageloading2 = true;
|
|
_this.imageloading2 = true;
|
|
_this.ajax
|
|
_this.ajax
|
|
.post("https://gpt.cocorobo.cn/search_image", {
|
|
.post("https://gpt.cocorobo.cn/search_image", {
|
|
@@ -29213,7 +29245,9 @@ ol {
|
|
}
|
|
}
|
|
|
|
|
|
.info_box_t_box > span{
|
|
.info_box_t_box > span{
|
|
- width: fit-content
|
|
|
|
|
|
+ width: fit-content;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ font-size: 14px;
|
|
}
|
|
}
|
|
|
|
|
|
.info_box_t_box > input{
|
|
.info_box_t_box > input{
|