|
|
|
@ -265,6 +265,26 @@ const handleBack = () => { |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
/** 排序处理 */ |
|
|
|
const handleSortChange = (sortObj: { prop: string; order: 'ascending' | 'descending' | null }) => { |
|
|
|
if (!sortObj.prop || !sortObj.order) return; |
|
|
|
|
|
|
|
const fieldMap: Record<string, keyof EnterpriseDetailVo> = { |
|
|
|
establishmentTime: 'establishmentTime', |
|
|
|
operatingTerm: 'operatingTerm' |
|
|
|
}; |
|
|
|
|
|
|
|
const field = fieldMap[sortObj.prop]; |
|
|
|
if (!field) return; |
|
|
|
|
|
|
|
detailList.value.sort((a, b) => { |
|
|
|
const valA = a[field] || ''; |
|
|
|
const valB = b[field] || ''; |
|
|
|
return sortObj.order === 'ascending' ? valA.localeCompare(valB) : valB.localeCompare(valA); |
|
|
|
}); |
|
|
|
detailPageNum.value = 1; |
|
|
|
}; |
|
|
|
|
|
|
|
/** Tab1 导出 */ |
|
|
|
const handleExportArea = async () => { |
|
|
|
try { |
|
|
|
@ -429,7 +449,7 @@ const handleExportType = async () => { |
|
|
|
|
|
|
|
<!-- 详情表 (viewLevel=3) --> |
|
|
|
<el-card v-if="viewLevel === 3" shadow="hover" v-loading="loading1"> |
|
|
|
<el-table :data="detailPageData" border stripe> |
|
|
|
<el-table :data="detailPageData" border stripe @sort-change="handleSortChange"> |
|
|
|
<el-table-column label="区域" prop="qy" width="100" align="center" /> |
|
|
|
<el-table-column label="街道" prop="jd" width="120" align="center" /> |
|
|
|
<el-table-column label="企业名称" prop="enterpriseName" min-width="180" :show-overflow-tooltip="true" align="center" /> |
|
|
|
@ -445,7 +465,7 @@ const handleExportType = async () => { |
|
|
|
<el-table-column label="企业地址" prop="enterpriseAddress" min-width="200" :show-overflow-tooltip="true" align="center" /> |
|
|
|
<el-table-column label="法人代表" prop="legalPerson" width="100" align="center" /> |
|
|
|
<el-table-column label="注册资本" prop="registeredCapital" width="120" align="center" /> |
|
|
|
<el-table-column label="成立日期" prop="establishmentTime" width="110" align="center" /> |
|
|
|
<el-table-column label="成立日期" prop="establishmentTime" width="110" align="center" sortable="custom" /> |
|
|
|
<el-table-column label="营业期限" prop="operatingTerm" width="120" :show-overflow-tooltip="true" align="center" /> |
|
|
|
<el-table-column label="经营范围" prop="businessScope" min-width="200" :show-overflow-tooltip="true" align="center" /> |
|
|
|
</el-table> |
|
|
|
|