瀏覽代碼

feature/1002177

lizi 2 年之前
父節點
當前提交
3689acf33f
共有 3 個文件被更改,包括 5 次插入5 次删除
  1. 1 1
      src/types/report.types.ts
  2. 2 2
      src/views/report/ReportEditorView.vue
  3. 2 2
      src/views/report/components/ChapterEditor.vue

+ 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>