Browse Source

兽医pc端优化

master
maotiantian 4 weeks ago
parent
commit
9612272031
  1. 2
      chenhai-admin/src/main/java/com/chenhai/ChenHaiApplication.java
  2. 31
      chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuUserController.java
  3. 2
      chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetKnowledgeController.java
  4. 510
      chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetUnifiedInfoController.java
  5. 186
      chenhai-system/src/main/java/com/chenhai/system/service/impl/SysMuhuUserServiceImpl.java
  6. 673
      chenhai-system/src/main/java/com/chenhai/vet/domain/dto/VetUnifiedInfoDTO.java
  7. 3
      chenhai-system/src/main/java/com/chenhai/vet/mapper/VetQualificationMapper.java
  8. 52
      chenhai-system/src/main/java/com/chenhai/vet/service/IVetUnifiedInfoService.java
  9. 1179
      chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetUnifiedInfoServiceImpl.java
  10. 8
      chenhai-ui/src/api/system/user.js
  11. 52
      chenhai-ui/src/views/syd.vue
  12. 638
      chenhai-ui/src/views/vet/qualification/index.vue

2
chenhai-admin/src/main/java/com/chenhai/ChenHaiApplication.java

@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
/**
* 启动程序
*
*
* @author chenhai
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })

31
chenhai-admin/src/main/java/com/chenhai/web/controller/muhu/MuhuUserController.java

@ -273,24 +273,29 @@ public class MuhuUserController extends BaseController
// 查询实名认证状态
Long userId = user.getUserId();
if (userId != null) {
// 方法1直接查询牧户用户表
// 直接查询牧户用户表
SysMuhuUser muhuUser = sysMuhuUserService.selectSysMuhuUserByUserId(userId);
if (muhuUser != null && muhuUser.getAuthStatus() != null) {
// 获取认证状态
String authStatus = muhuUser.getAuthStatus();
String statusLabel = DictUtils.getDictLabel("auth_status", authStatus, "未认证");
// 根据状态判断是否已认证
boolean isAuthenticated = "1".equals(authStatus); // 假设1表示已认证
result.put("authStatus", authStatus);
// 如果需要可以添加认证的详细信息
if (isAuthenticated) {
// 如果已认证返回完整的认证信息
if ("已认证".equals(authStatus)) {
Map<String, Object> authInfo = new HashMap<>();
authInfo.put("realName", muhuUser.getRealName());
authInfo.put("authTime", muhuUser.getAuthTime());
authInfo.put("realName", muhuUser.getRealName()); // 真实姓名
authInfo.put("idCard", muhuUser.getIdCard()); // 身份证号
authInfo.put("authTime", muhuUser.getAuthTime()); // 认证时间
// 身份证脱敏用于前端显示
if (muhuUser.getIdCard() != null && muhuUser.getIdCard().length() >= 15) {
String idCard = muhuUser.getIdCard();
String maskedIdCard = idCard.substring(0, 6) + "********" + idCard.substring(idCard.length() - 4);
authInfo.put("maskedIdCard", maskedIdCard);
}
result.put("authInfo", authInfo);
}
} else {
@ -298,25 +303,17 @@ public class MuhuUserController extends BaseController
result.put("authStatus", "未认证");
}
// ========== 新增查询兽医个人信息 ==========
// 判断用户类型如果是兽医01则查询兽医信息表
if ("01".equals(user.getUserType())) {
VetPersonalInfo vetInfo = vetPersonalInfoService.selectVetPersonalInfoByUserId(userId);
if (vetInfo != null) {
// 只提取需要的字段
Map<String, Object> vetData = new HashMap<>();
vetData.put("specialty", vetInfo.getSpecialty());
vetData.put("workExperience", vetInfo.getWorkExperience());
vetData.put("expertType", vetInfo.getExpertType());
// 可选如果需要其他兽医字段也可以添加
// vetData.put("title", vetInfo.getTitle());
// vetData.put("hospital", vetInfo.getHospital());
result.put("vetInfo", vetData);
}
}
// ========== 新增结束 ==========
} else {
result.put("authStatus", "未认证");

2
chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetKnowledgeController.java

@ -203,4 +203,4 @@ public class VetKnowledgeController extends BaseController
}
return error("文章不存在或未发布");
}
}
}

510
chenhai-admin/src/main/java/com/chenhai/web/controller/vet/VetUnifiedInfoController.java

@ -0,0 +1,510 @@
package com.chenhai.web.controller.vet;
import com.chenhai.common.annotation.Log;
import com.chenhai.common.core.controller.BaseController;
import com.chenhai.common.core.domain.AjaxResult;
import com.chenhai.common.core.domain.entity.SysRole;
import com.chenhai.common.core.domain.model.LoginUser;
import com.chenhai.common.core.page.TableDataInfo;
import com.chenhai.common.enums.BusinessType;
import com.chenhai.common.utils.SecurityUtils;
import com.chenhai.common.utils.StringUtils;
import com.chenhai.vet.domain.VetPersonalInfo;
import com.chenhai.vet.domain.dto.VetUnifiedInfoDTO;
import com.chenhai.vet.service.IVetPersonalInfoService;
import com.chenhai.vet.service.IVetUnifiedInfoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* 兽医统一信息Controller
* 整合PC端和小程序的所有接口
* 遵循RESTful API设计规范
*
* RESTful接口列表
* 1. GET /vet/unified/info - 获取当前用户完整信息
* 2. GET /vet/unified/{userId} - 获取指定用户信息
* 3. POST /vet/unified - 新增兽医信息
* 4. PUT /vet/unified - 全量更新兽医信息
* 5. PATCH /vet/unified/{userId} - 部分更新兽医信息
* 6. POST /vet/unified/submitAudit - 提交审核
* 7. GET /vet/unified/statistics - 获取统计信息
* 8. GET /vet/unified/checkNeed - 检查是否需要填写
* 9. GET /vet/unified/list - 分页查询列表管理员
* 10. POST /vet/unified/audit - 审核兽医信息管理员
*
* 已废弃接口保留向后兼容
* - GET /vet/unified/info/{userId} - 请使用 GET /vet/unified/{userId}
* - POST /vet/unified/save - 请根据情况使用 POST /vet/unified PUT /vet/unified/{userId}
*/
@RestController
@RequestMapping("/vet/unified")
public class VetUnifiedInfoController extends BaseController {
private static final Logger log = LoggerFactory.getLogger(VetUnifiedInfoController.class);
@Autowired
private IVetUnifiedInfoService vetUnifiedInfoService;
@Autowired
private IVetPersonalInfoService vetPersonalInfoService;
// ==================== 新RESTful接口 ====================
/**
* 获取当前登录用户的完整信息
* GET /vet/unified/info
*
* 替代/muhu/user/getUserInfo /vet/info/current
*/
@PreAuthorize("@ss.hasRole('muhu') or @ss.hasRole('vet')")
@GetMapping("/info")
public AjaxResult getCurrentUserInfo() {
try {
Long userId = SecurityUtils.getUserId();
if (userId == null) {
return error("用户未登录");
}
VetUnifiedInfoDTO unifiedInfo = vetUnifiedInfoService.getCurrentUserInfo();
return success(unifiedInfo);
} catch (Exception e) {
log.error("获取用户信息失败", e);
return error("获取用户信息失败: " + e.getMessage());
}
}
/**
* 根据用户ID获取信息RESTful风格
* GET /vet/unified/{userId}
*
* 替代/sys/vet/audit/full/{id} /vet/info/full/{id}
*/
@GetMapping("/{userId}")
@PreAuthorize("@ss.hasPermi('sys:vetAudit:view') or @ss.hasRole('muhu') or @ss.hasRole('vet') or @ss.hasRole('vetnotshenhe')")
public AjaxResult getUserInfo(@PathVariable Long userId) {
try {
// 权限验证非管理员只能查看自己的信息
Long currentUserId = SecurityUtils.getUserId();
if (!SecurityUtils.isAdmin(currentUserId) && !currentUserId.equals(userId)) {
return error("无权查看他人信息");
}
VetUnifiedInfoDTO unifiedInfo = vetUnifiedInfoService.getUserInfoByUserId(userId);
if (unifiedInfo == null) {
return error("用户信息不存在");
}
return success(unifiedInfo);
} catch (Exception e) {
log.error("获取用户信息失败", e);
return error("获取用户信息失败: " + e.getMessage());
}
}
/**
* 新增兽医信息
* POST /vet/unified
*
* 替代/vet/qualification/submit (新增部分) /vet/info/add
*/
@PreAuthorize("@ss.hasRole('muhu') or @ss.hasRole('vet') or @ss.hasRole('vetnotshenhe')")
@PostMapping
@Log(title = "兽医信息", businessType = BusinessType.INSERT)
public AjaxResult createVetInfo(@RequestBody VetUnifiedInfoDTO vetInfo) {
try {
Long userId = SecurityUtils.getUserId();
if (userId == null) {
return error("用户未登录");
}
// 检查是否已存在
VetPersonalInfo existing = vetPersonalInfoService.selectVetPersonalInfoByUserId(userId);
if (existing != null) {
return error("兽医信息已存在,请使用更新接口");
}
// 设置用户ID
vetInfo.setUserId(userId);
// 转换为Map调用service
Map<String, Object> requestData = convertDtoToMap(vetInfo);
VetUnifiedInfoDTO result = vetUnifiedInfoService.saveVetInfo(requestData);
return AjaxResult.success("创建成功", result);
} catch (Exception e) {
log.error("创建兽医信息失败", e);
return error("创建失败: " + e.getMessage());
}
}
/**
* 全量更新兽医信息
* PUT /vet/unified/{userId}
*
* 替代/vet/qualification/submit (修改部分) /vet/info/edit
*/
@PutMapping
@PreAuthorize("@ss.hasRole('muhu') or @ss.hasRole('vet') or @ss.hasRole('vetnotshenhe')")
@Log(title = "兽医信息", businessType = BusinessType.UPDATE)
public AjaxResult updateCurrentUserVetInfo(@RequestBody VetUnifiedInfoDTO vetInfo) {
try {
Long currentUserId = SecurityUtils.getUserId();
if (currentUserId == null) {
return error("用户未登录");
}
log.info("更新兽医信息 - userId: {}, data: {}", currentUserId, vetInfo);
// 检查记录是否存在
VetPersonalInfo existing = vetPersonalInfoService.selectVetPersonalInfoByUserId(currentUserId);
if (existing == null) {
return error("兽医信息不存在,请先创建");
}
// 设置用户ID
vetInfo.setUserId(currentUserId);
vetInfo.setPersonalInfoId(existing.getId());
// 转换为Map调用service
Map<String, Object> requestData = convertDtoToMap(vetInfo);
requestData.put("personalInfoId", existing.getId());
requestData.put("id", existing.getId());
// 调用保存方法
vetUnifiedInfoService.saveVetInfo(requestData);
// 重新查询最新数据
VetUnifiedInfoDTO result = vetUnifiedInfoService.getCurrentUserInfo();
log.info("更新成功 - userId: {}, result: {}", currentUserId, result);
return AjaxResult.success("更新成功", result);
} catch (Exception e) {
log.error("更新兽医信息失败", e);
return error("更新失败: " + e.getMessage());
}
}
/**
* 部分更新兽医信息
* PATCH /vet/unified/{userId}
* 支持只提交需要修改的字段
*/
@PatchMapping("/{userId}")
@PreAuthorize("@ss.hasRole('muhu') or @ss.hasRole('vet') or @ss.hasRole('vetnotshenhe')")
@Log(title = "兽医信息", businessType = BusinessType.UPDATE)
public AjaxResult partialUpdateVetInfo(@PathVariable Long userId, @RequestBody Map<String, Object> updates) {
try {
Long currentUserId = SecurityUtils.getUserId();
if (currentUserId == null) {
return error("用户未登录");
}
// 权限验证只能修改自己的信息
if (!currentUserId.equals(userId)) {
return error("无权修改他人信息");
}
// 检查记录是否存在
VetPersonalInfo existing = vetPersonalInfoService.selectVetPersonalInfoByUserId(userId);
if (existing == null) {
return error("兽医信息不存在,请先创建");
}
// 添加必要的ID信息
updates.put("userId", userId);
updates.put("personalInfoId", existing.getId());
VetUnifiedInfoDTO result = vetUnifiedInfoService.saveVetInfo(updates);
return AjaxResult.success("更新成功", result);
} catch (Exception e) {
log.error("更新兽医信息失败", e);
return error("更新失败: " + e.getMessage());
}
}
/**
* 提交审核
* POST /vet/unified/submitAudit
*
* 替代/vet/qualification/submit 中的审核提交部分
*/
@PreAuthorize("@ss.hasRole('muhu') or @ss.hasRole('vet') or @ss.hasRole('vetnotshenhe')")
@PostMapping("/submitAudit")
@Log(title = "兽医资质", businessType = BusinessType.OTHER)
public AjaxResult submitForAudit(@RequestBody(required = false) Map<String, Object> requestData) {
try {
Long userId = SecurityUtils.getUserId();
if (userId == null) {
return error("用户未登录");
}
log.info("保存并提交审核 - userId: {}", userId);
// 如果有数据先保存
if (requestData != null && !requestData.isEmpty()) {
// 检查是否需要添加personalInfoId
if (!requestData.containsKey("personalInfoId") && !requestData.containsKey("id")) {
VetPersonalInfo existing = vetPersonalInfoService.selectVetPersonalInfoByUserId(userId);
if (existing != null) {
requestData.put("personalInfoId", existing.getId());
}
}
vetUnifiedInfoService.saveVetInfo(requestData);
}
// 调用提交审核接口
boolean submitSuccess = vetUnifiedInfoService.submitForAudit(userId);
if (submitSuccess) {
return AjaxResult.success("提交审核成功");
} else {
return AjaxResult.warn("提交审核失败,请稍后重试");
}
} catch (Exception e) {
log.error("提交审核失败", e);
return error("操作失败: " + e.getMessage());
}
}
/**
* 获取信息统计
* GET /vet/unified/statistics
*
* 替代/vet/qualification/statistics/{userId}
*/
@PreAuthorize("@ss.hasRole('muhu') or @ss.hasRole('vet')")
@GetMapping("/statistics")
public AjaxResult getStatistics() {
try {
Long userId = SecurityUtils.getUserId();
if (userId == null) {
return error("用户未登录");
}
Map<String, Object> statistics = vetUnifiedInfoService.getStatistics(userId);
return success(statistics);
} catch (Exception e) {
log.error("获取统计信息失败", e);
return error("获取失败: " + e.getMessage());
}
}
/**
* 检查是否需要填写资质登录后调用
* GET /vet/unified/checkNeed
*
* 替代/vet/qualification/checkNeedQualification
*/
@PreAuthorize("@ss.hasRole('muhu') or @ss.hasRole('vet') or @ss.hasRole('vetnotshenhe')")
@GetMapping("/checkNeed")
public AjaxResult checkNeedQualification() {
try {
Long userId = SecurityUtils.getUserId();
if (userId == null) {
return error("用户未登录");
}
Map<String, Object> result = vetUnifiedInfoService.checkNeedQualification(userId);
return success(result);
} catch (Exception e) {
log.error("检查资质需求失败", e);
return error("检查失败: " + e.getMessage());
}
}
/**
* 分页查询兽医信息列表管理员用
* GET /vet/unified/list
*
* 替代/sys/vet/audit/list /vet/info/list
*/
@GetMapping("/list")
@PreAuthorize("@ss.hasPermi('sys:vetAudit:list') or @ss.hasRole('muhu') or @ss.hasRole('manger') or @ss.hasRole('vet') or @ss.hasRole('vetnotshenhe')")
public TableDataInfo list(VetUnifiedInfoDTO query) {
startPage();
// 获取当前登录用户
LoginUser loginUser = SecurityUtils.getLoginUser();
// 判断是否是管理员muhu manger
boolean isAdmin = false;
if (loginUser != null && loginUser.getUser() != null) {
List<SysRole> roles = loginUser.getUser().getRoles();
for (SysRole role : roles) {
String roleKey = role.getRoleKey();
if ("muhu".equals(roleKey) || "manger".equals(roleKey)) {
isAdmin = true;
break;
}
}
}
// 如果不是管理员只能看自己的数据
if (!isAdmin) {
if (query == null) {
query = new VetUnifiedInfoDTO();
}
query.setUserId(SecurityUtils.getUserId());
log.debug("普通用户查询自己的信息 - userId: {}", SecurityUtils.getUserId());
} else {
log.debug("管理员查询所有信息");
}
List<VetUnifiedInfoDTO> list = vetUnifiedInfoService.listVetInfo(query);
return getDataTable(list);
}
/**
* 审核兽医信息管理员用
* POST /vet/unified/audit
*
* 替代/sys/vet/audit/qualificationAudit
*/
@PostMapping("/audit")
@PreAuthorize("@ss.hasPermi('sys:vetAudit:audit') or @ss.hasRole('muhu')")
@Log(title = "兽医审核", businessType = BusinessType.UPDATE)
public AjaxResult auditVetInfo(@RequestBody Map<String, Object> auditData) {
try {
Long userId = getAuditUserId(auditData);
String auditStatus = (String) auditData.get("auditStatus");
String auditOpinion = (String) auditData.get("auditOpinion");
Long auditorId = SecurityUtils.getUserId();
if (userId == null || StringUtils.isEmpty(auditStatus)) {
return error("用户ID和审核状态不能为空");
}
boolean success = vetUnifiedInfoService.auditVetInfo(userId, auditStatus, auditOpinion, auditorId);
if (success) {
return success("审核成功");
} else {
return error("审核失败");
}
} catch (Exception e) {
log.error("审核失败", e);
return error("审核失败: " + e.getMessage());
}
}
// ==================== 已废弃接口保留向后兼容 ====================
// /**
// * 已废弃根据用户ID获取信息
// * 请使用 GET /vet/unified/{userId}
// */
// @Deprecated
// @GetMapping("/info/{userId}")
// @PreAuthorize("@ss.hasPermi('sys:vetAudit:view') or @ss.hasRole('muhu') or @ss.hasRole('vet')")
// public AjaxResult getUserInfoByUserId(@PathVariable Long userId) {
// log.warn("调用已废弃接口 /vet/unified/info/{},请改用 /vet/unified/{}", userId, userId);
// return getUserInfo(userId); // 调用新接口
// }
// /**
// * 已废弃保存/更新兽医信息
// * 请根据情况使用 POST /vet/unified PUT /vet/unified/{userId}
// */
// @Deprecated
// @PostMapping("/save")
// @PreAuthorize("@ss.hasRole('muhu') or @ss.hasRole('vet') or @ss.hasRole('vetnotshenhe')")
// @Log(title = "兽医信息", businessType = BusinessType.UPDATE)
// public AjaxResult saveVetInfo(@RequestBody Map<String, Object> requestData) {
// log.warn("调用已废弃接口 /vet/unified/save,请根据情况使用 POST /vet/unified 或 PUT /vet/unified/{userId}");
//
// try {
// Long userId = SecurityUtils.getUserId();
// if (userId == null) {
// return error("用户未登录");
// }
//
// log.info("保存兽医信息 - userId: {}, data: {}", userId, requestData);
//
// // 从请求中获取 id如果有
// Long targetId = null;
// if (requestData.containsKey("id")) {
// Object idObj = requestData.get("id");
// if (idObj instanceof Number) {
// targetId = ((Number) idObj).longValue();
// } else if (idObj instanceof String) {
// try {
// targetId = Long.parseLong((String) idObj);
// } catch (NumberFormatException e) {
// return error("ID格式不正确");
// }
// }
// }
//
// // 如果传了ID验证该记录是否属于当前用户
// if (targetId != null && targetId > 0) {
// VetPersonalInfo existingInfo = vetPersonalInfoService.selectVetPersonalInfoById(targetId);
// if (existingInfo == null) {
// return error("记录不存在");
// }
// // 验证所有权只能修改自己的信息
// if (!existingInfo.getUserId().equals(userId)) {
// return error("无权修改他人的信息");
// }
// // 将ID放入requestData确保service层能获取到
// requestData.put("personalInfoId", targetId);
// }
//
// VetUnifiedInfoDTO result = vetUnifiedInfoService.saveVetInfo(requestData);
// return AjaxResult.success("保存成功", result);
//
// } catch (Exception e) {
// log.error("保存兽医信息失败", e);
// return error("保存失败: " + e.getMessage());
// }
// }
// ==================== 私有辅助方法 ====================
/**
* 从请求数据中获取用户ID
*/
private Long getAuditUserId(Map<String, Object> auditData) {
Object userIdObj = auditData.get("userId");
if (userIdObj == null) {
userIdObj = auditData.get("id");
}
if (userIdObj == null) {
userIdObj = auditData.get("personalInfoId");
}
if (userIdObj instanceof Number) {
return ((Number) userIdObj).longValue();
} else if (userIdObj instanceof String) {
try {
return Long.parseLong((String) userIdObj);
} catch (NumberFormatException e) {
return null;
}
}
return null;
}
/**
* 将DTO对象转换为Map
*/
private Map<String, Object> convertDtoToMap(VetUnifiedInfoDTO dto) {
// 这里可以使用ObjectMapper或者手动转换
// 简单起见这里假设service层能直接处理DTO
// 实际项目中可以使用JSON工具转换
return (Map<String, Object>) com.alibaba.fastjson.JSON.toJSON(dto);
}
}

