Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
cb020c5f66
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
import {
|
||||||
|
WeaTools
|
||||||
|
} from 'ecCom'
|
||||||
|
|
||||||
|
export const getLogList = (params) => {
|
||||||
|
return WeaTools.callApi('/api/bs/hrmorganization/log/listPage', 'GET', params);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const getAdvanceSearchCondition = (params) => {
|
||||||
|
return WeaTools.callApi('/api/bs/hrmorganization/log/getSearchCondition', 'GET', params);
|
||||||
|
}
|
||||||
|
|
@ -12,18 +12,20 @@ const WeaLogViewComp = WeaLogView.Component;
|
||||||
const {
|
const {
|
||||||
LogStore
|
LogStore
|
||||||
} = WeaLogView;
|
} = WeaLogView;
|
||||||
|
import LogView from "./log/LogView";
|
||||||
|
|
||||||
|
import {LogViewStore} from "../stores/logview"
|
||||||
|
|
||||||
class Home extends React.Component {
|
class Home extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
key: new Date().getTime(),
|
keys: new Date().getTime(),
|
||||||
visible: false,
|
visible: false,
|
||||||
logStore: new LogStore(),
|
logViewStore: new LogViewStore()
|
||||||
logType: '4',
|
|
||||||
logSmallType: ''
|
|
||||||
}
|
}
|
||||||
window.setLogViewProps = this.setLogViewProps;
|
window.setLogViewProp = this.setLogViewProp;
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount(){
|
componentDidMount(){
|
||||||
|
|
@ -46,13 +48,10 @@ class Home extends React.Component {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setLogViewProps = (props) => {
|
setLogViewProp = (props) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
key: new Date().getTime(),
|
|
||||||
targetId: '',
|
|
||||||
visible: true,
|
visible: true,
|
||||||
logType: '4',
|
logViewStore: new LogViewStore(),
|
||||||
logStore: new LogStore(),
|
|
||||||
...props
|
...props
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -61,15 +60,18 @@ class Home extends React.Component {
|
||||||
visible: false
|
visible: false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
//const isSingle = window.location.pathname.indexOf('/spa/hrm/engine') > -1;
|
//const isSingle = window.location.pathname.indexOf('/spa/hrm/engine') > -1;
|
||||||
return (
|
return (
|
||||||
<div style={{height:"100%"}}>
|
<div style={{height:"100%"}}>
|
||||||
<WeaPopoverHrm ecId={`${this && this.props && this.props.ecId || ''}_WeaPopoverHrm@jp3tsb`} />
|
<WeaPopoverHrm ecId={`${this && this.props && this.props.ecId || ''}_WeaPopoverHrm@jp3tsb`} />
|
||||||
<WeaLogViewComp ecId={`${this && this.props && this.props.ecId || ''}_WeaLogViewComp@mc1954`} {...this.state} onCancel={this.onCancel}/>
|
<LogView ecId={`${this && this.props && this.props.ecId || ''}_LogView@mc1954`} {...this.state} onCancel={this.onCancel}/>
|
||||||
|
{/* <WeaLogViewComp ecId={`${this && this.props && this.props.ecId || ''}_WeaLogViewComp@mc1954`} {...this.state} onCancel={this.onCancel}/> */}
|
||||||
<WeaLocaleProvider ecId={`${this && this.props && this.props.ecId || ''}_WeaLocaleProvider@3on3aj`}>
|
<WeaLocaleProvider ecId={`${this && this.props && this.props.ecId || ''}_WeaLocaleProvider@3on3aj`}>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</WeaLocaleProvider>
|
</WeaLocaleProvider>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export default class NewAndEditDialog extends React.Component {
|
||||||
if(moduleName == 'department' && data.parent_comp ){
|
if(moduleName == 'department' && data.parent_comp ){
|
||||||
bindChangeEnvent(data.parent_comp.value);
|
bindChangeEnvent(data.parent_comp.value);
|
||||||
}
|
}
|
||||||
if(moduleName == 'job' && (data.sequence_id)){
|
if(moduleName == 'job' && (data.sequence_id || data.level_id)){
|
||||||
bindChangeEnvent(data);
|
bindChangeEnvent(data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @Author: 程亮
|
* @Author: 程亮
|
||||||
* @Date: 2022-05-18 16:23:32
|
* @Date: 2022-05-18 16:23:32
|
||||||
* @LastEditTime: 2022-06-24 16:47:53
|
* @LastEditTime: 2022-07-06 10:48:30
|
||||||
* @Description:
|
* @Description:
|
||||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
|
* @FilePath: /trunk/src4js/pc4mobx/organization/components/company/company.js
|
||||||
*/
|
*/
|
||||||
|
|
@ -104,6 +104,14 @@ export default class Company extends React.Component {
|
||||||
return btns;
|
return btns;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
log = () => {
|
||||||
|
window.setLogViewProp({
|
||||||
|
logMoudleType: 8,
|
||||||
|
keys: new Date().getTime(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
handleClick(item) {
|
handleClick(item) {
|
||||||
const {
|
const {
|
||||||
company
|
company
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @Author: 程亮
|
* @Author: 程亮
|
||||||
* @Date: 2022-06-02 09:19:37
|
* @Date: 2022-06-02 09:19:37
|
||||||
* @LastEditTime: 2022-06-24 13:46:13
|
* @LastEditTime: 2022-07-06 10:48:46
|
||||||
* @Description:
|
* @Description:
|
||||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
|
* @FilePath: /trunk/src4js/pc4mobx/organization/components/department/department.js
|
||||||
*/
|
*/
|
||||||
|
|
@ -226,6 +226,14 @@
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
log = () => {
|
||||||
|
window.setLogViewProp({
|
||||||
|
logMoudleType: 9,
|
||||||
|
keys: new Date().getTime(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
batchDelete() {
|
batchDelete() {
|
||||||
const {
|
const {
|
||||||
department
|
department
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @Author: 程亮
|
* @Author: 程亮
|
||||||
* @Date: 2022-05-26 14:05:59
|
* @Date: 2022-05-26 14:05:59
|
||||||
* @LastEditTime: 2022-06-27 11:23:42
|
* @LastEditTime: 2022-07-06 10:49:02
|
||||||
* @Description:
|
* @Description:
|
||||||
* @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js
|
* @FilePath: /trunk/src4js/pc4mobx/organization/components/job/Job.js
|
||||||
*/
|
*/
|
||||||
|
|
@ -524,6 +524,14 @@ export default class Job extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
log = () => {
|
||||||
|
window.setLogViewProp({
|
||||||
|
logMoudleType: 10,
|
||||||
|
keys: new Date().getTime(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,212 @@
|
||||||
|
import React from 'react'
|
||||||
|
import * as mobx from 'mobx'
|
||||||
|
import {
|
||||||
|
inject,
|
||||||
|
observer
|
||||||
|
} from 'mobx-react'
|
||||||
|
import {
|
||||||
|
WeaTop,
|
||||||
|
WeaTab,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaDialog,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaProgress
|
||||||
|
} from 'ecCom'
|
||||||
|
import {
|
||||||
|
Row,
|
||||||
|
Col,
|
||||||
|
Spin,
|
||||||
|
Modal,
|
||||||
|
Button,
|
||||||
|
message,
|
||||||
|
Switch
|
||||||
|
} from 'antd'
|
||||||
|
import {
|
||||||
|
WeaSwitch,
|
||||||
|
WeaTableNew
|
||||||
|
} from 'comsMobx'
|
||||||
|
import {
|
||||||
|
i18n
|
||||||
|
} from '../../public/i18n';
|
||||||
|
|
||||||
|
import '../../style/common.less';
|
||||||
|
|
||||||
|
const toJS = mobx.toJS;
|
||||||
|
const confirm = Modal.confirm;
|
||||||
|
const WeaTable = WeaTableNew.WeaTable;
|
||||||
|
|
||||||
|
|
||||||
|
export default class LogView extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = ({
|
||||||
|
height: 502,
|
||||||
|
width: 1075,
|
||||||
|
dialogTitle: '日志查看',
|
||||||
|
showSearchAd: false,
|
||||||
|
//**** */
|
||||||
|
detailDialogTitle: "",
|
||||||
|
detailVisible: false,
|
||||||
|
record:{}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillMount() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
componentDidMount() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
componentWillReceiveProps(nextProps) {
|
||||||
|
this.setState({ showSearchAd: false })
|
||||||
|
if (this.props.keys !== nextProps.keys) {
|
||||||
|
nextProps.logViewStore.init(nextProps.logMoudleType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
doView(record) {
|
||||||
|
this.setState({
|
||||||
|
record:record,
|
||||||
|
detailVisible: true,
|
||||||
|
detailDialogTitle: record.operate_typespan + " - " + record.operate_module_name + " : "+record.value
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
reRenderColumns(columns) {
|
||||||
|
let _this = this;
|
||||||
|
columns.forEach((c, index) => {
|
||||||
|
if (c.dataIndex == 'message') {
|
||||||
|
c.render = function (text, record) {
|
||||||
|
return <a href='javascript:void(0);' className="common" onClick={() => { _this.doView(record) }}>查看</a>
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
getPanelComponents() {
|
||||||
|
const {
|
||||||
|
logViewStore
|
||||||
|
} = this.props;
|
||||||
|
const {
|
||||||
|
searchCondition,
|
||||||
|
form,
|
||||||
|
searchConditionLoading
|
||||||
|
} = logViewStore;
|
||||||
|
|
||||||
|
let arr = [];
|
||||||
|
let formParams = form.getFormParams();
|
||||||
|
const {
|
||||||
|
isFormInit
|
||||||
|
} = form;
|
||||||
|
|
||||||
|
isFormInit && searchCondition.map(c => {
|
||||||
|
c.items.map((field, index) => {
|
||||||
|
arr.push(<Col ecId={`${this && this.props && this.props.ecId || ''}_Col@4cc308@${index}`} span={(index % 2 == 0) ? 10 : 11} offset={1}>
|
||||||
|
<div style={{ marginTop: 20 }}>
|
||||||
|
<WeaFormItem ecId={`${this && this.props && this.props.ecId || ''}_WeaFormItem@u6ex85@${index}`}
|
||||||
|
label={`${field.label}`}
|
||||||
|
labelCol={{ span: `${field.labelcol}` }}
|
||||||
|
wrapperCol={{ span: `${field.fieldcol}` }}>
|
||||||
|
{<WeaSwitch ecId={`${this && this.props && this.props.ecId || ''}_WeaSwitch@p7d3td@${index}`} fieldConfig={field} form={form} formParams={formParams} />}
|
||||||
|
</WeaFormItem>
|
||||||
|
</div>
|
||||||
|
</Col>)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
if (searchConditionLoading) {
|
||||||
|
return (
|
||||||
|
<div className='hrm-loading-center-small' style={{ top: '25%' }}>
|
||||||
|
<Spin ecId={`${this && this.props && this.props.ecId || ''}_Spin@lbktzb`} spinning={searchConditionLoading}></Spin>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
return <Row ecId={`${this && this.props && this.props.ecId || ''}_Row@ppeb6z`} onKeyDown={(e) => {
|
||||||
|
if (e.keyCode == 13 && e.target.tagName === "INPUT") {
|
||||||
|
logViewStore.getTableInfo();
|
||||||
|
this.setState({ showSearchAd: false })
|
||||||
|
}
|
||||||
|
}}>{arr}</Row>
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
getTabBtn() {
|
||||||
|
const {
|
||||||
|
logViewStore
|
||||||
|
} = this.props;
|
||||||
|
const {
|
||||||
|
form
|
||||||
|
} = logViewStore;
|
||||||
|
|
||||||
|
const btn = [
|
||||||
|
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@bx87i8`} type="primary" onClick={() => { logViewStore.getTableInfo(); this.setState({ showSearchAd: false }) }}>{i18n.button.search()}</Button>),
|
||||||
|
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@218ju6`} onClick={() => form.reset()}>{i18n.button.reset()}</Button>),
|
||||||
|
(<Button ecId={`${this && this.props && this.props.ecId || ''}_Button@5u9mfz`} onClick={() => this.setState({ showSearchAd: false })}>{i18n.button.cancel()}</Button>),
|
||||||
|
];
|
||||||
|
|
||||||
|
return btn;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
render() {
|
||||||
|
|
||||||
|
const {
|
||||||
|
visible, onCancel, logViewStore
|
||||||
|
} = this.props, {
|
||||||
|
tableStore, conditionNum
|
||||||
|
} = logViewStore, {
|
||||||
|
height, dialogTitle, width, showSearchAd, detailDialogTitle, detailVisible,record
|
||||||
|
} = this.state;
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@1txk5f`}
|
||||||
|
title={dialogTitle}
|
||||||
|
icon="icon-coms-currency"
|
||||||
|
iconBgcolor="#217346"
|
||||||
|
visible={visible}
|
||||||
|
closable={true}
|
||||||
|
hasScroll={true}
|
||||||
|
onCancel={() => onCancel()}
|
||||||
|
style={{ height: height, width: width }}
|
||||||
|
>
|
||||||
|
<WeaTab ecId={`${this && this.props && this.props.ecId || ''}_WeaTab@9c3zts`}
|
||||||
|
searchType={['advanced']}
|
||||||
|
showSearchAd={showSearchAd}
|
||||||
|
setShowSearchAd={bool => { this.setState({ showSearchAd: bool }) }}
|
||||||
|
advanceHeight={161}
|
||||||
|
searchsAd={showSearchAd ? this.getPanelComponents() : <div></div>}
|
||||||
|
buttonsAd={this.getTabBtn()}
|
||||||
|
/>
|
||||||
|
<WeaTable ecId={`${this && this.props && this.props.ecId || ''}_WeaTable@pgmg3x`}
|
||||||
|
comsWeaTableStore={tableStore}
|
||||||
|
hasOrder={true}
|
||||||
|
needScroll={true}
|
||||||
|
getColumns={c => this.reRenderColumns(c)}
|
||||||
|
/>
|
||||||
|
</WeaDialog>
|
||||||
|
<WeaDialog ecId={`${this && this.props && this.props.ecId || ''}_WeaDialog@1txk5f`}
|
||||||
|
title={detailDialogTitle}
|
||||||
|
icon="icon-coms-currency"
|
||||||
|
iconBgcolor="#217346"
|
||||||
|
visible={detailVisible}
|
||||||
|
closable={true}
|
||||||
|
hasScroll={true}
|
||||||
|
onCancel={() => this.setState({
|
||||||
|
detailVisible: false
|
||||||
|
})}
|
||||||
|
style={{ height: 676, width: 1000 }}
|
||||||
|
>
|
||||||
|
<div className='content' style={{ "padding": "20px","height": "100%" }}>
|
||||||
|
<div style={{ "height": "40%","overflow-x": "auto"}} dangerouslySetInnerHTML={{ __html: record.message }} ></div>
|
||||||
|
{/* <WeaProgress percent={100} strokeColor="#217346" /> */}
|
||||||
|
<div style={{"marginTop":"20px","fontSize":"20px","color":"#217346"}}>原始参数查看</div>
|
||||||
|
<div dangerouslySetInnerHTML={{ __html: record.params_str }} style={{"overflow-x": "auto","height":"50%","marginTop":"20px"}}></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</WeaDialog>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -54,6 +54,13 @@ export default class OfficeManage extends Component {
|
||||||
return menus;
|
return menus;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
showlog = () => {
|
||||||
|
window.setLogViewProp({
|
||||||
|
logMoudleType: 6,
|
||||||
|
keys: new Date().getTime(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
handleMenuClick = key => {
|
handleMenuClick = key => {
|
||||||
const { officeManageStore } = this.props;
|
const { officeManageStore } = this.props;
|
||||||
const { isPanelShow, tableStore, officeClassifyId } = officeManageStore;
|
const { isPanelShow, tableStore, officeClassifyId } = officeManageStore;
|
||||||
|
|
@ -64,6 +71,9 @@ export default class OfficeManage extends Component {
|
||||||
officeManageStore.setVisible(true);
|
officeManageStore.setVisible(true);
|
||||||
officeManageStore.setNeDialogTitle(i18n.label.newOfficeName());
|
officeManageStore.setNeDialogTitle(i18n.label.newOfficeName());
|
||||||
break;
|
break;
|
||||||
|
case "log":
|
||||||
|
this.showlog();
|
||||||
|
break;
|
||||||
case "custom":
|
case "custom":
|
||||||
tableStore.setColSetVisible(true);
|
tableStore.setColSetVisible(true);
|
||||||
tableStore.tableColSet(true);
|
tableStore.tableColSet(true);
|
||||||
|
|
|
||||||
|
|
@ -309,6 +309,14 @@ export default class JobGrade extends React.Component {
|
||||||
!isNew && jobGrade.edit();
|
!isNew && jobGrade.edit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
log = () => {
|
||||||
|
window.setLogViewProp({
|
||||||
|
logMoudleType: 3,
|
||||||
|
keys: new Date().getTime(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
getPanelComponents() {
|
getPanelComponents() {
|
||||||
const {
|
const {
|
||||||
jobGrade
|
jobGrade
|
||||||
|
|
|
||||||
|
|
@ -361,6 +361,12 @@ export default class JobLevel extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
log = () => {
|
||||||
|
window.setLogViewProp({
|
||||||
|
logMoudleType: 2,
|
||||||
|
keys: new Date().getTime(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
||||||
|
|
@ -287,6 +287,14 @@ export default class RankScheme extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
log = () => {
|
||||||
|
window.setLogViewProp({
|
||||||
|
logMoudleType: 1,
|
||||||
|
keys: new Date().getTime(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
handleSave() {
|
handleSave() {
|
||||||
const {
|
const {
|
||||||
rankScheme
|
rankScheme
|
||||||
|
|
|
||||||
|
|
@ -163,6 +163,14 @@ export default class Resource extends React.Component {
|
||||||
this[item.menuFun] && this[item.menuFun]();
|
this[item.menuFun] && this[item.menuFun]();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
log = () => {
|
||||||
|
window.setLogViewProp({
|
||||||
|
logMoudleType: 11,
|
||||||
|
keys: new Date().getTime(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
new() {
|
new() {
|
||||||
const {
|
const {
|
||||||
resource
|
resource
|
||||||
|
|
|
||||||
|
|
@ -362,6 +362,12 @@ export default class Sequence extends React.Component {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
log = () => {
|
||||||
|
window.setLogViewProp({
|
||||||
|
logMoudleType: 4,
|
||||||
|
keys: new Date().getTime(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,14 @@ export default class Staff extends React.Component {
|
||||||
staff.getForm();
|
staff.getForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
log = () => {
|
||||||
|
window.setLogViewProp({
|
||||||
|
logMoudleType: 13,
|
||||||
|
keys: new Date().getTime(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
batchDelete() {
|
batchDelete() {
|
||||||
const {
|
const {
|
||||||
staff
|
staff
|
||||||
|
|
|
||||||
|
|
@ -266,8 +266,9 @@ export default class StaffScheme extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
log = () => {
|
log = () => {
|
||||||
window.setLogViewProps({
|
window.setLogViewProp({
|
||||||
logSmallType: '3010',
|
logMoudleType: 12,
|
||||||
|
keys: new Date().getTime(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* @Author: 程亮
|
* @Author: 程亮
|
||||||
* @Date: 2022-06-09 10:16:00
|
* @Date: 2022-06-09 10:16:00
|
||||||
* @LastEditTime: 2022-06-29 17:23:37
|
* @LastEditTime: 2022-07-04 15:12:06
|
||||||
* @Description:
|
* @Description:
|
||||||
* @FilePath: /trunk/src4js/pc4mobx/organization/stores/fieldDefined.js
|
* @FilePath: /trunk/src4js/pc4mobx/organization/stores/fieldDefined.js
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,8 @@ import {ResourceExtendStore} from "./resourceExtend";
|
||||||
import {DatasImportStore} from "./datasImport";
|
import {DatasImportStore} from "./datasImport";
|
||||||
import {HrmImportResource} from "./importresource";
|
import {HrmImportResource} from "./importresource";
|
||||||
import {HrmImportCommon} from "./importCommon";
|
import {HrmImportCommon} from "./importCommon";
|
||||||
import {HrmBasicDataImport} from "./import"
|
import {HrmBasicDataImport} from "./import";
|
||||||
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
simpleOrgStore: new SimpleOrgStore(),
|
simpleOrgStore: new SimpleOrgStore(),
|
||||||
|
|
@ -47,5 +48,5 @@ module.exports = {
|
||||||
datasImport: new DatasImportStore(),
|
datasImport: new DatasImportStore(),
|
||||||
hrmImportResource:new HrmImportResource(),
|
hrmImportResource:new HrmImportResource(),
|
||||||
hrmImportCommon:new HrmImportCommon(),
|
hrmImportCommon:new HrmImportCommon(),
|
||||||
hrmBasicDataImport:new HrmBasicDataImport()
|
hrmBasicDataImport:new HrmBasicDataImport(),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,8 @@ export class JobStore {
|
||||||
@observable defaultShowLeft = true;
|
@observable defaultShowLeft = true;
|
||||||
@observable companysId = 1
|
@observable companysId = 1
|
||||||
@observable hasRight = '';
|
@observable hasRight = '';
|
||||||
|
@observable key = '';
|
||||||
|
@observable key1 = '';
|
||||||
@observable selectTreeNodeInfo;
|
@observable selectTreeNodeInfo;
|
||||||
saveAndSetting = false;
|
saveAndSetting = false;
|
||||||
|
|
||||||
|
|
@ -304,15 +305,97 @@ export class JobStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateConditions(data) {
|
updateConditions(data) {
|
||||||
this.form1.updateFields({
|
if (data.sequence_id) {
|
||||||
scheme_id: {
|
let label = "等级方案"
|
||||||
value: '',
|
const index = findIndex(this.condition[1].items, { label });
|
||||||
},
|
const schemeId = data.sequence_id.valueObj[0].scheme_values;
|
||||||
});
|
this.condition[1].items[index].browserConditionParam.replaceDatas = [{ name: data.sequence_id.valueObj[0].scheme_ids, id: schemeId }];
|
||||||
// const label = "等级方案"
|
//清空职等并限制范围
|
||||||
// const index = findIndex(this.condition[0].items, { label });
|
label = "职等"
|
||||||
// this.condition[0].items[index].browserConditionParam.replaceDatas = [{ name: data.sequence_id.valueObj[0].scheme_ids, id: "18" }];
|
const index1 = findIndex(this.condition[1].items, { label });
|
||||||
|
let currenttime = Date.now();
|
||||||
|
let key = `scheme_id_${currenttime}`;
|
||||||
|
const lastKey = this.key;
|
||||||
|
this.setKey(key);
|
||||||
|
|
||||||
|
Reflect.deleteProperty(this.condition[1].items[index1].browserConditionParam.completeParams, lastKey);
|
||||||
|
Reflect.deleteProperty(this.condition[1].items[index1].browserConditionParam.conditionDataParams, lastKey);
|
||||||
|
Reflect.deleteProperty(this.condition[1].items[index1].browserConditionParam.dataParams, lastKey);
|
||||||
|
Reflect.deleteProperty(this.condition[1].items[index1].browserConditionParam.destDataParams, lastKey);
|
||||||
|
|
||||||
|
this.condition[1].items[index1].browserConditionParam.completeParams = {
|
||||||
|
[key]: schemeId,
|
||||||
|
...this.condition[1].items[index1].browserConditionParam.completeParams,
|
||||||
|
currenttime: currenttime
|
||||||
|
}
|
||||||
|
this.condition[1].items[index1].browserConditionParam.conditionDataParams = {
|
||||||
|
[key]: schemeId,
|
||||||
|
...this.condition[1].items[index1].browserConditionParam.conditionDataParams,
|
||||||
|
currenttime: currenttime
|
||||||
|
}
|
||||||
|
this.condition[1].items[index1].browserConditionParam.dataParams = {
|
||||||
|
[key]: schemeId,
|
||||||
|
...this.condition[1].items[index1].browserConditionParam.dataParams,
|
||||||
|
currenttime: currenttime
|
||||||
|
}
|
||||||
|
this.condition[1].items[index1].browserConditionParam.destDataParams = {
|
||||||
|
[key]: schemeId,
|
||||||
|
...this.condition[1].items[index1].browserConditionParam.destDataParams,
|
||||||
|
currenttime: currenttime
|
||||||
|
}
|
||||||
|
|
||||||
|
this.form.updateFields({
|
||||||
|
levelId: {
|
||||||
|
value: ''
|
||||||
|
},
|
||||||
|
grade_id: {
|
||||||
|
value: ''
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
|
||||||
|
//清空职级并限制范围
|
||||||
|
let label = "职级"
|
||||||
|
const index2 = findIndex(this.condition[1].items, { label });
|
||||||
|
let currenttime = Date.now();
|
||||||
|
let key1 = `level_id_${currenttime}`;
|
||||||
|
const lastKey = this.key1;
|
||||||
|
this.key1 = key1;
|
||||||
|
const levelId = data.level_id.value;
|
||||||
|
Reflect.deleteProperty(this.condition[1].items[index2].browserConditionParam.completeParams, lastKey);
|
||||||
|
Reflect.deleteProperty(this.condition[1].items[index2].browserConditionParam.conditionDataParams, lastKey);
|
||||||
|
Reflect.deleteProperty(this.condition[1].items[index2].browserConditionParam.dataParams, lastKey);
|
||||||
|
Reflect.deleteProperty(this.condition[1].items[index2].browserConditionParam.destDataParams, lastKey);
|
||||||
|
|
||||||
|
this.condition[1].items[index2].browserConditionParam.completeParams = {
|
||||||
|
[key1]: levelId,
|
||||||
|
...this.condition[1].items[index2].browserConditionParam.completeParams,
|
||||||
|
currenttime: currenttime
|
||||||
|
}
|
||||||
|
this.condition[1].items[index2].browserConditionParam.conditionDataParams = {
|
||||||
|
[key1]: levelId,
|
||||||
|
...this.condition[1].items[index2].browserConditionParam.conditionDataParams,
|
||||||
|
currenttime: currenttime
|
||||||
|
}
|
||||||
|
this.condition[1].items[index2].browserConditionParam.dataParams = {
|
||||||
|
[key1]: levelId,
|
||||||
|
...this.condition[1].items[index2].browserConditionParam.dataParams,
|
||||||
|
currenttime: currenttime
|
||||||
|
}
|
||||||
|
this.condition[1].items[index2].browserConditionParam.destDataParams = {
|
||||||
|
[key]: levelId,
|
||||||
|
...this.condition[1].items[index2].browserConditionParam.destDataParams,
|
||||||
|
currenttime: currenttime
|
||||||
|
}
|
||||||
|
|
||||||
|
this.form.updateFields({
|
||||||
|
grade_id: {
|
||||||
|
value: ''
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.setCondition(this.condition, false);
|
||||||
|
this.form1.initFormFields(this.condition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -482,4 +565,8 @@ export class JobStore {
|
||||||
this.mergeCondition = mergeCondition;
|
this.mergeCondition = mergeCondition;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setKey(key) {
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -51,39 +51,39 @@ export class JobGradeStore {
|
||||||
@observable hasRight = true;
|
@observable hasRight = true;
|
||||||
@observable treeLoading = true;
|
@observable treeLoading = true;
|
||||||
|
|
||||||
@observable treeConfig = {
|
@observable treeConfig = {
|
||||||
data: [],
|
data: [],
|
||||||
selectedKeys: [],
|
selectedKeys: [],
|
||||||
treeExpandKeys: [],
|
treeExpandKeys: [],
|
||||||
onExpand: (keys) => {
|
onExpand: (keys) => {
|
||||||
this.treeConfig.treeExpandKeys = keys;
|
this.treeConfig.treeExpandKeys = keys;
|
||||||
},
|
},
|
||||||
onSelectedTreeNode: (key, count, countType) => {
|
onSelectedTreeNode: (key, count, countType) => {
|
||||||
this.treeConfig.selectedKeys = [key];
|
this.treeConfig.selectedKeys = [key];
|
||||||
this.selectedTreeNodeInfo = countType.node.props.data;
|
this.selectedTreeNodeInfo = countType.node.props.data;
|
||||||
this.getTableInfo();
|
this.getTableInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//选中树节点的信息
|
//选中树节点的信息
|
||||||
@observable selectedTreeNodeInfo;
|
@observable selectedTreeNodeInfo;
|
||||||
|
|
||||||
@action initData = () => {
|
@action initData = () => {
|
||||||
this.selectedTreeNodeInfo = null;
|
this.selectedTreeNodeInfo = null;
|
||||||
this.treeConfig.treeExpandKeys.length = 0;
|
this.treeConfig.treeExpandKeys.length = 0;
|
||||||
Api.getTree().then(res => {
|
Api.getTree().then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
if (res.data.length > 0) {
|
if (res.data.length > 0) {
|
||||||
this.treeConfig.data = res.data;
|
this.treeConfig.data = res.data;
|
||||||
this.treeConfig.selectedKeys = [res.data[0].key];
|
this.treeConfig.selectedKeys = [res.data[0].key];
|
||||||
this.treeConfig.treeExpandKeys = "-1";
|
this.treeConfig.treeExpandKeys = "-1";
|
||||||
this.selectedTreeNodeInfo = res.data[0];
|
this.selectedTreeNodeInfo = res.data[0];
|
||||||
this.getTableInfo();
|
this.getTableInfo();
|
||||||
this.setTreeLoading(false);
|
this.setTreeLoading(false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message.error(res.msg);
|
message.error(res.msg);
|
||||||
}
|
}
|
||||||
}, error => { })
|
}, error => { })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -278,15 +278,34 @@ export class JobGradeStore {
|
||||||
|
|
||||||
updateConditions(val) {
|
updateConditions(val) {
|
||||||
let currenttime = Date.now();
|
let currenttime = Date.now();
|
||||||
let key = `schemId_${currenttime}`;
|
let key = `scheme_id_${currenttime}`;
|
||||||
const lastKey = this.key;
|
const lastKey = this.key;
|
||||||
Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.dataParams,lastKey)
|
Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.completeParams, lastKey);
|
||||||
|
Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.conditionDataParams, lastKey);
|
||||||
|
Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.dataParams, lastKey);
|
||||||
|
Reflect.deleteProperty(this.condition[0].items[4].browserConditionParam.destDataParams, lastKey);
|
||||||
this.setKey(key);
|
this.setKey(key);
|
||||||
|
this.condition[0].items[4].browserConditionParam.completeParams = {
|
||||||
|
[key]: val,
|
||||||
|
...this.condition[0].items[4].browserConditionParam.completeParams,
|
||||||
|
currenttime: currenttime
|
||||||
|
}
|
||||||
|
this.condition[0].items[4].browserConditionParam.conditionDataParams = {
|
||||||
|
[key]: val,
|
||||||
|
...this.condition[0].items[4].browserConditionParam.conditionDataParams,
|
||||||
|
currenttime: currenttime
|
||||||
|
}
|
||||||
this.condition[0].items[4].browserConditionParam.dataParams = {
|
this.condition[0].items[4].browserConditionParam.dataParams = {
|
||||||
[key]:val,
|
[key]: val,
|
||||||
...this.condition[0].items[4].browserConditionParam.dataParams,
|
...this.condition[0].items[4].browserConditionParam.dataParams,
|
||||||
currenttime: currenttime
|
currenttime: currenttime
|
||||||
}
|
}
|
||||||
|
this.condition[0].items[4].browserConditionParam.destDataParams = {
|
||||||
|
[key]: val,
|
||||||
|
...this.condition[0].items[4].browserConditionParam.destDataParams,
|
||||||
|
currenttime: currenttime
|
||||||
|
}
|
||||||
|
|
||||||
this.form.updateFields({
|
this.form.updateFields({
|
||||||
levelId: {
|
levelId: {
|
||||||
value: ''
|
value: ''
|
||||||
|
|
@ -396,7 +415,7 @@ export class JobGradeStore {
|
||||||
this.rightMenu = rightMenu;
|
this.rightMenu = rightMenu;
|
||||||
}
|
}
|
||||||
|
|
||||||
setKey (key) {
|
setKey(key) {
|
||||||
this.key = key;
|
this.key = key;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
import {
|
||||||
|
observable,
|
||||||
|
action
|
||||||
|
} from 'mobx';
|
||||||
|
import * as mobx from 'mobx';
|
||||||
|
import * as Api from '../apis/logview';
|
||||||
|
import {
|
||||||
|
WeaForm
|
||||||
|
} from 'comsMobx';
|
||||||
|
import {
|
||||||
|
WeaTableNew
|
||||||
|
} from 'comsMobx';
|
||||||
|
import {
|
||||||
|
Modal,
|
||||||
|
message,
|
||||||
|
} from 'antd'
|
||||||
|
import {
|
||||||
|
i18n
|
||||||
|
} from '../public/i18n';
|
||||||
|
|
||||||
|
const toJS = mobx.toJS;
|
||||||
|
const {
|
||||||
|
TableStore
|
||||||
|
} = WeaTableNew;
|
||||||
|
|
||||||
|
export class LogViewStore {
|
||||||
|
@observable tableStore = new TableStore();
|
||||||
|
@observable searchCondition = [];
|
||||||
|
@observable form = new WeaForm();
|
||||||
|
@observable conditionNum = 20;
|
||||||
|
@observable searchConditionLoading = false;
|
||||||
|
@observable visible = false;
|
||||||
|
@observable dialogLoading = false;
|
||||||
|
@observable moduleType = ""; //模块类型
|
||||||
|
|
||||||
|
init(logMoudleType) {
|
||||||
|
this.setModuleType(logMoudleType);
|
||||||
|
this.getTableInfo();
|
||||||
|
this.getSearchCondition();
|
||||||
|
}
|
||||||
|
|
||||||
|
@action getTableInfo() {
|
||||||
|
let params = {
|
||||||
|
...this.form.getFormParams(),
|
||||||
|
moduleType: this.moduleType
|
||||||
|
}
|
||||||
|
this.tableStore = new TableStore();
|
||||||
|
Api.getLogList(params).then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
res.data.datas && this.tableStore.getDatas(res.data.datas, 1);
|
||||||
|
} else {
|
||||||
|
message.warning(res.msg);
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@action getSearchCondition() {
|
||||||
|
this.setSearchConditionLoading(true);
|
||||||
|
Api.getAdvanceSearchCondition().then(res => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
this.setSearchConditionLoading(false);
|
||||||
|
res.data.conditions && this.setSearchCondition(res.data.conditions);
|
||||||
|
res.data.conditions && this.form.initFormFields(res.data.conditions);
|
||||||
|
} else {
|
||||||
|
message.warning(res.msg);
|
||||||
|
}
|
||||||
|
}, error => {
|
||||||
|
message.warning(error.msg);
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
setDialogLoading(bool) {
|
||||||
|
this.dialogLoading = bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
isEmptyObject(obj) {
|
||||||
|
for (let key in obj) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
setSearchCondition(searchCondition) {
|
||||||
|
this.searchCondition = searchCondition;
|
||||||
|
}
|
||||||
|
|
||||||
|
setSearchConditionLoading(bool) {
|
||||||
|
this.searchConditionLoading = bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
scLoadingReset() {
|
||||||
|
this.searchConditionLoading = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
setVisable(bool) {
|
||||||
|
this.visible = bool;
|
||||||
|
}
|
||||||
|
|
||||||
|
setModuleType(moduleType) {
|
||||||
|
this.moduleType = moduleType;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue