commit
95afc993f0
|
|
@ -1,5 +1,10 @@
|
|||
import { WeaTools } from 'ecCom'
|
||||
|
||||
//导入页面权限
|
||||
export const getHasRight = () => {
|
||||
return WeaTools.callApi(`/api/bs/hrmorganization/commonimport/getHasRight`, 'GET');
|
||||
}
|
||||
|
||||
//选择导入字段
|
||||
export const getImportFields = (params) => {
|
||||
return WeaTools.callApi(`/api/bs/hrmorganization/commonimport/getImportFields`, 'GET', params);
|
||||
|
|
|
|||
|
|
@ -87,7 +87,8 @@ export default class FieldDefined extends Component {
|
|||
} = this.props, {
|
||||
//containerInitFinished,//权限验证
|
||||
refreshMainTabComponent,
|
||||
spinning
|
||||
spinning,
|
||||
hasRight
|
||||
} = store, {
|
||||
type: moduleType
|
||||
} = params, {
|
||||
|
|
@ -143,7 +144,6 @@ export default class FieldDefined extends Component {
|
|||
}
|
||||
}
|
||||
let children = [];
|
||||
const hasRight = true;//todo
|
||||
if (hasRight) {
|
||||
const {
|
||||
data,
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ import {
|
|||
import '../../style/import.css';
|
||||
import { addContentPath } from '../../util/index.js';
|
||||
import StepDialog from './stepDialog';
|
||||
import { renderNoright } from '../../util';
|
||||
|
||||
|
||||
|
||||
@inject("newImport")
|
||||
|
|
@ -34,12 +36,14 @@ export default class newImport extends React.Component {
|
|||
})
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
|
||||
componentDidMount() {
|
||||
const {newImport} = this.props;
|
||||
newImport.getHasRight();
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
componentWillMount() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -120,13 +124,18 @@ export default class newImport extends React.Component {
|
|||
const {
|
||||
newImport,
|
||||
} = this.props, {
|
||||
visible
|
||||
visible,
|
||||
hasRight
|
||||
} = newImport, {
|
||||
title,
|
||||
} = this.state;
|
||||
|
||||
if (hasRight === false) {
|
||||
return renderNoright();
|
||||
}
|
||||
|
||||
return (
|
||||
<WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@sp0zb8`}
|
||||
hasRight && <WeaTop ecId={`${this && this.props && this.props.ecId || ''}_WeaTop@sp0zb8`}
|
||||
title={title}
|
||||
icon={<i className='icon-coms-hrm' />}
|
||||
iconBgcolor='#217346'
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ export default class OfficeManage extends Component {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="office-wapper">
|
||||
hasRight && <div className="office-wapper">
|
||||
<WeaLeftRightLayout
|
||||
isNew={true}
|
||||
leftWidth={310}
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ export default class JobGrade extends React.Component {
|
|||
treeExpandKeys
|
||||
} = toJS(treeConfig);
|
||||
const treeCom = (
|
||||
<WeaLeftTree ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftTree@ifgbi1`}
|
||||
hasRight && <WeaLeftTree ecId={`${this && this.props && this.props.ecId || ''}_WeaLeftTree@ifgbi1`}
|
||||
datas={data}
|
||||
searchLabel={"等级方案"}
|
||||
onSelect={onSelectedTreeNode}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @Author: 程亮
|
||||
* @Date: 2022-06-09 10:16:00
|
||||
* @LastEditTime: 2022-07-04 15:12:06
|
||||
* @LastEditTime: 2022-08-18 13:53:57
|
||||
* @Description:
|
||||
* @FilePath: /trunk/src4js/pc4mobx/organization/stores/fieldDefined.js
|
||||
*/
|
||||
|
|
@ -672,6 +672,7 @@ export class FieldDefinedStore extends HrmBaseStore {
|
|||
* @param {String} key [tabKey]
|
||||
* @return {null}
|
||||
*/
|
||||
@observable hasRight = '';
|
||||
@action setActiveTab = (tabConfig, key) => {
|
||||
tabConfig.activeTabKey = key || tabConfig.tabs[0].viewCondition;
|
||||
const tabIndex = this.getTabIndex(this.tabConfig.tabs, key);
|
||||
|
|
@ -697,6 +698,7 @@ export class FieldDefinedStore extends HrmBaseStore {
|
|||
datas,
|
||||
selectedData
|
||||
} = this.convertData(res.data.data, 'fieldDef');
|
||||
this.hasRight = res.data.hasRight;
|
||||
this.encryptEnable = res.data.encryptEnable;
|
||||
this.tableEditConfig.fieldDef.datas = datas;
|
||||
this.tableEditConfig.fieldDef.columns = this.getColumns();
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ export class JobGradeStore {
|
|||
@observable topTab = [];
|
||||
@observable topTabCount = {};
|
||||
@observable lastime = '';//
|
||||
@observable hasRight = true;
|
||||
@observable hasRight = '';
|
||||
@observable treeLoading = true;
|
||||
|
||||
@observable treeConfig = {
|
||||
|
|
|
|||
|
|
@ -40,6 +40,19 @@ import {
|
|||
|
||||
export class newImportStore {
|
||||
|
||||
@observable hasRight = '';
|
||||
@action getHasRight(){
|
||||
API.getHasRight().then(res => {
|
||||
if(res.code == 200) {
|
||||
this.hasRight = res.data.hasRight;
|
||||
}else {
|
||||
message.warning(res.msg);
|
||||
}
|
||||
},error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
}
|
||||
|
||||
/********************* cardConfig *********************/
|
||||
cardConfig = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ export class OfficeManageStore {
|
|||
@observable dialogLoading = false;
|
||||
@observable schemeId = "";
|
||||
@observable date = "";
|
||||
@observable hasRight = "";
|
||||
@observable hasRight = '';
|
||||
|
||||
@action
|
||||
setOfficeClassifyId(id) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue