Explorar o código

fix: 表格宽度适应调整

outaozhen %!s(int64=4) %!d(string=hai) anos
pai
achega
460c3c3552
Modificáronse 2 ficheiros con 35 adicións e 46 borrados
  1. 22 28
      src/pages/Customer/Client/index.jsx
  2. 13 18
      src/pages/Customer/Company/index.jsx

+ 22 - 28
src/pages/Customer/Client/index.jsx

@@ -167,13 +167,12 @@ const Client = props => {
       title: '客户',
       dataIndex: 'clientName',
       key: 'clientName',
-      width: 50,
+      width: 80,
       fixed: 'left',
       render: (clientName, record) => (
         <span
           onClick={() => showDrawer(record.id)}
-          className="text-primary cursor-pointer hover:text-[#967bbd]"
-        >
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
           {clientName}
         </span>
       ),
@@ -190,8 +189,7 @@ const Client = props => {
         record.companyId !== consts.ENCRYPTION_ZERO ? (
           <span
             onClick={() => showDrawerComapny(record.companyId)}
-            className="text-primary cursor-pointer hover:text-[#967bbd]"
-          >
+            className="text-primary cursor-pointer hover:text-[#967bbd]">
             {companyName}
           </span>
         ) : (
@@ -205,7 +203,7 @@ const Client = props => {
       dataIndex: 'department',
       key: 'department',
       ellipsis: true,
-      width: 50,
+      width: 70,
       search: false
     },
     {
@@ -219,7 +217,7 @@ const Client = props => {
       title: '办公室',
       dataIndex: 'office',
       key: 'office',
-      width: 50,
+      width: 90,
       ellipsis: true,
       search: false
     },
@@ -227,7 +225,7 @@ const Client = props => {
       title: '电话',
       dataIndex: 'phone',
       key: 'phone',
-      width: 65,
+      width: 120,
       search: false,
       sorter: true
     },
@@ -235,7 +233,7 @@ const Client = props => {
       title: '手机',
       dataIndex: 'telephone',
       key: 'telephone',
-      width: 75,
+      width: 120,
       sorter: true,
       search: false
     },
@@ -243,7 +241,7 @@ const Client = props => {
       title: 'QQ',
       dataIndex: 'qq',
       key: 'qq',
-      width: 75,
+      width: 120,
       sorter: true,
       search: false
     },
@@ -251,7 +249,7 @@ const Client = props => {
       title: '邮箱',
       dataIndex: 'email',
       key: 'email',
-      width: 85,
+      width: 165,
       sorter: true,
       // ellipsis: true,
       search: false
@@ -260,7 +258,7 @@ const Client = props => {
       title: '地区',
       dataIndex: 'districtName',
       key: 'districtName',
-      width: 75,
+      width: 120,
       search: false,
       // ellipsis: true,
       // filterDropdown: filterDropdownProps => <FilterCascader {...filterDropdownProps} />,
@@ -270,7 +268,7 @@ const Client = props => {
       title: '个人标签',
       dataIndex: 'tagIds',
       key: 'tagIds',
-      width: 80,
+      width: 160,
       filters: true,
       search: false,
       // onFilter: true,
@@ -297,8 +295,7 @@ const Client = props => {
             tagType={TagTypeEnum.PERSONTAG}
             tagColumn={TagDataTypeEnum.CLIENT}
             checkCallBack={refreshData}
-            modeType={LabelModeType.column}
-          >
+            modeType={LabelModeType.column}>
             <Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
           </PersonLabel>
         </div>
@@ -308,7 +305,7 @@ const Client = props => {
       title: '协作标签',
       dataIndex: 'tagCooperationIds',
       key: 'tagCooperationIds',
-      width: 80,
+      width: 160,
       filters: true,
       search: false,
       valueEnum: tag.teamTagMap,
@@ -335,8 +332,7 @@ const Client = props => {
             tagType={TagTypeEnum.TEAMTAG}
             tagColumn={TagDataTypeEnum.CLIENT}
             checkCallBack={refreshData}
-            modeType={LabelModeType.column}
-          >
+            modeType={LabelModeType.column}>
             <Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
           </PersonLabel>
         </div>
@@ -356,7 +352,7 @@ const Client = props => {
       dataIndex: 'ride',
       key: 'ride',
       ellipsis: true,
-      width: 50,
+      width: 80,
       search: false
     },
     {
@@ -364,7 +360,7 @@ const Client = props => {
       dataIndex: 'landmarks',
       key: 'landmarks',
       ellipsis: true,
-      width: 50,
+      width: 80,
       search: false
     },
     {
@@ -372,14 +368,14 @@ const Client = props => {
       dataIndex: 'stay',
       key: 'stay',
       ellipsis: true,
-      width: 50,
+      width: 80,
       search: false
     },
     {
       title: '来源',
       dataIndex: 'sourceName',
       key: 'sourceName',
-      width: 50,
+      width: 80,
       search: false
     },
     {
@@ -387,7 +383,7 @@ const Client = props => {
       dataIndex: 'mark',
       key: 'mark',
       ellipsis: true,
-      width: 50,
+      width: 80,
       search: false
     },
     // {
@@ -402,7 +398,7 @@ const Client = props => {
       title: '创建人',
       dataIndex: 'staffName',
       key: 'staffName',
-      width: 50,
+      width: 80,
       search: false
     }
   ]
@@ -497,8 +493,7 @@ const Client = props => {
             tagType={TagTypeEnum.PERSONTAG}
             tagColumn={TagDataTypeEnum.CLIENT}
             checkCallBack={toolbarOptionsChange}
-            modeType={LabelModeType.toolbar}
-          >
+            modeType={LabelModeType.toolbar}>
             {tagState.tagIds.length ? (
               <Button>
                 {tagState.tagIds.map(item => (
@@ -523,8 +518,7 @@ const Client = props => {
             tagType={TagTypeEnum.TEAMTAG}
             tagColumn={TagDataTypeEnum.CLIENT}
             checkCallBack={toolbarOptionsChange}
-            modeType={LabelModeType.toolbar}
-          >
+            modeType={LabelModeType.toolbar}>
             {tagState.tagCooperationIds.length ? (
               <Button>
                 {tagState.tagCooperationIds.map(item => (

+ 13 - 18
src/pages/Customer/Company/index.jsx

@@ -168,8 +168,7 @@ const Company = props => {
       render: (companyName, record) => (
         <span
           onClick={() => showDrawer(record.id)}
-          className="text-primary cursor-pointer hover:text-[#967bbd]"
-        >
+          className="text-primary cursor-pointer hover:text-[#967bbd]">
           {companyName}
         </span>
       )
@@ -179,7 +178,7 @@ const Company = props => {
       dataIndex: 'districtName',
       key: 'districtName',
       search: false,
-      width: 100,
+      width: 130,
       ellipsis: true,
       // filterDropdown: filterDropdownProps => <FilterCascader {...filterDropdownProps} />,
       renderText: text => text?.replaceAll(' / ', ' , ')
@@ -190,12 +189,12 @@ const Company = props => {
       key: 'phone',
       search: false,
       sorter: true,
-      width: 80
+      width: 100
     },
     {
       title: '个人标签',
       dataIndex: 'tagIds',
-      width: 85,
+      width: 160,
       filters: true,
       search: false,
       valueEnum: tag.personTagMap,
@@ -215,8 +214,7 @@ const Company = props => {
             tagType={TagTypeEnum.PERSONTAG}
             tagColumn={TagDataTypeEnum.COMPANY}
             checkCallBack={refreshData}
-            modeType={LabelModeType.column}
-          >
+            modeType={LabelModeType.column}>
             <Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
           </PersonLabel>
         </div>
@@ -226,7 +224,7 @@ const Company = props => {
       title: '协作标签',
       dataIndex: 'tagCooperationIds',
       key: 'tagCooperationIds',
-      width: 85,
+      width: 160,
       search: false,
       filters: true,
       valueEnum: tag.teamTagMap,
@@ -247,8 +245,7 @@ const Company = props => {
             tagType={TagTypeEnum.TEAMTAG}
             tagColumn={TagDataTypeEnum.COMPANY}
             checkCallBack={refreshData}
-            modeType={LabelModeType.column}
-          >
+            modeType={LabelModeType.column}>
             <Add theme="filled" size="20" fill="#868e96" className="cursor-pointer" />
           </PersonLabel>
         </div>
@@ -260,13 +257,13 @@ const Company = props => {
       key: 'clientTotal',
       search: false,
       sorter: true,
-      width: 80
+      width: 60
     },
     {
       title: '单位性质',
       dataIndex: 'natureIds',
       search: false,
-      width: 80,
+      width: 160,
       filters: true,
       valueEnum: tag.natureMap,
       render: (_, record) => <span>{record.nature}</span>
@@ -284,7 +281,7 @@ const Company = props => {
       dataIndex: 'fax',
       key: 'fax',
       search: false,
-      width: 80
+      width: 125
     },
     {
       title: '网址',
@@ -333,7 +330,7 @@ const Company = props => {
       dataIndex: 'longleTotal',
       search: false,
       sorter: true,
-      width: 50
+      width: 80
     }
   ]
   const columnsStateMap = {
@@ -406,8 +403,7 @@ const Company = props => {
             tagType={TagTypeEnum.PERSONTAG}
             tagColumn={TagDataTypeEnum.COMPANY}
             checkCallBack={toolbarOptionsChange}
-            modeType={LabelModeType.toolbar}
-          >
+            modeType={LabelModeType.toolbar}>
             {tagState.tagIds.length ? (
               <Button>
                 {tagState.tagIds.map(item => (
@@ -432,8 +428,7 @@ const Company = props => {
             tagType={TagTypeEnum.TEAMTAG}
             tagColumn={TagDataTypeEnum.COMPANY}
             checkCallBack={toolbarOptionsChange}
-            modeType={LabelModeType.toolbar}
-          >
+            modeType={LabelModeType.toolbar}>
             {tagState.tagCooperationIds.length ? (
               <Button>
                 {tagState.tagCooperationIds.map(item => (