Selaa lähdekoodia

fix: 固定锁库左侧前两列

lanjianrong 5 vuotta sitten
vanhempi
commit
71948e8aee

+ 21 - 21
config/routes.js

@@ -104,28 +104,28 @@ export default [
           //   component: './Product/Lock/LockCount'
           // }
         ]
-      },
-      {
-        path: '/product/cloud',
-        name: 'cloud',
-        icon: 'icon-cloud',
-        routes: [
-          {
-            path: '/product/cloud',
-            redirect: '/product/cloud/building'
-          },
-          {
-            path: '/product/cloud/building',
-            name: 'build',
-            component: './Product/Cloud/Building'
-          },
-          {
-            path: '/product/cloud/curing',
-            name: 'curing',
-            component: './Product/Cloud/Curing'
-          }
-        ]
       }
+      // {
+      //   path: '/product/cloud',
+      //   name: 'cloud',
+      //   icon: 'icon-cloud',
+      //   routes: [
+      //     {
+      //       path: '/product/cloud',
+      //       redirect: '/product/cloud/building'
+      //     },
+      //     {
+      //       path: '/product/cloud/building',
+      //       name: 'build',
+      //       component: './Product/Cloud/Building'
+      //     },
+      //     {
+      //       path: '/product/cloud/curing',
+      //       name: 'curing',
+      //       component: './Product/Cloud/Curing'
+      //     }
+      //   ]
+      // }
     ]
   },
   {

+ 2 - 0
src/pages/Product/Lock/Lockstore/index.jsx

@@ -174,6 +174,7 @@ const LockStore = ({ prodList = [], dispatch, shouldUpdate }) => {
       title: '锁号',
       dataIndex: 'keyNum',
       width: 150,
+      fixed: 'left',
       render: (keyNum, record) => (
         <span
           onClick={() => showDrawer(record.id)}
@@ -186,6 +187,7 @@ const LockStore = ({ prodList = [], dispatch, shouldUpdate }) => {
       title: '产品',
       dataIndex: 'product',
       width: 200,
+      fixed: 'left',
       render: text => <ProductLabel data={text} />
     },
     {

+ 43 - 26
src/pages/workbench/Dashboard/components/RatioPanels.jsx

@@ -8,9 +8,22 @@ import { Badge } from 'antd'
 import { cardTypeMap } from '../consts'
 
 const dataTypeEunm = {
-  0: 'client',
-  1: 'customer',
-  2: 'business'
+  0: {
+    key: 'client',
+    title: '新增联系人'
+  },
+  1: {
+    key: 'customer',
+    title: '新增客户'
+  },
+  2: {
+    key: 'business',
+    title: '新增商机'
+  },
+  3: {
+    key: 'service',
+    title: '新增服务记录'
+  }
 }
 
 const renderBadge = (count, active = false) => {
@@ -60,6 +73,7 @@ const ServiceRatioPanels = ({ cyclical, dataPermission }) => {
       params={{ dataType: state.activeKey, cyclical, dataPermission }}
       rowKey={record => record.id}
       scroll={{ y: 400 }}
+      border={true}
       columns={columns}
       search={false}
       toolbar={{
@@ -72,7 +86,7 @@ const ServiceRatioPanels = ({ cyclical, dataPermission }) => {
               key: '0',
               label: (
                 <span>
-                  联系人服务记录
+                  联系人
                   {renderBadge(state.total, state.activeKey === '0')}
                 </span>
               )
@@ -81,7 +95,7 @@ const ServiceRatioPanels = ({ cyclical, dataPermission }) => {
               key: '1',
               label: (
                 <span>
-                  客户服务记录
+                  客户
                   {renderBadge(state.total, state.activeKey === '1')}
                 </span>
               )
@@ -90,7 +104,7 @@ const ServiceRatioPanels = ({ cyclical, dataPermission }) => {
               key: '2',
               label: (
                 <span>
-                  商机服务记录
+                  商机
                   {renderBadge(state.total, state.activeKey === '2')}
                 </span>
               )
@@ -213,29 +227,32 @@ const RatioPanels = ({ dataType, retioCyclical, dataPermission }) => {
   }
 
   return (
-    <CustomModal title="卡片详情">
-      <div className="mx-4 pb-4">
+    <CustomModal title={`卡片详情(${dataTypeEunm[dataType].title})`}>
+      <div className="pb-4">
         {dataType === cardTypeMap.SERVICE ? (
           <ServiceRatioPanels cyclical={retioCyclical} dataPermission={dataPermission} />
         ) : (
-          <ProTable
-            size="small"
-            pagination={{ defaultPageSize: 10 }}
-            rowKey={record => record.id}
-            scroll={{ y: 400 }}
-            columns={columnsMap[dataType]}
-            params={{ dataType, dataPermission, cyclical: retioCyclical }}
-            request={async params => {
-              const { code = -1, data } = await queryRatioPanelsList(params)
-              return {
-                data: data[dataTypeEunm[dataType]],
-                success: code === consts.RET_CODE.SUCCESS,
-                total: data.total
-              }
-            }}
-            search={false}
-            toolBarRender={false}
-          />
+          <div className="mx-4">
+            <ProTable
+              size="small"
+              border={true}
+              pagination={{ defaultPageSize: 10 }}
+              rowKey={record => record.id}
+              scroll={{ y: 400 }}
+              columns={columnsMap[dataType]}
+              params={{ dataType, dataPermission, cyclical: retioCyclical }}
+              request={async params => {
+                const { code = -1, data } = await queryRatioPanelsList(params)
+                return {
+                  data: data[dataTypeEunm[dataType].key],
+                  success: code === consts.RET_CODE.SUCCESS,
+                  total: data.total
+                }
+              }}
+              search={false}
+              toolBarRender={false}
+            />
+          </div>
         )}
       </div>
       {/* <div className={styles.modalFooter}>