Prechádzať zdrojové kódy

feat: 数据权限-自定义由后台配置

lanjianrong 3 rokov pred
rodič
commit
ef1c3632e8

+ 5 - 1
src/pages/Role/Customer/index.tsx

@@ -18,7 +18,7 @@ import RoleMenu from '../System/components/RoleMenu'
 import ConnectModal from '../System/components/ConnectModal'
 import FormItem from 'antd/lib/form/FormItem'
 
-const permData = [
+export const permData = [
   {
     label: '本人',
     value: 'oneself'
@@ -38,6 +38,10 @@ const permData = [
   {
     label: '全部',
     value: 'all'
+  },
+  {
+    label: '自定义',
+    value: 'custom'
   }
 ]
 

+ 1 - 23
src/pages/Role/Product/index.tsx

@@ -17,29 +17,7 @@ import { formatPermission } from '@/utils/utils'
 import RoleMenu from '../System/components/RoleMenu'
 import ConnectModal from '../System/components/ConnectModal'
 import FormItem from 'antd/lib/form/FormItem'
-
-const permData = [
-  {
-    label: '本人',
-    value: 'oneself'
-  },
-  {
-    label: '下属',
-    value: 'underling'
-  },
-  {
-    label: '本部门',
-    value: 'department'
-  },
-  {
-    label: '下属部门',
-    value: 'departmentAll'
-  },
-  {
-    label: '全部',
-    value: 'all'
-  }
-]
+import { permData } from '../Customer'
 
 const Product = () => {
   const { TabPane } = Tabs

+ 1 - 24
src/pages/Role/Workbench/index.tsx

@@ -15,30 +15,7 @@ import {
 import type { ColumnsType } from 'antd/lib/table'
 import RoleMenu from '../System/components/RoleMenu'
 import ConnectModal from '../System/components/ConnectModal'
-// import { formatPermission } from '@/utils/utils'
-
-const permData = [
-  {
-    label: '本人',
-    value: 'oneself'
-  },
-  {
-    label: '下属',
-    value: 'underling'
-  },
-  {
-    label: '本部门',
-    value: 'department'
-  },
-  {
-    label: '下属部门',
-    value: 'departmentAll'
-  },
-  {
-    label: '全部',
-    value: 'all'
-  }
-]
+import { permData } from '../Customer'
 
 const Workbench = () => {
   const { TabPane } = Tabs