Commit 7564443a authored by 王晓倩's avatar 王晓倩

投诉处置基础代码

parent f787c3d7
package com.zehong.web.controller.complainDeal;
import java.util.List;
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.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TComplainDeal;
import com.zehong.system.service.ITComplainDealService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 投诉处置Controller
*
* @author zehong
* @date 2022-02-15
*/
@RestController
@RequestMapping("/complainDeal")
public class TComplainDealController extends BaseController
{
@Autowired
private ITComplainDealService tComplainDealService;
/**
* 查询投诉处置列表
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:list')")
@GetMapping("/list")
public TableDataInfo list(TComplainDeal tComplainDeal)
{
startPage();
List<TComplainDeal> list = tComplainDealService.selectTComplainDealList(tComplainDeal);
return getDataTable(list);
}
/**
* 导出投诉处置列表
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:export')")
@Log(title = "投诉处置", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TComplainDeal tComplainDeal)
{
List<TComplainDeal> list = tComplainDealService.selectTComplainDealList(tComplainDeal);
ExcelUtil<TComplainDeal> util = new ExcelUtil<TComplainDeal>(TComplainDeal.class);
return util.exportExcel(list, "投诉处置数据");
}
/**
* 获取投诉处置详细信息
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:query')")
@GetMapping(value = "/{complainDealId}")
public AjaxResult getInfo(@PathVariable("complainDealId") Long complainDealId)
{
return AjaxResult.success(tComplainDealService.selectTComplainDealById(complainDealId));
}
/**
* 新增投诉处置
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:add')")
@Log(title = "投诉处置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TComplainDeal tComplainDeal)
{
return toAjax(tComplainDealService.insertTComplainDeal(tComplainDeal));
}
/**
* 修改投诉处置
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:edit')")
@Log(title = "投诉处置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TComplainDeal tComplainDeal)
{
return toAjax(tComplainDealService.updateTComplainDeal(tComplainDeal));
}
/**
* 删除投诉处置
*/
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:remove')")
@Log(title = "投诉处置", businessType = BusinessType.DELETE)
@DeleteMapping("/{complainDealIds}")
public AjaxResult remove(@PathVariable Long[] complainDealIds)
{
return toAjax(tComplainDealService.deleteTComplainDealByIds(complainDealIds));
}
}
package com.zehong.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 投诉处置对象 t_complain_deal
*
* @author zehong
* @date 2022-02-15
*/
public class TComplainDeal extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 投诉处置id */
private Long complainDealId;
/** 投诉人姓名 */
@Excel(name = "投诉人姓名")
private String complainName;
/** 投诉人电话 */
@Excel(name = "投诉人电话")
private String complainPhone;
/** 投诉事项 */
@Excel(name = "投诉事项")
private String complainMatter;
/** 转办记录 */
@Excel(name = "转办记录")
private String transferRecord;
/** 办理情况 */
@Excel(name = "办理情况")
private String dealCondition;
/** 指派单位名称 */
@Excel(name = "指派单位名称")
private String complainAssignEnterproseName;
/** 指派单位id */
@Excel(name = "指派单位id")
private Long complainAssignEnterproseId;
/** 指派人 */
@Excel(name = "指派人")
private String complainAssignManId;
/** 指派人id */
@Excel(name = "指派人id")
private Long complainAssignMan;
/** 任务状态:1.派发中 2.反馈 3.归档 */
@Excel(name = "任务状态:1.派发中 2.反馈 3.归档")
private String complainStatus;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setComplainDealId(Long complainDealId)
{
this.complainDealId = complainDealId;
}
public Long getComplainDealId()
{
return complainDealId;
}
public void setComplainName(String complainName)
{
this.complainName = complainName;
}
public String getComplainName()
{
return complainName;
}
public void setComplainPhone(String complainPhone)
{
this.complainPhone = complainPhone;
}
public String getComplainPhone()
{
return complainPhone;
}
public void setComplainMatter(String complainMatter)
{
this.complainMatter = complainMatter;
}
public String getComplainMatter()
{
return complainMatter;
}
public void setTransferRecord(String transferRecord)
{
this.transferRecord = transferRecord;
}
public String getTransferRecord()
{
return transferRecord;
}
public void setDealCondition(String dealCondition)
{
this.dealCondition = dealCondition;
}
public String getDealCondition()
{
return dealCondition;
}
public void setComplainAssignEnterproseName(String complainAssignEnterproseName)
{
this.complainAssignEnterproseName = complainAssignEnterproseName;
}
public String getComplainAssignEnterproseName()
{
return complainAssignEnterproseName;
}
public void setComplainAssignEnterproseId(Long complainAssignEnterproseId)
{
this.complainAssignEnterproseId = complainAssignEnterproseId;
}
public Long getComplainAssignEnterproseId()
{
return complainAssignEnterproseId;
}
public void setComplainAssignManId(String complainAssignManId)
{
this.complainAssignManId = complainAssignManId;
}
public String getComplainAssignManId()
{
return complainAssignManId;
}
public void setComplainAssignMan(Long complainAssignMan)
{
this.complainAssignMan = complainAssignMan;
}
public Long getComplainAssignMan()
{
return complainAssignMan;
}
public void setComplainStatus(String complainStatus)
{
this.complainStatus = complainStatus;
}
public String getComplainStatus()
{
return complainStatus;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("complainDealId", getComplainDealId())
.append("complainName", getComplainName())
.append("complainPhone", getComplainPhone())
.append("complainMatter", getComplainMatter())
.append("transferRecord", getTransferRecord())
.append("dealCondition", getDealCondition())
.append("complainAssignEnterproseName", getComplainAssignEnterproseName())
.append("complainAssignEnterproseId", getComplainAssignEnterproseId())
.append("complainAssignManId", getComplainAssignManId())
.append("complainAssignMan", getComplainAssignMan())
.append("complainStatus", getComplainStatus())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TComplainDeal;
/**
* 投诉处置Mapper接口
*
* @author zehong
* @date 2022-02-15
*/
public interface TComplainDealMapper
{
/**
* 查询投诉处置
*
* @param complainDealId 投诉处置ID
* @return 投诉处置
*/
public TComplainDeal selectTComplainDealById(Long complainDealId);
/**
* 查询投诉处置列表
*
* @param tComplainDeal 投诉处置
* @return 投诉处置集合
*/
public List<TComplainDeal> selectTComplainDealList(TComplainDeal tComplainDeal);
/**
* 新增投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
public int insertTComplainDeal(TComplainDeal tComplainDeal);
/**
* 修改投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
public int updateTComplainDeal(TComplainDeal tComplainDeal);
/**
* 删除投诉处置
*
* @param complainDealId 投诉处置ID
* @return 结果
*/
public int deleteTComplainDealById(Long complainDealId);
/**
* 批量删除投诉处置
*
* @param complainDealIds 需要删除的数据ID
* @return 结果
*/
public int deleteTComplainDealByIds(Long[] complainDealIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TComplainDeal;
/**
* 投诉处置Service接口
*
* @author zehong
* @date 2022-02-15
*/
public interface ITComplainDealService
{
/**
* 查询投诉处置
*
* @param complainDealId 投诉处置ID
* @return 投诉处置
*/
public TComplainDeal selectTComplainDealById(Long complainDealId);
/**
* 查询投诉处置列表
*
* @param tComplainDeal 投诉处置
* @return 投诉处置集合
*/
public List<TComplainDeal> selectTComplainDealList(TComplainDeal tComplainDeal);
/**
* 新增投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
public int insertTComplainDeal(TComplainDeal tComplainDeal);
/**
* 修改投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
public int updateTComplainDeal(TComplainDeal tComplainDeal);
/**
* 批量删除投诉处置
*
* @param complainDealIds 需要删除的投诉处置ID
* @return 结果
*/
public int deleteTComplainDealByIds(Long[] complainDealIds);
/**
* 删除投诉处置信息
*
* @param complainDealId 投诉处置ID
* @return 结果
*/
public int deleteTComplainDealById(Long complainDealId);
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TComplainDealMapper;
import com.zehong.system.domain.TComplainDeal;
import com.zehong.system.service.ITComplainDealService;
/**
* 投诉处置Service业务层处理
*
* @author zehong
* @date 2022-02-15
*/
@Service
public class TComplainDealServiceImpl implements ITComplainDealService
{
@Autowired
private TComplainDealMapper tComplainDealMapper;
/**
* 查询投诉处置
*
* @param complainDealId 投诉处置ID
* @return 投诉处置
*/
@Override
public TComplainDeal selectTComplainDealById(Long complainDealId)
{
return tComplainDealMapper.selectTComplainDealById(complainDealId);
}
/**
* 查询投诉处置列表
*
* @param tComplainDeal 投诉处置
* @return 投诉处置
*/
@Override
public List<TComplainDeal> selectTComplainDealList(TComplainDeal tComplainDeal)
{
return tComplainDealMapper.selectTComplainDealList(tComplainDeal);
}
/**
* 新增投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
@Override
public int insertTComplainDeal(TComplainDeal tComplainDeal)
{
tComplainDeal.setCreateTime(DateUtils.getNowDate());
return tComplainDealMapper.insertTComplainDeal(tComplainDeal);
}
/**
* 修改投诉处置
*
* @param tComplainDeal 投诉处置
* @return 结果
*/
@Override
public int updateTComplainDeal(TComplainDeal tComplainDeal)
{
tComplainDeal.setUpdateTime(DateUtils.getNowDate());
return tComplainDealMapper.updateTComplainDeal(tComplainDeal);
}
/**
* 批量删除投诉处置
*
* @param complainDealIds 需要删除的投诉处置ID
* @return 结果
*/
@Override
public int deleteTComplainDealByIds(Long[] complainDealIds)
{
return tComplainDealMapper.deleteTComplainDealByIds(complainDealIds);
}
/**
* 删除投诉处置信息
*
* @param complainDealId 投诉处置ID
* @return 结果
*/
@Override
public int deleteTComplainDealById(Long complainDealId)
{
return tComplainDealMapper.deleteTComplainDealById(complainDealId);
}
}
<?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.zehong.system.mapper.TComplainDealMapper">
<resultMap type="TComplainDeal" id="TComplainDealResult">
<result property="complainDealId" column="complain_deal_id" />
<result property="complainName" column="complain_name" />
<result property="complainPhone" column="complain_phone" />
<result property="complainMatter" column="complain_matter" />
<result property="transferRecord" column="transfer_record" />
<result property="dealCondition" column="deal_condition" />
<result property="complainAssignEnterproseName" column="complain_assign_enterprose_name" />
<result property="complainAssignEnterproseId" column="complain_assign_enterprose_id" />
<result property="complainAssignManId" column="complain_assign_man_id" />
<result property="complainAssignMan" column="complain_assign_man" />
<result property="complainStatus" column="complain_status" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTComplainDealVo">
select complain_deal_id, complain_name, complain_phone, complain_matter, transfer_record, deal_condition, complain_assign_enterprose_name, complain_assign_enterprose_id, complain_assign_man_id, complain_assign_man, complain_status, create_by, create_time, update_by, update_time, is_del, remarks from t_complain_deal
</sql>
<select id="selectTComplainDealList" parameterType="TComplainDeal" resultMap="TComplainDealResult">
<include refid="selectTComplainDealVo"/>
<where>
<if test="complainName != null and complainName != ''"> and complain_name like concat('%', #{complainName}, '%')</if>
<if test="complainPhone != null and complainPhone != ''"> and complain_phone = #{complainPhone}</if>
<if test="complainMatter != null and complainMatter != ''"> and complain_matter = #{complainMatter}</if>
<if test="transferRecord != null and transferRecord != ''"> and transfer_record = #{transferRecord}</if>
<if test="dealCondition != null and dealCondition != ''"> and deal_condition = #{dealCondition}</if>
<if test="complainAssignEnterproseName != null and complainAssignEnterproseName != ''"> and complain_assign_enterprose_name like concat('%', #{complainAssignEnterproseName}, '%')</if>
<if test="complainAssignEnterproseId != null "> and complain_assign_enterprose_id = #{complainAssignEnterproseId}</if>
<if test="complainAssignManId != null and complainAssignManId != ''"> and complain_assign_man_id = #{complainAssignManId}</if>
<if test="complainAssignMan != null "> and complain_assign_man = #{complainAssignMan}</if>
<if test="complainStatus != null and complainStatus != ''"> and complain_status = #{complainStatus}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTComplainDealById" parameterType="Long" resultMap="TComplainDealResult">
<include refid="selectTComplainDealVo"/>
where complain_deal_id = #{complainDealId}
</select>
<insert id="insertTComplainDeal" parameterType="TComplainDeal" useGeneratedKeys="true" keyProperty="complainDealId">
insert into t_complain_deal
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="complainName != null">complain_name,</if>
<if test="complainPhone != null">complain_phone,</if>
<if test="complainMatter != null">complain_matter,</if>
<if test="transferRecord != null">transfer_record,</if>
<if test="dealCondition != null">deal_condition,</if>
<if test="complainAssignEnterproseName != null">complain_assign_enterprose_name,</if>
<if test="complainAssignEnterproseId != null">complain_assign_enterprose_id,</if>
<if test="complainAssignManId != null">complain_assign_man_id,</if>
<if test="complainAssignMan != null">complain_assign_man,</if>
<if test="complainStatus != null">complain_status,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="complainName != null">#{complainName},</if>
<if test="complainPhone != null">#{complainPhone},</if>
<if test="complainMatter != null">#{complainMatter},</if>
<if test="transferRecord != null">#{transferRecord},</if>
<if test="dealCondition != null">#{dealCondition},</if>
<if test="complainAssignEnterproseName != null">#{complainAssignEnterproseName},</if>
<if test="complainAssignEnterproseId != null">#{complainAssignEnterproseId},</if>
<if test="complainAssignManId != null">#{complainAssignManId},</if>
<if test="complainAssignMan != null">#{complainAssignMan},</if>
<if test="complainStatus != null">#{complainStatus},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTComplainDeal" parameterType="TComplainDeal">
update t_complain_deal
<trim prefix="SET" suffixOverrides=",">
<if test="complainName != null">complain_name = #{complainName},</if>
<if test="complainPhone != null">complain_phone = #{complainPhone},</if>
<if test="complainMatter != null">complain_matter = #{complainMatter},</if>
<if test="transferRecord != null">transfer_record = #{transferRecord},</if>
<if test="dealCondition != null">deal_condition = #{dealCondition},</if>
<if test="complainAssignEnterproseName != null">complain_assign_enterprose_name = #{complainAssignEnterproseName},</if>
<if test="complainAssignEnterproseId != null">complain_assign_enterprose_id = #{complainAssignEnterproseId},</if>
<if test="complainAssignManId != null">complain_assign_man_id = #{complainAssignManId},</if>
<if test="complainAssignMan != null">complain_assign_man = #{complainAssignMan},</if>
<if test="complainStatus != null">complain_status = #{complainStatus},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where complain_deal_id = #{complainDealId}
</update>
<delete id="deleteTComplainDealById" parameterType="Long">
delete from t_complain_deal where complain_deal_id = #{complainDealId}
</delete>
<delete id="deleteTComplainDealByIds" parameterType="String">
delete from t_complain_deal where complain_deal_id in
<foreach item="complainDealId" collection="array" open="(" separator="," close=")">
#{complainDealId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
import request from '@/utils/request'
// 查询投诉处置列表
export function listComplainDeal(query) {
return request({
url: '/complainDeal/list',
method: 'get',
params: query
})
}
// 查询投诉处置详细
export function getComplainDeal(complainDealId) {
return request({
url: '/complainDeal/' + complainDealId,
method: 'get'
})
}
// 新增投诉处置
export function addComplainDeal(data) {
return request({
url: '/complainDeal',
method: 'post',
data: data
})
}
// 修改投诉处置
export function updateComplainDeal(data) {
return request({
url: '/complainDeal',
method: 'put',
data: data
})
}
// 删除投诉处置
export function delComplainDeal(complainDealId) {
return request({
url: '/complainDeal/' + complainDealId,
method: 'delete'
})
}
// 导出投诉处置
export function exportComplainDeal(query) {
return request({
url: '/complainDeal/complainDeal/export',
method: 'get',
params: query
})
}
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="投诉人姓名" prop="complainName">
<el-input
v-model="queryParams.complainName"
placeholder="请输入投诉人姓名"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="投诉人电话" prop="complainPhone">
<el-input
v-model="queryParams.complainPhone"
placeholder="请输入投诉人电话"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="投诉事项" prop="complainMatter">
<el-input
v-model="queryParams.complainMatter"
placeholder="请输入投诉事项"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="转办记录" prop="transferRecord">
<el-input
v-model="queryParams.transferRecord"
placeholder="请输入转办记录"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="办理情况" prop="dealCondition">
<el-input
v-model="queryParams.dealCondition"
placeholder="请输入办理情况"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派单位名称" prop="complainAssignEnterproseName">
<el-input
v-model="queryParams.complainAssignEnterproseName"
placeholder="请输入指派单位名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派单位id" prop="complainAssignEnterproseId">
<el-input
v-model="queryParams.complainAssignEnterproseId"
placeholder="请输入指派单位id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派人" prop="complainAssignManId">
<el-input
v-model="queryParams.complainAssignManId"
placeholder="请输入指派人"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派人id" prop="complainAssignMan">
<el-input
v-model="queryParams.complainAssignMan"
placeholder="请输入指派人id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务状态:1.派发中 2.反馈 3.归档" prop="complainStatus">
<el-select v-model="queryParams.complainStatus" placeholder="请选择任务状态:1.派发中 2.反馈 3.归档" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select>
</el-form-item>
<el-form-item label="是否删除(0正常,1删除)" prop="isDel">
<el-input
v-model="queryParams.isDel"
placeholder="请输入是否删除(0正常,1删除)"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input
v-model="queryParams.remarks"
placeholder="请输入备注"
clearable
size="small"
@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="['complainDeal:complainDeal: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="['complainDeal:complainDeal: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="['complainDeal:complainDeal:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['complainDeal:complainDeal:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="complainDealList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="投诉处置id" align="center" prop="complainDealId" />
<el-table-column label="投诉人姓名" align="center" prop="complainName" />
<el-table-column label="投诉人电话" align="center" prop="complainPhone" />
<el-table-column label="投诉事项" align="center" prop="complainMatter" />
<el-table-column label="转办记录" align="center" prop="transferRecord" />
<el-table-column label="办理情况" align="center" prop="dealCondition" />
<el-table-column label="指派单位名称" align="center" prop="complainAssignEnterproseName" />
<el-table-column label="指派单位id" align="center" prop="complainAssignEnterproseId" />
<el-table-column label="指派人" align="center" prop="complainAssignManId" />
<el-table-column label="指派人id" align="center" prop="complainAssignMan" />
<el-table-column label="任务状态:1.派发中 2.反馈 3.归档" align="center" prop="complainStatus" />
<el-table-column label="是否删除(0正常,1删除)" align="center" prop="isDel" />
<el-table-column label="备注" align="center" prop="remarks" />
<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="['complainDeal:complainDeal:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['complainDeal:complainDeal: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="complainName">
<el-input v-model="form.complainName" placeholder="请输入投诉人姓名" />
</el-form-item>
<el-form-item label="投诉人电话" prop="complainPhone">
<el-input v-model="form.complainPhone" placeholder="请输入投诉人电话" />
</el-form-item>
<el-form-item label="投诉事项" prop="complainMatter">
<el-input v-model="form.complainMatter" placeholder="请输入投诉事项" />
</el-form-item>
<el-form-item label="转办记录" prop="transferRecord">
<el-input v-model="form.transferRecord" placeholder="请输入转办记录" />
</el-form-item>
<el-form-item label="办理情况" prop="dealCondition">
<el-input v-model="form.dealCondition" placeholder="请输入办理情况" />
</el-form-item>
<el-form-item label="指派单位名称" prop="complainAssignEnterproseName">
<el-input v-model="form.complainAssignEnterproseName" placeholder="请输入指派单位名称" />
</el-form-item>
<el-form-item label="指派单位id" prop="complainAssignEnterproseId">
<el-input v-model="form.complainAssignEnterproseId" placeholder="请输入指派单位id" />
</el-form-item>
<el-form-item label="指派人" prop="complainAssignManId">
<el-input v-model="form.complainAssignManId" placeholder="请输入指派人" />
</el-form-item>
<el-form-item label="指派人id" prop="complainAssignMan">
<el-input v-model="form.complainAssignMan" placeholder="请输入指派人id" />
</el-form-item>
<el-form-item label="任务状态:1.派发中 2.反馈 3.归档">
<el-radio-group v-model="form.complainStatus">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="是否删除(0正常,1删除)" prop="isDel">
<el-input v-model="form.isDel" placeholder="请输入是否删除(0正常,1删除)" />
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" 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 { listComplainDeal, getComplainDeal, delComplainDeal, addComplainDeal, updateComplainDeal, exportComplainDeal } from "@/api/complainDeal";
export default {
name: "ComplainDeal",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 投诉处置表格数据
complainDealList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
complainName: null,
complainPhone: null,
complainMatter: null,
transferRecord: null,
dealCondition: null,
complainAssignEnterproseName: null,
complainAssignEnterproseId: null,
complainAssignManId: null,
complainAssignMan: null,
complainStatus: null,
isDel: null,
remarks: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询投诉处置列表 */
getList() {
this.loading = true;
listComplainDeal(this.queryParams).then(response => {
this.complainDealList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
complainDealId: null,
complainName: null,
complainPhone: null,
complainMatter: null,
transferRecord: null,
dealCondition: null,
complainAssignEnterproseName: null,
complainAssignEnterproseId: null,
complainAssignManId: null,
complainAssignMan: null,
complainStatus: "0",
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: 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.complainDealId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加投诉处置";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const complainDealId = row.complainDealId || this.ids
getComplainDeal(complainDealId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改投诉处置";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.complainDealId != null) {
updateComplainDeal(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addComplainDeal(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const complainDealIds = row.complainDealId || this.ids;
this.$confirm('是否确认删除投诉处置编号为"' + complainDealIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delComplainDeal(complainDealIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有投诉处置数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportComplainDeal(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment