From 1db8bb4d137a46eceade3d69f259cf50bcb02c7e Mon Sep 17 00:00:00 2001 From: chenchun <454313500@qq.com> Date: Sat, 10 Sep 2022 14:02:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=97=E5=85=B8=E7=B1=BB=E5=9E=8B=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/DictionaryController.cs | 7 ++++++ .../yi-sqlsugar-dev.db | Bin 118784 -> 118784 bytes Yi.Vue3.X.RuoYi/src/api/system/dict/type.js | 2 +- .../src/views/system/dict/index.vue | 22 +++++++++--------- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/DictionaryController.cs b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/DictionaryController.cs index a615870c..59b268c9 100644 --- a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/DictionaryController.cs +++ b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/Controllers/DictionaryController.cs @@ -9,6 +9,7 @@ using Yi.Framework.Common.Models; using Yi.Framework.Interface; using Yi.Framework.Model.Models; using Yi.Framework.Repository; +using Yi.Framework.Service; using Yi.Framework.WebCore; using Yi.Framework.WebCore.AttributeExtend; using Yi.Framework.WebCore.AuthorizationPolicy; @@ -32,6 +33,12 @@ namespace Yi.Framework.ApiMicroservice.Controllers return Result.Success().SetData(await _iDictionaryService.SelctPageList(dic, page)); } + [HttpPost] + public async Task Add(DictionaryEntity dic) + { + return Result.Success().SetData(await _iDictionaryService._repository.InsertReturnSnowflakeIdAsync(dic)); + } + [HttpGet] [Route("{type}")] public async Task GetListByType([FromRoute] string type) 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 8aab07be1718d3ebb097e10a4c5118f26a20622d..610f1659a6824b70d17de794f839e25deceb5f52 100644 GIT binary patch delta 116 zcmZozz}~QceS$Qj<3t%}M#sj4tqF`v`q>!y_cQSC-z?~`mEX~xk)KVP0SKHK7&w5G zr09{z*qcoP3?-?>C5A@EMg~Skx(1fIh6W0T##SblR;Gq}=B6fQ7KTQJZ5`W|YxFiZ$ diff --git a/Yi.Vue3.X.RuoYi/src/api/system/dict/type.js b/Yi.Vue3.X.RuoYi/src/api/system/dict/type.js index 29f87c81..cf0e0d69 100644 --- a/Yi.Vue3.X.RuoYi/src/api/system/dict/type.js +++ b/Yi.Vue3.X.RuoYi/src/api/system/dict/type.js @@ -20,7 +20,7 @@ export function getType(dictId) { // 新增字典类型 export function addType(data) { return request({ - url: '/system/dict/type', + url: '/dictionary/add', method: 'post', data: data }) diff --git a/Yi.Vue3.X.RuoYi/src/views/system/dict/index.vue b/Yi.Vue3.X.RuoYi/src/views/system/dict/index.vue index ef5182dd..049eaad5 100644 --- a/Yi.Vue3.X.RuoYi/src/views/system/dict/index.vue +++ b/Yi.Vue3.X.RuoYi/src/views/system/dict/index.vue @@ -103,18 +103,18 @@ - + - + @@ -158,8 +158,8 @@ - - + + { - typeList.value = response.rows; - total.value = response.total; + typeList.value = response.data.data; + total.value = response.data.total; loading.value = false; }); } @@ -233,10 +233,10 @@ function cancel() { /** 表单重置 */ function reset() { form.value = { - dictId: undefined, + Id: undefined, dictName: undefined, dictType: undefined, - status: "0", + isDeleted: false, remark: undefined }; proxy.resetForm("dictRef");