|
|
|
@ -287,9 +287,9 @@ |
|
|
|
</div> |
|
|
|
<div class="image-preview"> |
|
|
|
<el-image |
|
|
|
style="width: 200px; height: 150px; margin-right: 15px;" |
|
|
|
:src="getImageUrl(cert.certImage)" |
|
|
|
:preview-src-list="[getImageUrl(cert.certImage)]" |
|
|
|
style="width: 200px; height: 150px;" |
|
|
|
:src="baseUrl + cert.certImage" |
|
|
|
:preview-src-list="[baseUrl + cert.certImage]" |
|
|
|
fit="contain" |
|
|
|
> |
|
|
|
<div slot="error" class="image-slot"> |
|
|
|
@ -297,12 +297,6 @@ |
|
|
|
<div>图片加载失败</div> |
|
|
|
</div> |
|
|
|
</el-image> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
size="mini" |
|
|
|
@click="viewImage(cert.certImage)" |
|
|
|
icon="el-icon-zoom-in" |
|
|
|
>查看大图</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -368,28 +362,6 @@ |
|
|
|
{{ submittingAll ? '提交中...' : '提交审核' }} |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 图片预览对话框 --> |
|
|
|
<el-dialog |
|
|
|
:visible.sync="imagePreviewVisible" |
|
|
|
width="80%" |
|
|
|
append-to-body |
|
|
|
class="image-preview-dialog" |
|
|
|
> |
|
|
|
<el-image |
|
|
|
style="width: 100%; max-height: 70vh;" |
|
|
|
:src="previewImageUrl" |
|
|
|
fit="contain" |
|
|
|
> |
|
|
|
<div slot="error" class="image-slot-large"> |
|
|
|
<i class="el-icon-picture-outline"></i> |
|
|
|
<div>图片加载失败</div> |
|
|
|
</div> |
|
|
|
</el-image> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="imagePreviewVisible = false">关 闭</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 详情对话框 --> |
|
|
|
@ -439,85 +411,72 @@ |
|
|
|
</el-tab-pane> |
|
|
|
|
|
|
|
<el-tab-pane label="资质证书" name="certificates" v-if="detailCertificates && detailCertificates.length > 0"> |
|
|
|
<div v-if="loadingCertDetail" class="tab-loading"> |
|
|
|
<i class="el-icon-loading"></i> |
|
|
|
<div>加载证书信息...</div> |
|
|
|
</div> |
|
|
|
<div class="certificate-section"> |
|
|
|
<h3>资质证书列表(共 {{ detailCertificates.length }} 个证书)</h3> |
|
|
|
|
|
|
|
<div v-else> |
|
|
|
<div class="certificate-section"> |
|
|
|
<h3>资质证书列表(共 {{ detailCertificates.length }} 个证书)</h3> |
|
|
|
|
|
|
|
<el-tabs v-model="detailCertActiveTab" type="card" class="cert-tabs"> |
|
|
|
<el-tab-pane |
|
|
|
v-for="(cert, index) in detailCertificates" |
|
|
|
:key="cert.qualificationId" |
|
|
|
:label="cert.certName || cert.qualificationType || `证书${index + 1}`" |
|
|
|
:name="'detailCert' + cert.qualificationId" |
|
|
|
> |
|
|
|
<div class="certificate-item view-only"> |
|
|
|
<div class="cert-header"> |
|
|
|
<div class="cert-title"> |
|
|
|
<span>{{ cert.certName || cert.qualificationType || '未命名证书' }}</span> |
|
|
|
<el-tag v-if="cert.auditStatus === '1'" type="success" size="mini">✓ 已通过</el-tag> |
|
|
|
<el-tag v-if="cert.auditStatus === '2'" type="danger" size="mini">✗ 未通过</el-tag> |
|
|
|
<el-tag v-if="!cert.auditStatus || cert.auditStatus === '0'" type="warning" size="mini">待审核</el-tag> |
|
|
|
<el-tabs v-model="detailCertActiveTab" type="card" class="cert-tabs"> |
|
|
|
<el-tab-pane |
|
|
|
v-for="(cert, index) in detailCertificates" |
|
|
|
:key="cert.qualificationId" |
|
|
|
:label="cert.certName || cert.qualificationType || `证书${index + 1}`" |
|
|
|
:name="'detailCert' + cert.qualificationId" |
|
|
|
> |
|
|
|
<div class="certificate-item view-only"> |
|
|
|
<div class="cert-header"> |
|
|
|
<div class="cert-title"> |
|
|
|
<span>{{ cert.certName || cert.qualificationType || '未命名证书' }}</span> |
|
|
|
<el-tag v-if="cert.auditStatus === '1'" type="success" size="mini">✓ 已通过</el-tag> |
|
|
|
<el-tag v-if="cert.auditStatus === '2'" type="danger" size="mini">✗ 未通过</el-tag> |
|
|
|
<el-tag v-if="!cert.auditStatus || cert.auditStatus === '0'" type="warning" size="mini">待审核</el-tag> |
|
|
|
</div> |
|
|
|
<div class="cert-info"> |
|
|
|
<span><strong>证书编号:</strong>{{ cert.certificateNo || '-' }}</span> |
|
|
|
<span><strong>发证机构:</strong>{{ cert.issueOrg || '-' }}</span> |
|
|
|
<span><strong>资质类型:</strong>{{ cert.qualificationType || '-' }}</span> |
|
|
|
<span><strong>证书类型:</strong>{{ cert.certType || '-' }}</span> |
|
|
|
<span><strong>颁发日期:</strong>{{ parseTime(cert.issueDate, '{y}-{m}-{d}') || '-' }}</span> |
|
|
|
<span><strong>到期日期:</strong>{{ parseTime(cert.expireDate, '{y}-{m}-{d}') || '-' }}</span> |
|
|
|
<span><strong>证书状态:</strong>{{ cert.certStatus || '-' }}</span> |
|
|
|
<span><strong>审核状态:</strong> |
|
|
|
<el-tag :type="getAuditStatusTagType(cert.auditStatus)" size="small"> |
|
|
|
{{ getAuditStatusText(cert.auditStatus) }} |
|
|
|
</el-tag> |
|
|
|
</span> |
|
|
|
<span><strong>审核意见:</strong>{{ cert.auditOpinion || '-' }}</span> |
|
|
|
<span><strong>审核时间:</strong>{{ parseTime(cert.auditTime) || '-' }}</span> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-if="cert.certImage" class="cert-image-section"> |
|
|
|
<div class="image-title"> |
|
|
|
<strong>证书图片:</strong> |
|
|
|
</div> |
|
|
|
<div class="cert-info"> |
|
|
|
<span><strong>证书编号:</strong>{{ cert.certificateNo || '-' }}</span> |
|
|
|
<span><strong>发证机构:</strong>{{ cert.issueOrg || '-' }}</span> |
|
|
|
<span><strong>资质类型:</strong>{{ cert.qualificationType || '-' }}</span> |
|
|
|
<span><strong>证书类型:</strong>{{ cert.certType || '-' }}</span> |
|
|
|
<span><strong>颁发日期:</strong>{{ parseTime(cert.issueDate, '{y}-{m}-{d}') || '-' }}</span> |
|
|
|
<span><strong>到期日期:</strong>{{ parseTime(cert.expireDate, '{y}-{m}-{d}') || '-' }}</span> |
|
|
|
<span><strong>证书状态:</strong>{{ cert.certStatus || '-' }}</span> |
|
|
|
<span><strong>审核状态:</strong> |
|
|
|
<el-tag :type="getAuditStatusTagType(cert.auditStatus)" size="small"> |
|
|
|
{{ getAuditStatusText(cert.auditStatus) }} |
|
|
|
</el-tag> |
|
|
|
</span> |
|
|
|
<span><strong>审核意见:</strong>{{ cert.auditOpinion || '-' }}</span> |
|
|
|
<span><strong>审核时间:</strong>{{ parseTime(cert.auditTime) || '-' }}</span> |
|
|
|
<div class="image-preview"> |
|
|
|
<el-image |
|
|
|
style="width: 200px; height: 150px;" |
|
|
|
:src="baseUrl + cert.certImage" |
|
|
|
:preview-src-list="[baseUrl + cert.certImage]" |
|
|
|
fit="contain" |
|
|
|
> |
|
|
|
<div slot="error" class="image-slot"> |
|
|
|
<i class="el-icon-picture-outline"></i> |
|
|
|
<div>图片加载失败</div> |
|
|
|
</div> |
|
|
|
</el-image> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-if="cert.certImage" class="cert-image-section"> |
|
|
|
<div class="image-title"> |
|
|
|
<strong>证书图片:</strong> |
|
|
|
</div> |
|
|
|
<div class="image-preview"> |
|
|
|
<el-image |
|
|
|
style="width: 200px; height: 150px; margin-right: 15px;" |
|
|
|
:src="getImageUrl(cert.certImage)" |
|
|
|
:preview-src-list="[getImageUrl(cert.certImage)]" |
|
|
|
fit="contain" |
|
|
|
> |
|
|
|
<div slot="error" class="image-slot"> |
|
|
|
<i class="el-icon-picture-outline"></i> |
|
|
|
<div>图片加载失败</div> |
|
|
|
</div> |
|
|
|
</el-image> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
size="mini" |
|
|
|
@click="viewImage(cert.certImage)" |
|
|
|
icon="el-icon-zoom-in" |
|
|
|
>查看大图</el-button> |
|
|
|
</div> |
|
|
|
<div v-if="cert.certificateFiles" class="cert-files-section"> |
|
|
|
<div class="files-title"> |
|
|
|
<strong>其他附件:</strong> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-if="cert.certificateFiles" class="cert-files-section"> |
|
|
|
<div class="files-title"> |
|
|
|
<strong>其他附件:</strong> |
|
|
|
</div> |
|
|
|
<div class="files-list"> |
|
|
|
<span>{{ cert.certificateFiles }}</span> |
|
|
|
</div> |
|
|
|
<div class="files-list"> |
|
|
|
<span>{{ cert.certificateFiles }}</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
</div> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
@ -545,6 +504,7 @@ export default { |
|
|
|
showSearch: true, |
|
|
|
total: 0, |
|
|
|
infoList: [], |
|
|
|
baseUrl: process.env.VUE_APP_BASE_API, |
|
|
|
|
|
|
|
detailTitle: "", |
|
|
|
detailVisible: false, |
|
|
|
@ -862,19 +822,6 @@ export default { |
|
|
|
return `共 ${total} 个证书,已审核 ${audited} 个,其中通过 ${passed} 个,不通过 ${failed} 个` |
|
|
|
}, |
|
|
|
|
|
|
|
viewImage(imagePath) { |
|
|
|
this.previewImageUrl = this.getImageUrl(imagePath) |
|
|
|
this.imagePreviewVisible = true |
|
|
|
}, |
|
|
|
|
|
|
|
getImageUrl(path) { |
|
|
|
if (!path) return '' |
|
|
|
if (path.startsWith('/')) { |
|
|
|
return process.env.VUE_APP_BASE_API + path |
|
|
|
} |
|
|
|
return path |
|
|
|
}, |
|
|
|
|
|
|
|
resetAuditData() { |
|
|
|
this.basicInfo = {} |
|
|
|
this.basicAuditForm = { |
|
|
|
@ -904,44 +851,40 @@ export default { |
|
|
|
if (response.code === 200) { |
|
|
|
this.detailData = response.data |
|
|
|
|
|
|
|
this.loadDetailCertificates(response.data.userId) |
|
|
|
// 详情页使用和审核页相同的逻辑加载证书 |
|
|
|
if (response.data.userId) { |
|
|
|
const queryParams = { |
|
|
|
userId: response.data.userId, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 1000 |
|
|
|
} |
|
|
|
|
|
|
|
listQualification(queryParams).then(certResponse => { |
|
|
|
if (certResponse.code === 200) { |
|
|
|
this.detailCertificates = certResponse.rows || [] |
|
|
|
if (this.detailCertificates.length > 0) { |
|
|
|
this.detailCertActiveTab = 'detailCert' + this.detailCertificates[0].qualificationId |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('加载证书详情失败:', error) |
|
|
|
}).finally(() => { |
|
|
|
this.loadingDetail = false |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.loadingDetail = false |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.error(response.msg || '获取详情失败') |
|
|
|
this.loadingDetail = false |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('获取详情失败:', error) |
|
|
|
this.$message.error('获取详情失败') |
|
|
|
}).finally(() => { |
|
|
|
this.loadingDetail = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
loadDetailCertificates(userId) { |
|
|
|
if (!userId) return |
|
|
|
|
|
|
|
this.loadingCertDetail = true |
|
|
|
|
|
|
|
const queryParams = { |
|
|
|
userId: userId, |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 1000 |
|
|
|
} |
|
|
|
|
|
|
|
listQualification(queryParams).then(response => { |
|
|
|
if (response.code === 200) { |
|
|
|
this.detailCertificates = response.rows || [] |
|
|
|
if (this.detailCertificates.length > 0) { |
|
|
|
this.detailCertActiveTab = 'detailCert' + this.detailCertificates[0].qualificationId |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error('加载证书详情失败:', error) |
|
|
|
this.$message.error('加载证书详情失败') |
|
|
|
}).finally(() => { |
|
|
|
this.loadingCertDetail = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
handleQuery() { |
|
|
|
this.queryParams.pageNum = 1 |
|
|
|
this.getList() |
|
|
|
@ -1255,9 +1198,6 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
.image-preview { |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
.el-image { |
|
|
|
border: 1px solid #dcdfe6; |
|
|
|
border-radius: 4px; |
|
|
|
@ -1306,40 +1246,6 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.image-preview-dialog { |
|
|
|
:deep(.el-dialog__body) { |
|
|
|
padding: 20px; |
|
|
|
display: flex; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
min-height: 400px; |
|
|
|
|
|
|
|
.el-image { |
|
|
|
max-height: 70vh; |
|
|
|
} |
|
|
|
|
|
|
|
.image-slot-large { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
align-items: center; |
|
|
|
justify-content: center; |
|
|
|
width: 100%; |
|
|
|
height: 400px; |
|
|
|
background: #f5f7fa; |
|
|
|
color: #909399; |
|
|
|
|
|
|
|
i { |
|
|
|
font-size: 40px; |
|
|
|
margin-bottom: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
div { |
|
|
|
font-size: 14px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.cert-audit-form { |
|
|
|
margin-top: 20px; |
|
|
|
padding-top: 20px; |
|
|
|
|