fix:bug修复

This commit is contained in:
2026-03-27 17:01:05 +08:00
parent 7791db8b7f
commit 3032bb337b

View File

@@ -49,7 +49,7 @@
<el-button @click="refreshFun">刷新</el-button> <el-button @click="refreshFun">刷新</el-button>
</template> </template>
<template v-if="tableName === 'RUN_RESULT_IMAGE_TABLE'" #cardTemplate> <template v-if="tableName === 'RUN_RESULT_IMAGE_TABLE'" #cardTemplate="{ tableData }">
<ImageCard <ImageCard
ref="imageCardRef" ref="imageCardRef"
:list="tableData" :list="tableData"
@@ -545,6 +545,7 @@ const { ALL_FILE_TYPE, DISCIPLINE_TYPE }: any = useDict('ALL_FILE_TYPE', 'DISCIP
const baseTableRef = ref(); const baseTableRef = ref();
const tableFormRef = ref(); const tableFormRef = ref();
const imageCardRef = ref();
const visible = ref(false); const visible = ref(false);
const runInfo = ref<any>({}); const runInfo = ref<any>({});
const currentDirName = ref<any>(''); const currentDirName = ref<any>('');
@@ -615,7 +616,12 @@ const queryDirDataFun = async (param: any) => {
}); });
res.data.data = list; res.data.data = list;
tableData.value = res.data.data; tableData2.value = res.data.data.map((item: any) => {
return {
...item,
originalName: item.name,
};
});
return res; return res;
} }
}; };
@@ -704,7 +710,7 @@ const openFun = () => {
// uploadFIleFormData[key] = ''; // uploadFIleFormData[key] = '';
// } // }
// }); // });
tableData.value = []; tableData2.value = [];
uploadFileVisible.value = true; uploadFileVisible.value = true;
}; };
@@ -990,7 +996,13 @@ const getparamListFUn = () => {
const viewFiles = ref<any>([]); const viewFiles = ref<any>([]);
const viewFun = () => { const viewFun = () => {
if (viewType.value === 'llst') {
viewFiles.value = baseTableRef.value.tableRef.getCheckboxRecords(); viewFiles.value = baseTableRef.value.tableRef.getCheckboxRecords();
} else {
viewFiles.value = imageCardRef.value.getSelectedIds() || [];
console.log(viewFiles.value, 'viewFiles.value');
}
if (viewFiles.value.length) { if (viewFiles.value.length) {
const name = getdirNameFun(); const name = getdirNameFun();
const data = viewFiles.value.map((item: any) => { const data = viewFiles.value.map((item: any) => {
@@ -1172,18 +1184,18 @@ const setChartFun = () => {
} }
}; };
const tableData = ref<any>([]); const tableData2 = ref<any>([]);
const uploadActionList = ref([ const uploadActionList = ref([
{ {
title: '删除', title: '删除',
type: 'danger', type: 'danger',
click: (row: any) => { click: (row: any) => {
tableData.value = tableData.value.filter((item: any) => { tableData2.value = tableData2.value.filter((item: any) => {
return item.id != row.id; return item.id != row.id;
}); });
baseUploadTableRef.value.setDataFun(tableData.value); baseUploadTableRef.value.setDataFun(tableData2.value);
}, },
}, },
]); ]);
@@ -1265,7 +1277,8 @@ const beforeUploadFun = async (file: any) => {
} }
} }
tableData.value.push(obj); tableData2.value.push(obj);
baseUploadTableRef.value.setDataFun(tableData2.value);
return false; return false;
}; };
@@ -1277,23 +1290,23 @@ const submitFun2 = async () => {
} }
let isSubmit: any = true; let isSubmit: any = true;
for (let i = 0; i < tableData.value.length; i++) { for (let i = 0; i < tableData2.value.length; i++) {
const file = tableData.value[i].file; const file = tableData2.value[i].file;
const name = file.name; const name = file.name;
const paramData: any = {}; const paramData: any = {};
tableData.value[i].fileTypeDictValue = formData.fileType.join(','); tableData2.value[i].fileTypeDictValue = formData.fileType.join(',');
tableData.value[i].disciplineDictValue = formData.discipline; tableData2.value[i].disciplineDictValue = formData.discipline;
if (tableData.value[i].disciplineDictValue) { if (tableData2.value[i].disciplineDictValue) {
tableData.value[i].dictTags.push('disciplineTypeDictClass'); tableData2.value[i].dictTags.push('disciplineTypeDictClass');
tableData.value[i].dictTags.push('disciplineDictValue'); tableData2.value[i].dictTags.push('disciplineDictValue');
} }
tableData.value[i].dictTags = tableData.value[i].dictTags.join(','); tableData2.value[i].dictTags = tableData2.value[i].dictTags.join(',');
for (const key in tableData.value[i]) { for (const key in tableData2.value[i]) {
if (key != '_X_ROW_KEY' && key != 'unitsList') { if (key != '_X_ROW_KEY' && key != 'unitsList') {
paramData[key] = tableData.value[i][key]; paramData[key] = tableData2.value[i][key];
} }
} }
@@ -1309,15 +1322,15 @@ const submitFun2 = async () => {
}; };
const paramQuantityType = quantityTypeList.value.find((item: any) => { const paramQuantityType = quantityTypeList.value.find((item: any) => {
return item.name === tableData.value[i].quantityType; return item.name === tableData2.value[i].quantityType;
})?.label; })?.label;
const paramXQuantityType = quantityTypeList.value.find((item: any) => { const paramXQuantityType = quantityTypeList.value.find((item: any) => {
return item.name === tableData.value[i].xQuantityType; return item.name === tableData2.value[i].xQuantityType;
})?.label; })?.label;
const paramYQuantityType = quantityTypeList.value.find((item: any) => { const paramYQuantityType = quantityTypeList.value.find((item: any) => {
return item.name === tableData.value[i].yQuantityType; return item.name === tableData2.value[i].yQuantityType;
})?.label; })?.label;
if (paramQuantityType) { if (paramQuantityType) {