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" } ]