| | |
| | | <div class="flag-search-content"> |
| | | <el-card class="w100 h100" shadow="never"> |
| | | <el-form |
| | | style="height: 56px; flex-shrink: 0" |
| | | style="height: 56px; flex-shrink: 0; display: flex" |
| | | :model="state.m_formData" |
| | | ref="ruleFormRef" |
| | | :inline="true" |
| | | label-width="100px" |
| | | label-width="80px" |
| | | class="demo-ruleForm" |
| | | > |
| | | <el-form-item label="产品类型" prop="ProductType"> |
| | |
| | | import { ElMessage, ElTable, ElTableColumn, ElPagination, ElForm, ElFormItem, ElDialog } from 'element-plus'; |
| | | import { useRoute, useRouter } from 'vue-router'; |
| | | import axios from 'axios'; |
| | | import { el } from 'element-plus/es/locale'; |
| | | const route = useRoute(); |
| | | const router = useRouter(); |
| | | const dialogVisible = ref(false); |
| | |
| | | .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 = { |
| | |
| | | initData(); |
| | | }; |
| | | const clickDetail = (row: any) => { |
| | | dialogVisible.value = true; |
| | | state.m_detailDialogInfo = row; |
| | | // 找到当前点击的产品 |
| | | 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 clickDetailCertifcate = (row: any) => { |
| | | state.m_detailDialogInfo = row; |
| | |
| | | } |
| | | |
| | | .w-180-px { |
| | | width: 180px; |
| | | width: 10rem; |
| | | } |
| | | |
| | | .table-detail-span { |
| | |
| | | background-color: #196dd9; |
| | | } |
| | | } |
| | | :deep(.el-form--inline .el-form-item) { |
| | | margin-right: 0.75rem; |
| | | } |
| | | :deep(.el-card) { |
| | | width: 100%; |
| | | } |