|
|
@ -14,24 +14,8 @@ |
|
|
:value="dict.value" /> |
|
|
:value="dict.value" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- <el-form-item label="资质类型" prop="qualificationType">--> |
|
|
|
|
|
<!-- <el-input--> |
|
|
|
|
|
<!-- v-model="queryParams.qualificationType"--> |
|
|
|
|
|
<!-- placeholder="请输入资质类型"--> |
|
|
|
|
|
<!-- clearable--> |
|
|
|
|
|
<!-- @keyup.enter.native="handleQuery"--> |
|
|
|
|
|
<!-- />--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- <el-form-item label="证书编号" prop="certificateNo">--> |
|
|
|
|
|
<!-- <el-input--> |
|
|
|
|
|
<!-- v-model="queryParams.certificateNo"--> |
|
|
|
|
|
<!-- placeholder="请输入证书编号"--> |
|
|
|
|
|
<!-- clearable--> |
|
|
|
|
|
<!-- @keyup.enter.native="handleQuery"--> |
|
|
|
|
|
<!-- />--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<el-form-item label="审核状态" prop="auditStatus"> |
|
|
<el-form-item label="审核状态" prop="auditStatus"> |
|
|
<el-select v-model="queryParams.auditStatus" placeholder="审核状态" clearable> |
|
|
|
|
|
|
|
|
<el-select v-model="queryParams.auditStatus" placeholder="审核状态" clearable style="width: 100px"> |
|
|
<el-option v-for="dict in dict.type.qualification_shenhe" :key="dict.value" :label="dict.label" |
|
|
<el-option v-for="dict in dict.type.qualification_shenhe" :key="dict.value" :label="dict.label" |
|
|
:value="dict.value" /> |
|
|
:value="dict.value" /> |
|
|
</el-select> |
|
|
</el-select> |
|
|
@ -43,16 +27,135 @@ |
|
|
</el-form> |
|
|
</el-form> |
|
|
|
|
|
|
|
|
<!-- 表格 --> |
|
|
<!-- 表格 --> |
|
|
<el-table v-loading="loading" :data="qualificationList" border style="width: 100%"> |
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="qualificationList" @selection-change="handleSelectionChange"> |
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
<el-table-column prop="certName" label="证书名称" align="center" width="150" :show-overflow-tooltip="true"/> |
|
|
|
|
|
<el-table-column prop="certificateNo" label="证书编号" align="center" width="150" :show-overflow-tooltip="true"/> |
|
|
|
|
|
<el-table-column label="发证机构" align="center" prop="issueOrg" width="150" :show-overflow-tooltip="true" /> |
|
|
|
|
|
<el-table-column label="资质类型" align="center" prop="issueOrg" width="150" :show-overflow-tooltip="true" > |
|
|
|
|
|
|
|
|
<el-table-column label="真实姓名" align="center" prop="realName" :show-overflow-tooltip="true"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.realName">{{ scope.row.realName }}</span> |
|
|
|
|
|
<span v-else style="color: #909399">-</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="身份证号" align="center" prop="idCard"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.idCard">{{ scope.row.idCard }}</span> |
|
|
|
|
|
<span v-else style="color: #909399">-</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="资质类型" align="center" prop="qualificationType"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<dict-tag :options="dict.type.qualification_type" :value="scope.row.qualificationType" /> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column label="经营范围" align="center" prop="scopeIds" width="200"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<dict-tag style="display: grid; grid-template-columns: 1fr 1fr; row-gap: 10px;" :options="dict.type.scope_names" |
|
|
|
|
|
:value="scope.row.scopeIds" /> |
|
|
|
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<el-table-column label="申请时间" align="center" prop="applyTime"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.applyTime">{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span> |
|
|
|
|
|
<span v-else style="color: #909399">-</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="审核时间" align="center" prop="auditTime"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.auditTime">{{ parseTime(scope.row.auditTime, '{y}-{m}-{d}') }}</span> |
|
|
|
|
|
<span v-else style="color: #909399">-</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="审核状态" align="center" prop="auditStatus"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-tag :type="getAuditStatusType(scope.row.auditStatus)" size="small"> |
|
|
|
|
|
{{ getDictLabel('qualification_shenhe', scope.row.auditStatus) }} |
|
|
|
|
|
</el-tag> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="备注" align="center" prop="remark" :show-overflow-tooltip="true" /> |
|
|
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="300"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-button size="mini" type="text" icon="el-icon-view" @click="handleView(scope.row)" |
|
|
|
|
|
v-hasPermi="['vet:qualification:query']" class="info-btn view-btn">资质详情</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
|
|
<div class="pagestyle"> |
|
|
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" |
|
|
|
|
|
@pagination="getList" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 显示资质证书信息弹窗 --> |
|
|
|
|
|
<el-dialog :title="title" :visible.sync="openDetail" width="80%" append-to-body> |
|
|
|
|
|
<div v-if="detailData" style="padding: 20px;"> |
|
|
|
|
|
<!-- 显示实名信息摘要 --> |
|
|
|
|
|
<el-card class="auth-info-card" style="margin-bottom: 20px; background-color: #f0f9eb;" v-if="authInfo"> |
|
|
|
|
|
<div slot="header" class="clearfix"> |
|
|
|
|
|
<span><i class="el-icon-success" style="color: #67C23A;"></i> 实名认证信息</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="auth-info-content"> |
|
|
|
|
|
<el-row :gutter="20"> |
|
|
|
|
|
<el-col :span="8"> |
|
|
|
|
|
<span class="auth-label">真实姓名:</span> |
|
|
|
|
|
<span class="auth-value">{{ detailData.realName || '-' }}</span> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="16"> |
|
|
|
|
|
<span class="auth-label">身份证号:</span> |
|
|
|
|
|
<span class="auth-value">{{ detailData.idCard || '-' }}</span> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-card> |
|
|
|
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
<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-row> |
|
|
|
|
|
<el-alert v-if="!certificateList || certificateList.length === 0" title="暂无资质证书" type="info" :closable="false" |
|
|
|
|
|
style="margin-bottom: 20px;" /> |
|
|
|
|
|
<el-table v-else :data="certificateList" border style="width: 100%"> |
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
|
|
|
<el-table-column prop="certificateNo" label="证书编号" align="center" width="150" :show-overflow-tooltip="true"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span>{{ scope.row.certificateNo }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="certName" label="证书名称" align="center" width="150" :show-overflow-tooltip="true"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span>{{ scope.row.certName }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="发证机构" align="center" prop="issueOrg" width="150" :show-overflow-tooltip="true"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.issueOrg">{{ scope.row.issueOrg }}</span> |
|
|
|
|
|
<span v-else style="color: #909399">-</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column label="证书文件" prop="certificateFiles" align="center" width="100"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.certificateFiles"> |
|
|
|
|
|
<template v-if="isImageFile(scope.row.certificateFiles)"> |
|
|
|
|
|
<el-button type="text" icon="el-icon-view" @click="previewCertificate(scope.row.certificateFiles)" |
|
|
|
|
|
style="color: #409EFF;font-size: 20px"> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template v-else-if="isPdfFile(scope.row.certificateFiles)"> |
|
|
|
|
|
<el-button type="text" icon="el-icon-download" @click="downloadFile(scope.row.certificateFiles)" |
|
|
|
|
|
style="color: #287c07;font-size: 20px"> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
<template v-else> |
|
|
|
|
|
{{ getImageUrl(scope.row.certificateFiles) }} |
|
|
|
|
|
</template> |
|
|
|
|
|
</span> |
|
|
|
|
|
<span v-else style="color: #909399">-</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column prop="issueDate" label="发证日期" align="center" width="150"> |
|
|
<el-table-column prop="issueDate" label="发证日期" align="center" width="150"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span>{{ parseTime(scope.row.issueDate, '{y}-{m}-{d}') }}</span> |
|
|
<span>{{ parseTime(scope.row.issueDate, '{y}-{m}-{d}') }}</span> |
|
|
@ -72,53 +175,62 @@ |
|
|
</el-table-column> |
|
|
</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="300"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-button v-if="!detailData.auditStatus || detailData.auditStatus === '0' || detailData.auditStatus === '2'" |
|
|
|
|
|
|
|
|
<el-button |
|
|
|
|
|
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)" |
|
|
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> |
|
|
v-hasPermi="['vet:qualification:edit']" class="info-btn alter-btn">修改</el-button> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
|
|
|
|
|
|
<div class="pagestyle"> |
|
|
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" |
|
|
|
|
|
@pagination="getList" /> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button @click="closeDetail">关 闭</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 图片预览弹窗 --> |
|
|
<!-- 图片预览弹窗 --> |
|
|
<el-dialog :visible.sync="previewDialogVisible" width="80%" append-to-body> |
|
|
<el-dialog :visible.sync="previewDialogVisible" width="80%" append-to-body> |
|
|
<div style="text-align: center; padding: 20px;"> |
|
|
<div style="text-align: center; padding: 20px;"> |
|
|
<img :src="getImageUrl(previewFileUrl)" style="max-width: 100%; max-height: 70vh; height: auto;" preview-teleported |
|
|
|
|
|
:preview-src-list="[getImageUrl(previewFileUrl)]" /> |
|
|
|
|
|
|
|
|
<img :src="getImageUrl(previewFileUrl)" style="max-width: 100%; max-height: 70vh; height: auto;" |
|
|
|
|
|
preview-teleported :preview-src-list="[getImageUrl(previewFileUrl)]" /> |
|
|
</div> |
|
|
</div> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button @click="closeimage">关 闭</el-button> |
|
|
<el-button @click="closeimage">关 闭</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<!-- 添加或修改兽医资质弹窗--> |
|
|
|
|
|
|
|
|
<!-- 添加或修改兽医资质弹窗 --> |
|
|
<el-dialog :title="title" :visible.sync="open" width="80%" append-to-body> |
|
|
<el-dialog :title="title" :visible.sync="open" width="80%" append-to-body> |
|
|
|
|
|
<!-- 实名认证提示 --> |
|
|
|
|
|
<el-alert v-if="authInfo" type="success" :closable="false" show-icon style="margin-bottom: 20px;"> |
|
|
|
|
|
<span>已通过实名认证,姓名和身份证已自动填充并锁定</span> |
|
|
|
|
|
</el-alert> |
|
|
|
|
|
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
|
<!-- <el-form-item label="真实姓名" prop="realName">--> |
|
|
|
|
|
<!-- <el-input v-model="form.realName" placeholder="请输入真实姓名" />--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- <el-form-item label="身份证号" prop="idCard">--> |
|
|
|
|
|
<!-- <el-input v-model="form.idCard" placeholder="请输入身份证号" />--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- <el-form-item label="资质类型" prop="qualificationType">--> |
|
|
|
|
|
<!-- <el-select--> |
|
|
|
|
|
<!-- v-model="form.qualificationType"--> |
|
|
|
|
|
<!-- placeholder="请选择资质类型"--> |
|
|
|
|
|
<!-- style="width: 100%;"--> |
|
|
|
|
|
<!-- >--> |
|
|
|
|
|
<!-- <el-option--> |
|
|
|
|
|
<!-- v-for="dict in dict.type.qualification_type"--> |
|
|
|
|
|
<!-- :key="dict.value"--> |
|
|
|
|
|
<!-- :label="dict.label"--> |
|
|
|
|
|
<!-- :value="dict.value"--> |
|
|
|
|
|
<!-- />--> |
|
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
|
|
|
<!-- 真实姓名 - 根据实名认证状态决定是否只读 --> |
|
|
|
|
|
<el-form-item label="真实姓名" prop="realName"> |
|
|
|
|
|
<el-input v-model="form.realName" placeholder="请输入真实姓名" :readonly="realNameReadOnly" |
|
|
|
|
|
:disabled="realNameReadOnly"> |
|
|
|
|
|
<template v-if="realNameReadOnly" slot="suffix"> |
|
|
|
|
|
<el-tooltip content="已通过实名认证" placement="top"> |
|
|
|
|
|
<i class="el-icon-success" style="color: #67C23A; line-height: 32px;"></i> |
|
|
|
|
|
</el-tooltip> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 身份证号 - 根据实名认证状态决定是否只读 --> |
|
|
|
|
|
<el-form-item label="身份证号" prop="idCard"> |
|
|
|
|
|
<el-input v-model="form.idCard" placeholder="请输入身份证号" :readonly="idCardReadOnly" :disabled="idCardReadOnly"> |
|
|
|
|
|
<template v-if="idCardReadOnly" slot="suffix"> |
|
|
|
|
|
<el-tooltip content="已通过实名认证" placement="top"> |
|
|
|
|
|
<i class="el-icon-success" style="color: #67C23A; line-height: 32px;"></i> |
|
|
|
|
|
</el-tooltip> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
<el-form-item label="证书编号" prop="certificateNo"> |
|
|
<el-form-item label="证书编号" prop="certificateNo"> |
|
|
<el-input v-model="form.certificateNo" placeholder="请输入证书编号" /> |
|
|
<el-input v-model="form.certificateNo" placeholder="请输入证书编号" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
@ -138,34 +250,34 @@ |
|
|
style="width: 100%"> |
|
|
style="width: 100%"> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- <el-form-item label="证书图片" prop="certImage">--> |
|
|
|
|
|
<!-- <image-upload v-model="form.certImage"/>--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<el-form-item label="证书文件" prop="certificateFiles"> |
|
|
<el-form-item label="证书文件" prop="certificateFiles"> |
|
|
<!--<!– <el-input v-model="form.certificateFiles" type="textarea" placeholder="请输入内容" />–>--> |
|
|
|
|
|
<file-upload v-model="form.certificateFiles" :limit="1" :file-type="['pdf', 'png', 'jpg', 'jpeg']" /> |
|
|
<file-upload v-model="form.certificateFiles" :limit="1" :file-type="['pdf', 'png', 'jpg', 'jpeg']" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
<!-- <el-form-item label="提前提醒天数" prop="remindDays">--> |
|
|
|
|
|
<!-- <el-input v-model="form.remindDays" placeholder="请输入提前提醒天数" />--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
<!-- <el-form-item label="备注" prop="remark">--> |
|
|
|
|
|
<!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入备注" />--> |
|
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<div slot="footer" class="dialog-footer"> |
|
|
<el-button type="primary" @click="resubmitForm">重新提交审核</el-button> |
|
|
|
|
|
|
|
|
<!-- 新增模式显示"提交审核",修改模式显示"重新提交审核" --> |
|
|
|
|
|
<el-button type="primary" @click="submitForm">{{ isAddMode ? '提交审核' : '重新提交审核' }}</el-button> |
|
|
<el-button @click="cancel">取 消</el-button> |
|
|
<el-button @click="cancel">取 消</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
</div> |
|
|
|
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
import { listQualification, getQualificationCertificate, delQualification, getQualificationCertificates, updateAndSubmitQualification, listQualificationCertificates } from "@/api/vet/qualification" |
|
|
|
|
|
|
|
|
import { |
|
|
|
|
|
listQualification, |
|
|
|
|
|
getQualificationCertificate, |
|
|
|
|
|
delQualification, |
|
|
|
|
|
getQualificationCertificates, |
|
|
|
|
|
updateAndSubmitQualification, |
|
|
|
|
|
listQualificationCertificates, |
|
|
|
|
|
addqualification |
|
|
|
|
|
} from "@/api/vet/qualification" |
|
|
|
|
|
import { getUserInfo } from "@/api/system/user" |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: "Qualification", |
|
|
name: "Qualification", |
|
|
dicts: ['qualification_shenhe', 'expert_type', 'qualification_type'], |
|
|
|
|
|
|
|
|
dicts: ['qualification_shenhe', 'expert_type', 'qualification_type', 'scope_names'], |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
baseUrl: process.env.VUE_APP_BASE_API, |
|
|
baseUrl: process.env.VUE_APP_BASE_API, |
|
|
@ -196,6 +308,18 @@ export default { |
|
|
open: false, |
|
|
open: false, |
|
|
openDetail: false, |
|
|
openDetail: false, |
|
|
previewDialogVisible: false, |
|
|
previewDialogVisible: false, |
|
|
|
|
|
|
|
|
|
|
|
// ========== 实名认证相关字段 ========== |
|
|
|
|
|
// 实名认证信息 |
|
|
|
|
|
authInfo: null, |
|
|
|
|
|
// 控制姓名和身份证是否只读 |
|
|
|
|
|
realNameReadOnly: false, |
|
|
|
|
|
idCardReadOnly: false, |
|
|
|
|
|
// 是否已获取过实名信息 |
|
|
|
|
|
authInfoFetched: false, |
|
|
|
|
|
// 是否为新增模式(用于区分提交接口) |
|
|
|
|
|
isAddMode: true, |
|
|
|
|
|
|
|
|
// 查询参数 |
|
|
// 查询参数 |
|
|
queryParams: { |
|
|
queryParams: { |
|
|
pageNum: 1, |
|
|
pageNum: 1, |
|
|
@ -212,17 +336,8 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// 表单参数 |
|
|
// 表单参数 |
|
|
form: {}, |
|
|
form: {}, |
|
|
// 表单校验 |
|
|
|
|
|
|
|
|
// 表单校验 - 移除姓名和身份证的必填验证 |
|
|
rules: { |
|
|
rules: { |
|
|
// realName: [ |
|
|
|
|
|
// { required: true, message: "真实姓名不能为空", trigger: "blur" } |
|
|
|
|
|
// ], |
|
|
|
|
|
// idCard: [ |
|
|
|
|
|
// { required: true, message: "身份证号不能为空", trigger: "blur" } |
|
|
|
|
|
// ], |
|
|
|
|
|
// qualificationType: [ |
|
|
|
|
|
// { required: true, message: "资质类型不能为空", trigger: "change" } |
|
|
|
|
|
// ], |
|
|
|
|
|
certificateNo: [ |
|
|
certificateNo: [ |
|
|
{ required: true, message: "证书编号不能为空", trigger: "blur" } |
|
|
{ required: true, message: "证书编号不能为空", trigger: "blur" } |
|
|
], |
|
|
], |
|
|
@ -244,16 +359,77 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
created() { |
|
|
created() { |
|
|
this.getList() |
|
|
this.getList() |
|
|
|
|
|
this.getUserAuthInfo() // 获取用户实名信息 |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// ========== 添加 watch 监听弹窗打开状态 ========== |
|
|
|
|
|
watch: { |
|
|
|
|
|
open(val) { |
|
|
|
|
|
if (val) { |
|
|
|
|
|
// 弹窗打开时,确保表单有实名信息 |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.fillAuthInfoToForm() |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
// ========== 获取用户实名认证信息 ========== |
|
|
|
|
|
async getUserAuthInfo() { |
|
|
|
|
|
if (this.authInfoFetched) return // 如果已获取过,不再重复获取 |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
|
const res = await getUserInfo() |
|
|
|
|
|
|
|
|
|
|
|
if (res.code === 200) { |
|
|
|
|
|
const userInfo = res.data |
|
|
|
|
|
|
|
|
|
|
|
console.log(1111,userInfo); |
|
|
|
|
|
|
|
|
|
|
|
// 如果已实名认证,保存信息 |
|
|
|
|
|
if (userInfo.authStatus === '已认证') { |
|
|
|
|
|
this.authInfo = userInfo |
|
|
|
|
|
this.realNameReadOnly = true |
|
|
|
|
|
this.idCardReadOnly = true |
|
|
|
|
|
this.authInfoFetched = true |
|
|
|
|
|
|
|
|
|
|
|
console.log('已获取实名认证信息:', this.authInfo) |
|
|
|
|
|
|
|
|
|
|
|
// 如果当前弹窗是打开的,立即填充 |
|
|
|
|
|
if (this.open) { |
|
|
|
|
|
this.fillAuthInfoToForm() |
|
|
|
|
|
} |
|
|
|
|
|
} else if (userInfo.authStatus === '未认证') { |
|
|
|
|
|
console.log('用户未完成实名认证') |
|
|
|
|
|
this.authInfoFetched = true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.error('获取用户实名信息失败:', error) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// ========== 填充实名信息到表单 ========== |
|
|
|
|
|
fillAuthInfoToForm() { |
|
|
|
|
|
if (this.authInfo) { |
|
|
|
|
|
console.log(4444,this.authInfo); |
|
|
|
|
|
// 使用 Vue.set 或直接赋值,确保响应式 |
|
|
|
|
|
this.$set(this.form, 'realName', this.authInfo.realName) |
|
|
|
|
|
this.$set(this.form, 'idCard', this.authInfo.idCard) |
|
|
|
|
|
|
|
|
|
|
|
console.log('已填充实名信息到表单:', this.form.realName, this.form.idCard) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 查询兽医资质列表 |
|
|
// 查询兽医资质列表 |
|
|
getList() { |
|
|
getList() { |
|
|
this.loading = true |
|
|
this.loading = true |
|
|
listQualification(this.queryParams).then(response => { |
|
|
listQualification(this.queryParams).then(response => { |
|
|
this.qualificationList = response.rows[0].certificates |
|
|
|
|
|
console.log(2222, this.qualificationList); |
|
|
|
|
|
|
|
|
this.qualificationList = response.rows |
|
|
this.total = response.total |
|
|
this.total = response.total |
|
|
this.loading = false |
|
|
this.loading = false |
|
|
}) |
|
|
}) |
|
|
@ -282,21 +458,10 @@ export default { |
|
|
// 获取审核状态标签类型 |
|
|
// 获取审核状态标签类型 |
|
|
getAuditStatusType(status) { |
|
|
getAuditStatusType(status) { |
|
|
const map = { |
|
|
const map = { |
|
|
'0': 'info', // 待审核 - 蓝色 |
|
|
|
|
|
'1': 'success', // 已上架 - 绿色 |
|
|
|
|
|
'2': 'danger', // 已拒绝 - 红色 |
|
|
|
|
|
'3': 'warning' // 已下架 - 黄色 |
|
|
|
|
|
} |
|
|
|
|
|
return map[status] || 'info' |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 格式化资质类型显示 |
|
|
|
|
|
formatQualificationType(status) { |
|
|
|
|
|
const map = { |
|
|
|
|
|
'1': '执业兽医师', |
|
|
|
|
|
'2': '执业助理兽医', |
|
|
|
|
|
'3': '官方兽医', |
|
|
|
|
|
'4': '乡村兽医' |
|
|
|
|
|
|
|
|
'0': 'info', |
|
|
|
|
|
'1': 'success', |
|
|
|
|
|
'2': 'danger', |
|
|
|
|
|
'3': 'warning' |
|
|
} |
|
|
} |
|
|
return map[status] || 'info' |
|
|
return map[status] || 'info' |
|
|
}, |
|
|
}, |
|
|
@ -332,127 +497,68 @@ export default { |
|
|
const fullUrl = this.getImageUrl(filePath); |
|
|
const fullUrl = this.getImageUrl(filePath); |
|
|
const link = document.createElement('a'); |
|
|
const link = document.createElement('a'); |
|
|
link.href = fullUrl; |
|
|
link.href = fullUrl; |
|
|
|
|
|
|
|
|
const fileName = filePath.substring(filePath.lastIndexOf('/') + 1); |
|
|
const fileName = filePath.substring(filePath.lastIndexOf('/') + 1); |
|
|
link.download = fileName; |
|
|
link.download = fileName; |
|
|
|
|
|
|
|
|
document.body.appendChild(link); |
|
|
document.body.appendChild(link); |
|
|
link.click(); |
|
|
link.click(); |
|
|
document.body.removeChild(link); |
|
|
document.body.removeChild(link); |
|
|
this.$modal.msgSuccess('开始下载文件'); |
|
|
this.$modal.msgSuccess('开始下载文件'); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** 下架操作 */ |
|
|
|
|
|
// handleUnshelf(row) { |
|
|
|
|
|
// this.$prompt('请输入下架原因', '下架确认', { |
|
|
|
|
|
// confirmButtonText: '确定', |
|
|
|
|
|
// cancelButtonText: '取消', |
|
|
|
|
|
// inputPlaceholder: '请输入下架原因(如:证书过期、违规操作等)', |
|
|
|
|
|
// inputValidator: (value) => { |
|
|
|
|
|
// if (!value || value.trim().length < 2) { |
|
|
|
|
|
// return '下架原因不能少于2个字' |
|
|
|
|
|
// } |
|
|
|
|
|
// if (value.trim().length > 200) { |
|
|
|
|
|
// return '下架原因不能超过200字' |
|
|
|
|
|
// } |
|
|
|
|
|
// return true |
|
|
|
|
|
// } |
|
|
|
|
|
// }).then(({ value }) => { |
|
|
|
|
|
// this.loading = true |
|
|
|
|
|
// unshelfQualification(row.qualificationId, value).then(response => { |
|
|
|
|
|
// this.loading = false |
|
|
|
|
|
// if (response.code === 200) { |
|
|
|
|
|
// this.$modal.msgSuccess('下架成功') |
|
|
|
|
|
// this.getList() // 刷新列表 |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.$modal.msgError(response.msg || '下架失败') |
|
|
|
|
|
// } |
|
|
|
|
|
// }).catch(error => { |
|
|
|
|
|
// this.loading = false |
|
|
|
|
|
// this.$modal.msgError(error.msg || '下架失败') |
|
|
|
|
|
// }) |
|
|
|
|
|
// }).catch(() => { |
|
|
|
|
|
// // 用户取消操作 |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
/** 上架操作 */ |
|
|
|
|
|
// handleShelf(row) { |
|
|
|
|
|
// this.$confirm('确认要上架此资质吗?', '上架确认', { |
|
|
|
|
|
// confirmButtonText: '确定', |
|
|
|
|
|
// cancelButtonText: '取消', |
|
|
|
|
|
// type: 'warning' |
|
|
|
|
|
// }).then(() => { |
|
|
|
|
|
// this.loading = true |
|
|
|
|
|
// shelfQualification(row.qualificationId).then(response => { |
|
|
|
|
|
// this.loading = false |
|
|
|
|
|
// if (response.code === 200) { |
|
|
|
|
|
// this.$modal.msgSuccess('上架成功') |
|
|
|
|
|
// this.getList() // 刷新列表 |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.$modal.msgError(response.msg || '上架失败') |
|
|
|
|
|
// } |
|
|
|
|
|
// }).catch(error => { |
|
|
|
|
|
// this.loading = false |
|
|
|
|
|
// this.$modal.msgError(error.msg || '上架失败') |
|
|
|
|
|
// }) |
|
|
|
|
|
// }).catch(() => { |
|
|
|
|
|
// // 用户取消操作 |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
/** 提交审核操作 */ |
|
|
|
|
|
// handleSubmitAudit(row) { |
|
|
|
|
|
// this.$modal.confirm('确认提交 "' + row.realName + '" 的资质进行审核?').then(() => { |
|
|
|
|
|
// // 准备提交数据 |
|
|
|
|
|
// const submitData = { |
|
|
|
|
|
// qualificationId: row.qualificationId, |
|
|
|
|
|
// realName: row.realName, |
|
|
|
|
|
// idCard: row.idCard, |
|
|
|
|
|
// qualificationType: row.qualificationType, |
|
|
|
|
|
// certificateNo: row.certificateNo, |
|
|
|
|
|
// certName: row.certName, |
|
|
|
|
|
// issueOrg: row.issueOrg, |
|
|
|
|
|
// issueDate: row.issueDate, |
|
|
|
|
|
// expireDate: row.expireDate, |
|
|
|
|
|
// certImage: row.certImage, |
|
|
|
|
|
// certificateFiles: row.certificateFiles, |
|
|
|
|
|
// remark: row.remark, |
|
|
|
|
|
// // 提交审核时设置审核状态为待审核(0) |
|
|
|
|
|
// auditStatus: '0' |
|
|
|
|
|
// } |
|
|
|
|
|
// |
|
|
|
|
|
// return submitQualification(submitData) |
|
|
|
|
|
// }).then(response => { |
|
|
|
|
|
// if (response.code === 200) { |
|
|
|
|
|
// this.$modal.msgSuccess("提交审核成功") |
|
|
|
|
|
// this.getList() |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.$modal.msgError(response.msg || "提交审核失败") |
|
|
|
|
|
// } |
|
|
|
|
|
// }).catch(() => { |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
// 重新提交审核 |
|
|
|
|
|
resubmitForm() { |
|
|
|
|
|
|
|
|
// ========== 统一提交入口,根据 isAddMode 区分调用不同接口 ========== |
|
|
|
|
|
submitForm() { |
|
|
|
|
|
if (this.isAddMode) { |
|
|
|
|
|
this.handleAddSubmit() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.handleResubmit() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 新增提交 |
|
|
|
|
|
handleAddSubmit() { |
|
|
this.$refs["form"].validate(valid => { |
|
|
this.$refs["form"].validate(valid => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
|
let certId = this.form.certId || this.form.certificateId || this.form.id |
|
|
|
|
|
if (certId && typeof certId === 'object') { |
|
|
|
|
|
certId = certId.value || certId.id || certId.certificateId |
|
|
|
|
|
|
|
|
// 构建新增提交的数据 |
|
|
|
|
|
const submitData = { |
|
|
|
|
|
realName: this.form.realName || (this.authInfo ? this.authInfo.realName : null), |
|
|
|
|
|
idCard: this.form.idCard || (this.authInfo ? this.authInfo.idCard : null), |
|
|
|
|
|
certificateNo: this.form.certificateNo, |
|
|
|
|
|
certName: this.form.certName, |
|
|
|
|
|
issueOrg: this.form.issueOrg, |
|
|
|
|
|
issueDate: this.form.issueDate, |
|
|
|
|
|
expireDate: this.form.expireDate, |
|
|
|
|
|
certificateFiles: this.form.certificateFiles, |
|
|
|
|
|
remark: this.form.remark, |
|
|
|
|
|
// 新增时默认状态为待审核 |
|
|
|
|
|
auditStatus: '0' |
|
|
} |
|
|
} |
|
|
certId = String(certId || '') |
|
|
|
|
|
if (!certId || certId === 'null' || certId === 'undefined' || certId === 'NaN') { |
|
|
|
|
|
this.$modal.msgError("证书ID无效:" + certId) |
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
addqualification(submitData).then(response => { |
|
|
|
|
|
if (response.code === 200) { |
|
|
|
|
|
this.$modal.msgSuccess("提交审核成功") |
|
|
|
|
|
this.open = false |
|
|
|
|
|
this.getList() |
|
|
|
|
|
this.reset() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$modal.msgError(response.msg || "提交审核失败") |
|
|
} |
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error('提交审核失败:', error) |
|
|
|
|
|
this.$modal.msgError("提交审核失败,请稍后重试") |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 重新提交审核 - 调用 updateAndSubmitQualification 接口 |
|
|
|
|
|
handleResubmit() { |
|
|
|
|
|
this.$refs["form"].validate(valid => { |
|
|
|
|
|
if (valid) { |
|
|
const submitData = { |
|
|
const submitData = { |
|
|
certId: certId, |
|
|
|
|
|
|
|
|
certId: this.form.certId || this.form.certificateId || this.form.id, |
|
|
qualificationId: this.form.qualificationId, |
|
|
qualificationId: this.form.qualificationId, |
|
|
realName: this.form.realName, |
|
|
|
|
|
idCard: this.form.idCard, |
|
|
|
|
|
|
|
|
realName: this.form.realName || (this.authInfo ? this.authInfo.realName : null), |
|
|
|
|
|
idCard: this.form.idCard || (this.authInfo ? this.authInfo.idCard : null), |
|
|
qualificationType: this.form.qualificationType, |
|
|
qualificationType: this.form.qualificationType, |
|
|
certificateNo: this.form.certificateNo, |
|
|
certificateNo: this.form.certificateNo, |
|
|
certName: this.form.certName, |
|
|
certName: this.form.certName, |
|
|
@ -472,27 +578,11 @@ export default { |
|
|
this.open = false |
|
|
this.open = false |
|
|
this.getList() |
|
|
this.getList() |
|
|
|
|
|
|
|
|
|
|
|
// 刷新详情页的证书列表 |
|
|
if (this.openDetail && this.detailData && this.detailData.qualificationId) { |
|
|
if (this.openDetail && this.detailData && this.detailData.qualificationId) { |
|
|
getQualificationCertificates(this.detailData.qualificationId).then(response => { |
|
|
getQualificationCertificates(this.detailData.qualificationId).then(response => { |
|
|
if (response.code === 200) { |
|
|
if (response.code === 200) { |
|
|
this.certificateList = response.rows || []; |
|
|
this.certificateList = response.rows || []; |
|
|
const updatedCertificate = this.certificateList.find(cert => |
|
|
|
|
|
cert.certificateId === certId || cert.certId === certId |
|
|
|
|
|
); |
|
|
|
|
|
if (updatedCertificate) { |
|
|
|
|
|
this.certificateList = this.certificateList.map(cert => { |
|
|
|
|
|
if (cert.certificateId === certId || cert.certId === certId) { |
|
|
|
|
|
return { |
|
|
|
|
|
...cert, |
|
|
|
|
|
auditStatus: '0', |
|
|
|
|
|
applyTime: new Date().toISOString(), |
|
|
|
|
|
auditTime: null, |
|
|
|
|
|
auditOpinion: null |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
return cert; |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
@ -505,66 +595,17 @@ export default { |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** 查看详情 */ |
|
|
|
|
|
// handleView(row) { |
|
|
|
|
|
// // 构建详情内容 |
|
|
|
|
|
// let detailContent = ` |
|
|
|
|
|
// <table style="width:100%; border-collapse: collapse;"> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">姓名:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.realName || '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">身份证:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.idCard || '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">证书编号:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.certificateNo || '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">证书名称:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.certName || '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">发证机构:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.issueOrg || '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">到期日期:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.expireDate ? this.parseTime(row.expireDate, '{y}-{m}-{d}') : '-'}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">证书状态:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${this.getCertStatusLabel(row.certStatus)}</td> |
|
|
|
|
|
// </tr> |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">审核状态:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${this.getDictLabel('qualification_shenhe', row.auditStatus) || '-'}</td> |
|
|
|
|
|
// </tr>` |
|
|
|
|
|
// |
|
|
|
|
|
// // 如果有审核意见,添加审核意见 |
|
|
|
|
|
// if (row.auditOpinion) { |
|
|
|
|
|
// detailContent += ` |
|
|
|
|
|
// <tr> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee; color: #666;">审核意见:</td> |
|
|
|
|
|
// <td style="padding:8px 5px; border-bottom: 1px solid #eee;">${row.auditOpinion}</td> |
|
|
|
|
|
// </tr>` |
|
|
|
|
|
// } |
|
|
|
|
|
// |
|
|
|
|
|
// detailContent += `</table>` |
|
|
|
|
|
// |
|
|
|
|
|
// this.$alert(detailContent, '资质详情', { |
|
|
|
|
|
// dangerouslyUseHTMLString: true, |
|
|
|
|
|
// confirmButtonText: '关闭', |
|
|
|
|
|
// width: '550px', |
|
|
|
|
|
// customClass: 'qualification-detail-dialog' |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
/** 新增按钮操作 */ |
|
|
|
|
|
handleAdd() { |
|
|
|
|
|
this.reset() |
|
|
|
|
|
this.open = true |
|
|
|
|
|
this.isAddMode = true // 设置为新增模式 |
|
|
|
|
|
this.title = "添加资质信息" |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 资质证书详情 |
|
|
// 资质证书详情 |
|
|
handleView(row) { |
|
|
handleView(row) { |
|
|
console.log(1111, row); |
|
|
|
|
|
|
|
|
console.log(22323232322, row); |
|
|
this.openDetail = true |
|
|
this.openDetail = true |
|
|
this.detailData = row |
|
|
this.detailData = row |
|
|
this.title = "资质证书详情" |
|
|
this.title = "资质证书详情" |
|
|
@ -574,6 +615,7 @@ export default { |
|
|
this.detailLoading = false |
|
|
this.detailLoading = false |
|
|
if (response.code === 200) { |
|
|
if (response.code === 200) { |
|
|
this.certificateList = response.rows || []; |
|
|
this.certificateList = response.rows || []; |
|
|
|
|
|
console.log(4444, this.certificateList); |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
@ -595,7 +637,7 @@ export default { |
|
|
this.previewDialogVisible = false |
|
|
this.previewDialogVisible = false |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 表单重置 |
|
|
|
|
|
|
|
|
// ========== 修改 reset 方法,保留实名信息 ========== |
|
|
reset() { |
|
|
reset() { |
|
|
this.form = { |
|
|
this.form = { |
|
|
qualificationId: null, |
|
|
qualificationId: null, |
|
|
@ -621,9 +663,20 @@ export default { |
|
|
remindDays: 30, |
|
|
remindDays: 30, |
|
|
lastRemindTime: null, |
|
|
lastRemindTime: null, |
|
|
scopeIds: null, |
|
|
scopeIds: null, |
|
|
scopeNames: null |
|
|
|
|
|
|
|
|
scopeNames: null, |
|
|
|
|
|
certId: null, |
|
|
|
|
|
certificateId: null, |
|
|
|
|
|
id: null |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.resetForm("form") |
|
|
this.resetForm("form") |
|
|
|
|
|
|
|
|
|
|
|
// 重置后如果有实名信息,重新填充 |
|
|
|
|
|
if (this.authInfo) { |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.fillAuthInfoToForm() |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 搜索按钮操作 |
|
|
// 搜索按钮操作 |
|
|
@ -645,64 +698,50 @@ export default { |
|
|
this.multiple = !selection.length |
|
|
this.multiple = !selection.length |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 新增按钮操作 |
|
|
|
|
|
handleAdd() { |
|
|
|
|
|
|
|
|
// ========== 修改 handleAdd 方法 ========== |
|
|
|
|
|
async handleAdd() { |
|
|
this.reset() |
|
|
this.reset() |
|
|
this.open = true |
|
|
this.open = true |
|
|
|
|
|
this.isAddMode = true // 设置为新增模式 |
|
|
this.title = "添加兽医资质" |
|
|
this.title = "添加兽医资质" |
|
|
this.form.auditStatus = null |
|
|
this.form.auditStatus = null |
|
|
|
|
|
|
|
|
|
|
|
// 如果还没有实名信息,等待获取 |
|
|
|
|
|
if (!this.authInfoFetched) { |
|
|
|
|
|
await this.getUserAuthInfo() |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 填充实名信息 |
|
|
|
|
|
this.fillAuthInfoToForm() |
|
|
|
|
|
|
|
|
|
|
|
if (this.authInfo) { |
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
|
this.$message.success('已自动填充实名信息') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 修改按钮操作 |
|
|
|
|
|
handleUpdate(row) { |
|
|
|
|
|
|
|
|
// ========== 修改 handleUpdate ========== |
|
|
|
|
|
async handleUpdate(row) { |
|
|
this.reset() |
|
|
this.reset() |
|
|
let certId = row.certId || row.certificateId || row.id |
|
|
|
|
|
if (certId && typeof certId === 'object') { |
|
|
|
|
|
certId = certId.value || certId.id || certId.certificateId |
|
|
|
|
|
} |
|
|
|
|
|
certId = String(certId || '') |
|
|
|
|
|
|
|
|
this.isAddMode = false // 设置为修改模式 |
|
|
|
|
|
|
|
|
if (!certId || certId === 'null' || certId === 'undefined' || certId === 'NaN') { |
|
|
|
|
|
this.$modal.msgError("证书ID无效:" + certId) |
|
|
|
|
|
return |
|
|
|
|
|
|
|
|
// 直接使用 row 数据填充表单 |
|
|
|
|
|
this.form = row |
|
|
|
|
|
console.log(111,this.form); |
|
|
|
|
|
|
|
|
|
|
|
// 如果还没有实名信息,等待获取 |
|
|
|
|
|
if (!this.authInfoFetched) { |
|
|
|
|
|
await this.getUserAuthInfo() |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
getQualificationCertificate(certId).then(response => { |
|
|
|
|
|
if (response.code === 200 && response.data) { |
|
|
|
|
|
this.form = response.data |
|
|
|
|
|
|
|
|
// 填充实名信息(如果表单中已有则覆盖) |
|
|
|
|
|
this.fillAuthInfoToForm() |
|
|
|
|
|
|
|
|
this.open = true |
|
|
this.open = true |
|
|
this.title = "修改兽医资质证书信息" |
|
|
this.title = "修改兽医资质证书信息" |
|
|
} else { |
|
|
|
|
|
this.$modal.msgError(response.msg || "获取证书信息失败") |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error('获取证书信息失败:', error) |
|
|
|
|
|
this.$modal.msgError("获取证书信息失败") |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
/** 提交按钮 */ |
|
|
|
|
|
// submitForm() { |
|
|
|
|
|
// this.$refs["form"].validate(valid => { |
|
|
|
|
|
// if (valid) { |
|
|
|
|
|
// if (this.form.qualificationId != null) { |
|
|
|
|
|
// updateQualification(this.form).then(response => { |
|
|
|
|
|
// this.$modal.msgSuccess("修改成功") |
|
|
|
|
|
// this.open = false |
|
|
|
|
|
// this.getList() |
|
|
|
|
|
// }) |
|
|
|
|
|
// } else { |
|
|
|
|
|
// this.form.auditStatus = null |
|
|
|
|
|
// addQualification(this.form).then(response => { |
|
|
|
|
|
// this.$modal.msgSuccess("新增成功") |
|
|
|
|
|
// this.open = false |
|
|
|
|
|
// this.getList() |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
// 删除按钮操作 |
|
|
// 删除按钮操作 |
|
|
handleDelete(row) { |
|
|
handleDelete(row) { |
|
|
const qualificationIds = row.qualificationId || this.ids |
|
|
const qualificationIds = row.qualificationId || this.ids |
|
|
@ -714,13 +753,6 @@ export default { |
|
|
}).catch(() => { }) |
|
|
}).catch(() => { }) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 导出按钮操作 |
|
|
|
|
|
// handleExport() { |
|
|
|
|
|
// this.download('vet/qualification/export', { |
|
|
|
|
|
// ...this.queryParams |
|
|
|
|
|
// }, `qualification_${new Date().getTime()}.xlsx`) |
|
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
// 根据字典值获取标签 |
|
|
// 根据字典值获取标签 |
|
|
getDictLabel(dictType, value) { |
|
|
getDictLabel(dictType, value) { |
|
|
const dict = this.dict.type[dictType] |
|
|
const dict = this.dict.type[dictType] |
|
|
@ -759,6 +791,35 @@ export default { |
|
|
background-color: #f8fafc; |
|
|
background-color: #f8fafc; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/* 实名信息卡片样式 */ |
|
|
|
|
|
.auth-info-card { |
|
|
|
|
|
border-radius: 8px; |
|
|
|
|
|
border-left: 4px solid #67C23A; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.auth-info-card .el-card__header { |
|
|
|
|
|
background-color: #f0f9eb; |
|
|
|
|
|
border-bottom: 1px solid #e1f3d8; |
|
|
|
|
|
padding: 12px 20px; |
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
color: #67C23A; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.auth-info-content { |
|
|
|
|
|
padding: 12px 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.auth-label { |
|
|
|
|
|
color: #606266; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.auth-value { |
|
|
|
|
|
color: #303133; |
|
|
|
|
|
font-weight: 500; |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/* 详情对话框样式 */ |
|
|
/* 详情对话框样式 */ |
|
|
::v-deep .qualification-detail-dialog .el-message-box__content { |
|
|
::v-deep .qualification-detail-dialog .el-message-box__content { |
|
|
max-height: 400px; |
|
|
max-height: 400px; |
|
|
|