刘恒 1 год назад
Родитель
Сommit
45b78c46f7
1 измененных файлов с 9 добавлено и 4 удалено
  1. 9 4
      src/pages/sys/role.vue

+ 9 - 4
src/pages/sys/role.vue

@@ -23,6 +23,10 @@
           :selectedRows="checkTable"
           @selectedRowChange="selectedRowChange"
         >
+        
+        <div slot="size" slot-scope="{index}">
+              {{  index+(pagination.current-1)*pagination.defaultPageSize+1}}
+          </div>
           <div slot="operation" slot-scope="text">
             <a-button @click.stop="edit(text)" style="margin-right: 10px"
               >编辑</a-button
@@ -108,9 +112,10 @@ import StandardTable from "@/components/table/StandardTable";
 
 const columns = [
   {
-    title: "ID",
+    title: "编号",
     dataIndex: "id",
     width: "100px",
+    scopedSlots: { customRender: "size" },
   },
   {
     title: "角色名",
@@ -401,11 +406,11 @@ export default {
           roleName: this.name,
         })
         .then((res) => {
-          console.log(res.data);
+          // console.log(res.data);
           if (res.data.code === 200) {
             this.tableList = [...res.data.data.content];
-            this.pagination.current = res.data.data.current;
-            this.pagination.defaultPageSize = res.data.data.pageSize;
+            // this.pagination.current = res.data.data.current;
+            // this.pagination.defaultPageSize = res.data.data.pageSize;
             this.pagination.total = res.data.data.totalSize;
           }
         });