代码提交
This commit is contained in:
parent
91af7ca8c2
commit
3ab1312f8e
|
|
@ -1,7 +1,11 @@
|
|||
package com.bonus.imgTool.model;
|
||||
|
||||
import com.bonus.imgTool.base.entity.PageEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class SysUser extends PageEntity {
|
||||
|
|
@ -105,6 +109,11 @@ public class SysUser extends PageEntity {
|
|||
* 休眠时间
|
||||
*/
|
||||
private String sleepTime;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
|
||||
private String updatePasswordTime;
|
||||
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@
|
|||
END userType,
|
||||
t.state AS state,
|
||||
t.del_flag AS delFlag,
|
||||
t.create_time AS createTime,
|
||||
t.sign_img as signImg
|
||||
FROM
|
||||
sys_user t
|
||||
|
|
@ -174,8 +175,6 @@
|
|||
login_name as loginName,
|
||||
sex,
|
||||
user_code as userCode,
|
||||
phone,
|
||||
email,
|
||||
org_id as orgId,
|
||||
user_type as userType,
|
||||
type,
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ let background, web, mobile, wx;
|
|||
let data = [], appResList = [];
|
||||
// 角色下拉选
|
||||
let roleList;
|
||||
let projectList;
|
||||
let orgData;
|
||||
let teamList;
|
||||
|
||||
|
|
@ -126,7 +127,7 @@ function getProSelected() {
|
|||
ajaxRequest(url, "POST", null, true, function () {
|
||||
}, function (result) {
|
||||
if (result.code === 200) {
|
||||
setSelectValue(result.data, 'roleId');
|
||||
setSelectValue(result.data, 'project');
|
||||
} else {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
}
|
||||
|
|
@ -163,9 +164,6 @@ function setSelectValue(list, selectName) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// function setOrgTree(data){
|
||||
// orgTree = dtree.renderSelect({
|
||||
// elem: "#orgId",
|
||||
|
|
@ -217,7 +215,6 @@ function getUserById() {
|
|||
}, function (result) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (result.code === 200) {
|
||||
console.log(result)
|
||||
setFormData(result.data);
|
||||
} else if (result.code === 500) {
|
||||
layer.alert(result.msg, {icon: 2})
|
||||
|
|
@ -235,10 +232,9 @@ function setFormData(data) {
|
|||
$("#password").removeAttr("lay-verify");
|
||||
$("#pwd").css("display", "none");
|
||||
$('#id').val(data.id)
|
||||
// $('#userCode').val(data.userCode)
|
||||
|
||||
$('#username').val(data.username)
|
||||
$('#loginName').val(data.loginName)
|
||||
$('#phone').val(data.phone)
|
||||
|
||||
// 设置选中状态
|
||||
if (data.sex === 1) {
|
||||
|
|
@ -247,11 +243,11 @@ function setFormData(data) {
|
|||
document.getElementById('sex_0').checked = true;
|
||||
}
|
||||
|
||||
if (data.userType === '1') {
|
||||
document.getElementById('userType_1').checked = true;
|
||||
} else if (data.userType === '0') {
|
||||
document.getElementById('userType_0').checked = true;
|
||||
}
|
||||
/* if (data.userType === '1') {
|
||||
document.getElementById('userType_1').checked = true;
|
||||
} else if (data.userType === '0') {
|
||||
document.getElementById('userType_0').checked = true;
|
||||
}*/
|
||||
|
||||
if (data.state === 1) {
|
||||
document.getElementById('state_1').checked = true;
|
||||
|
|
@ -262,18 +258,19 @@ function setFormData(data) {
|
|||
$('#orgId').val(data.orgId)
|
||||
$('#roleId').val(data.roleId)
|
||||
$('#roleId option[value=' + data.roleId + ']').attr('selected', true)
|
||||
$('#teamId').val(data.teamId)
|
||||
$('#teamId option[value=' + data.teamId + ']').attr('selected', true)
|
||||
var arrCB = data.loginTypes;
|
||||
for (var j = 0; j < arrCB.length; j++) {
|
||||
var cbthis = $("input[name='loginType']");
|
||||
for (var i = 0; i < cbthis.length; i++) {
|
||||
if (cbthis[i].value == arrCB[j]) {
|
||||
cbthis[i].checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
phoneParam = data.phone;
|
||||
$('#project').val(data.roleId)
|
||||
$('#project option[value=' + data.project + ']').attr('selected', true)
|
||||
/*$('#teamId').val(data.teamId)
|
||||
$('#teamId option[value=' + data.teamId + ']').attr('selected', true)*/
|
||||
// var arrCB = data.loginTypes;
|
||||
// for (var j = 0; j < arrCB.length; j++) {
|
||||
// var cbthis = $("input[name='loginType']");
|
||||
// for (var i = 0; i < cbthis.length; i++) {
|
||||
// if (cbthis[i].value == arrCB[j]) {
|
||||
// cbthis[i].checked = true;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
layui.form.render();
|
||||
}
|
||||
}
|
||||
|
|
@ -291,9 +288,14 @@ function saveData(data) {
|
|||
$('#cbGuDing input[type=checkbox]:checked').each(function () {
|
||||
arr_box.push($(this).val());
|
||||
});
|
||||
console.log(arr_box)
|
||||
params.loginType = arr_box.join()
|
||||
params.orgId = params.orgId_select_nodeId;
|
||||
var arr_pro = [];//固定复选框
|
||||
$('#project input[type=checkbox]:checked').each(function () {
|
||||
arr_pro.push($(this).val());
|
||||
});
|
||||
|
||||
// params.loginType = arr_box.join()
|
||||
params.project = arr_pro.join()
|
||||
// params.orgId = params.orgId_select_nodeId;
|
||||
if (params.id != "") {
|
||||
url = dataUrl + "/users/update";
|
||||
}
|
||||
|
|
@ -342,6 +344,7 @@ function isRepeat(paramName, phone) {
|
|||
return data;
|
||||
}
|
||||
|
||||
/*
|
||||
function getPasswordConfig(callback) {
|
||||
let url = dataUrl + "/users/getPasswordConfig"
|
||||
ajaxRequest(url, "POST", null, true, function () {
|
||||
|
|
@ -356,6 +359,7 @@ function getPasswordConfig(callback) {
|
|||
error(xhr)
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
// 关闭页面
|
||||
function closePage(type) {
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ function reloadData() {
|
|||
pages(pageNum, limitSize);
|
||||
}
|
||||
|
||||
// 新增/修改平台用户
|
||||
// 修改用户
|
||||
function addData(id) {
|
||||
let title = '新增用户'
|
||||
if (id) {
|
||||
|
|
@ -211,7 +211,7 @@ function addData(id) {
|
|||
let param = {
|
||||
'id': id
|
||||
}
|
||||
openIframe2("addOrEditUser", title, "child/userForm.html", '1000px', '625px', param);
|
||||
openIframe2("addOrEditUser", title, "child/userFormTemp.html", '1000px', '625px', param);
|
||||
}
|
||||
|
||||
function addDataTemp(id) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue