bug修复
This commit is contained in:
parent
f9cb61f140
commit
ebf82547d2
|
|
@ -144,6 +144,7 @@ export default class FieldDefined extends Component {
|
|||
}
|
||||
}
|
||||
let children = [];
|
||||
debugger
|
||||
if (hasRight) {
|
||||
const {
|
||||
data,
|
||||
|
|
@ -186,7 +187,7 @@ export default class FieldDefined extends Component {
|
|||
}
|
||||
|
||||
return (
|
||||
hasRight && <div className="hrm_module_container fieldDef">
|
||||
<div className="hrm_module_container fieldDef">
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ export default class Resource extends React.Component {
|
|||
const {
|
||||
resource
|
||||
} = this.props;
|
||||
resource.getTableInfo();
|
||||
resource.getHasRight();
|
||||
resource.getTableInfo();
|
||||
}
|
||||
|
||||
//左侧树
|
||||
|
|
@ -116,6 +116,35 @@ export default class Resource extends React.Component {
|
|||
</div>
|
||||
}
|
||||
|
||||
treeNodeClick = (event, ids, nodeids, nodes) => {
|
||||
const {
|
||||
resource
|
||||
} = this.props;
|
||||
const {
|
||||
form2,
|
||||
companysId
|
||||
} = resource;
|
||||
const type = event.node.props.type || '0';
|
||||
const id = event.node.props.id || '';
|
||||
let params = {};
|
||||
form2.resetConditionValue();
|
||||
resource.setPanelStatus(false)
|
||||
// resource.tabkey = 'default_3';
|
||||
resource.nodeType = type;
|
||||
if (type == '0') {
|
||||
params['virtualtype'] = companysId;
|
||||
}
|
||||
if (type == '1') {
|
||||
params['companyId'] = id;
|
||||
}
|
||||
if (type == '2') {
|
||||
params['departmentId'] = id;
|
||||
}
|
||||
if (type == '3') {
|
||||
params['jobTitle'] = id;
|
||||
}
|
||||
resource.doSearch(params);
|
||||
}
|
||||
|
||||
getTopMenuBtns() {
|
||||
const {
|
||||
|
|
@ -273,7 +302,7 @@ export default class Resource extends React.Component {
|
|||
form2
|
||||
} = resource;
|
||||
|
||||
resource.setSchemeName(val);
|
||||
resource.setLastName(val);
|
||||
!this.isEmptyObject(form2.getFormParams()) && resource.updateFields(val);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,6 @@ export class DepartmentStore {
|
|||
})
|
||||
}
|
||||
|
||||
//删除
|
||||
delete() {
|
||||
let params = {
|
||||
ids: this.ids
|
||||
|
|
@ -194,7 +193,6 @@ export class DepartmentStore {
|
|||
|
||||
|
||||
getDeptForm() {
|
||||
|
||||
this.setDialogLoadingStatus(true);
|
||||
Api.getDeptForm(this.selectTreeNodeInfo).then(res => {
|
||||
if (res.code === 200) {
|
||||
|
|
@ -209,8 +207,7 @@ export class DepartmentStore {
|
|||
})
|
||||
}
|
||||
|
||||
@action("合并部门")
|
||||
getMergeForm(id) {
|
||||
@action("合并部门") getMergeForm(id) {
|
||||
let params = {
|
||||
id: id
|
||||
};
|
||||
|
|
@ -228,8 +225,7 @@ export class DepartmentStore {
|
|||
})
|
||||
}
|
||||
|
||||
@action("转移部门")
|
||||
getTransferForm(id) {
|
||||
@action("转移部门") getTransferForm(id) {
|
||||
let params = {
|
||||
id: id
|
||||
};
|
||||
|
|
@ -247,8 +243,7 @@ export class DepartmentStore {
|
|||
})
|
||||
}
|
||||
|
||||
@action("复制表单")
|
||||
getCopyForm() {
|
||||
@action("复制表单") getCopyForm() {
|
||||
let params = {};
|
||||
Api.getCopyForm(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
|
|
@ -366,8 +361,7 @@ export class DepartmentStore {
|
|||
}
|
||||
|
||||
|
||||
@action
|
||||
getHasRight() {
|
||||
@action getHasRight() {
|
||||
Api.getHasRight().then(res => {
|
||||
if (res.code === 200) {
|
||||
res.data.rightMenu && this.setRightMenu(res.data.rightMenu);
|
||||
|
|
|
|||
|
|
@ -107,7 +107,9 @@ export class JobGradeStore {
|
|||
Api.getSearchList(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setHasRight(res.data.hasRight);
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
if(res.data.hasRight) {
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
}
|
||||
} else {
|
||||
message.warning(res.msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -107,7 +107,9 @@ export class JobLevelStore {
|
|||
Api.getSearchList(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setHasRight(res.data.hasRight);
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
if(res.data.hasRight) {
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
}
|
||||
} else {
|
||||
message.warning(res.msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,11 +212,11 @@ export class NewImportStore {
|
|||
this.pvisable = true;
|
||||
//导入文件提交
|
||||
let params = {
|
||||
...this.importParams,
|
||||
keyField:this.keyField,
|
||||
importType:this.importType,
|
||||
operateType:this.operateType,
|
||||
excelfile:this.excelfile
|
||||
excelfile:this.excelfile,
|
||||
...this.importParams,
|
||||
}
|
||||
if (this.otherParams != null) {
|
||||
Object.assign(params, {
|
||||
|
|
|
|||
|
|
@ -100,7 +100,9 @@ export class OfficeManageStore {
|
|||
API.getPostInfoTable(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setHasRight(res.data.hasRight);
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
if(res.data.hasRight) {
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
}
|
||||
} else {
|
||||
message.error(res.msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,9 @@ export class RankSchemeStore {
|
|||
Api.getSearchList(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setHasRight(res.data.hasRight);
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
if(res.data.hasRight){
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
}
|
||||
} else {
|
||||
message.warning(res.msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,8 +36,7 @@ const {
|
|||
@observable isPanelShow = false; //高级搜索面板
|
||||
@observable form2 = new WeaForm();
|
||||
@observable form = new WeaForm();
|
||||
@observable form1 = new WeaForm();
|
||||
@observable schemeName = '';
|
||||
@observable lastName = '';
|
||||
@observable conditionNum = 8;
|
||||
@observable ids = ''; //选择行id
|
||||
@observable searchConditionLoading = true;
|
||||
|
|
@ -49,20 +48,23 @@ const {
|
|||
|
||||
@observable defaultShowLeft = true;
|
||||
@observable companysId = 1
|
||||
@observable hasRight = true;
|
||||
@observable hasRight = '';
|
||||
|
||||
@observable selectTreeNodeInfo;
|
||||
|
||||
|
||||
@action
|
||||
getTableInfo() {
|
||||
@action getTableInfo() {
|
||||
let params;
|
||||
this.tableStore = new TableStore();
|
||||
if (this.isEmptyObject(this.form2.getFormParams())) {
|
||||
params = {
|
||||
...this.selectTreeNodeInfo,
|
||||
...this.form2.getFormParams(),
|
||||
schemeName: this.schemeName
|
||||
lastName: this.lastName
|
||||
};
|
||||
} else {
|
||||
params = {
|
||||
...this.selectTreeNodeInfo,
|
||||
...this.form2.getFormParams()
|
||||
};
|
||||
}
|
||||
|
|
@ -76,7 +78,11 @@ const {
|
|||
}, error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
}
|
||||
|
||||
@action("nodetree事件") doSearch(params) {
|
||||
this.selectTreeNodeInfo = params;
|
||||
this.getTableInfo();
|
||||
}
|
||||
|
||||
save() {
|
||||
|
|
@ -105,25 +111,6 @@ const {
|
|||
});
|
||||
}
|
||||
|
||||
updateForbiddenTag(checked, id) {
|
||||
let params = {
|
||||
forbiddenTag: checked,
|
||||
id: id
|
||||
}
|
||||
Api.updateForbiddenTag(params).then(response => {
|
||||
return response.json()
|
||||
}).then(data => {
|
||||
if (data.code === 200) {
|
||||
message.success(data.msg);
|
||||
} else {
|
||||
message.warning(data.msg);
|
||||
}
|
||||
}).catch(error => {
|
||||
message.warning(error.msg);
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
getForm() {
|
||||
let params = this.isNew ? {} : {
|
||||
id: this.schemeId
|
||||
|
|
@ -160,10 +147,10 @@ const {
|
|||
}
|
||||
|
||||
|
||||
@action
|
||||
getHasRight() {
|
||||
@action getHasRight() {
|
||||
Api.getHasRight().then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setHasRight(res.data.hasRight);
|
||||
res.data.rightMenu && this.setRightMenu(res.data.rightMenu);
|
||||
res.data.topMenu && this.setTopMenu(res.data.topMenu);
|
||||
} else {
|
||||
|
|
@ -184,7 +171,7 @@ const {
|
|||
|
||||
updateFields(val) {
|
||||
this.form2.updateFields({
|
||||
schemeName: {
|
||||
lastName: {
|
||||
value: val
|
||||
}
|
||||
});
|
||||
|
|
@ -206,8 +193,8 @@ const {
|
|||
}
|
||||
}
|
||||
|
||||
setSchemeName(val) {
|
||||
this.schemeName = val;
|
||||
setLastName(val) {
|
||||
this.lastName = val;
|
||||
}
|
||||
|
||||
isEmptyObject(obj) {
|
||||
|
|
@ -260,7 +247,6 @@ const {
|
|||
this.schemeId = schemeId;
|
||||
}
|
||||
|
||||
@action
|
||||
setDate(date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
|
@ -276,6 +262,5 @@ const {
|
|||
setHasRight(bool) {
|
||||
this.hasRight = bool;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -69,7 +69,9 @@ export class SequenceStore {
|
|||
Api.getSearchList(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setHasRight(res.data.hasRight);
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
if(res.data.hasRight){
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
}
|
||||
} else {
|
||||
message.warning(res.msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -75,7 +75,9 @@ export class StaffStore {
|
|||
Api.getSearchList(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setHasRight(res.data.hasRight);
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
if(res.data.hasRight) {
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
}
|
||||
} else {
|
||||
message.warning(res.msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -68,8 +68,10 @@ export class StaffSchemeStore {
|
|||
}
|
||||
Api.getSearchList(params).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.setHasRight(res.data.hasRight)
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
this.setHasRight(res.data.hasRight);
|
||||
if(res.data.hasRight) {
|
||||
isOnChange ? this.tableStore.getDatas(res.data.datas, current) : this.tableStore.getDatas(res.data.datas,1);
|
||||
}
|
||||
} else {
|
||||
message.warning(res.msg);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,9 +82,9 @@
|
|||
}
|
||||
|
||||
//dialog弹框中下拉框组件宽度的样式问题
|
||||
.new-edit-wrapper{
|
||||
.wea-select, .ant-select{
|
||||
width: 100%;
|
||||
.new-edit-wrapper{
|
||||
.wea-select, .ant-select{
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue