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;
}
From 841021361eee554661143387be044b5f5a6e2912 Mon Sep 17 00:00:00 2001
From: Chengliang <1546584672@qq.com>
Date: Fri, 12 Jul 2024 13:25:53 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E6=A0=87?=
=?UTF-8?q?=E7=AD=BE=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/organization/public/i18n.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js
index 68c202c..40dc6a3 100644
--- a/pc4mobx/organization/public/i18n.js
+++ b/pc4mobx/organization/public/i18n.js
@@ -12,7 +12,6 @@ export const i18n = {
subCompanyFieldDef: () => getLabel(81876, '分部字段定义'),
departmentFieldDef: () => getLabel(81877, '部门字段定义'),
resourceFieldDef: () => getLabel(81878, '人员卡片字段定义'),
- jobFieldDef: () => getLabel(81878, '岗位字段定义'),
roleSetting: () => getLabel(16527, '角色设置'),
batchMaintenance: () => getLabel(33923, '批量维护'),
batchAdjustSubCompany: () => getLabel(385879, '批量调整分部信息'),
@@ -108,6 +107,8 @@ export const i18n = {
unitSetting: () => getLabel(16511, '单位设置'),
recruitLibrary: () => getLabel(16251, '应聘库'),
loginFailLog: () => getLabel('391172', "人员登入失败日志"),
+
+ jobFieldDef: () => getLabel(547353, '岗位字段定义'),
},
label: {
//新增
From 6034b5d16f1535e895fe555f22a40f91089666b7 Mon Sep 17 00:00:00 2001
From: Chengliang <1546584672@qq.com>
Date: Mon, 15 Jul 2024 16:59:03 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E8=8A=B1=E5=90=8D=E5=86=8C=E5=88=97?=
=?UTF-8?q?=E5=AE=9A=E5=88=B6=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/resource/resource.js | 34 +++++++++----------
pc4mobx/organization/stores/resource.js | 22 ++++++------
2 files changed, 29 insertions(+), 27 deletions(-)
diff --git a/pc4mobx/organization/components/resource/resource.js b/pc4mobx/organization/components/resource/resource.js
index 3c2d483..387f10c 100644
--- a/pc4mobx/organization/components/resource/resource.js
+++ b/pc4mobx/organization/components/resource/resource.js
@@ -441,23 +441,8 @@ export default class Resource extends React.Component {
isFormInit
} = form2;
-
- arr.push(
- {getLabel(547655,'模板选择')}
-
- {
- resource.changeSearchTemplate(v)
- }}
- />
-
-
-
)
-
- isFormInit && defaultCondition.map((c, i) => {
+
+ isFormInit && templates.length > 0 && defaultCondition.map((c, i) => {
let _arr = [];
c.items.map((field, index) => {
_arr.push({
@@ -471,6 +456,21 @@ export default class Resource extends React.Component {
),
})
})
+ arr.push(
+ {getLabel(547655,'模板选择')}
+
+ {
+ resource.changeSearchTemplate(v)
+ }}
+ />
+
+
+
)
+
arr.push()
})
diff --git a/pc4mobx/organization/stores/resource.js b/pc4mobx/organization/stores/resource.js
index 36f4c01..880c63d 100644
--- a/pc4mobx/organization/stores/resource.js
+++ b/pc4mobx/organization/stores/resource.js
@@ -290,7 +290,7 @@ export class ResourceStore {
@observable templates = [];
@observable customTemplates = [];
@observable searchTemplateName = '';
- @observable searchTemplateId = '-1';
+ @observable searchTemplateId = "-1";
@observable customTemplateName = '';
@observable customTemplateId = '-1';
@@ -436,6 +436,7 @@ export class ResourceStore {
}).then(data => {
if (data.code === 200) {
this.searchTemplateId = data.data;
+ this.templates = [];
this.setPanelStatus(true);
} else {
message.warning(data.msg);
@@ -460,7 +461,7 @@ export class ResourceStore {
}).then(data => {
if (data.code === 200) {
this.customTemplateId = data.data;
- this.getSearchTemplate(false);
+ // this.getSearchTemplate(false);
this.customization();
message.success(data.msg);
} else {
@@ -484,6 +485,7 @@ export class ResourceStore {
if (data.code === 200) {
message.success(data.msg);
this.searchTemplateId = '-1';
+ this.templates = [];
this.setPanelStatus(true);
} else {
message.warning(data.msg);
@@ -594,13 +596,11 @@ export class ResourceStore {
}
@action("模板") getSearchTemplate = (bool) => {
- Api.getSearchTemplate({ type: bool ? 'search' : 'custom' }).then(res => {
+
+ Api.getSearchTemplate({ type: bool ? 'search' : 'custom',id: bool ? this.searchTemplateId : this.customTemplateId}).then(res => {
if (res.code === 200) {
- if (res.data.templateId) {
- this.customTemplateId = res.data.templateId;
- }
bool ? this.setTemplates(res.data.templates) : this.setCustomTemplates(res.data.templates);
- this.getCustomTransferData();
+
} else {
message.warning(res.msg);
}
@@ -669,6 +669,8 @@ export class ResourceStore {
let { code, msg } = res;
if (code === 200) {
message.success(msg || getLabel(30700,'操作成功'));
+ //返回默认模板
+ this.customTemplateId = '-1';
this.getEditTable();
this.customization();
} else {
@@ -728,7 +730,7 @@ export class ResourceStore {
this.search = bool;
this.searchDialog.loading = true;
this.getSearchTemplate(bool);
-
+ this.getCustomTransferData();
}
@action closeSearchDialog = () => {
@@ -784,11 +786,11 @@ export class ResourceStore {
this.defaultCondition = defaultcondition;
}
- setTemplates(datas) {
+ @action setTemplates(datas) {
this.templates = datas;
}
- setCustomTemplates(datas) {
+ @action setCustomTemplates(datas) {
this.customTemplates = datas;
}