Explorar el Código

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

outaozhen hace 5 años
padre
commit
86c6ed8ef0

+ 9 - 9
config/routes.js

@@ -50,15 +50,8 @@ export default [
                 routes: [
                   {
                     path: '/customer',
-                    redirect: '/customer/client',
-                    authority: ['admin', 'client_access']
-                  },
-                  {
-                    path: '/customer/client',
-                    name: 'client',
-                    icon: 'icon-address-book',
-                    component: './Customer/Client',
-                    authority: ['admin', 'client_access']
+                    redirect: '/customer/Company',
+                    authority: ['admin', 'company_access']
                   },
                   {
                     path: '/customer/company',
@@ -68,6 +61,13 @@ export default [
                     authority: ['admin', 'company_access']
                   },
                   {
+                    path: '/customer/client',
+                    name: 'client',
+                    icon: 'icon-address-book',
+                    component: './Customer/Client',
+                    authority: ['admin', 'client_access']
+                  },
+                  {
                     path: '/customer/business',
                     name: 'business',
                     icon: 'icon-usd-circle',

+ 3 - 5
src/components/EditableForm/src/editableFormItem.jsx

@@ -45,8 +45,9 @@ const EditableFormItem = ({
       if (iRef.current.selectRef) {
         // select选择器相关
         iRef.current.selectRef.current.focus()
-      } else if (iRef.current.cascadeRef) {
-        iRef.current.cascadeRef.current.focus()
+      } else if (editCellType === 'cascader') {
+        return
+        // iRef.current.cascadeRef.current.focus()
       } else {
         iRef.current.focus()
       }
@@ -127,8 +128,6 @@ const EditableFormItem = ({
     }
   }
   const save = async e => {
-    // console.log('失去焦点了', e)
-    // console.log(e)
     const { value, local = '' } = e.currentTarget
     if (value === record || !value) {
       toggleEdit()
@@ -152,7 +151,6 @@ const EditableFormItem = ({
             defaultValue={state.val}
             allowClear={false}
             className="w-full"
-            autoFocus={true}
             onChange={(value, local) => save({ currentTarget: { value, local } })}
             popupVisible={true}
             onBlur={save}

+ 0 - 7
src/components/LazyCascader/LazyCascader.jsx

@@ -4,16 +4,12 @@ import { connect } from 'dva'
 
 const CLazyCascader = props => {
   const { refinstance, options, dispatch, onChange, changeOnSelect = false, ...resetProps } = props
-  // console.log(props.defaultValue)
   useEffect(() => {
     if (!options.length) {
       dispatch({
         type: 'district/fetch'
       })
     }
-    // if (refinstance && refinstance.current) {
-    //   refinstance.current.focus()
-    // }
   }, [])
 
   const triggerChange = (value, local = '') => {
@@ -58,6 +54,3 @@ const LazyCascader = connect(({ district }) => ({
 export default forwardRef((props, ref) => {
   return <LazyCascader {...props} refinstance={ref} />
 })
-// export default connect(({ district }) => ({
-//   options: district.data
-// }))(LazyCascader)

+ 2 - 1
src/pages/workbench/Dashboard/components/LeaderBoard.jsx

@@ -28,7 +28,8 @@ const LeaderBoard = ({ dataList = [] }) => {
         valueType: 'indexBorder',
         align: 'center',
         width: '30%',
-        render: (_, record) => <Iconfont type="icon-trophy" className={colorMap[record.rank]} />
+        render: (_, record) =>
+          record.rank <= 3 ? <Iconfont type="icon-trophy" className={colorMap[record.rank]} /> : ''
       },
       {
         title: '姓名',