From dcdc7bbe3bee3dca868d63859af1f6a0095adda8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8C=BF=E5=B0=8F=E5=A4=A9?= <1638245306@qq.com> Date: Wed, 12 Jul 2023 21:18:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=20=E6=9D=83=E9=99=90=E9=97=AE=E9=A2=98,?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86=E9=A1=B5=E9=9D=A2,?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=97=B6TF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.权限编辑提交时,值不变问题; 2.恢复文件管理页面; 3.查询时T/F后台报错问题; --- web/src/utils/service.ts | 12 +- web/src/views/system/fileList/index.vue | 162 ++---------------- .../system/menu/components/menuButton/api.ts | 2 +- .../menu/components/menuButton/crud.tsx | 2 +- 4 files changed, 26 insertions(+), 152 deletions(-) diff --git a/web/src/utils/service.ts b/web/src/utils/service.ts index b791810..9a347f8 100644 --- a/web/src/utils/service.ts +++ b/web/src/utils/service.ts @@ -24,12 +24,12 @@ function createService() { serialize(params) { return qs.stringify(params, { indices: false, - // encoder: (val: string) => { - // if (typeof val === 'boolean') { - // return val ? 1 : 0; - // } - // return val; - // }, + encoder: (val: string) => { + if (typeof val === 'boolean') { + return val ? 'True' : 'False'; + } + return val; + }, }); }, }, diff --git a/web/src/views/system/fileList/index.vue b/web/src/views/system/fileList/index.vue index 5f04111..119c73a 100644 --- a/web/src/views/system/fileList/index.vue +++ b/web/src/views/system/fileList/index.vue @@ -1,152 +1,26 @@ - - - - - - - - - - - - - - - - {{ item.name }} - - - - - 详细 - - - - {{ item.name }} - {{ item.creator_name }} - {{ item.engine }} - {{ item.create_datetime }} - - - - - - 删除 - - - - - - - - - - - - + - - diff --git a/web/src/views/system/menu/components/menuButton/api.ts b/web/src/views/system/menu/components/menuButton/api.ts index 5db63a9..bc473fc 100644 --- a/web/src/views/system/menu/components/menuButton/api.ts +++ b/web/src/views/system/menu/components/menuButton/api.ts @@ -24,7 +24,7 @@ export function AddObj(obj: AddReq) { }); } -export function UpdateObj(obj: EditReq) { +export function UpdateObj(obj: any) { return request({ url: apiPrefix + obj.id + '/', method: 'put', diff --git a/web/src/views/system/menu/components/menuButton/crud.tsx b/web/src/views/system/menu/components/menuButton/crud.tsx index 59dad16..c8d2ec8 100644 --- a/web/src/views/system/menu/components/menuButton/crud.tsx +++ b/web/src/views/system/menu/components/menuButton/crud.tsx @@ -24,7 +24,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp }; const editRequest = async ({ form, row }: EditReq) => { - return await api.UpdateObj(row); + return await api.UpdateObj({ ...form, menu: row.menu }); }; const delRequest = async ({ row }: DelReq) => { return await api.DelObj(row.id);