This commit is contained in:
2026-01-29 15:19:49 +08:00
7 changed files with 33 additions and 46 deletions

View File

@@ -16,7 +16,11 @@
ref="tableFormRef"
:tableName="localTableName"
v-model:data="formData"
:formAttrs="formAttrs"
:formAttrs="{
nodeCode: { disabled: formData.nodeType === NODE_TYPE.DISCIPLINE },
englishName: { disabled: formData.nodeType === NODE_TYPE.DISCIPLINE },
nodeType: { disabled: localOperationType === 'edit' },
}"
:rule-data="ruleData"
:itemNum="localItemNum"
@change="onFormChangeFun"
@@ -115,14 +119,6 @@ const standard = ref();
const tagSortOrderList = ref<string[]>([]);
const tagNameMap = ref<Map<string, string>>(new Map());
const formData = ref<any>({});
const formAttrs = computed(() => {
const isDiscipline = formData.value.nodeType === NODE_TYPE.DISCIPLINE;
return {
nodeCode: { disabled: isDiscipline },
englishName: { disabled: isDiscipline },
nodeType: { disabled: localOperationType.value === OPERATION_TYPE.EDIT },
};
});
watch(
() => props.modelValue,

View File

@@ -12,7 +12,14 @@
<TableForm
ref="tableFormRef"
tableName="NODE_LIST_LEVEL1"
:formAttrs="formAttrs"
:formAttrs="{
projectSource: { disabled: !!props.projectId },
epProjectSelect: { disabled: projectInfo.projectSource !== 'EP' || !!props.projectId },
nodeName: { disabled: projectInfo.projectSource === 'EP' },
nodeCode: { disabled: projectInfo.projectSource === 'EP' },
projectId: { disabled: projectInfo.projectSource === 'EP' },
nodeSubType: !!props.projectId ? {} : { defaultSelects: [0] },
}"
@load="loadFun"
@change="formChangeFun"
v-model:data="editRowInfo"
@@ -61,18 +68,6 @@ const tableFormRef = ref();
const loadingInterface = ref(false);
const epProjectId = ref<number | null>(null);
const formAttrs = computed(() => {
return {
projectSource: { disabled: !!props.projectId },
epProjectSelect: { disabled: projectInfo.projectSource !== 'EP' || !!props.projectId },
nodeName: { disabled: projectInfo.projectSource === 'EP' },
nodeCode: { disabled: projectInfo.projectSource === 'EP' },
projectId: { disabled: projectInfo.projectSource === 'EP' },
nodeSubType: {
defaultSelects: [0],
},
};
});
const dialogVisible = computed(() => {
return props.modelValue;

View File

@@ -5,7 +5,12 @@
ref="tableFormRef"
:tableName="tableName"
v-model:data="formData"
:formAttrs="formAttrs"
:formAttrs="{
originalName: {
multiple: !isEdit,
limit: isEdit ? 1 : undefined,
},
}"
:itemNum="5"
@change="onFormChangeFun"
>
@@ -134,13 +139,6 @@ const resetFun = () => {
initSnapshot();
tableFormRef.value?.resetFun();
};
const formAttrs = computed(() => ({
originalName: {
multiple: !isEdit.value,
limit: isEdit.value ? 1 : undefined,
},
}));
const onFormChangeFun = (data: any) => {
formData.value = tableFormRef.value.getFormDataFun();
if (data.key === 'templateId') {

View File

@@ -5,7 +5,15 @@
ref="tableFormRef"
:tableName="tableName"
v-model:data="formData"
:formAttrs="formAttrs"
:formAttrs="{
originalName: {
multiple: !isEdit,
limit: isEdit ? 1 : undefined,
},
templateId: {
moduleCode: 'KNOWLEDGE_APPROVAL',
},
}"
:itemNum="6"
@change="onFormChangeFun"
>
@@ -134,16 +142,6 @@ const resetFun = () => {
initSnapshot();
tableFormRef.value?.resetFun();
};
const formAttrs = computed(() => ({
originalName: {
multiple: !isEdit.value,
limit: isEdit.value ? 1 : undefined,
},
templateId: {
moduleCode: 'KNOWLEDGE_APPROVAL',
},
}));
const onFormChangeFun = (data: any) => {
formData.value = tableFormRef.value.getFormDataFun();
if (data.key === 'templateId') {

View File

@@ -331,7 +331,7 @@ const getConvertData = async (flag: any, type: any) => {
for (let i = 0; i < tasklist.length; i++) {
// const list = (await getAllRunResultByTaskIdFun(tasklist[i].uuid))?.runs;
// data = data.concat(list);
const datas = await getSimulationTaskFileFun(tasklist[i], 'task', FILE_TYPE.CANVAS_FILE);
const datas = await getSimulationTaskFileFun(tasklist[i], 'task', FILE_TYPE.REPORT_FILE);
reportData.value = reportData.value.concat(datas);
}
} else {

View File

@@ -65,8 +65,8 @@ const getTableColumnFun = (data: any) => {
for (let i = 0; i < list.length; i++) {
const obj: any = {
title: `${list[i].runName}-${list[i].originalName}`,
key: `${list[i].taskId}_${list[i].uuid}_${list[i].id}`,
title: `${list[i].owntaskName}-${list[i].originalName}`,
key: `${list[i].owntaskId}_${list[i].uuid}_${list[i].id}`,
isShow: true,
};
@@ -87,7 +87,7 @@ const getTableColumnFun = (data: any) => {
const str = tableColumns.value[i].key;
obj[str] = [];
for (let j = 0; j < list.length; j++) {
const str2 = list[j].taskId + '_' + list[j].uuid + '_' + list[j].id;
const str2 = list[j].owntaskId + '_' + list[j].uuid + '_' + list[j].id;
if (str2 === str) {
obj[str].push(list[j].id);
}

View File

@@ -9,7 +9,7 @@
>
<template v-for="item in tableColumns" :key="item.key" #[item.key]="{ row }">
<div
v-if="row[item.key].includes('.') && row.attributes === '文件名称'"
v-if="row[item.key]?.includes('.') && row.attributes === '文件名称'"
class="img-content"
>
<el-button link type="primary" icon="Document" @click="reviewFileFun(row, item.key)"