update:更新任务提交审批的模板选择逻辑
This commit is contained in:
@@ -379,6 +379,7 @@ const systemApproveQueryApproveFlowTempalteFun = async () => {
|
||||
if (res && res.code === 200) {
|
||||
templateList.value = res.data;
|
||||
const str = getTaskImportLevelFun();
|
||||
const plNames = getTaskInfoPlNames();
|
||||
|
||||
if (str) {
|
||||
if (str === '高') {
|
||||
@@ -397,7 +398,23 @@ const systemApproveQueryApproveFlowTempalteFun = async () => {
|
||||
isDisabledApproval.value = true;
|
||||
}
|
||||
} else {
|
||||
isDisabledApproval.value = false;
|
||||
if (plNames?.length) {
|
||||
templateList.value = res.data.filter((item: any) => {
|
||||
let result: any = false;
|
||||
for (let i = 0; i < plNames.length; i++) {
|
||||
if (item.templateName.includes(plNames[i])) {
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
if (templateList.value?.length) {
|
||||
approvalFormData.templateId = templateList.value[0].templateId;
|
||||
isDisabledApproval.value = true;
|
||||
}
|
||||
} else {
|
||||
isDisabledApproval.value = false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
templateList.value = [];
|
||||
@@ -417,6 +434,14 @@ const getTaskImportLevelFun = () => {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
const getTaskInfoPlNames = () => {
|
||||
const { pMemberList } = props.taskInfo;
|
||||
const names =
|
||||
pMemberList.map((item: any) => {
|
||||
return item.nickname;
|
||||
}) || [];
|
||||
return names;
|
||||
};
|
||||
|
||||
// 刷新报告列表
|
||||
const reportChangeFun = () => {
|
||||
|
||||
@@ -478,6 +478,7 @@ const systemApproveQueryApproveFlowTempalteFun = async () => {
|
||||
templateList.value = res.data;
|
||||
|
||||
const str = getTaskImportLevelFun();
|
||||
const plNames = getTaskInfoPlNames();
|
||||
|
||||
if (str) {
|
||||
if (str === '高') {
|
||||
@@ -496,7 +497,23 @@ const systemApproveQueryApproveFlowTempalteFun = async () => {
|
||||
isDisabledApproval.value = true;
|
||||
}
|
||||
} else {
|
||||
isDisabledApproval.value = false;
|
||||
if (plNames?.length) {
|
||||
templateList.value = res.data.filter((item: any) => {
|
||||
let result: any = false;
|
||||
for (let i = 0; i < plNames.length; i++) {
|
||||
if (item.templateName.includes(plNames[i])) {
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
});
|
||||
if (templateList.value?.length) {
|
||||
approvalFormData.templateId = templateList.value[0].templateId;
|
||||
isDisabledApproval.value = true;
|
||||
}
|
||||
} else {
|
||||
isDisabledApproval.value = false;
|
||||
}
|
||||
}
|
||||
|
||||
console.log(props.currentTaskInfo, 'currentTaskInfo');
|
||||
@@ -523,6 +540,15 @@ const getTaskImportLevelFun = () => {
|
||||
}
|
||||
};
|
||||
|
||||
const getTaskInfoPlNames = () => {
|
||||
const { pMemberList } = props.taskInfo;
|
||||
const names =
|
||||
pMemberList.map((item: any) => {
|
||||
return item.nickname;
|
||||
}) || [];
|
||||
return names;
|
||||
};
|
||||
|
||||
const skipRunFun = async (data: any) => {
|
||||
let projectType = 'self_develop';
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user