From d651cb1c7da78669a8f66939225a290cf8fde1c8 Mon Sep 17 00:00:00 2001 From: tanghaolin <1723298894@qq.com> Date: 星期五, 21 二月 2025 10:24:46 +0800 Subject: [PATCH] 修改商品价格预计潜水泵测试报告图片 --- src/views/IndustrialSoftware.vue | 44 ++++++++++++++++++++++++++++---------------- 1 files changed, 28 insertions(+), 16 deletions(-) diff --git a/src/views/IndustrialSoftware.vue b/src/views/IndustrialSoftware.vue index 823733b..adb95cf 100644 --- a/src/views/IndustrialSoftware.vue +++ b/src/views/IndustrialSoftware.vue @@ -168,7 +168,7 @@ p-id="34746" class="icon-path" ></path></svg - >璇佷功 + >鎶ュ憡 </div> </div> </div> @@ -223,8 +223,6 @@ { name: '瀹圭Н寮忕┖鍘嬫満', tag: 2 }, { name: '閫氶鏈�', tag: 3 }, { name: '鍐锋按鏈虹粍', tag: 4 }, - { name: '鐢靛姏鍙樺帇鍣�', tag: 5 }, - { name: '宸ヤ笟閿呯倝', tag: 6 }, { name: '鐢垫満', tag: 7 }, ]; const factory = ref([]); @@ -305,24 +303,18 @@ .then((res) => { m_PageLoading.value = false; let result = res.data; - result.sort((a: any, b: any) => { - const aPrefix = a.Model.slice(0, 3); - const bPrefix = b.Model.slice(0, 3); - const aContainsDP = aPrefix.includes('DP') || aPrefix.includes('DRL'); - const bContainsDP = bPrefix.includes('DP') || bPrefix.includes('DRL'); - if (aContainsDP && !bContainsDP) { - return -1; - } else if (!aContainsDP && bContainsDP) { - return 1; - } else { - return 0; - } - }); let arr = []; result.forEach((item: any, index: number) => { + if (typeSelect.value === 2) { + item.Price = item.Price * 10; + } + if (typeSelect.value === 4) { + item.Price = item.Price * 5; + } let incrementFactor = 0.1 * (index + 1); // 鏍规嵁绱㈠紩璁$畻閫掑绯绘暟 let newPrice = parseFloat(item.Price) + parseFloat((item.Price * incrementFactor).toFixed(1)); // 璁$畻鏂扮殑Price鍊� + let node = { Id: item.Id, Type: item.Type, @@ -362,6 +354,26 @@ return factoryIncludeType.value.includes(item.Type); }); } + if (typeSelect.value === 1) { + filterProductData.value.sort((a: any, b: any) => { + const aContainsDSWQ = a.Model.includes('DSWQ'); + const bContainsDSWQ = b.Model.includes('DSWQ'); + const aContainsDRLOrDP = a.Model.substring(0, 3).includes('DRL') || a.Model.substring(0, 2).includes('DP'); + const bContainsDRLOrDP = b.Model.substring(0, 3).includes('DRL') || b.Model.substring(0, 2).includes('DP'); + + if (aContainsDSWQ && !bContainsDSWQ) { + return -1; + } else if (!aContainsDSWQ && bContainsDSWQ) { + return 1; + } else if (aContainsDRLOrDP && !bContainsDRLOrDP) { + return -1; + } else if (!aContainsDRLOrDP && bContainsDRLOrDP) { + return 1; + } else { + return 0; + } + }); + } dispEecProduct.value = getSelectPageData(filterProductData.value); }; const handleCurrentChange = (val: number) => { -- Gitblit v1.9.3