tanghaolin
9 天以前 04a2d3e3c701a03981c4b66162ff9515f9d7dd12
src/views/EecLabel.vue
@@ -52,8 +52,8 @@
               >
                  <el-table-column prop="TableIndex" label="序号" align="center" width="60"> </el-table-column>
                  <el-table-column prop="ModelType" label="产品类型" align="center" show-overflow-tooltip> </el-table-column>
                  <el-table-column prop="Model" label="产品型号" align="center" width="120" show-overflow-tooltip> </el-table-column>
                  <el-table-column prop="RecordNumber" label="备案号" align="center" width="140" show-overflow-tooltip> </el-table-column>
                  <el-table-column prop="Model" label="产品型号" align="center"  show-overflow-tooltip> </el-table-column>
                  <el-table-column prop="RecordNumber" label="备案号" align="center"  show-overflow-tooltip> </el-table-column>
                  <el-table-column prop="EnergyEfficiencyClass" label="能效等级" align="center" width="80"> </el-table-column>
                  <el-table-column prop="RecordTime" label="备案时间" align="center" width="100"> </el-table-column>
                  <el-table-column prop="CompanyName" label="厂商" align="center" show-overflow-tooltip> </el-table-column>
@@ -84,51 +84,6 @@
                           </svg>
                           详细</span
                        >
                        <span class="table-detail-span" @click="clickDetailCertifcate(scope.row)" v-if="false"
                           ><svg
                              t="1739500034021"
                              class="detail-icon"
                              viewBox="0 0 1024 1024"
                              version="1.1"
                              xmlns="http://www.w3.org/2000/svg"
                              p-id="34306"
                              width="128"
                              height="128"
                           >
                              <path
                                 d="M0 115.2m76.8 0l870.4 0q76.8 0 76.8 76.8l0 640q0 76.8-76.8 76.8l-870.4 0q-76.8 0-76.8-76.8l0-640q0-76.8 76.8-76.8Z"
                                 fill="#1989FA"
                                 opacity=".3"
                                 p-id="34307"
                              ></path>
                              <path
                                 d="M563.2 396.8m25.6 0l281.6 0q25.6 0 25.6 25.6l0 0q0 25.6-25.6 25.6l-281.6 0q-25.6 0-25.6-25.6l0 0q0-25.6 25.6-25.6Z"
                                 fill="#1989FA"
                                 p-id="34308"
                              ></path>
                              <path
                                 d="M563.2 512m25.6 0l281.6 0q25.6 0 25.6 25.6l0 0q0 25.6-25.6 25.6l-281.6 0q-25.6 0-25.6-25.6l0 0q0-25.6 25.6-25.6Z"
                                 fill="#1989FA"
                                 p-id="34309"
                              ></path>
                              <path
                                 d="M563.2 640m25.6 0l140.8 0q25.6 0 25.6 25.6l0 0q0 25.6-25.6 25.6l-140.8 0q-25.6 0-25.6-25.6l0 0q0-25.6 25.6-25.6Z"
                                 fill="#1989FA"
                                 p-id="34310"
                              ></path>
                              <path
                                 d="M294.4 422.4m-140.8 0a140.8 140.8 0 1 0 281.6 0 140.8 140.8 0 1 0-281.6 0Z"
                                 fill="#1989FA"
                                 p-id="34311"
                              ></path>
                              <path
                                 d="M261.1584 611.5328l-73.0624 126.5536-88.6912-51.2 69.0432-119.5776a191.3088 191.3088 0 0 0 92.7104 44.224z m162.816-47.4496l66.9696 116.0064-88.6784 51.2-69.6832-120.6912a191.4496 191.4496 0 0 0 91.392-46.5152z"
                                 fill="#1989FA"
                                 p-id="34312"
                              ></path>
                           </svg>
                           证书</span
                        >
                     </template>
                  </el-table-column>
               </el-table>
