feat: 工况库
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user