From ae8366f097617f826ad49f9da4db3e915617d830 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, 27 Dec 2023 23:29:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E5=8F=98=E5=8C=96:=20?= =?UTF-8?q?=E9=83=A8=E9=97=A8=E5=85=81=E8=AE=B8=E9=80=89=E6=8B=A9=E7=88=B6?= =?UTF-8?q?=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/application/settings.py | 2 +- web/src/utils/commonCrud.ts | 6 ++---- web/src/views/system/user/crud.tsx | 22 ++-------------------- 3 files changed, 5 insertions(+), 25 deletions(-) diff --git a/backend/application/settings.py b/backend/application/settings.py index 501b66a..7f8e7d5 100644 --- a/backend/application/settings.py +++ b/backend/application/settings.py @@ -408,6 +408,6 @@ PLUGINS_URL_PATTERNS = [] # from dvadmin_third.settings import * # 第三方用户管理 # from dvadmin_ak_sk.settings import * # 秘钥管理管理 # from dvadmin_tenants.settings import * # 租户管理 -from dvadmin_social_auth.settings import * +#from dvadmin_social_auth.settings import * # ... # ********** 一键导入插件配置结束 ********** diff --git a/web/src/utils/commonCrud.ts b/web/src/utils/commonCrud.ts index 40e08f7..dd977b8 100644 --- a/web/src/utils/commonCrud.ts +++ b/web/src/utils/commonCrud.ts @@ -36,7 +36,7 @@ export const commonCrudConfig = (options = { return { dept_belong_id: { title: '所属部门', - type: 'dict-cascader', + type: 'dict-tree', search: { show: options.dept_belong_id?.search || false }, @@ -62,14 +62,12 @@ export const commonCrudConfig = (options = { multiple: false, clearable: true, props: { - showAllLevels:false, + checkStrictly:true, props: { // 为什么这里要写两层props // 因为props属性名与fs的动态渲染的props命名冲突,所以要多写一层 label: "name", value: "id", - checkStrictly: true, - emitPath:false } } }, diff --git a/web/src/views/system/user/crud.tsx b/web/src/views/system/user/crud.tsx index c5f67eb..254add0 100644 --- a/web/src/views/system/user/crud.tsx +++ b/web/src/views/system/user/crud.tsx @@ -207,14 +207,7 @@ export const createCrudOptions = function ({crudExpose}: CreateCrudOptionsProps) isTree: true, url: '/api/system/dept/all_dept/', value: 'id', - label: 'name', - getData: async ({url}: { url: string }) => { - return request({ - url: url, - }).then((ret: any) => { - return ret.data; - }); - }, + label: 'name' }), column: { minWidth: 150, //最小列宽 @@ -231,6 +224,7 @@ export const createCrudOptions = function ({crudExpose}: CreateCrudOptionsProps) filterable: true, placeholder: '请选择', props: { + checkStrictly:true, props: { value: 'id', label: 'name', @@ -249,18 +243,6 @@ export const createCrudOptions = function ({crudExpose}: CreateCrudOptionsProps) url: '/api/system/role/', value: 'id', label: 'name', - isTree: true, - getData: async ({url}: { url: string }) => { - return request({ - url: url, - params: { - page: 1, - limit: 10, - }, - }).then((ret: any) => { - return ret.data; - }); - }, }), column: { minWidth: 100, //最小列宽