From 04a2d3e3c701a03981c4b66162ff9515f9d7dd12 Mon Sep 17 00:00:00 2001 From: tanghaolin <1723298894@qq.com> Date: 星期一, 21 四月 2025 22:32:21 +0800 Subject: [PATCH] 修改数据与页面逻辑 --- src/views/EecLabel.vue | 80 +++++++++------------------------------ 1 files changed, 19 insertions(+), 61 deletions(-) diff --git a/src/views/EecLabel.vue b/src/views/EecLabel.vue index 4f9c1ed..704912c 100644 --- a/src/views/EecLabel.vue +++ b/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> @@ -83,51 +83,6 @@ ></path> </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> @@ -198,7 +153,7 @@ </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 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> @@ -244,7 +199,7 @@ let state = reactive({ m_formData: { ProductModel: '', - ProductType: 1, + ProductType: 2, RecordNumber: '', }, allEecProduct: [], @@ -276,28 +231,24 @@ List: '', RecordTime: '', }, - typeSelect: 1, + 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(() => { @@ -404,8 +355,15 @@ // 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) { + // 淇濆瓨浜у搧淇℃伅鍒發ocalStorage + localStorage.setItem('currentProduct', JSON.stringify(currentProduct)); + } + router.push(`/product/${currentProduct.Id}`); }; const getProductDetail = async (productModel) => { -- Gitblit v1.9.3