parent
0b26acf5f7
commit
15b5735505
@ -0,0 +1,104 @@
|
|||||||
|
package com.ruoyi.kaohe.controller;
|
||||||
|
|
||||||
|
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.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.kaohe.domain.KhUidRecard;
|
||||||
|
import com.ruoyi.kaohe.service.IKhUidRecardService;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uid管理Controller
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2025-07-02
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/kaohe/uid")
|
||||||
|
public class KhUidRecardController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IKhUidRecardService khUidRecardService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询uid管理列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('kaohe:uid:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(KhUidRecard khUidRecard)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<KhUidRecard> list = khUidRecardService.selectKhUidRecardList(khUidRecard);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出uid管理列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('kaohe:uid:export')")
|
||||||
|
@Log(title = "uid管理", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, KhUidRecard khUidRecard)
|
||||||
|
{
|
||||||
|
List<KhUidRecard> list = khUidRecardService.selectKhUidRecardList(khUidRecard);
|
||||||
|
ExcelUtil<KhUidRecard> util = new ExcelUtil<KhUidRecard>(KhUidRecard.class);
|
||||||
|
util.exportExcel(response, list, "uid管理数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取uid管理详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('kaohe:uid:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(khUidRecardService.selectKhUidRecardById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增uid管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('kaohe:uid:add')")
|
||||||
|
@Log(title = "uid管理", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody KhUidRecard khUidRecard)
|
||||||
|
{
|
||||||
|
return toAjax(khUidRecardService.insertKhUidRecard(khUidRecard));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改uid管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('kaohe:uid:edit')")
|
||||||
|
@Log(title = "uid管理", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody KhUidRecard khUidRecard)
|
||||||
|
{
|
||||||
|
return toAjax(khUidRecardService.updateKhUidRecard(khUidRecard));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除uid管理
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('kaohe:uid:remove')")
|
||||||
|
@Log(title = "uid管理", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(khUidRecardService.deleteKhUidRecardByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,72 @@
|
|||||||
|
package com.ruoyi.kaohe.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uid管理对象 kh_uid_recard
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2025-07-02
|
||||||
|
*/
|
||||||
|
public class KhUidRecard extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 手机标识符 */
|
||||||
|
@Excel(name = "手机标识符")
|
||||||
|
private String uid;
|
||||||
|
|
||||||
|
/** 标识符对应姓名 */
|
||||||
|
@Excel(name = "标识符对应姓名")
|
||||||
|
private String uName;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUid(String uid)
|
||||||
|
{
|
||||||
|
this.uid = uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUid()
|
||||||
|
{
|
||||||
|
return uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setuName(String uName)
|
||||||
|
{
|
||||||
|
this.uName = uName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getuName()
|
||||||
|
{
|
||||||
|
return uName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("uid", getUid())
|
||||||
|
.append("uName", getuName())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.kaohe.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.kaohe.domain.KhUidRecard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uid管理Mapper接口
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2025-07-02
|
||||||
|
*/
|
||||||
|
public interface KhUidRecardMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询uid管理
|
||||||
|
*
|
||||||
|
* @param id uid管理主键
|
||||||
|
* @return uid管理
|
||||||
|
*/
|
||||||
|
public KhUidRecard selectKhUidRecardById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询uid管理列表
|
||||||
|
*
|
||||||
|
* @param khUidRecard uid管理
|
||||||
|
* @return uid管理集合
|
||||||
|
*/
|
||||||
|
public List<KhUidRecard> selectKhUidRecardList(KhUidRecard khUidRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增uid管理
|
||||||
|
*
|
||||||
|
* @param khUidRecard uid管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertKhUidRecard(KhUidRecard khUidRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改uid管理
|
||||||
|
*
|
||||||
|
* @param khUidRecard uid管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateKhUidRecard(KhUidRecard khUidRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除uid管理
|
||||||
|
*
|
||||||
|
* @param id uid管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteKhUidRecardById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除uid管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteKhUidRecardByIds(Long[] ids);
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.kaohe.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.kaohe.domain.KhUidRecard;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uid管理Service接口
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2025-07-02
|
||||||
|
*/
|
||||||
|
public interface IKhUidRecardService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询uid管理
|
||||||
|
*
|
||||||
|
* @param id uid管理主键
|
||||||
|
* @return uid管理
|
||||||
|
*/
|
||||||
|
public KhUidRecard selectKhUidRecardById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询uid管理列表
|
||||||
|
*
|
||||||
|
* @param khUidRecard uid管理
|
||||||
|
* @return uid管理集合
|
||||||
|
*/
|
||||||
|
public List<KhUidRecard> selectKhUidRecardList(KhUidRecard khUidRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增uid管理
|
||||||
|
*
|
||||||
|
* @param khUidRecard uid管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertKhUidRecard(KhUidRecard khUidRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改uid管理
|
||||||
|
*
|
||||||
|
* @param khUidRecard uid管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateKhUidRecard(KhUidRecard khUidRecard);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除uid管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的uid管理主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteKhUidRecardByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除uid管理信息
|
||||||
|
*
|
||||||
|
* @param id uid管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteKhUidRecardById(Long id);
|
||||||
|
}
|
||||||
@ -0,0 +1,96 @@
|
|||||||
|
package com.ruoyi.kaohe.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.kaohe.mapper.KhUidRecardMapper;
|
||||||
|
import com.ruoyi.kaohe.domain.KhUidRecard;
|
||||||
|
import com.ruoyi.kaohe.service.IKhUidRecardService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* uid管理Service业务层处理
|
||||||
|
*
|
||||||
|
* @author hs
|
||||||
|
* @date 2025-07-02
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class KhUidRecardServiceImpl implements IKhUidRecardService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private KhUidRecardMapper khUidRecardMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询uid管理
|
||||||
|
*
|
||||||
|
* @param id uid管理主键
|
||||||
|
* @return uid管理
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public KhUidRecard selectKhUidRecardById(Long id)
|
||||||
|
{
|
||||||
|
return khUidRecardMapper.selectKhUidRecardById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询uid管理列表
|
||||||
|
*
|
||||||
|
* @param khUidRecard uid管理
|
||||||
|
* @return uid管理
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<KhUidRecard> selectKhUidRecardList(KhUidRecard khUidRecard)
|
||||||
|
{
|
||||||
|
return khUidRecardMapper.selectKhUidRecardList(khUidRecard);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增uid管理
|
||||||
|
*
|
||||||
|
* @param khUidRecard uid管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertKhUidRecard(KhUidRecard khUidRecard)
|
||||||
|
{
|
||||||
|
khUidRecard.setCreateTime(DateUtils.getNowDate());
|
||||||
|
return khUidRecardMapper.insertKhUidRecard(khUidRecard);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改uid管理
|
||||||
|
*
|
||||||
|
* @param khUidRecard uid管理
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateKhUidRecard(KhUidRecard khUidRecard)
|
||||||
|
{
|
||||||
|
khUidRecard.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
return khUidRecardMapper.updateKhUidRecard(khUidRecard);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除uid管理
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的uid管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteKhUidRecardByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return khUidRecardMapper.deleteKhUidRecardByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除uid管理信息
|
||||||
|
*
|
||||||
|
* @param id uid管理主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteKhUidRecardById(Long id)
|
||||||
|
{
|
||||||
|
return khUidRecardMapper.deleteKhUidRecardById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,81 @@
|
|||||||
|
<?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.ruoyi.kaohe.mapper.KhUidRecardMapper">
|
||||||
|
|
||||||
|
<resultMap type="KhUidRecard" id="KhUidRecardResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="uid" column="uid" />
|
||||||
|
<result property="uName" column="u_name" />
|
||||||
|
<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="remark" column="remark" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectKhUidRecardVo">
|
||||||
|
select id, uid, u_name, create_by, create_time, update_by, update_time, remark from kh_uid_recard
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectKhUidRecardList" parameterType="KhUidRecard" resultMap="KhUidRecardResult">
|
||||||
|
<include refid="selectKhUidRecardVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="uid != null and uid != ''"> and uid = #{uid}</if>
|
||||||
|
<if test="uName != null and uName != ''"> and u_name like concat('%', #{uName}, '%')</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectKhUidRecardById" parameterType="Long" resultMap="KhUidRecardResult">
|
||||||
|
<include refid="selectKhUidRecardVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertKhUidRecard" parameterType="KhUidRecard" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into kh_uid_recard
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="uid != null">uid,</if>
|
||||||
|
<if test="uName != null">u_name,</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="remark != null">remark,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="uid != null">#{uid},</if>
|
||||||
|
<if test="uName != null">#{uName},</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="remark != null">#{remark},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateKhUidRecard" parameterType="KhUidRecard">
|
||||||
|
update kh_uid_recard
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="uid != null">uid = #{uid},</if>
|
||||||
|
<if test="uName != null">u_name = #{uName},</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="remark != null">remark = #{remark},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteKhUidRecardById" parameterType="Long">
|
||||||
|
delete from kh_uid_recard where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteKhUidRecardByIds" parameterType="String">
|
||||||
|
delete from kh_uid_recard where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询uid管理列表
|
||||||
|
export function listUid(query) {
|
||||||
|
return request({
|
||||||
|
url: '/kaohe/uid/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询uid管理详细
|
||||||
|
export function getUid(id) {
|
||||||
|
return request({
|
||||||
|
url: '/kaohe/uid/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增uid管理
|
||||||
|
export function addUid(data) {
|
||||||
|
return request({
|
||||||
|
url: '/kaohe/uid',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改uid管理
|
||||||
|
export function updateUid(data) {
|
||||||
|
return request({
|
||||||
|
url: '/kaohe/uid',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除uid管理
|
||||||
|
export function delUid(id) {
|
||||||
|
return request({
|
||||||
|
url: '/kaohe/uid/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
@ -0,0 +1,268 @@
|
|||||||
|
<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="uid">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.uid"
|
||||||
|
placeholder="请输入手机标识符"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="标识符对应姓名" prop="uName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.uName"
|
||||||
|
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="['kaohe:uid: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="['kaohe:uid: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="['kaohe:uid: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="['kaohe:uid:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="uidList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="主键" align="center" prop="id" />
|
||||||
|
<el-table-column label="手机标识符" align="center" prop="uid" />
|
||||||
|
<el-table-column label="标识符对应姓名" align="center" prop="uName" />
|
||||||
|
<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="['kaohe:uid:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['kaohe:uid: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"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改uid管理对话框 -->
|
||||||
|
<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="uid">
|
||||||
|
<el-input v-model="form.uid" placeholder="请输入手机标识符" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="标识符对应姓名" prop="uName">
|
||||||
|
<el-input v-model="form.uName" 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 { listUid, getUid, delUid, addUid, updateUid } from "@/api/kaohe/uid"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Uid",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// uid管理表格数据
|
||||||
|
uidList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
uid: null,
|
||||||
|
uName: null,
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询uid管理列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
listUid(this.queryParams).then(response => {
|
||||||
|
this.uidList = response.rows
|
||||||
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
uid: null,
|
||||||
|
uName: null,
|
||||||
|
createBy: null,
|
||||||
|
createTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
remark: 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 = "添加uid管理"
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset()
|
||||||
|
const id = row.id || this.ids
|
||||||
|
getUid(id).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.open = true
|
||||||
|
this.title = "修改uid管理"
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateUid(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addUid(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("新增成功")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids
|
||||||
|
this.$modal.confirm('是否确认删除uid管理编号为"' + ids + '"的数据项?').then(function() {
|
||||||
|
return delUid(ids)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("删除成功")
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('kaohe/uid/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `uid_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Loading…
Reference in new issue