多语言设置

This commit is contained in:
Chengliang 2024-06-14 16:25:07 +08:00
parent 6a648fe177
commit 124d9df32f
15 changed files with 144 additions and 475 deletions

View File

@ -693,7 +693,7 @@ export default class Department extends React.Component {
}}
onSearchChange={val => this.onSearchChange(val)}
/>
<Spin size="large" spinning={exSpinning} tip="正在导出请稍候...." className="hrm-loading-center-small"/>
<Spin size="large" spinning={exSpinning} tip={getLabel(547647,'正在导出请稍候....')} className="hrm-loading-center-small"/>
{
init ? <div className='hrm-new-weatable-spin'>
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@4ygl4a`} spinning={init}></Spin>

View File

@ -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(<div className='hrm-card-out' style={(index == 0 || index == 4) ? { marginLeft: 0 } : {}} onMouseEnter={() => 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 && <WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@sp0zb8`}
title={title}
title={i18n.label.dataImport()}
icon={<i className='icon-coms-hrm' />}
iconBgcolor='#217346'
loading={true}

View File

@ -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 &&
<div>
<p style={{"color":"red","fontSize":"15px"}}>注意:右侧列表默认加载的为必填字段!</p>
<p style={{"color":"red","fontSize":"15px"}}>{getLabel(547646,'注意:右侧列表默认加载的为必填字段!')}</p>
<WeaTransfer
data={toJS(data)}
selectedKeys={toJS(selectedKeys)}
@ -275,7 +276,7 @@ export default class StepDialog extends React.Component {
/>
}
<WeaDialog
title="导入进度"
title={i18n.label.importProgress()}
onCancel={() => newImport.pvisable = false}
visible={pvisable}
style={{ width: 300, height: 50 }}

View File

