攀枝花煤业ETM,考核模式管理,绩效评估周期
This commit is contained in:
parent
192cb61b4e
commit
2c31f9f1c1
@ -0,0 +1,98 @@
|
||||
package com.god.web.controller.pzhmyManage;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.god.common.annotation.Log;
|
||||
import com.god.common.core.controller.BaseController;
|
||||
import com.god.common.core.domain.AjaxResult;
|
||||
import com.god.common.enums.BusinessType;
|
||||
import com.god.pzhmyManage.domain.PzhmyAssessPattern;
|
||||
import com.god.pzhmyManage.service.IPzhmyAssessPatternService;
|
||||
import com.god.common.utils.poi.ExcelUtil;
|
||||
import com.god.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 考核模式管理Controller
|
||||
*
|
||||
* @author wangyan
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pzhmyManage/pattern")
|
||||
public class PzhmyAssessPatternController extends BaseController {
|
||||
@Autowired
|
||||
private IPzhmyAssessPatternService pzhmyAssessPatternService;
|
||||
|
||||
/**
|
||||
* 查询考核模式管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pzhmyManage:pattern:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PzhmyAssessPattern pzhmyAssessPattern) {
|
||||
startPage();
|
||||
List<PzhmyAssessPattern> list = pzhmyAssessPatternService.selectPzhmyAssessPatternList(pzhmyAssessPattern);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出考核模式管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pzhmyManage:pattern:export')")
|
||||
@Log(title = "考核模式管理", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PzhmyAssessPattern pzhmyAssessPattern) {
|
||||
List<PzhmyAssessPattern> list = pzhmyAssessPatternService.selectPzhmyAssessPatternList(pzhmyAssessPattern);
|
||||
ExcelUtil<PzhmyAssessPattern> util = new ExcelUtil<PzhmyAssessPattern>(PzhmyAssessPattern.class);
|
||||
util.exportExcel(response, list, "考核模式管理数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取考核模式管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pzhmyManage:pattern:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id) {
|
||||
return success(pzhmyAssessPatternService.selectPzhmyAssessPatternById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考核模式管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pzhmyManage:pattern:add')")
|
||||
@Log(title = "考核模式管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PzhmyAssessPattern pzhmyAssessPattern) {
|
||||
return toAjax(pzhmyAssessPatternService.insertPzhmyAssessPattern(pzhmyAssessPattern));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考核模式管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pzhmyManage:pattern:edit')")
|
||||
@Log(title = "考核模式管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PzhmyAssessPattern pzhmyAssessPattern) {
|
||||
return toAjax(pzhmyAssessPatternService.updatePzhmyAssessPattern(pzhmyAssessPattern));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考核模式管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('pzhmyManage:pattern:remove')")
|
||||
@Log(title = "考核模式管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids) {
|
||||
return toAjax(pzhmyAssessPatternService.deletePzhmyAssessPatternByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,178 @@
|
||||
package com.god.pzhmyManage.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.god.common.annotation.Excel;
|
||||
import com.god.common.core.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 考核模式管理对象 pzhmy_assess_pattern
|
||||
*
|
||||
* @author wangyan
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public class PzhmyAssessPattern extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private String id;
|
||||
|
||||
/** 模式名称 */
|
||||
@Excel(name = "模式名称")
|
||||
private String patternName;
|
||||
|
||||
/** 模式类别 */
|
||||
@Excel(name = "模式类别")
|
||||
private String patternType;
|
||||
|
||||
/** 考核周期 */
|
||||
@Excel(name = "考核周期")
|
||||
private String assessCycle;
|
||||
|
||||
/** 评估标准 */
|
||||
@Excel(name = "评估标准")
|
||||
private String assessStandard;
|
||||
|
||||
/** 考核岗位 */
|
||||
@Excel(name = "考核岗位")
|
||||
private String assessStation;
|
||||
|
||||
/** 添加时间 */
|
||||
@Excel(name = "添加时间")
|
||||
private String addTime;
|
||||
|
||||
/** 添加人 */
|
||||
@Excel(name = "添加人")
|
||||
private String addPerson;
|
||||
|
||||
/** 审批时间 */
|
||||
@Excel(name = "审批时间")
|
||||
private String approvalTime;
|
||||
|
||||
/** 审批人 */
|
||||
@Excel(name = "审批人")
|
||||
private String approvalPerson;
|
||||
|
||||
/** 数据类型 */
|
||||
@Excel(name = "数据类型")
|
||||
private String dataType;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setPatternName(String patternName)
|
||||
{
|
||||
this.patternName = patternName;
|
||||
}
|
||||
|
||||
public String getPatternName()
|
||||
{
|
||||
return patternName;
|
||||
}
|
||||
public void setPatternType(String patternType)
|
||||
{
|
||||
this.patternType = patternType;
|
||||
}
|
||||
|
||||
public String getPatternType()
|
||||
{
|
||||
return patternType;
|
||||
}
|
||||
public void setAssessCycle(String assessCycle)
|
||||
{
|
||||
this.assessCycle = assessCycle;
|
||||
}
|
||||
|
||||
public String getAssessCycle()
|
||||
{
|
||||
return assessCycle;
|
||||
}
|
||||
public void setAssessStandard(String assessStandard)
|
||||
{
|
||||
this.assessStandard = assessStandard;
|
||||
}
|
||||
|
||||
public String getAssessStandard()
|
||||
{
|
||||
return assessStandard;
|
||||
}
|
||||
public void setAssessStation(String assessStation)
|
||||
{
|
||||
this.assessStation = assessStation;
|
||||
}
|
||||
|
||||
public String getAssessStation()
|
||||
{
|
||||
return assessStation;
|
||||
}
|
||||
public void setAddTime(String addTime)
|
||||
{
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
public String getAddTime()
|
||||
{
|
||||
return addTime;
|
||||
}
|
||||
public void setAddPerson(String addPerson)
|
||||
{
|
||||
this.addPerson = addPerson;
|
||||
}
|
||||
|
||||
public String getAddPerson()
|
||||
{
|
||||
return addPerson;
|
||||
}
|
||||
public void setApprovalTime(String approvalTime)
|
||||
{
|
||||
this.approvalTime = approvalTime;
|
||||
}
|
||||
|
||||
public String getApprovalTime()
|
||||
{
|
||||
return approvalTime;
|
||||
}
|
||||
public void setApprovalPerson(String approvalPerson)
|
||||
{
|
||||
this.approvalPerson = approvalPerson;
|
||||
}
|
||||
|
||||
public String getApprovalPerson()
|
||||
{
|
||||
return approvalPerson;
|
||||
}
|
||||
public void setDataType(String dataType)
|
||||
{
|
||||
this.dataType = dataType;
|
||||
}
|
||||
|
||||
public String getDataType()
|
||||
{
|
||||
return dataType;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("patternName", getPatternName())
|
||||
.append("patternType", getPatternType())
|
||||
.append("assessCycle", getAssessCycle())
|
||||
.append("assessStandard", getAssessStandard())
|
||||
.append("assessStation", getAssessStation())
|
||||
.append("addTime", getAddTime())
|
||||
.append("addPerson", getAddPerson())
|
||||
.append("approvalTime", getApprovalTime())
|
||||
.append("approvalPerson", getApprovalPerson())
|
||||
.append("dataType", getDataType())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.pzhmyManage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.god.pzhmyManage.domain.PzhmyAssessPattern;
|
||||
|
||||
/**
|
||||
* 考核模式管理Mapper接口
|
||||
*
|
||||
* @author wangyan
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface PzhmyAssessPatternMapper
|
||||
{
|
||||
/**
|
||||
* 查询考核模式管理
|
||||
*
|
||||
* @param id 考核模式管理主键
|
||||
* @return 考核模式管理
|
||||
*/
|
||||
public PzhmyAssessPattern selectPzhmyAssessPatternById(String id);
|
||||
|
||||
/**
|
||||
* 查询考核模式管理列表
|
||||
*
|
||||
* @param pzhmyAssessPattern 考核模式管理
|
||||
* @return 考核模式管理集合
|
||||
*/
|
||||
public List<PzhmyAssessPattern> selectPzhmyAssessPatternList(PzhmyAssessPattern pzhmyAssessPattern);
|
||||
|
||||
/**
|
||||
* 新增考核模式管理
|
||||
*
|
||||
* @param pzhmyAssessPattern 考核模式管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPzhmyAssessPattern(PzhmyAssessPattern pzhmyAssessPattern);
|
||||
|
||||
/**
|
||||
* 修改考核模式管理
|
||||
*
|
||||
* @param pzhmyAssessPattern 考核模式管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePzhmyAssessPattern(PzhmyAssessPattern pzhmyAssessPattern);
|
||||
|
||||
/**
|
||||
* 删除考核模式管理
|
||||
*
|
||||
* @param id 考核模式管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePzhmyAssessPatternById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除考核模式管理
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePzhmyAssessPatternByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.god.pzhmyManage.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.god.pzhmyManage.domain.PzhmyAssessPattern;
|
||||
|
||||
/**
|
||||
* 考核模式管理Service接口
|
||||
*
|
||||
* @author wangyan
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
public interface IPzhmyAssessPatternService
|
||||
{
|
||||
/**
|
||||
* 查询考核模式管理
|
||||
*
|
||||
* @param id 考核模式管理主键
|
||||
* @return 考核模式管理
|
||||
*/
|
||||
public PzhmyAssessPattern selectPzhmyAssessPatternById(String id);
|
||||
|
||||
/**
|
||||
* 查询考核模式管理列表
|
||||
*
|
||||
* @param pzhmyAssessPattern 考核模式管理
|
||||
* @return 考核模式管理集合
|
||||
*/
|
||||
public List<PzhmyAssessPattern> selectPzhmyAssessPatternList(PzhmyAssessPattern pzhmyAssessPattern);
|
||||
|
||||
/**
|
||||
* 新增考核模式管理
|
||||
*
|
||||
* @param pzhmyAssessPattern 考核模式管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPzhmyAssessPattern(PzhmyAssessPattern pzhmyAssessPattern);
|
||||
|
||||
/**
|
||||
* 修改考核模式管理
|
||||
*
|
||||
* @param pzhmyAssessPattern 考核模式管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePzhmyAssessPattern(PzhmyAssessPattern pzhmyAssessPattern);
|
||||
|
||||
/**
|
||||
* 批量删除考核模式管理
|
||||
*
|
||||
* @param ids 需要删除的考核模式管理主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePzhmyAssessPatternByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除考核模式管理信息
|
||||
*
|
||||
* @param id 考核模式管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePzhmyAssessPatternById(String id);
|
||||
}
|
@ -0,0 +1,92 @@
|
||||
package com.god.pzhmyManage.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.god.common.utils.StringUtils;
|
||||
import com.god.common.utils.uuid.IdUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.god.pzhmyManage.mapper.PzhmyAssessPatternMapper;
|
||||
import com.god.pzhmyManage.domain.PzhmyAssessPattern;
|
||||
import com.god.pzhmyManage.service.IPzhmyAssessPatternService;
|
||||
|
||||
/**
|
||||
* 考核模式管理Service业务层处理
|
||||
*
|
||||
* @author wangyan
|
||||
* @date 2023-12-18
|
||||
*/
|
||||
@Service
|
||||
public class PzhmyAssessPatternServiceImpl implements IPzhmyAssessPatternService {
|
||||
@Autowired
|
||||
private PzhmyAssessPatternMapper pzhmyAssessPatternMapper;
|
||||
|
||||
/**
|
||||
* 查询考核模式管理
|
||||
*
|
||||
* @param id 考核模式管理主键
|
||||
* @return 考核模式管理
|
||||
*/
|
||||
@Override
|
||||
public PzhmyAssessPattern selectPzhmyAssessPatternById(String id) {
|
||||
return pzhmyAssessPatternMapper.selectPzhmyAssessPatternById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询考核模式管理列表
|
||||
*
|
||||
* @param pzhmyAssessPattern 考核模式管理
|
||||
* @return 考核模式管理
|
||||
*/
|
||||
@Override
|
||||
public List<PzhmyAssessPattern> selectPzhmyAssessPatternList(PzhmyAssessPattern pzhmyAssessPattern) {
|
||||
return pzhmyAssessPatternMapper.selectPzhmyAssessPatternList(pzhmyAssessPattern);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增考核模式管理
|
||||
*
|
||||
* @param pzhmyAssessPattern 考核模式管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPzhmyAssessPattern(PzhmyAssessPattern pzhmyAssessPattern) {
|
||||
if (StringUtils.isBlank(pzhmyAssessPattern.getId())) {
|
||||
pzhmyAssessPattern.setId(IdUtils.fastSimpleUUID());
|
||||
}
|
||||
return pzhmyAssessPatternMapper.insertPzhmyAssessPattern(pzhmyAssessPattern);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改考核模式管理
|
||||
*
|
||||
* @param pzhmyAssessPattern 考核模式管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePzhmyAssessPattern(PzhmyAssessPattern pzhmyAssessPattern) {
|
||||
return pzhmyAssessPatternMapper.updatePzhmyAssessPattern(pzhmyAssessPattern);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除考核模式管理
|
||||
*
|
||||
* @param ids 需要删除的考核模式管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePzhmyAssessPatternByIds(String[] ids) {
|
||||
return pzhmyAssessPatternMapper.deletePzhmyAssessPatternByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除考核模式管理信息
|
||||
*
|
||||
* @param id 考核模式管理主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePzhmyAssessPatternById(String id) {
|
||||
return pzhmyAssessPatternMapper.deletePzhmyAssessPatternById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,107 @@
|
||||
<?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.god.pzhmyManage.mapper.PzhmyAssessPatternMapper">
|
||||
|
||||
<resultMap type="PzhmyAssessPattern" id="PzhmyAssessPatternResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="patternName" column="pattern_name" />
|
||||
<result property="patternType" column="pattern_type" />
|
||||
<result property="assessCycle" column="assess_cycle" />
|
||||
<result property="assessStandard" column="assess_standard" />
|
||||
<result property="assessStation" column="assess_station" />
|
||||
<result property="addTime" column="add_time" />
|
||||
<result property="addPerson" column="add_person" />
|
||||
<result property="approvalTime" column="approval_time" />
|
||||
<result property="approvalPerson" column="approval_person" />
|
||||
<result property="dataType" column="data_type" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPzhmyAssessPatternVo">
|
||||
select id, pattern_name, pattern_type, assess_cycle, assess_standard, assess_station, add_time, add_person, approval_time, approval_person, data_type, remark from pzhmy_assess_pattern
|
||||
</sql>
|
||||
|
||||
<select id="selectPzhmyAssessPatternList" parameterType="PzhmyAssessPattern" resultMap="PzhmyAssessPatternResult">
|
||||
<include refid="selectPzhmyAssessPatternVo"/>
|
||||
<where>
|
||||
<if test="patternName != null and patternName != ''"> and pattern_name like concat('%', #{patternName}, '%')</if>
|
||||
<if test="patternType != null and patternType != ''"> and pattern_type like concat('%', #{patternType}, '%')</if>
|
||||
<if test="assessCycle != null and assessCycle != ''"> and assess_cycle like concat('%', #{assessCycle}, '%')</if>
|
||||
<if test="assessStandard != null and assessStandard != ''"> and assess_standard like concat('%', #{assessStandard}, '%')</if>
|
||||
<if test="assessStation != null and assessStation != ''"> and assess_station like concat('%', #{assessStation}, '%')</if>
|
||||
<if test="addTime != null and addTime != ''"> and add_time >= #{addTime}</if>
|
||||
<if test="addPerson != null and addPerson != ''"> and add_person like concat('%', #{addPerson}, '%')</if>
|
||||
<if test="params.beginApprovalTime != null and params.beginApprovalTime != '' and params.endApprovalTime != null and params.endApprovalTime != ''"> and approval_time between #{params.beginApprovalTime} and #{params.endApprovalTime}</if>
|
||||
<if test="approvalPerson != null and approvalPerson != ''"> and approval_person like concat('%', #{approvalPerson}, '%')</if>
|
||||
<if test="dataType != null and dataType != ''"> and data_type = #{dataType}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectPzhmyAssessPatternById" parameterType="String" resultMap="PzhmyAssessPatternResult">
|
||||
<include refid="selectPzhmyAssessPatternVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPzhmyAssessPattern" parameterType="PzhmyAssessPattern">
|
||||
insert into pzhmy_assess_pattern
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="patternName != null">pattern_name,</if>
|
||||
<if test="patternType != null">pattern_type,</if>
|
||||
<if test="assessCycle != null">assess_cycle,</if>
|
||||
<if test="assessStandard != null">assess_standard,</if>
|
||||
<if test="assessStation != null">assess_station,</if>
|
||||
<if test="addTime != null">add_time,</if>
|
||||
<if test="addPerson != null">add_person,</if>
|
||||
<if test="approvalTime != null">approval_time,</if>
|
||||
<if test="approvalPerson != null">approval_person,</if>
|
||||
<if test="dataType != null">data_type,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="patternName != null">#{patternName},</if>
|
||||
<if test="patternType != null">#{patternType},</if>
|
||||
<if test="assessCycle != null">#{assessCycle},</if>
|
||||
<if test="assessStandard != null">#{assessStandard},</if>
|
||||
<if test="assessStation != null">#{assessStation},</if>
|
||||
<if test="addTime != null">#{addTime},</if>
|
||||
<if test="addPerson != null">#{addPerson},</if>
|
||||
<if test="approvalTime != null">#{approvalTime},</if>
|
||||
<if test="approvalPerson != null">#{approvalPerson},</if>
|
||||
<if test="dataType != null">#{dataType},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePzhmyAssessPattern" parameterType="PzhmyAssessPattern">
|
||||
update pzhmy_assess_pattern
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="patternName != null">pattern_name = #{patternName},</if>
|
||||
<if test="patternType != null">pattern_type = #{patternType},</if>
|
||||
<if test="assessCycle != null">assess_cycle = #{assessCycle},</if>
|
||||
<if test="assessStandard != null">assess_standard = #{assessStandard},</if>
|
||||
<if test="assessStation != null">assess_station = #{assessStation},</if>
|
||||
<if test="addTime != null">add_time = #{addTime},</if>
|
||||
<if test="addPerson != null">add_person = #{addPerson},</if>
|
||||
<if test="approvalTime != null">approval_time = #{approvalTime},</if>
|
||||
<if test="approvalPerson != null">approval_person = #{approvalPerson},</if>
|
||||
<if test="dataType != null">data_type = #{dataType},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePzhmyAssessPatternById" parameterType="String">
|
||||
delete from pzhmy_assess_pattern where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePzhmyAssessPatternByIds" parameterType="String">
|
||||
delete from pzhmy_assess_pattern where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
44
god-ui/src/api/pzhmyManage/pattern.js
Normal file
44
god-ui/src/api/pzhmyManage/pattern.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询考核模式管理列表
|
||||
export function listPattern(query) {
|
||||
return request({
|
||||
url: '/pzhmyManage/pattern/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询考核模式管理详细
|
||||
export function getPattern(id) {
|
||||
return request({
|
||||
url: '/pzhmyManage/pattern/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增考核模式管理
|
||||
export function addPattern(data) {
|
||||
return request({
|
||||
url: '/pzhmyManage/pattern',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改考核模式管理
|
||||
export function updatePattern(data) {
|
||||
return request({
|
||||
url: '/pzhmyManage/pattern',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除考核模式管理
|
||||
export function delPattern(id) {
|
||||
return request({
|
||||
url: '/pzhmyManage/pattern/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
413
god-ui/src/views/pzhmyManage/assessCycle/index.vue
Normal file
413
god-ui/src/views/pzhmyManage/assessCycle/index.vue
Normal file
@ -0,0 +1,413 @@
|
||||
<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="patternName">
|
||||
<el-input
|
||||
v-model="queryParams.patternName"
|
||||
placeholder="请输入绩效活动"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="考核模式" prop="patternType">
|
||||
<el-select v-model="queryParams.patternType" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="考核周期" prop="assessCycle">
|
||||
<el-input
|
||||
v-model="queryParams.assessCycle"
|
||||
placeholder="请输入考核周期"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="考核状态" prop="assessStation">
|
||||
<el-input
|
||||
v-model="queryParams.assessStation"
|
||||
placeholder="请输入考核状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="提交时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择提交时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="发起人" prop="addPerson">
|
||||
<el-input
|
||||
v-model="queryParams.addPerson"
|
||||
placeholder="请输入发起人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeApprovalTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批人" prop="approvalPerson">
|
||||
<el-input
|
||||
v-model="queryParams.approvalPerson"
|
||||
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="['pzhmyManage:pattern: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="['pzhmyManage:pattern: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="['pzhmyManage:pattern:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="patternList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="绩效活动" align="center" prop="patternName" />
|
||||
<el-table-column label="考核模式" align="center" prop="patternType" />
|
||||
<el-table-column label="发起人" align="center" prop="addPerson" />
|
||||
<el-table-column label="考核周期" align="center" prop="assessCycle" />
|
||||
<el-table-column label="考评指标" align="center" prop="assessStandard" />
|
||||
<el-table-column label="提交时间" align="center" prop="addTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.addTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批时间" align="center" prop="approvalTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.approvalTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="审批人" align="center" prop="approvalPerson" />
|
||||
<el-table-column label="考核状态" align="center" prop="assessStation" >
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.assessStation === '已结束'">已结束</el-tag>
|
||||
<el-tag type="success" v-else-if="scope.row.assessStation === '进行中'">进行中</el-tag>
|
||||
<el-tag type="warning" v-else-if="scope.row.assessStation === '已提交'">已提交</el-tag>
|
||||
<div v-else>{{scope.row.assessStation}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="数据类型" align="center" prop="dataType" />-->
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<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="['pzhmyManage:pattern:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['pzhmyManage:pattern: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="patternName">
|
||||
<el-input v-model="form.patternName" placeholder="请输入绩效活动" />
|
||||
</el-form-item>
|
||||
<el-form-item label="考核模式" prop="patternType">
|
||||
<el-select v-model="form.patternType" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="考核周期" prop="assessCycle">
|
||||
<el-input v-model="form.assessCycle" placeholder="请输入考核周期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="考评指标" prop="assessStandard">
|
||||
<el-input v-model="form.assessStandard" type="textarea" placeholder="请输入考评指标" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发起人" prop="addPerson">
|
||||
<el-input v-model="form.addPerson" placeholder="请输入发起人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="提交时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择提交时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批时间" prop="approvalTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.approvalTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择审批时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批人" prop="approvalPerson">
|
||||
<el-input v-model="form.approvalPerson" placeholder="请输入审批人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="考核状态" prop="assessStation">
|
||||
<el-input v-model="form.assessStation" placeholder="请输入考核状态" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="数据类型" prop="dataType">-->
|
||||
<!-- <el-input v-model="form.dataType" 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="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPattern, getPattern, delPattern, addPattern, updatePattern } from "@/api/pzhmyManage/pattern";
|
||||
|
||||
export default {
|
||||
//绩效评估周期和过程控制
|
||||
name: "Pattern",
|
||||
data() {
|
||||
return {
|
||||
options: [{
|
||||
value: '月度绩效考核',
|
||||
label: '月度绩效考核'
|
||||
}, {
|
||||
value: '年度绩效评估',
|
||||
label: '年度绩效评估'
|
||||
}, {
|
||||
value: '季度销售目标考核',
|
||||
label: '季度销售目标考核'
|
||||
}, {
|
||||
value: '项目绩效评估',
|
||||
label: '项目绩效评估'
|
||||
}, {
|
||||
value: '员工创新能力考核',
|
||||
label: '员工创新能力考核'
|
||||
}],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 考核模式管理表格数据
|
||||
patternList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 备注时间范围
|
||||
daterangeApprovalTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
patternName: null,
|
||||
patternType: null,
|
||||
assessCycle: null,
|
||||
assessStandard: null,
|
||||
assessStation: null,
|
||||
addTime: null,
|
||||
addPerson: null,
|
||||
approvalTime: null,
|
||||
approvalPerson: null,
|
||||
dataType: "评估周期",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询考核模式管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeApprovalTime && '' != this.daterangeApprovalTime) {
|
||||
this.queryParams.params["beginApprovalTime"] = this.daterangeApprovalTime[0];
|
||||
this.queryParams.params["endApprovalTime"] = this.daterangeApprovalTime[1];
|
||||
}
|
||||
listPattern(this.queryParams).then(response => {
|
||||
this.patternList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
patternName: null,
|
||||
patternType: null,
|
||||
assessCycle: null,
|
||||
assessStandard: null,
|
||||
assessStation: null,
|
||||
addTime: null,
|
||||
addPerson: null,
|
||||
approvalTime: null,
|
||||
approvalPerson: null,
|
||||
dataType: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeApprovalTime = [];
|
||||
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 = "添加绩效评估周期和过程控制";
|
||||
this.form.dataType="评估周期";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPattern(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) {
|
||||
updatePattern(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPattern(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 delPattern(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('pzhmyManage/pattern/export', {
|
||||
...this.queryParams
|
||||
}, `pattern_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
417
god-ui/src/views/pzhmyManage/pattern/index.vue
Normal file
417
god-ui/src/views/pzhmyManage/pattern/index.vue
Normal file
@ -0,0 +1,417 @@
|
||||
<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="patternName">
|
||||
<el-input
|
||||
v-model="queryParams.patternName"
|
||||
placeholder="请输入模式名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="模式类别" prop="patternType">
|
||||
<el-select v-model="queryParams.patternType" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="考核周期" prop="assessCycle">
|
||||
<el-input
|
||||
v-model="queryParams.assessCycle"
|
||||
placeholder="请输入考核周期"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="考核岗位" prop="assessStation">
|
||||
<el-input
|
||||
v-model="queryParams.assessStation"
|
||||
placeholder="请输入考核岗位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="添加时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="添加人" prop="addPerson">
|
||||
<el-input
|
||||
v-model="queryParams.addPerson"
|
||||
placeholder="请输入添加人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="审批时间">-->
|
||||
<!-- <el-date-picker-->
|
||||
<!-- v-model="daterangeApprovalTime"-->
|
||||
<!-- style="width: 240px"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- type="daterange"-->
|
||||
<!-- range-separator="-"-->
|
||||
<!-- start-placeholder="开始日期"-->
|
||||
<!-- end-placeholder="结束日期"-->
|
||||
<!-- ></el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="审批人" prop="approvalPerson">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.approvalPerson"-->
|
||||
<!-- placeholder="请输入审批人"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="数据类型" prop="dataType">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.dataType"-->
|
||||
<!-- 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="['pzhmyManage:pattern: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="['pzhmyManage:pattern: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="['pzhmyManage:pattern: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="['pzhmyManage:pattern:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="patternList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="模式名称" align="center" prop="patternName" />
|
||||
<el-table-column label="模式类别" align="center" prop="patternType" />
|
||||
<el-table-column label="考核周期" align="center" prop="assessCycle" />
|
||||
<el-table-column label="评估标准" align="center" prop="assessStandard" />
|
||||
<el-table-column label="考核岗位" align="center" prop="assessStation" />
|
||||
<el-table-column label="添加时间" align="center" prop="addTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.addTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="添加人" align="center" prop="addPerson" />
|
||||
<!-- <el-table-column label="审批时间" align="center" prop="approvalTime" width="180">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <span>{{ parseTime(scope.row.approvalTime, '{y}-{m}-{d}') }}</span>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
<!-- <el-table-column label="审批人" align="center" prop="approvalPerson" />-->
|
||||
<!-- <el-table-column label="数据类型" align="center" prop="dataType" />-->
|
||||
<el-table-column label="权重" align="center" prop="remark" />
|
||||
<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="['pzhmyManage:pattern:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['pzhmyManage:pattern: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="patternName">
|
||||
<el-input v-model="form.patternName" placeholder="请输入模式名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="模式类别" prop="patternType">
|
||||
<el-select v-model="form.patternType" clearable placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="考核周期" prop="assessCycle">
|
||||
<el-input v-model="form.assessCycle" placeholder="请输入考核周期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="评估标准" prop="assessStandard">
|
||||
<el-input v-model="form.assessStandard" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="考核岗位" prop="assessStation">
|
||||
<el-input v-model="form.assessStation" placeholder="请输入考核岗位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="添加时间" prop="addTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.addTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择添加时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="添加人" prop="addPerson">
|
||||
<el-input v-model="form.addPerson" placeholder="请输入添加人" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="审批时间" prop="approvalTime">-->
|
||||
<!-- <el-date-picker clearable-->
|
||||
<!-- v-model="form.approvalTime"-->
|
||||
<!-- type="date"-->
|
||||
<!-- value-format="yyyy-MM-dd"-->
|
||||
<!-- placeholder="请选择审批时间">-->
|
||||
<!-- </el-date-picker>-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="审批人" prop="approvalPerson">-->
|
||||
<!-- <el-input v-model="form.approvalPerson" placeholder="请输入审批人" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<!-- <el-form-item label="数据类型" prop="dataType">-->
|
||||
<!-- <el-input v-model="form.dataType" 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="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPattern, getPattern, delPattern, addPattern, updatePattern } from "@/api/pzhmyManage/pattern";
|
||||
|
||||
export default {
|
||||
//考核模式管理
|
||||
name: "Pattern",
|
||||
data() {
|
||||
return {
|
||||
options: [{
|
||||
value: '单一考核',
|
||||
label: '单一考核'
|
||||
}, {
|
||||
value: '上级主管直接考核',
|
||||
label: '上级主管直接考核'
|
||||
}, {
|
||||
value: '集中考核',
|
||||
label: '集中考核'
|
||||
}],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 考核模式管理表格数据
|
||||
patternList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 备注时间范围
|
||||
daterangeApprovalTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
patternName: null,
|
||||
patternType: null,
|
||||
assessCycle: null,
|
||||
assessStandard: null,
|
||||
assessStation: null,
|
||||
addTime: null,
|
||||
addPerson: null,
|
||||
approvalTime: null,
|
||||
approvalPerson: null,
|
||||
dataType: "考核模式",
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询考核模式管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeApprovalTime && '' != this.daterangeApprovalTime) {
|
||||
this.queryParams.params["beginApprovalTime"] = this.daterangeApprovalTime[0];
|
||||
this.queryParams.params["endApprovalTime"] = this.daterangeApprovalTime[1];
|
||||
}
|
||||
listPattern(this.queryParams).then(response => {
|
||||
this.patternList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
patternName: null,
|
||||
patternType: null,
|
||||
assessCycle: null,
|
||||
assessStandard: null,
|
||||
assessStation: null,
|
||||
addTime: null,
|
||||
addPerson: null,
|
||||
approvalTime: null,
|
||||
approvalPerson: null,
|
||||
dataType: null,
|
||||
remark: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeApprovalTime = [];
|
||||
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 = "添加考核模式管理";
|
||||
this.form.dataType="考核模式";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getPattern(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) {
|
||||
updatePattern(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPattern(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 delPattern(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('pzhmyManage/pattern/export', {
|
||||
...this.queryParams
|
||||
}, `pattern_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user