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 8aab07be..610f1659 100644 Binary files a/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db and b/Yi.Framework.Net6/Yi.Framework.ApiMicroservice/yi-sqlsugar-dev.db differ 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");