feat:增加提交审核以及撤回审核

This commit is contained in:
lixg
2022-11-29 13:18:49 +08:00
parent d51df54728
commit 76bc15d926
10 changed files with 265 additions and 189 deletions

View File

@@ -1270,6 +1270,8 @@ export default {
deleteProjectId: null, //删除的项目id
templateProjectId: null, //存为模版的项目id
copyProjectId: null, //复制项目id
reviewId: null, //提交审核id
recallReviewId: null, //撤回审核id
selectProjectId: null, //选择的授权id
@@ -2212,13 +2214,29 @@ export default {
};
//打开提交审核弹窗
const showReviewModal = () => {
const showReviewModal = (projectId) => {
state.reviewModal = true;
state.reviewId = projectId;
};
//确认提交审核
const reviewProject = () => {
state.reviewModal = false;
message.success("提交成功");
let obj = {
projectId: state.reviewId,
type: 3,
};
console.log("提交审核obj", obj);
api
.handleProject(obj)
.then((res) => {
console.log("提交成功", res);
message.destroy();
message.success("提交成功");
state.reviewModal = false;
getTableDate();
})
.catch((err) => {
console.log("提交失败", err);
});
};
//关闭提交审核弹窗
const closeReviewModal = () => {
@@ -2226,13 +2244,29 @@ export default {
};
//打开撤回审核弹窗
const showRecallReviewModal = () => {
const showRecallReviewModal = (projectId) => {
state.recallReviewModal = true;
state.recallReviewId = projectId;
};
//确认提交审核
//确认撤回审核
const recallReviewProject = () => {
state.recallReviewModal = false;
message.success("撤回成功");
let obj = {
projectId: state.recallReviewId,
type: -3,
};
console.log("撤回成功obj", obj);
api
.handleProject(obj)
.then((res) => {
console.log("撤回成功", res);
message.destroy();
message.success("撤回成功");
state.recallReviewModal = false;
getTableDate();
})
.catch((err) => {
console.log("撤回成功", err);
});
};
//关闭提交审核弹窗
const closeRecallReviewModal = () => {
@@ -3090,7 +3124,7 @@ export default {
{value.record.status === 0 || value.record.status === -2 ? (
<span
onClick={() => {
showReviewModal();
showReviewModal(value.record.projectId);
}}
style="cursor:pointer"
class="operation3"
@@ -3100,7 +3134,7 @@ export default {
) : value.record.status === 1 ? (
<span
onClick={() => {
showRecallReviewModal();
showRecallReviewModal(value.record.projectId);
}}
style="cursor:pointer"
class="operation3"