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