This commit is contained in:
2026-03-09 16:03:13 +08:00
parent df4d05c021
commit 5e6d0a593b
27 changed files with 127 additions and 55 deletions

View File

@@ -46,17 +46,19 @@ interface Props {
tableName: string;
callbackFlag?: string;
discipline?: string;
tagReq?: any;
}
const props = withDefaults(defineProps<Props>(), {
api: null,
data: {},
fileType: '',
data: {},
accept: '',
multiple: true,
tableName: '',
callbackFlag: '',
discipline: '',
tagReq: {},
});
const formData = ref<any>({
@@ -109,6 +111,7 @@ const submitFun = async () => {
'disciplineTypeDictClass',
'disciplineDictValue',
],
tagReq: props.tagReq,
};
closeFun();
await uploadBigFile(params, props.api);

View File

@@ -8,7 +8,7 @@
v-model:viewType="viewType"
:api="getSimulationTaskFilesApi"
:params="apiParam"
:show-checkbox="true"
:show-checkbox="showCheckbox"
:actionList="actionList"
:full-height="true"
>
@@ -103,6 +103,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
showCheckbox: {
type: Boolean,
default: true,
},
});
const baseTableRef = ref();

View File

@@ -6,7 +6,7 @@
:api="getSimulationTaskFilesApi"
:params="apiParam"
ref="baseTableRef"
:showCheckbox="true"
:showCheckbox="showCheckbox"
:actionList="actionList"
>
<template v-if="showLeftOptions" #leftOptions>
@@ -88,6 +88,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
showCheckbox: {
type: Boolean,
default: true,
},
});
const baseTableRef = ref();
const currentId = ref<any>(props.taskId);

View File

@@ -5,7 +5,7 @@
tableName="TASK_MODEL_FILE"
ref="baseTableRef"
:api="getSimulationTaskFilesApi"
showCheckbox
:showCheckbox="showCheckbox"
:params="apiParam"
:actionList="actionList"
>
@@ -97,6 +97,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
showCheckbox: {
type: Boolean,
default: true,
},
});
// const env = import.meta.env;

View File

@@ -7,7 +7,7 @@
ref="baseTableRef"
:api="getSimulationTaskFilesApi"
:params="apiParam"
:show-checkbox="true"
:show-checkbox="showCheckbox"
:full-height="true"
:actionList="actionList"
>
@@ -127,6 +127,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
showCheckbox: {
type: Boolean,
default: true,
},
});
const runTreeData = ref<any>([]);
const curveList = ref<any>([]);

View File

@@ -4,7 +4,7 @@
tableName="TASK_DELIVERABLE"
ref="baseTableRef"
:api="queryKeyResultAndTaskInfoApi"
showCheckbox
:showCheckbox="showCheckbox"
:params="{
taskId: taskId,
fileType: 8,
@@ -283,6 +283,10 @@ const props = defineProps({
type: Boolean,
default: false,
},
showCheckbox: {
type: Boolean,
default: true,
},
});
const accept = ref('');

View File

@@ -5,7 +5,7 @@
tableName="TASK_MODEL_FILE"
ref="baseTableRef"
:api="getSimulationTaskFilesApi"
showCheckbox
:showCheckbox="showCheckbox"
:params="apiParam"
:actionList="actionList"
>
@@ -88,6 +88,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
showCheckbox: {
type: Boolean,
default: true,
},
});
// const env = import.meta.env;

View File

@@ -5,7 +5,7 @@
ref="baseTableRef"
:export-file-name="'指标列表'"
:export-api="exportPerformanceByScriptApi"
showCheckbox
:showCheckbox="showCheckbox"
hidePagination
:data="performanceData"
:actionList="showLeftOptions && canUpdate ? actionList : []"
@@ -192,6 +192,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
showCheckbox: {
type: Boolean,
default: true,
},
});
const baseTableRef = ref();

View File

