From 3a28df1eccec424a37649cca968bce59739e0b35 Mon Sep 17 00:00:00 2001
From: zhangxiao <898441624@qq.com>
Date: 星期五, 23 八月 2024 18:55:10 +0800
Subject: [PATCH] fix: table修改

---
 src/views/oneThree/comprehensive/index.vue |  117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 117 insertions(+), 0 deletions(-)

diff --git a/src/views/oneThree/comprehensive/index.vue b/src/views/oneThree/comprehensive/index.vue
index f8c8eb8..eda980c 100644
--- a/src/views/oneThree/comprehensive/index.vue
+++ b/src/views/oneThree/comprehensive/index.vue
@@ -34,6 +34,46 @@
             ></the-box-card>
         </div>
         <div>
+            <a-card class="card-box">
+                <the-img-card></the-img-card>
+                <div class="card-box-right">
+                    <div>
+                        <a-space>
+                            <a-button type="primary" size="mini">涓婅</a-button>
+                            <a-button type="primary" status="danger" size="mini">娑夋瘨</a-button>
+                        </a-space>
+                    </div>
+
+                    <div>
+                        <a-space>
+                            <icon-book />
+                            <icon-bar-chart />
+                        </a-space>
+                    </div>
+                </div>
+            </a-card>
+        </div>
+        <div>
+            <the-a-table
+                :columns="columns"
+                :data="data"
+                :pagination="false"
+                :checkedValue="checkedValue"
+                :colOpenShow="true"
+                :showSelection="false"
+                @selTableCol="selTableCol"
+            >
+                <template #index="{ record, rowIndex, column }">
+                    {{ rowIndex + 1 }}
+                </template>
+                <template #action="{ record, rowIndex, column }">
+                    <a-button type="text" size="small">鏌ョ湅</a-button>
+                    <a-button type="text" size="small">绠$悊</a-button>
+                    <a-button type="text" size="small">鍏抽棴</a-button>
+                </template>
+            </the-a-table>
+        </div>
+        <div>
             <a-pagination :total="50" show-total show-jumper show-page-size />
         </div>
     </div>
@@ -113,6 +153,72 @@
         closes: 54
     }
 ]);
+
+//鍒楄〃
+const columns = [
+    {
+        title: "搴忓彿",
+        key: "1",
+        dataIndex: "index",
+        slotName: "index",
+        width: 80
+    },
+    {
+        title: "Name",
+        dataIndex: "name",
+        key: "2"
+    },
+    {
+        title: "Address",
+        dataIndex: "address",
+        key: "3"
+    },
+    {
+        title: "Email",
+
+        dataIndex: "email",
+        key: "4"
+    },
+    {
+        title: "鎿嶄綔",
+        key: "5",
+        slotName: "action",
+        width: 200
+    }
+
+    // 鏇村鍒�...
+];
+
+const checkedValue = ref<string[]>(["搴忓彿", "Name", "Email", "鎿嶄綔"]);
+
+// const onChange = (checkedValues: string[]) => {
+//     console.log("checked = ", checkedValues);
+//     checkedValue.value = checkedValues;
+// };
+
+const data = [
+    {
+        id: "1",
+        name: "John Doe",
+        age: 32,
+        email: "john@example.com",
+        address: "New York No. 1 Lake Park"
+    },
+    {
+        id: "2",
+        name: "Jane Smith",
+        age: 28,
+        email: "jane@example.com",
+        address: "London No. 1 Lake Park"
+    }
+    // 鏇村鏁版嵁椤�...
+];
+
+const selTableCol = (val: any) => {
+    checkedValue.value = val;
+    console.log(val);
+};
+
 const handleClick = (item: any) => {
     console.log(item, 888);
 };
@@ -123,8 +229,19 @@
 
 <style lang="scss" scoped>
 .comprehensive {
+    padding: 20px;
     .top-title {
         display: flex;
     }
+    .card-box {
+        width: 391px;
+        height: 202px;
+        border-radius: 5px;
+    }
+    .card-box-right {
+        margin-top: 10px;
+        display: flex;
+        justify-content: space-between;
+    }
 }
 </style>

--
Gitblit v1.8.0