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