From 0f86f5c6fc8eb08843bcb30710bf5f3fbade2fa7 Mon Sep 17 00:00:00 2001 From: sheng <15292050171@163.com> Date: Fri, 28 Jul 2023 17:09:41 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=20=E8=8F=9C=E5=8D=95=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=96=B0=E5=A2=9E=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/system/dept/api.ts | 2 +- .../system/dept/components/DeptFormCom.vue | 175 ++++----- .../views/system/dept/components/TreeCom.vue | 344 +++++++++--------- web/src/views/system/dept/types.ts | 6 +- .../menu/components/menuButton/crud.tsx | 12 +- web/src/views/system/menu/index.vue | 221 ++++++----- 6 files changed, 397 insertions(+), 363 deletions(-) diff --git a/web/src/views/system/dept/api.ts b/web/src/views/system/dept/api.ts index 0779ffe..41b2c7f 100644 --- a/web/src/views/system/dept/api.ts +++ b/web/src/views/system/dept/api.ts @@ -1,5 +1,5 @@ import { request } from '/@/utils/service'; -import { UserPageQuery, AddReq, DelReq, EditReq, InfoReq, PageQuery } from '@fast-crud/fast-crud'; +import { UserPageQuery, AddReq, EditReq, InfoReq, PageQuery } from '@fast-crud/fast-crud'; export const apiPrefix = '/api/system/dept/'; diff --git a/web/src/views/system/dept/components/DeptFormCom.vue b/web/src/views/system/dept/components/DeptFormCom.vue index b19fb56..989c0f6 100644 --- a/web/src/views/system/dept/components/DeptFormCom.vue +++ b/web/src/views/system/dept/components/DeptFormCom.vue @@ -1,40 +1,29 @@ \ No newline at end of file + diff --git a/web/src/views/system/dept/components/TreeCom.vue b/web/src/views/system/dept/components/TreeCom.vue index ef869c6..1c16edb 100644 --- a/web/src/views/system/dept/components/TreeCom.vue +++ b/web/src/views/system/dept/components/TreeCom.vue @@ -1,70 +1,78 @@ \ No newline at end of file + diff --git a/web/src/views/system/dept/types.ts b/web/src/views/system/dept/types.ts index 6b0c30f..90d1653 100644 --- a/web/src/views/system/dept/types.ts +++ b/web/src/views/system/dept/types.ts @@ -40,14 +40,12 @@ export interface TreeItemType { } export interface DeptFormDataType { - id: string | number; + id?: string | number; key: string; parent: string | number; name: string; owner: string; - phone: string; - email: string; - sort: number; + remark: string; is_catalog?: boolean; } diff --git a/web/src/views/system/menu/components/menuButton/crud.tsx b/web/src/views/system/menu/components/menuButton/crud.tsx index 512952c..e70e8ab 100644 --- a/web/src/views/system/menu/components/menuButton/crud.tsx +++ b/web/src/views/system/menu/components/menuButton/crud.tsx @@ -1,12 +1,4 @@ -import { - AddReq, - DelReq, - EditReq, - dict, - CreateCrudOptionsRet, - CreateCrudOptionsProps, - UserPageQuery, -} from '@fast-crud/fast-crud'; +import { AddReq, DelReq, EditReq, dict, CreateCrudOptionsRet, CreateCrudOptionsProps, UserPageQuery } from '@fast-crud/fast-crud'; import * as api from './api'; import { request } from '/@/utils/service'; @@ -185,7 +177,7 @@ export const createCrudOptions = function ({ crudExpose, context }: CreateCrudOp }, }), column: { - minWidth: 200, + minWidth: 250, sortable: true, }, form: { diff --git a/web/src/views/system/menu/index.vue b/web/src/views/system/menu/index.vue index 8fd3e37..173b19e 100644 --- a/web/src/views/system/menu/index.vue +++ b/web/src/views/system/menu/index.vue @@ -10,16 +10,28 @@ 菜单列表 - + - +