From 864aa95d24fa9a560b14e4c9e4a7f44201966ead Mon Sep 17 00:00:00 2001 From: Cain <2365469460@qq.com> Date: Tue, 11 Mar 2025 20:31:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=98=BE=E7=A4=BA=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/langs/en-us.ts | 1 + src/locales/langs/zh-cn.ts | 1 + src/service/api/category.ts | 9 --- src/typings/api.d.ts | 7 -- src/typings/app.d.ts | 1 + src/views/category/index.vue | 2 +- .../modules/dictionary-operate-drawer.vue | 1 + .../group/modules/group-operate-drawer.vue | 68 ++++++------------- 8 files changed, 27 insertions(+), 63 deletions(-) diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index 208dc99..b9303ce 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -19,6 +19,7 @@ const local: App.I18n.Schema = { check: 'Check', expandColumn: 'Expand Column', columnSetting: 'Column Setting', + loadFail: 'Load Fail', config: 'Config', confirm: 'Confirm', save: 'Save', diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 5a3236a..abd935e 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -14,6 +14,7 @@ const local: App.I18n.Schema = { addSuccess: '添加成功', backToHome: '返回首页', batchDelete: '批量删除', + loadFail: '加载失败', cancel: '取消', close: '关闭', check: '勾选', diff --git a/src/service/api/category.ts b/src/service/api/category.ts index 46672c6..286a137 100644 --- a/src/service/api/category.ts +++ b/src/service/api/category.ts @@ -26,15 +26,6 @@ export function fetchAddCategory(data: Api.Category.Model) { } // /** edit category */ -// export function fetchEditCategory(data: Api.Namespace.Namespace) { -// return request({ -// url: '/namespace', -// method: 'put', -// data -// }); -// } - -// /** add category */ export function fetchEditCategory(data: Api.Category.Model) { return request({ url: '/category', diff --git a/src/typings/api.d.ts b/src/typings/api.d.ts index 531f346..d060f85 100644 --- a/src/typings/api.d.ts +++ b/src/typings/api.d.ts @@ -1372,7 +1372,6 @@ declare namespace Api { */ namespace Category { - type CategoryType = '网站' | '文献'; type RowData = Category & { @@ -1394,11 +1393,5 @@ declare namespace Api { type: string; parent: string; } - - interface Result { - status: 1, -    message: string, -    data: RowData[] - } } } diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts index adcbdee..5a3f33f 100644 --- a/src/typings/app.d.ts +++ b/src/typings/app.d.ts @@ -300,6 +300,7 @@ declare namespace App { check: string; expandColumn: string; columnSetting: string; + loadFail: string; config: string; confirm: string; save: string; diff --git a/src/views/category/index.vue b/src/views/category/index.vue index 2915f16..10a6692 100644 --- a/src/views/category/index.vue +++ b/src/views/category/index.vue @@ -104,7 +104,7 @@ const { // 表头添加操作 const headAdd = () => { - handleAdd(-1); + handleAdd(0); } const refresh = () => { console.log("你点击了刷新按钮") diff --git a/src/views/dictionary/modules/dictionary-operate-drawer.vue b/src/views/dictionary/modules/dictionary-operate-drawer.vue index 8403e70..ad128f9 100644 --- a/src/views/dictionary/modules/dictionary-operate-drawer.vue +++ b/src/views/dictionary/modules/dictionary-operate-drawer.vue @@ -58,6 +58,7 @@ function updateModel(categoryName: string, categoryType: string, parentId: numbe } function createDefaultModel(): Api.Category.Model { return { + id: 0, name: '', type: '', parent: '' diff --git a/src/views/group/modules/group-operate-drawer.vue b/src/views/group/modules/group-operate-drawer.vue index 8a80cd3..484c0c4 100644 --- a/src/views/group/modules/group-operate-drawer.vue +++ b/src/views/group/modules/group-operate-drawer.vue @@ -1,5 +1,5 @@