考核评估-认证管理
This commit is contained in:
parent
fb0c710d5a
commit
9aedf14508
@ -0,0 +1,118 @@
|
||||
package com.inspur.web.controller.examine;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.xml.rpc.ServiceException;
|
||||
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.inspur.common.annotation.Log;
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.common.enums.BusinessType;
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
import com.inspur.examine.service.IExamAttestationService;
|
||||
import com.inspur.common.utils.poi.ExcelUtil;
|
||||
import com.inspur.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 认证管理Controller
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/examine/attestation")
|
||||
public class ExamAttestationController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IExamAttestationService examAttestationService;
|
||||
|
||||
/**
|
||||
* 查询认证管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ExamAttestation examAttestation)
|
||||
{
|
||||
startPage();
|
||||
List<ExamAttestation> list = examAttestationService.selectExamAttestationList(examAttestation);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出认证管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:export')")
|
||||
@Log(title = "认证管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ExamAttestation examAttestation)
|
||||
{
|
||||
List<ExamAttestation> list = examAttestationService.selectExamAttestationList(examAttestation);
|
||||
ExcelUtil<ExamAttestation> util = new ExcelUtil<ExamAttestation>(ExamAttestation.class);
|
||||
util.exportExcel(response, list, "认证管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取认证管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return success(examAttestationService.selectExamAttestationById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增认证管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:add')")
|
||||
@Log(title = "认证管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ExamAttestation examAttestation)
|
||||
{
|
||||
return toAjax(examAttestationService.insertExamAttestation(examAttestation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改认证管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:edit')")
|
||||
@Log(title = "认证管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ExamAttestation examAttestation)
|
||||
{
|
||||
return toAjax(examAttestationService.updateExamAttestation(examAttestation));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除认证管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:remove')")
|
||||
@Log(title = "认证管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(examAttestationService.deleteExamAttestationByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询证书认证名单
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('examine:attestation:peopleList')")
|
||||
@GetMapping("/peopleList")
|
||||
public TableDataInfo peopleList(ExamAttestationPeople examAttestationPeople) throws ServiceException {
|
||||
startPage();
|
||||
List<ExamAttestationPeople> list = examAttestationService.selectPeopleList(examAttestationPeople);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package com.inspur.examine.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.inspur.common.annotation.Excel;
|
||||
import com.inspur.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 认证管理对象 exam_attestation
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Data
|
||||
public class ExamAttestation {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 证书名称
|
||||
*/
|
||||
@Excel(name = "认证名称")
|
||||
private String attestationName;
|
||||
|
||||
/**
|
||||
* 发布单位
|
||||
*/
|
||||
@Excel(name = "发布单位")
|
||||
private String attestationUnit;
|
||||
|
||||
/**
|
||||
* 证书说明
|
||||
*/
|
||||
@Excel(name = "认证说明")
|
||||
private String attestationInfo;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 证书认证人数
|
||||
*/
|
||||
@Excel(name = "认证人数")
|
||||
private Integer peopleCount;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
private String tenantId;
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.inspur.examine.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.inspur.common.annotation.Excel;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 认证人员关联对象 exam_attestation_people
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Data
|
||||
public class ExamAttestationPeople {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 认证id
|
||||
*/
|
||||
private String attestationId;
|
||||
|
||||
/**
|
||||
* 证书名称
|
||||
*/
|
||||
private String attestationName;
|
||||
|
||||
/**
|
||||
* 认证人员id
|
||||
*/
|
||||
private Long peopleId;
|
||||
|
||||
/**
|
||||
* 认证人员名称
|
||||
*/
|
||||
private String peopleName;
|
||||
|
||||
/**
|
||||
* 认证时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
@Excel(name = "认证时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date attestationTime;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@Excel(name = "租户id")
|
||||
private String tenantId;
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.inspur.examine.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
|
||||
/**
|
||||
* 认证管理Mapper接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface ExamAttestationMapper
|
||||
{
|
||||
/**
|
||||
* 查询认证管理
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 认证管理
|
||||
*/
|
||||
public ExamAttestation selectExamAttestationById(String id);
|
||||
|
||||
/**
|
||||
* 查询认证管理列表
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 认证管理集合
|
||||
*/
|
||||
public List<ExamAttestation> selectExamAttestationList(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 新增认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamAttestation(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 修改认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamAttestation(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 删除认证管理
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除认证管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.inspur.examine.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
|
||||
/**
|
||||
* 认证人员关联Mapper接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface ExamAttestationPeopleMapper
|
||||
{
|
||||
/**
|
||||
* 查询认证人员关联
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 认证人员关联
|
||||
*/
|
||||
public ExamAttestationPeople selectExamAttestationPeopleById(String id);
|
||||
|
||||
/**
|
||||
* 查询认证人员关联列表
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 认证人员关联集合
|
||||
*/
|
||||
public List<ExamAttestationPeople> selectExamAttestationPeopleList(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 新增认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamAttestationPeople(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 修改认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamAttestationPeople(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 删除认证人员关联
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationPeopleById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除认证人员关联
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationPeopleByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 根据认证ids删除关联信息
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 16:43 2024/5/7
|
||||
* @param ids 认证ids
|
||||
* @return int
|
||||
*/
|
||||
int deleteExamAttestationPeopleByAttestationIds(String[] ids);
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.inspur.examine.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
|
||||
/**
|
||||
* 认证人员关联Service接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface IExamAttestationPeopleService
|
||||
{
|
||||
/**
|
||||
* 查询认证人员关联
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 认证人员关联
|
||||
*/
|
||||
public ExamAttestationPeople selectExamAttestationPeopleById(String id);
|
||||
|
||||
/**
|
||||
* 查询认证人员关联列表
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 认证人员关联集合
|
||||
*/
|
||||
public List<ExamAttestationPeople> selectExamAttestationPeopleList(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 新增认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamAttestationPeople(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 修改认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamAttestationPeople(ExamAttestationPeople examAttestationPeople);
|
||||
|
||||
/**
|
||||
* 批量删除认证人员关联
|
||||
*
|
||||
* @param ids 需要删除的认证人员关联主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationPeopleByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除认证人员关联信息
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationPeopleById(String id);
|
||||
|
||||
/**
|
||||
* 根据认证ids删除关联信息
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 16:43 2024/5/7
|
||||
* @param ids 认证ids
|
||||
* @return int
|
||||
*/
|
||||
int deleteExamAttestationPeopleByAttestationIds(String[] ids);
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.inspur.examine.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
|
||||
import javax.xml.rpc.ServiceException;
|
||||
|
||||
/**
|
||||
* 认证管理Service接口
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
public interface IExamAttestationService
|
||||
{
|
||||
/**
|
||||
* 查询认证管理
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 认证管理
|
||||
*/
|
||||
public ExamAttestation selectExamAttestationById(String id);
|
||||
|
||||
/**
|
||||
* 查询认证管理列表
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 认证管理集合
|
||||
*/
|
||||
public List<ExamAttestation> selectExamAttestationList(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 新增认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertExamAttestation(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 修改认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateExamAttestation(ExamAttestation examAttestation);
|
||||
|
||||
/**
|
||||
* 批量删除认证管理
|
||||
*
|
||||
* @param ids 需要删除的认证管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除认证管理信息
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteExamAttestationById(String id);
|
||||
|
||||
/**
|
||||
* 查询证书认证名单
|
||||
*/
|
||||
List<ExamAttestationPeople> selectPeopleList(ExamAttestationPeople examAttestationPeople) throws ServiceException;
|
||||
}
|
@ -0,0 +1,106 @@
|
||||
package com.inspur.examine.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.examine.mapper.ExamAttestationPeopleMapper;
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
import com.inspur.examine.service.IExamAttestationPeopleService;
|
||||
|
||||
/**
|
||||
* 认证人员关联Service业务层处理
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
public class ExamAttestationPeopleServiceImpl implements IExamAttestationPeopleService
|
||||
{
|
||||
@Autowired
|
||||
private ExamAttestationPeopleMapper examAttestationPeopleMapper;
|
||||
|
||||
/**
|
||||
* 查询认证人员关联
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 认证人员关联
|
||||
*/
|
||||
@Override
|
||||
public ExamAttestationPeople selectExamAttestationPeopleById(String id)
|
||||
{
|
||||
return examAttestationPeopleMapper.selectExamAttestationPeopleById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询认证人员关联列表
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 认证人员关联
|
||||
*/
|
||||
@Override
|
||||
public List<ExamAttestationPeople> selectExamAttestationPeopleList(ExamAttestationPeople examAttestationPeople)
|
||||
{
|
||||
return examAttestationPeopleMapper.selectExamAttestationPeopleList(examAttestationPeople);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamAttestationPeople(ExamAttestationPeople examAttestationPeople)
|
||||
{
|
||||
return examAttestationPeopleMapper.insertExamAttestationPeople(examAttestationPeople);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改认证人员关联
|
||||
*
|
||||
* @param examAttestationPeople 认证人员关联
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamAttestationPeople(ExamAttestationPeople examAttestationPeople)
|
||||
{
|
||||
return examAttestationPeopleMapper.updateExamAttestationPeople(examAttestationPeople);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除认证人员关联
|
||||
*
|
||||
* @param ids 需要删除的认证人员关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamAttestationPeopleByIds(String[] ids)
|
||||
{
|
||||
return examAttestationPeopleMapper.deleteExamAttestationPeopleByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除认证人员关联信息
|
||||
*
|
||||
* @param id 认证人员关联主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamAttestationPeopleById(String id)
|
||||
{
|
||||
return examAttestationPeopleMapper.deleteExamAttestationPeopleById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据认证ids删除关联信息
|
||||
*
|
||||
* @Author xusd
|
||||
* @Date 16:43 2024/5/7
|
||||
* @param ids 认证ids
|
||||
* @return int
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamAttestationPeopleByAttestationIds(String[] ids) {
|
||||
return examAttestationPeopleMapper.deleteExamAttestationPeopleByAttestationIds(ids);
|
||||
}
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
package com.inspur.examine.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.inspur.common.utils.DateUtils;
|
||||
import com.inspur.common.utils.SecurityUtils;
|
||||
import com.inspur.common.utils.StringUtils;
|
||||
import com.inspur.common.utils.uuid.IdUtils;
|
||||
import com.inspur.examine.domain.ExamAttestationPeople;
|
||||
import com.inspur.examine.service.IExamAttestationPeopleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.examine.mapper.ExamAttestationMapper;
|
||||
import com.inspur.examine.domain.ExamAttestation;
|
||||
import com.inspur.examine.service.IExamAttestationService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.xml.rpc.ServiceException;
|
||||
|
||||
/**
|
||||
* 认证管理Service业务层处理
|
||||
*
|
||||
* @author inspur
|
||||
* @date 2024-05-07
|
||||
*/
|
||||
@Service
|
||||
public class ExamAttestationServiceImpl implements IExamAttestationService
|
||||
{
|
||||
@Autowired
|
||||
private ExamAttestationMapper examAttestationMapper;
|
||||
|
||||
@Autowired
|
||||
private IExamAttestationPeopleService examAttestationPeopleService;
|
||||
|
||||
/**
|
||||
* 查询认证管理
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 认证管理
|
||||
*/
|
||||
@Override
|
||||
public ExamAttestation selectExamAttestationById(String id)
|
||||
{
|
||||
return examAttestationMapper.selectExamAttestationById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询认证管理列表
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 认证管理
|
||||
*/
|
||||
@Override
|
||||
public List<ExamAttestation> selectExamAttestationList(ExamAttestation examAttestation)
|
||||
{
|
||||
examAttestation.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
return examAttestationMapper.selectExamAttestationList(examAttestation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertExamAttestation(ExamAttestation examAttestation)
|
||||
{
|
||||
examAttestation.setId(IdUtils.fastSimpleUUID());
|
||||
examAttestation.setCreateTime(DateUtils.getNowDate());
|
||||
return examAttestationMapper.insertExamAttestation(examAttestation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改认证管理
|
||||
*
|
||||
* @param examAttestation 认证管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateExamAttestation(ExamAttestation examAttestation)
|
||||
{
|
||||
return examAttestationMapper.updateExamAttestation(examAttestation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除认证管理
|
||||
*
|
||||
* @param ids 需要删除的认证管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public int deleteExamAttestationByIds(String[] ids) {
|
||||
int i = examAttestationMapper.deleteExamAttestationByIds(ids);
|
||||
if (i > 0) {
|
||||
//根据认证id删除关联信息
|
||||
examAttestationPeopleService.deleteExamAttestationPeopleByAttestationIds(ids);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除认证管理信息
|
||||
*
|
||||
* @param id 认证管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteExamAttestationById(String id)
|
||||
{
|
||||
return examAttestationMapper.deleteExamAttestationById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ExamAttestationPeople> selectPeopleList(ExamAttestationPeople examAttestationPeople) throws ServiceException {
|
||||
examAttestationPeople.setTenantId(SecurityUtils.getLoginUser().getTenantId());
|
||||
List<ExamAttestationPeople> list = examAttestationPeopleService.selectExamAttestationPeopleList(examAttestationPeople);
|
||||
if (StringUtils.isNotEmpty(list)) {
|
||||
ExamAttestation examAttestation = this.selectExamAttestationById(examAttestationPeople.getAttestationId());
|
||||
if (Objects.isNull(examAttestation)) {
|
||||
throw new ServiceException("未查询到此证书");
|
||||
}
|
||||
list.forEach(item -> item.setAttestationName(examAttestation.getAttestationName()));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
package com.inspur.examine.service;
|
||||
package com.inspur.examine.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.common.utils.DateUtils;
|
@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.inspur.examine.mapper.ExamAttestationMapper">
|
||||
|
||||
<resultMap type="com.inspur.examine.domain.ExamAttestation" id="ExamAttestationResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="attestationName" column="attestation_name" />
|
||||
<result property="attestationUnit" column="attestation_unit" />
|
||||
<result property="attestationInfo" column="attestation_info" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="peopleCount" column="people_count" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamAttestationVo">
|
||||
select id, attestation_name, attestation_unit, attestation_info, create_time from exam_attestation
|
||||
</sql>
|
||||
|
||||
<select id="selectExamAttestationList" parameterType="com.inspur.examine.domain.ExamAttestation" resultMap="ExamAttestationResult">
|
||||
SELECT
|
||||
ea.id,
|
||||
ea.attestation_name,
|
||||
ea.attestation_unit,
|
||||
ea.attestation_info,
|
||||
ea.create_time,
|
||||
COUNT( eap.id ) as people_count
|
||||
FROM
|
||||
exam_attestation AS ea
|
||||
LEFT JOIN exam_attestation_people AS eap ON ea.id = eap.attestation_id
|
||||
<if test="tenantId != null and tenantId != ''">AND eap.tenant_id = #{tenantId}</if>
|
||||
<where>
|
||||
<if test="attestationName != null and attestationName != ''"> and attestation_name like concat('%', #{attestationName}, '%')</if>
|
||||
<if test="attestationUnit != null and attestationUnit != ''"> and attestation_unit like concat('%', #{attestationUnit}, '%')</if>
|
||||
<if test="attestationInfo != null and attestationInfo != ''"> and attestation_info like concat('%', #{attestationInfo}, '%')</if>
|
||||
</where>
|
||||
GROUP BY ea.id
|
||||
order by ea.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectExamAttestationById" parameterType="String" resultMap="ExamAttestationResult">
|
||||
<include refid="selectExamAttestationVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamAttestation" parameterType="com.inspur.examine.domain.ExamAttestation">
|
||||
insert into exam_attestation
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="attestationName != null">attestation_name,</if>
|
||||
<if test="attestationUnit != null">attestation_unit,</if>
|
||||
<if test="attestationInfo != null">attestation_info,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="attestationName != null">#{attestationName},</if>
|
||||
<if test="attestationUnit != null">#{attestationUnit},</if>
|
||||
<if test="attestationInfo != null">#{attestationInfo},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamAttestation" parameterType="com.inspur.examine.domain.ExamAttestation">
|
||||
update exam_attestation
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="attestationName != null">attestation_name = #{attestationName},</if>
|
||||
<if test="attestationUnit != null">attestation_unit = #{attestationUnit},</if>
|
||||
<if test="attestationInfo != null">attestation_info = #{attestationInfo},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamAttestationById" parameterType="String">
|
||||
delete from exam_attestation where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamAttestationByIds" parameterType="String">
|
||||
delete from exam_attestation where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.inspur.examine.mapper.ExamAttestationPeopleMapper">
|
||||
|
||||
<resultMap type="com.inspur.examine.domain.ExamAttestationPeople" id="ExamAttestationPeopleResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="attestationId" column="attestation_id" />
|
||||
<result property="peopleId" column="people_id" />
|
||||
<result property="attestationTime" column="attestation_time" />
|
||||
<result property="tenantId" column="tenant_id" />
|
||||
<result property="peopleName" column="nick_name" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectExamAttestationPeopleVo">
|
||||
SELECT
|
||||
eap.id,
|
||||
eap.attestation_id,
|
||||
eap.people_id,
|
||||
eap.attestation_time,
|
||||
eap.tenant_id,
|
||||
su.nick_name
|
||||
FROM
|
||||
exam_attestation_people AS eap
|
||||
LEFT JOIN sys_user AS su ON eap.people_id = su.user_id
|
||||
</sql>
|
||||
|
||||
<select id="selectExamAttestationPeopleList" parameterType="com.inspur.examine.domain.ExamAttestationPeople" resultMap="ExamAttestationPeopleResult">
|
||||
<include refid="selectExamAttestationPeopleVo"/>
|
||||
<where>
|
||||
<if test="attestationId != null and attestationId != ''"> and eap.attestation_id = #{attestationId}</if>
|
||||
<if test="tenantId != null and tenantId != ''"> and eap.tenant_id = #{tenantId}</if>
|
||||
</where>
|
||||
order by eap.attestation_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectExamAttestationPeopleById" parameterType="String" resultMap="ExamAttestationPeopleResult">
|
||||
<include refid="selectExamAttestationPeopleVo"/>
|
||||
where eap.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertExamAttestationPeople" parameterType="com.inspur.examine.domain.ExamAttestationPeople">
|
||||
insert into exam_attestation_people
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="attestationId != null">attestation_id,</if>
|
||||
<if test="peopleId != null">people_id,</if>
|
||||
<if test="attestationTime != null">attestation_time,</if>
|
||||
<if test="tenantId != null and tenantId != ''">tenant_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="attestationId != null">#{attestationId},</if>
|
||||
<if test="peopleId != null">#{peopleId},</if>
|
||||
<if test="attestationTime != null">#{attestationTime},</if>
|
||||
<if test="tenantId != null and tenantId != ''">#{tenantId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateExamAttestationPeople" parameterType="com.inspur.examine.domain.ExamAttestationPeople">
|
||||
update exam_attestation_people
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="attestationId != null">attestation_id = #{attestationId},</if>
|
||||
<if test="peopleId != null">people_id = #{peopleId},</if>
|
||||
<if test="attestationTime != null">attestation_time = #{attestationTime},</if>
|
||||
<if test="tenantId != null and tenantId != ''">tenant_id = #{tenantId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteExamAttestationPeopleById" parameterType="String">
|
||||
delete from exam_attestation_people where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamAttestationPeopleByIds" parameterType="String">
|
||||
delete from exam_attestation_people where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteExamAttestationPeopleByAttestationIds">
|
||||
delete from exam_attestation_people where attestation_id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
53
inspur-ui/src/api/examine/attestation.js
Normal file
53
inspur-ui/src/api/examine/attestation.js
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询认证管理列表
|
||||
export function listAttestation(query) {
|
||||
return request({
|
||||
url: '/examine/attestation/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询认证管理详细
|
||||
export function getAttestation(id) {
|
||||
return request({
|
||||
url: '/examine/attestation/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增认证管理
|
||||
export function addAttestation(data) {
|
||||
return request({
|
||||
url: '/examine/attestation',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改认证管理
|
||||
export function updateAttestation(data) {
|
||||
return request({
|
||||
url: '/examine/attestation',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除认证管理
|
||||
export function delAttestation(id) {
|
||||
return request({
|
||||
url: '/examine/attestation/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询证书认证名单
|
||||
export function listAttestationPeople(query) {
|
||||
return request({
|
||||
url: '/examine/attestation/peopleList',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
329
inspur-ui/src/views/examine/attestation/index.vue
Normal file
329
inspur-ui/src/views/examine/attestation/index.vue
Normal file
@ -0,0 +1,329 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="认证名称" prop="attestationName">
|
||||
<el-input
|
||||
v-model="queryParams.attestationName"
|
||||
placeholder="请输入认证名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布单位" prop="attestationUnit">
|
||||
<el-input
|
||||
v-model="queryParams.attestationUnit"
|
||||
placeholder="请输入发布单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="认证说明" prop="attestationInfo">
|
||||
<el-input
|
||||
v-model="queryParams.attestationInfo"
|
||||
placeholder="请输入认证说明"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</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="['examine:attestation: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="['examine:attestation: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="['examine:attestation: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="['examine:attestation:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="attestationList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="认证名称" align="center" prop="attestationName" />
|
||||
<el-table-column label="认证人数" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
@click="handleOpenPeopleList(scope.row)"
|
||||
v-hasPermi="['examine:attestation:peopleList']"
|
||||
>{{scope.row.peopleCount}}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="发布单位" align="center" prop="attestationUnit" />
|
||||
<el-table-column label="认证说明" align="center" prop="attestationInfo" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['examine:attestation:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['examine:attestation:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改认证管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="认证名称" prop="attestationName">
|
||||
<el-input v-model="form.attestationName" placeholder="请输入认证名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发布单位" prop="attestationUnit">
|
||||
<el-input v-model="form.attestationUnit" placeholder="请输入发布单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="认证说明" prop="attestationInfo">
|
||||
<el-input v-model="form.attestationInfo" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="认证名单" :visible.sync="peopleTableOpen" width="700px" append-to-body>
|
||||
<el-table v-loading="peopleTableLoading" :data="attestationPeopleList">
|
||||
<el-table-column label="认证名称" align="center" prop="attestationName" />
|
||||
<el-table-column label="持有人" align="center" prop="peopleName" />
|
||||
<el-table-column label="认证时间" align="center" prop="attestationTime" />
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="peopleQueryParams.pageNum"
|
||||
:limit.sync="peopleQueryParams.pageSize"
|
||||
@pagination="getPeopleTableList"
|
||||
/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancelPeopleTable">关 闭</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listAttestation, getAttestation, delAttestation, addAttestation, updateAttestation, listAttestationPeople } from "@/api/examine/attestation";
|
||||
|
||||
export default {
|
||||
name: "Attestation",
|
||||
data() {
|
||||
return {
|
||||
peopleTableLoading: false,
|
||||
attestationPeopleTotal: 0,
|
||||
attestationPeopleList: [],
|
||||
peopleQueryParams:{
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
attestationId: null
|
||||
},
|
||||
peopleTableOpen: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 认证管理表格数据
|
||||
attestationList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
attestationName: null,
|
||||
attestationUnit: null,
|
||||
attestationInfo: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
attestationName: [
|
||||
{ required: true, message: "认证名称不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
cancelPeopleTable(){
|
||||
this.attestationPeopleList = [];
|
||||
this.peopleTableOpen = false;
|
||||
},
|
||||
handleOpenPeopleList(row){
|
||||
this.peopleQueryParams.attestationId = row.id;
|
||||
this.getPeopleTableList();
|
||||
this.peopleTableOpen = true;
|
||||
this.peopleTableLoading = true;
|
||||
},
|
||||
getPeopleTableList(){
|
||||
listAttestationPeople(this.peopleQueryParams).then(response =>{
|
||||
this.attestationPeopleList = response.rows;
|
||||
this.attestationPeopleTotal = response.total;
|
||||
this.peopleTableLoading = false;
|
||||
})
|
||||
},
|
||||
/** 查询认证管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listAttestation(this.queryParams).then(response => {
|
||||
this.attestationList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
attestationName: null,
|
||||
attestationUnit: null,
|
||||
attestationInfo: null,
|
||||
createTime: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加认证管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getAttestation(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改认证管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateAttestation(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addAttestation(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除认证管理编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delAttestation(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('examine/attestation/export', {
|
||||
...this.queryParams
|
||||
}, `attestation_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user