|
@@ -364,14 +364,22 @@
|
|
|
课程简要描述
|
|
|
<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>
|
|
|
+ @contextmenu.prevent="openAiDialog(1, 'aiDetail',1)"
|
|
|
+ @click="openAiDialog(2, 'aiDetail',1)">AI优化</button>
|
|
|
</el-tooltip>
|
|
|
</div>
|
|
|
<div style="width: 100%; padding: 0px 20px; box-sizing: border-box">
|
|
|
- <div style="width: calc(100%)">
|
|
|
+ <div style="width: calc(100%);" class='op_task_box'>
|
|
|
<textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="courseText"
|
|
|
placeholder="请输入课程简要描述"></textarea>
|
|
|
+ <div class="op_box">
|
|
|
+ <div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
|
|
|
+ <el-tooltip effect="light" content="右键单击可配置提示词" placement="bottom">
|
|
|
+ <div class="r_pub_button_op"
|
|
|
+ @contextmenu.prevent="openAiDialog(1, 'aiDetail', 2)"
|
|
|
+ @click="openAiDialog(2, 'aiDetail', 2)">智能优化</div>
|
|
|
+ </el-tooltip>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -13636,9 +13644,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
openAiDialog(clickType, type, callback, index, tindex) {
|
|
|
- // if(clickType == 1){
|
|
|
- // return;
|
|
|
- // }
|
|
|
+ if(clickType == 1 && this.tipsJson.istips == 1){
|
|
|
+ this.$message.error("您没有权限修改/查看提示词");
|
|
|
+ return;
|
|
|
+ }
|
|
|
if (this.courseName == "") {
|
|
|
this.$message.error("请补充填写课程名称");
|
|
|
return;
|
|
@@ -13677,6 +13686,7 @@ export default {
|
|
|
this.aitype = "aiDetail"
|
|
|
// this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程。`
|
|
|
this.aiText = this.aiJson.aiDetail
|
|
|
+ this.aiCallback = callback
|
|
|
} else if (type == "aiOutline") {
|
|
|
this.aitype = "aiOutline"
|
|
|
// this.aiText = `请根据${this.courseText}设计一个名为${this.courseName}的${sub.length ? sub.join(",") + "学科的" : ""},面向${this.getListClassC(this.checkboxList2)}的项目式学习课程设计序列教学活动(需要每个任务都需要至少50个token的详细描述),每个教学活动的活动设计(可以直接使用文件内容)以及每个教学活动的评价量规(学生能做到...)。`
|
|
@@ -13956,7 +13966,6 @@ ${this.templateid != "4480d65a-1e48-11ef-bee5-005056b86db5" ? '## 任务大纲\n
|
|
|
|
|
|
${this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5" ? '## 目标层\n'+this.cpote.cpote3.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','')+'\n\n## 任务簇\n'+this.cpote.cpote4.replaceAll('#','').replaceAll('*','').replaceAll('-','').replaceAll('\n','') : ''}
|
|
|
|
|
|
-
|
|
|
## Format example
|
|
|
[{"task": "任务名称1","detail": "教案输出为文本或markdown格式就行"},{"task": "任务名称2","detail": "教案输出为文本或markdown格式就行"}]`
|
|
|
this.aiGet4(message, () => {
|
|
@@ -14023,7 +14032,7 @@ ${sub.length ? '学科:' + sub.join(",") : ''}
|
|
|
${mclass.length ? '面向年级:' + mclass.join(",") : ''}
|
|
|
${this.templatePan.includes(this.templateid) ? '课程节数:'+this.courseJie+'节' : ''}
|
|
|
${this.templatePan.includes(this.templateid) ? '课程时长:'+this.courseTime+'min' : ''}
|
|
|
-${this.courseText ? '参考内容:'+this.courseText : ''}
|
|
|
+${this.courseText && this.aiCallback == 2 ? '参考内容:'+this.courseText : ''}
|
|
|
|
|
|
## 要求
|
|
|
${message} 以及##参考资料 以文本格式输出项目概况,驱动性问题,最终作品
|
|
@@ -14033,7 +14042,7 @@ ${message} 以及##参考资料 以文本格式输出项目概况,驱动性问
|
|
|
驱动性问题:1个驱动整个项目的问题。
|
|
|
最终作品:对应解决驱动性问题的作品,可个人可团队。
|
|
|
|
|
|
-${this.courseText ? '注意,你生成的内容不能与原有<参考内容>一致,重新生成不一样的<参考内容>' : ''}`
|
|
|
+${this.courseText && this.aiCallback == 2 ? '注意,优化原有的<参考内容>即可不用重新生成,让内容更具体化,更具体' : ''}`
|
|
|
this.aiGet(msg)
|
|
|
},
|
|
|
setUnitJson() {
|
|
@@ -15117,7 +15126,7 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replace
|
|
|
|
|
|
let parm = {
|
|
|
assistant_id: '6063369f-289a-11ef-8bf4-12e77c4cb76b',
|
|
|
- message: [{"type":"text", "text":messages}],
|
|
|
+ message: [{"type":"text", "text":messages.replaceAll('\n', " ").replaceAll('*', "")}],
|
|
|
session_name: uuidv4(),
|
|
|
userId: this.userid,
|
|
|
file_ids: fileid.length ? [...fileid] : '',
|
|
@@ -15146,6 +15155,9 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replace
|
|
|
// var jsonString = message.substring(jsonStart, jsonEnd).trim();
|
|
|
// dArray = JSON.parse(jsonString);
|
|
|
} catch (error) {
|
|
|
+ _this.aiGet4(messages, callback)
|
|
|
+ console.log("error_________________" + error);
|
|
|
+ return;
|
|
|
console.log("error_________________" + error);
|
|
|
_this.loading = false
|
|
|
}
|
|
@@ -15153,34 +15165,75 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replace
|
|
|
try {
|
|
|
_this.teacherText = JSON.parse(JSON.stringify(dArray))
|
|
|
if (_this.templateid == "4480d65a-1e48-11ef-bee5-005056b86db5") {
|
|
|
- _this.unitJson[0].chapterInfo[0].taskJson = []
|
|
|
- for (var i = 0; i < dArray.length; i++) {
|
|
|
- let _task = dArray[i]
|
|
|
- _this.unitJson[0].chapterInfo[0].taskJson.push({
|
|
|
- task: _task.task,
|
|
|
- taskDetail: "",
|
|
|
- taskDetail2: "",
|
|
|
- taskDetail3: _task.detail,
|
|
|
- chapterData: [],
|
|
|
- toolText: "",
|
|
|
- toolChoose: [
|
|
|
- {
|
|
|
- tool: [],
|
|
|
- toolDetail: "",
|
|
|
- toolType: 0,
|
|
|
+ if(_this.panTeacher() > 0){
|
|
|
+ for(var i = 0; i < _this.unitJson[0].chapterInfo[0].taskJson.length; i++){
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson[i].task = ""
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = ""
|
|
|
+ }
|
|
|
+ for (var i = 0; i < dArray.length; i++) {
|
|
|
+ let _task = dArray[i]
|
|
|
+ if(_this.unitJson[0].chapterInfo[0].taskJson[i]){
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson[i].task = _task.task
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson[i].taskDetail3 = _task.detail
|
|
|
+ }else {
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson.push({
|
|
|
+ task: _task.task,
|
|
|
+ taskDetail: "",
|
|
|
+ taskDetail2: "",
|
|
|
+ taskDetail3: _task.detail,
|
|
|
+ chapterData: [],
|
|
|
+ toolText: "",
|
|
|
+ toolChoose: [
|
|
|
+ {
|
|
|
+ tool: [],
|
|
|
+ toolDetail: "",
|
|
|
+ toolType: 0,
|
|
|
+ askCount: 1,
|
|
|
+ askTitle: "",
|
|
|
+ askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ isShowTools: false,
|
|
|
askCount: 1,
|
|
|
+ isFold: 2,
|
|
|
askTitle: "",
|
|
|
askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
- },
|
|
|
- ],
|
|
|
- isShowTools: false,
|
|
|
- askCount: 1,
|
|
|
- isFold: 2,
|
|
|
- askTitle: "",
|
|
|
- askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
- checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
|
- homeworkList: [],
|
|
|
- })
|
|
|
+ checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
|
+ homeworkList: [],
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson = []
|
|
|
+ for (var i = 0; i < dArray.length; i++) {
|
|
|
+ let _task = dArray[i]
|
|
|
+ _this.unitJson[0].chapterInfo[0].taskJson.push({
|
|
|
+ task: _task.task,
|
|
|
+ taskDetail: "",
|
|
|
+ taskDetail2: "",
|
|
|
+ taskDetail3: _task.detail,
|
|
|
+ chapterData: [],
|
|
|
+ toolText: "",
|
|
|
+ toolChoose: [
|
|
|
+ {
|
|
|
+ tool: [],
|
|
|
+ toolDetail: "",
|
|
|
+ toolType: 0,
|
|
|
+ askCount: 1,
|
|
|
+ askTitle: "",
|
|
|
+ askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ isShowTools: false,
|
|
|
+ askCount: 1,
|
|
|
+ isFold: 2,
|
|
|
+ askTitle: "",
|
|
|
+ askJson: [{ askstitle: "", askItem: 1, checkList: [] }],
|
|
|
+ checkJson: [{ checkCount: [], checkPerent: [] }],
|
|
|
+ homeworkList: [],
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
_this.unitJson[0].chapterInfo[0].taskJson[0].chapterData = JSON.parse(JSON.stringify(_this.infoData))
|
|
|
_this.unitJson2 = JSON.parse(JSON.stringify(_this.unitJson))
|
|
@@ -15222,8 +15275,10 @@ ${_this.unitJson[0].chapterInfo[0].taskJson[_this.taskCount].taskDetail3.replace
|
|
|
_this.$forceUpdate();
|
|
|
}
|
|
|
} catch (error) {
|
|
|
+ _this.aiGet4(messages, callback)
|
|
|
console.log("error_________________" + error);
|
|
|
- _this.loading = false
|
|
|
+ return;
|
|
|
+ // _this.loading = false
|
|
|
}
|
|
|
|
|
|
}
|