跳转逻辑
This commit is contained in:
parent
bf497fafdf
commit
ab7570fa63
@ -25,7 +25,12 @@ const routes = [
|
|||||||
path: '/staffManage',
|
path: '/staffManage',
|
||||||
name: 'StaffManage',
|
name: 'StaffManage',
|
||||||
component: () => import('../views/StaffManagement.vue')
|
component: () => import('../views/StaffManagement.vue')
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
path: '/equipDetail/:data',
|
||||||
|
name: 'EquipDetail',
|
||||||
|
component: () => import('../views/EquipmentDetails.vue')
|
||||||
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
|
|||||||
69
packages/mobile/src/views/EquipmentDetails.vue
Normal file
69
packages/mobile/src/views/EquipmentDetails.vue
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<template>
|
||||||
|
<div class="home">
|
||||||
|
<van-nav-bar title="愉快政" fixed left-arrow />
|
||||||
|
|
||||||
|
<van-cell-group>
|
||||||
|
<van-cell title="当前站点" value="李家坝仓库" />
|
||||||
|
</van-cell-group>
|
||||||
|
|
||||||
|
<div class="content">
|
||||||
|
<van-grid :gutter="10" :column-num="3" class="grid">
|
||||||
|
<van-grid-item icon="setting-o" text="设备管理" to="/EquipManage" />
|
||||||
|
<van-grid-item
|
||||||
|
icon="setting-o"
|
||||||
|
text="物资管理"
|
||||||
|
to="/MaterialManage"
|
||||||
|
/>
|
||||||
|
<van-grid-item
|
||||||
|
icon="setting-o"
|
||||||
|
text="人员管理"
|
||||||
|
to="/StaffManage"
|
||||||
|
/>
|
||||||
|
<van-grid-item
|
||||||
|
icon="setting-o"
|
||||||
|
text="冰雪灾害"
|
||||||
|
to="/IceHail"
|
||||||
|
/>
|
||||||
|
</van-grid>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- <van-tabbar v-model="active" route>
|
||||||
|
<van-tabbar-item icon="home-o" to="/">首页</van-tabbar-item>
|
||||||
|
<van-tabbar-item icon="user-o" to="/user">我的</van-tabbar-item>
|
||||||
|
</van-tabbar> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import { showToast } from "vant";
|
||||||
|
|
||||||
|
const router = useRouter();
|
||||||
|
const active = ref(0);
|
||||||
|
|
||||||
|
const goToUser = () => {
|
||||||
|
router.push("/user");
|
||||||
|
};
|
||||||
|
|
||||||
|
console.log('传过来的数据',router.currentRoute.value.params.data)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.home {
|
||||||
|
padding-top: var(--van-nav-bar-height); /* 自动匹配导航栏高度 */
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid {
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn {
|
||||||
|
margin-top: 24px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
@ -18,6 +18,10 @@
|
|||||||
title="高枝锯、绿篱机、油锯"
|
title="高枝锯、绿篱机、油锯"
|
||||||
is-link
|
is-link
|
||||||
label="设备类型:绿化修剪设备"
|
label="设备类型:绿化修剪设备"
|
||||||
|
:to="{
|
||||||
|
name: 'EquipDetail',
|
||||||
|
params: { data: '@@@@传过来的数据@@@@' }
|
||||||
|
}"
|
||||||
>
|
>
|
||||||
<template #value>
|
<template #value>
|
||||||
<span class="status-tag status-good">完好</span>
|
<span class="status-tag status-good">完好</span>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user