@ -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) ? '' : <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => this.up()}>上一步</Button>),
((current === 0 || current === steps.length - 1) ? '' : <Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => this.up()}>{getLabel(547218,'上一步')}</Button>),
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@jd6baw`} type="primary" onClick={() => this.next()}>{current === steps.length - 1 ? i18n.button.close() : i18n.button.nextStep()}</Button>),
];
const labelSteps = [
{ title: `${getLabel(547216,'设置导入字段')}`},
{ title: `${getLabel(547217,'获取导入模板')}`},
{ title: `${getLabel(547221,'导入结果')}`}
];
return (
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@1txk5f`}
@ -93,7 +102,7 @@ export default class StepDialog extends React.Component {
>
<div style={{ marginTop: 24 }}>
<Steps current={current}>
{steps.map((s, i) => <Step key={i} title={s.title} description={s.description} />)}
{labelSteps.map((s, i) => <Step key={i} title={s.title} description={s.description} />)}
</Steps>
</div>
<div style={{ padding: 24 }}>

View File

@ -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 (
<div ref={dom => setDomRef(dom, 'tab')}>

View File

@ -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(<Select showSearch
style={{ width: 115 }}
placeholder="请选择模板"
defaultValue="人员简历模板"
placeholder={getLabel(547660,'请选择模板')}
defaultValue={getLabel(547252,'人员简历模板')}
optionFilterProp="children"
notFoundContent="无法找到"
size="large"
onChange={this.handleChange()}
>
<Option value="1">人员简历模板</Option>
<Option value="2">人员晋升模板</Option>
<Option value="1">{getLabel(547252,'人员简历模板')}</Option>
<Option value="2">{getLabel(547253,'人员晋升模板')}</Option>
</Select>)
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;

View File

@ -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 {
<span className='value'>{data.user.phone}</span>
</div>
<div style={{ marginTop: '10px' }}>
<span className='label'>账号类型:</span>
<span className='label'>{getLabel(547239,'账号类型')}:</span>
<span className='value'>{data.user.accountType}</span>
<span className='label'>状态:</span>
<span className='label'>{getLabel(547240,'状态')}:</span>
<span className='value'>{data.user.status}</span>
</div>
</div>
@ -274,7 +276,7 @@ export default class ResourceCard extends React.Component {
{
data.buttons.length > 3 ? <Dropdown overlay={menu}>
<Button style={{ marginLeft: 8 }} className='item'>
更多操作 <Icon type="down" />
{getLabel(547658,'更多操作')} <Icon type="down" />
</Button>
</Dropdown> : ''
}
@ -288,7 +290,7 @@ export default class ResourceCard extends React.Component {
}}>
<img src="/hrm/hrm_e9/image/workflow.png" alt="" />
<div>
<p>流程总数</p>
<p>{getLabel(547241,'流程总数')}</p>
<p>{data.statistical.workflowCount}</p>
</div>
</Col>
@ -297,7 +299,7 @@ export default class ResourceCard extends React.Component {
}}>
<img src="/hrm/hrm_e9/image/doc.png" alt="" />
<div >
<p>文档总数</p>
<p>{getLabel(547243,'文档总数')}</p>
<p>{data.statistical.docCount}</p>
</div>
</Col>
@ -306,7 +308,7 @@ export default class ResourceCard extends React.Component {
}}>
<img src="/hrm/hrm_e9/image/custom.png" alt="" />
<div>
<p>我的客户</p>
<p>{getLabel(547244,'我的客户')}</p>
<p>{data.statistical.cusCount}</p>
</div>
</Col>
@ -315,7 +317,7 @@ export default class ResourceCard extends React.Component {
}}>
<img src="/hrm/hrm_e9/image/cowork.png" alt="" />
<div>
<p>我的协作</p>
<p>{getLabel(547245,'我的协作')}</p>
<p>{data.statistical.collaborationCount}</p>
</div>
</Col>
@ -324,7 +326,7 @@ export default class ResourceCard extends React.Component {
}}>
<img src="/hrm/hrm_e9/image/weibo.png" alt="" />
<div>
<p>微博总数</p>
<p>{getLabel(547246,'我的协作')}</p>
<p>{data.statistical.weiboCount}</p>
</div>
</Col>
@ -361,7 +363,7 @@ export default class ResourceCard extends React.Component {
height={100}
direction={'right'}
measure={'%'}
content={!isEmpty(versionList) ? <VersionsSlider versionList={versionList} handleChange={val => resourceCard.changeVersion(val)}/> : <div style={{"textAlign":"center","color":"red","fontSize":"20px","marginTop": "50px"}}> 暂无历史版本 </div>}
content={!isEmpty(versionList) ? <VersionsSlider versionList={versionList} handleChange={val => resourceCard.changeVersion(val)}/> : <div style={{"textAlign":"center","color":"red","fontSize":"20px","marginTop": "50px"}}> {getLabel(547659,'暂无历史版本')} </div>}
onClose={this.onClose}
onAnimationEnd={() => console.log('onAnimationEnd')} />
</WeaNewScrollPagination>

View File

@ -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:
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@62kt85`}
label="列定制模板名称"
label= {getLabel(547581,'列定制模板名称')}
labelCol={{ span: 10 }}
wrapperCol={{ span: 14 }}>
<WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@j9bmvw`} viewAttr="3" value={customTemplateName} {...window.inputType} onChange={v => store.customTemplateName = v} />
@ -60,9 +62,9 @@ export default class SearchCustomDialog extends React.Component {
searchTemplateName
} = store;
const buttons = [
<Button type='primary' onClick={()=> search ? store.saveHrmSearchUserDefine() : store.saveCustomDefine()}>保存</Button>,
<Button type='primary' onClick={()=> this.saveCustomTemplate()}>存为模板</Button>,
<Button type='primary' onClick={()=> store.getEditTable()}>模板管理</Button>
<Button type='primary' onClick={()=> search ? store.saveHrmSearchUserDefine() : store.saveCustomDefine()}>{getLabel(547360,'保存')}</Button>,
<Button type='primary' onClick={()=> this.saveCustomTemplate()}>{getLabel(547548,'存为模板')}</Button>,
<Button type='primary' onClick={()=> store.getEditTable()}>{getLabel(547582,'模板管理')}</Button>
]
@ -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,'显示列定制')}
>
<Customization store={store}/>
</WeaDialog>

View File

