大王椰项目ebu需求完成
This commit is contained in:
parent
eda449c02a
commit
449d872812
|
|
@ -77,16 +77,34 @@ const DragTree = () => {
|
|||
|
||||
let pos = dropPosition == 0 ? '内部' : '下方';
|
||||
let title = `确定将【${info.dragNode.title}】移到 【${info.node.title}】${pos}`;
|
||||
|
||||
Modal.confirm({
|
||||
title: '转移操作(仅转移到内部时工作流提醒生效)',
|
||||
content: title,
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk() {
|
||||
async onOk() {
|
||||
setLoading(true);
|
||||
setTip('正在转移,请稍候...');
|
||||
|
||||
if (dropPosition == 0) {
|
||||
let extend = 'dept';
|
||||
let tranfeserType = 1;
|
||||
if (dragKey.slice(0, 1).toLowerCase() === 's') {
|
||||
extend = 'comp';
|
||||
tranfeserType = 2;
|
||||
}
|
||||
if (dropKey.slice(0, 1).toLowerCase() === 's') {
|
||||
tranfeserType = 2;
|
||||
}
|
||||
await messageRemind(
|
||||
extend,
|
||||
'MOVE',
|
||||
dragKey.slice(1),
|
||||
false,
|
||||
dropKey.slice(1),
|
||||
'',
|
||||
tranfeserType,
|
||||
);
|
||||
}
|
||||
fetch('/api/bs/hrmorganization/dept/dragDepartment', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
|
@ -144,26 +162,6 @@ const DragTree = () => {
|
|||
}
|
||||
setGData(data);
|
||||
message.success('转移成功', 2);
|
||||
if (dropPosition == 0) {
|
||||
let extend = 'dept';
|
||||
let tranfeserType = 1;
|
||||
if (dragKey.slice(0, 1).toLowerCase() === 's') {
|
||||
extend = 'comp';
|
||||
tranfeserType = 2;
|
||||
}
|
||||
if (dropKey.slice(0, 1).toLowerCase() === 's') {
|
||||
tranfeserType = 2;
|
||||
}
|
||||
messageRemind(
|
||||
extend,
|
||||
'MOVE',
|
||||
dragKey.slice(1),
|
||||
false,
|
||||
dropKey.slice(1),
|
||||
'',
|
||||
tranfeserType,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
message.warning(res.msg, 2);
|
||||
}
|
||||
|
|
@ -184,6 +182,7 @@ const DragTree = () => {
|
|||
const onDelete = (nodeData) => {
|
||||
const extend = nodeData.type == '1' ? 'comp' : 'dept';
|
||||
let id = nodeData.id.substring(1);
|
||||
let title = nodeData.title;
|
||||
fetch(`/api/bs/hrmorganization/${extend}/deleteByIds`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
|
|
@ -201,7 +200,7 @@ const DragTree = () => {
|
|||
});
|
||||
setGData(data);
|
||||
message.success('删除成功', 2);
|
||||
messageRemind(extend, 'DELETE', id);
|
||||
messageRemind(extend, 'DELETE', title);
|
||||
} else {
|
||||
message.warning(res.data.message, 2);
|
||||
}
|
||||
|
|
@ -224,50 +223,55 @@ const DragTree = () => {
|
|||
mergeName = '',
|
||||
tranfeserType = null,
|
||||
) => {
|
||||
let params = {
|
||||
workflowId: 1,
|
||||
operateType: operateType,
|
||||
mergeName: mergeName,
|
||||
type: type,
|
||||
canceled: canceled,
|
||||
tranfeserType: tranfeserType,
|
||||
};
|
||||
if (type == 'dept') {
|
||||
params = {
|
||||
...params,
|
||||
departmentIdFrom: fromId,
|
||||
debugger;
|
||||
return new Promise((reslove, reject) => {
|
||||
let params = {
|
||||
workflowId: 1,
|
||||
operateType: operateType,
|
||||
mergeName: mergeName,
|
||||
type: type,
|
||||
canceled: canceled,
|
||||
tranfeserType: tranfeserType,
|
||||
};
|
||||
if (tranfeserType == 2) {
|
||||
if (type == 'dept') {
|
||||
params = {
|
||||
...params,
|
||||
subCompanyIdTo: toId,
|
||||
departmentIdFrom: fromId,
|
||||
};
|
||||
if (tranfeserType == 2) {
|
||||
params = {
|
||||
...params,
|
||||
subCompanyIdTo: toId,
|
||||
};
|
||||
} else {
|
||||
params = {
|
||||
...params,
|
||||
departmentIdTo: toId,
|
||||
};
|
||||
}
|
||||
} else {
|
||||
params = {
|
||||
...params,
|
||||
departmentIdTo: toId,
|
||||
subCompanyIdFrom: fromId,
|
||||
subCompanyIdTo: toId,
|
||||
};
|
||||
}
|
||||
} else {
|
||||
params = {
|
||||
...params,
|
||||
subCompanyIdFrom: fromId,
|
||||
subCompanyIdTo: toId,
|
||||
};
|
||||
}
|
||||
|
||||
fetch('/api/bs/hrmorganization/remind/quickly/workflow/message', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.then((res) => {})
|
||||
.catch((error) => {
|
||||
message.error('系统默认工作流提醒失败');
|
||||
});
|
||||
fetch('/api/bs/hrmorganization/remind/quickly/workflow/message', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
})
|
||||
.then((response) => response.json())
|
||||
.then((res) => {
|
||||
reslove();
|
||||
})
|
||||
.catch((error) => {
|
||||
message.error('系统默认工作流提醒失败');
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -442,7 +446,7 @@ const DragTree = () => {
|
|||
>
|
||||
查看
|
||||
</span>
|
||||
<Popconfirm
|
||||
{/**<Popconfirm
|
||||
title={`确认要删除[${nodeData.title}] 吗?`}
|
||||
onConfirm={() => onDelete(nodeData)}
|
||||
okText="确认"
|
||||
|
|
@ -450,6 +454,7 @@ const DragTree = () => {
|
|||
>
|
||||
<span className="drag-button">删除</span>
|
||||
</Popconfirm>
|
||||
**/}
|
||||
<Popconfirm
|
||||
title={`确认要封存或恢复 [${nodeData.title}] 吗?`}
|
||||
onConfirm={() => onCancel(nodeData)}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export default function userPage() {
|
|||
// 获取数据
|
||||
useEffect(() => {
|
||||
document.cookie =
|
||||
'ecology_JSessionid=aaawGLaPO07RO41dNaL5y; JSESSIONID=aaawGLaPO07RO41dNaL5y; languageidweaver=7; Systemlanguid=7; loginuuids=1; loginidweaver=sysadmin; __randcode__=400d6da3-3b22-4eed-b772-a4d96d08b9af';
|
||||
'ecology_JSessionid=aaayMjvxCzkVJaNpQnW7y; JSESSIONID=aaayMjvxCzkVJaNpQnW7y; __randcode__=d1d05beb-637c-4417-bee5-e7ee0061eb7e; Systemlanguid=7; languageidweaver=7; loginidweaver=sysadmin;';
|
||||
d3.json(
|
||||
'/api/bs/hrmorganization/orgchart/userData?fclass=0&fisvitual=0&root=0&level=3&id=0',
|
||||
).then((data) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue