|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="pb_content" style="background: #f0f2f5" v-loading="loading">
|
|
|
<div class="pb_content_body" style="position: relative; margin: 0">
|
|
|
- <div class="right" :style="{width:promptShow ? 'calc(100% - 300px)' : '100%'}">
|
|
|
+ <div class="right" :style="{width:istemplate == 1 ? 'calc(100% - 300px)' : '100%'}">
|
|
|
<div class="courseTop">
|
|
|
<div class="stepsNav">
|
|
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
|
@@ -26,7 +26,7 @@
|
|
|
<!-- <div style="display: flex; margin-top: 20px; position: relative"> -->
|
|
|
<!-- @mouseenter="stepDisplay(true)"
|
|
|
@mouseleave="stepDisplay(false)" -->
|
|
|
- <div ref="stepBox" class="stepBox">
|
|
|
+ <div ref="stepBox" class="stepBox" :style="{overflow:istemplate == 1 ? 'auto' : 'hidden'}">
|
|
|
<div class="stepBg" v-if="false">
|
|
|
<div :class="{ stepTop: isStepDisplay, stepTop2: !isStepDisplay }">
|
|
|
<div v-if="steps > 0 && isStepDisplay" class="first" @click="navSteps(1)">
|
|
@@ -99,8 +99,8 @@
|
|
|
style="padding: 0" :style="{
|
|
|
height:
|
|
|
!isStepDisplay && !isBtnDisplay
|
|
|
- ? 'calc(100% - 20px)'
|
|
|
- : 'calc(100% - 100px)',
|
|
|
+ ? istemplate == 1 ? 'auto' : 'calc(100% - 20px)'
|
|
|
+ : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
|
|
|
}">
|
|
|
<div class="updateMask" :style="{
|
|
|
height: rightBoxHeight ? rightBoxHeight + 'px' : '100%',
|
|
@@ -348,9 +348,11 @@
|
|
|
<div class="whiteBg" style="border-radius: 0; margin-top: 15px">
|
|
|
<div class="c_info_title">
|
|
|
课程简要描述
|
|
|
- <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
+ <button class="c_pub_button_confirm" style="margin: 0 20px 0 auto;"
|
|
|
@contextmenu.prevent="openAiDialog(1, 'aiDetail')"
|
|
|
@click="openAiDialog(2, 'aiDetail')">AI优化</button>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
<div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
|
|
|
<div style="width: calc(100%)">
|
|
@@ -651,9 +653,11 @@
|
|
|
placeholder="请输入任务描述" v-model="item.taskDetail2"></textarea>
|
|
|
<div class="op_box">
|
|
|
<div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
|
|
|
- <div class="r_pub_button_op"
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
+ <div class="r_pub_button_op"
|
|
|
@contextmenu.prevent="openAiDialog(1, 'aiDetail1', item.taskDetail2, index)"
|
|
|
@click="openAiDialog(2, 'aiDetail1', item.taskDetail2, index)">智能优化</div>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -680,9 +684,11 @@
|
|
|
<div class="op_box">
|
|
|
<div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
|
|
|
<div style="display: flex;">
|
|
|
- <div class="r_pub_button_op"
|
|
|
- @contextmenu.prevent="openAiDialog(1, 'teacherDetail', item.taskDetail3, index)"
|
|
|
- @click="openAiDialog(2, 'teacherDetail', item.taskDetail3, index)">智能优化</div>
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
+ <div class="r_pub_button_op"
|
|
|
+ @contextmenu.prevent="openAiDialog(1, 'teacherDetail', item.taskDetail3, index)"
|
|
|
+ @click="openAiDialog(2, 'teacherDetail', item.taskDetail3, index)">智能优化</div>
|
|
|
+ </el-tooltip>
|
|
|
<div class="r_pub_button_edit" style="margin-left:10px" @click="editTask3(index)">{{ item.isTask3 ? '确定' : '编辑'}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -691,7 +697,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="info_btnBox3">
|
|
|
+ <div class="info_btnBox3" v-if="istemplate != 1">
|
|
|
<button class="c_pub_button_return pub_btn_return_img" v-if="steps == 1" @click="
|
|
|
goTo(
|
|
|
'/course?userid=' +
|
|
@@ -709,20 +715,22 @@
|
|
|
<button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5" @click="lastSteps">
|
|
|
{{ steps == 4 ? "返回课程" : "上一步" }}
|
|
|
</button>
|
|
|
- <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps(2)"
|
|
|
- @contextmenu.prevent="nextSteps(1)" :class="{
|
|
|
- pub_btn_next_img: steps != 3,
|
|
|
- pub_btn_finish_img: steps == 3,
|
|
|
- }">
|
|
|
- {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
|
|
|
- </button>
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
+ <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps(2)"
|
|
|
+ @contextmenu.prevent="nextSteps(1)" :class="{
|
|
|
+ pub_btn_next_img: steps != 3,
|
|
|
+ pub_btn_finish_img: steps == 3,
|
|
|
+ }">
|
|
|
+ {{ steps == 3 ? "确认上传" : !isOutline ? "生成大纲" : !isOutline2 ? "生成教案" : "下一步" }}
|
|
|
+ </button>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="rightBox" v-if="steps == 2" :style="{
|
|
|
height:
|
|
|
!isStepDisplay && !isBtnDisplay
|
|
|
- ? 'calc(100% - 40px)'
|
|
|
- : 'calc(100% - 100px)',
|
|
|
+ ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
|
|
|
+ : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
|
|
|
}">
|
|
|
<div class="basic_box" style="
|
|
|
padding: 20px 30px 0px !important;
|
|
@@ -871,19 +879,24 @@
|
|
|
</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="rightBox" v-if="steps == 3" ref="rightboxR" :style="{
|
|
|
+ <div class="rightBox" v-if="steps == 3 || istemplate == 1" ref="rightboxR" :style="{
|
|
|
height:
|
|
|
!isStepDisplay && !isBtnDisplay
|
|
|
- ? 'calc(100% - 40px)'
|
|
|
- : 'calc(100% - 100px)',
|
|
|
+ ? istemplate == 1 ? 'auto' : 'calc(100% - 40px)'
|
|
|
+ : istemplate == 1 ? 'auto' : 'calc(100% - 100px)',
|
|
|
}">
|
|
|
<div class="rb_c_box">
|
|
|
- <div class="rb_c_box_left" v-if="steps == 3 && unitJson[unitIndex].easy != 1">
|
|
|
+ <div class="rb_c_box_left" v-if="(steps == 3 || istemplate == 1) && unitJson[unitIndex].easy != 1">
|
|
|
<div class="rb_c_nav">
|
|
|
<span :class="{ active: stepsNav == 1 }" @click="stepsNav = 1">目录</span>
|
|
|
<span :class="{ active: stepsNav == 2 }" @click="stepsNav = 2">AI助手</span>
|
|
|
</div>
|
|
|
- <div class="stepsBottom" v-if="stepsNav == 1">
|
|
|
+ <div class="stepsBottom" v-if="stepsNav == 1"
|
|
|
+ :style="{
|
|
|
+ height:istemplate == 1 ? 'calc(100vh - 300px)' : 'calc(100% - 55px)',
|
|
|
+ position: istemplate == 1 ? 'sticky' : 'unset',
|
|
|
+ top: istemplate == 1 ? '0' : 'unset'
|
|
|
+ }">
|
|
|
<!-- <div class="navTop">辅助导航</div> -->
|
|
|
<div class="navBottom" v-if="courseState == 4">
|
|
|
<!-- <div class="navTask noImage" v-if="unitJson[unitIndex].dyName">
|
|
@@ -1124,7 +1137,7 @@
|
|
|
阶段顺序
|
|
|
</button>
|
|
|
<button class="c_pub_button_add pub_btn_paste_img" @click="pasteTask()"
|
|
|
- v-if="steps == 3 && isPasteTask" style="margin: 0 0 0 auto">
|
|
|
+ v-if="(steps == 3 || istemplate == 1) && isPasteTask" style="margin: 0 0 0 auto">
|
|
|
智能粘贴
|
|
|
</button>
|
|
|
<button class="c_pub_button_confirm pub_btn_template_img" @click="openTemplate" :style="{
|
|
@@ -1516,11 +1529,13 @@
|
|
|
"></textarea> -->
|
|
|
<div class="op_box">
|
|
|
<div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
|
|
|
- <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
- itemTaskIndex
|
|
|
- ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
- itemTaskIndex
|
|
|
- ], itemTaskIndex)">智能优化</div>
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
+ <div class="r_pub_button_op" @contextmenu.prevent="openAiDialog(1, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
+ itemTaskIndex
|
|
|
+ ], itemTaskIndex)" @click="openAiDialog(2, 'aiDetail2', unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
+ itemTaskIndex
|
|
|
+ ], itemTaskIndex)">智能优化</div>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -3178,10 +3193,12 @@
|
|
|
" v-model="itemTool.toolDetail"></textarea>
|
|
|
<div class="op_box">
|
|
|
<div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
|
|
|
- <div class="r_pub_button_op"
|
|
|
- @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
|
|
|
- @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
|
|
|
- 智能优化</div>
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
+ <div class="r_pub_button_op"
|
|
|
+ @contextmenu.prevent="openAiDialog(1, 'aiDetail3', itemTool, itemTaskIndex, toolIndex)"
|
|
|
+ @click="openAiDialog(2, 'aiDetail3', itemTool.toolDetail, itemTaskIndex, toolIndex)">
|
|
|
+ 智能优化</div>
|
|
|
+ </el-tooltip>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -3476,9 +3493,11 @@
|
|
|
margin: 20px 0;
|
|
|
">
|
|
|
<div class="lineTitle clineTitle">评价设置</div>
|
|
|
- <div class="r_pub_button_op" style="margin-left:auto;"
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
+ <div class="r_pub_button_op" style="margin-left:auto;"
|
|
|
@contextmenu.prevent="openAiDialog(1, 'aiDetail4', itemTask.eList, itemTaskIndex)"
|
|
|
@click="openAiDialog(2, 'aiDetail4', itemTask.eList, itemTaskIndex)">智能优化</div>
|
|
|
+ </el-tooltip>
|
|
|
<!-- <div class="line" style="width: 90%"></div> -->
|
|
|
</div>
|
|
|
</div>
|
|
@@ -3643,17 +3662,17 @@
|
|
|
">
|
|
|
返回课程
|
|
|
</button>
|
|
|
- <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5"
|
|
|
+ <button class="c_pub_button_return pub_btn_last_img" v-if="steps > 1 && steps != 5 && istemplate != 1"
|
|
|
@click="lastSteps" style="background: #dbdbdb">
|
|
|
{{ steps == 4 ? "返回课程" : "上一步" }}
|
|
|
</button>
|
|
|
- <button class="c_pub_button_confirm" v-if="steps < 4" @click="nextSteps" :class="{
|
|
|
+ <button class="c_pub_button_confirm" v-if="steps < 4 && istemplate != 1" @click="nextSteps" :class="{
|
|
|
pub_btn_next_img: steps != 3,
|
|
|
pub_btn_finish_img: steps == 3,
|
|
|
}">
|
|
|
{{ steps == 3 ? "确认上传" : "下一步" }}
|
|
|
</button>
|
|
|
- <button class="c_pub_button_confirm" v-if="steps < 4 && promptShow" @click="openSaveTips">保存模板</button>
|
|
|
+ <button class="c_pub_button_confirm" v-if="istemplate == 1" @click="openSaveTips">{{ templateid ? '修改模板' : '保存模板'}}</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -3708,7 +3727,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="leftBar" v-if="promptShow">
|
|
|
+ <div class="leftBar" v-if="istemplate == 1">
|
|
|
<aiTips ttitle="基础资料" title="课程描述优化" :detail="aiJson.aiDetail" pan="aiDetail" @setAiJson="setAiJson"/>
|
|
|
<aiTips ttitle="基础资料" title="生成大纲按钮" :detail="aiJson.aiOutline" pan="aiOutline" @setAiJson="setAiJson"/>
|
|
|
<aiTips ttitle="课程大纲" title="大纲描述优化" :detail="aiJson.aiDetail1" pan="aiDetail1" @setAiJson="setAiJson"/>
|
|
@@ -5083,7 +5102,7 @@
|
|
|
:englishVoiceJson="englishVoiceJson" @setEnglishVoiceJson="setEnglishVoiceJson"></EnglishVoice>
|
|
|
<aiDialog :dialogVisibleAiD.sync="dialogVisibleAiD" :aiText="aiText" @aiConfirm="aiConfirm" :clickType="clickType">
|
|
|
</aiDialog>
|
|
|
- <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid"></tipsDialog>
|
|
|
+ <tipsDialog :dialogVisibleTips.sync="dialogVisibleTips" :tipsJson.sync="tipsJson" :aiJson="aiJson" :userid="userid" @retrunCourse="retrunCourse" :templateid="templateid"></tipsDialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -5377,7 +5396,7 @@ export default {
|
|
|
newIndex: "",
|
|
|
englishList: {},
|
|
|
typeIndex: "",
|
|
|
- courseState: 2,
|
|
|
+ courseState: 4,
|
|
|
taskJSONa: [
|
|
|
{
|
|
|
task: "",
|
|
@@ -5457,6 +5476,7 @@ export default {
|
|
|
clickType: 1,
|
|
|
promptShow: false,
|
|
|
templateid: this.$route.query.templateid != undefined ? this.$route.query.templateid : "",
|
|
|
+ istemplate: this.$route.query.istemplate != undefined && this.$route.query.istemplate ? 1 : 2,
|
|
|
dialogVisibleTips: false,
|
|
|
tipsJson: {}
|
|
|
};
|
|
@@ -5969,6 +5989,19 @@ export default {
|
|
|
return _guid;
|
|
|
},
|
|
|
retrunCourse() {
|
|
|
+ if(this.istemplate == 1){
|
|
|
+ this.goTo(
|
|
|
+ "/course?userid=" +
|
|
|
+ this.userid +
|
|
|
+ "&oid=" +
|
|
|
+ this.oid +
|
|
|
+ "&org=" +
|
|
|
+ this.org +
|
|
|
+ "&role=" +
|
|
|
+ this.role
|
|
|
+ );
|
|
|
+ return
|
|
|
+ }
|
|
|
this.$confirm("是否保存已编辑内容?", "提示", {
|
|
|
confirmButtonText: "保存",
|
|
|
cancelButtonText: "不保存",
|
|
@@ -10652,7 +10685,19 @@ export default {
|
|
|
this.ajax
|
|
|
.get(this.$store.state.api + "select_course_detail", params)
|
|
|
.then((res) => {
|
|
|
-
|
|
|
+ let _unitJson = JSON.parse(res.data[0][0].chapters);
|
|
|
+ let fileInfo = []
|
|
|
+ for(var i = 0; i < _unitJson.length; i++){
|
|
|
+ let tasks = _unitJson[i].chapterInfo[0].taskJson
|
|
|
+ for(var j = 0; j < tasks.length; j++){
|
|
|
+ if(tasks[j].chapterData.length){
|
|
|
+ fileInfo = [...fileInfo, ...tasks[j].chapterData]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ this.infoData = fileInfo
|
|
|
+
|
|
|
this.$forceUpdate();
|
|
|
this.courseName = res.data[0][0].title;
|
|
|
this.courseText = res.data[0][0].brief;
|
|
@@ -13068,7 +13113,7 @@ ${message} 以及##补充参考资料和##参考资料 以文本格式输出项
|
|
|
taskDetail: "",
|
|
|
taskDetail2: _task.detail,
|
|
|
taskDetail3: "",
|
|
|
- chapterData: [],
|
|
|
+ chapterData: _this.infoData,
|
|
|
toolText: "",
|
|
|
toolChoose: [
|
|
|
{
|
|
@@ -13892,6 +13937,10 @@ ${_this.aiCallBack}
|
|
|
this.getTipsTemplate();
|
|
|
// this.selectType();
|
|
|
this.selectEva();
|
|
|
+ if(this.istemplate == 1){
|
|
|
+ this.isOutline = true
|
|
|
+ this.isOutline2 = true
|
|
|
+ }
|
|
|
this.loading = false;
|
|
|
this.timer2 = setInterval(() => {
|
|
|
this.selectEva();
|