update:数据分析界面图片对比样式修改

This commit is contained in:
2026-03-06 10:30:28 +08:00
parent 3e9e2de63a
commit 193d9cb011
3 changed files with 96 additions and 15 deletions

View File

@@ -1,24 +1,33 @@
<template>
<!-- <div class="model-file-page" >
<div class="model-file-page">
<BaseTable
v-if="showTableContent"
:row-config="{
height: 400,
height: 200,
}"
ref="cloudTableRef"
:head="tableColumns"
:tableName="checkTableName"
hidePagination
:fullHeight="true"
>
<template v-for="item in tableColumns" :key="item.key" #[item.key]="{ row }">
<div class="img-content">
<div class="img-item" v-for="item_2 in row[item.key]?.split('_')" :key="item_2">
<img width="100%" :src="getImgPathFun(item_2)" alt="" crossorigin="anonymous" />
</div>
<div class="img-content" v-if="item.key === 'originalName'">
<span>{{ row[item.key] }}</span>
<!-- <img width="100%" :src="getImgPathFun(item_2)" alt="" crossorigin="anonymous" /> -->
</div>
<div class="img-content" v-else>
<img
class="img-item-inner"
:src="getImgPathFun(row[item.key])"
alt=""
@click="reviewFileFun(row[item.key])"
crossorigin="anonymous"
/>
</div>
</template>
</BaseTable>
</div> -->
</div>
<div class="model-file-page">
<div class="imglist" v-for="item_1 in imgLists" :key="item_1.name">
@@ -61,6 +70,7 @@ import { ref, nextTick, watch } from 'vue';
import { objectTypeArrayRemovesDuplicates } from '@/utils/common';
import FilePreview from '@/components/common/filePreview/index.vue';
import { downloadFileByStream } from '@/utils/file';
import BaseTable from '@/components/common/table/baseTable.vue';
const props = defineProps({
checkTaskInfo: {
@@ -83,18 +93,74 @@ const props = defineProps({
const env = import.meta.env;
const previewVisible = ref(false);
const fileId = ref<any>('');
const showTableContent = ref(false);
const cloudTableRef = ref();
const imgLists = ref<any>([]);
const tableData = ref<any>([]);
const modelAttribute = ref<any>([
{
name: '文件名称',
value: 'originalName',
},
]);
const tableColumns = ref<any>([]);
const getTableColumnFun = (data: any) => {
console.log(data, 'data');
showTableContent.value = false;
let originalNames = data.map((item: any) => {
return item.originalName;
});
originalNames = objectTypeArrayRemovesDuplicates(originalNames, 1);
tableData.value = [];
const checkTypes = props.checkType;
let key = 'owntaskName';
let key = 'owntaskId';
let keyName = 'owntaskName';
if (checkTypes === '仿真任务') {
key = 'owntaskName';
key = 'owntaskId';
keyName = 'owntaskName';
}
if (checkTypes === '仿真算例') {
key = 'ownRunName';
key = 'ownRunId';
keyName = 'ownRunName';
}
let cloumns = data.map((item: any) => {
return {
value: item[key],
name: item[keyName],
};
});
cloumns = objectTypeArrayRemovesDuplicates(cloumns, 2);
const allCloumn = modelAttribute.value.concat(cloumns);
tableColumns.value = allCloumn.map((item: any) => {
return {
title: item.name,
key: item.value,
isShow: true,
};
});
for (let i = 0; i < originalNames.length; i++) {
const obj: any = {
originalName: originalNames[i],
};
for (let j = 0; j < data.length; j++) {
if (data[j].originalName === originalNames[i]) {
obj[data[j][key]] = data[j].id;
}
}
tableData.value.push(obj);
}
showTableContent.value = true;
nextTick(() => {
cloudTableRef.value.setDataFun(tableData.value);
});
return;
imgLists.value = [];
const names: any = data.map((item: any) => {
return item[key];
@@ -183,10 +249,17 @@ watch(
.model-file-page {
width: 100%;
height: 100%;
// height: 600px;
overflow: auto;
.img-content {
width: 100%;
.img-item-inner {
// width: 300px;
height: 180px;
cursor: pointer;
}
}
.imglist {

View File

@@ -103,7 +103,7 @@ const curveResultTableRef = ref();
const showTableContent = ref(false);
const tableColumns = ref<any>([]);
const selectName = ref('all');
const selectName = ref('');
const tableData = ref<any>([]);
const columnsNum = ref(1);
@@ -131,10 +131,11 @@ const getTableColumnFun = (data: any) => {
taskOrRunList.value = tableData.value.map((item: any) => {
return { name: item[selectKey.value], value: item[selectKey.value] };
});
taskOrRunList.value.unshift({ name: '全部', value: 'all' });
console.log(data, 'data');
taskOrRunList.value = objectTypeArrayRemovesDuplicates(taskOrRunList.value, 2);
// taskOrRunList.value.unshift({ name: '全部', value: 'all' });
taskOrRunList.value = objectTypeArrayRemovesDuplicates(taskOrRunList.value, 2);
selectName.value = taskOrRunList.value[0].value;
filterFileFun();
return;
tableData.value = [];
tableColumns.value = [];

View File

@@ -125,6 +125,7 @@ const getTableColumnsFun = (data: any) => {
title: '指标信息',
key: 'performanceInfo',
isShow: true,
align: 'center',
},
];
const list: any = data || [];
@@ -256,5 +257,11 @@ watch(
display: flex;
justify-content: center;
}
:deep(.vxe-table .vxe-header--row .vxe-table--column .vxe-header-cell--wrapper) {
display: flex;
align-items: center;
justify-content: center !important;
}
}
</style>