Michael Wang пре 3 година
родитељ
комит
22687f3dca
1 измењених фајлова са 11 додато и 6 уклоњено
  1. 11 6
      src/features/projectCompareManagement/ProjectCompareManagement.vue

+ 11 - 6
src/features/projectCompareManagement/ProjectCompareManagement.vue

@@ -68,8 +68,8 @@ store.currentLocation = "项目管理 / 关联分析";
 
 let rootOrgId = $ref(undefined as unknown as number);
 
-let projectIds: number[] = $ref([]); //$ref([4, 5]);
-let contrastProjectId: number = $ref(); //$ref(4);
+let projectIds: number[] = $ref([27, 26]); //$ref([4, 5]);
+let contrastProjectId: number = $ref(28); //$ref(4);
 
 let data = $shallowRef<SASPaper[]>([]);
 let pageSize = $ref(1000);
@@ -224,13 +224,18 @@ const columns = [
       let rowSpan = 0;
       if (record.projectId === contrastProjectId) {
         rowSpan = 1;
-        if (data[index + 1]?.projectId !== contrastProjectId) {
-          rowSpan = 2;
+        if (index < data.length - 1) {
+          if (data[index + 1]?.projectId !== contrastProjectId) {
+            rowSpan = 2;
+          }
         }
-        if (data[index + 2]?.projectId !== contrastProjectId) {
-          rowSpan = 3;
+        if (index < data.length - 2) {
+          if (data[index + 2]?.projectId !== contrastProjectId) {
+            rowSpan = 3;
+          }
         }
       }
+      // console.log(rowSpan);
       return {
         children: h(
           Button,