gerson
2025-02-13 00d0b83bde14f733c4698c97dbc04f40680f6909
src/views/IndustrialSoftware.vue
@@ -24,11 +24,10 @@
               <div class="flex items-center">
                  <span class="text-gray-500">厂商:</span>
                  <div class="flex flex-1">
                     <span v-for="item in factory" :key="item.tag" class="ant-tag !px-4"
                        :class="factorySelect === item.tag ? 'ant-tag-checked' : ''"
                        :type="factorySelect === item.tag ? 'primary' : 'default'"
                        @click="factorySelect = item.tag" size="small">
                        {{ item.name }}
                     <span v-for="item in factory" :key="item.CompanyId" class="ant-tag !px-4"
                        :class="factorySelect === item.CompanyId ? 'ant-tag-checked' : ''"
                        @click="factorySelect = item.CompanyId" size="small">
                        {{ item.CompanyAbbName }}
                     </span>
                  </div>
               </div>
@@ -123,7 +122,7 @@
// 选中状态
const typeSelect = ref(1);
const factorySelect = ref('全部');
const factorySelect = ref('-99');
const EecSelect = ref(0);
const EecLevelEnum = {
@@ -162,7 +161,7 @@
const initComanyData = () => {
   axios({
      method: 'get',
      url: m_RequestDataObj[typeSelect.value].requestPath,
      url: 'static/EecProductData/CompanyData.json',
   }).then((res) => {
      let result = res.data;
      factory.value = result.map((item: any) => {
@@ -196,8 +195,8 @@
            EnergyEfficiencyClass: item.EnergyEfficiencyClass,
            RecordTime: item.RecordTime,
            Price: item.Price,
            PhysicalPicturePath: "/static/EecProductData/" + item.PhysicalPicturePath,
            CertificatePath: `/static/EecProductData/${item.CertificatePath}`,
            PhysicalPicturePath: "static/EecProductData/" + item.PhysicalPicturePath,
            CertificatePath: `static/EecProductData/${item.CertificatePath}`,
            Tip: `备案时间:${item.RecordTime} \n 备案号:${item.RecordNumber}`,
         }
         arr.push(node)
@@ -218,7 +217,7 @@
         return item.EnergyEfficiencyClass === EecSelect.value
      })
   }
   if (factorySelect.value !== '全部') {
   if (factorySelect.value !== '-99') {
      filterProductData.value = filterProductData.value.filter((item) => {
         return item.CompanyName === factorySelect.value
      })
@@ -258,11 +257,10 @@
   // 找到当前点击的产品
   const currentProduct = dispEecProduct.value.find((item) => item.id === productId);
   if (currentProduct) {
      console.log("🚀 ~ currentProduct:", currentProduct)
      // 保存产品信息到localStorage
      localStorage.setItem('currentProduct', JSON.stringify(currentProduct));
   }
   router.push(`/product/${productId}`);
   router.push(`/product/${currentProduct.Id}`);
};
const handleEecLevel = (tag: number) => {
   EecSelect.value = tag;