Bläddra i källkod

feature/1002177

lizi 2 år sedan
förälder
incheckning
3689acf33f

+ 1 - 1
src/types/report.types.ts

@@ -194,5 +194,5 @@ export interface DuplicateCheckRequest{
 }
 
 export interface DuplicateCheckResponse{
-  totals: number[];
+  repetitiveRate: number[];
 }

+ 2 - 2
src/views/report/ReportEditorView.vue

@@ -249,10 +249,10 @@ function duplicateCheck() {
  if (duplicateCheckRequest?.value) {
   reportService.duplicateCheck(duplicateCheckRequest.value).then((data: any) => {
     let index = 0;
-    for (let item of data.totals) {
+    for (let item of data.repetitiveRate) {
       console.log(item)
       if (item && item > 0) {
-        chapterEditors.value[index]?.pointer();
+        chapterEditors.value[index]?.notifyRepetitiveWarning();
       }
       index += 1;
     }

+ 2 - 2
src/views/report/components/ChapterEditor.vue

@@ -126,12 +126,12 @@ function onSectionRecordUse(sectionId: number) {
   emits("sectionRecordUse", sectionId)
 }
 
-function pointer(){
+function notifyRepetitiveWarning(){
   contentEditor.value?.createErrorNotification()
 }
 
 defineExpose({
-  pointer
+  notifyRepetitiveWarning 
 })
 
 </script>