|
|
@@ -1,22 +1,25 @@
|
|
|
<template>
|
|
|
<div class="layout">
|
|
|
<LayoutTop @chooseMenu="chooseMenu" />
|
|
|
- <template v-if="isShowBottomPart">
|
|
|
+ <section class="layout-bottom-container">
|
|
|
<div class="sliderLayout">
|
|
|
<div class="shortLine"></div>
|
|
|
</div>
|
|
|
<LayoutBottom />
|
|
|
- </template>
|
|
|
+ </section>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="ts">
|
|
|
import LayoutTop from './components/top.vue';
|
|
|
import LayoutBottom from './components/bottom.vue';
|
|
|
import { defineComponent, ref } from 'vue';
|
|
|
+import APP from '@/services';
|
|
|
+import { OperationTabMenu } from '@/services/go/commonService/interface';
|
|
|
+import { initData } from '@/common/methods';
|
|
|
|
|
|
// 控制下半部分是否显示
|
|
|
function submitBottomIsShow() {
|
|
|
- const isShowBottomPart = ref<boolean>(false);
|
|
|
+ const isShowBottomPart = ref<boolean>(true);
|
|
|
function chooseMenu(value: boolean) {
|
|
|
isShowBottomPart.value = value;
|
|
|
}
|
|
|
@@ -30,10 +33,16 @@ export default defineComponent({
|
|
|
LayoutBottom,
|
|
|
},
|
|
|
setup() {
|
|
|
+ const menuList = APP.getRef('menus');
|
|
|
const { isShowBottomPart, chooseMenu } = submitBottomIsShow();
|
|
|
- const visible = ref<boolean>(true);
|
|
|
+ initData(() => {
|
|
|
+ // 判断是否有单据
|
|
|
+ if (menuList.value.find((e: OperationTabMenu) => e.code === 'bottom')) {
|
|
|
+ isShowBottomPart.value = true;
|
|
|
+ }
|
|
|
+ });
|
|
|
|
|
|
- return { isShowBottomPart, chooseMenu, visible };
|
|
|
+ return { isShowBottomPart, chooseMenu };
|
|
|
},
|
|
|
});
|
|
|
</script>
|
|
|
@@ -43,6 +52,9 @@ export default defineComponent({
|
|
|
width: 100%;
|
|
|
height: 100%;
|
|
|
flex-direction: column;
|
|
|
+ .layout-bottom-container {
|
|
|
+ height: 329px;
|
|
|
+ }
|
|
|
.sliderLayout {
|
|
|
width: 100%;
|
|
|
height: 4px;
|