|
@@ -82,7 +82,7 @@
|
|
<div v-if="type == 0">
|
|
<div v-if="type == 0">
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
- @click="isPj = true"
|
|
|
|
|
|
+ @click="getAiPj"
|
|
v-if="!isPj"
|
|
v-if="!isPj"
|
|
style="margin: 10px 0 0 0"
|
|
style="margin: 10px 0 0 0"
|
|
>AI评价</el-button
|
|
>AI评价</el-button
|
|
@@ -146,7 +146,11 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <span slot="footer" class="dialog-footer" style="z-index: 999;position: relative;">
|
|
|
|
|
|
+ <span
|
|
|
|
+ slot="footer"
|
|
|
|
+ class="dialog-footer"
|
|
|
|
+ style="z-index: 999; position: relative"
|
|
|
|
+ >
|
|
<el-button @click="close()">取 消</el-button>
|
|
<el-button @click="close()">取 消</el-button>
|
|
<el-button type="primary">确 定</el-button>
|
|
<el-button type="primary">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
@@ -155,7 +159,7 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
export default {
|
|
export default {
|
|
- props: ["engEvaDialogVisible","evaEngJson"],
|
|
|
|
|
|
+ props: ["engEvaDialogVisible", "evaEngJson", "userid"],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
topHeight: 0,
|
|
topHeight: 0,
|
|
@@ -173,11 +177,11 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
handleClose(done) {
|
|
handleClose(done) {
|
|
- this.close()
|
|
|
|
|
|
+ this.close();
|
|
done();
|
|
done();
|
|
},
|
|
},
|
|
- close(){
|
|
|
|
- this.$emit("update:engEvaDialogVisible",false)
|
|
|
|
|
|
+ close() {
|
|
|
|
+ this.$emit("update:engEvaDialogVisible", false);
|
|
},
|
|
},
|
|
checkImg(list) {
|
|
checkImg(list) {
|
|
if (!list.length) {
|
|
if (!list.length) {
|
|
@@ -206,6 +210,36 @@ export default {
|
|
this.type = i;
|
|
this.type = i;
|
|
this.$forceUpdate();
|
|
this.$forceUpdate();
|
|
},
|
|
},
|
|
|
|
+ getAiPj() {
|
|
|
|
+ let param = [
|
|
|
|
+ {
|
|
|
|
+ model: "gpt-3.5-turbo",
|
|
|
|
+ temperature: 0,
|
|
|
|
+ max_tokens: 2048,
|
|
|
|
+ top_p: 1,
|
|
|
|
+ frequency_penalty: 0,
|
|
|
|
+ presence_penalty: 0,
|
|
|
|
+ message: [
|
|
|
|
+ {
|
|
|
|
+ role: "user",
|
|
|
|
+ content:
|
|
|
|
+ "英语写作批改是这样的:你的任务是为文字内容进行批注,请依照以下步骤完成任务,并仅显示第二步完成的内容:1.校对并更正:" + this.evaEngJson.studentJson.engText + "2.通过文本批注的形式,即将错误的单词用删除线划去,并将正确内容补充在后面,将前一段文字修改为后一段文字,并以markdown的形式呈现。",
|
|
|
|
+ },
|
|
|
|
+ ],
|
|
|
|
+ uid: this.userid,
|
|
|
|
+ stream: false,
|
|
|
|
+ },
|
|
|
|
+ ];
|
|
|
|
+ this.ajax.post("https://gpt.cocorobo.cn/chat", param).then(
|
|
|
|
+ (res) => {
|
|
|
|
+ console.log(res);
|
|
|
|
+ this.isPj = true;
|
|
|
|
+ },
|
|
|
|
+ (err) => {
|
|
|
|
+ console.log(err);
|
|
|
|
+ }
|
|
|
|
+ );
|
|
|
|
+ },
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
this.topHeight = document.querySelectorAll(".engUpTop")[0].offsetHeight;
|
|
this.topHeight = document.querySelectorAll(".engUpTop")[0].offsetHeight;
|
|
@@ -239,14 +273,14 @@ export default {
|
|
background: #fafafa;
|
|
background: #fafafa;
|
|
}
|
|
}
|
|
|
|
|
|
-.fullStyle>>>.el-dialog__body {
|
|
|
|
|
|
+.fullStyle >>> .el-dialog__body {
|
|
height: calc(100% - 125px) !important;
|
|
height: calc(100% - 125px) !important;
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 30px 0 !important;
|
|
padding: 30px 0 !important;
|
|
background: #fff !important;
|
|
background: #fff !important;
|
|
}
|
|
}
|
|
|
|
|
|
-.fullStyle>>>.el-dialog {
|
|
|
|
|
|
+.fullStyle >>> .el-dialog {
|
|
width: 100% !important;
|
|
width: 100% !important;
|
|
max-width: 100% !important;
|
|
max-width: 100% !important;
|
|
height: 100% !important;
|
|
height: 100% !important;
|
|
@@ -260,7 +294,7 @@ export default {
|
|
margin: 0 auto !important;
|
|
margin: 0 auto !important;
|
|
}
|
|
}
|
|
|
|
|
|
-.fullStyle>>>.el-dialog__footer{
|
|
|
|
|
|
+.fullStyle >>> .el-dialog__footer {
|
|
background: #fff !important;
|
|
background: #fff !important;
|
|
}
|
|
}
|
|
.engUpBox {
|
|
.engUpBox {
|