@@ -148,54 +103,65 @@
         </el-card>
      </div>
      <el-dialog v-model="dialogVisible" title="详细" width="500" align-center>
         <!-- 泵产品显示 -->
         <el-form v-if="isPumpProduct" :model="state.m_detailDialogInfo" label-width="120px" size="small">
            <el-form-item label="产品类型" prop="ModelType">
               <span>{{ state.m_detailDialogInfo.ModelType }}</span>
            </el-form-item>
            <el-form-item label="产品型号" prop="Model">
               <span>{{ state.m_detailDialogInfo.Model }}</span>
            </el-form-item>
            <el-form-item label="生产厂商" prop="CompanyName">
               <span>{{ state.m_detailDialogInfo.CompanyName }}</span>
            </el-form-item>
            <el-form-item label="能效等级" prop="EnergyEfficiencyClass">
               <span>{{ state.m_detailDialogInfo.EnergyEfficiencyClass }}</span>
            </el-form-item>
            <el-form-item label="备案号" prop="RecordNumber">
               <span class="detail-text">{{ state.m_detailDialogInfo.CompanyName }}</span>
            </el-form-item>
            <el-form-item label="备案时间" prop="RecordTime">
               <span>{{ state.m_detailDialogInfo.RecordTime }}</span>
            </el-form-item>
            <el-form-item label="依据国家标准" prop="RecordNumber">
               <span></span>
            </el-form-item>
         </el-form>
         <!-- 其他产品显示 -->
         <el-form v-if="!isPumpProduct" :model="state.m_detailDialogInfo" label-width="120px" size="small">
            <el-form-item label="产品类型" prop="ModelType">
               <span>{{ state.m_detailDialogInfo.ModelType }}</span>
            </el-form-item>
            <el-form-item label="产品型号" prop="Model">
               <span>{{ state.m_detailDialogInfo.Model }}</span>
            </el-form-item>
            <el-form-item label="生产厂商" prop="CompanyName">
               <span>{{ state.m_detailDialogInfo.CompanyName }}</span>
            </el-form-item>
            <el-form-item label="能效等级" prop="EnergyEfficiencyClass">
               <span>{{ state.m_detailDialogInfo.EnergyEfficiencyClass }}</span>
            </el-form-item>
            <el-form-item label="备案号" prop="RecordNumber">
               <span class="detail-text">{{ state.m_detailDialogInfo.CompanyName }}</span>
            </el-form-item>
            <el-form-item label="备案时间" prop="RecordTime">
               <span>{{ state.m_detailDialogInfo.RecordTime }}</span>
            </el-form-item>
            <el-form-item label="依据国家标准" prop="RecordNumber">
               <span></span>
            </el-form-item>
         </el-form>
         <div v-loading="dialogLoading">
            <!-- 泵产品显示 -->
            <el-form v-if="isPumpProduct" :model="state.m_detailDialogInfo" label-width="120px" size="small">
               <el-form-item label="产品类型" prop="ModelType">
                  <span>{{ state.m_detailDialogInfo.ModelType }}</span>
               </el-form-item>
               <el-form-item label="产品型号" prop="Model">
                  <span>{{ state.m_detailDialogInfo.Model }}</span>
               </el-form-item>
               <el-form-item label="生产厂商" prop="CompanyName">
                  <span>{{ state.m_detailDialogInfo.CompanyName }}</span>
               </el-form-item>
               <el-form-item label="能效等级" prop="EnergyEfficiencyClass">
                  <span>{{ state.m_detailDialogInfo.EnergyEfficiencyClass }}</span>
               </el-form-item>
               <el-form-item label="备案号" prop="RecordNumber">
                  <span class="detail-text">{{ state.m_detailDialogInfo.CompanyName }}</span>
               </el-form-item>
               <el-form-item label="备案时间" prop="RecordTime">
                  <span>{{ state.m_detailDialogInfo.RecordTime }}</span>
               </el-form-item>
               <el-form-item label="依据国家标准" prop="RecordNumber">
                  <span></span>
               </el-form-item>
            </el-form>
            <!-- 其他产品显示 -->
            <el-form v-if="!isPumpProduct" :model="state.m_OtherDetailInfo" label-width="120px" size="small">
               <el-form-item label="产品类型" prop="ModelType">
                  <span>{{ state.m_OtherDetailInfo.ModelType }}</span>
               </el-form-item>
               <el-form-item label="产品型号" prop="Model">
                  <span>{{ state.m_OtherDetailInfo.Model }}</span>
               </el-form-item>
               <el-form-item label="生产厂商" prop="CompanyName">
                  <span>{{ state.m_OtherDetailInfo.CompanyName }}</span>
               </el-form-item>
               <el-form-item label="能效等级" prop="EnergyEfficiencyClass">
                  <span>{{ state.m_OtherDetailInfo.EnergyEfficiencyClass }}</span>
               </el-form-item>
               <el-form-item label="备案号" prop="RecordNumber">
                  <span class="detail-text">{{ state.m_OtherDetailInfo.RecordNumber }}</span>
               </el-form-item>
               <el-form-item label="公告时间" prop="AnnouncementTime">
                  <span>{{ state.m_OtherDetailInfo.AnnouncementTime }}</span>
               </el-form-item>
               <el-form-item label="依据国家标准" prop="Standard">
                  <span>{{ state.m_OtherDetailInfo.Standard }}</span>
               </el-form-item>
               <el-form-item label="备案信息" prop="RecordNumber">
                  <div style="padding-left: 30px; background-color: rgb(243 250 255)">
                     <el-form label-width="200px">
                        <el-form-item v-for="(item, index) in state.m_OtherDetailInfo.List" :key="index" :label="item.name" prop="Standard">
                           <span>{{ item.value }}</span>
                        </el-form-item>
                     </el-form>
                  </div>
               </el-form-item>
            </el-form>
         </div>
         <template #footer>
            <div class="dialog-footer">
               <el-button type="primary" @click="dialogVisible = false"> 确定 </el-button>
