| | |
| | | .then((res) => { |
| | | state.m_PageLoading = 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) => { |
| | | let node = { |
| | |
| | | localStorage.setItem('currentProduct', JSON.stringify(currentProduct)); |
| | | } |
| | | router.push(`/product/${currentProduct.Id}`); |
| | | |
| | | }; |
| | | const clickDetailCertifcate = (row: any) => { |
| | | state.m_detailDialogInfo = row; |