merge
This commit is contained in:
@@ -8,7 +8,18 @@
|
||||
@close="closeFun"
|
||||
>
|
||||
<div class="content">
|
||||
<TableForm ref="tableFormRef" :tableName="tableName" />
|
||||
<TableForm
|
||||
ref="tableFormRef"
|
||||
:tableName="tableName"
|
||||
:formAttrs="{
|
||||
resultValue: {
|
||||
step: 0.01,
|
||||
},
|
||||
targetValue: {
|
||||
step: 0.01,
|
||||
},
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div>
|
||||
|
||||
@@ -8,7 +8,19 @@
|
||||
@close="closeFun"
|
||||
>
|
||||
<div class="content">
|
||||
<TableForm ref="tableFormRef" :tableName="tableName" showDisabled />
|
||||
<TableForm
|
||||
ref="tableFormRef"
|
||||
:tableName="tableName"
|
||||
:formAttrs="{
|
||||
resultValue: {
|
||||
step: 0.01,
|
||||
},
|
||||
targetValue: {
|
||||
step: 0.01,
|
||||
},
|
||||
}"
|
||||
showDisabled
|
||||
/>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div>
|
||||
|
||||
@@ -140,7 +140,7 @@ import {
|
||||
getRunPerformanceApi,
|
||||
} from '@/api/task/taskpool';
|
||||
import addTaskPerformance from './addTaskPerformance.vue';
|
||||
import { editPerformanceApi, exportPerformanceApi } from '@/api/task/taskPerformance';
|
||||
import { editPerformanceApi } from '@/api/task/taskPerformance';
|
||||
import { getFormConfigureApi } from '@/api/system/systemData';
|
||||
import editPerformancePage from './editPerformancePage.vue';
|
||||
import { getTaskAchieveStyleClass } from '../common/statusDot/statusMap';
|
||||
|
||||
@@ -57,7 +57,7 @@ const getTableColumnsFun = (data: any) => {
|
||||
const performanceDatas = data || [];
|
||||
const type = props.analysisType === '仿真算例' ? 0 : 1;
|
||||
|
||||
console.log(performanceDatas, 'performanceDatasperformanceDatasperformanceDatas');
|
||||
// console.log(performanceDatas, 'performanceDatasperformanceDatasperformanceDatas');
|
||||
|
||||
for (let i = 0; i < performanceDatas.length; i++) {
|
||||
performanceDatas[i].completeStatus = getPerformanceSTatus(performanceDatas[i]) || 0;
|
||||
@@ -68,33 +68,49 @@ const getTableColumnsFun = (data: any) => {
|
||||
|
||||
const taskNames = Array.from(new Set(names));
|
||||
|
||||
console.log(taskNames, 'taskNamestaskNamestaskNames');
|
||||
// console.log(taskNames, 'taskNamestaskNamestaskNames');
|
||||
|
||||
modelAttribute.value = performanceDatas.map((item: any) => {
|
||||
const nodeName = item.nodeName || '';
|
||||
const method = item.method || '';
|
||||
const targetValue = item.targetValue ?? '';
|
||||
const targetValue = Number(item.targetValue) ?? '';
|
||||
const unitLabel = PERFORMANCE_UNIT.value?.O?.[item.unit] || item.unit || '';
|
||||
const obj: any = {
|
||||
name: `${nodeName} (${method} ${targetValue} ${unitLabel})`,
|
||||
value: type ? item.taskId : item.runId,
|
||||
performance: nodeName,
|
||||
};
|
||||
|
||||
obj[type ? item.taskId : item.runId] = item.resultValue;
|
||||
return obj;
|
||||
});
|
||||
|
||||
let performance = modelAttribute.value.map((item: any) => {
|
||||
return item.performance;
|
||||
});
|
||||
performance = objectTypeArrayRemovesDuplicates(performance, 1);
|
||||
|
||||
const listData: any = [];
|
||||
|
||||
for (let i = 0; i < performance.length; i++) {
|
||||
const obj: any = {};
|
||||
for (let j = 0; j < modelAttribute.value.length; j++) {
|
||||
if (modelAttribute.value[j].performance === performance[i]) {
|
||||
for (const key in modelAttribute.value[j]) {
|
||||
obj[key] = modelAttribute.value[j][key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
listData.push(obj);
|
||||
}
|
||||
|
||||
const defaultColumns = [
|
||||
{
|
||||
title: '指标信息',
|
||||
key: 'performanceInfo',
|
||||
isShow: true,
|
||||
},
|
||||
{
|
||||
title: '达成情况',
|
||||
key: 'completeStatus',
|
||||
isShow: false,
|
||||
},
|
||||
];
|
||||
const list: any = data || [];
|
||||
|
||||
@@ -121,20 +137,18 @@ const getTableColumnsFun = (data: any) => {
|
||||
tableColumns.value[i].width = props.cloumnWidth;
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < modelAttribute.value.length; i++) {
|
||||
for (let i = 0; i < listData.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;
|
||||
obj[tableColumns.value[j].key] = listData[i].name;
|
||||
} else {
|
||||
obj[tableColumns.value[j].key] = modelAttribute.value[i][tableColumns.value[j].key];
|
||||
obj[tableColumns.value[j].key] = listData[i][tableColumns.value[j].key];
|
||||
}
|
||||
}
|
||||
|
||||
tableData.value.push(obj);
|
||||
}
|
||||
console.log(modelcolumns, 'modelcolumns');
|
||||
|
||||
showTableContent.value = true;
|
||||
nextTick(() => {
|
||||
performanceTableRef.value.setDataFun(tableData.value);
|
||||
|
||||
@@ -50,9 +50,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="task-operate">
|
||||
<!-- runInfo.status === RUN_STATUS.UNSTART -->
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="runInfo.status === RUN_STATUS.UNSTART"
|
||||
v-if="!runInfo.status"
|
||||
:disabled="uploadFileFlag"
|
||||
@click="startTaskRunJobFun"
|
||||
>开始</el-button
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
>查看</el-button
|
||||
>
|
||||
<el-button @click="openFun">上传</el-button>
|
||||
<el-button type="danger" @click="batchDeleteFun" :disabled="isDelete"
|
||||
>批量删除</el-button
|
||||
>
|
||||
</template>
|
||||
</BaseTable>
|
||||
</div>
|
||||
@@ -837,6 +840,24 @@ const actionList = ref([
|
||||
},
|
||||
]);
|
||||
|
||||
const isDelete = ref(false);
|
||||
const batchDeleteFun = async () => {
|
||||
const checkDatas = baseTableRef.value.tableRef.getCheckboxRecords();
|
||||
if (checkDatas?.length) {
|
||||
isDelete.value = true;
|
||||
for (let i = 0; i < checkDatas?.length; i++) {
|
||||
await deleteSimulationKeyResultApi({
|
||||
uuid: checkDatas[i].uuid,
|
||||
fileId: checkDatas[i].fileId,
|
||||
});
|
||||
}
|
||||
ElMessage.success('删除成功');
|
||||
isDelete.value = false;
|
||||
|
||||
reloadFun();
|
||||
}
|
||||
};
|
||||
|
||||
const chnageFun = async (data: any) => {
|
||||
const name = runDirNameList.value.find((item: any) => {
|
||||
return item.id === currentDirName.value;
|
||||
|
||||
Reference in New Issue
Block a user