@@ -229,10 +195,11 @@
const dialogVisible = ref(false);
const dialogVisibleCertifcate = ref(false);
const isPumpProduct = ref(true);
const dialogLoading = ref(false);
let state = reactive({
   m_formData: {
      ProductModel: '',
      ProductType: 1,
      ProductType: 2,
      RecordNumber: '',
   },
   allEecProduct: [],
@@ -253,28 +220,35 @@
      RecordTime: '',
      RecordNumber: '',
   },
   typeSelect: 1,
   m_OtherDetailInfo: {
      ModelType: '',
      Model: '',
      CompanyName: '',
      RecordNumber: '',
      EnergyEfficiencyClass: '',
      AnnouncementTime: '',
      Standard: '',
      List: '',
      RecordTime: '',
   },
   typeSelect: 2,
   // 分类选项
   type: [
      { name: '泵', tag: 1 },
      { name: '容积式空压机', tag: 2 },
      { name: '通风机', tag: 3 },
      { name: '冷水机组', tag: 4 },
      { name: '电力变压器', tag: 5 },
      { name: '工业锅炉', tag: 6 },
      { name: '电机', tag: 7 },
   ],
   m_PageLoading: false,
});
const m_RequestDataObj = {
   1: { requestPath: 'static/EecProductData/Pump.json' },
   2: { requestPath: 'static/EecProductData/AirCompressor.json' },
   3: { requestPath: 'static/EecProductData/Fan.json' },
   4: { requestPath: 'static/EecProductData/WaterChiller.json' },
   5: { requestPath: 'static/EecProductData/PowerTransformer.json' },
   6: { requestPath: 'static/EecProductData/IndustrialBoiler.json' },
   7: { requestPath: 'static/EecProductData/ElectricMachinery.json' },
   1: { requestPath: 'static/EecProductData/PumpSearch.json' },
   2: { requestPath: 'static/EecProductData/AirCompressorSearch.json' },
   3: { requestPath: 'static/EecProductData/FanSearch.json' },
   4: { requestPath: 'static/EecProductData/WaterChillerSearch.json' },
   7: { requestPath: 'static/EecProductData/ElectricMachinerySearch.json' },
};
onMounted(() => {
@@ -362,16 +336,16 @@
const changeProductType = () => {
   initData();
};
const clickDetail = (row: any) => {
   if(row.Id.includes('Pupm')){
const clickDetail = async (row: any) => {
   if (row.Id.includes('Pupm')) {
      isPumpProduct.value = true;
   }else {
   } else {
      isPumpProduct.value = false;
      getProductDetail(row.Model);
   }
   state.m_detailDialogInfo = row;
   dialogVisible.value = true;
   getProductDetail(row.Model)
   // 找到当前点击的产品
   // const currentProduct = state.m_dispTableData.find((item) => item.id === row.id);
   // if (currentProduct) {
@@ -381,12 +355,19 @@
   // router.push(`/product/${currentProduct.Id}`);
};
const clickDetailCertifcate = (row: any) => {
   state.m_detailDialogInfo = row;
   dialogVisibleCertifcate.value = true;
   // state.m_detailDialogInfo = row;
   // dialogVisibleCertifcate.value = true;
      // 找到当前点击的产品
      const currentProduct = state.m_dispTableData.find((item) => item.id === row.id);
   if (currentProduct) {
      // 保存产品信息到localStorage
      localStorage.setItem('currentProduct', JSON.stringify(currentProduct));
   }
   router.push(`/product/${currentProduct.Id}`);
};
const getProductDetail = async (productModel) => {
   dialogLoading.value = true;
   const productRegistrationList = () => {
      return new Promise((reslvoe, reject) => {
         axios({
@@ -435,14 +416,25 @@
               if (!result.list.length) {
                  reslvoe([]);
               }
               reslvoe(result.list);
               reslvoe(result);
            })
            .catch((err) => {});
      });
   };
   const detailData = await detailResponse();
   return detailData;
   dialogLoading.value = false;
   state.m_OtherDetailInfo = {
      ModelType: detailData.productType,
      Model: detailData.productModel,
      CompanyName: detailData.producerName,
      RecordNumber: detailData.registrationNumber,
      EnergyEfficiencyClass: detailData.nxLever,
      AnnouncementTime: detailData.announcementTime,
      Standard: detailData.standard,
      List: detailData.list,
      RecordTime: '',
   };
};
const resertForm = () => {