From ce2030983b014a163c1ef7ec348087511472eb72 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Tue, 11 Jun 2024 18:55:29 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/components/ImportDialog.js | 8 +- .../components/company/company.js | 13 +- .../components/department/NewPopconfirm.js | 21 ++- .../components/department/department.js | 21 +-- .../components/fieldDefinedSet/QtxConfig.js | 16 +- .../components/fieldDefinedSet/QuickSearch.js | 12 +- .../fieldDefinedSet/QuickSearchDetail.js | 4 +- .../organization/components/log/LogView.js | 6 +- .../components/newImport/index.js | 2 +- .../components/newImport/stepDialog.js | 4 +- .../components/postionrank/JobGrade.js | 2 +- .../components/postionrank/JobLevel.js | 2 +- .../components/resource/PersonnelResume.js | 2 + .../components/resource/resource.js | 4 +- pc4mobx/organization/index.js | 1 + pc4mobx/organization/public/i18n.js | 150 +++++++++++------- pc4mobx/organization/stores/department.js | 2 +- pc4mobx/organization/stores/importDialog.js | 8 +- pc4mobx/organization/stores/resource.js | 12 +- pc4mobx/organization/style/common.less | 3 + 20 files changed, 178 insertions(+), 115 deletions(-) diff --git a/pc4mobx/organization/components/ImportDialog.js b/pc4mobx/organization/components/ImportDialog.js index e233189..5b7022a 100644 --- a/pc4mobx/organization/components/ImportDialog.js +++ b/pc4mobx/organization/components/ImportDialog.js @@ -43,7 +43,7 @@ export default class ImportDialog extends React.Component { this.state = { width: 800, height: 600, - title: '数据导入', + title: i18n.label.dataImport(), } } @@ -194,8 +194,8 @@ export default class ImportDialog extends React.Component {

-

点击或将文件拖拽到此区域上传

-

支持单个或批量上传,严禁上传公司内部资料及其他违禁文件

+

{i18n.label.importTip1()}

+

{i18n.label.importTip2()}

{this.getForm()} @@ -221,7 +221,7 @@ export default class ImportDialog extends React.Component { /> } importDialog.pvisable = false} visible={pvisable} style={{ width: 300, height: 50 }} diff --git a/pc4mobx/organization/components/company/company.js b/pc4mobx/organization/components/company/company.js index b4c7e35..2c19e5b 100644 --- a/pc4mobx/organization/components/company/company.js +++ b/pc4mobx/organization/components/company/company.js @@ -154,6 +154,7 @@ export default class Company extends React.Component { company } = this.props; confirm({ + width: '500px', title: i18n.confirm.defaultTitle(), content: this.getTransferForm(), okText: i18n.button.ok(), @@ -163,7 +164,7 @@ export default class Company extends React.Component { }, onCancel() { return false; - }, + } }); } @@ -350,22 +351,22 @@ export default class Company extends React.Component { { _this.doDel(record.id) - }}>删除 + }}>{i18n.button.delete()} { _this.select(record.id) - }}>联查部门 + }}>{i18n.button.joinDept()} { _this.view(record.id) - }}>查看 + }}>{i18n.button.view()} { _this.transfer(record.id) - }}>转移 + }}>{i18n.button.transfer()} {/* { _this.version(record) }}>另存为版本 @@ -541,7 +542,7 @@ export default class Company extends React.Component { onChange(current) { }, showTotal(total) { - return `共 ${total} 条` + return `${i18n.label.total()} ${total} ${i18n.label.items()}` } }; diff --git a/pc4mobx/organization/components/department/NewPopconfirm.js b/pc4mobx/organization/components/department/NewPopconfirm.js index 57e7887..e7e0192 100644 --- a/pc4mobx/organization/components/department/NewPopconfirm.js +++ b/pc4mobx/organization/components/department/NewPopconfirm.js @@ -98,12 +98,12 @@ export default class NewPopconfirm extends React.Component { const a = form.getFormParams(); const buttons = [ (), - () - ]; + save();this.setState({value:form.getFormParams().moveType}) + }} disabled={loading}>{i18n.button.ok()}), + () + ]; return ( { -this.setState({value:"0"});onCancel() -}} + this.setState({value:"0"});onCancel() + }} buttons={buttons} - style={{ width: width, height: height }} + style={{ width: width, height: height}} > { loading ?
- : this.getForm() + :
{this.getForm()}
}
) diff --git a/pc4mobx/organization/components/department/department.js b/pc4mobx/organization/components/department/department.js index 8d4f201..c047f96 100644 --- a/pc4mobx/organization/components/department/department.js +++ b/pc4mobx/organization/components/department/department.js @@ -198,12 +198,13 @@ export default class Department extends React.Component { let keys = id == undefined ? toJS(selectedRowKeys).toString() : id; department.setIds(keys); confirm({ + width:'550px', title: i18n.confirm.defaultTitle(), content: this.getCopyForm(), okText: i18n.button.ok(), cancelText: i18n.button.cancel(), onOk() { - department.copy() + department.copy(); }, onCancel() { return false; @@ -396,32 +397,32 @@ export default class Department extends React.Component { { _this.view(record.id) - }}>查看 + }}>{i18n.button.view()} { _this.doDel(record.id) - }}>删除 + }}>{i18n.button.delete()} { _this.merge(record.id) - }}>合并 + }}>{i18n.button.merge()} { _this.transfer(record.id) - }}>转移 + }}>{i18n.button.transfer()} { _this.select(record.id) - }}>联查岗位 + }}>{i18n.button.associateJob()} { _this.copy(record.id) - }}>复制 + }}>{i18n.button.copy()} {/* { _this.version(record) }}>另存为版本 @@ -653,7 +654,7 @@ export default class Department extends React.Component { onChange(current) { }, showTotal(total) { - return `共 ${total} 条` + return `${i18n.label.total()} ${total} ${i18n.label.items()}` } }; @@ -748,8 +749,8 @@ export default class Department extends React.Component { form={form1} isFormInit={form1.isFormInit} loading={confirmLoading} - height={100} - width={320} + height={150} + width={650} isMerge={isMerge} defaultValue={"0"} save={() => this.PopconfirmSave()} diff --git a/pc4mobx/organization/components/fieldDefinedSet/QtxConfig.js b/pc4mobx/organization/components/fieldDefinedSet/QtxConfig.js index 42ffc21..6d0fd3e 100644 --- a/pc4mobx/organization/components/fieldDefinedSet/QtxConfig.js +++ b/pc4mobx/organization/components/fieldDefinedSet/QtxConfig.js @@ -81,7 +81,9 @@ export default class QtxConfig extends React.Component { let btns = []; topMenu.map((item, i) => { - btns.push(); + btns.push(); }); return btns; } @@ -139,7 +141,9 @@ export default class QtxConfig extends React.Component {
{ this[key] && this[key]() }} + onClick={key => { + this[key] && this[key]() +}} > { this[key] && this[key]() }} + onDropMenuClick={(key) => { + this[key] && this[key]() +}} > @@ -158,7 +164,9 @@ export default class QtxConfig extends React.Component { {this.tableEdit = el}} + ref={el => { +this.tableEdit = el +}} draggable deleteConfirm showCopy={false} diff --git a/pc4mobx/organization/components/fieldDefinedSet/QuickSearch.js b/pc4mobx/organization/components/fieldDefinedSet/QuickSearch.js index 3f01cf5..bde49fd 100644 --- a/pc4mobx/organization/components/fieldDefinedSet/QuickSearch.js +++ b/pc4mobx/organization/components/fieldDefinedSet/QuickSearch.js @@ -83,7 +83,9 @@ export default class QuickSearch extends React.Component { let btns = []; topMenu.map((item, i) => { - btns.push(); + btns.push(); }); return btns; } @@ -221,7 +223,9 @@ export default class QuickSearch extends React.Component {
{this[key] && this[key]()}} + onClick={key => { +this[key] && this[key]() +}} > {this[key] && this[key]()}} + onDropMenuClick={(key) => { +this[key] && this[key]() +}} > diff --git a/pc4mobx/organization/components/fieldDefinedSet/QuickSearchDetail.js b/pc4mobx/organization/components/fieldDefinedSet/QuickSearchDetail.js index b98697e..c658a1b 100644 --- a/pc4mobx/organization/components/fieldDefinedSet/QuickSearchDetail.js +++ b/pc4mobx/organization/components/fieldDefinedSet/QuickSearchDetail.js @@ -117,7 +117,9 @@ export default class QuickSearchDetail extends React.Component { const Height = $(".wea-dialog-body")[0] && $(".wea-dialog-body")[0].style.height; const buttons = [ , - + ] return ( { _this.doView(record) -}}>查看 +}}>{i18n.label.view()} } }; }) @@ -212,7 +212,7 @@ export default class LogView extends React.Component {
{/* */} -
原始参数查看
+
{i18n.label.voParameters()}
diff --git a/pc4mobx/organization/components/newImport/index.js b/pc4mobx/organization/components/newImport/index.js index 13dfd72..ade6391 100644 --- a/pc4mobx/organization/components/newImport/index.js +++ b/pc4mobx/organization/components/newImport/index.js @@ -31,7 +31,7 @@ export default class newImport extends React.Component { constructor(props) { super(props); this.state = ({ - title: '数据导入', + title: i18n.label.dataImport(), }) } diff --git a/pc4mobx/organization/components/newImport/stepDialog.js b/pc4mobx/organization/components/newImport/stepDialog.js index f006cf4..a7e20bc 100644 --- a/pc4mobx/organization/components/newImport/stepDialog.js +++ b/pc4mobx/organization/components/newImport/stepDialog.js @@ -36,7 +36,7 @@ export default class StepDialog extends React.Component { this.state = { width: 800, height: 600, - title: '数据导入', + title: i18n.label.dataImport(), } } @@ -74,7 +74,7 @@ export default class StepDialog extends React.Component { } = this.state; const buttons = [ ((current === 0 || current === steps.length - 1) ? '' : ), - (), + (), ]; return ( diff --git a/pc4mobx/organization/components/postionrank/JobGrade.js b/pc4mobx/organization/components/postionrank/JobGrade.js index 996009c..456ba39 100644 --- a/pc4mobx/organization/components/postionrank/JobGrade.js +++ b/pc4mobx/organization/components/postionrank/JobGrade.js @@ -401,7 +401,7 @@ export default class JobGrade extends React.Component { const treeCom = ( hasRight && {store.hideRadioGroup();store.getTableInfo();}} + onSearch={() => { +store.hideRadioGroup();store.getTableInfo(); +}} onSearchChange={val => this.onSearchChange(val)} /> diff --git a/pc4mobx/organization/index.js b/pc4mobx/organization/index.js index f0eb2f7..05c7669 100644 --- a/pc4mobx/organization/index.js +++ b/pc4mobx/organization/index.js @@ -2,6 +2,7 @@ import React from "react"; import Route from "react-router/lib/Route"; import { message } from "antd"; import { WeaLocaleProvider } from "ecCom"; +import { Provider } from 'mobx-react'; import Home from "./components/Home"; import RankScheme from "./components/postionrank/RankScheme"; import JobLevel from "./components/postionrank/JobLevel"; diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js index e721341..c0910fd 100644 --- a/pc4mobx/organization/public/i18n.js +++ b/pc4mobx/organization/public/i18n.js @@ -2,7 +2,7 @@ import { WeaLocaleProvider } from 'ecCom'; const getLabel = WeaLocaleProvider.getLabel; -//gai + export const i18n = { module: { elseSetting: () => getLabel(20824, '其他设置'), @@ -123,55 +123,74 @@ export const i18n = { sequenceName: () => getLabel(547147, '岗位序列'), newSequence: () => getLabel(547148, '新建岗位序列'), editSequence: () => getLabel(547149, '编辑岗位序列'), - groupInfo: () => getLabel(385936, '总部'), - editGroup: () => getLabel(386247, '编辑总部'), - officeName: () => getLabel(385936, '职务管理'), + groupInfo: () => getLabel(547169, '总部'), + editGroup: () => getLabel(547170, '编辑总部'), + + //页面未使用 + officeName: () => getLabel(547527, '职务管理'), newOfficeName: () => getLabel(386246, '新建职务信息'), editOfficeName: () => getLabel(386247, '编辑职务信息'), newOfficeClassifyName: () => getLabel(386246, '新建职务分类'), editOfficeClassifyName: () => getLabel(386246, '编辑职务分类'), - branchNumSetting: () => getLabel(386246, '分部编号设置'), - deptNumSetting: () => getLabel(386246, '部门编号设置'), - postNumSetting: () => getLabel(386246, '岗位编号设置'), - userNumSetting: () => getLabel(386246, '人员编号设置'), - companyName: () => getLabel(385937, '分部'), - newCompany: () => getLabel(385937, '新增分部'), - viewCompany: () => getLabel(385937, '分部信息'), - updateCompany: () => getLabel(385937, '修改分部信息'), - staffSchemeName: () => getLabel(385936, '编制方案'), - newStaffScheme: () => getLabel(386246, '新建编制方案'), - ediStaffScheme: () => getLabel(386247, '编辑编制方案'), - staffName: () => getLabel(385936, '编制上报'), - newStaff: () => getLabel(386246, '新建编制'), - editStaff: () => getLabel(386247, '编辑编制'), - changeStaff: () => getLabel(386247, '编制变更'), - jobName: () => getLabel(385936, '岗位'), - newJob: () => getLabel(386246, '新增岗位'), - editJobInfo: () => getLabel(386247, '修改岗位信息'), - jobsInfo: () => getLabel(386247, '岗位信息'), + + branchNumSetting: () => getLabel(538759, '分部编号设置'), + deptNumSetting: () => getLabel(538762, '部门编号设置'), + postNumSetting: () => getLabel(538763, '岗位编号设置'), + userNumSetting: () => getLabel(538764, '人员编号设置'), + companyName: () => getLabel(547178, '分部管理'), + newCompany: () => getLabel(547179, '新增分部'), + viewCompany: () => getLabel(547180, '分部信息'), + updateCompany: () => getLabel(547527, '修改分部信息'), + staffSchemeName: () => getLabel(547459, '编制方案'), + newStaffScheme: () => getLabel(547528, '新建编制方案'), + ediStaffScheme: () => getLabel(547529, '编辑编制方案'), + staffName: () => getLabel(547342, '编制上报'), + newStaff: () => getLabel(547530, '新建编制信息'), + editStaff: () => getLabel(547531, '编辑编制信息'), + changeStaff: () => getLabel(547532, '编制信息变更'), + jobName: () => getLabel(547198, '岗位管理'), + newJob: () => getLabel(547199, '新增岗位'), + editJobInfo: () => getLabel(547200, '修改岗位信息'), + jobsInfo: () => getLabel(547201, '岗位信息'), deptManage: () => getLabel(547116, '部门管理'), - newDept: () => getLabel(386246, '新增部门'), - mergeDept:()=> getLabel(386246, '合并部门'), - transferDept:()=> getLabel(386246, '转移部门'), - selectDept:()=> getLabel(386246, '联查部门'), - editDept:()=> getLabel(386246, '修改部门信息'), - typeName: () => getLabel(129927, '类型名称'), - ResourceName: () => getLabel(385936, '人员'), - newPeople: () => getLabel(386246, '新建人员'), - resourceMange: () => getLabel(386246, '花名册'), - resourceBasicInfo: () => getLabel(386246, '人员信息'), - newResourceBasicInfo: () => getLabel(386246, '新建人员资料'), - newResourceBasicType: () => getLabel(386246, '新建人员资料类型'), - editResourceBasicInfo: () => getLabel(386246, '编辑人员资料'), - editResourceBasicType: () => getLabel(386246, '编辑人员资料类型'), - forbidden: () => getLabel(531114, '已封存'), - mangerDetachName: () => getLabel(385936, '模块管理分权'), - newManagerDetach: () => getLabel(386246, '新建模块管理分权'), - editManagerDetach: () => getLabel(386247, '编辑模块管理分权'), - columnPermission:() => getLabel(386247, '栏目权限管理'), - columnCustom:() => getLabel(386247, '栏目功能定义'), - cardColumnSet:() => getLabel(386247, '人员卡片栏目设置'), - personnelResume:() => getLabel(386247, '人员简历'), + newDept: () => getLabel(547533, '新增部门'), + mergeDept:()=> getLabel(547534, '合并部门'), + transferDept:()=> getLabel(547535, '转移部门'), + selectDept:()=> getLabel(547536, '联查部门'), + editDept:()=> getLabel(547537, '修改部门信息'), + typeName: () => getLabel(547372, '类型名称'), + ResourceName: () => getLabel(547205, '人员'), + newPeople: () => getLabel(547443, '新建人员'), + resourceMange: () => getLabel(547538, '花名册'), + resourceBasicInfo: () => getLabel(547539, '人员信息'), + newResourceBasicInfo: () => getLabel(547540, '新建人员资料'), + newResourceBasicType: () => getLabel(547541, '新建人员资料类型'), + editResourceBasicInfo: () => getLabel(547542, '编辑人员资料'), + editResourceBasicType: () => getLabel(547543, '编辑人员资料类型'), + forbidden: () => getLabel(547489, '已封存'), + mangerDetachName: () => getLabel(547402, '模块管理分权'), + newManagerDetach: () => getLabel(547404, '新建模块管理分权'), + editManagerDetach: () => getLabel(547544, '编辑模块管理分权'), + columnPermission:() => getLabel(547384, '栏目权限管理'), + columnCustom:() => getLabel(547385, '栏目功能定义'), + cardColumnSet:() => getLabel(547381, '人员卡片栏目设置'), + personnelResume:() => getLabel(547238, '人员简历'), + logView:() => getLabel(547576, '日志查看'), + view:() => getLabel(547490, '查看'), + voParameters:() => getLabel(547577, '原始参数查看'), + dataImport:() => getLabel(547215, '数据导入'), + importResult:() => getLabel(547221, '导入结果'), + startImport:() => getLabel(547583, '开始导入'), + importProgress:() => getLabel(547222, '导入进度'), + previousStep:() => getLabel(547218, '上一步'), + uploadFiles:() => getLabel(547227, '上传文件'), + importTip1:() => getLabel(547229, '点击或将文件拖拽到此区域上传'), + importTip2:() => getLabel(547230, '支持单个或批量上传,严禁上传公司内部资料及其他违禁文件'), + total:() => getLabel(547523, '共'), + items:() => getLabel(547524, '条'), + + + authorizationGroup: () => getLabel(492, '权限组'), allAuthorization: () => getLabel(33363, '全部权限'), @@ -655,7 +674,7 @@ export const i18n = { duties: () => getLabel(15855, "所属职务"), postAbbreviation: () => getLabel(382413, "岗位简称"), viewRefs: () => getLabel('33364', "查看引用"), - view: () => getLabel('33564', "查看"), + addRoleRefs: () => getLabel('387114', "添加角色引用"), multiDeleteRefs: () => getLabel('387113', "批量删除引用"), newSysadmin: () => getLabel(387059, '新建管理员'), @@ -868,13 +887,23 @@ export const i18n = { '531692': () => getLabel('531692', '说明:总部节点的人员编号设置主要用于新建分部时将总部的编号设置自动复制给新分部,不用于全局的开关控制,实际根据各分部的开关独立控制。'), }, button: { - back: () => getLabel(1290, '返回'), - createType: () => getLabel(30131, '新建类型'), - editTypeInfo: () => getLabel(32732, '编辑类型'), - nextStep:() => getLabel(30131, '下一步'), - version:() => getLabel(30131, '查看历史版本'), - saveTemplate:() => getLabel(30131, '存为模板'), - conditionSet:() => getLabel(30131, '常用条件定制'), + back: () => getLabel(547545, '返回'), + createType: () => getLabel(547367, '新建类型'), + editTypeInfo: () => getLabel(547369, '编辑类型'), + nextStep:() => getLabel(547219, '下一步'), + version:() => getLabel(547546, '查看历史版本'), + saveTemplate:() => getLabel(547548, '存为模板'), + conditionSet:() => getLabel(547549, '常用条件定制'), + delete: () => getLabel(547492, '删除'), + joinDept: () => getLabel(547536, '联查部门'), + view: () => getLabel(547490, '查看'), + transfer: () => getLabel(547594, '转移'), + merge: () => getLabel(547194, '合并'), + associateJob: () => getLabel(547496, '联查岗位'), + copy:() => getLabel(547196, '复制'), + + + batchOpen: () => getLabel(534249, '批量解锁'), collect: () => getLabel(28111, '收藏'), @@ -886,9 +915,7 @@ export const i18n = { cancel: () => getLabel(32694, '取消'), create: () => getLabel(365, '新建'), remove: () => getLabel(20230, '移除'), - delete: () => getLabel(131966, '删除'), modify: () => getLabel(93, '编辑'), - transfer: () => getLabel(80, '转移'), multiRemove: () => getLabel(383696, '批量移除'), multiDelete: () => getLabel(32136, '批量删除'), save: () => getLabel(30986, '保存'), @@ -901,7 +928,6 @@ export const i18n = { childInfoMaintain: () => getLabel(384280, '子信息维护'), editChildInfo: () => getLabel(32732, '编辑子信息'), add: () => getLabel(131201, '添加'), - copy: () => getLabel(77, '复制'), log: () => getLabel(83, '日志'), replace: () => getLabel(84563, '替换'), columnVisibleSetting: () => getLabel(32535, '显示列定制'), @@ -969,9 +995,9 @@ export const i18n = { deleteImg: () => getLabel('16075', "删除图片") }, confirm: { - forbiddenTag: () => getLabel(-131329, '确定禁用该记录吗'), - enableTag: () => getLabel(-131328, '确定启用该记录吗'), - recoverConfirm: () => getLabel(-131310, '确定恢复该记录吗'), + forbiddenTag: () => getLabel(547193, '确定禁用该记录吗'), + enableTag: () => getLabel(547550, '确定启用该记录吗'), + recoverConfirm: () => getLabel(547551, '确定恢复该记录吗'), defaultTitle: () => getLabel(131329, '信息确认'), removeGroupInfo: () => getLabel(383053, '删除分组,该分组下的字段将显示到“基本信息”分组中,确定要删除吗?'), @@ -1025,6 +1051,12 @@ export const i18n = { moveFieldConfirm: () => getLabel('388100', "确定要移动所选择的记录到分组{params}吗?") }, message: { + + checkFile: () => getLabel(547587, '请上传需要导入的文件!'), + checkFileContent: () => getLabel(547588, '文件导入失败,请检查Excel文件内容是否正确!'), + checkCopyDept: () => getLabel(547263, '请指定需要复制的公司/分部'), + + authFailed: () => getLabel(2012, '对不起,您暂时没有权限!'), actionError: () => getLabel(132200, '操作失败!'), opSuccess: () => getLabel(30700, '操作成功'), diff --git a/pc4mobx/organization/stores/department.js b/pc4mobx/organization/stores/department.js index 42a47fc..0558908 100644 --- a/pc4mobx/organization/stores/department.js +++ b/pc4mobx/organization/stores/department.js @@ -42,7 +42,7 @@ export class DepartmentStore { @observable copyCondition = []; @observable isPanelShow = false; //高级搜索面板 @observable form = new WeaForm(); - @observable form1 = new WeaForm(); //新增主表表单 + @observable form1 = new WeaForm(); //合并 转移 @observable form2 = new WeaForm(); //复制表单 @observable departmentName = ''; @observable conditionNum = 4; diff --git a/pc4mobx/organization/stores/importDialog.js b/pc4mobx/organization/stores/importDialog.js index 210967c..8765b6f 100644 --- a/pc4mobx/organization/stores/importDialog.js +++ b/pc4mobx/organization/stores/importDialog.js @@ -48,8 +48,8 @@ import { /********************* importDialog *********************/ steps = [ - { title: '上传文件'}, - { title: '导入结果' } + { title: i18n.label.uploadFiles()}, + { title: i18n.label.importResult() } ]; @observable importType = ''; @@ -96,7 +96,7 @@ import { @action("开始导入") startImport() { if(this.filelist.length == 0) { - message.error("请上传需要导入的文件!") + message.error(`${i18n.message.checkFile()}`) this.current = this.current - 1; return; } @@ -123,7 +123,7 @@ import { }else { clearInterval(this.interval); this.pvisable = false; - message.error("文件导入失败") + message.error(`${i18n.message.checkFileContent()}`) } }) } diff --git a/pc4mobx/organization/stores/resource.js b/pc4mobx/organization/stores/resource.js index 918f73c..d86a32b 100644 --- a/pc4mobx/organization/stores/resource.js +++ b/pc4mobx/organization/stores/resource.js @@ -62,7 +62,9 @@ export class ResourceStore { @observable enable = false; @observable _showRadioGroup = false; - @computed get showRadioGroup() { return this._showRadioGroup } + @computed get showRadioGroup() { + return this._showRadioGroup +} set showRadioGroup(v) { this._showRadioGroup = v; setTimeout(() => { @@ -72,8 +74,12 @@ export class ResourceStore { domRef = {}; @observable _reCalculateTableHeight = new Date().getTime(); - @computed get reCalculateTableHeight() { return this._reCalculateTableHeight } - set reCalculateTableHeight(v) { this._reCalculateTableHeight = v } + @computed get reCalculateTableHeight() { + return this._reCalculateTableHeight +} + set reCalculateTableHeight(v) { + this._reCalculateTableHeight = v +} @computed get tableHeihgt() { this.reCalculateTableHeight; const topHeight = this.domRef.top && this.domRef.top.refs.content ? this.domRef.top.refs.content.clientHeight : 0; diff --git a/pc4mobx/organization/style/common.less b/pc4mobx/organization/style/common.less index ec578eb..2c61578 100644 --- a/pc4mobx/organization/style/common.less +++ b/pc4mobx/organization/style/common.less @@ -88,6 +88,9 @@ .new-edit-wrapper{ .wea-select, .ant-select{ width: 100%; + }; + .wea-new-scroll { + padding-bottom: 30px; } } From 6a648fe177c6bd845fc6fc989c99792e70d229f2 Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Thu, 13 Jun 2024 11:40:45 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../organization/components/ImportDialog.js | 10 +++++---- .../components/columnSetting/index.js | 11 ++++++---- .../components/detach/ManagerDetach.js | 4 ++-- .../components/fieldDefinedSet/QtxConfig.js | 16 +++++++------- .../components/fieldDefinedSet/QuickSearch.js | 20 ++++++++--------- .../fieldDefinedSet/QuickSearchDetail.js | 8 +++---- .../fieldDefinedSet/QuickSearchTableEdit.js | 16 +++++++------- pc4mobx/organization/components/job/Job.js | 9 ++++---- .../organization/components/log/LogView.js | 5 ++--- .../components/resource/resource.js | 6 ++--- pc4mobx/organization/public/i18n.js | 15 ++++++++++--- pc4mobx/organization/stores/columnSetting.js | 15 +++++++------ pc4mobx/organization/stores/importDialog.js | 6 ++--- pc4mobx/organization/stores/qtxConfig.js | 18 +++++++-------- pc4mobx/organization/stores/quickSearch.js | 22 ++++++------------- 15 files changed, 94 insertions(+), 87 deletions(-) diff --git a/pc4mobx/organization/components/ImportDialog.js b/pc4mobx/organization/components/ImportDialog.js index 5b7022a..047958b 100644 --- a/pc4mobx/organization/components/ImportDialog.js +++ b/pc4mobx/organization/components/ImportDialog.js @@ -2,7 +2,8 @@ import { WeaNewScroll, WeaSearchGroup, WeaMoreButton, - WeaDialog + WeaDialog, + WeaLocaleProvider } from 'ecCom' import { inject, @@ -33,6 +34,7 @@ import { addContentPath } from '../util/index.js' const Step = Steps.Step; const Dragger = Upload.Dragger; const WeaTable = WeaTableNew.WeaTable; +const getLabel = WeaLocaleProvider.getLabel; @inject("importDialog") @@ -150,7 +152,7 @@ export default class ImportDialog extends React.Component { } = this.state; const buttons = [ - (), + (), ]; @@ -176,7 +178,7 @@ export default class ImportDialog extends React.Component { >
- {steps.map((s, i) => )} + {steps.map((s, i) => )}
@@ -221,7 +223,7 @@ export default class ImportDialog extends React.Component { /> } importDialog.pvisable = false} visible={pvisable} style={{ width: 300, height: 50 }} diff --git a/pc4mobx/organization/components/columnSetting/index.js b/pc4mobx/organization/components/columnSetting/index.js index 632b8c3..d70b39e 100644 --- a/pc4mobx/organization/components/columnSetting/index.js +++ b/pc4mobx/organization/components/columnSetting/index.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { WeaRightMenu, WeaTab, WeaTop } from "ecCom"; +import { WeaRightMenu, WeaTab, WeaTop,WeaLocaleProvider } from "ecCom"; import { inject, observer } from "mobx-react"; import { Button } from "antd"; import PermissionItem from "./permissionItem"; @@ -8,6 +8,9 @@ import CustomItem from "./customItem"; import { i18n } from "../../public/i18n"; import { renderNoright } from "../../util"; +const getLabel = WeaLocaleProvider.getLabel; + + @inject("columnSetting") @observer class ColumnSetting extends Component { @@ -22,7 +25,7 @@ class ColumnSetting extends Component { getTopMenuBtns = () => { return [ - + ]; }; getDropMenuDatas = () => { @@ -30,7 +33,7 @@ class ColumnSetting extends Component { { key: "save", icon: , - content: "保存" + content: getLabel('547360', "保存") } ]; }; @@ -68,7 +71,7 @@ class ColumnSetting extends Component { datas={[{ key: "save", icon: , - content: "保存" + content: getLabel('547360', "保存") }]} onClick={key => (key && this[key]())} > diff --git a/pc4mobx/organization/components/detach/ManagerDetach.js b/pc4mobx/organization/components/detach/ManagerDetach.js index d2fd98b..bca09d9 100644 --- a/pc4mobx/organization/components/detach/ManagerDetach.js +++ b/pc4mobx/organization/components/detach/ManagerDetach.js @@ -245,7 +245,7 @@ export default class ManagerDetach extends React.Component { } = this.props; confirm({ title: i18n.confirm.defaultTitle(), - content: (checked == true) ? "确定启用组织管理分权吗" : "确定取消组织管理分权", + content: (checked == true) ? `${i18n.message.checkOnDetach()}` : `${i18n.message.checkOffDetach()}`, okText: i18n.button.ok(), cancelText: i18n.button.cancel(), onOk() { @@ -387,7 +387,7 @@ export default class ManagerDetach extends React.Component { onClick={key => this.handleMenuClick(key)} >
- 启用组织管理分权: + {i18n.label.enableDetach()}: this.doDetachSwitch(checked)} />
, - content: item.menuName, + content: item.menuFun == 'save' ? getLabel('547360', "保存") : getLabel('547396', "单点登录"), } menus.push(obj); }) @@ -83,7 +83,7 @@ export default class QtxConfig extends React.Component { topMenu.map((item, i) => { btns.push(); +}}>{item.menuFun == 'save' ? getLabel('547360', "保存") : getLabel('547396', "单点登录")}); }); return btns; } @@ -113,14 +113,14 @@ export default class QtxConfig extends React.Component { arr.push(
{} {} + title={getLabel(547634, "未启用的情况下,企通学配置信息将从qtx_sso_login.properties配置文件中读取")} />}
) @@ -146,7 +146,7 @@ export default class QtxConfig extends React.Component { }} > } iconBgcolor='#217346' loading={true} @@ -161,12 +161,12 @@ export default class QtxConfig extends React.Component { {this.getFormItems()} - + { -this.tableEdit = el -}} + this.tableEdit = el + }} draggable deleteConfirm showCopy={false} diff --git a/pc4mobx/organization/components/fieldDefinedSet/QuickSearch.js b/pc4mobx/organization/components/fieldDefinedSet/QuickSearch.js index bde49fd..c416adb 100644 --- a/pc4mobx/organization/components/fieldDefinedSet/QuickSearch.js +++ b/pc4mobx/organization/components/fieldDefinedSet/QuickSearch.js @@ -67,7 +67,7 @@ export default class QuickSearch extends React.Component { let obj = { key: item.menuFun, icon: , - content: item.menuName, + content: getLabel('547360', "保存"), } menus.push(obj); }) @@ -85,7 +85,7 @@ export default class QuickSearch extends React.Component { topMenu.map((item, i) => { btns.push(); +}}>{getLabel('547360', "保存")}); }); return btns; } @@ -108,7 +108,7 @@ this[item.menuFun] && this[item.menuFun](); arr.push(
{} @@ -136,7 +136,7 @@ this[item.menuFun] && this[item.menuFun](); let { quickSearchData } = quickSearch; let datas = quickSearchData.datas; if(datas.length>=8){ - message.error(getLabel('387795',"最多只能添加8项")); + message.error(getLabel('547622',"最多只能添加8项")); return; } let time = new Date().getTime(); @@ -148,8 +148,8 @@ this[item.menuFun] && this[item.menuFun](); key: "new_" + time, fieldid: fieldid, customname: customname, - range: type == '1' ? getLabel('387636', "内容自定义") : getLabel('387637', "字段本身值"), - condition: type == '1' ? getLabel('68', "设置") : '', + range: type == '1' ? getLabel('547623', "内容自定义") : getLabel('547624', "字段本身值"), + condition: type == '1' ? getLabel('547625', "设置") : '', orderid: 0, type: type, isdetailtable: isdetailtable @@ -163,12 +163,12 @@ this[item.menuFun] && this[item.menuFun](); const { quickSearch } = this.props; let { qcSelectedRowKeys } = quickSearch; if (qcSelectedRowKeys.length <= 0) { - message.error(getLabel(22346, '请选择要删除的信息', 'label')); + message.error(getLabel(547626, '请选择要删除的信息')); return; } const that = this; Modal.confirm({ - title: getLabel(83601, '您确认要删除选中的记录吗?'), + title: getLabel(547627, '您确认要删除选中的记录吗?'), onOk() { let { datas } = quickSearch.quickSearchData; datas = toJS(datas); @@ -228,7 +228,7 @@ this[key] && this[key]() }} > } iconBgcolor='#217346' loading={true} @@ -244,7 +244,7 @@ this[key] && this[key]() {this.getFormItems()} - + { let columnArray = [ { - title: getLabel(195, "名称"), dataIndex: "customname", key: "customname", width: "40%", + title: getLabel(547517, "名称"), dataIndex: "customname", key: "customname", width: "40%", com: [{ label: '', type: 'INPUT', key: 'customname', viewAttr: 3, otherParams: { isBase64: true, inputType: "multilang" } }] }, { title:
- {getLabel(387588, "内容自定义条件")}  + {getLabel(547379, "内容自定义条件")} 
, dataIndex: "condition", key: "condition", width: "40%", com: [{ label: '', type: 'SCOP', key: 'condition', viewAttr: 3 }] }, { - title: getLabel(88, "顺序"), dataIndex: "orderid", key: "orderid", width: "20%", + title: getLabel(547631, "顺序"), dataIndex: "orderid", key: "orderid", width: "20%", com: [{ label: '', type: 'INPUTNUMBER', key: 'orderid', viewAttr: 2, otherParams: { max: 999, step: 1 } }] } ]; diff --git a/pc4mobx/organization/components/fieldDefinedSet/QuickSearchTableEdit.js b/pc4mobx/organization/components/fieldDefinedSet/QuickSearchTableEdit.js index 914d31b..e4e4754 100644 --- a/pc4mobx/organization/components/fieldDefinedSet/QuickSearchTableEdit.js +++ b/pc4mobx/organization/components/fieldDefinedSet/QuickSearchTableEdit.js @@ -24,30 +24,30 @@ export default class QuickSearchTableEdit extends React.Component { getColumns = () => { let columnArray = [ { - title: getLabel(261, "字段"), dataIndex: "fieldid", key: "fieldid", width: "18%", + title: getLabel(547376, "字段"), dataIndex: "fieldid", key: "fieldid", width: "18%", com: [{ label: '', type: 'SELECT', isLink: true, key: 'fieldid', options: [] }] }, { - title: getLabel(195, "名称"), dataIndex: "customname", key: "customname", width: "18%", + title: getLabel(547517, "名称"), dataIndex: "customname", key: "customname", width: "18%", com: [{ label: '', type: 'INPUT', key: 'customname', viewAttr: 2, otherParams: { isBase64: true, inputType: "multilang" } }] }, { - title: getLabel(389518, "查询范围"), dataIndex: "range", key: "range", width: "8%", + title: getLabel(547378, "查询范围"), dataIndex: "range", key: "range", width: "8%", com: [{ label: '', type: 'INPUT', key: 'range', viewAttr: 1 }] }, { - title: getLabel(387588, "内容自定义条件"), dataIndex: "condition", key: "condition", width: "15%", + title: getLabel(547379, "内容自定义条件"), dataIndex: "condition", key: "condition", width: "15%", com: [{ label: '', type: 'BUTTON', key: 'condition', viewAttr: 1 }] }, { - title: getLabel(21657, "显示模式"), dataIndex: "showmodel", key: "showmodel", width: "15%", + title: getLabel(547380, "显示模式"), dataIndex: "showmodel", key: "showmodel", width: "15%", com: [{ label: '', type: 'SELECT', key: 'showmodel', viewAttr: 1, - options: [ { key: '0', showname: getLabel(19852, '平铺') },] + options: [ { key: '0', showname: getLabel(547637, '平铺') },] }] } ]; @@ -73,8 +73,8 @@ export default class QuickSearchTableEdit extends React.Component { } else { const { key, isLink = false, viewAttr = 2, type = 'INPUT', width, otherParams = {}, detailtype = 1, options = [] } = c; const _type = type.toUpperCase(); - record.range = record.type == '1' ? getLabel('387636', "内容自定义") : getLabel('387637', "字段本身值"); - record.condition = record.type == '1' ? getLabel('68', "设置") : ''; + record.range = record.type == '1' ? getLabel('547623', "内容自定义") : getLabel('547624', "字段本身值"); + record.condition = record.type == '1' ? getLabel('547625', "设置") : ''; if (_type === 'INPUT') { _com.push( { _this.view(record.id) - }}>查看 + }}>{i18n.button.view()} { _this.doDel(record.id) - }}>删除 + }}>{i18n.button.delete()} { _this.select(record.id) - }}>联查人员 + }}>{i18n.button.joinPerson()} {/* { _this.merge(record.id) }}>合并 @@ -601,7 +601,7 @@ export default class Job extends React.Component { onChange(current) { }, showTotal(total) { - return `共 ${total} 条` + return `${i18n.label.total()} ${total} ${i18n.label.items()}` } }; @@ -689,6 +689,7 @@ export default class Job extends React.Component { icon='icon-coms-hrm' iconBgcolor='#217346' title={"添加岗位"} + hasScroll={true} callback={ datas => { const { diff --git a/pc4mobx/organization/components/log/LogView.js b/pc4mobx/organization/components/log/LogView.js index 8c37a60..86b5ac3 100644 --- a/pc4mobx/organization/components/log/LogView.js +++ b/pc4mobx/organization/components/log/LogView.js @@ -42,7 +42,6 @@ export default class LogView extends React.Component { this.state = ({ height: 502, width: 1075, - dialogTitle: i18n.label.logView(), showSearchAd: false, //**** */ detailDialogTitle: "", @@ -161,12 +160,12 @@ export default class LogView extends React.Component { } = this.props, { tableStore, conditionNum } = logViewStore, { - height, dialogTitle, width, showSearchAd, detailDialogTitle, detailVisible,record + height, width, showSearchAd, detailDialogTitle, detailVisible,record } = this.state; return (
全部导出), text: "全部导出", selected: true + key: "1", show: ({i18n.button.allExport()}), text: "全部导出", selected: true }, { - key: "2", show: (批量导出), text: "批量导出" + key: "2", show: ({i18n.button.batchExport()}), text: "批量导出" } ]; btns.push( 0 ? resource.export() : message.error("请选择需要导出的数据") + tableStore.selectedRowKeysAllPages.length > 0 ? resource.export() : message.error(`${i18n.message.checkExport()}`) } }} menuOnClick={(key, e) => key == '1' ? tableStore.selectedRowKeysAllPages = [] : ''} diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js index c0910fd..ae851a5 100644 --- a/pc4mobx/organization/public/i18n.js +++ b/pc4mobx/organization/public/i18n.js @@ -188,6 +188,10 @@ export const i18n = { importTip2:() => getLabel(547230, '支持单个或批量上传,严禁上传公司内部资料及其他违禁文件'), total:() => getLabel(547523, '共'), items:() => getLabel(547524, '条'), + addjob:() => getLabel(547610, '添加岗位'), + enableDetach:() => getLabel(547403, '启用组织管理分权'), + quickSearchCustom:() => getLabel(547373, '快捷搜索自定义'), + quickSearch:() => getLabel(547374, '快捷搜索条件'), @@ -277,7 +281,6 @@ export const i18n = { modifyMatrix: () => getLabel(383963, '编辑矩阵'), matrixMaintenance: () => getLabel(383964, '矩阵维护者'), orderId: () => getLabel(15486, '序号'), - total: () => getLabel(18609, '共'), dataSourceCount: () => getLabel(30690, '条数据'), screen: () => getLabel(126129, '筛选'), screenInfo: () => getLabel(385323, '筛选此列数据'), @@ -901,8 +904,10 @@ export const i18n = { merge: () => getLabel(547194, '合并'), associateJob: () => getLabel(547496, '联查岗位'), copy:() => getLabel(547196, '复制'), - - + joinPerson:() => getLabel(547609, '联查人员'), + allExport:() => getLabel(547187, '全部导出'), + batchExport:() => getLabel(547611, '批量导出'), + ssoLogin:() => getLabel(547396, '单点登录'), batchOpen: () => getLabel(534249, '批量解锁'), @@ -1055,6 +1060,10 @@ export const i18n = { checkFile: () => getLabel(547587, '请上传需要导入的文件!'), checkFileContent: () => getLabel(547588, '文件导入失败,请检查Excel文件内容是否正确!'), checkCopyDept: () => getLabel(547263, '请指定需要复制的公司/分部'), + checkExport: () => getLabel(547612, '请选择需要导出的数据'), + checkOnDetach: () => getLabel(547620, '确定启用组织管理分权吗'), + checkOffDetach: () => getLabel(547621, '确定取消组织管理分权吗'), + authFailed: () => getLabel(2012, '对不起,您暂时没有权限!'), diff --git a/pc4mobx/organization/stores/columnSetting.js b/pc4mobx/organization/stores/columnSetting.js index c9ce74f..2154699 100644 --- a/pc4mobx/organization/stores/columnSetting.js +++ b/pc4mobx/organization/stores/columnSetting.js @@ -3,13 +3,15 @@ import { action, computed, extendObservable, observable } from "mobx"; import HrmBaseStore from "./baseStore"; import { WeaTableNew } from "comsMobx"; import { message } from "antd"; -import { WeaHelpfulTip, WeaInputLocale } from "ecCom"; +import { WeaHelpfulTip, WeaInputLocale,WeaLocaleProvider } from "ecCom"; import { cloneDeep, has, indexOf, isEmpty, remove, uniq } from "lodash"; import { i18n } from "../public/i18n"; import * as Api from "../apis/columnSetting"; import { validDBKeys } from "../util"; import { saveFieldDefinedInfo } from "../apis/columnSetting"; +const getLabel = WeaLocaleProvider.getLabel; + const getCurrentLabel = WeaInputLocale.getCurrentLabel; const { TableStore } = WeaTableNew; @@ -115,10 +117,10 @@ export class ColumnSetting { + 即使不写占位符,默认也会收到1个固定的参数:hrmResourceID=人员id`)}/> ; } else if (c.key === "itemnum") { @@ -127,8 +129,7 @@ export class ColumnSetting { + title={getLabel('547382', "填写类的全路径例如:com.engine.hrm.cmd.hrmcarditem.GetTabNumDemoCmd,类中包含execute方法返回int型数据。 填写不正确的路径并启用,对应tab页title将会出现(error)字样。")}/> ; } @@ -178,9 +179,9 @@ export class ColumnSetting { + 也可以写占位符${id}传人员id,像这样:/test.jsp?a=1&b=${id}&mypara2=${id}`)}/> ; } diff --git a/pc4mobx/organization/stores/importDialog.js b/pc4mobx/organization/stores/importDialog.js index 8765b6f..5246cda 100644 --- a/pc4mobx/organization/stores/importDialog.js +++ b/pc4mobx/organization/stores/importDialog.js @@ -47,9 +47,9 @@ import { /********************* importDialog *********************/ - steps = [ - { title: i18n.label.uploadFiles()}, - { title: i18n.label.importResult() } + @observable steps = [ + { key: 547227,value:'上传文件'}, + { key: 547221,value:'导入结果'}, ]; @observable importType = ''; diff --git a/pc4mobx/organization/stores/qtxConfig.js b/pc4mobx/organization/stores/qtxConfig.js index fe0bd2e..79f3811 100644 --- a/pc4mobx/organization/stores/qtxConfig.js +++ b/pc4mobx/organization/stores/qtxConfig.js @@ -35,7 +35,7 @@ export class QtxConfigStore { { domkey: ['isopenconfig'], conditionType: 'SWITCH', - label: getLabel('-1', "是否开启数据库配置"), + label: getLabel('547394', "是否开启数据库配置"), labelcol: 5, fieldcol: 19, viewAttr: 3, @@ -76,7 +76,7 @@ export class QtxConfigStore { setTableEditDatas = (e) => { if(e.length > 1) { e.pop(); - message.error("默认只能添加一条配置数据!!!") + message.error(getLabel(547632, "默认只能添加一条配置数据!!!")) } extendObservable(this.editTableData, { datas: e @@ -85,7 +85,7 @@ export class QtxConfigStore { @action("保存页面") saveQtxConfigInfo = () => { if(this.editTableData.datas.length == 0) { - return message.error("至少保存一条配置数据!!") + return message.error(getLabel(547633, "至少保存一条配置数据!!!")) } let editTable = JSON.stringify(this.editTableData.datas[0]); API.saveQtxConfigInfo({ @@ -119,13 +119,13 @@ export class QtxConfigStore { /**===========================buttons=========================== */ - rightMenu = [ + @observable rightMenu = [ { "isBatch": "0", "isTop": "1", "menuFun": "save", "menuIcon": "icon-coms-Preservation", - "menuName": "保存", + "menuName": getLabel('547360', "保存"), "type": "BTN_save" }, { @@ -133,17 +133,17 @@ export class QtxConfigStore { "isTop": "0", "menuFun": "login", "menuIcon": "icon-coms-link", - "menuName": "单点登录", + "menuName": getLabel('547396', "单点登录"), "type": "BTN_link" } ]; - topMenu = [ + @observable topMenu = [ { "isBatch": "1", "isTop": "1", "menuFun": "save", "menuIcon": "icon-coms-Preservation", - "menuName": "保存", + "menuName": getLabel('547360', "保存"), "type": "BTN_save" }, { @@ -151,7 +151,7 @@ export class QtxConfigStore { "isTop": "1", "menuFun": "login", "menuIcon": "icon-coms-link", - "menuName": "单点登录", + "menuName": `${i18n.button.ssoLogin()}`, "type": "BTN_link" } ] diff --git a/pc4mobx/organization/stores/quickSearch.js b/pc4mobx/organization/stores/quickSearch.js index 328b76e..2884b26 100644 --- a/pc4mobx/organization/stores/quickSearch.js +++ b/pc4mobx/organization/stores/quickSearch.js @@ -42,7 +42,7 @@ export class QuickSearchStore { { domkey: ['isquicksearch'], conditionType: 'SWITCH', - label: getLabel('387493', "快捷搜索条件"), + label: getLabel('547592', "快捷搜索条件"), labelcol: 5, fieldcol: 19, viewAttr: 3, @@ -90,7 +90,7 @@ export class QuickSearchStore { let formparm = this.quickSearchForm.getFormParams(); if (!this.checkQuickSearchData()) { - message.error(getLabel('387954', "条件字段不能重复")); + message.error(getLabel('547628', "条件字段不能重复")); return; } let id = this.quickSearchData.setting.id; @@ -190,7 +190,7 @@ export class QuickSearchStore { if ((minnum != '' && minnum != undefined) && (maxnum != '' && maxnum != undefined) && (parseFloat(minnum) > parseFloat(maxnum))) { - message.error(getLabel('382783', "请填写正确的区间")); + message.error(getLabel('547629', "请填写正确的区间")); result = false; return; } @@ -200,31 +200,23 @@ export class QuickSearchStore { /**===========================buttons=========================== */ - rightMenu = [ + @observable rightMenu = [ { "isBatch": "0", "isTop": "1", "menuFun": "save", "menuIcon": "icon-coms-Preservation", - "menuName": "保存", + "menuName": getLabel('547360', "保存"), "type": "BTN_save" }, - // { - // "isBatch": "0", - // "isTop": "0", - // "menuFun": "log", - // "menuIcon": "icon-coms-Print-log", - // "menuName": "日志", - // "type": "BTN_log" - // } ]; - topMenu = [ + @observable topMenu = [ { "isBatch": "1", "isTop": "1", "menuFun": "save", "menuIcon": "icon-coms-Preservation", - "menuName": "保存", + "menuName": getLabel('547360', "保存"), "type": "BTN_save" } ] From 124d9df32f89b5f9f3f745cf7024a5952518052c Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Fri, 14 Jun 2024 16:25:07 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=A4=9A=E8=AF=AD=E8=A8=80=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/department/department.js | 2 +- .../components/newImport/index.js | 56 ++++- .../components/newImport/stepContent.js | 11 +- .../components/newImport/stepDialog.js | 15 +- .../components/resource/GroupList.js | 4 +- .../components/resource/PersonnelResume.js | 15 +- .../components/resource/ResourceCard.js | 22 +- .../components/resource/SearchCustomDialog.js | 16 +- .../components/resource/resource.js | 42 ++-- .../organization/components/staff/Staff.js | 7 +- pc4mobx/organization/public/i18n.js | 2 +- pc4mobx/organization/stores/newImport.js | 50 +---- .../organization/stores/personnelResume.js | 192 +----------------- pc4mobx/organization/stores/resource.js | 25 ++- pc4mobx/organization/stores/resourceCard.js | 160 +-------------- 15 files changed, 144 insertions(+), 475 deletions(-) diff --git a/pc4mobx/organization/components/department/department.js b/pc4mobx/organization/components/department/department.js index c047f96..e322700 100644 --- a/pc4mobx/organization/components/department/department.js +++ b/pc4mobx/organization/components/department/department.js @@ -693,7 +693,7 @@ export default class Department extends React.Component { }} onSearchChange={val => this.onSearchChange(val)} /> - + { init ?
diff --git a/pc4mobx/organization/components/newImport/index.js b/pc4mobx/organization/components/newImport/index.js index ade6391..70396a8 100644 --- a/pc4mobx/organization/components/newImport/index.js +++ b/pc4mobx/organization/components/newImport/index.js @@ -9,7 +9,8 @@ import { import { WeaTop, WeaAlertPage, - WeaBrowser + WeaBrowser, + WeaLocaleProvider } from 'ecCom' import { Spin, @@ -23,6 +24,7 @@ import { addContentPath } from '../../util/index.js'; import StepDialog from './stepDialog'; import { renderNoright } from '../../util'; +const getLabel = WeaLocaleProvider.getLabel; @inject("newImport") @@ -30,10 +32,7 @@ import { renderNoright } from '../../util'; export default class newImport extends React.Component { constructor(props) { super(props); - this.state = ({ - title: i18n.label.dataImport(), - }) } componentDidMount() { @@ -53,11 +52,52 @@ export default class newImport extends React.Component { } = this.props, { isMouseOver, curIndex, - cardConfig, setMouseStatus, } = newImport; let arr = []; + const cardConfig = [ + { + "subTitle": getLabel(547211,'分部设置'), + "bgColor": "#92B75B", + "icon": "icon-coms-Department-number", + "title": getLabel(547332,'分部'), + "linkName": getLabel(547207,'分部导入'), + "url": "/spa/organization/static/index.html#/main/organization/company" + }, + { + "subTitle": getLabel(547212,'部门设置'), + "bgColor": "#92B75B", + "icon": "icon-coms-Department-number", + "title": getLabel(547331,'部门'), + "linkName": getLabel(547208,'部门导入'), + "url": "/spa/organization/static/index.html#/main/organization/department" + }, + // { + // "subTitle": "岗位设置", + // "bgColor": "#49B2FE", + // "icon": "icon-coms-hrm", + // "title": "岗位", + // "linkName": "岗位体系导入", + // "url": "/spa/organization/static/index.html#/main/organization/job" + // }, + { + "subTitle": getLabel(547213,'组织维护'), + "bgColor": "#51A39A", + "icon": "icon-coms-crm", + "title": getLabel(547205,'人员'), + "linkName": getLabel(547209,'人员导入'), + "url": "/spa/organization/static/index.html#/main/organization/resource" + }, + { + "subTitle": getLabel(547214,'等级设置'), + "bgColor": "rgb(230, 168, 69)", + "icon": "icon-portal-kpi-o", + "title": getLabel(547210,'职等职级导入'), + "linkName": getLabel(547206,'职等职级'), + "url": "/spa/organization/static/index.html#/main/organization/rankscheme" + }, + ] cardConfig.map((c, index) => { arr.push(
setMouseStatus(index, true)} onMouseLeave={() => setMouseStatus(index, false)}> @@ -129,9 +169,7 @@ export default class newImport extends React.Component { } = this.props, { visible, hasRight - } = newImport, { - title, - } = this.state; + } = newImport; if (hasRight === false) { return renderNoright(); @@ -139,7 +177,7 @@ export default class newImport extends React.Component { return ( hasRight && } iconBgcolor='#217346' loading={true} diff --git a/pc4mobx/organization/components/newImport/stepContent.js b/pc4mobx/organization/components/newImport/stepContent.js index d9d1a82..e822e26 100644 --- a/pc4mobx/organization/components/newImport/stepContent.js +++ b/pc4mobx/organization/components/newImport/stepContent.js @@ -6,7 +6,8 @@ import { WeaSelect, WeaUpload, WeaDialog, - WeaInput + WeaInput, + WeaLocaleProvider } from 'ecCom' import { Spin, @@ -33,11 +34,11 @@ import { import { addContentPath } from '../../util/index.js' import { toJS } from 'mobx'; const WeaTable = WeaTableNew.WeaTable; - +const getLabel = WeaLocaleProvider.getLabel; @inject("newImport") @observer -export default class StepDialog extends React.Component { +export default class StepContent extends React.Component { constructor(props) { super(props); this.state = { @@ -239,7 +240,7 @@ export default class StepDialog extends React.Component { { current == 0 &&
-

注意:右侧列表默认加载的为必填字段!

+

{getLabel(547646,'注意:右侧列表默认加载的为必填字段!')}

} newImport.pvisable = false} visible={pvisable} style={{ width: 300, height: 50 }} diff --git a/pc4mobx/organization/components/newImport/stepDialog.js b/pc4mobx/organization/components/newImport/stepDialog.js index a7e20bc..449af7b 100644 --- a/pc4mobx/organization/components/newImport/stepDialog.js +++ b/pc4mobx/organization/components/newImport/stepDialog.js @@ -2,7 +2,8 @@ import { WeaNewScroll, WeaSearchGroup, WeaMoreButton, - WeaDialog + WeaDialog, + WeaLocaleProvider } from 'ecCom' import { inject, @@ -27,6 +28,7 @@ import { const Step = Steps.Step; import StepContent from './stepContent'; import "../../style/common.less"; +const getLabel = WeaLocaleProvider.getLabel; @inject("newImport") @observer @@ -72,10 +74,17 @@ export default class StepDialog extends React.Component { height, title } = this.state; + const buttons = [ - ((current === 0 || current === steps.length - 1) ? '' : ), + ((current === 0 || current === steps.length - 1) ? '' : ), (), ]; + + const labelSteps = [ + { title: `${getLabel(547216,'设置导入字段')}`}, + { title: `${getLabel(547217,'获取导入模板')}`}, + { title: `${getLabel(547221,'导入结果')}`} + ]; return (
- {steps.map((s, i) => )} + {labelSteps.map((s, i) => )}
diff --git a/pc4mobx/organization/components/resource/GroupList.js b/pc4mobx/organization/components/resource/GroupList.js index 1f0ba93..f4da7dc 100644 --- a/pc4mobx/organization/components/resource/GroupList.js +++ b/pc4mobx/organization/components/resource/GroupList.js @@ -2,7 +2,7 @@ import React, {Component} from 'react'; import {observer} from 'mobx-react'; import {WeaRadioGroup, WeaLocaleProvider} from 'ecCom'; import classnames from 'classnames'; - +const getLabel = WeaLocaleProvider.getLabel; @observer export default class GroupList extends Component{ @@ -18,7 +18,7 @@ export default class GroupList extends Component{ 'icon-coms-up-001': showRadioGroup }) - const label = showRadioGroup ? '隐藏条件' : '显示条件'; + const label = showRadioGroup ? getLabel(547233,'隐藏条件') : getLabel(547232,'显示条件'); return (
setDomRef(dom, 'tab')}> diff --git a/pc4mobx/organization/components/resource/PersonnelResume.js b/pc4mobx/organization/components/resource/PersonnelResume.js index 1c5954b..28b81f1 100644 --- a/pc4mobx/organization/components/resource/PersonnelResume.js +++ b/pc4mobx/organization/components/resource/PersonnelResume.js @@ -10,7 +10,8 @@ import { WeaFormItem, WeaRightMenu, WeaLeftRightLayout, - WeaOrgTree + WeaOrgTree, + WeaLocaleProvider } from 'ecCom' import { Row, @@ -41,7 +42,7 @@ const Option = Select.Option; const toJS = mobx.toJS; const confirm = Modal.confirm; - +const getLabel = WeaLocaleProvider.getLabel; @inject('personnelResume') @observer @@ -167,15 +168,15 @@ export default class PersonnelResume extends React.Component { btns.push() topMenu.map((item, i) => { @@ -257,7 +258,7 @@ export default class PersonnelResume extends React.Component { resumeList } = personnelResume; exportWord({ - filename:`人员简历-${resumeList.lastName}`, + filename:`${getLabel(547238,'人员简历')}-${resumeList.lastName}`, selector:"#personnel-resume", style:`.title { font-size: 18px; diff --git a/pc4mobx/organization/components/resource/ResourceCard.js b/pc4mobx/organization/components/resource/ResourceCard.js index e9b13b4..c1fef92 100644 --- a/pc4mobx/organization/components/resource/ResourceCard.js +++ b/pc4mobx/organization/components/resource/ResourceCard.js @@ -11,7 +11,8 @@ import { WeaRightMenu, WeaAlertPage, WeaNewScrollPagination, - WeaSlideModal + WeaSlideModal, + WeaLocaleProvider } from 'ecCom' import { Row, @@ -43,6 +44,7 @@ import isEmpty from 'lodash/isEmpty' const toJS = mobx.toJS; const confirm = Modal.confirm; +const getLabel = WeaLocaleProvider.getLabel; @inject('resourceCard') @observer @@ -253,9 +255,9 @@ export default class ResourceCard extends React.Component { {data.user.phone}
- 账号类型: + {getLabel(547239,'账号类型')}: {data.user.accountType} - 状态: + {getLabel(547240,'状态')}: {data.user.status}
@@ -274,7 +276,7 @@ export default class ResourceCard extends React.Component { { data.buttons.length > 3 ? : '' } @@ -288,7 +290,7 @@ export default class ResourceCard extends React.Component { }}>
-

流程总数

+

{getLabel(547241,'流程总数')}

{data.statistical.workflowCount}

@@ -297,7 +299,7 @@ export default class ResourceCard extends React.Component { }}>
-

文档总数

+

{getLabel(547243,'文档总数')}

{data.statistical.docCount}

@@ -306,7 +308,7 @@ export default class ResourceCard extends React.Component { }}>
-

我的客户

+

{getLabel(547244,'我的客户')}

{data.statistical.cusCount}

@@ -315,7 +317,7 @@ export default class ResourceCard extends React.Component { }}>
-

我的协作

+

{getLabel(547245,'我的协作')}

{data.statistical.collaborationCount}

@@ -324,7 +326,7 @@ export default class ResourceCard extends React.Component { }}>
-

微博总数

+

{getLabel(547246,'我的协作')}

{data.statistical.weiboCount}

@@ -361,7 +363,7 @@ export default class ResourceCard extends React.Component { height={100} direction={'right'} measure={'%'} - content={!isEmpty(versionList) ? resourceCard.changeVersion(val)}/> :
暂无历史版本
} + content={!isEmpty(versionList) ? resourceCard.changeVersion(val)}/> :
{getLabel(547659,'暂无历史版本')}
} onClose={this.onClose} onAnimationEnd={() => console.log('onAnimationEnd')} /> diff --git a/pc4mobx/organization/components/resource/SearchCustomDialog.js b/pc4mobx/organization/components/resource/SearchCustomDialog.js index eead673..6974bdb 100644 --- a/pc4mobx/organization/components/resource/SearchCustomDialog.js +++ b/pc4mobx/organization/components/resource/SearchCustomDialog.js @@ -4,7 +4,8 @@ import { import { WeaDialog, WeaFormItem, - WeaInput + WeaInput, + WeaLocaleProvider } from 'ecCom'; import Customization from './Customization'; import { @@ -15,6 +16,7 @@ import { i18n } from '../../public/i18n'; const confirm = Modal.confirm; +const getLabel = WeaLocaleProvider.getLabel; @observer export default class SearchCustomDialog extends React.Component { @@ -31,10 +33,10 @@ export default class SearchCustomDialog extends React.Component { } = store; confirm({ - title: "存为模板", + title: getLabel(547548,'存为模板'), content: store.customTemplateName = v} /> @@ -60,9 +62,9 @@ export default class SearchCustomDialog extends React.Component { searchTemplateName } = store; const buttons = [ - , - , - + , + , + ] @@ -72,7 +74,7 @@ export default class SearchCustomDialog extends React.Component { {...searchDialog} buttons={search ? buttons.slice(0, 1) : buttons} initLoadCss - title={search ? '常用条件定制':'列定制'} + title={search ? getLabel(547549,'常用条件定制') : getLabel(547136,'显示列定制')} >
diff --git a/pc4mobx/organization/components/resource/resource.js b/pc4mobx/organization/components/resource/resource.js index 2cfe9cf..28a6ab9 100644 --- a/pc4mobx/organization/components/resource/resource.js +++ b/pc4mobx/organization/components/resource/resource.js @@ -14,7 +14,8 @@ import { WeaOrgTree, WeaDropdown, WeaSelect, - WeaSearchGroup + WeaSearchGroup, + WeaLocaleProvider } from 'ecCom' import { Row, @@ -47,6 +48,7 @@ const toJS = mobx.toJS; const confirm = Modal.confirm; const WeaTable = WeaTableNew.WeaTable; const { ButtonSelect } = WeaDropdown; +const getLabel = WeaLocaleProvider.getLabel; @inject('resource') @inject('datasImport') @@ -181,11 +183,11 @@ export default class Resource extends React.Component { const datas = [ { - key: "1", show: ({i18n.button.allExport()}), text: "全部导出", selected: true + key: "1", show: ({i18n.button.allExport()}), text: `${i18n.button.allExport()}`, selected: true }, { - key: "2", show: ({i18n.button.batchExport()}), text: "批量导出" + key: "2", show: ({i18n.button.batchExport()}), text: `${i18n.button.batchExport()}` } ]; btns.push( resource.searchTemplateName = v} /> @@ -441,7 +443,7 @@ export default class Resource extends React.Component { arr.push( - 选择过滤模板 + {getLabel(547655,'模板选择')} - + ) isFormInit && defaultCondition.map((c, i) => { @@ -533,7 +535,7 @@ export default class Resource extends React.Component { searchType={['base', 'advanced']} showSearchAd={isPanelShow} searchsBaseValue={this.isEmptyObject(form2.getFormParams()) ? lastName : form2.getFormParams().lastName} - searchsBasePlaceHolder='请输入姓名' + searchsBasePlaceHolder='' setShowSearchAd={bool => store.setPanelStatus(bool)} hideSearchAd={() => store.setPanelStatus(false)} searchsAd={isPanelShow ? this.getPanelComponents() :
} @@ -541,11 +543,11 @@ export default class Resource extends React.Component { hasMask={false} buttonsAd={this.getTabBtn()} onSearch={() => { -store.hideRadioGroup();store.getTableInfo(); -}} + store.hideRadioGroup();store.getTableInfo(); + }} onSearchChange={val => this.onSearchChange(val)} /> - + {enable && } {`编制数:${record.staff_num} / 在编数:${record.permanent_num} / 冻结数:${record.freeze_num}/ 状态:${record.lack_statusspan}`} + return {`${getLabel(547345,'编制数')}: ${record.staff_num} / ${getLabel(547346,'在编数')}: ${record.permanent_num} / ${getLabel(547347,'冻结数')}: ${record.freeze_num}/ ${getLabel(547240,'状态')} :${record.lack_statusspan}`} } }; }) diff --git a/pc4mobx/organization/public/i18n.js b/pc4mobx/organization/public/i18n.js index ae851a5..b5fd7dc 100644 --- a/pc4mobx/organization/public/i18n.js +++ b/pc4mobx/organization/public/i18n.js @@ -1063,7 +1063,7 @@ export const i18n = { checkExport: () => getLabel(547612, '请选择需要导出的数据'), checkOnDetach: () => getLabel(547620, '确定启用组织管理分权吗'), checkOffDetach: () => getLabel(547621, '确定取消组织管理分权吗'), - + checkResume: () => getLabel(547657, '简历模板加载失败'), authFailed: () => getLabel(2012, '对不起,您暂时没有权限!'), diff --git a/pc4mobx/organization/stores/newImport.js b/pc4mobx/organization/stores/newImport.js index 8f72d3d..710d934 100644 --- a/pc4mobx/organization/stores/newImport.js +++ b/pc4mobx/organization/stores/newImport.js @@ -37,6 +37,9 @@ import { import { findIndex } from 'lodash'; +import {WeaLocaleProvider } from "ecCom"; + +const getLabel = WeaLocaleProvider.getLabel; export class NewImportStore { @@ -54,48 +57,7 @@ export class NewImportStore { } /********************* cardConfig *********************/ - cardConfig = [ - { - "subTitle": "分部设置", - "bgColor": "#92B75B", - "icon": "icon-coms-Department-number", - "title": "分部", - "linkName": "分部导入", - "url": "/spa/organization/static/index.html#/main/organization/company" - }, - { - "subTitle": "部门设置", - "bgColor": "#92B75B", - "icon": "icon-coms-Department-number", - "title": "部门", - "linkName": "部门导入", - "url": "/spa/organization/static/index.html#/main/organization/department" - }, - // { - // "subTitle": "岗位设置", - // "bgColor": "#49B2FE", - // "icon": "icon-coms-hrm", - // "title": "岗位", - // "linkName": "岗位体系导入", - // "url": "/spa/organization/static/index.html#/main/organization/job" - // }, - { - "subTitle": "组织维护", - "bgColor": "#51A39A", - "icon": "icon-coms-crm", - "title": "人员", - "linkName": "人员导入", - "url": "/spa/organization/static/index.html#/main/organization/resource" - }, - { - "subTitle": "等级设置", - "bgColor": "rgb(230, 168, 69)", - "icon": "icon-portal-kpi-o", - "title": "职等职级", - "linkName": "职等职级导入", - "url": "/spa/organization/static/index.html#/main/organization/rankscheme" - }, - ] + @observable isMouseOver = false; @observable curIndex = ''; @@ -213,7 +175,7 @@ export class NewImportStore { @action("开始导入") startImport() { if(this.filelist.length == 0) { - message.error("请上传需要导入的文件!") + message.error(`${i18n.message.checkFile()}`) this.current = this.current - 1; return; } @@ -243,7 +205,7 @@ export class NewImportStore { }else { clearInterval(this.interval); this.pvisable = false; - message.error("文件导入失败") + message.error(`${i18n.message.checkFileContent()}`) } }) } diff --git a/pc4mobx/organization/stores/personnelResume.js b/pc4mobx/organization/stores/personnelResume.js index 7ba2df5..3f30003 100644 --- a/pc4mobx/organization/stores/personnelResume.js +++ b/pc4mobx/organization/stores/personnelResume.js @@ -39,196 +39,6 @@ export class PersonnelResumeStore { @observable params = {}; @observable condition = []; @observable dialogLoading = true; - // @observable resumeList = { - // lastName: '徐凤年', - // sex: '男', - // birthday: '1999-10-10', - // image:'', - // native: '上海', - // politics: '党员', - // department: '财务部', - // marriage: '已婚', - // jobtitle: '剑道第一人', - // companystartdate: '2020-12-31', - // workstartdate: '2011-10-10', - // idCard: '3409871298377483992', - // address: '江苏省南京市雨花台区润和创智中心', - // telephone: '19823045643', - // email: '16378324@163.com', - // selfStatement:'本人性格开朗,秦武大帝转世,世间武道的第一人', - // tables: [ - // { - // title: '二、社会保险及住房公积金缴纳情况(单位/元)', - // columns: [ - // { - // name: '首次参保时间', - // colspans: 2, - // rowspans: 1 - // }, - // { - // name: '养老保险', - // colspans: 1, - // rowspans: 1 - // }, - // { - // name: '医疗保险', - // colspans: 1, - // rowspans: 1 - // }, - // { - // name: '失业保险', - // colspans: 1, - // rowspans: 1 - // }, - // { - // name: '住房公积金', - // colspans: 1, - // rowspans: 1 - // }, - // { - // name: '企业年金', - // colspans: 1, - // rowspans: 1 - // }, - // ], - // datas: [ - // [{ - // value: '2022-10-02', - // colspans: 2, - // rowspans: 1 - // }, { - // value: '80', - // colspans: 1, - // rowspans: 1 - // }, - // { - // value: '36', - // colspans: 1, - // rowspans: 1 - // }, { - // value: '360', - // colspans: 1, - // rowspans: 1 - // }, { - // value: '180', - // colspans: 1, - // rowspans: 1 - // }, { - // value: '20000', - // colspans: 2, - // rowspans: 1 - // }] - // ] - // }, - // { - // title: '三、家庭成员信息(包括父母、配偶、子女)', - // columns: [ - // { - // name: '关系', - // colspans: 2, - // rowspans: 1 - // }, - // { - // name: '姓名', - // colspans: 1, - // rowspans: 1 - // }, - // { - // name: '工作单位及职务', - // colspans: 1, - // rowspans: 1 - // }, - // { - // name: '联系电话', - // colspans: 1, - // rowspans: 1 - // }, - // { - // name: '住址', - // colspans: 2, - // rowspans: 1 - // } - // ], - // datas: [ - // [ - // { - // value: '父子', - // colspans: 2, - // rowspans: 1 - // }, { - // value: '徐晓', - // colspans: 1, - // rowspans: 1 - // }, - // { - // value: '北凉王', - // colspans: 1, - // rowspans: 1 - // }, { - // value: '1589756859', - // colspans: 1, - // rowspans: 1 - // }, { - // value: '江苏省南京市北凉军营', - // colspans: 2, - // rowspans: 1 - // } - // ], - // [ - // { - // value: '母子', - // colspans: 2, - // rowspans: 1 - // }, { - // value: '吴素', - // colspans: 1, - // rowspans: 1 - // }, - // { - // value: '北凉王妃', - // colspans: 1, - // rowspans: 1 - // }, { - // value: '15897566487', - // colspans: 1, - // rowspans: 1 - // }, { - // value: '江苏省南京市北凉龙雀军团', - // colspans: 2, - // rowspans: 1 - // } - // ], - // [ - // { - // value: '女儿', - // colspans: 2, - // rowspans: 1 - // }, { - // value: '徐念凉', - // colspans: 1, - // rowspans: 1 - // }, - // { - // value: '北凉公主', - // colspans: 1, - // rowspans: 1 - // }, { - // value: '15897566587', - // colspans: 1, - // rowspans: 1 - // }, { - // value: '莽荒之地', - // colspans: 2, - // rowspans: 1 - // } - // ] - // ] - - // } - // ] - - - // } @observable defaultShowLeft = true; @@ -270,7 +80,7 @@ export class PersonnelResumeStore { this.resumeList = res.data; } else { clearInterval(this.interval); - message.warning("简历模板加载失败"); + message.warning(`${i18n.message.checkResume()}`); } }, error => { message.warning(error.msg); diff --git a/pc4mobx/organization/stores/resource.js b/pc4mobx/organization/stores/resource.js index d86a32b..900d98a 100644 --- a/pc4mobx/organization/stores/resource.js +++ b/pc4mobx/organization/stores/resource.js @@ -25,6 +25,7 @@ import { import { getSecondPath } from '../util/index' import { cloneDeep, isEmpty, trim } from 'lodash'; +const getLabel = WeaLocaleProvider.getLabel; const toJS = mobx.toJS; const { TableStore @@ -333,9 +334,9 @@ export class ResourceStore { @action("列定制保存") saveCustomDefine = () => { if (this.customTemplateId == '-1') { - message.error("默认模板不能修改,将返回默认模板列"); - } - + message.error(getLabel(547650,'默认模板不能修改,将返回默认模板列')); + + } const params = { columns: this.transfer.transferKeys, templateId: this.customTemplateId @@ -348,8 +349,6 @@ export class ResourceStore { }, error => { message.warning(error.msg); }) - - } @action("高级搜索模板切换") changeSearchTemplate(v) { @@ -419,7 +418,7 @@ export class ResourceStore { @action("搜索模板保存") saveTemplate = () => { if (this.searchTemplateName == '') { - message.error("搜索模板名称不能为空"); + message.error(getLabel(547651,'搜索模板的名称不能为空')); } else { const fields = []; this.defaultCondition.forEach((c, idx) => { @@ -450,7 +449,7 @@ export class ResourceStore { @action("常用定制列模板保存") saveCustomTemplate = () => { if (this.customTemplateName == '') { - message.error("列定制模板名称不能为空"); + message.error(getLabel(547652,'列定制模板的名称不能为空')); } else { const params = { showname: this.customTemplateName, @@ -477,7 +476,7 @@ export class ResourceStore { @action("搜索模板删除") deleteSearchTemplate = () => { if (this.searchTemplateId == -1) { - return message.error("默认模板不可删除"); + return message.error(getLabel(547653,'默认模板不可删除')); } Api.deleteSearchTemplate({ id: this.searchTemplateId }).then(response => { return response.json() @@ -515,7 +514,7 @@ export class ResourceStore { } = this.transfer; return (
- 待选 + {getLabel(547648,'待选')} - 已选 + {getLabel(547649,'已选')} this.updateCustomTemplate()}>保存] + buttons: [] } @computed get editTableParams() { @@ -668,7 +667,7 @@ export class ResourceStore { Api.updateCustomTemplate(params).then(res => { let { code, msg } = res; if (code === 200) { - message.success(msg || "操作成功"); + message.success(msg || getLabel(30700,'操作成功')); this.getEditTable(); this.customization(); } else { diff --git a/pc4mobx/organization/stores/resourceCard.js b/pc4mobx/organization/stores/resourceCard.js index a1d8b14..764e0fc 100644 --- a/pc4mobx/organization/stores/resourceCard.js +++ b/pc4mobx/organization/stores/resourceCard.js @@ -90,164 +90,6 @@ export class ResourceCardStore { setVersionList(obj) { this.versionList = obj; } - /************** json数据*****************/ - // @observable data = { - // buttons:[ - // { - // name:'编辑卡片', - // url:'http://www.com/${id}?userid=${id}', - // sysDefault:0 - // }, - // ] - // user: { - // id:23, - // image: "", - // name: "萧言", - // sex:"0", - // email: "1546584672@qq.com", - // phone: "18822349878", - // belongTo: "主账号", - // status: "正式" - // }, - // statistical: { - // workflowCount:190, - // docCount:134, - // cusCount:28, - // collaborationCount:28, - // weiboCount:166 - // }, - // formItems:[ - // { - // id:'userInfo', - // title:'员工信息', - // items:[ - // { - // fieldId:'姓名', - // fieldValue:'萧言' - // },{ - // fieldId:'性别', - // fieldValue:'男' - // },{ - // fieldId:'出生日期', - // fieldValue:'1987年9月1日' - // },{ - // fieldId:'个人邮箱', - // fieldValue:'1546875925@qq.com' - // },{ - // fieldId:'电话号码', - // fieldValue:'18925689752' - // },{ - // fieldId:'岗位级别', - // fieldValue:'-' - // },{ - // fieldId:'职务信息', - // fieldValue:'产品运营' - // } - // ] - // }, - // { - // id:'workInfo', - // title:'工作信息', - // items:[ - // { - // fieldId:'姓名', - // fieldValue:'萧言' - // },{ - // fieldId:'性别', - // fieldValue:'男' - // },{ - // fieldId:'出生日期', - // fieldValue:'1987年9月1日' - // },{ - // fieldId:'个人邮箱', - // fieldValue:'1546875925@qq.com' - // },{ - // fieldId:'姓名', - // fieldValue:'萧言' - // },{ - // fieldId:'性别', - // fieldValue:'男' - // },{ - // fieldId:'出生日期', - // fieldValue:'1987年9月1日' - // },{ - // fieldId:'个人邮箱', - // fieldValue:'1546875925@qq.com' - // },{ - // fieldId:'姓名', - // fieldValue:'萧言' - // },{ - // fieldId:'性别', - // fieldValue:'男' - // },{ - // fieldId:'出生日期', - // fieldValue:'1987年9月1日' - // },{ - // fieldId:'个人邮箱', - // fieldValue:'1546875925@qq.com' - // } - // ] - // }, - // { - // id:'educationInfo', - // title:'教育经历', - // items:[ - // { - // fieldId:'本科', - // fieldValue:'南京大学' - // },{ - // fieldId:'研究生', - // fieldValue:'北京大学' - // },{ - // fieldId:'毕业时间', - // fieldValue:'1987-09-21' - // },{ - // fieldId:'获得奖项', - // fieldValue:'优秀毕业生' - // },{ - // fieldId:'备注', - // fieldValue:'无' - // } - // ] - // } - // ], - // anchorList:[ - // { - // id:'userInfo', - // title:'员工信息' - // }, - // { - // id:'workInfo', - // title:'工作信息' - // }, - // { - // id:'educationInfo', - // title:'教育经历' - // }, - // { - // id:'comp', - // title:'分部扩展页' - // }, - // { - // id:'dept', - // title:'部门扩展页' - // } - - - // ], - // iframeList: [ - // { - // id:"comp", - // title:"分部管理", - // url:'/spa/organization/static/index.html#/main/organization/companyExtend/7' - // }, - // { - // id:"dept", - // title:"部门管理", - // url:'/spa/organization/static/index.html#/main/organization/company' - // }, - // ] - - // } + }