@@ -6,11 +6,11 @@
:api="getSimulationTaskFilesApi"
:params="apiParam"
ref="baseTableRef"
:showCheckbox="true"
:showCheckbox="showCheckbox"
:actionList="actionList"
>
<template v-if="showLeftOptions" #leftOptions>
<el-button v-if="canUpdate" @click="reportInpDiaShow = true">编辑报告</el-button>
<!-- <el-button v-if="canUpdate" @click="reportInpDiaShow = true">编辑报告</el-button> -->
<AddFile
:accept="accept"
ref="AddFileRef"
@@ -92,6 +92,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
showCheckbox: {
type: Boolean,
default: true,
},
});
const baseTableRef = ref();
const currentId = ref<any>(props.taskId);

View File

@@ -6,7 +6,7 @@
:api="getSimulationTaskFilesApi"
:params="apiParam"
ref="baseTableRef"
:showCheckbox="true"
:showCheckbox="showCheckbox"
:actionList="actionList"
>
<template v-if="showLeftOptions" #leftOptions>
@@ -89,6 +89,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
showCheckbox: {
type: Boolean,
default: true,
},
});
const baseTableRef = ref();
const currentId = ref<any>(props.taskId);

View File

@@ -19,11 +19,11 @@ export const permissionGroups = [
],
},
{
name: '需求管理',
name: '待办管理',
permissions: [
{ btn: '需求管理-创建待办', code: 'demand_add_demand' },
{ btn: '需求管理-编辑需求', code: 'demand_edit_demand' },
{ btn: '需求管理-删除需求', code: 'demand_delete_demand' },
{ btn: '待办管理-创建待办', code: 'demand_add_demand' },
{ btn: '待办管理-编辑待办', code: 'demand_edit_demand' },
{ btn: '待办管理-删除待办', code: 'demand_delete_demand' },
],
},
{

View File

@@ -3,6 +3,7 @@ import { useDict } from './useDict';
import { getTagKeyMap } from './enum/node';
import { TASK_CALCULATE_STATUS, TASK_PROCESS_STATUS } from './enum/task';
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
import { getUserId } from './user';
export const disposeSimType = (demandType: string, simType: string) => {
if (demandType && simType) {
@@ -173,7 +174,7 @@ export const disposeTaskMembers = (disposeKey: string, row: any) => {
// 判断登录用户是否是任务的 仿真负责人 或 仿真执行人
export const isSimManagerOrExecutor = (pMemberList: any[], eMemberList: any[]) => {
const currentUserId = localStorage.getItem('USER_ID') || '';
const currentUserId = getUserId();
const pMemberIds = getMemberListIds(pMemberList);
const eMemberIds = getMemberListIds(eMemberList);
const pMemberIdArr = pMemberIds.split(',');
@@ -183,7 +184,7 @@ export const isSimManagerOrExecutor = (pMemberList: any[], eMemberList: any[]) =
// 判断登录用户是否是任务的 仿真专项代表(项目经理)
export const isSimProjectManager = (memberList: any[]) => {
const currentUserId = localStorage.getItem('USER_ID') || '';
const currentUserId = getUserId();
const pMemberIds = getMemberListIds(memberList);
const pMemberIdArr = pMemberIds.split(',');
return pMemberIdArr.includes(currentUserId);

View File

@@ -137,6 +137,7 @@
tableName="TASK_DETAIL_UPLOAD_FILE"
callbackFlag="DATA_OVERVIEW_UPLOAD_FINISHED"
multiple
:tagReq="currentData.tagReq"
:data="{
dirId: currentData.id,
projectId: currentData.relatedResourceUuid,

View File

@@ -21,6 +21,8 @@
:taskInfo="taskInfo"
:showLeftOptions="false"
:showPerformance="true"
:showCheckbox="false"
:showEditReport="false"
></taskDetailPage>
</div>
</div>

View File

@@ -120,10 +120,10 @@ const dropdownList = ref([
name: '任务',
value: 'task',
},
{
name: '算例',
value: 'run',
},
// {
// name: '算例',
// value: 'run',
// },
]);
const expendChangeFun = (data: string) => {

View File

@@ -399,7 +399,7 @@ const changeCurrentFlowNodeFun = (info: any) => {
flowNode.value = node;
flowNodeData.value = data;
flowNodeData.value.copyNodeStatus = data.nodeStatus;
flowNodeData.value.copyNodeStatus = data?.nodeStatus;
// nodeParamDataList.value = flowNode.value?.store?.data?.data?.pageConfigList || [];
nodeParamDataList.value = cloneDeep(pageParamInfo.value[data.nodeName]) || [];
flowNodeParamData.value = flowNode.value?.store?.data?.data || {};

View File

@@ -3,7 +3,7 @@
<BaseTable
ref="baseTableRef"
tableName="EXPERIMENT_RESULT_TABLE"
:showCheckbox="true"
:showCheckbox="showCheckbox"
:action-list="showLeftOptions && canUpdate ? actionList : []"
:api="listExperimentResultApi"
:show-overflow="false"
@@ -171,6 +171,8 @@ import {
import { useI18n } from 'vue-i18n';
import { updateTaskStatusApi } from '@/api/project/task';
import { FILE_TYPE } from '@/utils/enum/file';
import { TASK_PROCESS_STATUS } from '@/utils/enum/task';
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
const env = import.meta.env;
@@ -188,6 +190,10 @@ const props = defineProps({
type: Boolean,
default: true,
},
showCheckbox: {
type: Boolean,
default: true,
},
});
const baseTableRef = ref();
@@ -473,7 +479,9 @@ const submitFun = async () => {
}
if (props.taskInfo.exeStatus != 8) {
await updateTaskExeStatusFun();
if (enableConfigByTenant([TENANT_ENUM.LYRIC])) {
await updateTaskExeStatusFun();
}
}
closeFun();
}
@@ -495,7 +503,7 @@ const updateTaskExeStatusFun = async () => {
taskIds: [props.taskInfo.uuid],
req: {
// ...task,
exeStatus: '8',
exeStatus: TASK_PROCESS_STATUS.CLOSED_LOOP,
},
};

View File

@@ -21,7 +21,9 @@
</el-tabs>
<div class="approval-button">
<el-button v-if="isPMemberOrEMember" @click="reportInpDiaShow = true">编辑报告</el-button>
<el-button v-if="isPMemberOrEMember && showEditReport" @click="reportInpDiaShow = true"
>编辑报告</el-button
>
<el-button
type="primary"
v-if="taskInfo.status != 3 && isPMemberOrEMember"
@@ -40,6 +42,7 @@
:full-height="true"
:show-left-options="showLeftOptions"
:canUpdate="isPMemberOrEMember"
:show-checkbox="showCheckbox"
></taskPerformance>
</div>
<div class="tabs-component" v-if="activeName === 'picture'">
@@ -47,6 +50,7 @@
:task-id="currentTaskInfo?.uuid"
:show-left-options="showLeftOptions"
:canUpdate="isPMemberOrEMember"
:show-checkbox="showCheckbox"
></resultImage>
</div>
<div class="tabs-component" v-if="activeName === 'canvas'">
@@ -54,12 +58,14 @@
:task-id="currentTaskInfo?.uuid"
:show-left-options="showLeftOptions"
:canUpdate="isPMemberOrEMember"
:show-checkbox="showCheckbox"
></taskCurve>
</div>
<div class="tabs-component" v-if="activeName === 'deliverable'">
<taskDeliverable
:task-info="currentTaskInfo"
:task-id="currentTaskInfo?.uuid"
:show-checkbox="showCheckbox"
></taskDeliverable>
</div>
<div class="tabs-component" v-if="activeName === 'model'">
@@ -67,6 +73,7 @@
:task-id="currentTaskInfo?.uuid"
:show-left-options="showLeftOptions"
:canUpdate="isPMemberOrEMember"
:show-checkbox="showCheckbox"
></taskModel>
</div>
<div class="tabs-component" v-if="activeName === '3d-model'">
@@ -75,6 +82,7 @@
:show-left-options="showLeftOptions"
:disabled="!showLeftOptions"
:canUpdate="isPMemberOrEMember"
:show-checkbox="showCheckbox"
></task3DModel>
</div>
<div class="tabs-component" v-if="activeName === 'report'">
@@ -82,6 +90,7 @@
:task-id="currentTaskInfo?.uuid"
:show-left-options="showLeftOptions"
:canUpdate="isPMemberOrEMember"
:show-checkbox="showCheckbox"
></taskReport>
</div>
<div class="tabs-component" v-if="activeName === 'video'">
@@ -89,6 +98,7 @@
:task-id="currentTaskInfo?.uuid"
:show-left-options="showLeftOptions"
:canUpdate="isPMemberOrEMember"
:show-checkbox="showCheckbox"
></videoFile>
</div>
<div class="tabs-component" v-if="activeName === 'experiment'">
@@ -96,6 +106,7 @@
:task-info="currentTaskInfo"
:show-left-options="showLeftOptions"
:canUpdate="isPMemberOrEMember"
:show-checkbox="showCheckbox"
></experimentResult>
</div>
<div class="tabs-component" v-if="activeName === 'taskInfo'">
@@ -112,6 +123,7 @@
:task-id="currentTaskInfo?.uuid"
:show-left-options="showLeftOptions"
:canUpdate="isPMemberOrEMember"
:show-checkbox="showCheckbox"
></reviewData>
</div>
</div>
@@ -198,6 +210,14 @@ const props = defineProps({
type: Boolean,
default: true,
},
showCheckbox: {
type: Boolean,
default: true,
},
showEditReport: {
type: Boolean,
default: true,
},
});
const formAttrs = ref({
progress: {

View File

@@ -271,6 +271,7 @@ const confirmUploadFun = async () => {
form.append('fileTypeDictValue', fromData.fileTypeDictValue || '');
form.append('disciplineTypeDictClass', 'DISCIPLINE_TYPE');
form.append('disciplineDictValue', fromData.disciplineDictValue || '');
// 文件都走的batchAddFileInfoApi上传这个只是插入数据库记录
await upload(`${PREFIX}node/uploadProjectFiles`, form);
}
}
@@ -357,6 +358,7 @@ const confirmUploadFun = async () => {
form.append('fileTypeDictValue', fromData.fileTypeDictValue || '');
form.append('disciplineTypeDictClass', 'DISCIPLINE_TYPE');
form.append('disciplineDictValue', fromData.disciplineDictValue || '');
// 文件都走的batchAddFileInfoApi上传这个只是更新数据库记录
await upload(`${PREFIX}node/uploadProjectFiles`, form);
}
}

View File

@@ -25,7 +25,7 @@
<el-radio-group v-model="activeRadio">
<el-radio-button label="任务详情" value="detail" v-if="showTaskInfo" />
<el-radio-button label="仿真报告" value="report" />
<el-radio-button label="关联需求" value="demand" />
<el-radio-button label="关联待办" value="demand" />
</el-radio-group>
<div class="task-tab-content set-tab-content" v-if="activeRadio === 'report'">

View File

@@ -157,7 +157,7 @@
<el-tab-pane
label="任务指标"
name="proformance"
v-if="!enableConfigByTenant([TENANT_ENUM.LYRIC])"
v-if="enableConfigByTenant([TENANT_ENUM.BASE])"
>
<projectTaskPerformanceList
v-if="displayedTabs.includes('proformance') && projectUuid"
@@ -232,22 +232,8 @@ const props = defineProps({
type: String,
default: '',
},
projectInfo: {
type: Object,
default: () => ({}),
},
});
// 当前用户是不是项目经理
const isMember = ref(false);
watch(
() => props.projectInfo,
(newVal) => {
isMember.value = isSimProjectManager(newVal.memberList);
},
{ immediate: true }
);
const emits = defineEmits(['goBack']);
// const router = useRouter();
@@ -420,6 +406,16 @@ const projectInfoLoadCompleteFun = () => {
// getProjectListApi();
// }
// }
// 当前用户是不是项目经理
const isMember = ref(false);
watch(
() => currentProjectInfo.memberList,
(newVal) => {
isMember.value = isSimProjectManager(newVal);
},
{ immediate: true }
);
</script>
<style lang="scss" scoped>

View File

@@ -105,7 +105,6 @@
/>
<ProjectDetail
v-if="showProjectDetailVisible"
:projectInfo="currentProjectInfo"
:projectName="currentProject.nodeName"
:projectUuid="currentProject.uuid"
@goBack="showProjectDetailVisible = false"

View File

@@ -2,7 +2,7 @@
<div class="comp-content">
<Dialog
v-model="dialogVisible"
diaTitle="需求详细信息"
diaTitle="待办详细信息"
width="60%"
height="80%"
@close="closeFun"

View File

@@ -199,7 +199,7 @@ const diaVisible = computed({
// BATCH_SEND_TASK
const headData = ref<any[]>([
{
title: '需求名称',
title: '待办名称',
key: 'demandName',
isShow: true,
inputMode: 'input',
@@ -288,19 +288,19 @@ const confirmFun = async () => {
for (let index = 0; index < tableRef.value.tableData.length; index++) {
const item = tableRef.value.tableData[index];
if (!item.insertIndex) {
return ElMessage.warning('需求名为 ' + item.demandName + ' 的上层节点不能为空!');
return ElMessage.warning('待办名为 ' + item.demandName + ' 的上层节点不能为空!');
}
if (item.insertMode === 'lib' && item.chooseTaskList?.length === 0) {
return ElMessage.warning('需求名为 ' + item.demandName + ' 的选择工况不能为空!');
return ElMessage.warning('待办名为 ' + item.demandName + ' 的选择工况不能为空!');
}
if (item.insertMode === 'custom' && item.taskName?.trim()?.length === 0) {
return ElMessage.warning('需求名为 ' + item.demandName + ' 的任务名称不能为空!');
return ElMessage.warning('待办名为 ' + item.demandName + ' 的任务名称不能为空!');
}
if (item.eMemberList.length === 0) {
return ElMessage.warning('需求名为 ' + item.demandName + ' 的仿真执行人不能为空!');
return ElMessage.warning('待办名为 ' + item.demandName + ' 的仿真执行人不能为空!');
}
if (item.planTime.length === 2 && (!item.planTime[0] || !item.planTime[1])) {
return ElMessage.warning('需求名为 ' + item.demandName + ' 的仿计划时间不能为空!');
return ElMessage.warning('待办名为 ' + item.demandName + ' 的仿计划时间不能为空!');
}
}
loadingInterface.value = true;

View File

@@ -9,7 +9,7 @@
tableName="SIMULATION_TASK_DEMAND_CONFIRM"
:params="taskParams"
:api="demandListApi"
exportFileName="我确认的需求"
exportFileName="我确认的待办"
:actionList="actionList"
:name-click="false"
>
@@ -458,7 +458,7 @@ const checkedList = ref();
const batchSendFun = () => {
checkedList.value = tableRef.value.tableRef.tableRef.getCheckboxRecords();
if (checkedList.value.length === 0) {
return ElMessage.warning('请勾选需要分发的需求');
return ElMessage.warning('请勾选需要分发的待办');
}
bachSendVisible.value = true;
};

View File

@@ -12,7 +12,7 @@
auth: false,
},
}"
exportFileName="新增待办需求"
exportFileName="新增待办"
:actionList="actionList"
@show="showTaskDetailFun"
:name-click="false"
@@ -37,7 +37,7 @@
<Dialog
v-model="formVisible"
:loading="loadingInterface"
:diaTitle="isCreateDialog ? '创建待办' : '编辑需求'"
:diaTitle="isCreateDialog ? '创建待办' : '编辑待办'"
width="60%"
:height="700"
@close="closeFun"
@@ -193,7 +193,7 @@ const actionList = ref([
title: '删除',
type: 'danger',
needConfirm: true,
confirmTip: '删除需求时,跟需求关联的任务及任务下的数据也会删除!确认删除吗?',
confirmTip: '删除待办时,跟待办关联的任务及任务下的数据也会删除!确认删除吗?',
click: (row: any) => {
deleteDemandFun(row.uuid);
},
@@ -351,6 +351,7 @@ const confirmFun = async () => {
projectId: editFormInfo.value.projectId, // 项目id
callbackFlag: '/task/sponsor', // 回调标识
uuid: demandId,
tagReq: {},
};
await uploadBigFile(params, batchAddFileInfoApi);
}
@@ -453,6 +454,7 @@ const editDemandApiFun = async (fromData: any) => {
// isApprove: 0, // 0不需要审批 1需要审批 默认0
// type: 0,
uuid: fromData.uuid,
tagReq: {},
};
await uploadBigFile(params, batchAddFileInfoApi);