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