页面文件夹调整,路由调整

This commit is contained in:
2090205686@qq.com 2025-05-21 10:46:48 +08:00
parent 2e057d7014
commit 0e2a09d77b
8 changed files with 48 additions and 120 deletions

View File

@ -135,31 +135,31 @@ export const constantRoutes = [
},
{
path: '/sub-operation-service/smartFarm/growSeedlings',
component: () => import('@/views/smartFarm/growSeedlings/index.vue'),
component: () => import('@/views/smartFarm/manageControl/growSeedlings.vue'),
name: 'growSeedlings',
meta: { title: '一体育苗' },
},
{
path: '/sub-operation-service/smartFarm/pestPrevention',
component: () => import('@/views/smartFarm/pestPrevention/index.vue'),
component: () => import('@/views/smartFarm/manageControl/pestPrevention.vue'),
name: 'pestPrevention',
meta: { title: '病虫害防治' },
},
{
path: '/sub-operation-service/smartFarm/irrigationSystem',
component: () => import('@/views/smartFarm/irrigationSystem/index.vue'),
component: () => import('@/views/smartFarm/manageControl/irrigationSystem.vue'),
name: 'irrigationSystem',
meta: { title: '喷灌滴灌' },
},
{
path: '/sub-operation-service/smartFarm/drainageControl',
component: () => import('@/views/smartFarm/drainageControl/index.vue'),
component: () => import('@/views/smartFarm/manageControl/drainageControl.vue'),
name: 'drainageControl',
meta: { title: '排集水控制' },
},
{
path: '/sub-operation-service/smartFarm/openCurtain',
component: () => import('@/views/smartFarm/openCurtain/index.vue'),
component: () => import('@/views/smartFarm/manageControl/openCurtain.vue'),
name: 'openCurtain',
meta: { title: '开窗卷帘' },
},

View File