186
chenhai-system/src/main/java/com/chenhai/system/service/impl/SysMuhuUserServiceImpl.java

@ -2,12 +2,19 @@ package com.chenhai.system.service.impl;
import java.util.List;
import com.chenhai.common.utils.DateUtils;
import com.chenhai.common.utils.StringUtils;
import com.chenhai.common.core.domain.entity.SysUser;
import com.chenhai.system.service.ISysUserService;
import com.chenhai.vet.domain.VetQualification;
import com.chenhai.vet.mapper.VetQualificationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.chenhai.system.mapper.SysMuhuUserMapper;
import com.chenhai.system.domain.SysMuhuUser;
import com.chenhai.system.service.ISysMuhuUserService;
import org.springframework.transaction.annotation.Transactional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 牧户用户Service业务层处理
@ -18,9 +25,17 @@ import org.springframework.transaction.annotation.Transactional;
@Service
public class SysMuhuUserServiceImpl implements ISysMuhuUserService
{
private static final Logger log = LoggerFactory.getLogger(SysMuhuUserServiceImpl.class);
@Autowired
private SysMuhuUserMapper sysMuhuUserMapper;
@Autowired
private VetQualificationMapper vetQualificationMapper;
@Autowired
private ISysUserService sysUserService;
/**
* 查询牧户用户
*/
@ -114,10 +129,10 @@ public class SysMuhuUserServiceImpl implements ISysMuhuUserService
}
/**
* 提交实名认证
* 提交实名认证 - 增强版支持同步到兽医资质表
*/
@Override
@Transactional
@Transactional(rollbackFor = Exception.class)
public boolean submitRealNameAuth(Long userId, String realName, String idCard) {
// 1. 参数验证
if (userId == null) {
@ -165,33 +180,184 @@ public class SysMuhuUserServiceImpl implements ISysMuhuUserService
}
// 6. 保存认证信息
boolean result;
if (existingUser == null) {
// 新增记录
SysMuhuUser newUser = new SysMuhuUser();
newUser.setUserId(userId);
newUser.setRealName(realName);
newUser.setIdCard(idCard);
newUser.setAuthStatus("已认证"); // 设置为"已认证"
newUser.setAuthStatus("已认证");
newUser.setAuthTime(DateUtils.getNowDate());
return sysMuhuUserMapper.insertSysMuhuUser(newUser) > 0;
result = sysMuhuUserMapper.insertSysMuhuUser(newUser) > 0;
if (result) {
log.info("新增实名认证记录成功,userId: {}, realName: {}", userId, realName);
}
} else {
// 更新记录
existingUser.setRealName(realName);
existingUser.setIdCard(idCard);
existingUser.setAuthStatus("已认证"); // 设置为"已认证"
existingUser.setAuthStatus("已认证");
existingUser.setAuthTime(DateUtils.getNowDate());
existingUser.setUpdateTime(DateUtils.getNowDate());
return sysMuhuUserMapper.updateSysMuhuUser(existingUser) > 0;
result = sysMuhuUserMapper.updateSysMuhuUser(existingUser) > 0;
if (result) {
log.info("更新实名认证记录成功,userId: {}, realName: {}", userId, realName);
}
}
// ========== 新增实名认证成功后同步到兽医资质表 ==========
if (result) {
syncToVetQualification(userId, realName, idCard);
}
return result;
}
/**
* 同步实名信息到兽医资质表
*
* @param userId 用户ID
* @param realName 真实姓名
* @param idCard 身份证号
*/
private void syncToVetQualification(Long userId, String realName, String idCard) {
try {
log.info("开始同步实名信息到兽医资质表,userId: {}, realName: {}", userId, realName);
// 查询用户类型
SysUser user = sysUserService.selectUserById(userId);
if (user == null) {
log.warn("用户不存在,无法同步到兽医资质表,userId: {}", userId);
return;
}
// 只有兽医类型01才需要同步到资质表
if (!"01".equals(user.getUserType())) {
log.info("用户类型不是兽医,无需同步到资质表,userId: {}, userType: {}", userId, user.getUserType());
return;
}
// 查询是否已有资质记录
VetQualification qualification = vetQualificationMapper.selectVetQualificationByUserId(userId);
if (qualification == null) {
// 创建新资质记录只填充基本信息
qualification = new VetQualification();
qualification.setUserId(userId);
qualification.setRealName(realName);
qualification.setIdCard(idCard);
qualification.setAuditStatus("0"); // 待审核
// qualification.setApplyTime(new Date());
// 创建空的证书JSON
qualification.setCertificatesJson("[]");
// 设置默认值
// qualification.setCreateTime(new Date());
// qualification.setUpdateTime(new Date());
// 设置创建人可选
qualification.setCreateBy(user.getUserName());
int insertResult = vetQualificationMapper.insertVetQualification(qualification);
if (insertResult > 0) {
log.info("实名认证后自动创建兽医资质记录成功,userId: {}, qualificationId: {}",
userId, qualification.getQualificationId());
} else {
log.warn("实名认证后自动创建兽医资质记录失败,userId: {}", userId);
}
} else {
// 更新现有资质记录只更新姓名和身份证不覆盖已提交的证书
boolean needUpdate = false;
StringBuilder updateFields = new StringBuilder();
if (StringUtils.isEmpty(qualification.getRealName())) {
qualification.setRealName(realName);
needUpdate = true;
updateFields.append("realName ");
} else if (!realName.equals(qualification.getRealName())) {
// 如果已有的姓名与实名认证不一致记录警告但不自动覆盖
log.warn("兽医资质表已有姓名[{}]与实名认证姓名[{}]不一致,userId: {}",
qualification.getRealName(), realName, userId);
}
if (StringUtils.isEmpty(qualification.getIdCard())) {
qualification.setIdCard(idCard);
needUpdate = true;
updateFields.append("idCard ");
} else if (!idCard.equals(qualification.getIdCard())) {
// 如果已有的身份证与实名认证不一致记录警告但不自动覆盖
log.warn("兽医资质表已有身份证[{}]与实名认证身份证[{}]不一致,userId: {}",
qualification.getIdCard(), idCard, userId);
}
if (needUpdate) {
// qualification.setUpdateTime(new Date());
int updateResult = vetQualificationMapper.updateVetQualification(qualification);
if (updateResult > 0) {
log.info("实名认证后更新兽医资质基本信息成功,userId: {}, 更新字段: {}",
userId, updateFields.toString());
} else {
log.warn("实名认证后更新兽医资质基本信息失败,userId: {}", userId);
}
} else {
log.info("兽医资质表基本信息已存在,无需更新,userId: {}", userId);
}
}
} catch (Exception e) {
// 同步失败不影响实名认证主流程只记录日志
log.error("同步实名信息到兽医资质表异常,userId: {}, error: {}", userId, e.getMessage(), e);
}
}
/**
* 验证身份证号格式
* 验证身份证号格式增强版
*
* @param idCard 身份证号
* @return true-有效false-无效
*/
private boolean isValidIdCard(String idCard) {
// 18位身份证正则
if (idCard == null || idCard.length() != 18) {
return false;
}
// 18位身份证正则包含校验位验证
String regex = "^[1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9X]$";
return idCard.matches(regex);
if (!idCard.matches(regex)) {
return false;
}
// 校验码验证可选增强安全性
return validateIdCardCheckCode(idCard);
}
/**
* 验证身份证校验码
*/
private boolean validateIdCardCheckCode(String idCard) {
// 加权因子
int[] factor = {7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2};
// 校验码对应值
char[] parityBit = {'1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'};
int sum = 0;
try {
for (int i = 0; i < 17; i++) {
sum += Character.getNumericValue(idCard.charAt(i)) * factor[i];
}
} catch (Exception e) {
return false;
}
int mod = sum % 11;
char checkCode = parityBit[mod];
return checkCode == idCard.charAt(17);
}
/**
@ -212,4 +378,4 @@ public class SysMuhuUserServiceImpl implements ISysMuhuUserService
// 确保返回有效的认证状态默认为"未认证"
return (authStatus != null && !authStatus.trim().isEmpty()) ? authStatus : "未认证";
}
}
}

673
chenhai-system/src/main/java/com/chenhai/vet/domain/dto/VetUnifiedInfoDTO.java

@ -0,0 +1,673 @@
package com.chenhai.vet.domain.dto;
import com.chenhai.common.annotation.Excel;
import com.chenhai.vet.domain.VetQualification;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 兽医统一信息DTO
* 整合 VetPersonalInfo VetQualification 的所有字段
*/
public class VetUnifiedInfoDTO {
// ========== 用户基本信息 (来自SysUser) ==========
private Long userId;
private String userName;
private String nickName;
private String phonenumber;
private String email;
private String avatar;
private String userType;
private String areaCode;
private String status;
private Date loginDate;
// ========== 兽医个人信息 (来自VetPersonalInfo) ==========
private Long personalInfoId; // 对应 VetPersonalInfo.id
private String realName; // 真实姓名
private String gender; // 性别0男 1女
@JsonFormat(pattern = "yyyy-MM-dd")
private Date birthday; // 出生日期
private String idCard; // 身份证号
private String specialty; // 擅长领域
private String workExperience; // 工作经验
private String hospital; // 所属医院
private String address; // 联系地址
private String iphone; // 联系方式
private String introduction; // 个人简介
private String title; // 职称
private String phone; // 手机号
private String expertType; // 专家类型
private String personalEmail; // 电子邮件地址兽医表
private String personalNickName; // 用户昵称兽医表
// ========== 兽医资质信息 (来自VetQualification) ==========
private Long qualificationId; // 资质ID
private String qualificationType; // 资质类型
private String qualificationTypeLabel; // 资质类型名称
private String scopeIds; // 经营范围IDs
private String scopeNames; // 经营范围名称
private List<VetQualification.CertificateInfo> certificates; // 证书列表
private Integer remindDays; // 提醒天数
// 主证书信息兼容旧版
private String certName; // 证书名称
private String certificateNo; // 证书编号
private String issueOrg; // 发证机构
private String certificateFiles; // 证书文件
@JsonFormat(pattern = "yyyy-MM-dd")
private Date issueDate; // 发证日期
@JsonFormat(pattern = "yyyy-MM-dd")
private Date expireDate; // 到期日期
private String certStatus; // 证书状态
private String certStatusLabel; // 证书状态名称
private Long certId; // 证书ID
private String certificatesJson; // 证书JSON字符串
// ========== 审核状态 ==========
private String auditStatus; // 审核状态0待审核 1通过 2驳回
private String auditStatusLabel; // 审核状态名称
private String auditOpinion; // 审核意见
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date applyTime; // 申请时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date auditTime; // 审核时间
private Long auditorId; // 审核人ID
private String auditor; // 审核人
// ========== 认证状态 (来自SysMuhuUser) ==========
private String authStatus; // 认证状态
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date authTime; // 认证时间
private String maskedIdCard; // 脱敏身份证
// ========== 统计信息 ==========
private Integer totalCertificates; // 证书总数
private Integer expiringCount; // 即将过期30天内
private Integer expiredCount; // 已过期
private Integer normalCount; // 正常
private Integer completeness; // 信息完整度(%)
private Boolean canSubmitAudit; // 是否可以提交审核
private Map<String, Object> statistics; // 详细统计
// ========== 辅助字段 ==========
private Boolean hasPersonalInfo; // 是否有个人信息
private Boolean hasQualification; // 是否有资质信息
private Boolean hasCertificates; // 是否有证书
private String warningLevel; // 警告级别 NORMAL/WARNING/DANGER
private Map<String, Object> extra; // 扩展字段
// ========== 基础字段 ==========
private String createBy;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date createTime;
private String updateBy;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
private String remark;
// ==================== Getter and Setter ====================
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getNickName() {
return nickName;
}
public void setNickName(String nickName) {
this.nickName = nickName;
}
public String getPhonenumber() {
return phonenumber;
}
public void setPhonenumber(String phonenumber) {
this.phonenumber = phonenumber;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getAvatar() {
return avatar;
}
public void setAvatar(String avatar) {
this.avatar = avatar;
}
public String getUserType() {
return userType;
}
public void setUserType(String userType) {
this.userType = userType;
}
public String getAreaCode() {
return areaCode;
}
public void setAreaCode(String areaCode) {
this.areaCode = areaCode;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Date getLoginDate() {
return loginDate;
}
public void setLoginDate(Date loginDate) {
this.loginDate = loginDate;
}
public Long getPersonalInfoId() {
return personalInfoId;
}
public void setPersonalInfoId(Long personalInfoId) {
this.personalInfoId = personalInfoId;
}
public String getRealName() {
return realName;
}
public void setRealName(String realName) {
this.realName = realName;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
public String getIdCard() {
return idCard;
}
public void setIdCard(String idCard) {
this.idCard = idCard;
}
public String getSpecialty() {
return specialty;
}
public void setSpecialty(String specialty) {
this.specialty = specialty;
}
public String getWorkExperience() {
return workExperience;
}
public void setWorkExperience(String workExperience) {
this.workExperience = workExperience;
}
public String getHospital() {
return hospital;
}
public void setHospital(String hospital) {
this.hospital = hospital;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getIphone() {
return iphone;
}
public void setIphone(String iphone) {
this.iphone = iphone;
}
public String getIntroduction() {
return introduction;
}
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getExpertType() {
return expertType;
}
public void setExpertType(String expertType) {
this.expertType = expertType;
}
public String getPersonalEmail() {
return personalEmail;
}
public void setPersonalEmail(String personalEmail) {
this.personalEmail = personalEmail;
}
public String getPersonalNickName() {
return personalNickName;
}
public void setPersonalNickName(String personalNickName) {
this.personalNickName = personalNickName;
}
public Long getQualificationId() {
return qualificationId;
}
public void setQualificationId(Long qualificationId) {
this.qualificationId = qualificationId;
}
public String getQualificationType() {
return qualificationType;
}
public void setQualificationType(String qualificationType) {
this.qualificationType = qualificationType;
}
public String getQualificationTypeLabel() {
return qualificationTypeLabel;
}
public void setQualificationTypeLabel(String qualificationTypeLabel) {
this.qualificationTypeLabel = qualificationTypeLabel;
}
public String getScopeIds() {
return scopeIds;
}
public void setScopeIds(String scopeIds) {
this.scopeIds = scopeIds;
}
public String getScopeNames() {
return scopeNames;
}
public void setScopeNames(String scopeNames) {
this.scopeNames = scopeNames;
}
public List<VetQualification.CertificateInfo> getCertificates() {
return certificates;
}
public void setCertificates(List<VetQualification.CertificateInfo> certificates) {
this.certificates = certificates;
}
public Integer getRemindDays() {
return remindDays;
}
public void setRemindDays(Integer remindDays) {
this.remindDays = remindDays;
}
public String getCertName() {
return certName;
}
public void setCertName(String certName) {
this.certName = certName;
}
public String getCertificateNo() {
return certificateNo;
}
public void setCertificateNo(String certificateNo) {
this.certificateNo = certificateNo;
}
public String getIssueOrg() {
return issueOrg;
}
public void setIssueOrg(String issueOrg) {
this.issueOrg = issueOrg;
}
public String getCertificateFiles() {
return certificateFiles;
}
public void setCertificateFiles(String certificateFiles) {
this.certificateFiles = certificateFiles;
}
public Date getIssueDate() {
return issueDate;
}
public void setIssueDate(Date issueDate) {
this.issueDate = issueDate;
}
public Date getExpireDate() {
return expireDate;
}
public void setExpireDate(Date expireDate) {
this.expireDate = expireDate;
}
public String getCertStatus() {
return certStatus;
}
public void setCertStatus(String certStatus) {
this.certStatus = certStatus;
}
public String getCertStatusLabel() {
return certStatusLabel;
}
public void setCertStatusLabel(String certStatusLabel) {
this.certStatusLabel = certStatusLabel;
}
public Long getCertId() {
return certId;
}
public void setCertId(Long certId) {
this.certId = certId;
}
public String getCertificatesJson() {
return certificatesJson;
}
public void setCertificatesJson(String certificatesJson) {
this.certificatesJson = certificatesJson;
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public String getAuditStatusLabel() {
return auditStatusLabel;
}
public void setAuditStatusLabel(String auditStatusLabel) {
this.auditStatusLabel = auditStatusLabel;
}
public String getAuditOpinion() {
return auditOpinion;
}
public void setAuditOpinion(String auditOpinion) {
this.auditOpinion = auditOpinion;
}
public Date getApplyTime() {
return applyTime;
}
public void setApplyTime(Date applyTime) {
this.applyTime = applyTime;
}
public Date getAuditTime() {
return auditTime;
}
public void setAuditTime(Date auditTime) {
this.auditTime = auditTime;
}
public Long getAuditorId() {
return auditorId;
}
public void setAuditorId(Long auditorId) {
this.auditorId = auditorId;
}
public String getAuditor() {
return auditor;
}
public void setAuditor(String auditor) {
this.auditor = auditor;
}
public String getAuthStatus() {
return authStatus;
}
public void setAuthStatus(String authStatus) {
this.authStatus = authStatus;
}
public Date getAuthTime() {
return authTime;
}
public void setAuthTime(Date authTime) {
this.authTime = authTime;
}
public String getMaskedIdCard() {
return maskedIdCard;
}
public void setMaskedIdCard(String maskedIdCard) {
this.maskedIdCard = maskedIdCard;
}
public Integer getTotalCertificates() {
return totalCertificates;
}
public void setTotalCertificates(Integer totalCertificates) {
this.totalCertificates = totalCertificates;
}
public Integer getExpiringCount() {
return expiringCount;
}
public void setExpiringCount(Integer expiringCount) {
this.expiringCount = expiringCount;
}
public Integer getExpiredCount() {
return expiredCount;
}
public void setExpiredCount(Integer expiredCount) {
this.expiredCount = expiredCount;
}
public Integer getNormalCount() {
return normalCount;
}
public void setNormalCount(Integer normalCount) {
this.normalCount = normalCount;
}
public Integer getCompleteness() {
return completeness;
}
public void setCompleteness(Integer completeness) {
this.completeness = completeness;
}
public Boolean getCanSubmitAudit() {
return canSubmitAudit;
}
public void setCanSubmitAudit(Boolean canSubmitAudit) {
this.canSubmitAudit = canSubmitAudit;
}
public Map<String, Object> getStatistics() {
return statistics;
}
public void setStatistics(Map<String, Object> statistics) {
this.statistics = statistics;
}
public Boolean getHasPersonalInfo() {
return hasPersonalInfo;
}
public void setHasPersonalInfo(Boolean hasPersonalInfo) {
this.hasPersonalInfo = hasPersonalInfo;
}
public Boolean getHasQualification() {
return hasQualification;
}
public void setHasQualification(Boolean hasQualification) {
this.hasQualification = hasQualification;
}
public Boolean getHasCertificates() {
return hasCertificates;
}
public void setHasCertificates(Boolean hasCertificates) {
this.hasCertificates = hasCertificates;
}
public String getWarningLevel() {
return warningLevel;
}
public void setWarningLevel(String warningLevel) {
this.warningLevel = warningLevel;
}
public Map<String, Object> getExtra() {
return extra;
}
public void setExtra(Map<String, Object> extra) {
this.extra = extra;
}
public String getCreateBy() {
return createBy;
}
public void setCreateBy(String createBy) {
this.createBy = createBy;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}

3
chenhai-system/src/main/java/com/chenhai/vet/mapper/VetQualificationMapper.java

@ -88,4 +88,5 @@ public interface VetQualificationMapper
* @return 兽医资质
*/
public VetQualification selectVetQualificationByUserId(@Param("userId") Long userId);
}
}

52
chenhai-system/src/main/java/com/chenhai/vet/service/IVetUnifiedInfoService.java

@ -0,0 +1,52 @@
package com.chenhai.vet.service;
import com.chenhai.vet.domain.dto.VetUnifiedInfoDTO;
import java.util.List;
import java.util.Map;
/**
* 兽医统一信息Service接口
*/
public interface IVetUnifiedInfoService {
/**
* 获取当前登录用户的完整信息
*/
VetUnifiedInfoDTO getCurrentUserInfo();
/**
* 根据用户ID获取完整信息
*/
VetUnifiedInfoDTO getUserInfoByUserId(Long userId);
/**
* 保存/更新兽医信息
*/
VetUnifiedInfoDTO saveVetInfo(Map<String, Object> requestData);
/**
* 提交审核
*/
boolean submitForAudit(Long userId);
/**
* 获取统计信息
*/
Map<String, Object> getStatistics(Long userId);
/**
* 检查是否需要填写资质
*/
Map<String, Object> checkNeedQualification(Long userId);
/**
* 分页查询兽医信息列表管理员用
* 分页参数由 MyBatis 分页插件自动处理
*/
List<VetUnifiedInfoDTO> listVetInfo(VetUnifiedInfoDTO query);
/**
* 审核兽医信息
*/
boolean auditVetInfo(Long userId, String auditStatus, String auditOpinion, Long auditorId);
}

1179
chenhai-system/src/main/java/com/chenhai/vet/service/impl/VetUnifiedInfoServiceImpl.java
File diff suppressed because it is too large
View File

8
chenhai-ui/src/api/system/user.js

@ -163,3 +163,11 @@ export function areaTreeSelect(query) {
params: query
})
}
// 获取用户信息
export function getUserInfo() {
return request({
url: '/muhu/user/getUserInfo',
method: 'get'
})
}

52
chenhai-ui/src/views/syd.vue

@ -254,7 +254,7 @@
</div>
</div>
<!-- 资质弹窗 (保持不变) -->
<!-- 资质弹窗 -->
<el-dialog :title="title" :visible.sync="flag" width="80%" append-to-body>
<el-steps :active="activeStep" finish-status="success" simple style="margin-bottom: 40px;">
<el-step title="选择经营范围"></el-step>
@ -539,8 +539,14 @@
</template>
<script>
import { submitAuditQualification, getQualificationTypeOptions, getScopeOptions, getQualificationStatus } from "../api/vet/qualification";
import { getStatsCard } from "../api/vet/notification";
// 使API
import {
getQualificationTypeOptions,
getScopeOptions,
checkNeedQualification, // 使
saveVetInfo // 使
} from "@/api/vet/qualification";
import { getStatsCard } from "@/api/vet/notification";
import * as echarts from 'echarts';
export default {
@ -581,12 +587,12 @@ export default {
{ pattern: /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/, message: "身份证号码不合法", trigger: "blur" },
{ min: 1, max: 18, message: "长度在18个字符", trigger: "blur" },
],
qualificationType: [
{required: true, message: "请选择资质类型", trigger: "change"}
],
scopeIds: [
{required: true, type: 'array', message: "请选择至少一个经营范围", trigger: "change"}
],
// qualificationType: [
// {required: true, message: "", trigger: "change"}
// ],
// scopeIds: [
// {required: true, type: 'array', message: "", trigger: "change"}
// ],
},
//
trendTimeRange: "7",
@ -702,18 +708,21 @@ export default {
}
},
/** 获取资质状态 */
/** 获取资质状态 - 使用新接口 */
getQualStatusAndHandle() {
getQualificationStatus()
checkNeedQualification() // 使
.then(res => {
const statusData = res.data || {};
if (statusData.needPopup === true || statusData.status === 'empty') {
if (statusData.needPopup === true || !statusData.hasQualification) {
this.flag = true;
}
})
.catch(error => {
console.error('获取资质状态失败:', error);
})
},
/** 提交审核 */
/** 提交审核 - 使用新接口 */
submitQualification() {
this.loading = true;
@ -734,7 +743,8 @@ export default {
certificates: certificates,
};
submitAuditQualification(requestData).then(response => {
// 使 saveVetInfo submitAuditQualification
saveVetInfo(requestData).then(response => {
this.$message.success('提交成功,请等待审核');
this.flag = false;
setTimeout(() => {
@ -744,13 +754,13 @@ export default {
});
}, 300);
})
.catch(error => {
console.error('提交失败:', error);
this.$message.error(error.response?.data?.message || '提交失败,请重试');
})
.finally(() => {
this.loading = false;
});
.catch(error => {
console.error('提交失败:', error);
this.$message.error(error.response?.data?.message || '提交失败,请重试');
})
.finally(() => {
this.loading = false;
});
},
//

638
chenhai-ui/src/views/vet/qualification/index.vue

@ -32,22 +32,6 @@
/>
</el-select>
</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-select v-model="queryParams.auditStatus" placeholder="审核状态" clearable style="width: 100px">
<el-option
@ -64,58 +48,9 @@
</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-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['vet:qualification:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<!-- <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" />-->
<!-- <el-table-column label="真实姓名" align="center" prop="realName" />-->
<!-- <el-table-column label="身份证号" align="center" prop="idCard" />-->
<el-table-column label="真实姓名" align="center" prop="realName" width="150" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span v-if="scope.row.realName">{{ scope.row.realName }}</span>
@ -133,46 +68,6 @@
<span>{{ formatQualificationType(scope.row.qualificationType) }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="证书编号" align="center" prop="certificateNo" />-->
<!-- <el-table-column label="证书编号" align="center" prop="certificateNo" width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.certificateNo">{{ scope.row.certificateNo }}</span>-->
<!-- <span v-else style="color: #909399">-</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- &lt;!&ndash; 新增的证书字段 &ndash;&gt;-->
<!-- <el-table-column label="证书名称" align="center" prop="certName" width="150">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.certName">{{ scope.row.certName }}</span>-->
<!-- <span v-else style="color: #909399">-</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="发证机构" align="center" prop="issueOrg" width="150">-->
<!-- <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">-->
<!-- <template slot-scope="scope">-->
<!--&lt;!&ndash; <span v-if="scope.row.certificateFiles">{{ scope.row.certificateFiles }}</span>&ndash;&gt;-->
<!-- <span v-if="scope.row.certificateFiles">{{ getImageUrl(scope.row.certificateFiles) }}</span>-->
<!-- <span v-else style="color: #909399">-</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="到期日期" align="center" prop="expireDate" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.expireDate">{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span>-->
<!-- <span v-else style="color: #909399">-</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="证书状态" align="center" prop="certStatus" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-tag :type="getCertStatusType(scope.row.certStatus)" size="small">-->
<!-- {{ getCertStatusLabel(scope.row.certStatus) }}-->
<!-- </el-tag>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="申请时间" align="center" prop="applyTime" width="180">
<template slot-scope="scope">
<span v-if="scope.row.applyTime">{{ parseTime(scope.row.applyTime, '{y}-{m}-{d}') }}</span>
@ -195,7 +90,6 @@
<el-table-column label="备注" align="center" prop="remark" width="150" :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"
@ -204,61 +98,6 @@
v-hasPermi="['vet:qualification:query']"
class="info-btn view-btn"
>详情</el-button>
<!-- 修改按钮 -->
<!-- <el-button-->
<!-- v-if="!scope.row.auditStatus || scope.row.auditStatus === '0' || scope.row.auditStatus === '2'"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- style="color: #42B983"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['vet:qualification:edit']"-->
<!-- >修改</el-button>-->
<!-- 提交/重新提交按钮 -->
<!-- <el-button-->
<!-- v-if="!scope.row.auditStatus || scope.row.auditStatus === '2'"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-s-check"-->
<!-- style="color: #409EFF"-->
<!-- @click="handleSubmitAudit(scope.row)"-->
<!-- v-hasPermi="['vet:qualification:edit']"-->
<!-- >{{ !scope.row.auditStatus ? '提交审核' : '重新提交' }}</el-button>-->
<!-- 下架按钮已上架状态显示 -->
<!-- <el-button-->
<!-- v-if="scope.row.auditStatus === '1'"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-bottom"-->
<!-- style="color: #E6A23C"-->
<!-- @click="handleUnshelf(scope.row)"-->
<!-- v-hasPermi="['vet:qualification:unshelf']"-->
<!-- >下架</el-button>-->
<!-- 上架按钮已下架状态显示 -->
<!-- <el-button-->
<!-- v-if="scope.row.auditStatus === '3'"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-top"-->
<!-- style="color: #67C23A"-->
<!-- @click="handleShelf(scope.row)"-->
<!-- v-hasPermi="['vet:qualification:shelf']"-->
<!-- >上架</el-button>-->
<!-- 删除按钮 -->
<!-- <el-button-->
<!-- v-if="!scope.row.auditStatus || scope.row.auditStatus === '2'"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- style="color: #f56c6c"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['vet:qualification:remove']"-->
<!-- >删除</el-button>-->
</template>
</el-table-column>
</el-table>
@ -273,9 +112,28 @@
/>
</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">{{ authInfo.realName || detailData.realName || '-' }}</span>
</el-col>
<el-col :span="16">
<span class="auth-label">身份证号</span>
<span class="auth-value">{{ authInfo.maskedIdCard || detailData.idCard || '-' }}</span>
</el-col>
</el-row>
</div>
</el-card>
<div>
<el-alert
v-if="!certificateList || certificateList.length === 0"
@ -296,7 +154,7 @@
<span>{{ scope.row.certName }}</span>
</template>
</el-table-column>
<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">
<template slot-scope="scope">
<span v-if="scope.row.issueOrg">{{ scope.row.issueOrg }}</span>
<span v-else style="color: #909399">-</span>
@ -357,7 +215,7 @@
style="color: #42B983"
@click="handleUpdate(scope.row)"
v-hasPermi="['vet:qualification:edit']"
class = "info-btn alter-btn"
class="info-btn alter-btn"
>修改</el-button>
</template>
</el-table-column>
@ -367,16 +225,6 @@
<div slot="footer" class="dialog-footer">
<el-button @click="closeDetail"> </el-button>
</div>
<div class="pageway">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</el-dialog>
<!-- 图片预览弹窗 -->
@ -394,29 +242,52 @@
</div>
</el-dialog>
<!-- 添加或修改兽医资质弹窗-->
<!-- 添加或修改兽医资质弹窗 -->
<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-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-input v-model="form.certificateNo" placeholder="请输入证书编号" />
</el-form-item>
@ -444,23 +315,13 @@
style="width: 100%">
</el-date-picker>
</el-form-item>
<!-- <el-form-item label="证书图片" prop="certImage">-->
<!-- <image-upload v-model="form.certImage"/>-->
<!-- </el-form-item>-->
<el-form-item label="证书文件" prop="certificateFiles">
<!--&lt;!&ndash; <el-input v-model="form.certificateFiles" type="textarea" placeholder="请输入内容" />&ndash;&gt;-->
<file-upload
v-model="form.certificateFiles"
:limit="1"
:file-type="['pdf','png','jpg','jpeg']"
/>
</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>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="resubmitForm">重新提交审核</el-button>
@ -471,7 +332,15 @@
</template>
<script>
import { listQualification, getQualificationCertificate, delQualification, getQualificationCertificates, updateAndSubmitQualification, listQualificationCertificates} from "@/api/vet/qualification"
import {
listQualification,
getQualificationCertificate,
delQualification,
getQualificationCertificates,
updateAndSubmitQualification,
listQualificationCertificates
} from "@/api/vet/qualification"
import { getUserInfo } from "@/api/system/user"
export default {
name: "Qualification",
@ -506,6 +375,16 @@ export default {
open: false,
openDetail: false,
previewDialogVisible: false,
// ========== ==========
//
authInfo: null,
//
realNameReadOnly: false,
idCardReadOnly: false,
//
authInfoFetched: false,
//
queryParams: {
pageNum: 1,
@ -522,17 +401,8 @@ export default {
},
//
form: {},
//
// -
rules: {
// realName: [
// { required: true, message: "", trigger: "blur" }
// ],
// idCard: [
// { required: true, message: "", trigger: "blur" }
// ],
// qualificationType: [
// { required: true, message: "", trigger: "change" }
// ],
certificateNo: [
{ required: true, message: "证书编号不能为空", trigger: "blur" }
],
@ -554,10 +424,72 @@ export default {
}
}
},
created() {
this.getList()
this.getUserAuthInfo() //
},
// ========== watch ==========
watch: {
open(val) {
if (val) {
//
this.$nextTick(() => {
this.fillAuthInfoToForm()
})
}
}
},
methods: {
// ========== ==========
async getUserAuthInfo() {
if (this.authInfoFetched) return //
try {
const res = await getUserInfo()
if (res.code === 200) {
const userInfo = res.data
//
if (userInfo.authStatus === '已认证' && userInfo.authInfo) {
this.authInfo = userInfo.authInfo
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) {
// 使 Vue.set
this.$set(this.form, 'realName', this.authInfo.realName)
this.$set(this.form, 'idCard', this.authInfo.idCard)
//
// this.authInfo.idCard
console.log('已填充实名信息到表单:', this.form.realName, this.form.idCard)
}
},
//
getList() {
this.loading = true
@ -591,10 +523,10 @@ export default {
//
getAuditStatusType(status) {
const map = {
'0': 'info', // -
'1': 'success', // - 绿
'2': 'danger', // -
'3': 'warning' // -
'0': 'info',
'1': 'success',
'2': 'danger',
'3': 'warning'
}
return map[status] || 'info'
},
@ -641,108 +573,14 @@ export default {
const fullUrl = this.getImageUrl(filePath);
const link = document.createElement('a');
link.href = fullUrl;
const fileName = filePath.substring(filePath.lastIndexOf('/') + 1);
link.download = fileName;
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
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() {
this.$refs["form"].validate(valid => {
@ -760,8 +598,8 @@ export default {
const submitData = {
certId: certId,
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,
certificateNo: this.form.certificateNo,
certName: this.form.certName,
@ -814,63 +652,6 @@ 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'
// })
// },
//
handleView(row) {
this.openDetail = true
@ -903,8 +684,12 @@ export default {
this.previewDialogVisible = false
},
//
// ========== reset ==========
reset() {
//
const currentRealName = this.form?.realName
const currentIdCard = this.form?.idCard
this.form = {
qualificationId: null,
userId: null,
@ -931,7 +716,15 @@ export default {
scopeIds: null,
scopeNames: null
}
this.resetForm("form")
//
if (this.authInfo) {
this.$nextTick(() => {
this.fillAuthInfoToForm()
})
}
},
//
@ -953,16 +746,30 @@ export default {
this.multiple = !selection.length
},
//
handleAdd() {
// ========== handleAdd ==========
async handleAdd() {
this.reset()
this.open = true
this.title = "添加兽医资质"
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()
let certId = row.certId || row.certificateId || row.id
if (certId && typeof certId === 'object') {
@ -975,42 +782,30 @@ export default {
return
}
getQualificationCertificate(certId).then(response => {
try {
const response = await getQualificationCertificate(certId)
if (response.code === 200 && response.data) {
this.form = response.data
//
if (!this.authInfoFetched) {
await this.getUserAuthInfo()
}
//
this.fillAuthInfoToForm()
this.open = true
this.title = "修改兽医资质证书信息"
} else {
this.$modal.msgError(response.msg || "获取证书信息失败")
}
}).catch(error => {
} 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) {
const qualificationIds = row.qualificationId || this.ids
@ -1022,13 +817,6 @@ export default {
}).catch(() => {})
},
//
// handleExport() {
// this.download('vet/qualification/export', {
// ...this.queryParams
// }, `qualification_${new Date().getTime()}.xlsx`)
// },
//
getDictLabel(dictType, value) {
const dict = this.dict.type[dictType]
@ -1064,6 +852,36 @@ export default {
::v-deep .pageway .pagination-container{
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 {
max-height: 400px;

Loading…
Cancel
Save