From 4f0be3649b84a62b33cef348e43448a66af035ac Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 20 八月 2024 17:46:26 +0800
Subject: [PATCH] 平台合并单元格优化

---
 src/views/system/platform/index.vue |   19 ++++++++++++-------
 1 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/views/system/platform/index.vue b/src/views/system/platform/index.vue
index c15a226..627102f 100644
--- a/src/views/system/platform/index.vue
+++ b/src/views/system/platform/index.vue
@@ -44,6 +44,10 @@
           label="骞冲彴鍚嶇О">
         </el-table-column>
         <el-table-column
+          prop="subPlatformName"
+          label="瀛愮骇骞冲彴鍚嶇О">
+        </el-table-column>
+        <el-table-column
           prop="area"
           label="琛屾斂鍖哄煙">
         </el-table-column>
@@ -99,7 +103,7 @@
           <div v-for="(deploy, index) in addForm.deployList" :key="index" style="margin-bottom: 20px">
             <el-form size="small" ref="deployForm" :inline="true">
               <el-form-item label="骞冲彴鍚嶇О" prop="platformName">
-                <el-input v-model="deploy.platformName"></el-input>
+                <el-input v-model="deploy.subPlatformName"></el-input>
               </el-form-item>
               <el-form-item label="骞冲彴IP" prop="platformIP">
                 <el-input v-model="deploy.platformIP"></el-input>
@@ -156,7 +160,7 @@
         platformIp: '',
         deployList: [
           {
-            platformName: '',
+            subPlatformName: '',
             platformIp: '',
             remark: '',
             area: ''
@@ -169,7 +173,8 @@
         platformName: ''
       },
       tableData: [],
-      total: 0
+      total: 0,
+      currentRowNum: 0
     }
   },
   mounted() {
@@ -233,7 +238,6 @@
       })
     },
     resetQuery() {
-      this.daterangeYwHandleTime = []
       this.resetForm('queryForm')
       this.handleQuery()
     },
@@ -243,10 +247,10 @@
     },
     spanMethod({ row, column, rowIndex, columnIndex }) {
       if (columnIndex === 0) {
-        if (rowIndex % 2 === 0) {
+        if (row.parentId === 0) {
           return {
-            rowspan: 2,
-            colspan: 1
+            rowspan: row.childNum + 1,
+            colspan: 1  // 鍙悎骞剁涓�鍒�
           };
         } else {
           return {
@@ -255,6 +259,7 @@
           };
         }
       }
+
     }
   }
 }

--
Gitblit v1.8.0