|
|
|
@ -64,39 +64,39 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<el-row :gutter="10" class="mb8"> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
plain |
|
|
|
icon="el-icon-plus" |
|
|
|
size="mini" |
|
|
|
@click="handleAdd" |
|
|
|
v-hasPermi="['vet:qualification:add']" |
|
|
|
>新增</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="success" |
|
|
|
plain |
|
|
|
icon="el-icon-edit" |
|
|
|
size="mini" |
|
|
|
:disabled="single" |
|
|
|
@click="handleUpdate" |
|
|
|
v-hasPermi="['vet:qualification:edit']" |
|
|
|
>修改</el-button> |
|
|
|
</el-col> |
|
|
|
<el-col :span="1.5"> |
|
|
|
<el-button |
|
|
|
type="danger" |
|
|
|
plain |
|
|
|
icon="el-icon-delete" |
|
|
|
size="mini" |
|
|
|
:disabled="multiple" |
|
|
|
@click="handleDelete" |
|
|
|
v-hasPermi="['vet:qualification:remove']" |
|
|
|
>删除</el-button> |
|
|
|
</el-col> |
|
|
|
<!-- <el-row :gutter="10" class="mb8">--> |
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- type="primary"--> |
|
|
|
<!-- plain--> |
|
|
|
<!-- icon="el-icon-plus"--> |
|
|
|
<!-- size="mini"--> |
|
|
|
<!-- @click="handleAdd"--> |
|
|
|
<!-- v-hasPermi="['vet:qualification:add']"--> |
|
|
|
<!-- >新增</el-button>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- type="success"--> |
|
|
|
<!-- plain--> |
|
|
|
<!-- icon="el-icon-edit"--> |
|
|
|
<!-- size="mini"--> |
|
|
|
<!-- :disabled="single"--> |
|
|
|
<!-- @click="handleUpdate"--> |
|
|
|
<!-- v-hasPermi="['vet:qualification:edit']"--> |
|
|
|
<!-- >修改</el-button>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- type="danger"--> |
|
|
|
<!-- plain--> |
|
|
|
<!-- icon="el-icon-delete"--> |
|
|
|
<!-- size="mini"--> |
|
|
|
<!-- :disabled="multiple"--> |
|
|
|
<!-- @click="handleDelete"--> |
|
|
|
<!-- v-hasPermi="['vet:qualification:remove']"--> |
|
|
|
<!-- >删除</el-button>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<!-- <el-col :span="1.5">--> |
|
|
|
<!-- <el-button--> |
|
|
|
<!-- type="warning"--> |
|
|
|
@ -107,9 +107,10 @@ |
|
|
|
<!-- v-hasPermi="['vet:qualification:export']"--> |
|
|
|
<!-- >导出</el-button>--> |
|
|
|
<!-- </el-col>--> |
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
|
|
</el-row> |
|
|
|
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>--> |
|
|
|
<!-- </el-row>--> |
|
|
|
|
|
|
|
<!-- 表格 --> |
|
|
|
<el-table v-loading="loading" :data="qualificationList" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
|
<!-- <el-table-column label="资质ID" align="center" prop="qualificationId" v-if="false" />--> |
|
|
|
@ -121,7 +122,7 @@ |
|
|
|
<span v-else style="color: #909399">-</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="身份证号" align="center" prop="idCard" width="150"> |
|
|
|
<el-table-column label="身份证号" align="center" prop="idCard" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.idCard">{{ scope.row.idCard }}</span> |
|
|
|
<span v-else style="color: #909399">-</span> |
|
|
|
@ -192,7 +193,7 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="备注" align="center" prop="remark" /> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300"> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="200"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 查看按钮 --> |
|
|
|
<el-button |
|
|
|
@ -201,6 +202,7 @@ |
|
|
|
icon="el-icon-view" |
|
|
|
@click="handleView(scope.row)" |
|
|
|
v-hasPermi="['vet:qualification:query']" |
|
|
|
class="info-btn view-btn" |
|
|
|
>查看证书详情</el-button> |
|
|
|
|
|
|
|
<!-- 修改按钮 --> |
|
|
|
@ -269,7 +271,7 @@ |
|
|
|
@pagination="getList" |
|
|
|
/> |
|
|
|
|
|
|
|
<!-- 显示资质证书信息 --> |
|
|
|
<!-- 显示资质证书信息弹窗 --> |
|
|
|
<el-dialog :title="title" :visible.sync="openDetail" width="800px" append-to-body> |
|
|
|
<div v-if="detailData" style="padding: 20px;"> |
|
|
|
<div style="margin-top: 30px;"> |
|
|
|
@ -344,17 +346,18 @@ |
|
|
|
</el-tag> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300"> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 修改按钮 --> |
|
|
|
<el-button |
|
|
|
v-if="!scope.row.auditStatus || scope.row.auditStatus === '0' || scope.row.auditStatus === '2'" |
|
|
|
v-if="!detailData.auditStatus || detailData.auditStatus === '0' || detailData.auditStatus === '2'" |
|
|
|
size="mini" |
|
|
|
type="text" |
|
|
|
icon="el-icon-edit" |
|
|
|
style="color: #42B983" |
|
|
|
@click="handleUpdate(scope.row)" |
|
|
|
v-hasPermi="['vet:qualification:edit']" |
|
|
|
class = "info-btn alter-btn" |
|
|
|
>修改</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -366,6 +369,7 @@ |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 图片预览弹窗 --> |
|
|
|
<el-dialog :visible.sync="previewDialogVisible" width="60%" append-to-body> |
|
|
|
<div style="text-align: center; padding: 20px;"> |
|
|
|
<img |
|
|
|
@ -377,8 +381,7 @@ |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改兽医资质对话框 --> |
|
|
|
<!-- 添加或修改兽医资质弹窗 --> |
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> |
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
|
<!-- <el-form-item label="真实姓名" prop="realName">--> |
|
|
|
@ -456,6 +459,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { listQualification, getQualificationCertificate, delQualification, getQualificationCertificates, updateAndSubmitQualification} from "@/api/vet/qualification" |
|
|
|
import {listQualificationCertificates} from "../../../api/vet/qualification"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "Qualification", |
|
|
|
@ -542,7 +546,7 @@ export default { |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
/** 查询兽医资质列表 */ |
|
|
|
// 查询兽医资质列表 |
|
|
|
getList() { |
|
|
|
this.loading = true |
|
|
|
listQualification(this.queryParams).then(response => { |
|
|
|
@ -552,7 +556,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** 获取证书状态标签 */ |
|
|
|
// 获取证书状态标签 |
|
|
|
getCertStatusLabel(status) { |
|
|
|
const map = { |
|
|
|
'0': '正常', |
|
|
|
@ -562,7 +566,7 @@ export default { |
|
|
|
return map[status] || status || '-' |
|
|
|
}, |
|
|
|
|
|
|
|
/** 获取证书状态标签类型 */ |
|
|
|
// 获取证书状态标签类型 |
|
|
|
getCertStatusType(status) { |
|
|
|
const map = { |
|
|
|
'0': 'success', |
|
|
|
@ -572,7 +576,7 @@ export default { |
|
|
|
return map[status] || 'info' |
|
|
|
}, |
|
|
|
|
|
|
|
/** 获取审核状态标签类型 */ |
|
|
|
// 获取审核状态标签类型 |
|
|
|
getAuditStatusType(status) { |
|
|
|
const map = { |
|
|
|
'0': 'info', // 待审核 - 蓝色 |
|
|
|
@ -583,7 +587,7 @@ export default { |
|
|
|
return map[status] || 'info' |
|
|
|
}, |
|
|
|
|
|
|
|
/** 格式化资质类型显示 */ |
|
|
|
// 格式化资质类型显示 |
|
|
|
formatQualificationType(status) { |
|
|
|
const map = { |
|
|
|
'1': '执业兽医师', |
|
|
|
@ -594,11 +598,12 @@ export default { |
|
|
|
return map[status] || 'info' |
|
|
|
}, |
|
|
|
|
|
|
|
/** 获取完整的图片URL */ |
|
|
|
// 获取完整的图片URL |
|
|
|
getImageUrl(filePath) { |
|
|
|
return `${this.baseUrl}${filePath}` |
|
|
|
}, |
|
|
|
|
|
|
|
// 判断是否为图片文件 |
|
|
|
isImageFile(filePath) { |
|
|
|
if (!filePath) return false; |
|
|
|
const imageExts = ['.png','.jpg','.jpeg']; |
|
|
|
@ -606,20 +611,20 @@ export default { |
|
|
|
return imageExts.includes(ext); |
|
|
|
}, |
|
|
|
|
|
|
|
/** 判断是否为PDF文件 */ |
|
|
|
// 判断是否为PDF文件 |
|
|
|
isPdfFile(filePath) { |
|
|
|
if (!filePath) return false; |
|
|
|
const ext = filePath.substring(filePath.lastIndexOf('.')).toLowerCase(); |
|
|
|
return ext === '.pdf'; |
|
|
|
}, |
|
|
|
|
|
|
|
/** 预览图片 */ |
|
|
|
// 预览图片 |
|
|
|
previewCertificate(filePath) { |
|
|
|
this.previewFileUrl = filePath; |
|
|
|
this.previewDialogVisible = true; |
|
|
|
}, |
|
|
|
|
|
|
|
/** 下载文件 */ |
|
|
|
// 下载文件 |
|
|
|
downloadFile(filePath) { |
|
|
|
const fullUrl = this.getImageUrl(filePath); |
|
|
|
const link = document.createElement('a'); |
|
|
|
@ -726,7 +731,7 @@ export default { |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
|
|
|
|
/** 重新提交审核 */ |
|
|
|
// 重新提交审核 |
|
|
|
resubmitForm() { |
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
@ -854,14 +859,14 @@ export default { |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
|
|
|
|
/** 资质证书详情 */ |
|
|
|
// 资质证书详情 |
|
|
|
handleView(row) { |
|
|
|
this.openDetail = true |
|
|
|
this.detailData = row |
|
|
|
this.title = "资质证书详情" |
|
|
|
this.certificateList = [] |
|
|
|
this.detailLoading = true |
|
|
|
getQualificationCertificates(row.qualificationId).then(response => { |
|
|
|
listQualificationCertificates(row.qualificationId).then(response => { |
|
|
|
this.detailLoading = false |
|
|
|
if (response.code === 200) { |
|
|
|
this.certificateList = response.rows || []; |
|
|
|
@ -912,13 +917,13 @@ export default { |
|
|
|
this.resetForm("form") |
|
|
|
}, |
|
|
|
|
|
|
|
/** 搜索按钮操作 */ |
|
|
|
// 搜索按钮操作 |
|
|
|
handleQuery() { |
|
|
|
this.queryParams.pageNum = 1 |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
|
|
|
|
/** 重置按钮操作 */ |
|
|
|
// 重置按钮操作 |
|
|
|
resetQuery() { |
|
|
|
this.resetForm("queryForm") |
|
|
|
this.handleQuery() |
|
|
|
@ -931,7 +936,7 @@ export default { |
|
|
|
this.multiple = !selection.length |
|
|
|
}, |
|
|
|
|
|
|
|
/** 新增按钮操作 */ |
|
|
|
// 新增按钮操作 |
|
|
|
handleAdd() { |
|
|
|
this.reset() |
|
|
|
this.open = true |
|
|
|
@ -939,7 +944,7 @@ export default { |
|
|
|
this.form.auditStatus = null |
|
|
|
}, |
|
|
|
|
|
|
|
/** 修改按钮操作 */ |
|
|
|
// 修改按钮操作 |
|
|
|
handleUpdate(row) { |
|
|
|
this.reset() |
|
|
|
let certId = row.certId || row.certificateId || row.id |
|
|
|
@ -989,7 +994,7 @@ export default { |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
|
|
|
|
/** 删除按钮操作 */ |
|
|
|
// 删除按钮操作 |
|
|
|
handleDelete(row) { |
|
|
|
const qualificationIds = row.qualificationId || this.ids |
|
|
|
this.$modal.confirm('是否确认删除兽医资质编号为"' + qualificationIds + '"的数据项?').then(function() { |
|
|
|
@ -1000,14 +1005,14 @@ export default { |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
|
|
|
|
/** 导出按钮操作 */ |
|
|
|
handleExport() { |
|
|
|
this.download('vet/qualification/export', { |
|
|
|
...this.queryParams |
|
|
|
}, `qualification_${new Date().getTime()}.xlsx`) |
|
|
|
}, |
|
|
|
// 导出按钮操作 |
|
|
|
// handleExport() { |
|
|
|
// this.download('vet/qualification/export', { |
|
|
|
// ...this.queryParams |
|
|
|
// }, `qualification_${new Date().getTime()}.xlsx`) |
|
|
|
// }, |
|
|
|
|
|
|
|
/** 根据字典值获取标签 */ |
|
|
|
// 根据字典值获取标签 |
|
|
|
getDictLabel(dictType, value) { |
|
|
|
const dict = this.dict.type[dictType] |
|
|
|
if (dict && value) { |
|
|
|
@ -1021,7 +1026,7 @@ export default { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style scoped> |
|
|
|
/* 操作按钮样式优化 */ |
|
|
|
/* 操作按钮样式 */ |
|
|
|
.el-button--text { |
|
|
|
padding: 6px 10px; |
|
|
|
margin: 0 2px; |
|
|
|
@ -1046,4 +1051,22 @@ export default { |
|
|
|
::v-deep .qualification-detail-dialog table tr:last-child td { |
|
|
|
border-bottom: none; |
|
|
|
} |
|
|
|
|
|
|
|
/* 操作按钮 */ |
|
|
|
.info-btn { |
|
|
|
padding: 6px 10px; |
|
|
|
border-radius: 4px; |
|
|
|
margin: 0 10px; |
|
|
|
transition: all 0.3s ease; |
|
|
|
} |
|
|
|
|
|
|
|
.view-btn:hover { |
|
|
|
background-color: rgb(216, 238, 248); |
|
|
|
transform: translateY(-1px); |
|
|
|
} |
|
|
|
|
|
|
|
.alter-btn:hover{ |
|
|
|
background-color: rgb(230, 255, 238); |
|
|
|
transform: translateY(-1px); |
|
|
|
} |
|
|
|
</style> |