|
@@ -650,7 +650,7 @@
|
|
|
placeholder="请输入任务描述" v-model="item.taskDetail2"></textarea>
|
|
|
<div class="op_box">
|
|
|
<div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
|
|
|
- <div class="r_pub_button_op" @click="aiDetail(item.taskDetail2, index)">智能优化</div>
|
|
|
+ <div class="r_pub_button_op" @click="openAiDialog('aiDetail1',item.taskDetail2,index)">智能优化</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -1481,9 +1481,9 @@
|
|
|
"></textarea> -->
|
|
|
<div class="op_box">
|
|
|
<div class="op_remark">*可以将需要优化的建议添加在任务描述后,点击“智能优化”,自动进行修改</div>
|
|
|
- <div class="r_pub_button_op" @click="aiDetail2(unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
+ <div class="r_pub_button_op" @click="openAiDialog('aiDetail2',unitJson[unitIndex].chapterInfo[0].taskJson[
|
|
|
itemTaskIndex
|
|
|
- ].taskDetail, itemTaskIndex)">智能优化</div>
|
|
|
+ ].taskDetail,itemTaskIndex)">智能优化</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -3141,8 +3141,7 @@
|
|
|
" v-model="itemTool.toolDetail"></textarea>
|
|
|
<div class="op_box">
|
|
|
<div class="op_remark">*可以将需要优化的建议添加在工具描述后,点击“智能优化”,自动进行修改</div>
|
|
|
- <div class="r_pub_button_op"
|
|
|
- @click="aiDetail3(itemTool.toolDetail, itemTaskIndex, toolIndex)">智能优化</div>
|
|
|
+ <div class="r_pub_button_op" @click="openAiDialog('aiDetail3',itemTool.toolDetail,itemTaskIndex, toolIndex)">智能优化</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -3437,8 +3436,7 @@
|
|
|
margin: 20px 0;
|
|
|
">
|
|
|
<div class="lineTitle clineTitle">评价设置</div>
|
|
|
- <div class="r_pub_button_op" style="margin-left:auto;"
|
|
|
- @click="aiDetail4(itemTask.eList, itemTaskIndex)">智能优化</div>
|
|
|
+ <div class="r_pub_button_op" style="margin-left:auto;" @click="openAiDialog('aiDetail4',itemTask.eList,itemTaskIndex)">智能优化</div>
|
|
|
<!-- <div class="line" style="width: 90%"></div> -->
|
|
|
</div>
|
|
|
</div>
|
|
@@ -5351,6 +5349,7 @@ export default {
|
|
|
},
|
|
|
aiText: "",
|
|
|
aiCallBack: "",
|
|
|
+ aiIndex: "",
|
|
|
};
|
|
|
},
|
|
|
directives: {
|
|
@@ -12222,7 +12221,7 @@ export default {
|
|
|
console.error(err);
|
|
|
});
|
|
|
},
|
|
|
- openAiDialog(type, callback) {
|
|
|
+ openAiDialog(type, callback, index, tindex) {
|
|
|
let sub = []
|
|
|
if (this.courseTypeId.length) {
|
|
|
for (var i = 0; i < this.courseTypeId.length; i++) {
|
|
@@ -12244,6 +12243,26 @@ export default {
|
|
|
this.aitype = "aiTask"
|
|
|
this.aiText = `请根据${this.teacherText}。`
|
|
|
this.aiCallBack = callback
|
|
|
+ } else if (type == "aiDetail1") {
|
|
|
+ this.aitype = "aiDetail1"
|
|
|
+ this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
|
|
|
+ this.aiIndex = index
|
|
|
+ } else if (type == "aiDetail2") {
|
|
|
+ this.aitype = "aiDetail2"
|
|
|
+ this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
|
|
|
+ this.aiIndex = index
|
|
|
+ } else if (type == "aiDetail3") {
|
|
|
+ this.aitype = "aiDetail3"
|
|
|
+ this.aiText = `请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式\n${callback}`
|
|
|
+ this.aiIndex = index+'-'+tindex
|
|
|
+ } else if (type == "aiDetail4") {
|
|
|
+ var _text = ""
|
|
|
+ for(var i = 0;i < callback.length; i++){
|
|
|
+ _text += `评价维度:${callback[i].value} 维度描述:${callback[i].detail} \n`
|
|
|
+ }
|
|
|
+ this.aitype = "aiDetail4"
|
|
|
+ this.aiText = `请帮我优化下列内容里的文字,更具象化更详细,输出数组格式\n${_text}`
|
|
|
+ this.aiIndex = index
|
|
|
}
|
|
|
this.dialogVisibleAiD = true
|
|
|
},
|
|
@@ -12368,6 +12387,15 @@ export default {
|
|
|
]`
|
|
|
this.loading = true
|
|
|
this.aiGet3(message, this.aiCallBack)
|
|
|
+ } else if (this.aitype == "aiDetail1"){
|
|
|
+ this.aiDetail(msg, this.aiIndex)
|
|
|
+ } else if (this.aitype == "aiDetail2"){
|
|
|
+ this.aiDetail2(msg, this.aiIndex)
|
|
|
+ } else if (this.aitype == "aiDetail3"){
|
|
|
+ let _index = this.aiIndex.split('-')
|
|
|
+ this.aiDetail3(msg, _index[0], _index[1])
|
|
|
+ } else if (this.aitype == "aiDetail4"){
|
|
|
+ this.aiDetail4(msg, this.aiIndex)
|
|
|
}
|
|
|
},
|
|
|
detailYou(message) {
|
|
@@ -12641,12 +12669,7 @@ export default {
|
|
|
|
|
|
--------
|
|
|
## 要求
|
|
|
- 请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式
|
|
|
- ${msg}
|
|
|
-
|
|
|
- --------
|
|
|
- ## Format example
|
|
|
- 输出优化的内容`
|
|
|
+ ${msg}`
|
|
|
_this.taskDetailLoading.push(_tindex)
|
|
|
let params = JSON.stringify({
|
|
|
// "model": "Chat",
|
|
@@ -12687,12 +12710,7 @@ export default {
|
|
|
|
|
|
--------
|
|
|
## 要求
|
|
|
- 请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式
|
|
|
- ${msg}
|
|
|
-
|
|
|
- --------
|
|
|
- ## Format example
|
|
|
- 输出优化的内容`
|
|
|
+ ${msg} `
|
|
|
_this.taskDetailLoading2.push(_tindex)
|
|
|
let params = JSON.stringify({
|
|
|
// "model": "Chat",
|
|
@@ -12736,10 +12754,7 @@ export default {
|
|
|
## 要求
|
|
|
请帮我优化下列文字内容,更具象化更详细,输出文本格式就行不要带有其他格式
|
|
|
${msg}
|
|
|
-
|
|
|
- --------
|
|
|
- ## Format example
|
|
|
- 输出优化的内容`
|
|
|
+`
|
|
|
_this.taskDetailLoading3.push(_tindex)
|
|
|
let params = JSON.stringify({
|
|
|
// "model": "Chat",
|
|
@@ -12784,15 +12799,14 @@ export default {
|
|
|
|
|
|
--------
|
|
|
## 要求
|
|
|
- 请帮我优化下列json内容里的文字,value和detail都可以,更具象化更详细,输出数组格式
|
|
|
- ${JSON.stringify(msg)}
|
|
|
+ ${msg}
|
|
|
|
|
|
--------
|
|
|
## Format example
|
|
|
[
|
|
|
- {"value":"评价名字1","detail":"评价维度1","score":5},
|
|
|
- {"value":"评价名字2","detail":"评价维度2","score":5},
|
|
|
- {"value":"评价名字3","detail":"评价维度3","score":5}
|
|
|
+ {"value":"评价维度1","detail":"维度描述1","score":5},
|
|
|
+ {"value":"评价维度2","detail":"维度描述2","score":5},
|
|
|
+ {"value":"评价维度3","detail":"维度描述3","score":5}
|
|
|
]`
|
|
|
_this.taskDetailLoading4.push(_tindex)
|
|
|
let params = JSON.stringify({
|