Parcourir la source

把报告名称也放在章节搜索当中进行检索

Kevin Jiang il y a 2 ans
Parent
commit
f9f8e90ee4

+ 1 - 0
src/types/search.types.ts

@@ -38,6 +38,7 @@ export type ResultMode = 'brief' | 'detail';
 export interface ChapterSearchRequest {
   from?: number;
   size?: number;
+  reportName: string;
   reportKeywords: string;
   chapterKeywords: string[];
   queryKeywords?: string[];

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

@@ -249,7 +249,6 @@ function duplicateCheck() {
     extract(report.value.chapters, report.value.id +"")
   }
  if (duplicateCheckRequest?.value) {
-  console.log(chapterEditors.value,"chapterEditors.value")
   reportService.duplicateCheck(duplicateCheckRequest.value).then((data: any) => {
     let index = 0;
     for (let item of data.repetitiveRate) {

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

@@ -235,6 +235,7 @@ defineExpose({
     </div>
   </div>
   <ReferenceDraw
+    :report-name="title"
     :reportKeywords="reportKeywords || ''"
     :chapter-keywords="data.keywords || []"
     ref="referenceDraw"

+ 5 - 0
src/views/report/components/reference/ReferenceDraw.vue

@@ -11,6 +11,10 @@ import { CompLog } from "@/libs/log.lib";
 import SpinComponent from "@/components/SpinComponent.vue";
 
 const props = defineProps({
+  reportName: {
+    type: String,
+    required: true,
+  },
   reportKeywords: {
     type: String,
     required: true,
@@ -57,6 +61,7 @@ function getDefaultKeywords(): string[] {
 
 function getSearchRequest(): ChapterSearchRequest {
   const request: ChapterSearchRequest = {
+    reportName: props.reportName || '',
     reportKeywords: props.reportKeywords || '',
     chapterKeywords: getDefaultKeywords(),
     queryKeywords: queryKeywords.value,