完成v1.20
This commit is contained in:
parent
1dce448427
commit
ed990bcfb2
|
|
@ -103,7 +103,16 @@ export const deleteTree = (moduleName,params) => {
|
|||
})
|
||||
}
|
||||
|
||||
export const changeGroup = (moduleName, params = {}) => WeaTools.callApi(`/api/hrm/${moduleName}/changeGroup`, 'POST', params)
|
||||
export const changeGroup = (moduleName,params) => {
|
||||
return fetch(`/api/bs/hrmorganization/fieldDefined/${moduleName}/changeGroup`, {
|
||||
method: 'POST',
|
||||
mode: 'cors',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
body: JSON.stringify(params)
|
||||
})
|
||||
}
|
||||
|
||||
export const getEncryptFieldSettingForm = (params = {}) => WeaTools.callApi(`/api/encrypt/fieldsetting/getEncryptFieldSettingForm`, 'GET', params)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* @Author: 程亮
|
||||
* @Date: 2022-06-09 10:16:00
|
||||
* @LastEditTime: 2022-06-17 18:05:13
|
||||
* @LastEditTime: 2022-06-20 11:07:43
|
||||
* @Description:
|
||||
* @FilePath: /trunk/src4js/pc4mobx/organization/stores/fieldDefined.js
|
||||
*/
|
||||
|
|
@ -50,7 +50,7 @@ export class FieldDefinedStore extends HrmBaseStore {
|
|||
//override baseStore.tabConfig
|
||||
tabDef = {
|
||||
color: '#000000',
|
||||
groupId: '',
|
||||
//groupId: '',
|
||||
viewCondition: '1',
|
||||
topButtonDef: [{
|
||||
comType: 'button',
|
||||
|
|
@ -138,9 +138,14 @@ export class FieldDefinedStore extends HrmBaseStore {
|
|||
isDropBtn: true
|
||||
}
|
||||
]
|
||||
if (this.selectedTreeNodeInfo != null && this.selectedTreeNodeInfo.viewAttr != 1) {
|
||||
// if (this.selectedTreeNodeInfo != null && this.selectedTreeNodeInfo.viewAttr != 1) {
|
||||
// datas.splice(2, 1);
|
||||
// }
|
||||
|
||||
if (this.selectedTreeNodeInfo != null && !this.selectedTreeNodeInfo.addChild) {
|
||||
datas.splice(2, 1);
|
||||
}
|
||||
|
||||
return datas;
|
||||
}
|
||||
dropdownProps = () => ({
|
||||
|
|
@ -635,7 +640,7 @@ export class FieldDefinedStore extends HrmBaseStore {
|
|||
});
|
||||
if (tabArr.length > 0) {
|
||||
this.tabConfig.tabs = [...tabArr];
|
||||
// this.setTableEditColTitle();
|
||||
//this.setTableEditColTitle();
|
||||
this.setActiveTab(this.tabConfig, init ? '1' : !create ? this.tabConfig.activeTabKey : `${tabArr.length}`);
|
||||
// this.containerInitFinished = {
|
||||
// ...this.containerInitFinished,
|
||||
|
|
@ -1403,8 +1408,6 @@ export class FieldDefinedStore extends HrmBaseStore {
|
|||
if (p.domid === this.treeConfig.selectedKeys[0])
|
||||
this.selectedTreeNodeInfo = p;
|
||||
p.childs && p.childs.map(c => {
|
||||
|
||||
console.log(this.treeConfig.selectedKeys[0])
|
||||
if (c.domid === this.treeConfig.selectedKeys[0])
|
||||
this.selectedTreeNodeInfo = c;
|
||||
})
|
||||
|
|
@ -1446,16 +1449,6 @@ export class FieldDefinedStore extends HrmBaseStore {
|
|||
icon: this.menuIconCollection.setting
|
||||
//checkAction: 'childInfoOperability'
|
||||
});
|
||||
|
||||
// defaultType && !this.tableEditConfig.childInfoSetting.hasGroup && t.topButtonDef.push({
|
||||
// comType: 'button',
|
||||
// type: 'primary',
|
||||
// onClickHandle: this.removeTypeInfo,
|
||||
// label: i18n.button.delete(),
|
||||
// icon: this.menuIconCollection.setting
|
||||
// })
|
||||
|
||||
|
||||
} else {
|
||||
this.tableEditConfig.childInfoSetting.showTitle = false;
|
||||
this.tableEditConfig.childInfoSetting.showAdd = false;
|
||||
|
|
@ -1470,7 +1463,6 @@ export class FieldDefinedStore extends HrmBaseStore {
|
|||
}
|
||||
|
||||
|
||||
|
||||
if (this.selectedTreeNodeInfo.domid === '-1' || this.selectedTreeNodeInfo.addChild) {
|
||||
this.tableEditConfig.fieldDef.columns[2].com[0].options = remove(this.tableEditConfig.fieldDef.columns[1].com[0].options, (v) => v != 'upload');
|
||||
} else {
|
||||
|
|
@ -1853,7 +1845,7 @@ export class FieldDefinedStore extends HrmBaseStore {
|
|||
break;
|
||||
default:
|
||||
const groupid = e.key;
|
||||
const tabInfo = this.tabConfig.tabs[findIndex(this.tabConfig.tabs, { groupid })];
|
||||
const tabInfo = this.tabConfig.tabs[findIndex(this.tabConfig.tabs, {groupid })];
|
||||
let moveFieldConfirm = i18n.confirm.moveFieldConfirm().replace('{params}', tabInfo.title);
|
||||
this.changeGroup(moveFieldConfirm, groupid);
|
||||
}
|
||||
|
|
@ -1880,7 +1872,7 @@ export class FieldDefinedStore extends HrmBaseStore {
|
|||
})
|
||||
} else {
|
||||
Object.assign(params, {
|
||||
ids: ids.join(','),
|
||||
fieldids: ids.join(','),
|
||||
groupid
|
||||
});
|
||||
}
|
||||
|
|
@ -1895,16 +1887,18 @@ export class FieldDefinedStore extends HrmBaseStore {
|
|||
}
|
||||
|
||||
@action doChangeGroup = (params) => {
|
||||
api.changeGroup(this.moduleName, params).then(data => {
|
||||
if (data.status === '1') {
|
||||
api.changeGroup(this.moduleName, params).then(response => {
|
||||
return response.json()
|
||||
}).then(data => {
|
||||
if (data.code === 200) {
|
||||
message.success(i18n.message.moveSuccess());
|
||||
// if (this.moduleName.indexOf('resource') >= 0)
|
||||
this.getTabInfoByTreeNode();
|
||||
// else
|
||||
// this.initData();
|
||||
} else
|
||||
message.error(data.message);
|
||||
}, error => { message.error(i18n.message.actionError()); });
|
||||
} else {
|
||||
message.warning(data.msg);
|
||||
}
|
||||
}).catch(error => {
|
||||
message.error(i18n.message.actionError());
|
||||
})
|
||||
}
|
||||
|
||||
@observable encryptDialogVisible = false;
|
||||
|
|
|
|||
Loading…
Reference in New Issue