Bläddra i källkod

更新前端代码

Kevin Jiang 2 år sedan
förälder
incheckning
326d130bc9

+ 1 - 0
src/views/report/ReportEditorView.vue

@@ -323,6 +323,7 @@ onUnmounted(() => {
     <ChapterEditor
       v-for="(item, index) in chapterManager.getChapters()"
       :key="index"
+      :title="report.reportName"
       :data="item"
       ref="chapterEditors"
       :reportKeywords="report.keywords"

+ 6 - 1
src/views/report/components/ChapterEditor.vue

@@ -10,6 +10,10 @@ import { useRoute } from 'vue-router';
 import * as testService from "@/services/test.service"
 
 const props = defineProps({
+  title: {
+    type: String,
+    required: true,
+  },
   reportKeywords: {
     type: String,
     required: false,
@@ -139,7 +143,8 @@ function notifyRepetitiveWarning(data: boolean){
 }
 
 function test1() {
-  const prompt = `根据章节标题和关键词续写章节内容:\n` +
+  const prompt = `根据R&D报告的标题、章节标题和关键词续写章节内容:\n` +
+            `标题:${props.title}\n`+
             `章节标题:${props.data.title}\n关键词:${props.data.keywords}\n续写`
   testService.test1(prompt).then((resp) => {
     onContentChange(resp)