From c034317790fa8311b73564435544e525e086fb14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E5=89=8D=E6=98=8E?= <909355014@qq.com> Date: Thu, 16 Jun 2022 16:01:35 +0800 Subject: [PATCH] =?UTF-8?q?table.js=20=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/model/hrm.js | 4 +- src/components/scTable/index.vue | 905 ++++++++++++++++++------------- src/config/table.js | 2 +- src/views/hrm/employee.vue | 4 +- 4 files changed, 529 insertions(+), 386 deletions(-) diff --git a/src/api/model/hrm.js b/src/api/model/hrm.js index 87d42b63..90dcd8e4 100644 --- a/src/api/model/hrm.js +++ b/src/api/model/hrm.js @@ -6,8 +6,8 @@ export default { list: { url: `${config.API_URL}/hrm/employee/`, name: "获取企业员工", - get: async function(){ - return await http.get(this.url); + get: async function(data){ + return await http.get(this.url, data); } } }, diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue index 7dfec866..490ec0c5 100644 --- a/src/components/scTable/index.vue +++ b/src/components/scTable/index.vue @@ -8,393 +8,536 @@ --> - - - - - - - - - {{scope.row[item.prop]}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 大 - 正常 - 小 - - - - - - - - - - - + + + + + + + + + {{ scope.row[item.prop] }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 大 + 正常 + 小 + + + + + + + + + + + diff --git a/src/config/table.js b/src/config/table.js index f20379de..ec317b2f 100644 --- a/src/config/table.js +++ b/src/config/table.js @@ -21,7 +21,7 @@ export default { page: 'page', //规定当前分页字段 pageSize: 'page_size', //规定一页条数字段 prop: 'prop', //规定排序字段名字段 - order: 'order' //规定排序规格字段 + order: 'ordering' //规定排序规格字段 }, /** * 自定义列保存处理 diff --git a/src/views/hrm/employee.vue b/src/views/hrm/employee.vue index f0a6d398..8c845019 100644 --- a/src/views/hrm/employee.vue +++ b/src/views/hrm/employee.vue @@ -14,7 +14,7 @@ - + @@ -25,7 +25,7 @@ {{scope.row.belong_dept_.name}} - +