From 5b1ad450d3a2ffb2f7f10b4ab3c881987a85538d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=B7=B3?= Date: Tue, 13 Sep 2022 17:50:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E9=97=A8=E7=AE=A1=E7=90=86=EF=BC=9A?= =?UTF-8?q?=E5=A2=9E=E5=88=A0=E6=94=B9=E6=9F=A5=E3=80=81=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Config/SwaggerDoc.xml | 5 +- .../Controllers/DeptController.cs | 7 ++- .../yi-sqlsugar-dev.db | Bin 151552 -> 151552 bytes .../Yi.Framework.Interface/IDeptService.cs | 5 +- .../Yi.Framework.Service/DeptService.cs | 9 ++-- Yi.Vue3.X.RuoYi/src/api/system/dept.js | 18 +++---- Yi.Vue3.X.RuoYi/src/api/system/user.js | 14 +++--- .../src/views/system/dept/index.vue | 46 ++++++++++-------- .../src/views/system/user/index.vue | 13 +++-- 9 files changed, 63 insertions(+), 54 deletions(-) diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml index de78d0ff..c4c4d6a5 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Config/SwaggerDoc.xml @@ -168,12 +168,11 @@ - + - 动态条件分页查询 + 动态条件查询 - diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/DeptController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/DeptController.cs index e2c7252d..b9fb1de5 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/DeptController.cs +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/DeptController.cs @@ -26,15 +26,14 @@ namespace Yi.Framework.ApiMicroservice.Controllers } /// - /// 动态条件分页查询 + /// 动态条件查询 /// /// - /// /// [HttpGet] - public async Task PageList([FromQuery] DeptEntity dept, [FromQuery] PageParModel page) + public async Task SelctGetList([FromQuery] DeptEntity dept) { - return Result.Success().SetData(await _iDeptService.SelctPageList(dept, page)); + return Result.Success().SetData(await _iDeptService.SelctGetList(dept)); } diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db index dd3876ef41de3cfd796f1fdb42a81fe03375f289..8bda6f8177050c7b65132ecaa841a04ce9694283 100644 GIT binary patch delta 843 zcmZvaPiPZC6vk&Z$+}6+zKAR)YB37MgLIjh{l7=!$xD@jP+Qu@wwBUpOScN1+FJFX z2U}EPL9|lPdI&{=NhE?I2!(>Z_fiqEvEac&!Hb}qYyxfVGO)YM%_Espl$1uAgRji4KH`IE^G$acTL=Z9M) zMz-_L)LRsJ+{y)q$tqz0%Gtr|3nSu$m&X&HL; ze!-odspPViyQK(hBMvqYRAD23X#6Wg4+ePL#0Ij}72GO@#595u^mtwPAf{`=#Hp^3 z$kT);tgc0LkuBX+scQPCe0Vng5&sN?;8XrU|9d#va9fuiYW&oT1&bT&xD&9D zl{c{&_2$T^%os5YjTN0uJRgg2;2>B72Z+~_Hke9DNa7p)K+@{S(u60PGNrzx)!|2D zpJQnETol#Tm~5DeW-xk*6TMh@2nD4CZ@|qf-hEZmDN||mTOt2?5bc35%_fAAo}Ia4 zx=pD}G*ed%OTi+4CXuK|MnD{DV%$3q-Iw>==Y_4=<*n>;*T}h{@k#g1LM1nM8X{i4 mIH)4nZe(K}PDPup0)DG}OI%BU4>y>_zkox@VlamPocITpY4Sb* delta 331 zcmZozz}c{XbAmMEnu#*bjB7R~Ec54*V&IqHE8|b*liDm0z`@7Oz!1g4!zRh#=*&6! zYMi{LnU#^Dm4T(6xq+pDnWd3|k&&)}rLLi&f+3QOxuuawb9UVJ>^R1mh8&Fi(G2|2 z{Lz~g75w?9N6%;UN{ { /// - /// 动态条件分页查询 + /// 动态条件查询 /// /// - /// /// - Task>> SelctPageList(DeptEntity dept, PageParModel page); + Task> SelctGetList(DeptEntity dept); } } diff --git a/Yi.Framework.Net6/Yi.Framework.Service/DeptService.cs b/Yi.Framework.Net6/Yi.Framework.Service/DeptService.cs index bc016d60..a031e847 100644 --- a/Yi.Framework.Net6/Yi.Framework.Service/DeptService.cs +++ b/Yi.Framework.Net6/Yi.Framework.Service/DeptService.cs @@ -9,18 +9,17 @@ using Yi.Framework.Repository; namespace Yi.Framework.Service { - public partial class DeptService : BaseService, IDeptService + public partial class DeptService { - public async Task>> SelctPageList(DeptEntity dept, PageParModel page) + public async Task> SelctGetList(DeptEntity dept) { - RefAsync total = 0; var data = await _repository._DbQueryable .WhereIF(!string.IsNullOrEmpty(dept.DeptName), u => u.DeptName.Contains(dept.DeptName)) .WhereIF(dept.IsDeleted.IsNotNull(), u => u.IsDeleted == dept.IsDeleted) .OrderBy(u => u.OrderNum, OrderByType.Desc) - .ToPageListAsync(page.PageNum, page.PageSize, total); + .ToListAsync(); - return new PageModel>(data, total); + return data; } } } diff --git a/Yi.Vue3.X.RuoYi/src/api/system/dept.js b/Yi.Vue3.X.RuoYi/src/api/system/dept.js index 285a5631..0d85cd7f 100644 --- a/Yi.Vue3.X.RuoYi/src/api/system/dept.js +++ b/Yi.Vue3.X.RuoYi/src/api/system/dept.js @@ -3,19 +3,19 @@ import request from '@/utils/request' // 查询部门列表 export function listDept(query) { return request({ - url: '/dept/pageList', + url: '/dept/SelctGetList', method: 'get', params: query }) } -// 查询部门列表(排除节点) -export function listDeptExcludeChild(deptId) { - return request({ - url: '/system/dept/list/exclude/' + deptId, - method: 'get' - }) -} +// // 查询部门列表(排除节点) +// export function listDeptExcludeChild(deptId) { +// return request({ +// url: '/system/dept/list/exclude/' + deptId, +// method: 'get' +// }) +// } // 查询部门详细 export function getDept(deptId) { @@ -52,6 +52,6 @@ export function delDept(deptId) { return request({ url: '/dept/delList', method: 'delete', - data:postId + data:deptId }) } \ No newline at end of file diff --git a/Yi.Vue3.X.RuoYi/src/api/system/user.js b/Yi.Vue3.X.RuoYi/src/api/system/user.js index d7588541..39b14803 100644 --- a/Yi.Vue3.X.RuoYi/src/api/system/user.js +++ b/Yi.Vue3.X.RuoYi/src/api/system/user.js @@ -128,10 +128,10 @@ export function updateAuthRole(data) { }) } -// 查询部门下拉树结构 -export function deptTreeSelect() { - return request({ - url: '/system/user/deptTree', - method: 'get' - }) -} +// // 查询部门下拉树结构 +// export function deptTreeSelect() { +// return request({ +// url: '/system/user/deptTree', +// method: 'get' +// }) +// } diff --git a/Yi.Vue3.X.RuoYi/src/views/system/dept/index.vue b/Yi.Vue3.X.RuoYi/src/views/system/dept/index.vue index 636a86c5..1479acae 100644 --- a/Yi.Vue3.X.RuoYi/src/views/system/dept/index.vue +++ b/Yi.Vue3.X.RuoYi/src/views/system/dept/index.vue @@ -9,8 +9,8 @@ @keyup.enter="handleQuery" /> - - + + - + @@ -100,8 +100,8 @@ @@ -134,7 +134,7 @@ - +