From 1d9ac506e84623387ead2d1ef286cb18247a0729 Mon Sep 17 00:00:00 2001
From: Chengliang <1546584672@qq.com>
Date: Thu, 18 Aug 2022 17:42:15 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9D=83=E9=99=90=E5=AE=8C=E5=96=84?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/organization/apis/newImport.js | 5 +++++
.../fieldDefinedSet/FieldDefined.js | 4 ++--
.../components/newImport/index.js | 19 ++++++++++++++-----
.../components/office/officeManage.js | 2 +-
.../components/postionrank/JobGrade.js | 2 +-
pc4mobx/organization/stores/fieldDefined.js | 4 +++-
pc4mobx/organization/stores/jobgrade.js | 2 +-
pc4mobx/organization/stores/newImport.js | 13 +++++++++++++
pc4mobx/organization/stores/officeManage.js | 2 +-
9 files changed, 41 insertions(+), 12 deletions(-)
diff --git a/pc4mobx/organization/apis/newImport.js b/pc4mobx/organization/apis/newImport.js
index e334637..eac6738 100644
--- a/pc4mobx/organization/apis/newImport.js
+++ b/pc4mobx/organization/apis/newImport.js
@@ -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);
diff --git a/pc4mobx/organization/components/fieldDefinedSet/FieldDefined.js b/pc4mobx/organization/components/fieldDefinedSet/FieldDefined.js
index c2812e6..26239ac 100644
--- a/pc4mobx/organization/components/fieldDefinedSet/FieldDefined.js
+++ b/pc4mobx/organization/components/fieldDefinedSet/FieldDefined.js
@@ -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,
diff --git a/pc4mobx/organization/components/newImport/index.js b/pc4mobx/organization/components/newImport/index.js
index 07a5237..8ce9ed4 100644
--- a/pc4mobx/organization/components/newImport/index.js
+++ b/pc4mobx/organization/components/newImport/index.js
@@ -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 (
-