<template>
|
<LogicManageContainerV2
|
type="list"
|
:list="{
|
label: '泵站',
|
requestApi: GetLogicTreeListByPolicyIDStd,
|
code: LOGIC_SITE_CODE,
|
treeProps: listTreeProps,
|
}"
|
:defaultSelectID="defaultSelectID"
|
:contentRef="contentRef"
|
:req="request"
|
:expandOnClickNode="false"
|
@listClick="listClick"
|
>
|
<template #main="{ listNode, selectNode }">
|
<slot name="main" :listNode="listNode" :selectNode="selectNode" :listTreeProps="listTreeProps"> </slot>
|
</template>
|
</LogicManageContainerV2>
|
</template>
|
|
<script setup lang="ts">
|
import LogicManageContainerV2 from '/@/projectCom/components/manage/LogicManageContainerV2.vue';
|
import { GetLogicTreeListByPolicyIDStd } from '/@/api/phm/logicTreeStd';
|
import request from '/@/utils/request';
|
import { LOGIC_SITE_CODE } from '/@/constants';
|
import { nextTick, ref } from 'vue';
|
|
const props = defineProps({
|
contentRef: {
|
type: Object,
|
},
|
});
|
|
const listTreeProps = {
|
id: 'LogicID',
|
label: 'Name',
|
children: 'Children',
|
};
|
|
const emits = defineEmits<{
|
(event: 'listClick', data): void;
|
}>();
|
const defaultSelectID = ref(window.moduleConfig.comprehensive.logicSite.defaultSelectID);
|
|
const listClick = (data) => {
|
window.moduleConfig.comprehensive.logicSite.defaultSelectID = data[listTreeProps.id];
|
defaultSelectID.value = data[listTreeProps.id];
|
nextTick(() => {
|
props.contentRef?.getTableData();
|
});
|
emits('listClick', data);
|
};
|
|
//#endregion
|
</script>
|
<style scoped lang="scss"></style>
|