<template>
    <div class="home">
      <van-nav-bar title="物资管理" fixed left-arrow @click-left="onClickLeft" />
  
      <van-cell-group>
        <van-cell title="当前站点" :value="''" />
      </van-cell-group>
  
      <div class="content">
        <van-cell-group>
          <van-cell
            title="设备信息"
            style="font-size: 18px; font-weight: bold; line-height: inherit"
          >
          </van-cell>
        </van-cell-group>
      </div>
    </div>
  </template>
    
    <script setup>
  import "vant/es/toast/style";
  import "vant/es/popup/style";
  import { ref, onMounted, toRaw, reactive } from "vue";
  import { useRouter, useRoute } from "vue-router";
  import { showToast, showLoadingToast } from "vant";
  import { request } from "../../../../shared/utils/request";
  
  const router = useRouter();
  const route = useRoute();

  const yhzDetail = ref({});
 
  
  onMounted(() => {
    console.log('@@@@',decodeURIComponent(route.params.data));
    yhzDetail.value = JSON.parse(decodeURIComponent(route.params.yhzDetail));
    console.log('yhzDetail',toRaw(yhzDetail.value));
    
  });
  
  const onClickLeft = () => {
    router.push({
      name: "MaterialManage",
      params: { data: encodeURIComponent(JSON.stringify(yhzDetail)) },
    });
  };
  </script>
    
    <style scoped>
  .home {
    padding-top: var(--van-nav-bar-height); /* 自动匹配导航栏高度 */
  }
  
  .content {
    padding: 16px;
  }
  
  .grid {
    margin-top: 16px;
  }
  
  .btn {
    margin-top: 24px;
  }
  
  .status-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    color: white;
    font-size: 12px;
  }
  .status-good {
    background-color: #07c160;
  }
  .status-warning {
    background-color: #ff976a;
  }
  .status-danger {
    background-color: #ee0a24;
  }
  </style>
    