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