Browse Source

feat: 5.24提交

lanjianrong 4 years atrás
parent
commit
b3b19b3ac6

+ 6 - 6
config/routes.js

@@ -70,13 +70,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'
-      // }
     ]
   },
   {

+ 3 - 3
package.json

@@ -50,8 +50,8 @@
   "dependencies": {
     "@ant-design/charts": "^1.3.2",
     "@ant-design/icons": "^4.0.0",
-    "@ant-design/pro-form": "^1.66.0",
-    "@ant-design/pro-layout": "^6.19.3",
+    "@ant-design/pro-form": "1.66.0",
+    "@ant-design/pro-layout": "6.19.3",
     "@ant-design/pro-table": "^2.60.0",
     "@icon-park/react": "^1.3.3",
     "@umijs/route-utils": "^2.0.5",
@@ -71,7 +71,7 @@
     "react-dom": "17.0.2",
     "react-infinite-scroll-component": "^6.1.0",
     "react-markdown": "^7.1.0",
-    "umi": "3.5.4",
+    "umi": "3.5.24",
     "vditor": "3.8.14",
     "virtuallist-antd": "^0.7.2"
   },

+ 0 - 1
src/components/Table/src/BasicTable.tsx

@@ -6,7 +6,6 @@ import { TABLE_COLUMNS_MAP, ColumnStateEnum } from '@/utils/cache/cacheEnum'
 import { isBoolean, isMobile, isNullOrUnDef, isObject, isUnDef } from '@/utils/is'
 import ProTable from '@ant-design/pro-table'
 import { useModel } from 'umi'
-import { useUpdateLayoutEffect } from 'ahooks'
 import { getAuthCache, getPermAuthCache, setAuthCache } from '@/utils/auth'
 import { useTableScroll } from './hooks/useTableScroll'
 import type { ColumnsState } from '@ant-design/pro-table'

+ 10 - 18
src/pages/Customer/Company/components/CompanyDetail/TabList.jsx

@@ -58,8 +58,7 @@ const CompanyTabList = ({ initData, customerId, client, software, customer, busi
         if (key !== defaultSelectedKey) {
           changePriority(key, id)
         }
-      }}
-    >
+      }}>
       <Menu.Item key="1">1</Menu.Item>
       <Menu.Item key="2">2</Menu.Item>
       <Menu.Item key="3">3</Menu.Item>
@@ -87,12 +86,10 @@ const CompanyTabList = ({ initData, customerId, client, software, customer, busi
       title: '所有部门',
       dataIndex: 'department',
       width: 100,
-      filters: Array.from(
-        new Set(client.client?.map(item => item.department)).map(item => ({
-          text: item,
-          value: item
-        }))
-      ),
+      filters: Array.from(new Set(client.client?.map(item => item.department))).map(item => ({
+        text: item,
+        value: item
+      })),
       onFilter: (value, item) => item.department === value
     },
     {
@@ -104,8 +101,7 @@ const CompanyTabList = ({ initData, customerId, client, software, customer, busi
         <div className="text-primary hover:text-hex-967bbd">
           <span
             onClick={() => dispatchModal('D_CLIENT_DETAIL', { dataId: record.id })}
-            className="cursor-pointer "
-          >
+            className="cursor-pointer ">
             {clientName}
           </span>
         </div>
@@ -140,8 +136,7 @@ const CompanyTabList = ({ initData, customerId, client, software, customer, busi
           onClick={() => dispatchModal('D_LOCK_DETAIL', { dataId: record.id })}
           className={classNames('cursor-pointer hover:text-hex-967bbd', {
             'text-primary': record.preserveStatus === 3
-          })}
-        >
+          })}>
           {record.preserveStatus === 3 ? (
             <Text delete type="secondary">
               {clientName}
@@ -278,8 +273,7 @@ const CompanyTabList = ({ initData, customerId, client, software, customer, busi
               dataId: record.ssoId,
               projectType: record.project_type
             })
-          }
-        >
+          }>
           {text}
         </div>
       )
@@ -428,8 +422,7 @@ const CompanyTabList = ({ initData, customerId, client, software, customer, busi
           ghost
           size="small"
           className="mr-1"
-          onClick={() => dispatchModal('M_RECORD_ADD', { onConfirm: handleAddCustomerService })}
-        >
+          onClick={() => dispatchModal('M_RECORD_ADD', { onConfirm: handleAddCustomerService })}>
           <Plus className="mr-1" /> 添加服务记录
         </Button>
         <Button
@@ -448,8 +441,7 @@ const CompanyTabList = ({ initData, customerId, client, software, customer, busi
                 landmarks: customer.landmarks
               }
             })
-          }
-        >
+          }>
           <Plus className="mr-1" />
           客户
         </Button>

+ 0 - 11
src/pages/Customer/Email/index.tsx

@@ -1,11 +0,0 @@
-import { PageContainer } from '@ant-design/pro-layout'
-
-const Email = () => {
-  return (
-    <PageContainer title={false} breadcrumb={false}>
-      111
-    </PageContainer>
-  )
-}
-
-export default Email

+ 43 - 0
src/typings.d.ts

@@ -0,0 +1,43 @@
+declare module 'slash2'
+declare module '*.css'
+declare module '*.less'
+declare module '*.scss'
+declare module '*.sass'
+declare module '*.svg'
+declare module '*.png'
+declare module '*.jpg'
+declare module '*.jpeg'
+declare module '*.gif'
+declare module '*.bmp'
+declare module '*.tiff'
+declare module 'omit.js'
+declare module 'numeral'
+declare module '@antv/data-set'
+declare module 'mockjs'
+declare module 'react-fittext'
+declare module 'bizcharts-plugin-slider'
+
+// google analytics interface
+type GAFieldsObject = {
+  eventCategory: string
+  eventAction: string
+  eventLabel?: string
+  eventValue?: number
+  nonInteraction?: boolean
+}
+
+type Window = {
+  ga: (command: 'send', hitType: 'event' | 'pageview', fieldsObject: GAFieldsObject | string) => void
+  reloadAuthorized: () => void
+  routerBase: string
+}
+
+declare let ga: () => void
+
+// preview.pro.ant.design only do not use in your production ;
+// preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
+declare let ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: 'site' | undefined
+
+declare const REACT_APP_ENV: 'test' | 'dev' | 'pre' | false
+
+declare type Nullable<T> = T | null