2026-04-03 09:56:14 +08:00
|
|
|
|
<template>
|
2026-05-18 20:05:03 +08:00
|
|
|
|
<Layout :class="[layoutBoxClass]" v-bind="lockEvents">
|
2026-04-03 09:56:14 +08:00
|
|
|
|
<LayoutFeatures />
|
|
|
|
|
|
<LayoutHeader fixed v-if="getShowFullHeaderRef" />
|
|
|
|
|
|
<Layout :class="[layoutClass]">
|
|
|
|
|
|
<LayoutSideBar v-if="getShowSidebar || getIsMobile" />
|
2026-05-18 20:05:03 +08:00
|
|
|
|
<Layout :class="layoutMainClass">
|
2026-04-03 09:56:14 +08:00
|
|
|
|
<LayoutMultipleHeader />
|
|
|
|
|
|
<LayoutContent />
|
|
|
|
|
|
<LayoutFooter />
|
|
|
|
|
|
</Layout>
|
|
|
|
|
|
</Layout>
|
2026-05-29 15:49:10 +08:00
|
|
|
|
<!-- update-begin---author:GHT ---date:2026-05-29 for:【QH-MES审批流设计】全局发起审批悬浮按钮----- -->
|
|
|
|
|
|
<ApprovalLaunchFloat />
|
|
|
|
|
|
<!-- update-end---author:GHT ---date:2026-05-29 for:【QH-MES审批流设计】全局发起审批悬浮按钮----- -->
|
2026-06-05 10:44:30 +08:00
|
|
|
|
<!-- update-begin---author:GHT ---date:2026-06-04 for:【MESToDing审批配置】全局钉钉审批模板绑定发起按钮----- -->
|
|
|
|
|
|
<DingTplLaunchFloat />
|
|
|
|
|
|
<!-- update-end---author:GHT ---date:2026-06-04 for:【MESToDing审批配置】全局钉钉审批模板绑定发起按钮----- -->
|
2026-05-29 15:49:10 +08:00
|
|
|
|
<!-- update-begin---author:GHT ---date:2026-05-29 for:【QH-MES审批流设计】全局审批流程设计悬浮按钮----- -->
|
|
|
|
|
|
<ApprovalDesignFloat />
|
|
|
|
|
|
<!-- update-end---author:GHT ---date:2026-05-29 for:【QH-MES审批流设计】全局审批流程设计悬浮按钮----- -->
|
2026-04-03 09:56:14 +08:00
|
|
|
|
</Layout>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
|
import { defineComponent, computed, unref, ref } from 'vue';
|
|
|
|
|
|
import { Layout } from 'ant-design-vue';
|
|
|
|
|
|
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
|
|
|
|
|
|
|
|
|
|
|
|
import LayoutHeader from './header/index.vue';
|
|
|
|
|
|
import LayoutContent from './content/index.vue';
|
|
|
|
|
|
import LayoutSideBar from './sider/index.vue';
|
|
|
|
|
|
import LayoutMultipleHeader from './header/MultipleHeader.vue';
|
|
|
|
|
|
|
|
|
|
|
|
import { useHeaderSetting } from '/@/hooks/setting/useHeaderSetting';
|
|
|
|
|
|
import { useMenuSetting } from '/@/hooks/setting/useMenuSetting';
|
|
|
|
|
|
import { useDesign } from '/@/hooks/web/useDesign';
|
|
|
|
|
|
import { useLockPage } from '/@/hooks/web/useLockPage';
|
|
|
|
|
|
|
|
|
|
|
|
import { useAppInject } from '/@/hooks/web/useAppInject';
|
2026-05-18 20:05:03 +08:00
|
|
|
|
import { useGlobSetting } from '/@/hooks/setting';
|
2026-04-03 09:56:14 +08:00
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
|
name: 'DefaultLayout',
|
|
|
|
|
|
components: {
|
|
|
|
|
|
LayoutFeatures: createAsyncComponent(() => import('/@/layouts/default/feature/index.vue')),
|
|
|
|
|
|
LayoutFooter: createAsyncComponent(() => import('/@/layouts/default/footer/index.vue')),
|
2026-05-29 15:49:10 +08:00
|
|
|
|
//update-begin---author:GHT ---date:2026-05-29 for:【QH-MES审批流设计】全局发起审批悬浮按钮-----
|
|
|
|
|
|
ApprovalLaunchFloat: createAsyncComponent(() => import('/@/components/ApprovalLaunch/index.vue')),
|
|
|
|
|
|
//update-end---author:GHT ---date:2026-05-29 for:【QH-MES审批流设计】全局发起审批悬浮按钮-----
|
|
|
|
|
|
//update-begin---author:GHT ---date:2026-05-29 for:【QH-MES审批流设计】全局审批流程设计悬浮按钮-----
|
|
|
|
|
|
ApprovalDesignFloat: createAsyncComponent(() => import('/@/components/ApprovalDesign/index.vue')),
|
|
|
|
|
|
//update-end---author:GHT ---date:2026-05-29 for:【QH-MES审批流设计】全局审批流程设计悬浮按钮-----
|
2026-06-05 10:44:30 +08:00
|
|
|
|
//update-begin---author:GHT ---date:2026-06-04 for:【MESToDing审批配置】全局钉钉审批模板绑定发起按钮-----
|
|
|
|
|
|
DingTplLaunchFloat: createAsyncComponent(() => import('/@/components/DingTplLaunch/index.vue')),
|
|
|
|
|
|
//update-end---author:GHT ---date:2026-06-04 for:【MESToDing审批配置】全局钉钉审批模板绑定发起按钮-----
|
2026-04-03 09:56:14 +08:00
|
|
|
|
LayoutHeader,
|
|
|
|
|
|
LayoutContent,
|
|
|
|
|
|
LayoutSideBar,
|
|
|
|
|
|
LayoutMultipleHeader,
|
|
|
|
|
|
Layout,
|
|
|
|
|
|
},
|
|
|
|
|
|
setup() {
|
|
|
|
|
|
const { prefixCls } = useDesign('default-layout');
|
|
|
|
|
|
const { getIsMobile } = useAppInject();
|
|
|
|
|
|
const { getShowFullHeaderRef } = useHeaderSetting();
|
2026-05-18 20:05:03 +08:00
|
|
|
|
const { getShowSidebar, getIsMixSidebar, getShowMenu, getMenuType } = useMenuSetting();
|
|
|
|
|
|
const glob = useGlobSetting();
|
|
|
|
|
|
const { isQiankunMicro } = glob;
|
2026-04-03 09:56:14 +08:00
|
|
|
|
|
|
|
|
|
|
// Create a lock screen monitor
|
|
|
|
|
|
const lockEvents = useLockPage();
|
|
|
|
|
|
|
2026-05-18 20:05:03 +08:00
|
|
|
|
const layoutBoxClass = computed(() => {
|
|
|
|
|
|
let cls: string[] = [prefixCls];
|
|
|
|
|
|
if (unref(getMenuType)) {
|
|
|
|
|
|
cls.push(`${prefixCls}--menu-${unref(getMenuType)}`);
|
|
|
|
|
|
}
|
|
|
|
|
|
return cls;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-04-03 09:56:14 +08:00
|
|
|
|
const layoutClass = computed(() => {
|
|
|
|
|
|
let cls: string[] = ['ant-layout'];
|
|
|
|
|
|
if (unref(getIsMixSidebar) || unref(getShowMenu)) {
|
|
|
|
|
|
cls.push('ant-layout-has-sider');
|
|
|
|
|
|
}
|
|
|
|
|
|
return cls;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-05-18 20:05:03 +08:00
|
|
|
|
const layoutMainClass = computed(() => {
|
|
|
|
|
|
let cls: string[] = [`${prefixCls}-main`];
|
|
|
|
|
|
|
|
|
|
|
|
// 【JEECG作为乾坤子应用】
|
|
|
|
|
|
if (unref(isQiankunMicro)) {
|
|
|
|
|
|
cls.push(`${prefixCls}-main--qiankun-micro`);
|
|
|
|
|
|
}
|
|
|
|
|
|
return cls;
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-04-03 09:56:14 +08:00
|
|
|
|
return {
|
|
|
|
|
|
getShowFullHeaderRef,
|
|
|
|
|
|
getShowSidebar,
|
|
|
|
|
|
prefixCls,
|
|
|
|
|
|
getIsMobile,
|
|
|
|
|
|
getIsMixSidebar,
|
2026-05-18 20:05:03 +08:00
|
|
|
|
isQiankunMicro,
|
|
|
|
|
|
layoutBoxClass,
|
2026-04-03 09:56:14 +08:00
|
|
|
|
layoutClass,
|
2026-05-18 20:05:03 +08:00
|
|
|
|
layoutMainClass,
|
|
|
|
|
|
lockEvents
|
2026-04-03 09:56:14 +08:00
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<style lang="less">
|
|
|
|
|
|
@prefix-cls: ~'@{namespace}-default-layout';
|
|
|
|
|
|
|
|
|
|
|
|
.@{prefix-cls} {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
min-height: 100%;
|
|
|
|
|
|
background-color: @content-bg;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
|
2026-05-18 20:05:03 +08:00
|
|
|
|
&--menu {
|
|
|
|
|
|
// 【JEECG作为乾坤子应用】
|
|
|
|
|
|
&-mix-sidebar {
|
|
|
|
|
|
|
|
|
|
|
|
.@{namespace}-layout-mix-sider {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
overflow: visible;
|
|
|
|
|
|
|
|
|
|
|
|
> .@{namespace}-layout-mix-sider-menu-list {
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 【JEECG作为乾坤子应用】
|
|
|
|
|
|
&-mix {
|
|
|
|
|
|
.@{namespace}-multiple-tabs {
|
|
|
|
|
|
margin-top: 0 !important;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-03 09:56:14 +08:00
|
|
|
|
> .ant-layout {
|
|
|
|
|
|
min-height: 100%;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
&-main {
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
// 代码逻辑说明:【issues/8709】LayoutContent样式多出1px
|
|
|
|
|
|
// margin-left: 1px;
|
2026-05-18 20:05:03 +08:00
|
|
|
|
|
|
|
|
|
|
// 【JEECG作为乾坤子应用】根 Layout 作为 absolute 定位的参照容器
|
|
|
|
|
|
&--qiankun-micro {
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
|
|
.@{namespace}-multiple-tabs {
|
|
|
|
|
|
margin-top: 60px;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-03 09:56:14 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|