数据查询界面数据对比相关界面更新
This commit is contained in:
279
src/views/data/analysis/components/analysisDataDialog.vue
Normal file
279
src/views/data/analysis/components/analysisDataDialog.vue
Normal file
@@ -0,0 +1,279 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog v-model="diaVisible" diaTitle="数据分析" width="90%" height="90%" @close="closeFun">
|
||||||
|
<div class="content">
|
||||||
|
|
||||||
|
<div class="filter-analysis-content">
|
||||||
|
<el-checkbox class="check-all" v-model="checkAll" label="全选" value="all" @change="checkAllChangeFn" />
|
||||||
|
|
||||||
|
<el-checkbox-group v-model="checkAnalysisList">
|
||||||
|
<template v-for="item in analysisTypeList" :key="item.value">
|
||||||
|
<el-checkbox
|
||||||
|
v-show="item.includes.includes(analysisType)"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.value"
|
||||||
|
@change="checkChangeFn(item.value)"
|
||||||
|
/>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="check-table-content">
|
||||||
|
|
||||||
|
<div class="loadcase-table-content">
|
||||||
|
<BaseTable
|
||||||
|
v-if="checkTableName"
|
||||||
|
@checkbox-change="changeChceckFn"
|
||||||
|
ref="checkTableRef"
|
||||||
|
:tableName="checkTableName"
|
||||||
|
showCheckbox
|
||||||
|
hidePagination
|
||||||
|
></BaseTable>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template v-for="item in analysisTypeList" :key="item.value">
|
||||||
|
<div class="analysis-type-content" v-show="checkAnalysisList.includes(item.value)">
|
||||||
|
|
||||||
|
<div class="analysis-type-content-title">
|
||||||
|
<div class="title-item">{{ getTitleFn(item.value) }}</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="analysis-type-content-item" v-if="checktableData.length">
|
||||||
|
<template v-if="item.value === 'model'">
|
||||||
|
<modelFileResult v-if="showComponents" :check-task-info="checktableData" :cloumn-width="cloumnWidth">
|
||||||
|
</modelFileResult>
|
||||||
|
</template>
|
||||||
|
<template v-if="item.value === 'calculationFile'">
|
||||||
|
<calculationFileResult
|
||||||
|
v-if="showComponents"
|
||||||
|
:check-task-info="checktableData"
|
||||||
|
:cloumn-width="cloumnWidth"
|
||||||
|
></calculationFileResult>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-if="item.value === 'numericalResult'">
|
||||||
|
<performanceAnalysis
|
||||||
|
v-if="showComponents"
|
||||||
|
:check-task-info="checktableData"
|
||||||
|
:cloumn-width="cloumnWidth"
|
||||||
|
></performanceAnalysis>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</Dialog>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, defineProps, defineEmits, watch } from 'vue';
|
||||||
|
import Dialog from '@/components/common/dialog/index.vue';
|
||||||
|
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||||
|
import modelFileResult from './modelFileResult.vue';
|
||||||
|
import calculationFileResult from './calculationFileResult.vue';
|
||||||
|
import performanceAnalysis from './performanceAnalysis.vue';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
analysisData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => { },
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const cloumnWidth = ref('100');
|
||||||
|
|
||||||
|
const checkTableRef = ref();
|
||||||
|
|
||||||
|
const diaVisible = ref(true);
|
||||||
|
|
||||||
|
const checkAnalysisList = ref<any>([]);
|
||||||
|
|
||||||
|
const emits = defineEmits(['close']);
|
||||||
|
|
||||||
|
const closeFun = () => {
|
||||||
|
emits('close');
|
||||||
|
};
|
||||||
|
|
||||||
|
const analysisType = ref<any>('');
|
||||||
|
const analysisTableData = ref<any>([]);
|
||||||
|
const showComponents = ref(true);
|
||||||
|
const changeChceckFn = (data: any) => {
|
||||||
|
showComponents.value = false;
|
||||||
|
if (data.checked) {
|
||||||
|
checktableData.value.push(data.row);
|
||||||
|
} else {
|
||||||
|
checktableData.value = checktableData.value.filter((item: any) => {
|
||||||
|
return item.id != data.row.id;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
showComponents.value = true;
|
||||||
|
|
||||||
|
}, 50);
|
||||||
|
console.log(showComponents.value, 'showComponents');
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const analysisTypeList = ref<any>([
|
||||||
|
|
||||||
|
{
|
||||||
|
value: 'model',
|
||||||
|
name: '模型文件',
|
||||||
|
includes: ['仿真工况'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'calculationFile',
|
||||||
|
name: '计算文件',
|
||||||
|
includes: ['仿真工况'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'numericalResult',
|
||||||
|
name: '数值结果',
|
||||||
|
includes: ['仿真工况'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'result',
|
||||||
|
name: '云图结果',
|
||||||
|
includes: ['仿真工况'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'curve',
|
||||||
|
name: '曲线结果',
|
||||||
|
includes: ['仿真工况'],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'report',
|
||||||
|
name: '仿真报告',
|
||||||
|
includes: ['仿真工况'],
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const checkTableName = ref<any>('');
|
||||||
|
|
||||||
|
const checktableData = ref<any>([]);
|
||||||
|
|
||||||
|
watch(() => props.analysisData, async (newVal) => {
|
||||||
|
if (newVal) {
|
||||||
|
analysisType.value = newVal.flag;
|
||||||
|
analysisTableData.value = newVal.data;
|
||||||
|
|
||||||
|
checkTableName.value = newVal.tableName;
|
||||||
|
const list = analysisTypeList.value.filter((item: any) => {
|
||||||
|
return item.includes.includes(analysisType.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
checkAnalysisList.value = list.map((item: any) => {
|
||||||
|
return item.value;
|
||||||
|
});
|
||||||
|
|
||||||
|
setTimeout(async () => {
|
||||||
|
checkTableRef.value?.setDataFun(analysisTableData.value);
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
deep: true,
|
||||||
|
immediate: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const checkChangeFn = (flag: any) => {
|
||||||
|
console.log(flag, 'flag');
|
||||||
|
console.log(checkAnalysisList.value, 'checkAnalysisList');
|
||||||
|
|
||||||
|
const list = analysisTypeList.value.filter((item: any) => {
|
||||||
|
return item.includes.includes(analysisType.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (checkAnalysisList.value.length === list.length) {
|
||||||
|
checkAll.value = true;
|
||||||
|
} else {
|
||||||
|
checkAll.value = false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
const checkAll = ref(true);
|
||||||
|
const checkAllChangeFn = () => {
|
||||||
|
|
||||||
|
const list = analysisTypeList.value.filter((item: any) => {
|
||||||
|
return item.includes.includes(analysisType.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
if (checkAll.value) {
|
||||||
|
checkAnalysisList.value = list.map((item: any) => {
|
||||||
|
return item.value;
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
checkAnalysisList.value = [];
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const getTitleFn = (flag: any) => {
|
||||||
|
const name = analysisTypeList.value.find((item: any) => {
|
||||||
|
return item.value === flag;
|
||||||
|
})?.name;
|
||||||
|
|
||||||
|
return name + '对比';
|
||||||
|
};
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.content {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
|
.filter-analysis-content {
|
||||||
|
width: 100%;
|
||||||
|
height: 40px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-end;
|
||||||
|
|
||||||
|
.check-all {
|
||||||
|
margin-right: 30px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.check-table-content {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.loadcase-table-content {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.analysis-type-content {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.analysis-type-content-title {
|
||||||
|
width: 100%;
|
||||||
|
height: 50px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.title-item {
|
||||||
|
border-left: 4px solid #409eff;
|
||||||
|
padding-left: 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.analysis-type-content-item {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
140
src/views/data/analysis/components/calculationFileResult.vue
Normal file
140
src/views/data/analysis/components/calculationFileResult.vue
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
<template>
|
||||||
|
<div class="calculation-file-page">
|
||||||
|
<BaseTable v-if="showTableContent" ref="calculationFileTableRef" :head="tableColumns" :tableName="checkTableName" hidePagination></BaseTable>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, defineProps, nextTick, watch } from 'vue';
|
||||||
|
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
checkTaskInfo: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
checkTableName: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
cloumnWidth: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const calculationFileTableRef = ref();
|
||||||
|
const showTableContent = ref(false);
|
||||||
|
|
||||||
|
const tableColumns = ref<any>([
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
const tableData = ref<any>([
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
const modelAttribute = ref([
|
||||||
|
{
|
||||||
|
name: '文件名称',
|
||||||
|
value: 'fileName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '所属项目',
|
||||||
|
value: 'project',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '所属阶段',
|
||||||
|
value: 'phase',
|
||||||
|
}, {
|
||||||
|
name: '所属学科',
|
||||||
|
value: 'discipline',
|
||||||
|
}, {
|
||||||
|
name: '所属任务',
|
||||||
|
value: 'task',
|
||||||
|
}, {
|
||||||
|
name: '所属算例',
|
||||||
|
value: 'run',
|
||||||
|
}, {
|
||||||
|
name: '日期',
|
||||||
|
value: 'date',
|
||||||
|
}, {
|
||||||
|
name: '创建人',
|
||||||
|
value: 'creator',
|
||||||
|
},
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
const getTableColumnFn = (data:any) => {
|
||||||
|
showTableContent.value = false;
|
||||||
|
tableData.value = [];
|
||||||
|
tableColumns.value = [];
|
||||||
|
|
||||||
|
const list:any = data || [];
|
||||||
|
const defaultColumns = [{
|
||||||
|
title: '属性',
|
||||||
|
key: 'attributes',
|
||||||
|
isShow: true,
|
||||||
|
}];
|
||||||
|
const modelcolumns:any = [];
|
||||||
|
|
||||||
|
for (let i = 0;i < list.length;i++) {
|
||||||
|
|
||||||
|
for (let j = 0;j < 2;j++) {
|
||||||
|
|
||||||
|
const obj:any = {
|
||||||
|
title: `${list[i].taskName}_计算文件_${j + 1}`,
|
||||||
|
key: `${list[i].id}_key_${j + 1}`,
|
||||||
|
isShow: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
modelcolumns.push(obj);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
tableColumns.value = defaultColumns.concat(modelcolumns);
|
||||||
|
if (props.cloumnWidth) {
|
||||||
|
for (let i = 0;i < tableColumns.value.length;i++) {
|
||||||
|
tableColumns.value[i].width = props.cloumnWidth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0;i < modelAttribute.value.length;i++) {
|
||||||
|
const obj:any = {
|
||||||
|
|
||||||
|
};
|
||||||
|
for (let j = 0;j < tableColumns.value.length;j++) {
|
||||||
|
if (tableColumns.value[j].key === 'attributes') {
|
||||||
|
obj[tableColumns.value[j].key] = modelAttribute.value[i].name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tableData.value.push(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
showTableContent.value = true;
|
||||||
|
|
||||||
|
nextTick(() => {
|
||||||
|
calculationFileTableRef.value.setDataFun(tableData.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(() => props.checkTaskInfo, (newVal) => {
|
||||||
|
getTableColumnFn(newVal);
|
||||||
|
|
||||||
|
}, {
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
.calculation-file-page{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
145
src/views/data/analysis/components/modelFileResult.vue
Normal file
145
src/views/data/analysis/components/modelFileResult.vue
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
<template>
|
||||||
|
<div class="model-file-page">
|
||||||
|
|
||||||
|
<BaseTable v-if="showTableContent" ref="modelTableRef" :head="tableColumns" :tableName="checkTableName" hidePagination></BaseTable>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, defineProps, nextTick, watch } from 'vue';
|
||||||
|
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
checkTaskInfo: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
checkTableName: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
cloumnWidth: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const modelTableRef = ref();
|
||||||
|
const showTableContent = ref(false);
|
||||||
|
|
||||||
|
const tableColumns = ref<any>([
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
const tableData = ref<any>([
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
const modelAttribute = ref([
|
||||||
|
{
|
||||||
|
name: '文件名称',
|
||||||
|
value: 'fileName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '所属项目',
|
||||||
|
value: 'project',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '所属阶段',
|
||||||
|
value: 'phase',
|
||||||
|
}, {
|
||||||
|
name: '所属学科',
|
||||||
|
value: 'discipline',
|
||||||
|
}, {
|
||||||
|
name: '所属任务',
|
||||||
|
value: 'task',
|
||||||
|
}, {
|
||||||
|
name: '所属算例',
|
||||||
|
value: 'run',
|
||||||
|
}, {
|
||||||
|
name: '日期',
|
||||||
|
value: 'date',
|
||||||
|
}, {
|
||||||
|
name: '创建人',
|
||||||
|
value: 'creator',
|
||||||
|
},
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
const getTableColumnFn = (data:any) => {
|
||||||
|
showTableContent.value = false;
|
||||||
|
tableData.value = [];
|
||||||
|
tableColumns.value = [];
|
||||||
|
const list:any = data || [];
|
||||||
|
const defaultColumns = [{
|
||||||
|
title: '属性',
|
||||||
|
key: 'attributes',
|
||||||
|
isShow: true,
|
||||||
|
}];
|
||||||
|
const modelcolumns:any = [];
|
||||||
|
|
||||||
|
for (let i = 0;i < list.length;i++) {
|
||||||
|
|
||||||
|
for (let j = 0;j < 2;j++) {
|
||||||
|
|
||||||
|
const obj:any = {
|
||||||
|
title: `${list[i].taskName}_模型文件_${j + 1}`,
|
||||||
|
key: `${list[i].id}_key_${j + 1}`,
|
||||||
|
isShow: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
modelcolumns.push(obj);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
tableColumns.value = defaultColumns.concat(modelcolumns);
|
||||||
|
|
||||||
|
if (props.cloumnWidth) {
|
||||||
|
for (let i = 0;i < tableColumns.value.length;i++) {
|
||||||
|
tableColumns.value[i].width = props.cloumnWidth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0;i < modelAttribute.value.length;i++) {
|
||||||
|
const obj:any = {
|
||||||
|
|
||||||
|
};
|
||||||
|
for (let j = 0;j < tableColumns.value.length;j++) {
|
||||||
|
if (tableColumns.value[j].key === 'attributes') {
|
||||||
|
obj[tableColumns.value[j].key] = modelAttribute.value[i].name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tableData.value.push(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
showTableContent.value = true;
|
||||||
|
|
||||||
|
nextTick(() => {
|
||||||
|
modelTableRef.value.setDataFun(tableData.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(() => props.checkTaskInfo, (newVal) => {
|
||||||
|
if (newVal) {
|
||||||
|
getTableColumnFn(newVal);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}, {
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
.model-file-page{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
127
src/views/data/analysis/components/performanceAnalysis.vue
Normal file
127
src/views/data/analysis/components/performanceAnalysis.vue
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
<template>
|
||||||
|
<div class="performance-page">
|
||||||
|
|
||||||
|
<BaseTable v-if="showTableContent" ref="performanceTableRef" :head="tableColumns" :tableName="checkTableName" hidePagination>
|
||||||
|
<template #performanceInfo="{row}">
|
||||||
|
{{ row.performanceInfo }}
|
||||||
|
</template>
|
||||||
|
</BaseTable>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, defineProps, defineEmits, watch, nextTick } from 'vue';
|
||||||
|
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
checkTaskInfo: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
checkTableName: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
cloumnWidth: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const performanceTableRef = ref();
|
||||||
|
const showTableContent = ref(false);
|
||||||
|
const tableData = ref<any>([
|
||||||
|
|
||||||
|
]);
|
||||||
|
const tableColumns = ref<any>([
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
|
const modelAttribute = ref<any>([
|
||||||
|
{
|
||||||
|
name: '文件名称',
|
||||||
|
value: 'fileName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '所属项目',
|
||||||
|
value: 'project',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const getTableColumnsFn = (data:any) => {
|
||||||
|
const defaultColumns = [{
|
||||||
|
title: '指标信息',
|
||||||
|
key: 'performanceInfo',
|
||||||
|
isShow: true,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
const list:any = data || [];
|
||||||
|
|
||||||
|
showTableContent.value = false;
|
||||||
|
tableData.value = [];
|
||||||
|
tableColumns.value = [];
|
||||||
|
|
||||||
|
const modelcolumns:any = [];
|
||||||
|
|
||||||
|
for (let i = 0;i < list.length;i++) {
|
||||||
|
|
||||||
|
for (let j = 0;j < 2;j++) {
|
||||||
|
|
||||||
|
const obj:any = {
|
||||||
|
title: `${list[i].taskName}_算例_${j + 1}`,
|
||||||
|
key: `${list[i].id}_key_${j + 1}`,
|
||||||
|
isShow: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
modelcolumns.push(obj);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
tableColumns.value = defaultColumns.concat(modelcolumns);
|
||||||
|
|
||||||
|
if (props.cloumnWidth) {
|
||||||
|
for (let i = 0;i < tableColumns.value.length;i++) {
|
||||||
|
tableColumns.value[i].width = props.cloumnWidth;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let i = 0;i < modelAttribute.value.length;i++) {
|
||||||
|
const obj:any = {
|
||||||
|
|
||||||
|
};
|
||||||
|
for (let j = 0;j < tableColumns.value.length;j++) {
|
||||||
|
if (tableColumns.value[j].key === 'performanceInfo') {
|
||||||
|
obj[tableColumns.value[j].key] = modelAttribute.value[i].name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tableData.value.push(obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
showTableContent.value = true;
|
||||||
|
|
||||||
|
nextTick(() => {
|
||||||
|
performanceTableRef.value.setDataFun(tableData.value);
|
||||||
|
});
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
watch(() => props.checkTaskInfo, (newVal) => {
|
||||||
|
getTableColumnsFn(newVal);
|
||||||
|
}, {
|
||||||
|
immediate: true,
|
||||||
|
deep: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
.performance-page{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -12,6 +12,9 @@
|
|||||||
showCheckbox
|
showCheckbox
|
||||||
@searchChange="searchChangeFun"
|
@searchChange="searchChangeFun"
|
||||||
>
|
>
|
||||||
|
<template #leftOptions>
|
||||||
|
<!-- <el-button type="primary" @click="openDataAnalysisFn(currentModel,'SIMULATION_TASK_ANALYSIS')">数据分析</el-button> -->
|
||||||
|
</template>
|
||||||
<template #tableActions="{row}">
|
<template #tableActions="{row}">
|
||||||
<el-link type="primary">查看详情</el-link>
|
<el-link type="primary">查看详情</el-link>
|
||||||
</template>
|
</template>
|
||||||
@@ -262,6 +265,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
<analysisDataDialog v-if="loadcaseAnalysisVisable" @close="closeAnalysisFn" :analysis-data="selectAnalysisData"></analysisDataDialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -276,6 +281,7 @@ import Dialog from '@/components/common/dialog/index.vue';
|
|||||||
import EchartCard from '@/components/common/echartCard/index.vue';
|
import EchartCard from '@/components/common/echartCard/index.vue';
|
||||||
import { groupBy } from 'lodash';
|
import { groupBy } from 'lodash';
|
||||||
import UploadFile from '@/components/common/uploadFile/index.vue';
|
import UploadFile from '@/components/common/uploadFile/index.vue';
|
||||||
|
import analysisDataDialog from './components/analysisDataDialog.vue';
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const searchChangeFun = ({ data, key, val }:any) => {
|
const searchChangeFun = ({ data, key, val }:any) => {
|
||||||
@@ -557,6 +563,29 @@ const checkBoxPngChangeFun = () => {
|
|||||||
item.url = `${env.VITE_API_IMAGE_PREVIEW_URL}/data/previewImage?fileId=${item.id}`;
|
item.url = `${env.VITE_API_IMAGE_PREVIEW_URL}/data/previewImage?fileId=${item.id}`;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const loadcaseAnalysisVisable = ref(false);
|
||||||
|
|
||||||
|
const selectAnalysisData = ref<any>({});
|
||||||
|
|
||||||
|
const openDataAnalysisFn = (flag:any, tableName:any) => {
|
||||||
|
if (flag === '仿真工况') {
|
||||||
|
loadcaseAnalysisVisable.value = true;
|
||||||
|
|
||||||
|
selectAnalysisData.value = {
|
||||||
|
flag,
|
||||||
|
data: tableRef.value.tableRef.getCheckboxRecords(),
|
||||||
|
tableName,
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const closeAnalysisFn = () => {
|
||||||
|
loadcaseAnalysisVisable.value = false;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getProjectOptionsFun();
|
getProjectOptionsFun();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user