路由配置修改
This commit is contained in:
parent
c7da9ff04c
commit
6f2a20ddca
@ -32,7 +32,7 @@ const routes = [
|
||||
component: () => import('../views//Equipment/EquipmentDetails.vue')
|
||||
},
|
||||
{
|
||||
path: '/materialDetail/:yhzDetail/:data',
|
||||
path: '/materialDetail/:data',
|
||||
name: 'MaterialDetail',
|
||||
component: () => import('../views//Material/MaterialDetails.vue')
|
||||
},
|
||||
|
||||
@ -3,13 +3,13 @@
|
||||
<van-nav-bar title="物资管理" fixed left-arrow @click-left="onClickLeft" />
|
||||
|
||||
<van-cell-group>
|
||||
<van-cell title="当前站点" :value="''" />
|
||||
<van-cell title="当前站点" :value="yhzDetail.mc" />
|
||||
</van-cell-group>
|
||||
|
||||
<div class="content">
|
||||
<van-cell-group>
|
||||
<van-cell
|
||||
title="设备信息"
|
||||
title="物资信息"
|
||||
style="font-size: 18px; font-weight: bold; line-height: inherit"
|
||||
>
|
||||
</van-cell>
|
||||
@ -30,19 +30,22 @@
|
||||
const route = useRoute();
|
||||
|
||||
const yhzDetail = ref({});
|
||||
const wzData = ref([]);
|
||||
const wzDetailData = ref({}); // 物资详情数据
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
console.log('@@@@',decodeURIComponent(route.params.data));
|
||||
yhzDetail.value = JSON.parse(decodeURIComponent(route.params.yhzDetail));
|
||||
console.log('yhzDetail',toRaw(yhzDetail.value));
|
||||
const data = JSON.parse(decodeURIComponent(route.params.data));
|
||||
yhzDetail.value = data.yhzDetail;
|
||||
wzData.value = data.material;
|
||||
console.log('传递过来的参数:',data);
|
||||
|
||||
});
|
||||
|
||||
const onClickLeft = () => {
|
||||
router.push({
|
||||
name: "MaterialManage",
|
||||
params: { data: encodeURIComponent(JSON.stringify(yhzDetail)) },
|
||||
params: { data: encodeURIComponent(JSON.stringify(yhzDetail.value)) },
|
||||
});
|
||||
};
|
||||
</script>
|
||||
|
||||
@ -23,8 +23,12 @@
|
||||
:to="{
|
||||
name: 'MaterialDetail',
|
||||
params: {
|
||||
yhzDetail: encodeURIComponent(JSON.stringify(yhzDetail.value)),
|
||||
data: encodeURIComponent(JSON.stringify(item)),
|
||||
data: encodeURIComponent(
|
||||
JSON.stringify({
|
||||
yhzDetail: yhzDetail,
|
||||
material: item,
|
||||
})
|
||||
),
|
||||
},
|
||||
}"
|
||||
>
|
||||
@ -103,7 +107,6 @@ const getMaterialList = async (wzmc) => {
|
||||
onMounted(() => {
|
||||
yhzDetail.value = JSON.parse(decodeURIComponent(route.params.data));
|
||||
getMaterialList();
|
||||
console.log("yhzDetail", toRaw(yhzDetail.value));
|
||||
});
|
||||
|
||||
watch(
|
||||
|
||||
@ -26,7 +26,6 @@ export default defineConfig({
|
||||
'/snow-ops-platform': {
|
||||
target: 'http://8.137.54.85:8661/',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/snow-ops-platform/, ''),
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
@ -30,7 +30,6 @@ export default defineConfig({
|
||||
'/snow-ops-platform': {
|
||||
target: 'http://8.137.54.85:8661/',
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/snow-ops-platform/, '')
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user