fix:任务列表评审状态弹窗,任务执行结果文件夹获取曲线最大值最小值

This commit is contained in:
2025-12-15 15:16:53 +08:00
parent 03abc7122b
commit 5676a8425f
3 changed files with 59 additions and 19 deletions

View File

@@ -38,7 +38,12 @@
:close-on-click-modal="false"
@close="closeFun"
>
<TableForm ref="tableFormRef" :tableName="tableName" :show-disabled="currentFileInfo?.uuid" />
<TableForm
ref="tableFormRef"
:tableName="tableName"
:show-disabled="currentFileInfo?.uuid || isCsv"
@change="chnageFun"
/>
<template #footer>
<div>
<el-button @click="closeFun">关闭</el-button>
@@ -82,6 +87,8 @@ const runDirs = ref<any>([]);
const runDirNameList = ref<any>([]);
const showPage = ref(false);
const isCsv = ref(false);
const getRunInfoDirsFun = async () => {
showPage.value = false;
const res: any = await queryRunDirApi({
@@ -150,23 +157,6 @@ const runResultDirChangeFun = () => {
}
};
watch(
() => props.currentRunIfno,
async (newVal) => {
if (newVal) {
runInfo.value = newVal;
nextTick(async () => {
await getRunInfoDirsFun();
});
}
},
{
immediate: true,
deep: true,
}
);
const accept = ref<any>('.jpg/.jpeg/.png/.gif');
const getFileType = () => {
let type: any = FILE_TYPE.CALCULATION_FILE;
@@ -191,6 +181,7 @@ const getFileType = () => {
const closeFun = () => {
visible.value = false;
isCsv.value = false;
};
const openFun = () => {
@@ -279,6 +270,8 @@ const submitFun = async () => {
console.log(fromData, 'fromData');
}
}
isCsv.value = false;
};
const deleteFile = async (data: any) => {
@@ -343,6 +336,53 @@ const actionList = ref([
},
]);
const chnageFun = async (data: any) => {
console.log(data, 'data');
const name = runDirNameList.value.find((item: any) => {
return item.id === currentDirName.value;
})?.name;
if (data.key === 'uploadFile' && name === '曲线结果') {
isCsv.value = true;
const file: any = data.val.raw;
const { name } = file;
const res: any = await addSimulationKeyResultApi({
file,
dirId: currentDirName.value,
fileName: name,
name: name,
fileType: getFileType(),
keyResultType: keyResultType.value,
runId: runInfo.value.uuid,
onlyFile: true,
});
if (res && res.code === 200) {
const fromData = tableFormRef.value.getFormDataFun();
fromData.max = res.data.max;
fromData.min = res.data.min;
fromData.unit = res.data.unit;
}
}
};
watch(
() => props.currentRunIfno,
async (newVal) => {
if (newVal) {
runInfo.value = newVal;
nextTick(async () => {
await getRunInfoDirsFun();
});
}
},
{
immediate: true,
deep: true,
}
);
onMounted(() => {});
</script>

View File

@@ -55,7 +55,6 @@ import taskModel from '@/components/taskDetail/taskModel.vue';
import taskCurve from '@/components/taskDetail/taskCurve.vue';
import experimentResult from './components/experimentResult.vue';
const props = defineProps({
taskInfo: {
type: Object,

View File

@@ -88,6 +88,7 @@
:title="
FLOW_APPROVE_OBJ[Number(row.approvalStatus || FLOW_APPROVE_STATUS_ENUM.NOT_APPROVED)]
"
@click="seeApproveDetailFun(row)"
>
</StatusDot>
</template>