用户模块修改
This commit is contained in:
parent
72b2ace017
commit
d7213a839a
|
@ -41,6 +41,14 @@ public class OilMonitor extends BaseEntity {
|
|||
*/
|
||||
private String note;
|
||||
|
||||
private String status;
|
||||
|
||||
|
||||
private String unitNo;
|
||||
|
||||
|
||||
private String systemNo;
|
||||
|
||||
|
||||
private String fileUrl;
|
||||
|
||||
|
@ -76,6 +84,30 @@ public class OilMonitor extends BaseEntity {
|
|||
this.monitorName = monitorName;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getUnitNo() {
|
||||
return unitNo;
|
||||
}
|
||||
|
||||
public void setUnitNo(String unitNo) {
|
||||
this.unitNo = unitNo;
|
||||
}
|
||||
|
||||
public String getSystemNo() {
|
||||
return systemNo;
|
||||
}
|
||||
|
||||
public void setSystemNo(String systemNo) {
|
||||
this.systemNo = systemNo;
|
||||
}
|
||||
|
||||
public String getLongitude() {
|
||||
return longitude;
|
||||
}
|
||||
|
|
|
@ -33,6 +33,10 @@ public class SysUser extends BaseEntity
|
|||
@Excel(name = "登录名称")
|
||||
private String userName;
|
||||
|
||||
private String idCard;
|
||||
|
||||
private String sn;
|
||||
|
||||
/** 用户昵称 */
|
||||
@Excel(name = "用户名称")
|
||||
private String nickName;
|
||||
|
@ -292,6 +296,22 @@ public class SysUser extends BaseEntity
|
|||
return roleId;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getSn() {
|
||||
return sn;
|
||||
}
|
||||
|
||||
public void setSn(String sn) {
|
||||
this.sn = sn;
|
||||
}
|
||||
|
||||
public void setRoleId(Long roleId)
|
||||
{
|
||||
this.roleId = roleId;
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
<result property="num" column="num"/>
|
||||
<result property="latitude" column="latitude"/>
|
||||
<result property="longitude" column="longitude"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="systemNo" column="system_no"/>
|
||||
<result property="unitNo" column="unit_no"/>
|
||||
</resultMap>
|
||||
<resultMap type="com.ruoyi.project.oil.domain.monitor.ThDevice" id="ThDeviceList">
|
||||
<result property="id" column="id"/>
|
||||
|
@ -79,13 +82,14 @@
|
|||
|
||||
|
||||
<select id="selectOilDeviceList" resultMap="OilDeviceResult">
|
||||
select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t.dept_id,d.dept_name,longitude,latitude
|
||||
select t.id,t. name,t.unit_no,t.system_no,t.status,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t.dept_id,d.dept_name,longitude,latitude
|
||||
from th_device t left join sys_dept d on t.dept_id=d.dept_id
|
||||
<where>
|
||||
<if test="id != null and id != ''">and t.id=#{id}</if>
|
||||
<if test="monitorName != null and monitorName != ''">and t.name like concat('%', #{monitorName},'%') </if>
|
||||
<if test="monitorNo != null and monitorNo != ''">and t.sn= #{monitorNo} </if>
|
||||
<if test="deptId != null and deptId != ''">and t.dept_id= #{deptId} </if>
|
||||
<if test="status != null ">and t.status= #{status} </if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
@ -107,6 +111,9 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t
|
|||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="longitude != null">longitude,</if>
|
||||
<if test="latitude != null">latitude,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="unitNo != null">unit_no,</if>
|
||||
<if test="systemNo != null">system_no,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="monitorName != null">#{monitorName},</if>
|
||||
|
@ -119,6 +126,9 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t
|
|||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="longitude != null">#{longitude},</if>
|
||||
<if test="latitude != null">#{latitude},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="unitNo != null">#{unitNo},</if>
|
||||
<if test="systemNo != null">#{systemNo},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
@ -134,6 +144,9 @@ select t.id,t. name,t.sn,t.file_url,t.note,t.create_by,t.create_time,t.address,t
|
|||
<if test="deptId != null">dept_id=#{deptId},</if>
|
||||
<if test="longitude != null">longitude=#{longitude},</if>
|
||||
<if test="latitude != null">latitude=#{latitude},</if>
|
||||
<if test="status != null">status=#{status},</if>
|
||||
<if test="systemNo != null">system_no=#{systemNo},</if>
|
||||
<if test="unitNo != null">unit_no=#{unitNo},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
|
|
@ -103,7 +103,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="deptevel != null and deptLevel != ''">dept_level,</if>
|
||||
<if test="deptLevel != null and deptLevel != ''">dept_level,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="deptId != null and deptId != 0">#{deptId},</if>
|
||||
|
|
|
@ -23,6 +23,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="idCard" column="id_card" />
|
||||
<result property="sn" column="sn" />
|
||||
<association property="dept" javaType="SysDept" resultMap="deptResult" />
|
||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
|
||||
</resultMap>
|
||||
|
@ -57,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</sql>
|
||||
|
||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||
select u.user_id, u.id_card,u.sn,u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.del_flag = '0'
|
||||
<if test="userId != null and userId != 0">
|
||||
|
@ -159,6 +161,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="idCard != null and idCard != ''">id_card,</if>
|
||||
<if test="sn != null and sn != ''">sn,</if>
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null and userId != ''">#{userId},</if>
|
||||
|
@ -173,6 +177,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="idCard != null and idCard != ''">#{idCard},</if>
|
||||
<if test="sn != null and sn != ''">#{sn},</if>
|
||||
sysdate
|
||||
)
|
||||
</insert>
|
||||
|
@ -193,6 +199,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="loginDate != null">login_date = #{loginDate},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="idCard != null">id_card = #{isCard},</if>
|
||||
<if test="sn != null">sn = #{sn},</if>
|
||||
update_time = sysdate
|
||||
</set>
|
||||
where user_id = #{userId}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
||||
<el-form-item label="部门" prop="deptId">
|
||||
<treeselect style="width:300px" v-model="queryParams.deptId" :multiple="false" :options="deptList" :normalizer="normalizer" placeholder="请选择组织部门"/>
|
||||
<treeselect style="width:300px" v-model="queryParams.deptId" :multiple="false" :options="deptList"
|
||||
:normalizer="normalizer" placeholder="请选择组织部门" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备编号" prop="monitorNo">
|
||||
<el-input v-model="queryParams.monitorNo" placeholder="请输入设备编号"></el-input>
|
||||
|
@ -10,7 +11,14 @@
|
|||
<el-form-item label="设备名称" prop="monitorName">
|
||||
<el-input v-model="queryParams.monitorName" placeholder="请输入设备名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择设备状态" style="width: 150px;">
|
||||
<el-option label="运行" value="1"></el-option>
|
||||
<el-option label="停运" value="0"></el-option>
|
||||
</el-select>
|
||||
</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>
|
||||
|
@ -21,8 +29,8 @@
|
|||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button type="danger" v-hasRole="['admin','epa','factory']" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
||||
>删除</el-button>
|
||||
<el-button type="danger" v-hasRole="['admin', 'epa', 'factory']" plain icon="el-icon-delete" size="mini"
|
||||
:disabled="multiple" @click="handleDelete">删除</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-table v-loading="loading" :data="monitorList" @selection-change="handleSelectionChange">
|
||||
|
@ -30,6 +38,15 @@
|
|||
<el-table-column label="设备名称" align="center" prop="monitorName" />
|
||||
<el-table-column label="安装部门" align="center" prop="deptName" />
|
||||
<el-table-column label="安装位置" align="center" prop="address" />
|
||||
<el-table-column label="系统编码(原有)" align="center" prop="systemNo" />
|
||||
<el-table-column label="唯一编码(原有)" align="center" prop="unitNo" />
|
||||
<el-table-column prop="status" label="设备状态" align="center">
|
||||
<!-- 使用 scoped slot 来自定义显示 -->
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.status === 1">运行</span>
|
||||
<span v-else-if="scope.row.status === 0">停运</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上传时间" align="center" prop="createTime" />
|
||||
<el-table-column label="设备图片" align="center" prop="fileUrl" width="100">
|
||||
<template slot-scope="scope">
|
||||
|
@ -40,8 +57,10 @@
|
|||
<el-table-column label="纬度" align="center" prop="latitude" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-hasRole="['admin','epa','factory']" size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-hasRole="['admin','epa','factory']" size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)">删除</el-button>
|
||||
<el-button v-hasRole="['admin', 'epa', 'factory']" size="mini" type="text" icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)">修改</el-button>
|
||||
<el-button v-hasRole="['admin', 'epa', 'factory']" size="mini" type="text" icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -51,7 +70,7 @@
|
|||
|
||||
<!-- 添加或修改密封点群组对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="isOpenAdd" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
|
||||
<el-form-item label="设备编号" prop="monitorNo">
|
||||
<el-input v-model="form.monitorNo" placeholder="请输入设备编号" :disabled="disAdd" />
|
||||
</el-form-item>
|
||||
|
@ -59,7 +78,8 @@
|
|||
<el-input v-model="form.monitorName" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="安装部门" prop="deptId">
|
||||
<treeselect v-model="form.deptId" :multiple="false" :options="deptList" :normalizer="normalizer" placeholder="请选择组织部门"/>
|
||||
<treeselect v-model="form.deptId" :multiple="false" :options="deptList" :normalizer="normalizer"
|
||||
placeholder="请选择组织部门" />
|
||||
</el-form-item>
|
||||
<el-form-item label="安装地址">
|
||||
<el-input v-model="form.address" placeholder="请输入安装地址" />
|
||||
|
@ -69,11 +89,23 @@
|
|||
</el-form-item>
|
||||
<el-form-item label="纬度">
|
||||
<el-input v-model="form.latitude" placeholder="纬度" />
|
||||
</el-form-item>
|
||||
<el-form-item label="系统编码(原有)">
|
||||
<el-input v-model="form.systemNo" placeholder="系统编码(原有)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="唯一编码(原有)">
|
||||
<el-input v-model="form.unitNo" placeholder="唯一编码(原有)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备状态" prop="status">
|
||||
<el-select v-model="form.status" placeholder="请选择设备状态" style="width: 150px;">
|
||||
<el-option label="运行" value="1"></el-option>
|
||||
<el-option label="停运" value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="note">
|
||||
<el-input v-model="form.note" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="群组照片" prop="groupImg">
|
||||
<el-form-item label="设备照片" prop="groupImg">
|
||||
<image-upload @input="getImage" v-model="form.fileUrl" :limit="1" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -120,6 +152,9 @@ import { listDept } from "@/api/system/dept";
|
|||
],
|
||||
deptId: [
|
||||
{ required: true, message: "部门不能为空", trigger: "blur" }
|
||||
],
|
||||
status: [
|
||||
{ required: true, message: "设备状态不能为空", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
title: '',
|
||||
|
@ -135,6 +170,7 @@ import { listDept } from "@/api/system/dept";
|
|||
monitorName: null,
|
||||
id: null,
|
||||
deptId: null,
|
||||
status:null,
|
||||
|
||||
},
|
||||
ids: [],
|
||||
|
@ -239,8 +275,6 @@ import { listDept } from "@/api/system/dept";
|
|||
this.getList()
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1
|
||||
|
||||
this.getList()
|
||||
},
|
||||
/** 查询密封点群组列表 */
|
||||
|
@ -255,5 +289,3 @@ import { listDept } from "@/api/system/dept";
|
|||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
|
|
@ -138,11 +138,13 @@
|
|||
|
||||
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="50" align="center" />
|
||||
<el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
|
||||
<!-- <el-table-column label="用户编号" align="center" key="userId" prop="userId" v-if="columns[0].visible" /> -->
|
||||
<el-table-column label="用户名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="用户昵称" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="部门" align="center" key="deptName" prop="dept.deptName" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="手机号码" align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
|
||||
<el-table-column label="身份证" align="center" key="idCard" prop="idCard" v-if="columns[4].visible" width="120" />
|
||||
<el-table-column label="sn" align="center" key="sn" prop="sn" v-if="columns[4].visible" width="120" />
|
||||
<el-table-column label="状态" align="center" key="status" v-if="columns[5].visible">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
|
@ -294,6 +296,27 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="身份证">
|
||||
<el-input v-model="form.idCard" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="sn">
|
||||
<el-input v-model="form.sn" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
|
|
Loading…
Reference in New Issue