feat: 工况库

This commit is contained in:
JiangSheng
2025-11-18 13:46:59 +08:00
parent 632a86aed7
commit d3ff2f1c9d
4 changed files with 35 additions and 30 deletions

View File

@@ -1,21 +1,21 @@
<template>
<div>工况清单库{{ poolName }}</div>
<loadCaseTable
:editMode="false"
ref="treeTableRef"
readonly
tableName="TASK_POOL"
:data="fullTableData"
:hasOperationColumn="false"
> </loadCaseTable>
<div class="gl-page-content-full">
<div>工况清单库{{ poolName }}</div>
<loadCaseTable
:editMode="false"
ref="treeTableRef"
readonly
tableName="TASK_POOL"
:data="fullTableData"
:hasOperationColumn="false"
> </loadCaseTable>
</div>
</template>
<script setup lang="ts">
import { ref, watchEffect } from 'vue';
import loadCaseTable from '@/components/common/treeCaseTable/loadCaseTable.vue';
import {
transformPoolNodesToTree,
} from '@/utils/node';
interface Props {
data: any;
@@ -27,16 +27,15 @@ const props = withDefaults(defineProps<Props>(), {
const poolName = ref();
const approveContents = ref<any>(null);
const approveDetail = ref<any>({
addNodeArray: [],
});
const fullTableData = ref([])
const fullTableData = ref<any>([]);
watchEffect(() => {
fullTableData.value = [];
if (props.data) {
approveContents.value = JSON.parse(props.data?.approveContents || '{}');
fullTableData.value = approveContents.value?.fullTableData;
poolName.value = approveContents.value?.poolBrief?.poolName;
approveDetail.value.addNodeArray = transformPoolNodesToTree(approveContents.value?.addNodeArray[0]?.nodes);
}
});
</script>