merge
This commit is contained in:
@@ -3,6 +3,13 @@
|
||||
&:not(.el-menu--collapse) {
|
||||
width: 254px;
|
||||
}
|
||||
.el-sub-menu {
|
||||
&.is-active {
|
||||
> .el-sub-menu__title {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.el-date-editor {
|
||||
width: 100% !important;
|
||||
|
||||
@@ -29,19 +29,43 @@ import AsideItem from './asideItem.vue';
|
||||
|
||||
const store = CommonStore();
|
||||
|
||||
const activePath = ref(store.currentPagePath);
|
||||
const activePath = ref('');
|
||||
const isCollapse = ref(false);
|
||||
|
||||
watch(
|
||||
() => store.currentPagePath,
|
||||
(path) => {
|
||||
activePath.value = path;
|
||||
activePath.value = activePathFun(path);
|
||||
}
|
||||
);
|
||||
|
||||
const toggleCollapseFun = () => {
|
||||
isCollapse.value = !isCollapse.value;
|
||||
};
|
||||
|
||||
let currentPath = '';
|
||||
const routeDataFun = (data: any, sPath: string, pPath: string) => {
|
||||
return data.some((item: any) => {
|
||||
if (item.path === sPath) {
|
||||
// 不在菜单中显示的,激活父菜单
|
||||
if (item.hideInMenu) {
|
||||
currentPath = pPath;
|
||||
} else {
|
||||
currentPath = sPath;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (item.children?.length > 0) {
|
||||
return routeDataFun(item.children, sPath, item.path);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const activePathFun = (path: any) => {
|
||||
routeDataFun(menuData, path, '/');
|
||||
return currentPath;
|
||||
};
|
||||
activePath.value = activePathFun(store.currentPagePath);
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<template>
|
||||
<template v-for="menu in data" :key="menu.path">
|
||||
<el-sub-menu v-if="menu.children && menu.children.length > 0" :index="menu.path">
|
||||
<el-sub-menu
|
||||
v-if="menu.children && menu.children.filter((m: any) => !m.hideInMenu).length > 0"
|
||||
:index="menu.path"
|
||||
>
|
||||
<template #title>
|
||||
<el-icon v-if="menu.icon"><component :is="menu.icon" /></el-icon>
|
||||
<span>{{ $t(`菜单.${menu.title}`) }}</span>
|
||||
|
||||
@@ -33,9 +33,7 @@ watch(
|
||||
);
|
||||
|
||||
const goPageFun = (data: any) => {
|
||||
jumpPage({
|
||||
path: data.path,
|
||||
});
|
||||
jumpPage(data);
|
||||
};
|
||||
|
||||
const closeFun = (data: any) => {
|
||||
|
||||
@@ -47,22 +47,21 @@ const router = createRouter({
|
||||
],
|
||||
});
|
||||
|
||||
router.afterEach((to) => {
|
||||
routerData.some((menu) => {
|
||||
const eachFun = (to: any, data: any) => {
|
||||
return data.some((menu: any) => {
|
||||
if (menu.path === to.path) {
|
||||
menu.query = to.query;
|
||||
CommonStore().addAlivePage(menu);
|
||||
return true;
|
||||
}
|
||||
if (menu.children && menu.children.length > 0) {
|
||||
return menu.children.some((subMenu) => {
|
||||
if (subMenu.path === to.path) {
|
||||
CommonStore().addAlivePage(subMenu);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
if (menu.path === to.path) {
|
||||
CommonStore().addAlivePage(menu);
|
||||
return true;
|
||||
}
|
||||
return eachFun(to, menu.children);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
router.afterEach((to) => {
|
||||
eachFun(to, routerData);
|
||||
});
|
||||
|
||||
export default router;
|
||||
|
||||
@@ -14,6 +14,12 @@ export default [
|
||||
icon: Icons['DataBoard'],
|
||||
hideInMenu: true,
|
||||
},
|
||||
{
|
||||
title: '新增待办',
|
||||
path: '/createDemand',
|
||||
name: 'CreateDemand',
|
||||
icon: Icons['Plus'],
|
||||
},
|
||||
{
|
||||
title: '项目管理',
|
||||
path: '/project',
|
||||
@@ -29,16 +35,40 @@ export default [
|
||||
title: '所有项目',
|
||||
path: '/project/allProject',
|
||||
name: 'AllProject',
|
||||
children: [
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/allProject/detail',
|
||||
name: 'AllProjectDetail',
|
||||
hideInMenu: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '负责项目',
|
||||
path: '/project/chargeProject',
|
||||
name: 'ChargeProject',
|
||||
children: [
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/chargeProject/detail',
|
||||
name: 'ChargeProjectDetail',
|
||||
hideInMenu: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '关注项目',
|
||||
path: '/project/followProject',
|
||||
name: 'FllowProject',
|
||||
children: [
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/followProject/detail',
|
||||
name: 'FllowProjectDetail',
|
||||
hideInMenu: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// title: '项目详情',
|
||||
|
||||
@@ -13,6 +13,13 @@ export default [
|
||||
hideInMenu: true,
|
||||
component: () => import('@/views/index/approvalPreview/index.vue'),
|
||||
},
|
||||
{
|
||||
title: '新增待办',
|
||||
path: '/createDemand',
|
||||
name: 'CreateDemand',
|
||||
// component: () => import('@/views/task/simulationTask/newDemand/createDemand.vue'),
|
||||
component: () => import('@/views/error/developing.vue'),
|
||||
},
|
||||
{
|
||||
title: '项目管理',
|
||||
path: '/project',
|
||||
@@ -30,18 +37,36 @@ export default [
|
||||
name: 'AllProject',
|
||||
component: () => import('@/views/task/projectList/allProject.vue'),
|
||||
},
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/allProject/detail',
|
||||
name: 'AllProjectDetail',
|
||||
component: () => import('@/views/task/projectList/detail.vue'),
|
||||
},
|
||||
{
|
||||
title: '负责项目',
|
||||
path: '/project/chargeProject',
|
||||
name: 'ChargeProject',
|
||||
component: () => import('@/views/task/projectList/chargeProject.vue'),
|
||||
},
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/chargeProject/detail',
|
||||
name: 'ChargeProjectDetail',
|
||||
component: () => import('@/views/task/projectList/detail.vue'),
|
||||
},
|
||||
{
|
||||
title: '关注项目',
|
||||
path: '/project/followProject',
|
||||
name: 'FllowProject',
|
||||
component: () => import('@/views/task/projectList/followProject.vue'),
|
||||
},
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/followProject/detail',
|
||||
name: 'FllowProjectDetail',
|
||||
component: () => import('@/views/task/projectList/detail.vue'),
|
||||
},
|
||||
// {
|
||||
// title: '项目详情',
|
||||
// path: '/task/projectDetail',
|
||||
|
||||
@@ -7,12 +7,12 @@ export default [
|
||||
name: 'Index',
|
||||
icon: Icons['House'],
|
||||
},
|
||||
// {
|
||||
// title: '新增待办',
|
||||
// path: '/task/sponsor',
|
||||
// name: 'TaskSponsor',
|
||||
// icon: Icons['Warning'],
|
||||
// },
|
||||
{
|
||||
title: '新增待办',
|
||||
path: '/createDemand',
|
||||
name: 'CreateDemand',
|
||||
icon: Icons['Plus'],
|
||||
},
|
||||
{
|
||||
title: '审核预览',
|
||||
path: '/approvalPreview',
|
||||
@@ -35,16 +35,40 @@ export default [
|
||||
title: '所有项目',
|
||||
path: '/project/allProject',
|
||||
name: 'AllProject',
|
||||
children: [
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/allProject/detail',
|
||||
name: 'AllProjectDetail',
|
||||
hideInMenu: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '负责项目',
|
||||
path: '/project/chargeProject',
|
||||
name: 'ChargeProject',
|
||||
children: [
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/chargeProject/detail',
|
||||
name: 'ChargeProjectDetail',
|
||||
hideInMenu: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '关注项目',
|
||||
path: '/project/followProject',
|
||||
name: 'FllowProject',
|
||||
children: [
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/followProject/detail',
|
||||
name: 'FllowProjectDetail',
|
||||
hideInMenu: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
// {
|
||||
// title: '项目详情',
|
||||
|
||||
@@ -6,12 +6,13 @@ export default [
|
||||
// component: () => import('@/views/index/index.vue'),
|
||||
component: () => import('@/views/error/developing.vue'),
|
||||
},
|
||||
// {
|
||||
// title: '新增待办',
|
||||
// path: '/task/sponsor',
|
||||
// name: 'TaskSponsor',
|
||||
// component: () => import('@/tenants/lyric/views/task/demand.vue'),
|
||||
// },
|
||||
{
|
||||
title: '新增待办',
|
||||
path: '/createDemand',
|
||||
name: 'CreateDemand',
|
||||
// component: () => import('@/views/task/simulationTask/newDemand/createDemand.vue'),
|
||||
component: () => import('@/views/error/developing.vue'),
|
||||
},
|
||||
{
|
||||
title: '审核预览',
|
||||
path: '/approvalPreview',
|
||||
@@ -36,18 +37,36 @@ export default [
|
||||
name: 'AllProject',
|
||||
component: () => import('@/views/task/projectList/allProject.vue'),
|
||||
},
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/allProject/detail',
|
||||
name: 'AllProjectDetail',
|
||||
component: () => import('@/views/task/projectList/detail.vue'),
|
||||
},
|
||||
{
|
||||
title: '负责项目',
|
||||
path: '/project/chargeProject',
|
||||
name: 'ChargeProject',
|
||||
component: () => import('@/views/task/projectList/chargeProject.vue'),
|
||||
},
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/chargeProject/detail',
|
||||
name: 'ChargeProjectDetail',
|
||||
component: () => import('@/views/task/projectList/detail.vue'),
|
||||
},
|
||||
{
|
||||
title: '关注项目',
|
||||
path: '/project/followProject',
|
||||
name: 'FllowProject',
|
||||
component: () => import('@/views/task/projectList/followProject.vue'),
|
||||
},
|
||||
{
|
||||
title: '项目详情',
|
||||
path: '/project/followProject/detail',
|
||||
name: 'FllowProjectDetail',
|
||||
component: () => import('@/views/task/projectList/detail.vue'),
|
||||
},
|
||||
// {
|
||||
// title: '项目详情',
|
||||
// path: '/task/projectDetail',
|
||||
|
||||
@@ -130,7 +130,8 @@ export const TasksStatusColor = {
|
||||
export const disposeDisabledExeStatus = (
|
||||
status: string,
|
||||
option: { value: TASK_PROCESS_STATUS },
|
||||
taskInfo: any
|
||||
taskInfo: any,
|
||||
judgmentTaskFile: boolean = false
|
||||
) => {
|
||||
// 审批未通过的 不能改成 已完成 、已关闭 、已闭环
|
||||
if (
|
||||
@@ -146,8 +147,20 @@ export const disposeDisabledExeStatus = (
|
||||
if (status === TASK_PROCESS_STATUS.COMPLETED) {
|
||||
return true;
|
||||
}
|
||||
// if (status === TASK_PROCESS_STATUS.IN_PROGRESS) {
|
||||
// return [TASK_PROCESS_STATUS.NO_STARTED, TASK_PROCESS_STATUS.CLOSED].includes(option.value);
|
||||
// }
|
||||
// 0313新需求 报告、3d、计算模型都有(judgmentTaskFile 为true) 才能改为已完成
|
||||
if (status === TASK_PROCESS_STATUS.IN_PROGRESS) {
|
||||
return [TASK_PROCESS_STATUS.NO_STARTED, TASK_PROCESS_STATUS.CLOSED].includes(option.value);
|
||||
if (!judgmentTaskFile) {
|
||||
return [
|
||||
TASK_PROCESS_STATUS.NO_STARTED,
|
||||
TASK_PROCESS_STATUS.CLOSED,
|
||||
TASK_PROCESS_STATUS.COMPLETED,
|
||||
].includes(option.value);
|
||||
} else {
|
||||
return [TASK_PROCESS_STATUS.NO_STARTED, TASK_PROCESS_STATUS.CLOSED].includes(option.value);
|
||||
}
|
||||
}
|
||||
if (status === TASK_PROCESS_STATUS.NO_STARTED) {
|
||||
return [
|
||||
|
||||
@@ -336,7 +336,7 @@ const addSimulationKeyResultFun = async (file: any) => {
|
||||
keyResultType: 2,
|
||||
onlyFile: true,
|
||||
};
|
||||
const obj = {
|
||||
const obj: any = {
|
||||
xQuantityType: '',
|
||||
xUnits: '',
|
||||
yQuantityType: '',
|
||||
@@ -345,7 +345,7 @@ const addSimulationKeyResultFun = async (file: any) => {
|
||||
try {
|
||||
const res: any = await addSimulationKeyResultApi(param);
|
||||
if (res && res.code === 200) {
|
||||
obj.xQuantityType = res.data?.xPhysic;
|
||||
obj.xQuantityType = res.data?.xPhysics;
|
||||
obj.xUnits = res.data?.xUnit;
|
||||
obj.yQuantityType = res.data?.yPhysics;
|
||||
obj.yUnits = res.data?.yUnit;
|
||||
|
||||
@@ -50,6 +50,7 @@ const lang = {
|
||||
},
|
||||
菜单: {
|
||||
首页: 'Home',
|
||||
新增待办: 'Create Demand',
|
||||
审核预览: 'Approval Preview',
|
||||
能力中心: 'Simulation Management',
|
||||
仿真工况库: 'Working Condition Library',
|
||||
|
||||
@@ -76,6 +76,7 @@ const lang = {
|
||||
我关注的: '我关注的',
|
||||
所有任务: '所有任务',
|
||||
项目管理: '项目管理',
|
||||
新增待办: '新增待办',
|
||||
项目总览: '项目总览',
|
||||
所有项目: '所有项目',
|
||||
负责项目: '负责项目',
|
||||
|
||||
@@ -345,7 +345,10 @@ const submitFun2 = async () => {
|
||||
sourceFiles,
|
||||
uploadTaskId: new Date().getTime(),
|
||||
dirId: props.fileId,
|
||||
fileTypeDictValue: fromData.fileTypeDictValue,
|
||||
fileTypeDictValue:
|
||||
fromData.fileTypeDictValue instanceof Array
|
||||
? fromData.fileTypeDictValue.join(',')
|
||||
: fromData.fileTypeDictValue,
|
||||
disciplineDictValue: fromData.disciplineDictValue,
|
||||
fileTypeDictClass: 'ALL_FILE_TYPE',
|
||||
disciplineTypeDictClass: 'DISCIPLINE_TYPE',
|
||||
|
||||
@@ -176,7 +176,11 @@
|
||||
>
|
||||
<el-form :model="approvalFormData">
|
||||
<el-form-item label="评审模板:">
|
||||
<el-select v-model="approvalFormData.templateId" class="mw200">
|
||||
<el-select
|
||||
v-model="approvalFormData.templateId"
|
||||
class="mw200"
|
||||
:disabled="isDisabledApproval"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in templateList"
|
||||
:key="item.id"
|
||||
@@ -327,6 +331,7 @@ const submitApprovalFun = async () => {
|
||||
|
||||
approvaVisable.value = false;
|
||||
};
|
||||
const isDisabledApproval = ref(false);
|
||||
|
||||
const systemApproveQueryApproveFlowTempalteFun = async () => {
|
||||
const res: any = await systemApproveQueryApproveFlowTempalteApi({
|
||||
@@ -335,11 +340,46 @@ const systemApproveQueryApproveFlowTempalteFun = async () => {
|
||||
|
||||
if (res && res.code === 200) {
|
||||
templateList.value = res.data;
|
||||
const str = getTaskImportLevelFun();
|
||||
|
||||
if (str) {
|
||||
if (str === '高') {
|
||||
templateList.value = res.data.filter((item: any) => {
|
||||
return item.templateName.includes('-高');
|
||||
});
|
||||
}
|
||||
if (str === '低') {
|
||||
templateList.value = res.data.filter((item: any) => {
|
||||
return item.templateName.includes('-低');
|
||||
});
|
||||
}
|
||||
|
||||
if (templateList.value?.length) {
|
||||
approvalFormData.templateId = templateList.value[0].templateId;
|
||||
isDisabledApproval.value = true;
|
||||
}
|
||||
} else {
|
||||
isDisabledApproval.value = false;
|
||||
}
|
||||
} else {
|
||||
templateList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const getTaskImportLevelFun = () => {
|
||||
const { extras } = props.taskInfo;
|
||||
|
||||
if (extras) {
|
||||
const level = extras.find((item: any) => {
|
||||
return item.propertyName === 'importanceLevel';
|
||||
});
|
||||
|
||||
return level?.propertyValue;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
// 监控传入的任务信息
|
||||
watch(
|
||||
() => props.taskInfo,
|
||||
|
||||
@@ -19,13 +19,15 @@
|
||||
},
|
||||
hide: (row: any) => {
|
||||
return (
|
||||
projectInfo.projectSource !== 'EP' ||
|
||||
row.nodeType !== NODE_TYPE.WORKSPACE ||
|
||||
!enableConfigByTenant([TENANT_ENUM.LYRIC]) ||
|
||||
!canPushReport
|
||||
);
|
||||
},
|
||||
},
|
||||
...skipApprovePageBtns(projectCode),
|
||||
// 0313 项目来源不是EP系统的,隐藏“审批跳转”功能
|
||||
...(projectInfo.projectSource !== 'EP' ? [] : skipApprovePageBtns(projectCode)),
|
||||
{
|
||||
title: '详情',
|
||||
type: 'primary',
|
||||
@@ -154,6 +156,7 @@ const props = defineProps<{
|
||||
projectUuid: string;
|
||||
projectCode: string;
|
||||
currentPhase: string;
|
||||
projectInfo: any; // 0313 项目来源不是EP系统的,隐藏“推报告”和“审批跳转”功能
|
||||
canPushReport: boolean; // 0305更新:只有项目经理可以推送报告
|
||||
}>();
|
||||
|
||||
|
||||
@@ -288,7 +288,11 @@
|
||||
>
|
||||
<el-form :model="approvalFormData">
|
||||
<el-form-item label="评审模板:">
|
||||
<el-select v-model="approvalFormData.templateId" class="mw200">
|
||||
<el-select
|
||||
v-model="approvalFormData.templateId"
|
||||
class="mw200"
|
||||
:disabled="isDisabledApproval"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in templateList"
|
||||
:key="item.id"
|
||||
@@ -461,20 +465,62 @@ const updateFun = async () => {
|
||||
});
|
||||
};
|
||||
|
||||
const isDisabledApproval = ref(false);
|
||||
|
||||
const systemApproveQueryApproveFlowTempalteFun = async () => {
|
||||
const res: any = await systemApproveQueryApproveFlowTempalteApi({
|
||||
moduleCode: 'SIMULATION_PLAN_APPROVAL',
|
||||
moduleCode: 'SIMULATION_TASK_APPROVAL',
|
||||
});
|
||||
|
||||
if (res && res.code === 200) {
|
||||
templateList.value = res.data.filter((item: any) => {
|
||||
return item.templateName.includes('交付物');
|
||||
});
|
||||
templateList.value = res.data;
|
||||
|
||||
const str = getTaskImportLevelFun();
|
||||
|
||||
if (str) {
|
||||
if (str === '高') {
|
||||
templateList.value = res.data.filter((item: any) => {
|
||||
return item.templateName.includes('-高');
|
||||
});
|
||||
}
|
||||
if (str === '低') {
|
||||
templateList.value = res.data.filter((item: any) => {
|
||||
return item.templateName.includes('-低');
|
||||
});
|
||||
}
|
||||
|
||||
if (templateList.value?.length) {
|
||||
approvalFormData.templateId = templateList.value[0].templateId;
|
||||
isDisabledApproval.value = true;
|
||||
}
|
||||
} else {
|
||||
isDisabledApproval.value = false;
|
||||
}
|
||||
|
||||
console.log(props.currentTaskInfo, 'currentTaskInfo');
|
||||
|
||||
// .filter((item: any) => {
|
||||
// return item.templateName.includes('交付物');
|
||||
// });
|
||||
} else {
|
||||
templateList.value = [];
|
||||
}
|
||||
};
|
||||
|
||||
const getTaskImportLevelFun = () => {
|
||||
const { extras } = props.currentTaskInfo;
|
||||
|
||||
if (extras) {
|
||||
const level = extras.find((item: any) => {
|
||||
return item.propertyName === 'importanceLevel';
|
||||
});
|
||||
|
||||
return level?.propertyValue;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
};
|
||||
|
||||
const skipRunFun = async (data: any) => {
|
||||
let projectType = 'self_develop';
|
||||
try {
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
</el-select> -->
|
||||
</div>
|
||||
<div class="top-icons">
|
||||
<el-button link @click="goProjectListFun">返回列表</el-button>
|
||||
<el-button
|
||||
v-if="isMember"
|
||||
:disabled="currentProjectInfo.exeStatus === PROJECT_EXE_STATUS_CODE.CLOSED"
|
||||
@@ -61,6 +60,7 @@
|
||||
:projectUuid="projectUuid"
|
||||
:projectCode="currentProjectInfo.nodeCode"
|
||||
:canPushReport="isMember"
|
||||
:projectInfo="currentProjectInfo"
|
||||
@getPhaseList="getPhaseListFun"
|
||||
:currentPhase="currentProjectInfo.currentPhase"
|
||||
/>
|
||||
@@ -227,8 +227,6 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const emits = defineEmits(['goBack']);
|
||||
|
||||
// const router = useRouter();
|
||||
// const route = useRoute();
|
||||
|
||||
@@ -242,10 +240,6 @@ const basePageRef = ref();
|
||||
|
||||
const activeTab = ref('taskList');
|
||||
|
||||
const goProjectListFun = () => {
|
||||
emits('goBack');
|
||||
};
|
||||
|
||||
const showProjectInfoDialog = ref(false);
|
||||
// const currentProjectBaseInfo = reactive({
|
||||
// id: '',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="gl-page-content-full" v-if="!showProjectDetailVisible && !projectsDetailWindow">
|
||||
<div class="gl-page-content-full" v-if="!projectsDetailWindow">
|
||||
<div class="project-table-list">
|
||||
<BaseTable
|
||||
listTitle="项目数据"
|
||||
@@ -103,13 +103,6 @@
|
||||
@nextPageFun="nextPageFun"
|
||||
@completeFun="completeFun"
|
||||
/>
|
||||
<ProjectDetail
|
||||
v-if="showProjectDetailVisible"
|
||||
:projectName="currentProject.nodeName"
|
||||
:projectUuid="currentProject.uuid"
|
||||
@goBack="showProjectDetailVisible = false"
|
||||
></ProjectDetail>
|
||||
|
||||
<projectOverview
|
||||
v-if="projectsDetailWindow"
|
||||
:projectUuid="projectUuids"
|
||||
@@ -127,7 +120,6 @@ import { NODE_TYPE } from '@/utils/enum/node';
|
||||
import { disposeMemberList } from '@/views/task/projectDetail/components/project';
|
||||
import { useDict } from '@/utils/useDict';
|
||||
import dayjs from 'dayjs';
|
||||
import ProjectDetail from '@/views/task/projectDetail/index.vue';
|
||||
import StatusDot from '@/components/common/statusDot/index.vue';
|
||||
import { projectStatus } from '@/components/common/statusDot/statusMap';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
@@ -137,6 +129,10 @@ import projectOverview from '@/views/task/projectOverview/index.vue';
|
||||
import DefaultProjectCard from '@/views/task/projectList/components/projectCard.vue';
|
||||
import LyricProjectCard from '@/tenants/lyric/views/project/projectCard.vue';
|
||||
import { isSimProjectManager } from '@/utils/task';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { jumpPage } from '@/utils/common';
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
interface Props {
|
||||
expandAction?: any;
|
||||
@@ -222,8 +218,6 @@ const showProjectInfoDialog = ref(false);
|
||||
const showNodeInfoDialog = ref(false);
|
||||
const showTaskDialog = ref(false);
|
||||
|
||||
const showProjectDetailVisible = ref(false);
|
||||
|
||||
const dialogType = ref('create'); // create 编辑 edit
|
||||
const currentProjectBaseInfo = reactive<any>({
|
||||
id: '',
|
||||
@@ -275,9 +269,12 @@ const currentProject = reactive({
|
||||
const currentProjectInfo = ref<any>({});
|
||||
const goProjectDetailFun = (uuid: string, nodeName: string, row: any) => {
|
||||
currentProjectInfo.value = { ...row };
|
||||
showProjectDetailVisible.value = true;
|
||||
currentProject.nodeName = nodeName;
|
||||
currentProject.uuid = uuid;
|
||||
jumpPage({
|
||||
path: `${route.path}/detail`,
|
||||
query: currentProject,
|
||||
});
|
||||
};
|
||||
|
||||
const nodeListApi = async (params: any) => {
|
||||
|
||||
33
src/views/task/projectList/detail.vue
Normal file
33
src/views/task/projectList/detail.vue
Normal file
@@ -0,0 +1,33 @@
|
||||
<template>
|
||||
<div class="gl-page-content-full">
|
||||
<ProjectDetail
|
||||
v-if="currentProject"
|
||||
:projectName="currentProject.nodeName"
|
||||
:projectUuid="currentProject.uuid"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, nextTick } from 'vue';
|
||||
import ProjectDetail from '@/views/task/projectDetail/index.vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const currentProject = ref<any>(null);
|
||||
|
||||
watch(
|
||||
() => route.query,
|
||||
(val: any) => {
|
||||
currentProject.value = null;
|
||||
nextTick(() => {
|
||||
currentProject.value = val;
|
||||
});
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
immediate: true,
|
||||
}
|
||||
);
|
||||
</script>
|
||||
@@ -80,7 +80,7 @@ import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import dayjs from 'dayjs';
|
||||
import TaskDetail from '@/views/task/projectDetail/components/taskDetail.vue';
|
||||
import { isNumber } from 'lodash-es';
|
||||
import { getMemberListIds } from '@/utils/task';
|
||||
import { getMemberListIds, judgmentTaskCompletedFun } from '@/utils/task';
|
||||
import { jumpPage } from '@/utils/common';
|
||||
import { changeTaskStatusCommon, syncDemandList } from '../taskPage';
|
||||
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
|
||||
@@ -131,12 +131,18 @@ const editTaskFun = (row: any) => {
|
||||
formLoad();
|
||||
});
|
||||
};
|
||||
const formLoad = () => {
|
||||
const formLoad = async () => {
|
||||
const judgmentTaskFile = await judgmentTaskCompletedFun(editRow.value.uuid);
|
||||
const exeStatusList = TASK_PROCESS_STATUS_OPTIONS.map((item: any) => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
disabled: disposeDisabledExeStatus(editRow.value.exeStatus, item, editRow.value),
|
||||
disabled: disposeDisabledExeStatus(
|
||||
editRow.value.exeStatus,
|
||||
item,
|
||||
editRow.value,
|
||||
judgmentTaskFile
|
||||
),
|
||||
};
|
||||
});
|
||||
const achieveStatusList = TASK_CALCULATE_STATUS_OPTIONS.map((item: any) => {
|
||||
@@ -312,7 +318,10 @@ const actionList = ref<any>([
|
||||
changeTaskStatus(row, TASK_PROCESS_STATUS.REJECTED);
|
||||
},
|
||||
hide: (row: any) => {
|
||||
return !(row.exeStatus === TASK_PROCESS_STATUS.NO_STARTED);
|
||||
return !(
|
||||
row.exeStatus === TASK_PROCESS_STATUS.NO_STARTED ||
|
||||
row.exeStatus === TASK_PROCESS_STATUS.IN_PROGRESS
|
||||
);
|
||||
},
|
||||
},
|
||||
]);
|
||||
|
||||
@@ -89,7 +89,7 @@ import { computed, nextTick, onMounted, ref } from 'vue';
|
||||
import Dialog from '@/components/common/dialog/index.vue';
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import dayjs from 'dayjs';
|
||||
import { getMemberListIds } from '@/utils/task';
|
||||
import { getMemberListIds, judgmentTaskCompletedFun } from '@/utils/task';
|
||||
import { isNumber } from 'lodash-es';
|
||||
import taskDetail from '@/views/task/projectDetail/components/taskDetail.vue';
|
||||
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
|
||||
@@ -186,6 +186,12 @@ const actionList = ref([
|
||||
click: (row: any) => {
|
||||
changeTaskStatus(row, TASK_PROCESS_STATUS.REJECTED);
|
||||
},
|
||||
hide: (row: any) => {
|
||||
return !(
|
||||
row.exeStatus === TASK_PROCESS_STATUS.NO_STARTED ||
|
||||
row.exeStatus === TASK_PROCESS_STATUS.IN_PROGRESS
|
||||
);
|
||||
},
|
||||
},
|
||||
// {
|
||||
// title: '删除',
|
||||
@@ -260,13 +266,19 @@ const changeTaskStatus = async (row: any, status: string) => {
|
||||
// });
|
||||
// }
|
||||
// };
|
||||
const formLoad = () => {
|
||||
const formLoad = async () => {
|
||||
// nextTick(() => {
|
||||
const judgmentTaskFile = await judgmentTaskCompletedFun(editRow.value.uuid);
|
||||
const exeStatusList = TASK_PROCESS_STATUS_OPTIONS.map((item: any) => {
|
||||
return {
|
||||
label: item.label,
|
||||
value: item.value,
|
||||
disabled: disposeDisabledExeStatus(editRow.value.exeStatus, item, editRow.value),
|
||||
disabled: disposeDisabledExeStatus(
|
||||
editRow.value.exeStatus,
|
||||
item,
|
||||
editRow.value,
|
||||
judgmentTaskFile
|
||||
),
|
||||
};
|
||||
});
|
||||
const achieveStatusList = TASK_CALCULATE_STATUS_OPTIONS.map((item: any) => {
|
||||
|
||||
@@ -8,7 +8,114 @@
|
||||
@close="closeSendFun"
|
||||
show-footer
|
||||
>
|
||||
<el-form ref="sendFormRef" :rules="sendFormRules" :model="sendForm" label-width="auto">
|
||||
<!-- {{ sendForm }} -->
|
||||
<TableForm
|
||||
ref="tableFormRef"
|
||||
tableName="SIMULATION_TASK_SEND_FORM"
|
||||
:formAttrs="{
|
||||
projectId: {
|
||||
auth: false,
|
||||
},
|
||||
workspaceCode: {
|
||||
filterable: true,
|
||||
},
|
||||
}"
|
||||
:colNum="1"
|
||||
:hideKeys="hideKeys"
|
||||
v-model:data="sendForm"
|
||||
@change="changeFun"
|
||||
@load="formLoad"
|
||||
>
|
||||
<template #form-insertIndex>
|
||||
<el-tree-select
|
||||
ref="taskTreeRef"
|
||||
filterable
|
||||
:check-strictly="true"
|
||||
v-model="sendForm.insertIndex"
|
||||
:data="indexTreeData"
|
||||
node-key="uuid"
|
||||
:props="{ label: 'nodeName', value: 'uuid' }"
|
||||
default-expand-all
|
||||
:render-after-expand="false"
|
||||
@current-change="changeInsertIndex"
|
||||
>
|
||||
<template #default="{ data: { nodeName } }">
|
||||
{{ nodeName }}
|
||||
</template>
|
||||
</el-tree-select>
|
||||
</template>
|
||||
<template #form-scenario>
|
||||
<el-select class="loadcase-lib" :teleported="false" v-model="sendForm.scenario">
|
||||
<el-option
|
||||
v-for="item in scenarioList"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #form-insertTaskMode>
|
||||
<el-radio-group v-model="insertTaskMode">
|
||||
<el-radio value="lib" size="large">从工况库选任务</el-radio>
|
||||
<el-radio value="custom" size="large">自定义任务名称</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
<template #form-loadcaseLibName>
|
||||
<el-select
|
||||
class="loadcase-lib"
|
||||
:teleported="false"
|
||||
v-model="sendForm.currentLoadcaseLib"
|
||||
:props="{ label: 'poolName', value: 'value' }"
|
||||
value-key="poolName"
|
||||
:fit-input-width="true"
|
||||
@change="changeLoadcaseLibFun"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in loadcaseLibList"
|
||||
:key="item.value"
|
||||
:label="item.poolName"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #form-loadcaseLibVersion>
|
||||
<el-select
|
||||
class="version"
|
||||
:teleported="false"
|
||||
v-model="sendForm.currentLoadcaseLibVersion"
|
||||
:props="{ label: 'poolVersion', value: 'value' }"
|
||||
value-key="poolVersion"
|
||||
:fit-input-width="true"
|
||||
@change="changeLoadcaseVersionFun"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in loadcaseLibVersionList"
|
||||
:key="item.value"
|
||||
:label="item.poolVersion"
|
||||
:value="item"
|
||||
/>
|
||||
</el-select>
|
||||
</template>
|
||||
<template #form-chooseTask>
|
||||
<el-select-v2
|
||||
v-model="sendForm.chooseTaskList"
|
||||
:options="libTaskList"
|
||||
placeholder="请选择"
|
||||
filterable
|
||||
clearable
|
||||
value-key="uuid"
|
||||
:multiple="false"
|
||||
>
|
||||
<template #default="{ item }">
|
||||
<div class="flex items-center">
|
||||
<img class="loadcase-img" src="@/assets/imgs/projectTree/loadcase.png" alt="" />
|
||||
<span>{{ item.label }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-select-v2>
|
||||
</template>
|
||||
</TableForm>
|
||||
<!-- <el-form ref="sendFormRef" :rules="sendFormRules" :model="sendForm" label-width="auto">
|
||||
<el-form-item label="上层节点:" prop="insertIndex">
|
||||
<el-tree-select
|
||||
ref="taskTreeRef"
|
||||
@@ -145,7 +252,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-form> -->
|
||||
<template #footer>
|
||||
<div>
|
||||
<el-button @click="closeSendFun">取消</el-button>
|
||||
@@ -171,13 +278,14 @@ import {
|
||||
} from '@/api/task/taskpool';
|
||||
// import { useDict } from '@/utils/useDict';
|
||||
import { onMounted } from 'vue';
|
||||
import UserSelect from '@/components/common/userSelect/index.vue';
|
||||
// import UserSelect from '@/components/common/userSelect/index.vue';
|
||||
import { modifyNodeTaskPerformanceApi } from '@/api/project/node';
|
||||
import { CommonStore } from '@/stores/common';
|
||||
import { batchUpdateTaskStatusApi } from '@/api/project/task';
|
||||
import { getUserSimulationType } from '@/tenants/lyric/views/task/lyricTask';
|
||||
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
|
||||
import { useDict } from '@/utils/useDict';
|
||||
// import { useDict } from '@/utils/useDict';
|
||||
import TableForm from '@/components/common/table/tableForm.vue';
|
||||
|
||||
const props = defineProps({
|
||||
diaVisible: {
|
||||
@@ -202,7 +310,7 @@ const diaVisible = computed({
|
||||
},
|
||||
});
|
||||
|
||||
const { TASK_ABNORMAL } = useDict('TASK_ABNORMAL');
|
||||
// const { TASK_ABNORMAL } = useDict('TASK_ABNORMAL');
|
||||
|
||||
const sendForm = reactive<any>({
|
||||
beginTime: '',
|
||||
@@ -214,12 +322,33 @@ const sendForm = reactive<any>({
|
||||
currentLoadcaseLib: '',
|
||||
});
|
||||
|
||||
const hideKeys = computed(() => {
|
||||
const hides = [];
|
||||
if (formDemandAndNotFiniteElement.value) {
|
||||
hides.push(...['loadcaseLibName', 'loadcaseVersion', 'chooseTask', 'taskName']);
|
||||
} else {
|
||||
hides.push('scenario');
|
||||
}
|
||||
if (insertTaskMode.value === 'custom') {
|
||||
hides.push('loadcaseLibName', 'loadcaseLibVersion', 'chooseTask');
|
||||
}
|
||||
if (insertTaskMode.value === 'lib') {
|
||||
hides.push('taskName');
|
||||
}
|
||||
return hides;
|
||||
});
|
||||
|
||||
const loadingInterface = ref(false);
|
||||
|
||||
const closeSendFun = () => {
|
||||
emits('update:diaVisible', false);
|
||||
loadingInterface.value = false;
|
||||
};
|
||||
|
||||
const changeFun = (val: any) => {
|
||||
console.log('val', val);
|
||||
};
|
||||
|
||||
/**
|
||||
* lib 工况库
|
||||
* custom 自定义
|
||||
@@ -271,31 +400,33 @@ const queryLoadcaseLibVersionsFun = async () => {
|
||||
const libTaskList = ref<any[]>([]);
|
||||
|
||||
const getLoadcaseList = async (flag?: string) => {
|
||||
const params: any = {
|
||||
poolName: sendForm.currentLoadcaseLib.poolName,
|
||||
version: sendForm.currentLoadcaseLibVersion.poolVersion,
|
||||
};
|
||||
if (flag !== 'getAll') {
|
||||
if (enableConfigByTenant([TENANT_ENUM.LYRIC])) {
|
||||
params.nodeType = NODE_TYPE.WORKSPACE;
|
||||
params.nodeName = workspaceName.value;
|
||||
if (sendForm.currentLoadcaseLib.poolName && sendForm.currentLoadcaseLibVersion.poolVersion) {
|
||||
const params: any = {
|
||||
poolName: sendForm.currentLoadcaseLib.poolName,
|
||||
version: sendForm.currentLoadcaseLibVersion.poolVersion,
|
||||
};
|
||||
if (flag !== 'getAll') {
|
||||
if (enableConfigByTenant([TENANT_ENUM.LYRIC])) {
|
||||
params.nodeType = NODE_TYPE.WORKSPACE;
|
||||
params.nodeName = workspaceName.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
const res: any = await getTaskPoolLoadcasesApi(params);
|
||||
if (res.code === 200) {
|
||||
libTaskList.value = res.data.map((item: any) => {
|
||||
return {
|
||||
label: item.nodeName,
|
||||
value: item,
|
||||
};
|
||||
});
|
||||
if (
|
||||
libTaskList.value.length === 0 &&
|
||||
enableConfigByTenant([TENANT_ENUM.LYRIC]) &&
|
||||
flag !== 'getAll' &&
|
||||
flag !== null
|
||||
) {
|
||||
getLoadcaseList('getAll');
|
||||
const res: any = await getTaskPoolLoadcasesApi(params);
|
||||
if (res.code === 200) {
|
||||
libTaskList.value = res.data.map((item: any) => {
|
||||
return {
|
||||
label: item.nodeName,
|
||||
value: item,
|
||||
};
|
||||
});
|
||||
if (
|
||||
libTaskList.value.length === 0 &&
|
||||
enableConfigByTenant([TENANT_ENUM.LYRIC]) &&
|
||||
flag !== 'getAll' &&
|
||||
flag !== null
|
||||
) {
|
||||
getLoadcaseList('getAll');
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -313,6 +444,8 @@ const sendFormRules = reactive<any>({
|
||||
|
||||
const taskTreeRef = ref();
|
||||
|
||||
const tableFormRef = ref();
|
||||
|
||||
const simulationType = getUserSimulationType();
|
||||
|
||||
/** 来自需求的任务,且非有限元仿真 */
|
||||
@@ -324,137 +457,138 @@ const formDemandAndNotFiniteElement = computed(() => {
|
||||
);
|
||||
});
|
||||
|
||||
const sendTaskConfirmFun = () => {
|
||||
sendFormRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
// if (insertTaskMode.value === 'lib') {
|
||||
// if (sendForm.chooseTaskList.value.length === 0) {
|
||||
// ElMessage.error('请选择任务');
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
loadingInterface.value = true;
|
||||
const parentNodeInfo = taskTreeRef.value.getCurrentNode();
|
||||
const tagProperty: { [key: string]: any } = {};
|
||||
tagSortList.forEach((item: any) => {
|
||||
// tagProperty[item] = parentNodeInfo[item] ? parentNodeInfo[item].split(',') : [];
|
||||
tagProperty[item] = parentNodeInfo[item] ? parentNodeInfo[item] : '';
|
||||
});
|
||||
let params: any = {};
|
||||
const pMemberListStr = getMemberListIds(sendForm.pMemberList);
|
||||
const payAttentionMemberStr = getMemberListIds(sendForm.payAttentionMemberList);
|
||||
let hasRepeatTask = false;
|
||||
// 手动再添加一下工况的指标
|
||||
const performanceList: any[] = [];
|
||||
if (insertTaskMode.value === 'lib' && !formDemandAndNotFiniteElement.value) {
|
||||
const chooseTaskList = [sendForm.chooseTaskList];
|
||||
const addTaskList = chooseTaskList.map((item: any) => {
|
||||
if (parentNodeInfo?.taskList?.length > 0) {
|
||||
parentNodeInfo?.taskList.forEach((task: any) => {
|
||||
if (task.nodeName === item.nodeName) {
|
||||
// 利元亨会基于同名任务再次分发,如果当前任务uuid与已有任务uuid相同,则可以继续分发
|
||||
if (enableConfigByTenant([TENANT_ENUM.LYRIC])) {
|
||||
if (task.uuid !== sendForm.uuid) {
|
||||
ElMessage.warning(item.nodeName + '任务已存在,无法再创建!');
|
||||
hasRepeatTask = true;
|
||||
}
|
||||
} else {
|
||||
const sendTaskConfirmFun = async () => {
|
||||
if (await tableFormRef.value.validateFun()) {
|
||||
// if (insertTaskMode.value === 'lib') {
|
||||
// if (sendForm.chooseTaskList.value.length === 0) {
|
||||
// ElMessage.error('请选择任务');
|
||||
// return;
|
||||
// }
|
||||
// }
|
||||
loadingInterface.value = true;
|
||||
const parentNodeInfo = taskTreeRef.value.getCurrentNode();
|
||||
const tagProperty: { [key: string]: any } = {};
|
||||
tagSortList.forEach((item: any) => {
|
||||
// tagProperty[item] = parentNodeInfo[item] ? parentNodeInfo[item].split(',') : [];
|
||||
tagProperty[item] = parentNodeInfo[item] ? parentNodeInfo[item] : '';
|
||||
});
|
||||
let params: any = {};
|
||||
const pMemberListStr = getMemberListIds(sendForm.pMemberList);
|
||||
const payAttentionMemberStr = getMemberListIds(sendForm.payAttentionMemberList);
|
||||
let hasRepeatTask = false;
|
||||
// 手动再添加一下工况的指标
|
||||
const performanceList: any[] = [];
|
||||
if (insertTaskMode.value === 'lib' && !formDemandAndNotFiniteElement.value) {
|
||||
const chooseTaskList = [sendForm.chooseTaskList];
|
||||
const addTaskList = chooseTaskList.map((item: any) => {
|
||||
if (parentNodeInfo?.taskList?.length > 0) {
|
||||
parentNodeInfo?.taskList.forEach((task: any) => {
|
||||
if (task.nodeName === item.nodeName) {
|
||||
// 利元亨会基于同名任务再次分发,如果当前任务uuid与已有任务uuid相同,则可以继续分发
|
||||
if (enableConfigByTenant([TENANT_ENUM.LYRIC])) {
|
||||
if (task.uuid !== sendForm.uuid) {
|
||||
ElMessage.warning(item.nodeName + '任务已存在,无法再创建!');
|
||||
hasRepeatTask = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
item.children.forEach((child: any) => {
|
||||
performanceList.push({
|
||||
...child,
|
||||
pid: sendForm.uuid,
|
||||
parentId: sendForm.uuid,
|
||||
});
|
||||
});
|
||||
return {
|
||||
taskName: item.nodeName,
|
||||
nodeName: item.nodeName,
|
||||
// 基于已有uuid任务,将工况任务信息复制到已有任务上
|
||||
taskId: sendForm.uuid,
|
||||
...item,
|
||||
...tagProperty,
|
||||
beginTime: sendForm.planTime ? sendForm.planTime[0] : '',
|
||||
endTime: sendForm.planTime ? sendForm.planTime[1] : '',
|
||||
pMemberList: pMemberListStr,
|
||||
payAttentionMemberList: payAttentionMemberStr,
|
||||
eMemberList: sendForm.eMemberList,
|
||||
aMemberList: getMemberListIds(sendForm.aMemberList),
|
||||
discipline: sendForm.discipline,
|
||||
};
|
||||
});
|
||||
if (hasRepeatTask) {
|
||||
loadingInterface.value = false;
|
||||
return;
|
||||
}
|
||||
params = addTaskList[0];
|
||||
} else {
|
||||
parentNodeInfo?.taskList.forEach((task: any) => {
|
||||
if (task.nodeName === sendForm.nodeName) {
|
||||
// 利元亨会基于同名任务再次分发,如果当前任务uuid与已有任务uuid相同,则可以继续分发
|
||||
if (enableConfigByTenant([TENANT_ENUM.LYRIC])) {
|
||||
if (task.uuid !== sendForm.uuid) {
|
||||
ElMessage.warning(sendForm.nodeName + '任务已存在,无法再创建!');
|
||||
} else {
|
||||
ElMessage.warning(item.nodeName + '任务已存在,无法再创建!');
|
||||
hasRepeatTask = true;
|
||||
}
|
||||
} else {
|
||||
ElMessage.warning(sendForm.nodeName + '任务已存在,无法再创建!');
|
||||
hasRepeatTask = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (hasRepeatTask) {
|
||||
loadingInterface.value = false;
|
||||
return;
|
||||
});
|
||||
}
|
||||
params = {
|
||||
// 从需求来,且不是有限元仿真
|
||||
taskName: formDemandAndNotFiniteElement.value ? sendForm.scenario : sendForm.taskName,
|
||||
nodeName: formDemandAndNotFiniteElement.value ? sendForm.scenario : sendForm.taskName,
|
||||
item.children.forEach((child: any) => {
|
||||
performanceList.push({
|
||||
...child,
|
||||
pid: sendForm.uuid,
|
||||
parentId: sendForm.uuid,
|
||||
});
|
||||
});
|
||||
return {
|
||||
...sendForm,
|
||||
taskName: item.nodeName,
|
||||
nodeName: item.nodeName,
|
||||
// 基于已有uuid任务,将工况任务信息复制到已有任务上
|
||||
taskId: sendForm.uuid,
|
||||
nodeId: parentNodeInfo.uuid,
|
||||
...item,
|
||||
...tagProperty,
|
||||
beginTime: sendForm.planTime ? sendForm.planTime[0] : '',
|
||||
endTime: sendForm.planTime ? sendForm.planTime[1] : '',
|
||||
pMemberList: pMemberListStr,
|
||||
payAttentionMemberList: payAttentionMemberStr,
|
||||
eMemberList: sendForm.eMemberList,
|
||||
// eMemberList: sendForm.eMemberList,
|
||||
aMemberList: getMemberListIds(sendForm.aMemberList),
|
||||
discipline: sendForm.discipline,
|
||||
// discipline: sendForm.discipline,
|
||||
extras: sendForm.extras,
|
||||
};
|
||||
});
|
||||
if (hasRepeatTask) {
|
||||
loadingInterface.value = false;
|
||||
return;
|
||||
}
|
||||
if (params.id) {
|
||||
delete params.id;
|
||||
}
|
||||
if (params.uuid) {
|
||||
delete params.uuid;
|
||||
}
|
||||
const res: any = await batchUpdateTaskStatusApi({
|
||||
req: [{ ...props.taskInfo, ...params }],
|
||||
params = addTaskList[0];
|
||||
} else {
|
||||
parentNodeInfo?.taskList.forEach((task: any) => {
|
||||
if (task.nodeName === sendForm.nodeName) {
|
||||
// 利元亨会基于同名任务再次分发,如果当前任务uuid与已有任务uuid相同,则可以继续分发
|
||||
if (enableConfigByTenant([TENANT_ENUM.LYRIC])) {
|
||||
if (task.uuid !== sendForm.uuid) {
|
||||
ElMessage.warning(sendForm.nodeName + '任务已存在,无法再创建!');
|
||||
hasRepeatTask = true;
|
||||
}
|
||||
} else {
|
||||
ElMessage.warning(sendForm.nodeName + '任务已存在,无法再创建!');
|
||||
hasRepeatTask = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('任务分发成功!');
|
||||
if (performanceList.length > 0) {
|
||||
modifyNodeTaskPerformanceApi({
|
||||
addNodeList: performanceList,
|
||||
tagMap: getTagMapList(),
|
||||
});
|
||||
}
|
||||
emits('refreshTable');
|
||||
closeSendFun();
|
||||
} else {
|
||||
ElMessage.error('任务分发失败!');
|
||||
if (hasRepeatTask) {
|
||||
loadingInterface.value = false;
|
||||
return;
|
||||
}
|
||||
loadingInterface.value = false;
|
||||
params = {
|
||||
...sendForm,
|
||||
// 从需求来,且不是有限元仿真
|
||||
taskName: formDemandAndNotFiniteElement.value ? sendForm.scenario : sendForm.taskName,
|
||||
nodeName: formDemandAndNotFiniteElement.value ? sendForm.scenario : sendForm.taskName,
|
||||
taskId: sendForm.uuid,
|
||||
nodeId: parentNodeInfo.uuid,
|
||||
...tagProperty,
|
||||
beginTime: sendForm.planTime ? sendForm.planTime[0] : '',
|
||||
endTime: sendForm.planTime ? sendForm.planTime[1] : '',
|
||||
pMemberList: pMemberListStr,
|
||||
payAttentionMemberList: payAttentionMemberStr,
|
||||
eMemberList: sendForm.eMemberList,
|
||||
aMemberList: getMemberListIds(sendForm.aMemberList),
|
||||
discipline: sendForm.discipline,
|
||||
};
|
||||
}
|
||||
});
|
||||
if (params.id) {
|
||||
delete params.id;
|
||||
}
|
||||
if (params.uuid) {
|
||||
delete params.uuid;
|
||||
}
|
||||
const res: any = await batchUpdateTaskStatusApi({
|
||||
req: [{ ...props.taskInfo, ...params }],
|
||||
});
|
||||
|
||||
if (res.code === 200) {
|
||||
ElMessage.success('任务分发成功!');
|
||||
if (performanceList.length > 0) {
|
||||
modifyNodeTaskPerformanceApi({
|
||||
addNodeList: performanceList,
|
||||
tagMap: getTagMapList(),
|
||||
});
|
||||
}
|
||||
emits('refreshTable');
|
||||
closeSendFun();
|
||||
} else {
|
||||
ElMessage.error('任务分发失败!');
|
||||
}
|
||||
loadingInterface.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const indexTreeData = ref<any[]>([]);
|
||||
@@ -492,7 +626,9 @@ const sendTaskFun = async (row: any) => {
|
||||
indexTreeData.value = filterTask(taskTree);
|
||||
sendForm.insertIndex = row.newTag5;
|
||||
workspaceName.value = row.tag5;
|
||||
taskTreeRef.value.setCurrentKey(row.newTag5, true);
|
||||
nextTick(() => {
|
||||
taskTreeRef.value.setCurrentKey(row.newTag5, true);
|
||||
});
|
||||
|
||||
await queryPoolListFun();
|
||||
|
||||
@@ -513,7 +649,9 @@ const sendTaskFun = async (row: any) => {
|
||||
sendForm.taskName = row.demandName;
|
||||
sendForm.eMemberList = getMemberListIds(row.eMemberList);
|
||||
};
|
||||
|
||||
const formLoad = () => {
|
||||
sendTaskFun(props.taskInfo);
|
||||
};
|
||||
const changeInsertIndex = (val: any, node: any) => {
|
||||
console.log('', val, node);
|
||||
workspaceName.value = val.nodeName;
|
||||
@@ -524,7 +662,6 @@ const commonStore = CommonStore();
|
||||
const scenarioList = ref<any[]>([]);
|
||||
const disciplineList = ref<any[]>([]);
|
||||
onMounted(() => {
|
||||
sendTaskFun(props.taskInfo);
|
||||
disciplineList.value = commonStore.getDictData(simulationType).A;
|
||||
if (formDemandAndNotFiniteElement.value) {
|
||||
// 从角色获取
|
||||
|
||||
1
src/views/task/simulationTask/newDemand/createDemand.vue
Normal file
1
src/views/task/simulationTask/newDemand/createDemand.vue
Normal file
@@ -0,0 +1 @@
|
||||
<template>123</template>
|
||||
Reference in New Issue
Block a user