@ -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: (<span>{i18n.button.allExport()}</span>), text: "", selected: true
key: "1", show: (<span>{i18n.button.allExport()}</span>), text: `${i18n.button.allExport()}`, selected: true
},
{
key: "2", show: (<span>{i18n.button.batchExport()}</span>), text: ""
key: "2", show: (<span>{i18n.button.batchExport()}</span>), text: `${i18n.button.batchExport()}`
}
];
btns.push(<ButtonSelect
@ -237,15 +239,15 @@ export default class Resource extends React.Component {
window.open("/spa/hrm/index_mobx.html#/main/hrm/add", "_blank")
}
import() {
const {
datasImport
} = this.props;
datasImport.visible = true;
datasImport.title = i18n.button.importResource();
datasImport.importType = 'resource';
datasImport.getImportForm();
}
// import() {
// const {
// datasImport
// } = this.props;
// datasImport.visible = true;
// datasImport.title = i18n.button.importResource();
// datasImport.importType = 'resource';
// datasImport.getImportForm();
// }
getDropMenuDatas() {
const {
@ -300,10 +302,10 @@ export default class Resource extends React.Component {
} = resource;
confirm({
title: "存为模板",
title: getLabel(547548,'存为模板'),
content:
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@62kt85`}
label="搜索模板名称"
label= {getLabel(547654,'搜索模板名称')}
labelCol={{ span: 10 }}
wrapperCol={{ span: 14 }}>
<WeaInput ecId={`${this && this.props && this.props.ecId || ''}_WeaInput@j9bmvw`} viewAttr="3" value={searchTemplateName} {...window.inputType} onChange={v => resource.searchTemplateName = v} />
@ -441,7 +443,7 @@ export default class Resource extends React.Component {
arr.push(<Row style={{ marginTop: 20 }}>
<Col offset={1} span={2}><span style={{ "lineHeight": "30px", "color": "red" }}>选择过滤模板</span></Col>
<Col offset={1} span={2}><span style={{ "lineHeight": "30px", "color": "red" }}>{getLabel(547655,'模板选择')}</span></Col>
<Col span={6} offset={1}>
<WeaSelect
style={{ width: "100%" }}
@ -452,7 +454,7 @@ export default class Resource extends React.Component {
}}
/>
</Col>
<Col offset={1} span={2}><Button onClick={() => resource.deleteSearchTemplate()}>删除模板</Button></Col>
<Col offset={1} span={2}><Button onClick={() => resource.deleteSearchTemplate()}>{getLabel(547656,'删除模板 ')}</Button></Col>
</Row>)
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() : <div></div>}
@ -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)}
/>
<Spin size="large" spinning={exSpinning} tip="正在导出请稍候...." className="hrm-loading-center-small"/>
<Spin size="large" spinning={exSpinning} tip={getLabel(547647,'正在导出请稍候....')} className="hrm-loading-center-small"/>
{enable && <GroupList ecId={`${this && this.props && this.props.ecId || ''}_GroupList@2le78y`} store={store} />}
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
comsWeaTableStore={tableStore}

View File

@ -10,7 +10,8 @@ import {
WeaFormItem,
WeaRightMenu,
WeaLeftRightLayout,
WeaOrgTree
WeaOrgTree,
WeaLocaleProvider
} from 'ecCom'
import {
Row,
@ -39,7 +40,7 @@ import SelectTag from '../SelectTag'
const toJS = mobx.toJS;
const confirm = Modal.confirm;
const WeaTable = WeaTableNew.WeaTable;
const getLabel = WeaLocaleProvider.getLabel;
@inject('staff')
@inject('importDialog')
@ -247,7 +248,7 @@ export default class Staff extends React.Component {
};
if (c.dataIndex == 'staff_desc') {
c.render = function (text, record) {
return <span>{`编制数:${record.staff_num} / 在编数:${record.permanent_num} / 冻结数:${record.freeze_num}/ 状态:${record.lack_statusspan}`}</span>
return <span>{`${getLabel(547345,'编制数')}: ${record.staff_num} / ${getLabel(547346,'在编数')}: ${record.permanent_num} / ${getLabel(547347,'冻结数')}: ${record.freeze_num}/ ${getLabel(547240,'状态')} :${record.lack_statusspan}`}</span>
}
};
})

View File

@ -1063,7 +1063,7 @@ export const i18n = {
checkExport: () => getLabel(547612, '请选择需要导出的数据'),
checkOnDetach: () => getLabel(547620, '确定启用组织管理分权吗'),
checkOffDetach: () => getLabel(547621, '确定取消组织管理分权吗'),
checkResume: () => getLabel(547657, '简历模板加载失败'),
authFailed: () => getLabel(2012, '对不起,您暂时没有权限!'),

View File

@ -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()}`)
}
})
}

View File

@ -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);

View File

@ -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 (
<div className="trasfer-header">
<span>待选</span>
<span>{getLabel(547648,'待选')}</span>
<WeaInputSearch
style={this.inputSearchStyle}
value={transferleftIptVal}
@ -537,7 +536,7 @@ export class ResourceStore {
} = this.transfer;
return (
<div className="trasfer-header">
<span>已选</span>
<span>{getLabel(547649,'已选')}</span>
<WeaInputSearch
style={this.inputSearchStyle}
value={transferRightIptVal}
@ -617,7 +616,7 @@ export class ResourceStore {
};
@observable temlateManageDialog = {
title: '模板管理',
title: getLabel(547582,'模板管理'),
visible: false,
hasScroll: true,
icon: 'icon-coms-hrm',
@ -627,7 +626,7 @@ export class ResourceStore {
width: 500,
height: 650
},
buttons: [<Button type='primary' onClick={() => this.updateCustomTemplate()}>保存</Button>]
buttons: [<Button type='primary' onClick={() => this.updateCustomTemplate()}>{getLabel(547360,'保存')}</Button>]
}
@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 {

View File

@ -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'
// },
// ]
// }
}