@ -51,38 +51,38 @@ const menus = reactive([
name: 'control',
title: '生产管理控制',
icon: 'menu3.png',
path: '/sub-operation-service/ecommerce-purchaser',
path: '',
isOpen: false,
children: [
{
name: 'control',
title: '一体育苗',
icon: 'menu3.png',
path: '/sub-operation-service/smartFarm/growSeedlings',
path: '/sub-operation-service/smartFarm/manageControl/growSeedlings',
},
{
name: 'control',
title: '病虫害预防',
icon: 'menu3.png',
path: '/sub-operation-service/smartFarm/pestPrevention',
path: '/sub-operation-service/smartFarm/manageControl/pestPrevention',
},
{
name: 'control',
title: '喷灌滴灌',
icon: 'menu3.png',
path: '/sub-operation-service/smartFarm/irrigationSystem',
path: '/sub-operation-service/smartFarm/manageControl/irrigationSystem',
},
{
name: 'control',
title: '排集水控制',
icon: 'menu3.png',
path: '/sub-operation-service/smartFarm/drainageControl',
path: '/sub-operation-service/smartFarm/manageControl/drainageControl',
},
{
name: 'control',
title: '开窗卷帘',
icon: 'menu3.png',
path: '/sub-operation-service/smartFarm/openCurtain',
path: '/sub-operation-service/smartFarm/manageControl/openCurtain',
},
],
},

View File

@ -39,13 +39,8 @@ const getDeviceSwitchStatus = (device) => {
});
};
const broadcast = ref([
'2025年01月01日10:10:10,排水泵P567789456发生异常关机,请检查设备情况!',
'2025年02月02日11:14:55,排水泵P567789478发生异常故障,请检查设备情况!',
]);
onMounted(() => {
console.info('broadcastData', props.broadcastData);
// console.info('broadcastData', props.broadcastData);
});
</script>
@ -55,8 +50,8 @@ onMounted(() => {
<div v-if="isShowBroadcast" class="broadcast-box">
<img :src="getAssetsFile('images/smartFarm/broadcast.png')" alt="" />
<div style="flex: 1">
<el-carousel height="32px" direction="vertical" motion-blur :autoplay="true">
<el-carousel-item v-for="(item, index) in broadcast" :key="index" style="line-height: 36px; font-size: 16px">
<el-carousel height="32px" direction="vertical" :autoplay="true">
<el-carousel-item v-for="(item, index) in broadcastData" :key="index" style="line-height: 36px; font-size: 16px">
<div text="2xl" justify="center">{{ item }}</div>
</el-carousel-item>
</el-carousel>

View File

@ -9,8 +9,7 @@
</template>
<script setup>
import { ref } from 'vue';
import { getAssetsFile } from '@/utils';
import { onMounted, ref } from 'vue';
import Common from '../components/common.vue';
import ControlDevices from '@/views/smartFarm/components/controlDevices.vue';
@ -60,8 +59,8 @@ const devices = ref([
title: '电动闸门',
devices: [
{
name: 'A-001',
serial: 'YM20250101001', //
name: 'A-005',
serial: 'YM20250101005', //
icon: 'gate', // pump gate sensor
isOpen: 1, // 0: 1:
isOperation: 0, // 0: 1:
@ -69,8 +68,8 @@ const devices = ref([
id: 0,
},
{
name: 'A-002',
serial: 'YM20250101002',
name: 'A-006',
serial: 'YM20250101006',
icon: 'gate',
isOpen: 0,
isOperation: 1,
@ -78,8 +77,8 @@ const devices = ref([
id: 1,
},
{
name: 'A-003',
serial: 'YM20250101003',
name: 'A-007',
serial: 'YM20250101007',
icon: 'gate',
isOpen: 0,
isOperation: 0,
@ -87,8 +86,8 @@ const devices = ref([
id: 2,
},
{
name: 'A-004',
serial: 'YM20250101004',
name: 'A-008',
serial: 'YM20250101008',
icon: 'gate',
isOpen: 1,
isOperation: 0,
@ -101,8 +100,8 @@ const devices = ref([
title: '水位传感器',
devices: [
{
name: 'A-001',
serial: 'YM20250101001', //
name: 'A-009',
serial: 'YM20250101009', //
icon: 'sensor', // pump gate sensor
isOpen: 1, // 0: 1:
isOperation: 0, // 0: 1:
@ -110,8 +109,8 @@ const devices = ref([
id: 0,
},
{
name: 'A-002',
serial: 'YM20250101002',
name: 'A-010',
serial: 'YM20250101010',
icon: 'sensor',
isOpen: 0,
isOperation: 1,
@ -119,8 +118,8 @@ const devices = ref([
id: 1,
},
{
name: 'A-003',
serial: 'YM20250101003',
name: 'A-011',
serial: 'YM20250101011',
icon: 'sensor',
isOpen: 0,
isOperation: 0,
@ -128,8 +127,8 @@ const devices = ref([
id: 2,
},
{
name: 'A-004',
serial: 'YM20250101004',
name: 'A-012',
serial: 'YM20250101012',
icon: 'sensor',
isOpen: 1,
isOperation: 0,
@ -139,72 +138,6 @@ const devices = ref([
],
},
]);
const tableData = ref([
{
name: '温度',
value: '>25',
device: '制冷机',
behavior: '开启',
time: 10,
},
{
name: '湿度',
value: '<24',
device: '喷洒机',
behavior: '关闭',
time: 15,
},
{
name: 'PH值',
value: '>8',
device: '配肥机',
behavior: '开启',
time: 5,
},
{
name: '风速',
value: '>中风',
device: '通风窗',
behavior: '关闭',
time: '/',
},
{
name: '光照',
value: '>强光',
device: '幕布',
behavior: '开启',
time: '/',
},
]);
const tableTitle = ref([
{
label: '参数名称',
prop: 'name',
width: 'auto',
},
{
label: '参数值',
prop: 'value',
width: 'auto',
},
{
label: '智能设备',
prop: 'device',
width: 'auto',
},
{
label: '机械行为',
prop: 'behavior',
width: 'auto',
},
{
label: '持续时间(min)',
prop: 'time',
width: 'auto',
},
]);
const broadcastData = ref([
'2025年01月01日10:10:10,排水泵P567789456发生异常关机,请检查设备情况!',
'2025年02月02日11:14:55,排水泵P567789478发生异常故障,请检查设备情况!',

View File

@ -65,8 +65,8 @@ const devices = ref([
title: '电动闸门',
devices: [
{
name: 'A-001',
serial: 'YM20250101001', //
name: 'A-005',
serial: 'YM20250101005', //
icon: 'gate', // pump gate sensor
isOpen: 1, // 0: 1:
isOperation: 0, // 0: 1:
@ -74,8 +74,8 @@ const devices = ref([
id: 0,
},
{
name: 'A-002',
serial: 'YM20250101002',
name: 'A-006',
serial: 'YM20250101006',
icon: 'gate',
isOpen: 0,
isOperation: 1,
@ -83,8 +83,8 @@ const devices = ref([
id: 1,
},
{
name: 'A-003',
serial: 'YM20250101003',
name: 'A-007',
serial: 'YM20250101007',
icon: 'gate',
isOpen: 0,
isOperation: 0,
@ -92,8 +92,8 @@ const devices = ref([
id: 2,
},
{
name: 'A-004',
serial: 'YM20250101004',
name: 'A-008',
serial: 'YM20250101008',
icon: 'gate',
isOpen: 1,
isOperation: 0,
@ -106,8 +106,8 @@ const devices = ref([
title: '水位传感器',
devices: [
{
name: 'A-001',
serial: 'YM20250101001', //
name: 'A-009',
serial: 'YM20250101009', //
icon: 'sensor', // pump gate sensor
isOpen: 1, // 0: 1:
isOperation: 0, // 0: 1:
@ -115,8 +115,8 @@ const devices = ref([
id: 0,
},
{
name: 'A-002',
serial: 'YM20250101002',
name: 'A-010',
serial: 'YM20250101010',
icon: 'sensor',
isOpen: 0,
isOperation: 1,
@ -124,8 +124,8 @@ const devices = ref([
id: 1,
},
{
name: 'A-003',
serial: 'YM20250101003',
name: 'A-011',
serial: 'YM20250101011',
icon: 'sensor',
isOpen: 0,
isOperation: 0,
@ -133,8 +133,8 @@ const devices = ref([
id: 2,
},
{
name: 'A-004',
serial: 'YM20250101004',
name: 'A-012',
serial: 'YM20250101012',
icon: 'sensor',
isOpen: 1,
isOperation: 0,
@ -204,7 +204,7 @@ const tableTitle = ref([
<style lang="scss" scoped>
.my-table {
&:deep(table) {
table-layout: fixed;
table-layout: fixed; //
width: 100%;
}
}