2025-05-15 17:34:49 +08:00
|
|
|
<template>
|
2025-05-19 13:38:34 +08:00
|
|
|
<div class="smartFarm-common-warp">
|
|
|
|
<div class="smartFarm-common-content">
|
2025-05-15 17:34:49 +08:00
|
|
|
<div class="left-menu">
|
|
|
|
<slot v-if="$slots.left" name="left"></slot>
|
|
|
|
<template v-else>
|
2025-05-19 13:38:34 +08:00
|
|
|
<left-menu :menus="menus"></left-menu>
|
2025-05-15 17:34:49 +08:00
|
|
|
</template>
|
|
|
|
</div>
|
|
|
|
<div class="common-content">
|
|
|
|
<slot v-if="$slots.main" name="main"></slot>
|
|
|
|
<template v-else></template>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
<script setup>
|
|
|
|
import { ref, reactive, onMounted, watch } from 'vue';
|
|
|
|
import leftMenu from './leftMenu.vue';
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
currentName: { type: String, default: 'agricultural' },
|
|
|
|
});
|
2025-05-19 13:38:34 +08:00
|
|
|
|
|
|
|
const menus = reactive([
|
|
|
|
{
|
|
|
|
name: 'supplier',
|
|
|
|
title: '农业环境监测',
|
|
|
|
icon: 'menu1.png',
|
|
|
|
path: '/sub-operation-service/smartFarm/main',
|
|
|
|
isOpen: true,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
name: 'supplier',
|
|
|
|
title: '田间监测',
|
|
|
|
path: '/sub-operation-service/smartFarm/fieldInspection',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'supplier',
|
|
|
|
title: '水质监测',
|
|
|
|
path: '/sub-operation-service/ecommerce-supplier',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'supplier',
|
|
|
|
title: '病虫害监测',
|
|
|
|
path: '/sub-operation-service/ecommerce-supplier',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'purchaser',
|
|
|
|
title: '生产管理控制',
|
|
|
|
icon: 'menu3.png',
|
|
|
|
path: '/sub-operation-service/ecommerce-purchaser',
|
|
|
|
isOpen: false,
|
|
|
|
children: [],
|
|
|
|
},
|
|
|
|
]);
|
2025-05-15 17:34:49 +08:00
|
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
2025-05-19 13:38:34 +08:00
|
|
|
.smartFarm-common-warp {
|
2025-05-15 17:34:49 +08:00
|
|
|
width: 100%;
|
|
|
|
height: calc(100vh - 230px);
|
|
|
|
text-align: center;
|
2025-05-19 13:38:34 +08:00
|
|
|
.smartFarm-common-content {
|
2025-05-15 17:34:49 +08:00
|
|
|
width: $width-main;
|
|
|
|
margin: auto;
|
|
|
|
height: 100%;
|
|
|
|
display: inline-flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
.left-menu,
|
|
|
|
.common-content {
|
|
|
|
height: calc(100% - 16px);
|
|
|
|
border-radius: 8px;
|
|
|
|
padding: 8px;
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
|
|
|
.left-menu {
|
|
|
|
width: 240px;
|
|
|
|
background: $color-fff;
|
|
|
|
}
|
|
|
|
.common-content {
|
|
|
|
width: calc(100% - 240px);
|
|
|
|
margin-left: 16px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|