From d64d1d069f24cfbc09cd9d185872cc0f9c4e696e Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Wed, 10 Jul 2024 16:52:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E6=A0=87bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/organization/components/company/company.js | 2 +- .../components/department/department.js | 2 +- pc4mobx/organization/components/job/Job.js | 2 +- .../organization/components/resource/resource.js | 13 +++++++++++-- pc4mobx/organization/stores/resource.js | 2 +- pc4mobx/organization/style/common.less | 3 ++- 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/pc4mobx/organization/components/company/company.js b/pc4mobx/organization/components/company/company.js index 2c19e5b..71ddb6c 100644 --- a/pc4mobx/organization/components/company/company.js +++ b/pc4mobx/organization/components/company/company.js @@ -548,7 +548,7 @@ export default class Company extends React.Component { return ( - hasRight &&
+ hasRight &&
this.handleMenuClick(key)} diff --git a/pc4mobx/organization/components/department/department.js b/pc4mobx/organization/components/department/department.js index 6bbbb74..f1d465a 100644 --- a/pc4mobx/organization/components/department/department.js +++ b/pc4mobx/organization/components/department/department.js @@ -660,7 +660,7 @@ export default class Department extends React.Component { return ( - hasRight &&
+ hasRight &&
this.handleMenuClick(key)} diff --git a/pc4mobx/organization/components/job/Job.js b/pc4mobx/organization/components/job/Job.js index 6dd56bd..31e035d 100644 --- a/pc4mobx/organization/components/job/Job.js +++ b/pc4mobx/organization/components/job/Job.js @@ -608,7 +608,7 @@ export default class Job extends React.Component { return ( - hasRight &&
+ hasRight &&
this.handleMenuClick(key)} diff --git a/pc4mobx/organization/components/resource/resource.js b/pc4mobx/organization/components/resource/resource.js index 28a6ab9..3c2d483 100644 --- a/pc4mobx/organization/components/resource/resource.js +++ b/pc4mobx/organization/components/resource/resource.js @@ -499,6 +499,15 @@ export default class Resource extends React.Component { return true; } + getTableWidth = (columns) => { + const columnLength = columns.filter((col)=>col.display === 'true').length; + if(columnLength>10){ + return columnLength*150; + }else{ + return '100%' + } + } + render() { @@ -513,7 +522,7 @@ export default class Resource extends React.Component { if (hasRight === false) { return renderNoright(); } - const width = tableStore.columns.filter(c => c.display === "true").length * 50; + return ( hasRight &&
this.reRenderColumns(c)} onOperatesClick={(record, index, operate) => this.onOperatesClick(record, index, operate)} - tableWidth={width} + tableWidth={this.getTableWidth} /> diff --git a/pc4mobx/organization/stores/resource.js b/pc4mobx/organization/stores/resource.js index 900d98a..36f4c01 100644 --- a/pc4mobx/organization/stores/resource.js +++ b/pc4mobx/organization/stores/resource.js @@ -600,6 +600,7 @@ export class ResourceStore { this.customTemplateId = res.data.templateId; } bool ? this.setTemplates(res.data.templates) : this.setCustomTemplates(res.data.templates); + this.getCustomTransferData(); } else { message.warning(res.msg); } @@ -727,7 +728,6 @@ export class ResourceStore { this.search = bool; this.searchDialog.loading = true; this.getSearchTemplate(bool); - this.getCustomTransferData(); } diff --git a/pc4mobx/organization/style/common.less b/pc4mobx/organization/style/common.less index 2c61578..45d2642 100644 --- a/pc4mobx/organization/style/common.less +++ b/pc4mobx/organization/style/common.less @@ -28,7 +28,8 @@ margin-top: 10px; } -.wea-left-right-layout-right { +//分部 部门 岗位 +.organization-scrollable-table .wea-left-right-layout-right{ overflow: scroll !important; }