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; }