소스 검색

Merge branch 'master' of http://192.168.1.41:3000/outaozhen/cldV2react

outaozhen 5 년 전
부모
커밋
2ba433fbcd
3개의 변경된 파일13개의 추가작업 그리고 9개의 파일을 삭제
  1. 6 6
      config/routes.js
  2. 2 2
      package.json
  3. 5 1
      src/pages/Customer/Company/components/PermSelect.jsx

+ 6 - 6
config/routes.js

@@ -64,13 +64,13 @@ export default [
         component: './Customer/Business',
         access: 'authRouteFilter',
         validatePerm: true
-      },
-      {
-        path: '/customer/test',
-        name: 'test',
-        icon: 'icon-usd-circle',
-        component: './Customer/Test'
       }
+      // {
+      //   path: '/customer/test',
+      //   name: 'test',
+      //   icon: 'icon-usd-circle',
+      //   component: './Customer/Test'
+      // }
     ]
   },
   {

+ 2 - 2
package.json

@@ -119,8 +119,8 @@
     "stylelint": "^13.9.0",
     "typescript": "^4.0.3",
     "webpack": "^5.40.0",
-    "windicss": "3.0.12",
-    "windicss-webpack-plugin": "1.0.0"
+    "windicss": "3.1.7",
+    "windicss-webpack-plugin": "1.4.5"
   },
   "engines": {
     "node": ">=10.0.0"

+ 5 - 1
src/pages/Customer/Company/components/PermSelect.jsx

@@ -13,6 +13,10 @@ export const PermDataTypeEunm = {
 const PermSelect = ({ dataType, onConfirm }) => {
   const { initialState: { permData } = { permData: {} } } = useModel('@@initialState')
   const { toggleModal, setModalProps } = useModal()
+  const options = [...(permData[dataType] || [])]
+  if (permData[dataType]?.findIndex(item => item.value === 'all') !== -1) {
+    options.push({ value: 'custom', label: '自定义' })
+  }
   return (
     <Select
       defaultValue="oneself"
@@ -29,7 +33,7 @@ const PermSelect = ({ dataType, onConfirm }) => {
         }
         onConfirm({ staffIds: null, dataPermission: e })
       }}
-      options={[...(permData[dataType] || []), { value: 'custom', label: '自定义' }]}
+      options={options}
     />
   )
 }