mirror of
https://gitee.com/dromara/MaxKey.git
synced 2025-12-07 09:28:49 +08:00
mgt fix
mgt fix
This commit is contained in:
parent
24a7540718
commit
3bd46aae35
@ -2,6 +2,12 @@ package org.maxkey.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
|
||||
/*
|
||||
ID varchar(40) not null,
|
||||
@ -9,17 +15,24 @@ import java.io.Serializable;
|
||||
UID varchar(40) null
|
||||
constraint PK_ROLES primary key clustered (ID)
|
||||
*/
|
||||
@Table(name = "GROUP_MEMBER")
|
||||
public class GroupMember extends UserInfo implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = -8059639972590554760L;
|
||||
@Id
|
||||
@Column
|
||||
@GeneratedValue(strategy=GenerationType.AUTO,generator="uuid")
|
||||
String id;
|
||||
@Column
|
||||
private String groupId;
|
||||
private String groupName;
|
||||
|
||||
@Column
|
||||
private String memberId;
|
||||
private String memberName;
|
||||
@Column
|
||||
private String type;//User or Group
|
||||
|
||||
|
||||
@ -54,6 +67,16 @@ public class GroupMember extends UserInfo implements Serializable{
|
||||
}
|
||||
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the groupId
|
||||
*/
|
||||
|
||||
@ -2,7 +2,12 @@ package org.maxkey.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
|
||||
|
||||
@ -12,15 +17,20 @@ import org.maxkey.domain.apps.Applications;
|
||||
MENUID varchar(40) null
|
||||
constraint PK_ROLES primary key clustered (ID)
|
||||
*/
|
||||
@Table(name = "GROUP_APP")
|
||||
public class GroupPrivileges extends Applications implements Serializable{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8634166407201007340L;
|
||||
@NotEmpty
|
||||
@Id
|
||||
@Column
|
||||
@GeneratedValue(strategy=GenerationType.AUTO,generator="uuid")
|
||||
String id;
|
||||
@Column
|
||||
private String groupId;
|
||||
@NotEmpty
|
||||
@Column
|
||||
private String appId;
|
||||
|
||||
public GroupPrivileges(){
|
||||
@ -65,6 +75,16 @@ public class GroupPrivileges extends Applications implements Serializable{
|
||||
}
|
||||
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
|
||||
@ -2,6 +2,10 @@ package org.maxkey.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseDomain;
|
||||
@ -14,17 +18,27 @@ public class Groups extends JpaBaseDomain implements Serializable{
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 4660258495864814777L;
|
||||
|
||||
@Id
|
||||
@Column
|
||||
@GeneratedValue(strategy=GenerationType.AUTO,generator="uuid")
|
||||
String id;
|
||||
|
||||
@Length(max=60)
|
||||
@Column
|
||||
private String name;
|
||||
@Column
|
||||
private int isdefault;
|
||||
@Column
|
||||
String description;
|
||||
@Column
|
||||
String createdBy;
|
||||
@Column
|
||||
String createdDate;
|
||||
@Column
|
||||
String modifiedBy;
|
||||
@Column
|
||||
String modifiedDate;
|
||||
@Column
|
||||
String status;
|
||||
|
||||
public Groups() {}
|
||||
|
||||
@ -17,27 +17,52 @@ public class Organizations extends JpaBaseDomain implements Serializable{
|
||||
@Column
|
||||
@GeneratedValue(strategy=GenerationType.AUTO,generator="uuid")
|
||||
private String id;
|
||||
private String code;
|
||||
private String name;
|
||||
private String fullName;
|
||||
private String pId;
|
||||
private String pName;
|
||||
private String type;
|
||||
private String xPath;
|
||||
private String xNamePath;
|
||||
private String level;
|
||||
private String hasChild;
|
||||
private String division;
|
||||
private String country;
|
||||
private String region;
|
||||
private String locality;
|
||||
private String street;
|
||||
private String address;
|
||||
private String contact;
|
||||
private String postalCode;
|
||||
private String phone;
|
||||
private String fax;
|
||||
private String email;
|
||||
@Column
|
||||
private String code;
|
||||
@Column
|
||||
private String name;
|
||||
@Column
|
||||
private String fullName;
|
||||
@Column
|
||||
private String pId;
|
||||
@Column
|
||||
private String pName;
|
||||
@Column
|
||||
private String type;
|
||||
@Column
|
||||
private String xPath;
|
||||
@Column
|
||||
private String xNamePath;
|
||||
@Column
|
||||
private String level;
|
||||
@Column
|
||||
private String hasChild;
|
||||
@Column
|
||||
private String division;
|
||||
@Column
|
||||
private String country;
|
||||
@Column
|
||||
private String region;
|
||||
@Column
|
||||
private String locality;
|
||||
@Column
|
||||
private String street;
|
||||
@Column
|
||||
private String address;
|
||||
@Column
|
||||
private String contact;
|
||||
@Column
|
||||
private String postalCode;
|
||||
@Column
|
||||
private String phone;
|
||||
@Column
|
||||
private String fax;
|
||||
@Column
|
||||
private String email;
|
||||
@Column
|
||||
private String sortOrder;
|
||||
@Column
|
||||
private String description;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -224,4 +249,31 @@ public class Organizations extends JpaBaseDomain implements Serializable{
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
|
||||
public String getSortOrder() {
|
||||
return sortOrder;
|
||||
}
|
||||
|
||||
public void setSortOrder(String sortOrder) {
|
||||
this.sortOrder = sortOrder;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Organizations [id=" + id + ", code=" + code + ", name=" + name + ", fullName=" + fullName + ", pId="
|
||||
+ pId + ", pName=" + pName + ", type=" + type + ", xPath=" + xPath + ", xNamePath=" + xNamePath
|
||||
+ ", level=" + level + ", hasChild=" + hasChild + ", division=" + division + ", country=" + country
|
||||
+ ", region=" + region + ", locality=" + locality + ", street=" + street + ", address=" + address
|
||||
+ ", contact=" + contact + ", postalCode=" + postalCode + ", phone=" + phone + ", fax=" + fax
|
||||
+ ", email=" + email + ", sortOrder=" + sortOrder + ", description=" + description + "]";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -33,49 +33,81 @@ public class UserInfo extends JpaBaseDomain {
|
||||
String id;
|
||||
@Column
|
||||
protected String username;
|
||||
@Column
|
||||
protected String password;
|
||||
@Column
|
||||
protected String decipherable;
|
||||
@Column
|
||||
protected String sharedSecret;
|
||||
@Column
|
||||
protected String sharedCounter;
|
||||
/**
|
||||
* "Employee", "Supplier","Dealer","Contractor",Partner,Customer "Intern",
|
||||
"Temp", "External", and "Unknown"
|
||||
*/
|
||||
@Column
|
||||
protected String userType;
|
||||
@Column
|
||||
protected String windowsAccount;
|
||||
|
||||
//for user name
|
||||
@Column
|
||||
protected String displayName;
|
||||
@Column
|
||||
protected String nickName;
|
||||
@Column
|
||||
protected String nameZHSpell;
|
||||
@Column
|
||||
protected String nameZHShortSpell;
|
||||
@Column
|
||||
protected String givenName;
|
||||
@Column
|
||||
protected String middleName;
|
||||
@Column
|
||||
protected String familyName;
|
||||
@Column
|
||||
protected String honorificPrefix;
|
||||
@Column
|
||||
protected String honorificSuffix;
|
||||
@Column
|
||||
protected String formattedName;
|
||||
|
||||
@Column
|
||||
protected int married;
|
||||
@Column
|
||||
protected int gender;
|
||||
@Column
|
||||
protected String birthDate;
|
||||
@JsonIgnore
|
||||
@Column
|
||||
protected byte[] picture;
|
||||
@JsonIgnore
|
||||
protected MultipartFile pictureFile;
|
||||
@Column
|
||||
protected int idType;
|
||||
@Column
|
||||
protected String idCardNo;
|
||||
@Column
|
||||
protected String webSite;
|
||||
@Column
|
||||
protected String startWorkDate;
|
||||
|
||||
//for security
|
||||
@Column
|
||||
protected int authnType;
|
||||
@Column
|
||||
protected String email;
|
||||
|
||||
protected int emailVerified;
|
||||
@Column
|
||||
protected String mobile;
|
||||
|
||||
protected int mobileVerified;
|
||||
|
||||
protected String passwordQuestion;
|
||||
|
||||
protected String passwordAnswer;
|
||||
@Column
|
||||
//for apps login protected
|
||||
protected int appLoginAuthnType;
|
||||
protected String appLoginPassword;
|
||||
@ -94,59 +126,83 @@ public class UserInfo extends JpaBaseDomain {
|
||||
protected int passwordSetType;
|
||||
protected Integer loginCount;
|
||||
|
||||
|
||||
@Column
|
||||
protected String locale;
|
||||
@Column
|
||||
protected String timeZone;
|
||||
@Column
|
||||
protected String preferredLanguage;
|
||||
|
||||
//for work
|
||||
@Column
|
||||
protected String workCountry;
|
||||
@Column
|
||||
protected String workRegion;//province;
|
||||
@Column
|
||||
protected String workLocality;//city;
|
||||
@Column
|
||||
protected String workStreetAddress;
|
||||
@Column
|
||||
protected String workAddressFormatted;
|
||||
@Column
|
||||
protected String workEmail;
|
||||
@Column
|
||||
protected String workPhoneNumber;
|
||||
@Column
|
||||
protected String workPostalCode;
|
||||
@Column
|
||||
protected String workFax;
|
||||
//for home
|
||||
@Column
|
||||
protected String homeCountry;
|
||||
@Column
|
||||
protected String homeRegion;//province;
|
||||
@Column
|
||||
protected String homeLocality;//city;
|
||||
@Column
|
||||
protected String homeStreetAddress;
|
||||
@Column
|
||||
protected String homeAddressFormatted;
|
||||
@Column
|
||||
protected String homeEmail;
|
||||
@Column
|
||||
protected String homePhoneNumber;
|
||||
@Column
|
||||
protected String homePostalCode;
|
||||
@Column
|
||||
protected String homeFax;
|
||||
//for company
|
||||
@Column
|
||||
protected String employeeNumber;
|
||||
@Column
|
||||
protected String costCenter;
|
||||
@Column
|
||||
protected String organization;
|
||||
@Column
|
||||
protected String division;
|
||||
@Column
|
||||
protected String departmentId;
|
||||
@Column
|
||||
protected String department;
|
||||
@Column
|
||||
protected String jobTitle;
|
||||
@Column
|
||||
protected String jobLevel;
|
||||
@Column
|
||||
protected String managerId;
|
||||
@Column
|
||||
protected String manager;
|
||||
@Column
|
||||
protected String assistantId;
|
||||
@Column
|
||||
protected String assistant;
|
||||
@Column
|
||||
protected String entryDate;
|
||||
@Column
|
||||
protected String quitDate;
|
||||
|
||||
//for social contact
|
||||
protected String qq;
|
||||
protected String weixin;
|
||||
protected String sinaweibo;
|
||||
protected String yixin;
|
||||
protected String facebook;
|
||||
protected String skype;
|
||||
protected String msn;
|
||||
protected String gtalk;
|
||||
protected String yahoo;
|
||||
protected String line;
|
||||
protected String aim;
|
||||
@Column
|
||||
protected String defineIm;
|
||||
protected int weixinFollow;
|
||||
|
||||
@ -167,13 +223,17 @@ public class UserInfo extends JpaBaseDomain {
|
||||
|
||||
protected int gridList;
|
||||
|
||||
String createdBy;;
|
||||
@Column
|
||||
String createdBy;
|
||||
@Column
|
||||
String createdDate;
|
||||
@Column
|
||||
String modifiedBy;
|
||||
@Column
|
||||
String modifiedDate;
|
||||
|
||||
@Column
|
||||
int status;
|
||||
|
||||
@Column
|
||||
String description ;
|
||||
|
||||
|
||||
@ -1025,94 +1085,7 @@ public class UserInfo extends JpaBaseDomain {
|
||||
this.gridList = gridList;
|
||||
}
|
||||
|
||||
public String getQq() {
|
||||
return qq;
|
||||
}
|
||||
|
||||
public void setQq(String qq) {
|
||||
this.qq = qq;
|
||||
}
|
||||
|
||||
public String getWeixin() {
|
||||
return weixin;
|
||||
}
|
||||
|
||||
public void setWeixin(String weixin) {
|
||||
this.weixin = weixin;
|
||||
}
|
||||
|
||||
public String getSinaweibo() {
|
||||
return sinaweibo;
|
||||
}
|
||||
|
||||
public void setSinaweibo(String sinaweibo) {
|
||||
this.sinaweibo = sinaweibo;
|
||||
}
|
||||
|
||||
public String getYixin() {
|
||||
return yixin;
|
||||
}
|
||||
|
||||
public void setYixin(String yixin) {
|
||||
this.yixin = yixin;
|
||||
}
|
||||
|
||||
public String getFacebook() {
|
||||
return facebook;
|
||||
}
|
||||
|
||||
public void setFacebook(String facebook) {
|
||||
this.facebook = facebook;
|
||||
}
|
||||
|
||||
public String getSkype() {
|
||||
return skype;
|
||||
}
|
||||
|
||||
public void setSkype(String skype) {
|
||||
this.skype = skype;
|
||||
}
|
||||
|
||||
public String getMsn() {
|
||||
return msn;
|
||||
}
|
||||
|
||||
public void setMsn(String msn) {
|
||||
this.msn = msn;
|
||||
}
|
||||
|
||||
public String getGtalk() {
|
||||
return gtalk;
|
||||
}
|
||||
|
||||
public void setGtalk(String gtalk) {
|
||||
this.gtalk = gtalk;
|
||||
}
|
||||
|
||||
public String getYahoo() {
|
||||
return yahoo;
|
||||
}
|
||||
|
||||
public void setYahoo(String yahoo) {
|
||||
this.yahoo = yahoo;
|
||||
}
|
||||
|
||||
public String getLine() {
|
||||
return line;
|
||||
}
|
||||
|
||||
public void setLine(String line) {
|
||||
this.line = line;
|
||||
}
|
||||
|
||||
public String getAim() {
|
||||
return aim;
|
||||
}
|
||||
|
||||
public void setAim(String aim) {
|
||||
this.aim = aim;
|
||||
}
|
||||
|
||||
|
||||
public String getDefineIm() {
|
||||
return defineIm;
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
package org.maxkey.web;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseDomain;
|
||||
import org.apache.mybatis.jpa.persistence.JpaPageResults;
|
||||
import org.maxkey.web.message.Message;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
public interface BasicController <T extends JpaBaseDomain> {
|
||||
|
||||
public JpaPageResults<T> pageResults(@ModelAttribute("modelAttr") T modelAttr);
|
||||
|
||||
public ModelAndView forwardAdd(@ModelAttribute("modelAttr") T modelAttr);
|
||||
|
||||
public Message insert(@ModelAttribute("modelAttr") T modelAttr);
|
||||
|
||||
public ModelAndView forwardUpdate(@PathVariable("id") String id);
|
||||
|
||||
public Message update(@ModelAttribute("modelAttr") T modelAttr);
|
||||
|
||||
public Message delete(@ModelAttribute("modelAttr") T modelAttr) ;
|
||||
|
||||
|
||||
}
|
||||
@ -7,8 +7,6 @@ import java.util.List;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.GroupMember;
|
||||
import org.maxkey.domain.Groups;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
@ -17,22 +15,8 @@ import org.maxkey.domain.UserInfo;
|
||||
|
||||
public interface GroupMemberMapper extends IJpaBaseMapper<GroupMember> {
|
||||
|
||||
public List<UserInfo> gridUserMemberInGroup(GroupMember entity);
|
||||
|
||||
public Integer countUserMemberInGroup(GroupMember entity);
|
||||
|
||||
public List<UserInfo> gridAllUserMemberInGroup(GroupMember entity);
|
||||
|
||||
public Integer countAllUserMemberInGroup(GroupMember entity);
|
||||
|
||||
public List<UserInfo> gridUserMemberNotInGroup(GroupMember entity);
|
||||
|
||||
public Integer countUserMemberNotInGroup(GroupMember entity);
|
||||
|
||||
public List<Groups> gridGroupMemberInGroup(GroupMember entity);
|
||||
|
||||
public Integer countGroupMemberInGroup(GroupMember entity);
|
||||
|
||||
|
||||
|
||||
public List<GroupMember> allMemberInGroup(GroupMember entity);
|
||||
public List<GroupMember> memberInGroup(GroupMember entity);
|
||||
public List<GroupMember> memberNotInGroup(GroupMember entity);
|
||||
public List<GroupMember> groupMemberInGroup(GroupMember entity);
|
||||
}
|
||||
|
||||
@ -7,7 +7,6 @@ import java.util.List;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.IJpaBaseMapper;
|
||||
import org.maxkey.domain.GroupPrivileges;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
|
||||
/**
|
||||
* @author Crystal.sea
|
||||
@ -16,12 +15,10 @@ import org.maxkey.domain.apps.Applications;
|
||||
|
||||
public interface GroupPrivilegesMapper extends IJpaBaseMapper<GroupPrivileges> {
|
||||
|
||||
public List<Applications> gridAppsInGroup(GroupPrivileges entity);
|
||||
public List<GroupPrivileges>appsInGroup(GroupPrivileges entity);
|
||||
|
||||
public Integer countAppsInGroup(GroupPrivileges entity);
|
||||
|
||||
public List<Applications> gridAppsNotInGroup(GroupPrivileges entity);
|
||||
public List<GroupPrivileges> appsNotInGroup(GroupPrivileges entity);
|
||||
|
||||
public Integer countAppsNotInGroup(GroupPrivileges entity);
|
||||
|
||||
}
|
||||
|
||||
@ -22,64 +22,4 @@ public class GroupMemberService extends JpaBaseService<GroupMember>{
|
||||
// TODO Auto-generated method stub
|
||||
return (GroupMemberMapper)super.getMapper();
|
||||
}
|
||||
|
||||
public JpaPageResults<UserInfo> gridMemberInGroup(GroupMember entity) {
|
||||
Integer totalCount = parseCount(getMapper().countUserMemberInGroup(entity));
|
||||
if(totalCount == 0) {
|
||||
return new JpaPageResults<UserInfo>();
|
||||
}
|
||||
|
||||
int totalPage = calculateTotalPage(entity,totalCount);
|
||||
|
||||
if(totalPage == 0) {
|
||||
return new JpaPageResults<UserInfo>();
|
||||
}
|
||||
|
||||
if(totalPage < entity.getPage()) {
|
||||
entity.setPage(totalPage);
|
||||
entity.setStartRow(calculateStartRow(totalPage ,entity.getPageResults()));
|
||||
}
|
||||
entity.setPageable(true);
|
||||
return new JpaPageResults<UserInfo>(entity.getPage(),entity.getPageResults(),totalCount,getMapper().gridUserMemberInGroup(entity));
|
||||
}
|
||||
|
||||
public JpaPageResults<UserInfo> gridAllMemberInGroup(GroupMember entity) {
|
||||
Integer totalCount = parseCount(getMapper().countAllUserMemberInGroup(entity));
|
||||
if(totalCount == 0) {
|
||||
return new JpaPageResults<UserInfo>();
|
||||
}
|
||||
|
||||
int totalPage = calculateTotalPage(entity,totalCount);
|
||||
|
||||
if(totalPage == 0) {
|
||||
return new JpaPageResults<UserInfo>();
|
||||
}
|
||||
|
||||
if(totalPage < entity.getPage()) {
|
||||
entity.setPage(totalPage);
|
||||
entity.setStartRow(calculateStartRow(totalPage ,entity.getPageResults()));
|
||||
}
|
||||
entity.setPageable(true);
|
||||
return new JpaPageResults<UserInfo>(entity.getPage(),entity.getPageResults(),totalCount,getMapper().gridAllUserMemberInGroup(entity));
|
||||
}
|
||||
|
||||
public JpaPageResults<UserInfo> gridMemberNotInGroup(GroupMember entity) {
|
||||
Integer totalCount = parseCount(getMapper().countUserMemberNotInGroup(entity));
|
||||
if(totalCount == 0) {
|
||||
return new JpaPageResults<UserInfo>();
|
||||
}
|
||||
|
||||
int totalPage = calculateTotalPage(entity,totalCount);
|
||||
|
||||
if(totalPage == 0) {
|
||||
return new JpaPageResults<UserInfo>();
|
||||
}
|
||||
|
||||
if(totalPage < entity.getPage()) {
|
||||
entity.setPage(totalPage);
|
||||
entity.setStartRow(calculateStartRow(totalPage ,entity.getPageResults()));
|
||||
}
|
||||
entity.setPageable(true);
|
||||
return new JpaPageResults<UserInfo>(entity.getPage(),entity.getPageResults(),totalCount,getMapper().gridUserMemberNotInGroup(entity));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,10 +1,8 @@
|
||||
package org.maxkey.dao.service;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaBaseService;
|
||||
import org.apache.mybatis.jpa.persistence.JpaPageResults;
|
||||
import org.maxkey.dao.persistence.GroupPrivilegesMapper;
|
||||
import org.maxkey.domain.GroupPrivileges;
|
||||
import org.maxkey.domain.apps.Applications;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
@ -25,47 +23,4 @@ public class GroupPrivilegesService extends JpaBaseService<GroupPrivileges>{
|
||||
return (GroupPrivilegesMapper)super.getMapper();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public JpaPageResults<Applications> gridAppsInGroup(GroupPrivileges entity) {
|
||||
Integer totalCount = parseCount(getMapper().countAppsInGroup(entity));
|
||||
if(totalCount == 0) {
|
||||
return new JpaPageResults<Applications>();
|
||||
}
|
||||
|
||||
int totalPage = calculateTotalPage(entity,totalCount);
|
||||
|
||||
if(totalPage == 0) {
|
||||
return new JpaPageResults<Applications>();
|
||||
}
|
||||
|
||||
if(totalPage < entity.getPage()) {
|
||||
entity.setPage(totalPage);
|
||||
entity.setStartRow(calculateStartRow(totalPage ,entity.getPageResults()));
|
||||
}
|
||||
entity.setPageable(true);
|
||||
return new JpaPageResults<Applications>(entity.getPage(),entity.getPageResults(),totalCount,getMapper().gridAppsInGroup(entity));
|
||||
}
|
||||
|
||||
public JpaPageResults<Applications> gridAppsNotInGroupGrid(GroupPrivileges entity) {
|
||||
Integer totalCount = parseCount(getMapper().countAppsNotInGroup(entity));
|
||||
if(totalCount == 0) {
|
||||
return new JpaPageResults<Applications>();
|
||||
}
|
||||
|
||||
int totalPage = calculateTotalPage(entity,totalCount);
|
||||
|
||||
if(totalPage == 0) {
|
||||
return new JpaPageResults<Applications>();
|
||||
}
|
||||
|
||||
if(totalPage < entity.getPage()) {
|
||||
entity.setPage(totalPage);
|
||||
entity.setStartRow(calculateStartRow(totalPage ,entity.getPageResults()));
|
||||
}
|
||||
entity.setPageable(true);
|
||||
return new JpaPageResults<Applications>(entity.getPage(),entity.getPageResults(),totalCount,getMapper().gridAppsNotInGroup(entity));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
|
||||
|
||||
<!-- GROUP_MEMBER User Member-->
|
||||
<select id="gridAllUserMemberInGroup" parameterType="GroupMember" resultType="UserInfo">
|
||||
<select id="allMemberInGroup" parameterType="GroupMember" resultType="GroupMember">
|
||||
SELECT DISTINCT
|
||||
U.ID,
|
||||
U.USERNAME,
|
||||
@ -57,17 +57,9 @@
|
||||
WHERE 1 = 1
|
||||
</select>
|
||||
|
||||
<select id="countAllUserMemberInGroup" parameterType="GroupMember" resultType="java.lang.Integer">
|
||||
SELECT DISTINCT
|
||||
COUNT(U.ID)
|
||||
FROM
|
||||
USERINFO U
|
||||
WHERE 1 = 1
|
||||
</select>
|
||||
|
||||
<select id="gridUserMemberInGroup" parameterType="GroupMember" resultType="UserInfo">
|
||||
<select id="memberInGroup" parameterType="GroupMember" resultType="GroupMember">
|
||||
SELECT DISTINCT
|
||||
U.ID,
|
||||
GM.ID,
|
||||
U.USERNAME,
|
||||
U.USERTYPE,
|
||||
U.WINDOWSACCOUNT,
|
||||
@ -121,27 +113,8 @@
|
||||
AND GM.MEMBERID = U.ID
|
||||
</select>
|
||||
|
||||
<select id="countUserMemberInGroup" parameterType="GroupMember" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(U.ID)
|
||||
FROM
|
||||
USERINFO U,
|
||||
GROUPS G,
|
||||
GROUP_MEMBER GM
|
||||
WHERE 1 = 1
|
||||
<if test="groupId != null and groupId != ''">
|
||||
AND GM.GROUPID = #{groupId}
|
||||
AND G.ID = #{groupId}
|
||||
</if>
|
||||
<if test="groupName != null and groupName != ''">
|
||||
AND G.NAME = #{groupName}
|
||||
</if>
|
||||
AND GM.TYPE = 'USER'
|
||||
AND GM.GROUPID = G.ID
|
||||
AND GM.MEMBERID = U.ID
|
||||
</select>
|
||||
|
||||
<select id="gridUserMemberNotInGroup" parameterType="GroupMember" resultType="UserInfo">
|
||||
<select id="memberNotInGroup" parameterType="GroupMember" resultType="GroupMember">
|
||||
SELECT DISTINCT
|
||||
U.ID,
|
||||
U.USERNAME,
|
||||
@ -199,30 +172,9 @@
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="countUserMemberNotInGroup" parameterType="GroupMember" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(U.ID)
|
||||
FROM
|
||||
USERINFO U
|
||||
WHERE
|
||||
U.ID NOT IN(
|
||||
SELECT GM.MEMBERID
|
||||
FROM GROUPS G,GROUP_MEMBER GM
|
||||
WHERE 1 = 1
|
||||
<if test="groupId != null and groupId != ''">
|
||||
AND GM.GROUPID = #{groupId}
|
||||
AND G.ID = #{groupId}
|
||||
</if>
|
||||
<if test="groupName != null and groupName != ''">
|
||||
AND G.NAME = #{groupName}
|
||||
</if>
|
||||
AND GM.TYPE = 'USER'
|
||||
AND GM.GROUPID = G.ID
|
||||
)
|
||||
</select>
|
||||
|
||||
<!-- GROUP_MEMBER Group Member-->
|
||||
<select id="gridGroupMemberInGroup" parameterType="GroupMember" resultType="Groups">
|
||||
<select id="groupMemberInGroup" parameterType="GroupMember" resultType="Groups">
|
||||
SELECT DISTINCT
|
||||
IG.*
|
||||
FROM
|
||||
@ -242,28 +194,6 @@
|
||||
AND G.NAME = #{groupName}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="countGroupMemberInGroup" parameterType="GroupMember" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(G.ID)
|
||||
FROM
|
||||
GROUPS IG,
|
||||
GROUPS G,
|
||||
GROUP_MEMBER GM
|
||||
WHERE
|
||||
1 = 1
|
||||
AND GM.GROUPID = G.ID
|
||||
AND GM.MEMBERID = IG.ID
|
||||
AND GM.TYPE = 'GROUP'
|
||||
<if test="groupId != null and groupId != ''">
|
||||
AND GM.GROUPID = #{groupId}
|
||||
AND G.ID = #{groupId}
|
||||
</if>
|
||||
|
||||
<if test="groupName != null and groupName != ''">
|
||||
AND G.NAME = #{groupName}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,51 @@
|
||||
<?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="org.maxkey.dao.persistence.GroupPrivilegesMapper" >
|
||||
|
||||
<sql id="where_statement">
|
||||
<if test="id != null and id != ''">
|
||||
AND APPS.ID = #{id}
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
AND APPS.NAME LIKE '%${name}%'
|
||||
</if>
|
||||
<if test="protocol != null and protocol != ''">
|
||||
AND APPS.PROTOCOL = #{protocol}
|
||||
</if>
|
||||
<if test="category != null and category != ''">
|
||||
AND APPS.CATEGORY = #{category}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<!-- AppGroup -->
|
||||
<select id="appsInGroup" parameterType="GroupPrivileges" resultType="GroupPrivileges">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPLICATIONS APPS,
|
||||
GROUP_APP GA
|
||||
WHERE
|
||||
GA.APPID=APPS.ID
|
||||
AND GA.GROUPID = #{groupId}
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
<select id="appsNotInGroup" parameterType="GroupPrivileges" resultType="GroupPrivileges">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
APPLICATIONS APPS
|
||||
WHERE
|
||||
1 = 1
|
||||
AND APPS.ID NOT IN(
|
||||
SELECT
|
||||
APPID
|
||||
FROM
|
||||
GROUP_APP
|
||||
WHERE
|
||||
GROUPID = #{groupId}
|
||||
)
|
||||
<include refid="where_statement"/>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
|
||||
<select id="grid" parameterType="Organizations" resultType="Organizations">
|
||||
<select id="queryPageResults" parameterType="Organizations" resultType="Organizations">
|
||||
SELECT
|
||||
*
|
||||
FROM ORGANIZATIONS
|
||||
@ -29,13 +29,6 @@
|
||||
</select>
|
||||
|
||||
|
||||
<select id="count" resultType="java.lang.Integer">
|
||||
SELECT COUNT(*) FROM ORGANIZATIONS
|
||||
WHERE 1 = 1
|
||||
<include refid="dao_where_statement"/>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="logisticDelete" parameterType="Organizations" >
|
||||
UPDATE ORGANIZATIONS SET STATUS = '2'
|
||||
WHERE 1 = 1
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
/org/
|
||||
/META-INF/
|
||||
/org/
|
||||
|
||||
2
maxkey-protocols/maxkey-protocol-desktop/bin/main/.gitignore
vendored
Normal file
2
maxkey-protocols/maxkey-protocol-desktop/bin/main/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/META-INF/
|
||||
/org/
|
||||
2
maxkey-protocols/maxkey-protocol-extendapi/bin/main/.gitignore
vendored
Normal file
2
maxkey-protocols/maxkey-protocol-extendapi/bin/main/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/META-INF/
|
||||
/org/
|
||||
@ -1,2 +1,2 @@
|
||||
/org/
|
||||
/META-INF/
|
||||
/org/
|
||||
|
||||
2
maxkey-protocols/maxkey-protocol-ltpa/bin/main/.gitignore
vendored
Normal file
2
maxkey-protocols/maxkey-protocol-ltpa/bin/main/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/META-INF/
|
||||
/org/
|
||||
@ -1,2 +1,2 @@
|
||||
/org/
|
||||
/META-INF/
|
||||
/org/
|
||||
|
||||
@ -1 +1,2 @@
|
||||
/META-INF/
|
||||
/org/
|
||||
|
||||
2
maxkey-protocols/maxkey-protocol-tokenbased/bin/main/.gitignore
vendored
Normal file
2
maxkey-protocols/maxkey-protocol-tokenbased/bin/main/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/META-INF/
|
||||
/org/
|
||||
@ -64,8 +64,8 @@ public class AccountsController {
|
||||
@RequestMapping(value = { "/forwardAdd" })
|
||||
public ModelAndView forwardAdd(@ModelAttribute("appAccounts") Accounts appAccounts) {
|
||||
ModelAndView modelAndView=new ModelAndView("/accounts/appAccountsAdd");
|
||||
Applications app= applicationsService.get(appAccounts.getAppId());
|
||||
appAccounts.setAppName(app.getName());
|
||||
//Applications app= applicationsService.get(appAccounts.getAppId());
|
||||
//appAccounts.setAppName(app.getName());
|
||||
modelAndView.addObject("model",appAccounts);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@ -66,13 +66,14 @@ public class GroupMemberController {
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = { "/gridUserMemberInGroup" })
|
||||
@RequestMapping(value = { "/queryMemberInGroup" })
|
||||
@ResponseBody
|
||||
public JpaPageResults<UserInfo> gridUserMemberInGroup(@ModelAttribute("groups") GroupMember groupMember) {
|
||||
public JpaPageResults<GroupMember> queryMemberInGroup(@ModelAttribute("groupMember") GroupMember groupMember) {
|
||||
_logger.debug("groupMember : "+groupMember);
|
||||
if(groupMember.getGroupId()==null||groupMember.getGroupId().equals("")||groupMember.getGroupId().equals("ALL_USER_GROUP")){
|
||||
return groupMemberService.gridAllMemberInGroup(groupMember);
|
||||
return groupMemberService.queryPageResults("allMemberInGroup",groupMember);
|
||||
}else{
|
||||
return groupMemberService.gridMemberInGroup(groupMember);
|
||||
return groupMemberService.queryPageResults("memberInGroup",groupMember);
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,10 +86,10 @@ public class GroupMemberController {
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/gridUserMemberNotInGroup" })
|
||||
@RequestMapping(value = { "/queryMemberNotInGroup" })
|
||||
@ResponseBody
|
||||
public JpaPageResults<UserInfo> queryUserMemberNotInGroupGrid(@ModelAttribute("groupMember") GroupMember groupMember) {
|
||||
return groupMemberService.gridMemberNotInGroup(groupMember);
|
||||
public JpaPageResults<GroupMember> queryMemberNotInGroupGrid(@ModelAttribute("groupMember") GroupMember groupMember) {
|
||||
return groupMemberService.queryPageResults("memberNotInGroup",groupMember);
|
||||
}
|
||||
|
||||
|
||||
@ -124,23 +125,17 @@ public class GroupMemberController {
|
||||
@RequestMapping(value = {"/delete"})
|
||||
@ResponseBody
|
||||
public Message deleteGroupMember(@ModelAttribute("groupMember") GroupMember groupMember) {
|
||||
if (groupMember == null || groupMember.getGroupId() == null) {
|
||||
_logger.debug("groupMember : "+groupMember);
|
||||
|
||||
if (groupMember == null || groupMember.getId() == null) {
|
||||
return new Message("传入参数为空",MessageType.error);
|
||||
}
|
||||
String groupId = groupMember.getGroupId();
|
||||
|
||||
|
||||
boolean result = true;
|
||||
String memberIds = groupMember.getMemberId();
|
||||
String memberNames = groupMember.getMemberName();
|
||||
if (memberIds != null) {
|
||||
String[] arrMemberIds = memberIds.split(",");
|
||||
String[] arrMemberNames = memberNames.split(",");
|
||||
|
||||
String groupMemberIds = groupMember.getId();
|
||||
if (groupMemberIds != null) {
|
||||
String[] arrMemberIds = groupMemberIds.split(",");
|
||||
for (int i = 0; i < arrMemberIds.length; i++) {
|
||||
GroupMember newGroupMember = new GroupMember(groupId,groupMember.getGroupName(), arrMemberIds[i], arrMemberNames[i],"USER");
|
||||
newGroupMember.setId(newGroupMember.generateId());
|
||||
result = groupMemberService.delete(newGroupMember);
|
||||
groupMemberService.remove(arrMemberIds[i]);
|
||||
}
|
||||
if(!result) {
|
||||
return new Message(WebContext.getI18nValue(OPERATEMESSAGE.INSERT_ERROR),MessageType.error);
|
||||
|
||||
@ -35,12 +35,13 @@ public class GroupPrivilegesController {
|
||||
return new ModelAndView("groupapp/groupAppsList");
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/gridAppsInGroup" })
|
||||
@RequestMapping(value = { "/queryAppsInGroup" })
|
||||
@ResponseBody
|
||||
public JpaPageResults<Applications> queryAppsInGroupGrid(@ModelAttribute("groupApp") GroupPrivileges groupApp) {
|
||||
public JpaPageResults<GroupPrivileges> queryAppsInGroup(@ModelAttribute("groupApp") GroupPrivileges groupApp) {
|
||||
|
||||
JpaPageResults<Applications> jqGridApp;
|
||||
jqGridApp= groupPrivilegesService.gridAppsInGroup(groupApp);
|
||||
JpaPageResults<GroupPrivileges> jqGridApp;
|
||||
|
||||
jqGridApp= groupPrivilegesService.queryPageResults("appsInGroup",groupApp);
|
||||
|
||||
if(jqGridApp!=null&&jqGridApp.getRows()!=null){
|
||||
for (Applications app : jqGridApp.getRows()){
|
||||
@ -59,13 +60,12 @@ public class GroupPrivilegesController {
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = { "/appsNotInGroupGrid" })
|
||||
@RequestMapping(value = { "/queryAppsNotInGroup" })
|
||||
@ResponseBody
|
||||
public JpaPageResults<Applications> queryAppsNotInGroupGrid(@ModelAttribute("groupApp") GroupPrivileges groupApp) {
|
||||
|
||||
JpaPageResults<Applications> jqGridApp;
|
||||
public JpaPageResults<GroupPrivileges> queryAppsNotInGroup(@ModelAttribute("groupApp") GroupPrivileges groupApp) {
|
||||
JpaPageResults<GroupPrivileges> jqGridApp;
|
||||
|
||||
jqGridApp= groupPrivilegesService.gridAppsNotInGroupGrid(groupApp);
|
||||
jqGridApp= groupPrivilegesService.queryPageResults("appsNotInGroup",groupApp);
|
||||
|
||||
if(jqGridApp!=null&&jqGridApp.getRows()!=null){
|
||||
for (Applications app : jqGridApp.getRows()){
|
||||
@ -107,20 +107,18 @@ public class GroupPrivilegesController {
|
||||
@RequestMapping(value = {"/delete"})
|
||||
@ResponseBody
|
||||
public Message deleteGroupApp(@ModelAttribute("groupApp") GroupPrivileges groupApp) {
|
||||
if (groupApp == null || groupApp.getGroupId() == null) {
|
||||
if (groupApp == null || groupApp.getId() == null) {
|
||||
return new Message("传入参数为空",MessageType.error);
|
||||
}
|
||||
String groupId = groupApp.getGroupId();
|
||||
String privilegesIds = groupApp.getId();
|
||||
|
||||
|
||||
boolean result = true;
|
||||
String appIds = groupApp.getAppId();
|
||||
if (appIds != null) {
|
||||
String[] arrAppIds = appIds.split(",");
|
||||
if (privilegesIds != null) {
|
||||
String[] arrPrivilegesIds = privilegesIds.split(",");
|
||||
|
||||
for (int i = 0; i < arrAppIds.length; i++) {
|
||||
GroupPrivileges newGroupApp = new GroupPrivileges(groupId, arrAppIds[i]);
|
||||
result = groupPrivilegesService.delete(newGroupApp);
|
||||
for (int i = 0; i < arrPrivilegesIds.length; i++) {
|
||||
result = groupPrivilegesService.remove(arrPrivilegesIds[i]);
|
||||
}
|
||||
if(!result) {
|
||||
return new Message(WebContext.getI18nValue(OPERATEMESSAGE.INSERT_ERROR),MessageType.error);
|
||||
|
||||
@ -119,7 +119,7 @@ public class GroupsController {
|
||||
public Message delete(@ModelAttribute("group") Groups group) {
|
||||
_logger.debug("-delete group :" + group);
|
||||
|
||||
if (groupsService.delete(group)) {
|
||||
if (groupsService.remove(group.getId())) {
|
||||
return new Message(WebContext.getI18nValue(OPERATEMESSAGE.DELETE_SUCCESS),MessageType.success);
|
||||
|
||||
} else {
|
||||
|
||||
@ -3,6 +3,7 @@ package org.maxkey.web.contorller;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.mybatis.jpa.persistence.JpaPageResults;
|
||||
import org.maxkey.dao.service.OrganizationsService;
|
||||
import org.maxkey.domain.Organizations;
|
||||
import org.maxkey.web.WebContext;
|
||||
@ -24,7 +25,7 @@ import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
@Controller
|
||||
@RequestMapping({"/orgs"})
|
||||
public class OrganizationsController{
|
||||
public class OrganizationsController {
|
||||
static final Logger _logger = LoggerFactory.getLogger(OrganizationsController.class);
|
||||
|
||||
|
||||
@ -36,35 +37,19 @@ public class OrganizationsController{
|
||||
@RequestMapping({"/tree"})
|
||||
public List<HashMap<String, Object>> organizationsTree(@RequestParam(value = "id", required = false) String id) {
|
||||
_logger.debug("organizationsTree id :" + id);
|
||||
Organizations org = new Organizations();
|
||||
List<Organizations> organizationsList = this.organizationsService.query(org);
|
||||
|
||||
Organizations rootOrganization = new Organizations();
|
||||
rootOrganization.setId("1");
|
||||
rootOrganization.setName("");
|
||||
rootOrganization.setFullName("");
|
||||
rootOrganization.setpName("Root");
|
||||
rootOrganization.setxPath("/1");
|
||||
rootOrganization.setxNamePath("/" );
|
||||
rootOrganization.setpId("-1");
|
||||
|
||||
Organizations queryOrg = new Organizations();
|
||||
List<Organizations> organizationsList = this.organizationsService.query(queryOrg);
|
||||
TreeNodeList treeNodeList = new TreeNodeList();
|
||||
TreeNode rootTreeNode = new TreeNode("1", "");
|
||||
rootTreeNode.setAttr("data", rootOrganization);
|
||||
rootTreeNode.setPId(rootOrganization.getpId());
|
||||
rootTreeNode.setAttr("open", Boolean.valueOf(true));
|
||||
treeNodeList.addTreeNode(rootTreeNode.getAttr());
|
||||
|
||||
for (Organizations organization : organizationsList) {
|
||||
TreeNode treeNode = new TreeNode(organization.getId(), organization.getName());
|
||||
if (organization.getHasChild() != null && organization.getHasChild().equals(Character.valueOf('Y'))) {
|
||||
for (Organizations org : organizationsList) {
|
||||
TreeNode treeNode = new TreeNode(org.getId(), org.getName());
|
||||
if (org.getHasChild() != null && org.getHasChild().startsWith("Y")) {
|
||||
treeNode.setHasChild();
|
||||
}
|
||||
|
||||
|
||||
treeNode.setAttr("data", organization);
|
||||
treeNode.setPId(organization.getpId());
|
||||
if (organization.getId().equals("1")) {
|
||||
treeNode.setAttr("data", org);
|
||||
treeNode.setPId(org.getpId());
|
||||
if (org.getId().equals("1")) {
|
||||
treeNode.setAttr("open", Boolean.valueOf(true));
|
||||
} else {
|
||||
treeNode.setAttr("open", Boolean.valueOf(false));
|
||||
@ -78,10 +63,17 @@ public class OrganizationsController{
|
||||
|
||||
|
||||
|
||||
@RequestMapping({"/list"})
|
||||
public ModelAndView orgsTreeList() { return new ModelAndView("orgs/orgsList"); }
|
||||
@RequestMapping({ "/list" })
|
||||
public ModelAndView orgsTreeList() {
|
||||
return new ModelAndView("orgs/orgsList");
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/pageresults" })
|
||||
@ResponseBody
|
||||
public JpaPageResults<Organizations> pageResults(@ModelAttribute("orgs") Organizations orgs) {
|
||||
return organizationsService.queryPageResults(orgs);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping({"/orgsSelect/{deptId}/{department}"})
|
||||
@ -93,20 +85,26 @@ public class OrganizationsController{
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = { "/forwardAdd" })
|
||||
public ModelAndView forwardAdd(@ModelAttribute("org") Organizations org) {
|
||||
ModelAndView modelAndView=new ModelAndView("/orgs/orgsAdd");
|
||||
org =organizationsService.get(org.getId());
|
||||
modelAndView.addObject("model",org);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping({"/add"})
|
||||
public Message insert(@ModelAttribute("organization") Organizations organization) {
|
||||
_logger.debug("-Add :" + organization);
|
||||
if (null == organization.getId() || organization.getId().equals("")) {
|
||||
organization.generateId();
|
||||
public Message insert(@ModelAttribute("org") Organizations org) {
|
||||
_logger.debug("-Add :" + org);
|
||||
if (null == org.getId() || org.getId().equals("")) {
|
||||
org.generateId();
|
||||
}
|
||||
|
||||
if (this.organizationsService.insert(organization)) {
|
||||
if (this.organizationsService.insert(org)) {
|
||||
return new Message(WebContext.getI18nValue("message.action.insert.success"), MessageType.success);
|
||||
}
|
||||
|
||||
@ -122,9 +120,9 @@ public class OrganizationsController{
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping({"/query"})
|
||||
public Message query(@ModelAttribute("organization") Organizations organization) {
|
||||
_logger.debug("-query :" + organization);
|
||||
if (this.organizationsService.load(organization) != null) {
|
||||
public Message query(@ModelAttribute("org") Organizations org) {
|
||||
_logger.debug("-query :" + org);
|
||||
if (this.organizationsService.load(org) != null) {
|
||||
return new Message(WebContext.getI18nValue("message.action.insert.success"), MessageType.success);
|
||||
}
|
||||
|
||||
@ -134,15 +132,22 @@ public class OrganizationsController{
|
||||
|
||||
|
||||
|
||||
|
||||
@RequestMapping(value = { "/forwardUpdate/{id}" })
|
||||
public ModelAndView forwardUpdate(@PathVariable("id") String id) {
|
||||
ModelAndView modelAndView=new ModelAndView("/orgs/orgsUpdate");
|
||||
Organizations org =organizationsService.get(id);
|
||||
|
||||
modelAndView.addObject("model",org);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping({"/update"})
|
||||
public Message update(@ModelAttribute("organization") Organizations organization) {
|
||||
_logger.debug("-update organization :" + organization);
|
||||
if (this.organizationsService.update(organization)) {
|
||||
public Message update(@ModelAttribute("org") Organizations org) {
|
||||
_logger.debug("-update organization :" + org);
|
||||
if (this.organizationsService.update(org)) {
|
||||
return new Message(WebContext.getI18nValue("message.action.update.success"), MessageType.success);
|
||||
}
|
||||
|
||||
@ -155,12 +160,11 @@ public class OrganizationsController{
|
||||
|
||||
|
||||
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping({"/delete"})
|
||||
public Message delete(@ModelAttribute("organization") Organizations organization) {
|
||||
_logger.debug("-delete organization :" + organization);
|
||||
if (this.organizationsService.delete(organization)) {
|
||||
public Message delete(@ModelAttribute("org") Organizations org) {
|
||||
_logger.debug("-delete organization :" + org);
|
||||
if (this.organizationsService.remove(org.getId())) {
|
||||
return new Message(WebContext.getI18nValue("message.action.delete.success"), MessageType.success);
|
||||
}
|
||||
|
||||
@ -172,4 +176,11 @@ public class OrganizationsController{
|
||||
|
||||
@RequestMapping({"/orgUsersList"})
|
||||
public ModelAndView orgUsersList() { return new ModelAndView("orgs/orgUsersList"); }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -1,255 +0,0 @@
|
||||
package org.maxkey.web.contorller;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.format.DateTimeFormat;
|
||||
import org.maxkey.dao.service.ReportService;
|
||||
import org.maxkey.util.JsonUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
|
||||
|
||||
/**
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping(value = { "/report" })
|
||||
public class ReportLoginController {
|
||||
final static Logger _logger = LoggerFactory.getLogger(ReportLoginController.class);
|
||||
|
||||
@Autowired
|
||||
@Qualifier("reportService")
|
||||
private ReportService reportService;
|
||||
|
||||
|
||||
@RequestMapping(value = { "/login/day" })
|
||||
public ModelAndView dayReport(
|
||||
@RequestParam(value="reportDate",required=false) String reportDate) {
|
||||
ModelAndView modelAndView=new ModelAndView("report/login/day");
|
||||
if(reportDate==null||reportDate.equals("")){
|
||||
DateTime currentdateTime = new DateTime();
|
||||
reportDate=currentdateTime.toString( DateTimeFormat.forPattern("yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
List<Map<String, Object>> listDayReport=reportService.analysisDay(reportDate);
|
||||
Integer[] dayReportArray=new Integer[24];
|
||||
for(int i=0;i<24;i++){
|
||||
dayReportArray[i]=0;
|
||||
}
|
||||
for(Map<String, Object> record :listDayReport){
|
||||
Integer count=Integer.parseInt(record.get("REPORTCOUNT").toString());
|
||||
int hour=Integer.parseInt(record.get("REPORTHOUR").toString());
|
||||
dayReportArray[hour]=count;
|
||||
}
|
||||
|
||||
String jsonDayReport=JsonUtils.gson2Json(dayReportArray);
|
||||
_logger.info(""+jsonDayReport);
|
||||
|
||||
modelAndView.addObject("dayReportArray",jsonDayReport);
|
||||
modelAndView.addObject("reportDate",reportDate);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/login/month" })
|
||||
public ModelAndView monthReport(
|
||||
@RequestParam(value="reportDate",required=false) String reportDate) {
|
||||
ModelAndView modelAndView=new ModelAndView("report/login/month");
|
||||
if(reportDate==null||reportDate.equals("")){
|
||||
DateTime currentdateTime = new DateTime();
|
||||
reportDate=currentdateTime.toString( DateTimeFormat.forPattern("yyyy-MM-dd"));
|
||||
}
|
||||
|
||||
List<Map<String, Object>> listMonthReport=reportService.analysisMonth(reportDate);
|
||||
Integer[] monthReportArray=new Integer[31];
|
||||
for(int i=0;i<31;i++){
|
||||
monthReportArray[i]=0;
|
||||
}
|
||||
for(Map<String, Object> record :listMonthReport){
|
||||
Integer count=Integer.parseInt(record.get("REPORTCOUNT").toString());
|
||||
int day=Integer.parseInt(record.get("REPORTDAY").toString());
|
||||
monthReportArray[day-1]=count;
|
||||
}
|
||||
|
||||
String jsonMonthReport=JsonUtils.gson2Json(monthReportArray);
|
||||
_logger.info(""+jsonMonthReport);
|
||||
|
||||
modelAndView.addObject("jsonMonthReport",jsonMonthReport);
|
||||
modelAndView.addObject("reportDate",reportDate);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/login/year" })
|
||||
public ModelAndView yearReport(
|
||||
@RequestParam(value="reportDate",required=false) Integer reportDate) {
|
||||
ModelAndView modelAndView=new ModelAndView("report/login/year");
|
||||
if(reportDate==null||reportDate.equals("")){
|
||||
DateTime currentdateTime = new DateTime();
|
||||
reportDate=Integer.parseInt(currentdateTime.toString( DateTimeFormat.forPattern("yyyy")));
|
||||
}
|
||||
|
||||
List<Map<String, Object>> listMonthReport=reportService.analysisYear(reportDate);
|
||||
|
||||
Integer[] monthReportArray=new Integer[12];
|
||||
for(int i=0;i<12;i++){
|
||||
monthReportArray[i]=0;
|
||||
}
|
||||
for(Map<String, Object> record :listMonthReport){
|
||||
Integer count=Integer.parseInt(record.get("REPORTCOUNT").toString());
|
||||
int month=Integer.parseInt(record.get("REPORTMONTH").toString());
|
||||
monthReportArray[month-1]=count;
|
||||
}
|
||||
|
||||
String jsonMonthReport=JsonUtils.gson2Json(monthReportArray);
|
||||
_logger.info(""+jsonMonthReport);
|
||||
|
||||
modelAndView.addObject("jsonMonthReport",jsonMonthReport);
|
||||
modelAndView.addObject("reportDate",reportDate);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/login/browser" })
|
||||
public ModelAndView browserReport(
|
||||
@RequestParam(value="startDate",required=false) String startDate,
|
||||
@RequestParam(value="endDate",required=false) String endDate) {
|
||||
ModelAndView modelAndView=new ModelAndView("report/login/browser");
|
||||
String startDateTime="";
|
||||
String endDateTime="";
|
||||
if(startDate==null||startDate.equals("")){
|
||||
DateTime currentdateTime = new DateTime();
|
||||
startDate=currentdateTime.toString( DateTimeFormat.forPattern("yyyy-MM-dd"));
|
||||
startDateTime=currentdateTime.toString( DateTimeFormat.forPattern("yyyy-MM-dd 00:00:00"));
|
||||
}else{
|
||||
startDateTime=startDate+" 00:00:00";
|
||||
}
|
||||
if(endDate==null||endDate.equals("")){
|
||||
DateTime currentdateTime = new DateTime();
|
||||
endDate=currentdateTime.toString( DateTimeFormat.forPattern("yyyy-MM-dd"));
|
||||
endDateTime=currentdateTime.toString( DateTimeFormat.forPattern("yyyy-MM-dd 23:59:59"));
|
||||
}else{
|
||||
endDateTime=endDate+" 23:59:59";
|
||||
}
|
||||
|
||||
Map<String,Object> reportDate=new HashMap<String,Object>();
|
||||
reportDate.put("startDate", startDateTime);
|
||||
reportDate.put("endDate", endDateTime);
|
||||
List<Map<String, Object>> listReport=reportService.analysisBrowser(reportDate);
|
||||
|
||||
Integer[] countArray=new Integer[listReport.size()];
|
||||
String [] categoryArray=new String[listReport.size()];
|
||||
String [] categoryPieArray=new String[listReport.size()];
|
||||
Map[] countPieArray=new HashMap[listReport.size()];
|
||||
for(int i=0;i<listReport.size();i++){
|
||||
countArray[i]=0;
|
||||
}
|
||||
int recordCount=listReport.size()-1;
|
||||
|
||||
Integer countAll=0;
|
||||
for(Map<String, Object> record :listReport){
|
||||
countAll=countAll+Integer.parseInt(record.get("REPORTCOUNT").toString());
|
||||
}
|
||||
_logger.info("countAll : "+countAll);
|
||||
|
||||
for(Map<String, Object> record :listReport){
|
||||
Integer count=Integer.parseInt(record.get("REPORTCOUNT").toString());
|
||||
String browser=record.get("BROWSER").toString();
|
||||
|
||||
countArray[recordCount]=count;
|
||||
categoryArray[recordCount]=browser;
|
||||
String pieBrowser=((count*100f)/countAll)+"";
|
||||
if(pieBrowser.length()>5){
|
||||
pieBrowser=browser+"("+(pieBrowser.substring(0, 5))+"%)";
|
||||
}else{
|
||||
pieBrowser=browser+"("+pieBrowser+"%)";
|
||||
}
|
||||
Map<String,Object> nameValue=new HashMap<String,Object>();
|
||||
nameValue.put("name", pieBrowser);
|
||||
nameValue.put("value", count);
|
||||
countPieArray[recordCount]=nameValue;
|
||||
categoryPieArray[recordCount]=pieBrowser;
|
||||
|
||||
_logger.info("count : "+count);
|
||||
|
||||
recordCount--;
|
||||
}
|
||||
|
||||
String jsonReport=JsonUtils.gson2Json(countArray);
|
||||
String categoryReport=JsonUtils.gson2Json(categoryArray);
|
||||
String pieReport=JsonUtils.gson2Json(countPieArray);
|
||||
String categoryPieReport=JsonUtils.gson2Json(categoryPieArray);
|
||||
_logger.info(""+jsonReport);
|
||||
|
||||
modelAndView.addObject("jsonReport",jsonReport);
|
||||
modelAndView.addObject("categoryReport",categoryReport);
|
||||
modelAndView.addObject("categoryPieReport",categoryPieReport);
|
||||
modelAndView.addObject("pieReport",pieReport);
|
||||
modelAndView.addObject("startDate",startDate);
|
||||
modelAndView.addObject("endDate",endDate);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@RequestMapping(value = { "/login/app" })
|
||||
public ModelAndView appReport(
|
||||
@RequestParam(value="startDate",required=false) String startDate,
|
||||
@RequestParam(value="endDate",required=false) String endDate) {
|
||||
ModelAndView modelAndView=new ModelAndView("report/login/app");
|
||||
String startDateTime="";
|
||||
String endDateTime="";
|
||||
if(startDate==null||startDate.equals("")){
|
||||
DateTime currentdateTime = new DateTime();
|
||||
startDate=currentdateTime.toString( DateTimeFormat.forPattern("yyyy-MM-dd"));
|
||||
startDateTime=currentdateTime.toString( DateTimeFormat.forPattern("yyyy-MM-dd 00:00:00"));
|
||||
}else{
|
||||
startDateTime=startDate+" 00:00:00";
|
||||
}
|
||||
if(endDate==null||endDate.equals("")){
|
||||
DateTime currentdateTime = new DateTime();
|
||||
endDate=currentdateTime.toString( DateTimeFormat.forPattern("yyyy-MM-dd"));
|
||||
endDateTime=currentdateTime.toString( DateTimeFormat.forPattern("yyyy-MM-dd 23:59:59"));
|
||||
}else{
|
||||
endDateTime=endDate+" 23:59:59";
|
||||
}
|
||||
|
||||
Map<String,Object> reportDate=new HashMap<String,Object>();
|
||||
reportDate.put("startDate", startDateTime);
|
||||
reportDate.put("endDate", endDateTime);
|
||||
List<Map<String, Object>> listReport=reportService.analysisApp(reportDate);
|
||||
|
||||
Integer[] countArray=new Integer[listReport.size()];
|
||||
String [] categoryArray=new String[listReport.size()];
|
||||
|
||||
for(int i=0;i<listReport.size();i++){
|
||||
countArray[i]=0;
|
||||
}
|
||||
int recordCount=listReport.size()-1;
|
||||
for(Map<String, Object> record :listReport){
|
||||
Integer count=Integer.parseInt(record.get("REPORTCOUNT").toString());
|
||||
String app=record.get("APPNAME").toString();
|
||||
countArray[recordCount]=count;
|
||||
categoryArray[recordCount]=app;
|
||||
|
||||
recordCount--;
|
||||
}
|
||||
|
||||
String jsonReport=JsonUtils.gson2Json(countArray);
|
||||
String categoryReport=JsonUtils.gson2Json(categoryArray);
|
||||
|
||||
_logger.info(""+jsonReport);
|
||||
|
||||
modelAndView.addObject("jsonReport",jsonReport);
|
||||
modelAndView.addObject("categoryReport",categoryReport);
|
||||
modelAndView.addObject("startDate",startDate);
|
||||
modelAndView.addObject("endDate",endDate);
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
}
|
||||
@ -4,7 +4,6 @@ import java.beans.PropertyEditorSupport;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.validation.Valid;
|
||||
@ -14,7 +13,6 @@ import org.maxkey.constants.OPERATEMESSAGE;
|
||||
import org.maxkey.crypto.ReciprocalUtils;
|
||||
import org.maxkey.dao.service.UserInfoService;
|
||||
import org.maxkey.domain.UserInfo;
|
||||
import org.maxkey.util.DateUtils;
|
||||
import org.maxkey.util.JsonUtils;
|
||||
import org.maxkey.util.StringUtils;
|
||||
import org.maxkey.web.WebContext;
|
||||
@ -87,13 +85,9 @@ public class UserInfoController {
|
||||
return new ModelAndView("/userinfo/usersList");
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/usersSelect/{uid}/{username}"})
|
||||
public ModelAndView usersSelect(
|
||||
@PathVariable("uid") String uid,
|
||||
@PathVariable("username") String username){
|
||||
ModelAndView modelAndView= new ModelAndView("/userinfo/usersSelect");
|
||||
modelAndView.addObject("uid", uid);
|
||||
modelAndView.addObject("username", username);
|
||||
@RequestMapping(value={"/select"})
|
||||
public ModelAndView usersSelect(){
|
||||
ModelAndView modelAndView= new ModelAndView("/userinfo/userinfoSelect");
|
||||
return modelAndView;
|
||||
}
|
||||
|
||||
@ -124,12 +118,10 @@ public class UserInfoController {
|
||||
@RequestMapping(value={"/forwardUpdate/{id}"})
|
||||
public ModelAndView forwardUpdateUsers(@PathVariable("id")String id){
|
||||
ModelAndView modelAndView=new ModelAndView("/userinfo/userUpdate");
|
||||
UserInfo userInfo=new UserInfo();
|
||||
userInfo.setId(id);
|
||||
userInfo=userInfoService.load(userInfo);
|
||||
WebContext.getSession().setAttribute(userInfo.getId(), userInfo.getPicture());
|
||||
|
||||
|
||||
UserInfo userInfo=userInfoService.get(id);
|
||||
if(userInfo.getPicture()!=null){
|
||||
WebContext.getSession().setAttribute(userInfo.getId(), userInfo.getPicture());
|
||||
}
|
||||
|
||||
modelAndView.addObject("model", userInfo);
|
||||
return modelAndView;
|
||||
@ -234,9 +226,7 @@ public class UserInfoController {
|
||||
@RequestMapping(value={"/forwardChangePassword/{id}"})
|
||||
public ModelAndView forwardChangePassword(@PathVariable("id")String id){
|
||||
ModelAndView modelAndView=new ModelAndView("/userinfo/changePassword");
|
||||
UserInfo userInfo=new UserInfo();
|
||||
userInfo.setId(id);
|
||||
userInfo=userInfoService.load(userInfo);
|
||||
UserInfo userInfo=userInfoService.get(id);
|
||||
|
||||
modelAndView.addObject("model", userInfo);
|
||||
return modelAndView;
|
||||
|
||||
@ -47,7 +47,7 @@ common.text.status.unlock=\u89E3\u9501
|
||||
common.text.status.invalid=\u65E0\u6548
|
||||
common.text.status.expired=\u8FC7\u671F
|
||||
common.text.status.delete=\u5220\u9664
|
||||
|
||||
common.text.description=\u63CF\u8FF0
|
||||
|
||||
|
||||
login.text.login.twofactor.obtain.valid=\u91CD\u65B0\u83B7\u53D6
|
||||
@ -185,6 +185,31 @@ userinfo.authnType.authnType.8=RSA\u4EE4\u724C
|
||||
userinfo.authnType.authnType.9=\u6570\u5B57\u8BC1\u4E66
|
||||
userinfo.authnType.authnType.10=USB Key
|
||||
|
||||
org.tab.basic=\u57FA\u672C\u4FE1\u606F
|
||||
org.tab.extra=\u6269\u5C55\u4FE1\u606F
|
||||
org.id=\u673A\u6784\u7F16\u53F7
|
||||
org.name=\u673A\u6784\u540D\u79F0
|
||||
org.pid=\u7236\u7EA7\u7F16\u53F7
|
||||
org.pname=\u7236\u7EA7\u540D\u79F0
|
||||
org.fullname=\u673A\u6784\u5168\u79F0
|
||||
org.xpath=ID\u8DEF\u5F84
|
||||
org.xnamepath=\u540D\u79F0\u8DEF\u5F84
|
||||
org.type=\u7C7B\u578B
|
||||
org.division=\u5206\u652F\u673A\u6784
|
||||
org.contact=\u8054\u7CFB\u4EBA
|
||||
org.phone=\u7535\u8BDD
|
||||
org.email=\u90AE\u7BB1
|
||||
org.fax=\u4F20\u771F
|
||||
org.country=\u56FD\u5BB6
|
||||
org.region=\u7701
|
||||
org.locality=\u57CE\u5E02
|
||||
org.street=\u8857\u9053
|
||||
org.address=\u5730\u5740
|
||||
org.postalcode=\u90AE\u7F16
|
||||
org.sortorder=\u6392\u5E8F
|
||||
org.description=\u63CF\u8FF0
|
||||
|
||||
|
||||
login.totp.sharedSecret=\u5171\u4EAB\u5BC6\u7801
|
||||
login.totp.period=\u5468\u671F
|
||||
login.totp.digits=\u6570\u5B57
|
||||
@ -240,6 +265,9 @@ button.text.select=\u8BF7\u9009\u62E9
|
||||
button.text.search=\u67E5\u8BE2
|
||||
button.text.expandsearch=\u5C55\u5F00
|
||||
button.text.collapsesearch=\u6536\u7F29
|
||||
button.text.cancel=\u53D6\u6D88
|
||||
button.text.add.member=\u65B0\u589E\u6210\u5458
|
||||
button.text.delete.member=\u5220\u9664\u6210\u5458
|
||||
|
||||
log.loginhistory.id=\u7F16\u53F7
|
||||
log.loginhistory.sessionId=\u4F1A\u8BDD
|
||||
|
||||
@ -8,15 +8,15 @@
|
||||
border:0;
|
||||
}
|
||||
#j_username,#j_password,#tfa_j_username,#tfa_j_password,#currentTime{
|
||||
width :230px;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#j_captcha{
|
||||
width :160px;
|
||||
width :70%;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#tfa_j_otp_captcha{
|
||||
|
||||
@ -339,15 +339,14 @@ $(function(){
|
||||
beforeUpdate(this);
|
||||
}
|
||||
|
||||
var selectId=null;
|
||||
if($("#list2").length>0){//get grid list selected ids
|
||||
selectId=$("#list2").jqGrid("getGridParam", "selrow");
|
||||
var rowData = $("#list2").jqGrid("getRowData", selectId);
|
||||
selectId=rowData.id;
|
||||
}else if($("#list").length>0){//get grid list selected ids
|
||||
selectId=$("#list").jqGrid("getGridParam", "selrow");
|
||||
var rowData = $("#list").jqGrid("getRowData", selectId);
|
||||
selectId=rowData.id;
|
||||
var selectId="";
|
||||
if($("#datagrid").length>0){//get grid list selected ids
|
||||
var selRows = $('#datagrid').bootstrapTable('getSelections');
|
||||
for (var i=0;i<selRows.length; i++){
|
||||
selectId=selectId+","+selRows[i].id;
|
||||
break;
|
||||
}
|
||||
selectId=selectId.substring(1);
|
||||
}
|
||||
|
||||
if(selectId == null || selectId == "") {
|
||||
@ -416,33 +415,14 @@ $(function(){
|
||||
if (typeof(beforeDelete) == "function"){
|
||||
beforeDelete(this);//before function
|
||||
}
|
||||
var selectIds=null;
|
||||
if($("#list2").length>0){//get grid list selected ids
|
||||
if(list2_gridSettings.multiselect==true){
|
||||
selectIds = $("#list2").jqGrid("getGridParam", "selarrrow");
|
||||
for (var i = 0; i < selectIds.length; i++){
|
||||
var rowData = $("#list2").jqGrid("getRowData", selectIds[i]);
|
||||
selectIds[i]=rowData.id;
|
||||
}
|
||||
}else{
|
||||
selectIds=$("#list2").jqGrid("getGridParam", "selrow");
|
||||
var rowData = $("#list2").jqGrid("getRowData", selectIds);
|
||||
selectIds=rowData.id;
|
||||
}
|
||||
}else if($("#list").length>0){//get grid list selected ids
|
||||
if(list_gridSettings.multiselect==true){
|
||||
selectIds = $("#list").jqGrid("getGridParam", "selarrrow");
|
||||
for (var i = 0; i < selectIds.length; i++){
|
||||
var rowData = $("#list").jqGrid("getRowData", selectIds[i]);
|
||||
selectIds[i]=rowData.id;
|
||||
}
|
||||
}else{
|
||||
selectIds=$("#list").jqGrid("getGridParam", "selrow");
|
||||
var rowData = $("#list").jqGrid("getRowData", selectIds);
|
||||
selectIds=rowData.id;
|
||||
var selectIds="";
|
||||
if($("#datagrid").length>0){//get grid list selected ids
|
||||
var selRows = $('#datagrid').bootstrapTable('getSelections');
|
||||
for (var i=0;i<selRows.length; i++){
|
||||
selectIds=selectIds+","+selRows[i].id;
|
||||
}
|
||||
selectIds=selectIds.substring(1);
|
||||
}
|
||||
|
||||
if(selectIds == null || selectIds == "") {
|
||||
$.alert({content:$.platform.messages.select.alertText});
|
||||
return;
|
||||
@ -460,11 +440,7 @@ $(function(){
|
||||
//alert delete result
|
||||
$.alert({content:data.message,type:$.platform.messages.messageType[data.messageType]});
|
||||
//refresh grid list
|
||||
if($("#list2").length>0){
|
||||
$("#list2").jqGrid('setGridParam').trigger("reloadGrid");
|
||||
}else if($("#list").length>0){
|
||||
$("#list").jqGrid('setGridParam').trigger("reloadGrid");
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
});
|
||||
@ -476,9 +452,7 @@ $(function(){
|
||||
if($("#actionForm").attr("autoclose")) {
|
||||
// try to refresh parent grid list
|
||||
if($.dialog.parent) {
|
||||
try {
|
||||
$.dialog.parent.$("#list").jqGrid('setGridParam').trigger("reloadGrid");
|
||||
}catch(e){}
|
||||
|
||||
$.dialog.close();
|
||||
return;
|
||||
}
|
||||
@ -595,277 +569,12 @@ $(function(){
|
||||
});
|
||||
};
|
||||
|
||||
//define grid
|
||||
$.platform.gridRefesh={};
|
||||
$.extend($.platform.gridRefesh, {
|
||||
gridRefesh:{
|
||||
mask : true,//is unmask
|
||||
grid : "list",//grid list id
|
||||
subGrid : null,//grid's sub id
|
||||
callback : null//callbak
|
||||
}
|
||||
});
|
||||
|
||||
//$.window open,refresh callback
|
||||
$.windowGridRefresh=function(){
|
||||
var settings=$.extend({
|
||||
mask : true,//is unmask
|
||||
grid : "list",//grid list id
|
||||
subGrid : null,//grid's sub id
|
||||
callback : null//callbak
|
||||
}, $.platform.gridRefesh || {});
|
||||
settings.subGrid=null;
|
||||
$.gridRefresh(settings);
|
||||
};
|
||||
//$.window open,refresh sub callback
|
||||
$.windowSubGridRefresh=function(){
|
||||
var settings=$.extend({
|
||||
mask : true,//is unmask
|
||||
grid : "list",//grid list id
|
||||
subGrid : null,//grid's sub id
|
||||
callback : null//callbak
|
||||
}, $.platform.gridRefesh || {});
|
||||
$.gridRefresh(settings);
|
||||
$.dataGridSelRowsData=function(dataGridElement){
|
||||
return $(dataGridElement).bootstrapTable('getSelections');
|
||||
};
|
||||
|
||||
//grid refresh
|
||||
$.gridRefresh=function (settings){
|
||||
var settings=$.extend({
|
||||
mask : false,//mask
|
||||
grid : "list",//grid list id
|
||||
subGrid : null,//grid's sub id
|
||||
callback : null//callbak
|
||||
}, settings || {});
|
||||
|
||||
if(settings.subGrid){//sub grid refresh
|
||||
$("#"+settings.subGrid+" .ui-icon-refresh").click();
|
||||
//$("#"+settings.subGrid).jqGrid('setGridParam').trigger("reloadGrid");
|
||||
}else{//refresh grid
|
||||
$("#"+settings.grid).jqGrid('setGridParam').trigger("reloadGrid");
|
||||
}
|
||||
|
||||
if(settings.mask==true){//unmask
|
||||
$.unmask();
|
||||
}
|
||||
if(settings.callback){//callback
|
||||
settings.callback();
|
||||
}
|
||||
};
|
||||
|
||||
$.gridRowData=function(listId,rowId){
|
||||
return $(listId).jqGrid("getRowData",rowId);
|
||||
};
|
||||
|
||||
$.gridSel=function (listId){
|
||||
var selectIds=null;
|
||||
var gridIds="";
|
||||
if(typeof($(listId))=="object"){//get grid list selected ids
|
||||
//alert("typeof"+(typeof($(listId))=="object"));
|
||||
if($(listId).jqGrid("getGridParam", "multiselect")){
|
||||
selectIds = $(listId).jqGrid("getGridParam", "selarrrow");
|
||||
}else{
|
||||
selectIds=$(listId).jqGrid("getGridParam", "selrow");
|
||||
}
|
||||
gridIds=selectIds;
|
||||
if(gridIds == null || gridIds == ""){
|
||||
$.alert({content:$.platform.messages.select.alertText});
|
||||
return null;
|
||||
}else{
|
||||
return gridIds;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
$.gridSelIds=function (listId){
|
||||
var selectIds=null;
|
||||
var gridIds="";
|
||||
if(typeof($(listId))=="object"){//get grid list selected ids
|
||||
//alert("typeof"+(typeof($(listId))=="object"));
|
||||
if($(listId).jqGrid("getGridParam", "multiselect")){
|
||||
selectIds = $(listId).jqGrid("getGridParam", "selarrrow");
|
||||
for (var i = 0; i < selectIds.length; i++){
|
||||
var rowData = $(listId).jqGrid("getRowData", selectIds[i]);
|
||||
if(i==0){gridIds=rowData.id;}else{gridIds=gridIds+","+rowData.id;}
|
||||
}
|
||||
}else{
|
||||
selectIds=$(listId).jqGrid("getGridParam", "selrow");
|
||||
var rowData = $(listId).jqGrid("getRowData", selectIds);
|
||||
gridIds=rowData.id;
|
||||
}
|
||||
|
||||
if(gridIds == null || gridIds == ""){
|
||||
$.alert({content:$.platform.messages.select.alertText});
|
||||
return null;
|
||||
}else{
|
||||
return gridIds;
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
$.grid=function (gridSettings){
|
||||
var columnNameWidth="";
|
||||
if(gridSettings.resize==true){
|
||||
var cumulativeWidth=0;
|
||||
var cumulativeVisible=0;
|
||||
for (var i=0;i<gridSettings.colModel.length;i++){
|
||||
|
||||
var col = gridSettings.colModel[i];
|
||||
if(col["hidden"]==false){
|
||||
cumulativeVisible++;
|
||||
var colWidth=0;
|
||||
if(cumulativeVisible<gridSettings.visibleColumnCount){
|
||||
colWidth=Math.round((col["width"]/gridSettings.visibleColumnWidth)*gridSettings.columnWidth);
|
||||
cumulativeWidth+=colWidth;
|
||||
}else{
|
||||
colWidth=gridSettings.columnWidth-cumulativeWidth;
|
||||
}
|
||||
gridSettings.colModel[i]["width"]=colWidth;
|
||||
columnNameWidth+=col["name"]+":"+colWidth+"/";
|
||||
}
|
||||
}
|
||||
}else{
|
||||
gridSettings["width"]=gridSettings.visibleColumnWidth+"px";
|
||||
}
|
||||
|
||||
var postData={};
|
||||
if(typeof($("#basic_search_form"))=="object"){
|
||||
postData=$("#basic_search_form").serializeObject();
|
||||
}
|
||||
|
||||
var settings=$.extend({
|
||||
url : $("#"+gridSettings.element).attr("url"),//ajax post data url
|
||||
datatype : "json",//type json
|
||||
mtype : 'POST',//ajax method POST
|
||||
loadtext : "",//loading text
|
||||
//loadtext : $.platform.messages.grid.loadtext,
|
||||
height : 320,
|
||||
jsonReader : { repeatitems : false, id: "0" },
|
||||
pager : jQuery("#"+gridSettings.element+"_pager"),//pager id
|
||||
rowNum : 10,//rowNum
|
||||
rowList : [10,50,100],
|
||||
width : "990px",
|
||||
multiselect : true && (typeof (gridSettings.subGirdSettings) == 'object' ? false : true), //check box and multi select
|
||||
altRows : true,
|
||||
altclass : "jqgridclass",
|
||||
postData : postData,
|
||||
hoverrows : true,
|
||||
subGrid : typeof (gridSettings.subGirdSettings) == 'object'||false,//is has subGirdSettings parameter
|
||||
rownumbers : true,//row numbers display
|
||||
viewrecords : true,
|
||||
onPaging : function(but){
|
||||
//$("#queryBtn").click();
|
||||
$("#"+gridSettings.element+"_pager").show();
|
||||
//alert($("#"+gridSettings.element).getGridParam("page")+"==="+but+"==="+$("#"+gridSettings.element).jqGrid("getGridParam", "page"));
|
||||
//$(".norecords").hide();
|
||||
//$("#"+gridSettings.element).jqGrid('setGridParam',{postData: $.extend($("#searchForm").serializeObject(),$("#adSearchForm").serializeObject())}).trigger("reloadGrid");
|
||||
},
|
||||
ondblClickRow : function(subgrid_id, row_id) {//double click event
|
||||
if(typeof (gridSettings.subGirdSettings) == 'object'){
|
||||
$("#"+gridSettings.element).toggleSubGridRow(subgrid_id);
|
||||
$.platform.gridRefesh.subGrid=subgrid_id;
|
||||
}
|
||||
},
|
||||
onSelectRow : function(id){//select row
|
||||
$.platform.gridRefesh.subGrid=gridSettings.element+"_"+id;
|
||||
},
|
||||
subGridRowExpanded: function(subgrid_id, row_id) {//Expanded current select row
|
||||
$("#"+gridSettings.element).setSelection(row_id);
|
||||
var subgrid_table_id, pager_id;
|
||||
$.platform.gridRefesh.subGrid=subgrid_id;
|
||||
subgrid_table_id = subgrid_id+"_t";
|
||||
pager_id = "p_"+subgrid_table_id;
|
||||
for (var col in gridSettings.subGirdSettings.colModel){//no index attr,name=index
|
||||
if(gridSettings.subGirdSettings.colModel[col]["index"]){
|
||||
}else{
|
||||
gridSettings.subGirdSettings.colModel[col]["index"]=gridSettings.subGirdSettings.colModel[col]["name"];
|
||||
}
|
||||
}
|
||||
var subGirdSettings=$.extend({
|
||||
datatype : "json",
|
||||
mtype : 'POST',
|
||||
loadtext : "",
|
||||
//loadtext : $.platform.messages.grid.loadtext,
|
||||
height : 160,
|
||||
jsonReader : { repeatitems : false, id: "0" },
|
||||
pager : pager_id,
|
||||
rowNum : 5,
|
||||
rowList : [5],
|
||||
width : "98%",
|
||||
multiselect : false, //check box and multi select
|
||||
altRows : true,
|
||||
altclass : "jqgridclass",
|
||||
postData : $("#"+gridSettings.element).jqGrid('getRowData',row_id),
|
||||
hoverrows : true,
|
||||
rownumbers : true,
|
||||
viewrecords : true,
|
||||
loadComplete: function(){
|
||||
var sub_records = $("#"+subgrid_table_id).getGridParam('records');
|
||||
if(sub_records == 0 || sub_records == null){
|
||||
if($(".subnorecords").html() == null){
|
||||
$("#"+subgrid_table_id).parent().append("<div class=\"subnorecords\" align=\"center\">"+$.platform.messages.grid.loadnodata+"</div>");
|
||||
}
|
||||
$("#"+pager_id).hide();
|
||||
$(".subnorecords").show();
|
||||
}else{
|
||||
$("#"+pager_id).show();
|
||||
$(".subnorecords").hide();
|
||||
}
|
||||
$("#"+subgrid_table_id).trigger("resize");
|
||||
if($.browser.version=="7.0"||$.browser.version=="8.0"){//msie 7.0/8.0
|
||||
$("#"+subgrid_table_id+" .ui-jqgrid-hdiv").width($("#"+subgrid_table_id+" .ui-jqgrid-hbox").width());
|
||||
}
|
||||
|
||||
}
|
||||
}, gridSettings.subGirdSettings || {});
|
||||
|
||||
$("#"+gridSettings.element).setGridHeight('auto'); //click '+',set list height auto
|
||||
$("#"+subgrid_id).html("<table id='"+subgrid_table_id+"' class='scroll'></table><div id='"+pager_id+"' class='scroll'></div>");
|
||||
$("#"+subgrid_table_id).jqGrid(subGirdSettings).navGrid("#"+pager_id,{edit:false,add:false,del:false,search:false });
|
||||
},
|
||||
subGridRowColapsed: function(subgrid_id, row_id) {//close sub grid
|
||||
var list_records = $("#"+gridSettings.element).getGridParam('records');
|
||||
if(($("table[id*=list_]").length > 1 && list_records != null && list_records > 5)
|
||||
|| (list_records != null && list_records > 10 && $("#"+gridSettings.element).getGridParam('rowNum') > 10)
|
||||
|| $("table[id*=list_]").length > 2) {
|
||||
$("#"+gridSettings.element).setGridHeight('auto');
|
||||
} else {
|
||||
$("#"+gridSettings.element).setGridHeight('495'); //restore list height
|
||||
}
|
||||
$.platform.gridRefesh.subGrid=null;
|
||||
// this function is called before removing the data
|
||||
//var subgrid_table_id;
|
||||
//subgrid_table_id = subgrid_id+"_t";
|
||||
//jQuery("#"+subgrid_table_id).remove();
|
||||
},
|
||||
loadComplete: function(){//load Complete
|
||||
var re_records = $("#"+gridSettings.element).getGridParam('records');
|
||||
if(re_records != null && re_records > 0){
|
||||
$("#"+gridSettings.element).setGridHeight(""+(35*$("#"+gridSettings.element).getGridParam('rowNum')));
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
$("#gbox_"+gridSettings.element).attr("gridWidth",gridSettings.visibleColumnWidth);
|
||||
$("#gbox_"+gridSettings.element).attr("columnNameWidth",columnNameWidth);
|
||||
|
||||
if($("#list").height()>$(".ui-jqgrid .ui-jqgrid-bdiv").height()){
|
||||
$(".ui-jqgrid .ui-jqgrid-bdiv").height($("#list").height()+20);
|
||||
}
|
||||
|
||||
$(".forward").on("click",function(){
|
||||
var settings={
|
||||
url : $(this).attr("url"),//current element url
|
||||
href : $(this).attr("href")//current element href
|
||||
};
|
||||
$.forward(settings);
|
||||
});
|
||||
}
|
||||
}, gridSettings || {});
|
||||
|
||||
$("#"+gridSettings.element).jqGrid(settings).navGrid("#"+gridSettings.element+"_pager",{edit:false,add:false,del:false,search:false });
|
||||
};
|
||||
|
||||
var curExpandNode = null;
|
||||
|
||||
|
||||
@ -1,69 +1,85 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
$("iframe", window.parent.document).attr("height",300);
|
||||
});
|
||||
</script>
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<style type="text/css">
|
||||
.table th, .table td {
|
||||
padding: .2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form id="actionForm" method="post" type="label" autoclose="true" action="<s:Base/>/app/accounts/add">
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="datatable">
|
||||
<form id="actionForm" method="post" type="label" autoclose="true" action="<@base/>/app/accounts/add">
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table table-bordered" >
|
||||
<tbody>
|
||||
<tr style="display:none">
|
||||
<th><s:Locale code="userinfo.id" />:</th>
|
||||
<th><@locale code="userinfo.id" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input type="text" id="id" name="id" readonly class="int required" title="" value="${model.id}"/></span>
|
||||
<b class="orange">*</b><label for="userTypeId"></label>
|
||||
<input type="text" id="id" name="id" readonly class="form-control" title="" value="${model.id!}"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><s:Locale code="userinfo.username" />:</th>
|
||||
<th><@locale code="userinfo.username" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input readonly type="text" id="username" name="username" class="int required" title="" value="${model.username}"/></span>
|
||||
<b class="orange">*</b><label for="username"></label>
|
||||
<input readonly type="text" id="username" name="username" class="form-control username" title="" value="${model.username!}"/>
|
||||
<input class="button btn btn-primary mr-3 window" type="button" id="selectUserinfoBtn" value="<@locale code="button.text.select" />"
|
||||
wurl="<@base/>/userinfo/select"
|
||||
wwidth="800"
|
||||
wheight="500"
|
||||
target="window"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><s:Locale code="userinfo.displayName" />:</th>
|
||||
<th><@locale code="userinfo.displayName" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input readonly type="text" id="displayName" name="displayName" class="int required" title="" value="${model.displayName}"/></span>
|
||||
<b class="orange">*</b><label for="displayName"></label>
|
||||
<input readonly type="text" id="displayName" name="displayName" class="form-control displayName" title="" value="${model.displayName!}"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><s:Locale code="apps.name" />:</th>
|
||||
<th><@locale code="apps.name" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input readonly type="text" id="appName" name="appName" class="int required" title="" value="${model.appName}"/></span>
|
||||
<b class="orange">*</b><label for="appName"></label>
|
||||
<input readonly type="text" id="appName" name="appName" class="form-control appName" title="" value="${model.appName!}"/>
|
||||
<input class="button btn btn-primary mr-3 window" type="button" id="selectAppsubmitBtn" value="<@locale code="button.text.select" />"
|
||||
wurl="<@base/>/apps/select"
|
||||
wwidth="800"
|
||||
wheight="500"
|
||||
target="window"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><s:Locale code="userinfo.appaccouts.relatedUsername" />:</th>
|
||||
<th><@locale code="account.relatedUsername" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input type="text" id="relatedUsername" name="relatedUsername" class="int required" title="" value="${model.relatedUsername}"/></span>
|
||||
<b class="orange">*</b><label for="relatedUsername"></label>
|
||||
<input type="text" id="relatedUsername" name="relatedUsername" class="form-control" title="" value="${model.relatedUsername!}"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><s:Locale code="userinfo.appaccouts.relatedPassword" />:</th>
|
||||
<th><@locale code="account.relatedPassword" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input type="password" id="relatedPassword" name="relatedPassword" class="int required" title="" value="${model.relatedPassword}"/></span>
|
||||
<b class="orange">*</b><label for="relatedPassword"></label>
|
||||
<input type="password" id="relatedPassword" name="relatedPassword" class="form-control" title="" value="${model.relatedPassword!}"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="center">
|
||||
<input id="_method" type="hidden" name="_method" value="post"/>
|
||||
<input id="status" type="hidden" name="status" value="1"/>
|
||||
<input type="hidden" id="uid" name="uid" class="int required" title="" value="${model.uid}"/>
|
||||
<input type="hidden" id="appId" name="appId" class="int required" title="" value="${model.appId}"/>
|
||||
<input class="button" type="button" id="submitBtn" value="<s:Locale code="button.text.save" />"/>
|
||||
<input class="button" type="button" id="closeBtn" value="<s:Locale code="button.text.cancel" /> "/>
|
||||
<input type="hidden" id="uid" name="uid" class="uid" title="" value="${model.uid!}"/>
|
||||
<input type="hidden" id="appId" name="appId" class="appId" title="" value="${model.appId!}"/>
|
||||
<input class="button btn btn-primary mr-3" type="button" id="submitBtn" value="<@locale code="button.text.save" />"/>
|
||||
<input class="button" type="button" id="closeBtn" value="<@locale code="button.text.cancel" /> "/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,70 +0,0 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
|
||||
<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function afterSubmit(data){
|
||||
$("#list").trigger('reloadGrid');
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
$("#selectUserBtn").on("click",function(){
|
||||
var selData=$.gridRowData("#list",$.gridSel("#list"));
|
||||
if(selData!=null){
|
||||
$("#uid").val(selData.id);
|
||||
$("#username").val(selData.username);
|
||||
$("#displayName").val(selData.displayName);
|
||||
$("#submitFormBtn").click();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<div style="display:none">
|
||||
<form method="post" action="<s:Base/>/app/accounts/forwardAdd">
|
||||
<table>
|
||||
<tr><td></td><td><input type="text" id="appId" name="appId" value="${appId}"/></td></tr>
|
||||
<tr><td></td><td><input type="text" id="uid" name="uid" value=""/></td></tr>
|
||||
<tr><td></td><td><input type="text" id="username" name="username" value=""/></td></tr>
|
||||
<tr><td></td><td><input type="text" id="displayName" name="displayName" value=""/></td></tr>
|
||||
<tr><td colspan="2"><input id="submitFormBtn" type="submit" value="submit"></input></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="tool_box">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px"><s:Locale code="userinfo.username"/>:</td>
|
||||
<td width="374px">
|
||||
<form id="basic_search_form">
|
||||
<input type="text" name="username" style ="width:150px">
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
|
||||
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2"> <div >
|
||||
<input class="button" id="selectUserBtn" type="button" value="<s:Locale code="button.text.select"/>">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="mainwrap" id="main">
|
||||
<s:Grid id="list" url="/users/grid" resize="false" rowLimit="10" rowList="[10]">
|
||||
<s:Column width="0" field="id" title="id" hidden="true"/>
|
||||
<s:Column width="200" field="username" title="userinfo.username"/>
|
||||
<s:Column width="250" field="displayName" title="userinfo.displayName" />
|
||||
<s:Column width="200" field="department" title="userinfo.department"/>
|
||||
<s:Column width="0" field="createdBy" title="common.text.createdby" hidden="true"/>
|
||||
<s:Column width="0" field="createdDate" title="common.text.createddate" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedBy" title="common.text.modifiedby" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedDate" title="common.text.modifieddate" hidden="true"/>
|
||||
</s:Grid>
|
||||
</div>
|
||||
@ -54,19 +54,13 @@
|
||||
<td colspan="2">
|
||||
<div id="tool_box_right">
|
||||
<input class="button btn btn-success mr-3" id="addBtn" type="button" value="<@locale code="button.text.add"/>"
|
||||
wurl="<@base/>/users/forwardSelectUserType"
|
||||
wurl="<@base/>/app/accounts/forwardAdd"
|
||||
wwidth="960"
|
||||
wheight="600"
|
||||
target="window">
|
||||
|
||||
<input class="button btn btn-info mr-3 " id="modifyBtn" type="button" value="<@locale code="button.text.edit"/>"
|
||||
wurl="<@base/>/users/forwardUpdate"
|
||||
wwidth="960"
|
||||
wheight="600"
|
||||
target="window">
|
||||
target="window">
|
||||
|
||||
<input class="button btn btn-danger mr-3 " id="deleteBtn" type="button" value="<@locale code="button.text.delete"/>"
|
||||
wurl="<@base/>/users/delete" />
|
||||
wurl="<@base/>/app/accounts/delete" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -96,6 +90,7 @@
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
@ -106,12 +101,13 @@
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
|
||||
<th data-field="username"><@locale code="account.username"/></th>
|
||||
<th data-field="displayName"><@locale code="account.displayName"/></th>
|
||||
<th data-field="appName"><@locale code="account.appName"/></th>
|
||||
<th data-field="appId" data-visible="false"><@locale code="account.appId"/></th>
|
||||
<th data-field="relatedUsername"><@locale code="account.relatedUsername"/></th>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
|
||||
<th data-field="username"><@locale code="account.username"/></th>
|
||||
<th data-field="displayName"><@locale code="account.displayName"/></th>
|
||||
<th data-field="appName"><@locale code="account.appName"/></th>
|
||||
<th data-field="appId" data-visible="false"><@locale code="account.appId"/></th>
|
||||
<th data-field="relatedUsername"><@locale code="account.relatedUsername"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
@ -1,64 +0,0 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
|
||||
<form id="actionForm" method="post" type="label" autoclose="true" action="<s:Base/>/app/accounts/update">
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="datatable">
|
||||
<tbody>
|
||||
<tr style="display:none">
|
||||
<th><s:Locale code="userinfo.id" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input type="text" id="id" name="id" readonly class="int required" title="" value="${model.id}"/></span>
|
||||
<b class="orange">*</b><label for="userTypeId"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><s:Locale code="userinfo.username" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input readonly type="text" id="username" name="username" class="int required" title="" value="${model.username}"/></span>
|
||||
<b class="orange">*</b><label for="username"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><s:Locale code="userinfo.displayName" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input readonly type="text" id="displayName" name="displayName" class="int required" title="" value="${model.displayName}"/></span>
|
||||
<b class="orange">*</b><label for="displayName"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><s:Locale code="apps.name" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input readonly type="text" id="appName" name="appName" class="int required" title="" value="${model.appName}"/></span>
|
||||
<b class="orange">*</b><label for="appName"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><s:Locale code="userinfo.appaccouts.relatedUsername" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input type="text" id="relatedUsername" name="relatedUsername" class="int required" title="" value="${model.relatedUsername}"/></span>
|
||||
<b class="orange">*</b><label for="relatedUsername"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><s:Locale code="userinfo.appaccouts.relatedPassword" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input type="password" id="relatedPassword" name="relatedPassword" class="int required" title="" value="${model.relatedPassword}"/></span>
|
||||
<b class="orange">*</b><label for="relatedPassword"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="center">
|
||||
<input id="_method" type="hidden" name="_method" value="post"/>
|
||||
<input id="status" type="hidden" name="status" value="1"/>
|
||||
<input type="hidden" id="uid" name="uid" class="int required" title="" value="${model.uid}"/>
|
||||
<input type="hidden" id="appId" name="appId" class="int required" title="" value="${model.appId}"/>
|
||||
<input class="button" type="button" id="submitBtn" value="<s:Locale code="button.text.save" />"/>
|
||||
<input class="button" type="button" id="closeBtn" value="<s:Locale code="button.text.cancel" /> "/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
@ -4,8 +4,8 @@
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<script type="text/javascript">
|
||||
function iconFormatter(value, options, rData){
|
||||
return "<img width='30' height='30' border='0px' src='<@base/>/image/"+rData["id"]+"'/>";
|
||||
function iconFormatter(value, row, index){
|
||||
return "<img width='30' height='30' border='0px' src='<@base/>/image/"+value+"'/>";
|
||||
};
|
||||
|
||||
function vendorFormatter(value, options, rData){
|
||||
@ -120,26 +120,23 @@
|
||||
<div class="page-container">
|
||||
|
||||
<div class="main-content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="breadcrumb-wrapper row">
|
||||
<div class="col-12 col-lg-3 col-md-6">
|
||||
<h4 class="page-title">Dashboard 2</h4>
|
||||
</div>
|
||||
<div class="col-12 col-lg-9 col-md-6">
|
||||
<ol class="breadcrumb float-right">
|
||||
<li><a href="index.html">Dashboard</a></li>
|
||||
<li class="active">/ Dashboard 2</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="container-fluid">
|
||||
<div class="breadcrumb-wrapper row">
|
||||
<div class="col-12 col-lg-3 col-md-6">
|
||||
<h4 class="page-title">Dashboard 2</h4>
|
||||
</div>
|
||||
<div class="col-12 col-lg-9 col-md-6">
|
||||
<ol class="breadcrumb float-right">
|
||||
<li><a href="index.html">Dashboard</a></li>
|
||||
<li class="active">/ Dashboard 2</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="col-12 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
@ -184,7 +181,7 @@
|
||||
<tr>
|
||||
<td width="120px"><@locale code="apps.protocol"/></td>
|
||||
<td width="374px">
|
||||
<select name="protocol" class="select_protocol">
|
||||
<select name="protocol" class="form-control">
|
||||
<option value="" selected>Select</option>
|
||||
<option value="<%=PROTOCOLS.FORMBASED%>"><%=PROTOCOLS.FORMBASED%></option>
|
||||
<option value="<%=PROTOCOLS.OPEN_ID_CONNECT%>"><%=PROTOCOLS.OPEN_ID_CONNECT%></option>
|
||||
@ -200,32 +197,34 @@
|
||||
</td>
|
||||
<td width="120px"><@locale code="apps.vendor"/></td>
|
||||
<td width="374px">
|
||||
<input id="vendor" name="vendor" type="text" size="50" value="">
|
||||
<input id="vendor" name="vendor" class="form-control" type="text" value="">
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<table data-url="<@base/>/apps/grid"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
|
||||
<th data-field="sessionId"><@locale code="apps.icon"/></th>
|
||||
<th data-field="id" data-formatter="iconFormatter"><@locale code="apps.icon"/></th>
|
||||
<th data-field="name"><@locale code="apps.name"/></th>
|
||||
<th data-field="protocol"><@locale code="apps.protocol"/></th>
|
||||
<th data-field="category"><@locale code="apps.category"/></th>
|
||||
<th data-field="vendor"><@locale code="apps.vendor"/></th>
|
||||
<th data-field="loginUrl"><@locale code="log.loginhistory.loginUrl"/></th>
|
||||
<th data-field="loginUrl" data-visible="false"><@locale code="log.loginhistory.loginUrl"/></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@ -1,81 +1,48 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ page import="org.maxkey.constants.*"%>
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<style>
|
||||
<!--
|
||||
.ui-jqgrid tr.jqgrow td {
|
||||
line-height: 10px;
|
||||
}
|
||||
|
||||
-->
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
function iconFormatter(value, options, rData){
|
||||
return "<img width='30' height='30' border='0px' src='<s:Base/>/image/"+rData["id"]+"'/>";
|
||||
function iconFormatter(value, row, index){
|
||||
return "<img width='30' height='30' border='0px' src='<@base/>/image/"+value+"'/>";
|
||||
};
|
||||
|
||||
function vendorFormatter(value, options, rData){
|
||||
if(value!=null&&value!=""){
|
||||
return "<a href='"+rData["vendorUrl"]+"' target='_blank'>"+value+"</a>";
|
||||
}else{
|
||||
return value==""?"":value;
|
||||
}
|
||||
};
|
||||
|
||||
function parserProtocolPath(protocol){
|
||||
if(protocol=="<%=PROTOCOLS.FORMBASED%>"){
|
||||
protocolPath="formbased";
|
||||
}else if(protocol=="<%=PROTOCOLS.TOKENBASED%>"){
|
||||
protocolPath="tokenbased";
|
||||
}else if(protocol=="<%=PROTOCOLS.OAUTH10A%>"){
|
||||
protocolPath="oauth10a";
|
||||
}else if(protocol=="<%=PROTOCOLS.OAUTH20%>"){
|
||||
protocolPath="oauth20";
|
||||
}else if(protocol=="<%=PROTOCOLS.SAML11%>"){
|
||||
protocolPath="saml11";
|
||||
}else if(protocol=="<%=PROTOCOLS.SAML20%>"){
|
||||
protocolPath="saml20";
|
||||
}else if(protocol=="<%=PROTOCOLS.DESKTOP%>"){
|
||||
protocolPath="desktop";
|
||||
}else if(protocol=="<%=PROTOCOLS.BASIC%>"){
|
||||
protocolPath="basic";
|
||||
}else if(protocol=="<%=PROTOCOLS.LTPA%>"){
|
||||
protocolPath="ltpa";
|
||||
}else if(protocol=="<%=PROTOCOLS.CAS%>"){
|
||||
protocolPath="cas";
|
||||
}
|
||||
return protocolPath;
|
||||
};
|
||||
|
||||
|
||||
$(function () {
|
||||
$("#selectBtn").on("click",function(){
|
||||
var seldata=$.gridRowData("#list",$.gridSel("#list"));
|
||||
$(".appId", window.parent.document).val(seldata.id);
|
||||
$(".appName", window.parent.document).val(seldata.name);
|
||||
var seldata=$.dataGridSelRowsData("#datagrid");
|
||||
console.log(seldata[0].id+" - "+seldata[0].name);
|
||||
$(".appId", window.parent.document).val(seldata[0].id);
|
||||
$(".appName", window.parent.document).val(seldata[0].name);
|
||||
$.closeWindow();
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="tool_box">
|
||||
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px"><s:Locale code="apps.name"/>:</td>
|
||||
<td width="120px"><@locale code="apps.name"/>:</td>
|
||||
<td width="374px" nowrap>
|
||||
<form id="basic_search_form">
|
||||
<input type="text" name="name" style ="width:150px">
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
|
||||
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div >
|
||||
<input class="button" id="advancedSearchExpandBtn" type="button" size="50" value="<s:Locale code="button.text.expandsearch"/>" expandValue="<s:Locale code="button.text.expandsearch"/>" collapseValue="<s:Locale code="button.text.collapsesearch"/>">
|
||||
<input class="button" id="selectBtn" type="button" value="<s:Locale code="button.text.select"/>" />
|
||||
<input class="button btn btn-primary mr-3" id="selectBtn" type="button" value="<@locale code="button.text.select"/>" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -85,46 +52,37 @@
|
||||
</div>
|
||||
|
||||
<div id="advanced_search">
|
||||
<form id="advanced_search_form">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px"><s:Locale code="apps.protocol"/></td>
|
||||
<td width="374px">
|
||||
<select name="protocol" class="select_protocol">
|
||||
<option value="" selected>Select</option>
|
||||
<option value="<%=PROTOCOLS.FORMBASED%>"><%=PROTOCOLS.FORMBASED%></option>
|
||||
<option value="<%=PROTOCOLS.OPEN_ID_CONNECT%>"><%=PROTOCOLS.OPEN_ID_CONNECT%></option>
|
||||
<option value="<%=PROTOCOLS.OAUTH10A%>"><%=PROTOCOLS.OAUTH10A%></option>
|
||||
<option value="<%=PROTOCOLS.OAUTH20%>"><%=PROTOCOLS.OAUTH20%></option>
|
||||
<option value="<%=PROTOCOLS.SAML11%>"><%=PROTOCOLS.SAML11%></option>
|
||||
<option value="<%=PROTOCOLS.SAML20%>"><%=PROTOCOLS.SAML20%></option>
|
||||
<option value="<%=PROTOCOLS.TOKENBASED%>"><%=PROTOCOLS.TOKENBASED%></option>
|
||||
<option value="<%=PROTOCOLS.DESKTOP%>"><%=PROTOCOLS.DESKTOP%></option>
|
||||
<option value="<%=PROTOCOLS.BASIC%>"><%=PROTOCOLS.BASIC%></option>
|
||||
|
||||
</select>
|
||||
</td>
|
||||
<td width="120px"><s:Locale code="apps.vendor"/></td>
|
||||
<td width="374px">
|
||||
<input id="vendor" name="vendor" type="text" size="50" value="">
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mainwrap" id="main">
|
||||
<s:Grid id="list" url="/apps/grid" multiselect="false" resize="false" rowLimit="10" rowList="[10]">
|
||||
<s:Column width="0" field="id" title="id" hidden="true"/>
|
||||
<s:Column width="100" field="icon" title="apps.icon" formatter="iconFormatter"/>
|
||||
<s:Column width="300" field="name" title="apps.name"/>
|
||||
<s:Column width="250" field="protocol" title="apps.protocol"/>
|
||||
<s:Column width="200" field="loginUrl" title="apps.loginUrl" hidden="true"/>
|
||||
<s:Column width="15" field="category" title="apps.category" hidden="true"/>
|
||||
<s:Column width="15" field="vendor" title="apps.vendor" formatter="vendorFormatter" hidden="true"/>
|
||||
<s:Column width="0" field="vendorUrl" title="apps.vendor.url" hidden="true"/>
|
||||
<s:Column width="0" field="createdBy" title="common.text.createdby" hidden="true"/>
|
||||
<s:Column width="0" field="createdDate" title="common.text.createddate" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedBy" title="common.text.modifiedby" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedDate" title="common.text.modifieddate" hidden="true"/>
|
||||
</s:Grid>
|
||||
</div>
|
||||
<table data-url="<@base/>/apps/grid"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
|
||||
<th data-field="id" data-formatter="iconFormatter"><@locale code="apps.icon"/></th>
|
||||
<th data-field="name"><@locale code="apps.name"/></th>
|
||||
<th data-field="protocol"><@locale code="apps.protocol"/></th>
|
||||
<th data-field="category"><@locale code="apps.category"/></th>
|
||||
<th data-field="vendor"><@locale code="apps.vendor"/></th>
|
||||
<th data-field="loginUrl" data-visible="false"><@locale code="log.loginhistory.loginUrl"/></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -42,29 +42,26 @@
|
||||
<div class="page-container">
|
||||
|
||||
<div class="main-content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="breadcrumb-wrapper row">
|
||||
<div class="col-12 col-lg-3 col-md-6">
|
||||
<h4 class="page-title">Dashboard 2</h4>
|
||||
</div>
|
||||
<div class="col-12 col-lg-9 col-md-6">
|
||||
<ol class="breadcrumb float-right">
|
||||
<li><a href="index.html">Dashboard</a></li>
|
||||
<li class="active">/ Dashboard 2</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="breadcrumb-wrapper row">
|
||||
<div class="col-12 col-lg-3 col-md-6">
|
||||
<h4 class="page-title">Dashboard 2</h4>
|
||||
</div>
|
||||
<div class="col-12 col-lg-9 col-md-6">
|
||||
<ol class="breadcrumb float-right">
|
||||
<li><a href="index.html">Dashboard</a></li>
|
||||
<li class="active">/ Dashboard 2</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="col-12 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom">
|
||||
<h4 class="card-title"><@locale code="login.passwordpolicy"/></h4>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom">
|
||||
<h4 class="card-title"><@locale code="login.passwordpolicy"/></h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="card-body">
|
||||
<form method="post" type="label" validate="true" action="<@base/>/config/passwordpolicy/update" id="actionForm" >
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
|
||||
@ -1,29 +1,41 @@
|
||||
<script type="text/javascript">
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<style type="text/css">
|
||||
.table th, .table td {
|
||||
padding: .2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
function afterSubmit(data){
|
||||
$("#list").trigger('reloadGrid');
|
||||
//$("#list").trigger('reloadGrid');
|
||||
}
|
||||
|
||||
function iconFormatter(value, options, rData){
|
||||
return "<img width='30' height='30' border='0px' src='<s:Base/>/image/"+value+"'/>";
|
||||
function iconFormatter(value, row, index){
|
||||
return "<img width='30' height='30' border='0px' src='<@base/>/image/"+value+"'/>";
|
||||
};
|
||||
|
||||
$(function () {
|
||||
$("#addGroupAppsBtn").on("click",function(){
|
||||
var selectIds =$.gridRowData("#list",$.gridSelIds("#list")).id;
|
||||
if(selectIds == null || selectIds == "") {
|
||||
$.alert({content:$.platform.messages.select.alertText});
|
||||
return false;
|
||||
var selectIds = "";
|
||||
var seldata=$.dataGridSelRowsData("#datagrid");
|
||||
for(var arrayIndex in seldata){
|
||||
selectIds=seldata[arrayIndex].id+","+selectIds;
|
||||
}
|
||||
$("#appId").val(selectIds);
|
||||
$("#actionForm").attr("action","<s:Base/>/groupApp/insert");
|
||||
$("#actionForm").attr("action","<@base/>/groupPrivileges/insert");
|
||||
$("#submitBtn").click();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div style="display:none">
|
||||
<form id="actionForm" method="post" action="<s:Base/>/groupApp/insert">
|
||||
<form id="actionForm" method="post" action="<@base/>/groupPrivileges/insert">
|
||||
<table>
|
||||
<tr><td></td><td><input type="text" id="groupId" name="groupId" value="${groupId}"/></td></tr>
|
||||
<tr><td></td><td><input type="text" id="appId" name="appId" value=""/></td></tr>
|
||||
@ -35,16 +47,16 @@
|
||||
<div id="tool_box">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px"><s:Locale code="app.name"/>:</td>
|
||||
<td width="120px"><@locale code="app.name"/>:</td>
|
||||
<td width="374px" nowrap>
|
||||
<form id="basic_search_form">
|
||||
<input type="text" name="name" style ="width:150px">
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div>
|
||||
<input class="button" id="addGroupAppsBtn" type="button" value="<s:Locale code="button.text.add" />">
|
||||
<input class="button" id="addGroupAppsBtn" type="button" value="<@locale code="button.text.add" />">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -55,11 +67,11 @@
|
||||
<form id="advanced_search_form">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px"><s:Locale code="apps.name"/></td>
|
||||
<td width="120px"><@locale code="apps.name"/></td>
|
||||
<td width="360px">
|
||||
|
||||
</td>
|
||||
<td width="120px"><s:Locale code="apps.protocol"/></td>
|
||||
<td width="120px"><@locale code="apps.protocol"/></td>
|
||||
<td width="360px">
|
||||
<select name="protocol" class="select_protocol">
|
||||
<option value="" selected>Select</option>
|
||||
@ -83,11 +95,33 @@
|
||||
</div>
|
||||
|
||||
<div class="mainwrap" id="main">
|
||||
<s:Grid id="list" url="/groupApp/appsNotInGroupGrid?groupId=${groupId}" multiselect="true" resize="false" rowLimit="10" rowList="[10]">
|
||||
<s:Column width="0" field="id" title="id" hidden="true"/>
|
||||
<s:Column width="100" field="id" title="apps.icon" formatter="iconFormatter"/>
|
||||
<s:Column width="275" field="name" title="apps.name"/>
|
||||
<s:Column width="250" field="protocol" title="apps.protocol"/>
|
||||
</s:Grid>
|
||||
<table data-url="<@base/>/groupPrivileges/queryAppsNotInGroup?groupId=${groupId}"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
|
||||
<th data-field="id" data-formatter="iconFormatter"><@locale code="apps.icon"/></th>
|
||||
<th data-field="name"><@locale code="apps.name"/></th>
|
||||
<th data-field="protocol"><@locale code="apps.protocol"/></th>
|
||||
<th data-field="category"><@locale code="apps.category"/></th>
|
||||
<th data-field="vendor"><@locale code="apps.vendor"/></th>
|
||||
<th data-field="loginUrl" data-visible="false"><@locale code="log.loginhistory.loginUrl"/></th>
|
||||
|
||||
</div>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,66 +1,83 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<script type="text/javascript">
|
||||
|
||||
function iconFormatter(value, options, rData){
|
||||
return "<img width='30' height='30' border='0px' src='<s:Base/>/image/"+value+"'/>";
|
||||
function iconFormatter(value, row, index){
|
||||
return "<img width='30' height='30' border='0px' src='<@base/>/image/"+value+"'/>";
|
||||
};
|
||||
|
||||
$(function () {
|
||||
$("#addGroupAppsBtn").on("click",function(){
|
||||
var settings={
|
||||
url : "<s:Base/>/groupApp/addGroupAppsList/"+$("#groupId").val(),//window url
|
||||
url : "<@base/>/groupPrivileges/addGroupAppsList/"+$("#groupId").val(),//window url
|
||||
title : "New",//title
|
||||
width : "700",//width
|
||||
height : "500"//height
|
||||
};
|
||||
$.window(settings);//open window
|
||||
});
|
||||
|
||||
$("#deleteGroupAppsBtn").on("click",function(){
|
||||
var selectIds = $("#list").jqGrid("getGridParam", "selarrrow");
|
||||
if(selectIds == null || selectIds == "") {
|
||||
$.alert({content:$.platform.messages.select.alertText});
|
||||
return false;
|
||||
}
|
||||
$("#appId").val(selectIds);
|
||||
$("#submitBtn").click();
|
||||
});
|
||||
|
||||
$("#appSearchBtn").on("click",function(){
|
||||
var postData=$("#advanced_search_app_form").serializeObject();
|
||||
$("#list").jqGrid('setGridParam',{postData: postData}).trigger("reloadGrid");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="app header-default side-nav-dark">
|
||||
<div class="layout">
|
||||
<div class="header navbar">
|
||||
<#include "../layout/top.ftl"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 sidebar-nav side-nav" >
|
||||
<#include "../layout/sidenav.ftl"/>
|
||||
</div>
|
||||
<div class="page-container">
|
||||
|
||||
<div class="main-content">
|
||||
|
||||
<div style="display:none">
|
||||
<form id="actionForm" method="post" action="<s:Base/>/groupApp/delete">
|
||||
<table>
|
||||
<tr><td></td><td><input type="text" class="groupId" id="groupId" name="groupId" value=""/></td></tr>
|
||||
<tr><td></td><td><input type="text" id="appId" name="appId" value=""/></td></tr>
|
||||
<tr><td colspan="2"><input id="submitBtn" type="button" value="submit"></input></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="breadcrumb-wrapper row">
|
||||
<div class="col-12 col-lg-3 col-md-6">
|
||||
<h4 class="page-title">Dashboard 2</h4>
|
||||
</div>
|
||||
<div class="col-12 col-lg-9 col-md-6">
|
||||
<ol class="breadcrumb float-right">
|
||||
<li><a href="index.html">Dashboard</a></li>
|
||||
<li class="active">/ Dashboard 2</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<div class="col-12 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div id="tool_box">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px"><s:Locale code="group.name"/>:</td>
|
||||
<td width="120px"><@locale code="group.name"/>:</td>
|
||||
<td width="374px">
|
||||
<form id="basic_search_form">
|
||||
<input class="groupId" id="groupId" name="groupId" type="hidden" >
|
||||
<input class="groupName" style="width:200px" id="groupName" name="groupName" type="text" >
|
||||
<s:Dialog text="button.text.select" title="Groups" url="/groups/selectGroupsList" width="700" height="500" />
|
||||
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
|
||||
<input class="button btn btn-success mr-3" id="addBtn" type="button" value="<@locale code="button.text.select"/>"
|
||||
wurl="<@base/>/groups/selectGroupsList"
|
||||
wwidth="700"
|
||||
wheight="500"
|
||||
target="window">
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
|
||||
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2"> <div id="tool_box_right">
|
||||
<input class="button" id="advancedSearchExpandBtn" type="button" size="50" value="<s:Locale code="button.text.expandsearch"/>" expandValue="<s:Locale code="button.text.expandsearch"/>" collapseValue="<s:Locale code="button.text.collapsesearch"/>">
|
||||
<input class="button" id="addGroupAppsBtn" type="button" value="<s:Locale code="button.text.add.member"/>">
|
||||
<input class="button" id="deleteGroupAppsBtn" type="button" value="<s:Locale code="button.text.delete.member"/>">
|
||||
<input class="button" id="advancedSearchExpandBtn" type="button" size="50" value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>" collapseValue="<@locale code="button.text.collapsesearch"/>">
|
||||
<input class="button" id="addGroupAppsBtn" type="button" value="<@locale code="button.text.add.member"/>">
|
||||
<input class="button" id="deleteBtn" type="button" value="<@locale code="button.text.delete.member"/>"
|
||||
wurl="<@base/>/groupPrivileges/delete" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -73,11 +90,11 @@
|
||||
<form id="advanced_search_app_form">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px"><s:Locale code="apps.name"/></td>
|
||||
<td width="120px"><@locale code="apps.name"/></td>
|
||||
<td width="360px">
|
||||
<input type="text" name="name" style ="width:150px">
|
||||
</td>
|
||||
<td width="120px"><s:Locale code="apps.protocol"/></td>
|
||||
<td width="120px"><@locale code="apps.protocol"/></td>
|
||||
<td width="360px">
|
||||
<select name="protocol" class="select_protocol">
|
||||
<option value="" selected>Select</option>
|
||||
@ -98,11 +115,49 @@
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="mainwrap" id="main">
|
||||
<s:Grid id="list" url="/groupApp/gridAppsInGroup" multiselect="true" resize="true">
|
||||
<s:Column width="0" field="id" title="id" hidden="true"/>
|
||||
<s:Column width="100" field="id" title="apps.icon" formatter="iconFormatter"/>
|
||||
<s:Column width="300" field="name" title="apps.name"/>
|
||||
<s:Column width="250" field="protocol" title="apps.protocol"/>
|
||||
</s:Grid>
|
||||
</div>
|
||||
<div class="mainwrap" id="main">
|
||||
<table data-url="<@base/>/groupPrivileges/queryAppsInGroup"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
|
||||
<th data-field="id" data-formatter="iconFormatter"><@locale code="apps.icon"/></th>
|
||||
<th data-field="name"><@locale code="apps.name"/></th>
|
||||
<th data-field="protocol"><@locale code="apps.protocol"/></th>
|
||||
<th data-field="category"><@locale code="apps.category"/></th>
|
||||
<th data-field="vendor"><@locale code="apps.vendor"/></th>
|
||||
<th data-field="loginUrl" data-visible="false"><@locale code="log.loginhistory.loginUrl"/></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="content-footer">
|
||||
<#include "../layout/footer.ftl"/>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="preloader">
|
||||
<div class="loader" id="loader-1"></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -1,11 +1,23 @@
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<style type="text/css">
|
||||
.table th, .table td {
|
||||
padding: .2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="actionForm" method="post" type="label" autoclose="true" action="<@base/>/groups/add">
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="datatable" >
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table table-bordered" >
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><s:Locale code="group.name" />:</th>
|
||||
<th><@locale code="group.name" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input type="text" id="name" name="name" class="int required" title="" value="${group.name}"/></span>
|
||||
<span class="intspan"><input type="text" id="name" name="name" class="form-control" title="" value=""/></span>
|
||||
<b class="orange">*</b><label for="name"></label>
|
||||
</td>
|
||||
</tr>
|
||||
@ -13,10 +25,12 @@
|
||||
<td nowrap colspan="2" class="center">
|
||||
<input id="_method" type="hidden" name="_method" value="post"/>
|
||||
<input id="status" type="hidden" name="status" value="1"/>
|
||||
<input class="button" id="submitBtn" type="button" value="<s:Locale code="button.text.save" />">
|
||||
<input class="button" id="closeBtn" type="button" value="<s:Locale code="button.text.cancel" />">
|
||||
<input class="button btn btn-primary mr-3" id="submitBtn" type="button" value="<@locale code="button.text.save" />">
|
||||
<input class="button" id="closeBtn" type="button" value="<@locale code="button.text.cancel" />">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,10 +1,18 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
|
||||
<form id="actionForm" method="post" type="label" autoclose="true" action="<s:Base/>/groups/update">
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="datatable">
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<style type="text/css">
|
||||
.table th, .table td {
|
||||
padding: .2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="actionForm" method="post" type="label" autoclose="true" action="<@base/>/groups/update">
|
||||
<table border="0" cellpadding="0" cellspacing="0" class="table table-bordered">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><s:Locale code="group.id" />:</th>
|
||||
@ -13,22 +21,22 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><s:Locale code="group.name" />:</th>
|
||||
<th><@locale code="group.name" />:</th>
|
||||
<td nowrap>
|
||||
<span class="intspan"><input type="text" id="name" name="name" class="int required" title="" value="${model.name}"/></span>
|
||||
<span class="intspan"><input type="text" id="name" name="name" class="form-control" title="" value="${model.name}"/></span>
|
||||
<b class="orange">*</b><label for="name"></label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td nowrap colspan="2" class="center">
|
||||
<input id="_method" type="hidden" name="_method" value="post"/>
|
||||
|
||||
|
||||
<input id="status" type="hidden" name="status" value="1"/>
|
||||
<input class="button" id="submitBtn" type="button" value="<s:Locale code="button.text.save" />">
|
||||
<input class="button" id="closeBtn" type="button" value="<s:Locale code="button.text.cancel" />">
|
||||
<input class="button btn btn-primary mr-3" id="submitBtn" type="button" value="<@locale code="button.text.save" />">
|
||||
<input class="button" id="closeBtn" type="button" value="<@locale code="button.text.cancel" />">
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@ -18,26 +18,23 @@
|
||||
<div class="page-container">
|
||||
|
||||
<div class="main-content">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="breadcrumb-wrapper row">
|
||||
<div class="col-12 col-lg-3 col-md-6">
|
||||
<h4 class="page-title">Dashboard 2</h4>
|
||||
</div>
|
||||
<div class="col-12 col-lg-9 col-md-6">
|
||||
<ol class="breadcrumb float-right">
|
||||
<li><a href="index.html">Dashboard</a></li>
|
||||
<li class="active">/ Dashboard 2</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="container-fluid">
|
||||
<div class="breadcrumb-wrapper row">
|
||||
<div class="col-12 col-lg-3 col-md-6">
|
||||
<h4 class="page-title">Dashboard 2</h4>
|
||||
</div>
|
||||
<div class="col-12 col-lg-9 col-md-6">
|
||||
<ol class="breadcrumb float-right">
|
||||
<li><a href="index.html">Dashboard</a></li>
|
||||
<li class="active">/ Dashboard 2</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="col-12 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
@ -53,19 +50,19 @@
|
||||
<td colspan="2">
|
||||
<div id="tool_box_right">
|
||||
<input class="button btn btn-success mr-3" id="addBtn" type="button" value="<@locale code="button.text.add"/>"
|
||||
wurl="<@base/>/users/forwardSelectUserType"
|
||||
wwidth="960"
|
||||
wheight="600"
|
||||
wurl="<@base/>/groups/forwardAdd"
|
||||
wwidth="400"
|
||||
wheight="300"
|
||||
target="window">
|
||||
|
||||
<input class="button btn btn-info mr-3 " id="modifyBtn" type="button" value="<@locale code="button.text.edit"/>"
|
||||
wurl="<@base/>/users/forwardUpdate"
|
||||
wwidth="960"
|
||||
wheight="600"
|
||||
wurl="<@base/>/groups/forwardUpdate"
|
||||
wwidth="400"
|
||||
wheight="300"
|
||||
target="window">
|
||||
|
||||
<input class="button btn btn-danger mr-3 " id="deleteBtn" type="button" value="<@locale code="button.text.delete"/>"
|
||||
wurl="<@base/>/users/delete" />
|
||||
wurl="<@base/>/groups/delete" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -81,20 +78,21 @@
|
||||
</div>
|
||||
<table data-url="<@base/>/groups/grid"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
|
||||
|
||||
<th data-field="name"><@locale code="group.name"/></th>
|
||||
<th data-field="description"><@locale code="common.text.description"/></th>
|
||||
<th data-field="createdBy"><@locale code="common.text.createdby"/></th>
|
||||
@ -109,7 +107,7 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<footer class="content-footer">
|
||||
<footer class="content-footer">
|
||||
<#include "../layout/footer.ftl"/>
|
||||
</footer>
|
||||
|
||||
|
||||
@ -1,21 +1,29 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
|
||||
<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<style type="text/css">
|
||||
.table th, .table td {
|
||||
padding: .2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
$("#selectBtn").on("click",function(){
|
||||
var seldata=$.gridRowData("#list",$.gridSel("#list"));
|
||||
$(".groupId", window.parent.document).val(seldata.id);
|
||||
$(".groupName", window.parent.document).val(seldata.name);
|
||||
var seldata=$.dataGridSelRowsData("#datagrid");
|
||||
console.log(seldata[0].id+" - "+seldata[0].name);
|
||||
$(".groupId", window.parent.document).val(seldata[0].id);
|
||||
$(".groupName", window.parent.document).val(seldata[0].name);
|
||||
$.closeWindow();
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="tool_box">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
@ -23,12 +31,12 @@
|
||||
<td width="374px">
|
||||
<form id="basic_search_form">
|
||||
<input type="text" name="name" style ="width:150px">
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div id="tool_box_right" style="width: auto;">
|
||||
<input class="button" id="selectBtn" type="button" value="<s:Locale code="button.text.select"/>" >
|
||||
<input class="button" id="selectBtn" type="button" value="<@locale code="button.text.select"/>" >
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -37,14 +45,35 @@
|
||||
</div>
|
||||
|
||||
<div class="mainwrap" id="main">
|
||||
<s:Grid id="list" url="/groups/grid" multiselect="false" resize="false" rowLimit="10">
|
||||
<s:Column width="0" field="id" title="id" hidden="true"/>
|
||||
<s:Column width="300" field="name" title="group.name"/>
|
||||
<s:Column width="355" field="description" title="common.text.description"/>
|
||||
<s:Column width="0" field="createdBy" title="common.text.createdby" hidden="true"/>
|
||||
<s:Column width="0" field="createdDate" title="common.text.createddate" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedBy" title="common.text.modifiedby" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedDate" title="common.text.modifieddate" hidden="true"/>
|
||||
</s:Grid>
|
||||
<table data-url="<@base/>/groups/grid"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
|
||||
<th data-field="name"><@locale code="group.name"/></th>
|
||||
<th data-field="description"><@locale code="common.text.description"/></th>
|
||||
<th data-field="createdBy"><@locale code="common.text.createdby"/></th>
|
||||
<th data-field="createdDate"><@locale code="common.text.createddate"/></th>
|
||||
<th data-field="modifiedBy"><@locale code="common.text.modifiedby"/></th>
|
||||
<th data-field="modifiedDate"><@locale code="common.text.modifieddate"/></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -1,27 +1,30 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
|
||||
<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<style type="text/css">
|
||||
.table th, .table td {
|
||||
padding: .2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
<script type="text/javascript">
|
||||
|
||||
function afterSubmit(data){
|
||||
$("#list").trigger('reloadGrid');
|
||||
//$("#list").trigger('reloadGrid');
|
||||
}
|
||||
|
||||
|
||||
$(function () {
|
||||
$("#insertGroupUserBtn").on("click",function(){
|
||||
var selectIds = $("#list").jqGrid("getGridParam", "selarrrow");
|
||||
if(selectIds == null || selectIds == "") {
|
||||
$.alert({content:$.platform.messages.select.alertText});
|
||||
return false;
|
||||
}
|
||||
var selectIds = "";
|
||||
var memberName="";
|
||||
for(var i=0;i<selectIds.length;i++){
|
||||
memberName+=$("#list").jqGrid("getRowData",selectIds[i]).username+",";
|
||||
var seldata=$.dataGridSelRowsData("#datagrid");
|
||||
for(var arrayIndex in seldata){
|
||||
selectIds=seldata[arrayIndex].id+","+selectIds;
|
||||
memberName=seldata[arrayIndex].displayName+","+memberName;
|
||||
}
|
||||
|
||||
$("#memberId").val(selectIds);
|
||||
$("#memberName").val(memberName);
|
||||
$("#submitBtn").click();
|
||||
@ -30,8 +33,11 @@
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div style="display:none">
|
||||
<form id="actionForm" method="post" action="<s:Base/>/groupMember/insert">
|
||||
<form id="actionForm" method="post" action="<@base/>/groupMember/insert">
|
||||
<table>
|
||||
<tr><td></td><td><input type="text" id="groupId" name="groupId" value="${group.id}"/></td></tr>
|
||||
<tr><td></td><td><input type="text" id="groupName" name="groupName" value="${group.name}"/></td></tr>
|
||||
@ -45,16 +51,16 @@
|
||||
<div id="tool_box">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px"><s:Locale code="userinfo.username"/>:</td>
|
||||
<td width="120px"><@locale code="userinfo.username"/>:</td>
|
||||
<td width="374px">
|
||||
<form id="basic_search_form">
|
||||
<input type="text" name="name" style ="width:150px">
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div >
|
||||
<input class="button" id="insertGroupUserBtn" type="button" value="<s:Locale code="button.text.add"/>">
|
||||
<input class="button" id="insertGroupUserBtn" type="button" value="<@locale code="button.text.add"/>">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -65,14 +71,33 @@
|
||||
|
||||
|
||||
<div class="mainwrap" id="main">
|
||||
<s:Grid id="list" url="/groupMember/gridUserMemberNotInGroup?groupId=${groupId}" multiselect="true" resize="false" rowLimit="10" rowList="[10]">
|
||||
<s:Column width="0" field="id" title="id" hidden="true"/>
|
||||
<s:Column width="200" field="username" title="userinfo.username"/>
|
||||
<s:Column width="225" field="displayName" title="userinfo.displayName" />
|
||||
<s:Column width="200" field="department" title="userinfo.department"/>
|
||||
<s:Column width="0" field="createdBy" title="common.text.createdby" hidden="true"/>
|
||||
<s:Column width="0" field="createdDate" title="common.text.createddate" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedBy" title="common.text.modifiedby" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedDate" title="common.text.modifieddate" hidden="true"/>
|
||||
</s:Grid>
|
||||
</div>
|
||||
<table data-url="<@base/>/groupMember/queryMemberNotInGroup?groupId=${groupId}"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
|
||||
<th data-field="username"><@locale code="userinfo.username"/></th>
|
||||
<th data-field="displayName"><@locale code="userinfo.displayName"/></th>
|
||||
<th data-field="createdBy"><@locale code="common.text.createdby"/></th>
|
||||
<th data-field="createdDate"><@locale code="common.text.createddate"/></th>
|
||||
<th data-field="modifiedBy"><@locale code="common.text.modifiedby"/></th>
|
||||
<th data-field="modifiedDate"><@locale code="common.text.modifieddate"/></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,8 +1,8 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
|
||||
<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<script type="text/javascript">
|
||||
|
||||
function afterSubmit(data){
|
||||
@ -13,7 +13,7 @@
|
||||
$(function () {
|
||||
$("#insertGroupUserBtn").on("click",function(){
|
||||
var settings={
|
||||
url : "<s:Base/>/groupMember/addGroupAppsList/"+$("#groupId").val(),//window url
|
||||
url : "<@base/>/groupMember/addGroupAppsList/"+$("#groupId").val(),//window url
|
||||
title : "New",//title
|
||||
width : "700",//width
|
||||
height : "500"//height
|
||||
@ -21,57 +21,63 @@
|
||||
$.window(settings);//open window
|
||||
|
||||
});
|
||||
|
||||
$("#deleteGroupAppsBtn").on("click",function(){
|
||||
var list2selectIds = $("#list").jqGrid("getGridParam", "selarrrow");
|
||||
if(list2selectIds == null || list2selectIds == "") {
|
||||
$.alert({content:$.platform.messages.select.alertText});
|
||||
return false;
|
||||
}
|
||||
var memberName="";
|
||||
var memberId="";
|
||||
for(var i=0;i<list2selectIds.length;i++){
|
||||
memberName+=$("#list").jqGrid("getRowData",list2selectIds[i]).username+",";
|
||||
memberId+=$("#list").jqGrid("getRowData",list2selectIds[i]).id+",";
|
||||
}
|
||||
|
||||
$("#memberId").val(memberId);
|
||||
$("#memberName").val(memberName);
|
||||
$("#submitBtn").click();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<div style="display:none">
|
||||
<form id="actionForm" method="post" action="<s:Base/>/groupMember/delete">
|
||||
<table>
|
||||
<tr><td></td><td><input type="text" class="groupId" name="groupId" value=""/></td></tr>
|
||||
<tr><td></td><td><input type="text" class="groupName" name="groupName" value=""/></td></tr>
|
||||
<tr><td></td><td><input type="text" id="memberId" name="memberId" value=""/></td></tr>
|
||||
<tr><td></td><td><input type="text" id="memberName" name="memberName" value=""/></td></tr>
|
||||
<tr><td colspan="2"><input id="submitBtn" type="button" value="submit"></input></td></tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</head>
|
||||
<body>
|
||||
<div class="app header-default side-nav-dark">
|
||||
<div class="layout">
|
||||
<div class="header navbar">
|
||||
<#include "../layout/top.ftl"/>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3 sidebar-nav side-nav" >
|
||||
<#include "../layout/sidenav.ftl"/>
|
||||
</div>
|
||||
<div class="page-container">
|
||||
|
||||
<div class="main-content">
|
||||
<div class="container-fluid">
|
||||
<div class="breadcrumb-wrapper row">
|
||||
<div class="col-12 col-lg-3 col-md-6">
|
||||
<h4 class="page-title">Dashboard 2</h4>
|
||||
</div>
|
||||
<div class="col-12 col-lg-9 col-md-6">
|
||||
<ol class="breadcrumb float-right">
|
||||
<li><a href="index.html">Dashboard</a></li>
|
||||
<li class="active">/ Dashboard 2</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container-fluid">
|
||||
<div class="col-12 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<div id="tool_box">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px"><s:Locale code="group.name"/>:</td>
|
||||
<td width="120px"><@locale code="group.name"/>:</td>
|
||||
<td width="374px">
|
||||
<form id="basic_search_form">
|
||||
<input class="groupId" id="groupId" name="groupId" value="" type="hidden" >
|
||||
<input class="groupName" style="width:200px" id="groupName" name="groupName" type="text" >
|
||||
<s:Dialog text="button.text.select" title="Groups" url="/groups/selectGroupsList" width="700" height="500" />
|
||||
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<s:Locale code="button.text.search"/>">
|
||||
<input class="groupName" style="width:200px" value="" id="groupName" name="groupName" type="text" >
|
||||
<input class="button btn btn-success mr-3" id="addBtn" type="button" value="<@locale code="button.text.select"/>"
|
||||
wurl="<@base/>/groups/selectGroupsList"
|
||||
wwidth="700"
|
||||
wheight="500"
|
||||
target="window">
|
||||
<input class="button primary" id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2"> <div id="tool_box_right">
|
||||
<input class="button" id="advancedSearchExpandBtn" type="button" size="50" value="<s:Locale code="button.text.expandsearch"/>" expandValue="<s:Locale code="button.text.expandsearch"/>" collapseValue="<s:Locale code="button.text.collapsesearch"/>">
|
||||
<input class="button" id="advancedSearchExpandBtn" type="button" size="50" value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>" collapseValue="<@locale code="button.text.collapsesearch"/>">
|
||||
|
||||
<input class="button" id="insertGroupUserBtn" type="button" value="<s:Locale code="button.text.add.member"/>">
|
||||
<input class="button" id="deleteGroupAppsBtn" type="button" value="<s:Locale code="button.text.delete.member"/>">
|
||||
<input class="button" id="insertGroupUserBtn" type="button" value="<@locale code="button.text.add.member"/>">
|
||||
<input class="button" id="deleteBtn" type="button" value="<@locale code="button.text.delete.member"/>"
|
||||
wurl="<@base/>/groupMember/delete"/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@ -83,34 +89,69 @@
|
||||
<form id="advanced_search_form">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px"><s:Locale code="apps.protocol"/></td>
|
||||
<td width="120px"><@locale code="apps.protocol"/></td>
|
||||
<td width="360px">
|
||||
</td>
|
||||
<td width="120px"><s:Locale code="apps.protocol"/></td>
|
||||
<td width="120px"><@locale code="apps.protocol"/></td>
|
||||
<td width="360px">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="120px"><s:Locale code="apps.protocol"/></td>
|
||||
<td width="120px"><@locale code="apps.protocol"/></td>
|
||||
<td width="360px">
|
||||
</td>
|
||||
<td width="120px"><s:Locale code="apps.protocol"/></td>
|
||||
<td width="120px"><@locale code="apps.protocol"/></td>
|
||||
<td width="360px">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div class="mainwrap" id="main">
|
||||
<s:Grid id="list" url="/groupMember/gridUserMemberInGroup" multiselect="true" resize="true">
|
||||
<s:Column width="0" field="id" title="id" hidden="true"/>
|
||||
<s:Column width="200" field="username" title="userinfo.username"/>
|
||||
<s:Column width="200" field="displayName" title="userinfo.displayName" />
|
||||
<s:Column width="100" field="department" title="userinfo.department"/>
|
||||
<s:Column width="100" field="email" title="userinfo.email"/>
|
||||
<s:Column width="0" field="createdBy" title="common.text.createdby" hidden="true"/>
|
||||
<s:Column width="0" field="createdDate" title="common.text.createddate" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedBy" title="common.text.modifiedby" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedDate" title="common.text.modifieddate" hidden="true"/>
|
||||
</s:Grid>
|
||||
</div>
|
||||
<div class="mainwrap" id="main">
|
||||
|
||||
<table data-url="<@base/>/groupMember/queryMemberInGroup"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
|
||||
<th data-field="username"><@locale code="userinfo.username"/></th>
|
||||
<th data-field="displayName"><@locale code="userinfo.displayName"/></th>
|
||||
<th data-field="createdBy"><@locale code="common.text.createdby"/></th>
|
||||
<th data-field="createdDate"><@locale code="common.text.createddate"/></th>
|
||||
<th data-field="modifiedBy"><@locale code="common.text.modifiedby"/></th>
|
||||
<th data-field="modifiedDate"><@locale code="common.text.modifieddate"/></th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="content-footer">
|
||||
<#include "../layout/footer.ftl"/>
|
||||
</footer>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="preloader">
|
||||
<div class="loader" id="loader-1"></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@ -19,25 +19,18 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="has-arrow" href="#">
|
||||
<a class="" href="<@base />/apps/list/">
|
||||
<span class="fa fa-fw fa-github fa-lg"></span>
|
||||
应用管理
|
||||
</a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="<@base />/apps/list/">
|
||||
<span class="fa fa-fw fa-code-fork"></span>
|
||||
应用管理
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<@base />/app/accounts/list">
|
||||
<span class="fa fa-fw fa-code-fork"></span>
|
||||
账号映射
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="" href="<@base />/app/accounts/list">
|
||||
<span class="fa fa-fw fa-github fa-lg"></span>
|
||||
账号管理
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="has-arrow" href="#">
|
||||
<span class="fa fa-fw fa-github fa-lg"></span>
|
||||
@ -57,7 +50,7 @@
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<@base />/groupApp/list">
|
||||
<a href="<@base />/groupPrivileges/list">
|
||||
<span class="fa fa-fw fa-code-fork"></span>
|
||||
权限管理
|
||||
</a>
|
||||
@ -105,44 +98,6 @@
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<a class="has-arrow" href="#">
|
||||
<span class="fa fa-fw fa-github fa-lg"></span>
|
||||
统计报表
|
||||
</a>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="<@base />/report/login/day">
|
||||
<span class="fa fa-fw fa-code-fork"></span>
|
||||
日报表
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<@base />/report/login/month">
|
||||
<span class="fa fa-fw fa-code-fork"></span>
|
||||
月报表
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<@base />/report/login/year">
|
||||
<span class="fa fa-fw fa-code-fork"></span>
|
||||
年报表
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<@base />/report/login/app">
|
||||
<span class="fa fa-fw fa-code-fork"></span>
|
||||
应用登录报表
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<@base />/report/login/browser">
|
||||
<span class="fa fa-fw fa-code-fork"></span>
|
||||
浏览器报表
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
<input id='j_password' name='j_password' class="form-control" type="password" required="" placeholder="<@locale code="login.text.password"/>">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input id="j_captcha" name="j_captcha" class="form-control" value="" type="text" required="" placeholder="<@locale code="login.text.captcha"/>" style="float: left; width: 70%;">
|
||||
<input id="j_captcha" name="j_captcha" class="form-control" value="" type="text" required="" placeholder="<@locale code="login.text.captcha"/>">
|
||||
<img id="j_captchaimg" src="<@base/>/captcha" />
|
||||
</div>
|
||||
<div class="form-group text-center m-t-20">
|
||||
|
||||
@ -0,0 +1,144 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
$("#pId").val($.cookie("select_org_id"));
|
||||
$("#pName").val($.cookie("select_org_name"));
|
||||
});
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.table th, .table td {
|
||||
padding: .2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<form id="actionForm" action='<@base/>/orgs/add' method="post">
|
||||
<table class="datatable" style="width:600px" >
|
||||
<tr>
|
||||
<td>
|
||||
<ul class="switch_tab" style="width:100%" >
|
||||
<li id="switch_common" value="table_switch_common" style="width:49%" class="switch_tab_class switch_tab_current"><a href="javascript:void(0);"> <@locale code="org.tab.basic" /></a></li>
|
||||
<li id="switch_extra" value="table_switch_extra" style="width:49%" class="switch_tab_class"><a href="javascript:void(0);"> <@locale code="org.tab.extra" /></a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
<table id="table_switch_common" class="table table-bordered">
|
||||
<tr style="display:none">
|
||||
<th ><input type="text" id="status" type="hidden" name="status" value="1"/>
|
||||
<input type="text" id="_method" type="hidden" name="_method" value="put"/></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td > <@locale code="org.pid" />:</td>
|
||||
<td><input type="text" id="pId" name="pId" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="200px"> <@locale code="org.pname" />:</td>
|
||||
<td><input type="text" id="pName" name="pName" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td > <@locale code="org.id" />:</td>
|
||||
<td><input type="text" id="id" name="id" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.name" />:</td>
|
||||
<td><input type="text" id="name" name="name" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.fullname" />:</td>
|
||||
<td><input type="text" id="fullName" name="fullName" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td > <@locale code="org.xpath" /> :
|
||||
</th>
|
||||
<td><input type="text" id="xPath" name="xPath" class="form-control"/></td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td > <@locale code="org.xnamepath" /> :
|
||||
</th>
|
||||
<td><input type="text" id="xNamePath" name="xNamePath" class="form-control"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td > <@locale code="org.type" />:</td>
|
||||
<td><input type="text" id="type" name="type" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.division" />:</td>
|
||||
<td><input type="text" id="division" name="division" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >
|
||||
<@locale code="org.sortorder" /> :
|
||||
</th>
|
||||
<td><input type="text" id="sortOrder" name="sortOrder" class="form-control" value='1'/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th ><@locale code="org.description" />:</td>
|
||||
<td><input type="text" id="description" name="description" class="form-control"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="table_switch_extra" class="table table-bordered" style="display:none">
|
||||
<tr>
|
||||
<td > <@locale code="org.contact" />:</td>
|
||||
<td><input type="text" id="contact" name="contact" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="200px"> <@locale code="org.phone" />:</td>
|
||||
<td><input type="text" id="phone" name="phone" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.email" />:</td>
|
||||
<td><input type="text" id="email" name="email" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.fax" />:</td>
|
||||
<td><input type="text" id="fax" name="fax" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.country" />:</td>
|
||||
<td><input type="text" id="country" name="country" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.region" />:</td>
|
||||
<td><input type="text" id="region" name="region" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.locality" />:</td>
|
||||
<td><input type="text" id="locality" name="locality" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.street" />:</td>
|
||||
<td><input type="text" id="street" name="street" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.address" />:</td>
|
||||
<td><input type="text" id="address" name="address" class="form-control"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.postalcode" />:</td>
|
||||
<td><input type="text" id="postalCode" name="postalCode" class="form-control"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td nowrap class="center">
|
||||
|
||||
<input id="submitBtn" class="button btn btn-primary mr-3" type="button" style="width:100px" value="<@locale code="button.text.save" />"/>
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@ -8,10 +8,10 @@
|
||||
|
||||
|
||||
function onClick (event, treeId, treeNode) {
|
||||
$("#actionForm").clearForm();
|
||||
$("#actionForm").json2form({data:treeNode.data});
|
||||
$("#_method").val("put");
|
||||
$("#status").val("1");
|
||||
$("#pId").val(treeNode.data.id)
|
||||
$.cookie("select_org_id", treeNode.data.id, { path: '/' });
|
||||
$.cookie("select_org_name", treeNode.data.name,{ path: '/' });
|
||||
$("#searchBtn").click();
|
||||
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ $(function () {
|
||||
element : "orgsTree",
|
||||
rootId : "1",
|
||||
checkbox : null,
|
||||
onClick : null,
|
||||
onClick : onClick,
|
||||
onDblClick : null,
|
||||
url : "<@base/>/orgs/tree"
|
||||
};
|
||||
@ -130,58 +130,7 @@ $(function () {
|
||||
}
|
||||
}
|
||||
);//end tree
|
||||
|
||||
$("#addChildBtn").click(function(){
|
||||
var nodes = $.fn.zTree.getZTreeObj("orgsTree").getSelectedNodes();
|
||||
if (nodes.length == 0) {
|
||||
//$.alert({content:"<s:Locale code="system.menus.alert.select.pmenu" />"});
|
||||
return;
|
||||
}
|
||||
$("#actionForm").clearForm();
|
||||
$("#pId").val(nodes[0].data.id);
|
||||
$("#pName").val(nodes[0].data.name);
|
||||
$("#sortOrder").val(1);
|
||||
$("#status").val("1");
|
||||
$("#_method").val("post");
|
||||
});
|
||||
|
||||
|
||||
$("#saveBtn").click(function(){
|
||||
if($("#_method").val()=="put"){
|
||||
$("#actionForm").attr("action",'<s:Base/>/orgs/update');
|
||||
}else{
|
||||
$("#actionForm").attr("action",'<s:Base/>/orgs/add');
|
||||
var nodedata = $.fn.zTree.getZTreeObj("orgsTree").getSelectedNodes()[0].data;
|
||||
$("#xNamePath").val(nodedata.xNamePath+"/"+$("#name").val());
|
||||
$("#xPath").val(nodedata.xPath+"/"+$("#id").val());
|
||||
}
|
||||
|
||||
if($("#fullName").val()==""){
|
||||
$("#fullName").val($("#name").val());
|
||||
}
|
||||
if($("#_method").val()=="post"){
|
||||
var node=$("#actionForm").serializeObject();
|
||||
node.data=$("#actionForm").serializeObject();
|
||||
delete node['url'];
|
||||
$.fn.zTree.getZTreeObj("orgsTree").addNodes(
|
||||
$.fn.zTree.getZTreeObj("orgsTree").getSelectedNodes()[0],node);
|
||||
}else{
|
||||
var node=$("#actionForm").serializeObject();
|
||||
node.data=$("#actionForm").serializeObject();
|
||||
node=$.extend( $.fn.zTree.getZTreeObj("orgsTree").getSelectedNodes()[0],node);
|
||||
delete node['url'];
|
||||
$.fn.zTree.getZTreeObj("orgsTree").updateNode(node);
|
||||
}
|
||||
$('#actionForm').submit();
|
||||
});
|
||||
|
||||
|
||||
$("#deleteBtn").click(function(){
|
||||
$.post('<@base/>/orgs/delete',{ id:$("#id").val(),_method:"delete"}, function(data) {
|
||||
$.fn.zTree.getZTreeObj("orgsTree").removeNode($.fn.zTree.getZTreeObj("orgsTree").getSelectedNodes()[0]);
|
||||
$.alert({content:data.message});
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
@ -213,15 +162,50 @@ $(function () {
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="col-12 grid-margin">
|
||||
<div class="card">
|
||||
<div class="card-header border-bottom">
|
||||
<h4 class="card-title"><@locale code="login.passwordpolicy"/></h4>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
|
||||
|
||||
<div id="tool_box">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td width="120px">
|
||||
<@locale code="org.name"/>:
|
||||
</td>
|
||||
<td width="375px">
|
||||
<form id="basic_search_form">
|
||||
<input class="form-control" name="name" type="text" style ="width:150px;float:left;">
|
||||
<input id="pId" class="form-control" name="pId" type="hidden" style ="width:150px;float:left;">
|
||||
<input class="button btn btn-primary mr-3" id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
|
||||
<input class="button btn btn-secondary" id="advancedSearchExpandBtn" type="button" size="50" value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>" collapseValue="<@locale code="button.text.collapsesearch"/>">
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div id="tool_box_right">
|
||||
<input class="button btn btn-success mr-3" id="addBtn" type="button" value="<@locale code="button.text.add"/>"
|
||||
wurl="<@base/>/orgs/forwardAdd"
|
||||
wwidth="620"
|
||||
wheight="600"
|
||||
target="window">
|
||||
|
||||
<input class="button btn btn-info mr-3 " id="modifyBtn" type="button" value="<@locale code="button.text.edit"/>"
|
||||
wurl="<@base/>/orgs/forwardUpdate"
|
||||
wwidth="620"
|
||||
wheight="600"
|
||||
target="window">
|
||||
|
||||
<input class="button btn btn-danger mr-3 " id="deleteBtn" type="button" value="<@locale code="button.text.delete"/>"
|
||||
wurl="<@base/>/orgs/delete" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<!-- content -->
|
||||
<table class="datatable" width="100%" >
|
||||
<tr>
|
||||
@ -230,130 +214,31 @@ $(function () {
|
||||
|
||||
</td>
|
||||
<td valign="top" class="td_1" style="vertical-align: top;">
|
||||
<div id="orgsTable" style="PADDING:0;MARGIN: 0;width:650px"></div>
|
||||
<form id="actionForm" action='<s:Base/>/orgs/add' method="post">
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<ul class="switch_tab" style="width:100%" >
|
||||
<li id="switch_common" value="table_switch_common" style="width:49%" class="switch_tab_class switch_tab_current"><a href="javascript:void(0);"><s:Locale code="org.tab.basic" /></a></li>
|
||||
<li id="switch_extra" value="table_switch_extra" style="width:49%" class="switch_tab_class"><a href="javascript:void(0);"><s:Locale code="org.tab.extra" /></a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
<table id="table_switch_common" class="datatable" width="600px">
|
||||
<tr style="display:none">
|
||||
<th ><input type="text" id="status" type="hidden" name="status" value="1"/>
|
||||
<input type="text" id="_method" type="hidden" name="_method" value="put"/></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<th ><s:Locale code="org.pid" />:</th>
|
||||
<td><span class="intspan"><input type="text" readonly id="pId" name="pId" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="200px"><s:Locale code="org.pname" />:</th>
|
||||
<td><span class="intspan"><input type="text" readonly id="pName" name="pName" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<th ><s:Locale code="org.id" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="id" name="id" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th ><s:Locale code="org.name" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="name" name="name" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th ><s:Locale code="org.fullname" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="fullName" name="fullName" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<th ><s:Locale code="org.xpath" /> :
|
||||
</th>
|
||||
<td><span class="intspan"><input type="text" id="xPath" name="xPath" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<th ><s:Locale code="org.xnamepath" /> :
|
||||
</th>
|
||||
<td><span class="intspan"><input type="text" id="xNamePath" name="xNamePath" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th ><s:Locale code="org.type" />:</th>
|
||||
<td><input type="text" id="type" name="type" size="80" class="int"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th ><s:Locale code="org.division" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="division" name="division" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >
|
||||
<s:Locale code="common.text.sortorder" /> :
|
||||
</th>
|
||||
<td><span class="intspan"><input type="text" id="sortOrder" name="sortOrder" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th ><s:Locale code="common.text.description" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="description" name="description" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="table_switch_extra" class="datatable" width="600px" style="display:none">
|
||||
<tr>
|
||||
<th ><s:Locale code="org.contact" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="contact" name="contact" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="200px"><s:Locale code="org.phone" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="phone" name="phone" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th ><s:Locale code="org.email" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="email" name="email" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th ><s:Locale code="org.fax" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="fax" name="fax" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th ><s:Locale code="org.country" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="country" name="country" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th ><s:Locale code="org.region" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="region" name="region" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th ><s:Locale code="org.locality" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="locality" name="locality" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th ><s:Locale code="org.street" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="street" name="street" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th ><s:Locale code="org.address" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="address" name="address" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th ><s:Locale code="org.postalcode" />:</th>
|
||||
<td><span class="intspan"><input type="text" id="postalCode" name="postalCode" size="80" class="int"/></span></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td nowrap class="center">
|
||||
<input id="addChildBtn" class="button" type="button" style="width:120px" value="<@locale code="button.text.add" />"/>
|
||||
|
||||
<input id="saveBtn" class="button" type="button" style="width:100px" value="<@locale code="button.text.save" />"/>
|
||||
|
||||
<input id="deleteBtn" class="button" type="button" style="width:100px" value="<@locale code="button.text.delete" />"/>
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
<table data-url="<@base/>/orgs/pageresults"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">Id</th>
|
||||
<th data-field="id"><@locale code="org.id"/></th>
|
||||
<th data-field="name"><@locale code="org.name"/></th>
|
||||
<th data-field="sortorder"><@locale code="org.sortorder"/></th>
|
||||
<th data-field="division" data-visible="false"><@locale code="org.division"/></th>
|
||||
<th data-field="description"><@locale code="org.description"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@ -1,9 +1,14 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
|
||||
<%@ page import="org.maxkey.web.*"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
|
||||
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<style type="text/css">
|
||||
.table th, .table td {
|
||||
padding: .2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@ -14,13 +19,134 @@ function onClick(event, treeId, treeNode) {
|
||||
$.closeWindow();
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
|
||||
var treeSettings={
|
||||
element : "orgsTree",
|
||||
rootId : "1",
|
||||
checkbox : null,
|
||||
onClick : onClick,
|
||||
onDblClick : null,
|
||||
url : "<@base/>/orgs/tree"
|
||||
};
|
||||
|
||||
function singlePath(newNode) {
|
||||
if (newNode === curExpandNode) return;
|
||||
if (curExpandNode && curExpandNode.open==true) {
|
||||
var zTree = $.fn.zTree.getZTreeObj(treeSettings.element);
|
||||
if (newNode.parentTId === curExpandNode.parentTId) {
|
||||
zTree.expandNode(curExpandNode, false);
|
||||
} else {
|
||||
var newParents = [];
|
||||
while (newNode) {
|
||||
newNode = newNode.getParentNode();
|
||||
if (newNode === curExpandNode) {
|
||||
newParents = null;
|
||||
break;
|
||||
} else if (newNode) {
|
||||
newParents.push(newNode);
|
||||
}
|
||||
}
|
||||
if (newParents!=null) {
|
||||
var oldNode = curExpandNode;
|
||||
var oldParents = [];
|
||||
while (oldNode) {
|
||||
oldNode = oldNode.getParentNode();
|
||||
if (oldNode) {
|
||||
oldParents.push(oldNode);
|
||||
}
|
||||
}
|
||||
if (newParents.length>0) {
|
||||
for (var i = Math.min(newParents.length, oldParents.length)-1; i>=0; i--) {
|
||||
if (newParents[i] !== oldParents[i]) {
|
||||
zTree.expandNode(oldParents[i], false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
zTree.expandNode(oldParents[oldParents.length-1], false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
curExpandNode = newNode;
|
||||
};
|
||||
|
||||
|
||||
function beforeExpand(treeId, treeNode) {
|
||||
var pNode = curExpandNode ? curExpandNode.getParentNode():null;
|
||||
var treeNodeP = treeNode.parentTId ? treeNode.getParentNode():null;
|
||||
var zTree = $.fn.zTree.getZTreeObj(""+treeSettings.element);
|
||||
for(var i=0, l=!treeNodeP ? 0:treeNodeP.children.length; i<l; i++ ) {
|
||||
if (treeNode !== treeNodeP.children[i]) {
|
||||
zTree.expandNode(treeNodeP.children[i], false);
|
||||
}
|
||||
}
|
||||
while (pNode) {
|
||||
if (pNode === treeNode) {
|
||||
break;
|
||||
}
|
||||
pNode = pNode.getParentNode();
|
||||
}
|
||||
if (!pNode) {
|
||||
singlePath(treeNode);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$.fn.zTree.init(
|
||||
$("#"+treeSettings.element), //element
|
||||
{//json object
|
||||
check : {
|
||||
enable : treeSettings.checkbox
|
||||
},
|
||||
async : {
|
||||
enable : true,
|
||||
url : treeSettings.url,
|
||||
autoParam : ["id", "name=n", "level=lv"],
|
||||
otherParam : {"otherParam":"zTreeAsyncTest",id:treeSettings.rootId},
|
||||
dataFilter : function (treeId, parentNode, childNodes) {
|
||||
if (!childNodes) return null;
|
||||
for (var i=0, l=childNodes.length; i<l; i++) {
|
||||
childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
|
||||
}
|
||||
return childNodes;
|
||||
}
|
||||
},
|
||||
data : {
|
||||
simpleData : {
|
||||
enable : true
|
||||
}
|
||||
},
|
||||
callback: {
|
||||
onClick : treeSettings.onClick,
|
||||
onDblClick : treeSettings.onDblClick,
|
||||
beforeAsync : function(treeId, treeNode){
|
||||
$.loading();
|
||||
},
|
||||
onAsyncSuccess : function(event, treeId, treeNode, msg){
|
||||
$.unloading();
|
||||
},
|
||||
//beforeExpand : beforeExpand,
|
||||
onExpand : function onExpand(event, treeId, treeNode) {
|
||||
curExpandNode = treeNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
);//end tree
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<!-- content -->
|
||||
</head>
|
||||
<body>
|
||||
<!-- content -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" class="th_atleft">
|
||||
<tr>
|
||||
<td valign="top" class="td_1" style="vertical-align: top;">
|
||||
<s:Tree rootId="<%=WebContext.getSystemNavRootId()%>" url="/orgs/tree" id="tree" onClick="onClick"/>
|
||||
<div id="orgsTree" class="ztree"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,143 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
$(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
<style type="text/css">
|
||||
.table th, .table td {
|
||||
padding: .2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<form id="actionForm" action='<@base/>/orgs/update' method="post">
|
||||
<table class="datatable" style="width:600px" >
|
||||
<tr>
|
||||
<td>
|
||||
<ul class="switch_tab" style="width:100%" >
|
||||
<li id="switch_common" value="table_switch_common" style="width:49%" class="switch_tab_class switch_tab_current"><a href="javascript:void(0);"> <@locale code="org.tab.basic" /></a></li>
|
||||
<li id="switch_extra" value="table_switch_extra" style="width:49%" class="switch_tab_class"><a href="javascript:void(0);"> <@locale code="org.tab.extra" /></a></li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
<table id="table_switch_common" class="table table-bordered">
|
||||
<tr style="display:none">
|
||||
<th ><input type="text" id="status" type="hidden" name="status" value="1"/>
|
||||
<input type="text" id="_method" type="hidden" name="_method" value="put"/></th>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td > <@locale code="org.pid" />:</td>
|
||||
<td><input type="text" readonly id="pId" name="pId" class="form-control" value="${model.pId!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="200px"> <@locale code="org.pname" />:</td>
|
||||
<td><input type="text" readonly id="pName" name="pName" class="form-control" value="${model.pName!}"/></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td > <@locale code="org.id" />:</td>
|
||||
<td><input type="text" id="id" name="id" class="form-control" value="${model.id!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.name" />:</td>
|
||||
<td><input type="text" id="name" name="name" class="form-control" value="${model.name!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.fullname" />:</td>
|
||||
<td><input type="text" id="fullName" name="fullName" class="form-control" value="${model.fullName!}"/></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td > <@locale code="org.xpath" /> :
|
||||
</th>
|
||||
<td><input type="text" id="xPath" name="xPath" class="form-control" value="${model.xPath!}"/></td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td > <@locale code="org.xnamepath" /> :
|
||||
</th>
|
||||
<td><input type="text" id="xNamePath" name="xNamePath" class="form-control" value="${model.xNamePath!}"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td > <@locale code="org.type" />:</td>
|
||||
<td><input type="text" id="type" name="type" class="form-control" value="${model.type!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.division" />:</td>
|
||||
<td><input type="text" id="division" name="division" class="form-control" value="${model.division!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th >
|
||||
<@locale code="org.sortorder" /> :
|
||||
</th>
|
||||
<td><input type="text" id="sortOrder" name="sortOrder" class="form-control" value="${model.sortOrder!}"/></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<th ><@locale code="org.description" />:</td>
|
||||
<td><input type="text" id="description" name="description" class="form-control" value="${model.description!}"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<table id="table_switch_extra" class="table table-bordered" style="display:none">
|
||||
<tr>
|
||||
<td > <@locale code="org.contact" />:</td>
|
||||
<td><input type="text" id="contact" name="contact" class="form-control" value="${model.contact!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th width="200px"> <@locale code="org.phone" />:</td>
|
||||
<td><input type="text" id="phone" name="phone" class="form-control" value="${model.phone!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.email" />:</td>
|
||||
<td><input type="text" id="email" name="email" class="form-control" value="${model.email!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.fax" />:</td>
|
||||
<td><input type="text" id="fax" name="fax" class="form-control" value="${model.fax!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.country" />:</td>
|
||||
<td><input type="text" id="country" name="country" class="form-control" value="${model.country!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.region" />:</td>
|
||||
<td><input type="text" id="region" name="region" class="form-control" value="${model.region!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.locality" />:</td>
|
||||
<td><input type="text" id="locality" name="locality" class="form-control" value="${model.locality!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.street" />:</td>
|
||||
<td><input type="text" id="street" name="street" class="form-control" value="${model.street!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.address" />:</td>
|
||||
<td><input type="text" id="address" name="address" class="form-control" value="${model.address!}"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td > <@locale code="org.postalcode" />:</td>
|
||||
<td><input type="text" id="postalCode" name="postalCode" class="form-control" value="${model.postalCode!}"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
<tr><td nowrap class="center">
|
||||
|
||||
<input id="submitBtn" class="button btn btn-primary mr-3" type="button" style="width:100px" value="<@locale code="button.text.save" />"/>
|
||||
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,88 +0,0 @@
|
||||
|
||||
<script type="text/javascript" src="<@base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<form id="report_search_form" action="<@base/>/report/login/app">
|
||||
<div id="tool_box">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px">
|
||||
<@locale code="common.text.startdate"/>
|
||||
</td>
|
||||
<td width="375px">
|
||||
|
||||
<input id="datepickerstart" name="startDate" type="text" style ="width:150px" value="${startDate}" >
|
||||
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<@locale code="common.text.enddate"/>
|
||||
<input id="datepickerend" name="endDate" type="text" style ="width:150px" value="${endDate}" >
|
||||
<input class="button primary" id="reportSearchBtn" type="submit" size="50" value="<@locale code="button.text.search"/>">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<div class="mainwrap" id="mainChart" style="height:450px;"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// 基于准备好的dom,初始化echarts图表
|
||||
var myChart = echarts.init(document.getElementById('mainChart'),'macarons');
|
||||
|
||||
option = {
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
toolbox: {
|
||||
show : true,
|
||||
feature : {
|
||||
mark : {show: false},
|
||||
dataView : {show: false, readOnly: false},
|
||||
magicType: {show: true, type: ['line', 'bar']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
legend: {
|
||||
data:['bar']
|
||||
},
|
||||
yAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : ${categoryReport}
|
||||
}
|
||||
],
|
||||
xAxis : [
|
||||
{
|
||||
type : 'value',
|
||||
name : 'bar',
|
||||
axisLabel : {
|
||||
formatter: '{value} '
|
||||
}
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'bar',
|
||||
type:'bar',
|
||||
data:${jsonReport},
|
||||
itemStyle : { normal: {label : {show: true, position: 'right'}}},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
// 为echarts对象加载数据
|
||||
myChart.setOption(option);
|
||||
</script>
|
||||
</div>
|
||||
@ -1,139 +0,0 @@
|
||||
|
||||
<script type="text/javascript" src="<@base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
<form id="report_search_form" action="<@base/>/report/login/browser">
|
||||
<div id="tool_box">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px">
|
||||
<@locale code="common.text.startdate"/>:
|
||||
</td>
|
||||
<td width="375px">
|
||||
|
||||
<input id="datepickerstart" name="startDate" type="text" style ="width:150px" value="${startDate}" >
|
||||
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<@locale code="common.text.enddate"/>:
|
||||
<input id="datepickerend" name="endDate" type="text" style ="width:150px" value="${endDate}" >
|
||||
<input class="button primary" id="reportSearchBtn" type="submit" size="50" value="<@locale code="button.text.search"/>">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</form>
|
||||
<div class="mainwrap" id="mainChartPie" style="height:450px"></div>
|
||||
<div class="mainwrap" id="mainChart" style="height:450px"></div>
|
||||
<script type="text/javascript">
|
||||
// 基于准备好的dom,初始化echarts图表
|
||||
var myChart = echarts.init(document.getElementById('mainChart'),'macarons');
|
||||
var myChartPie = echarts.init(document.getElementById('mainChartPie'),'macarons');
|
||||
|
||||
var option = {
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
toolbox: {
|
||||
show : true,
|
||||
feature : {
|
||||
mark : {show: false},
|
||||
dataView : {show: false, readOnly: false},
|
||||
magicType: {show: true, type: ['line', 'bar']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
legend: {
|
||||
data:['bar']
|
||||
},
|
||||
yAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : ${categoryReport}
|
||||
}
|
||||
],
|
||||
xAxis : [
|
||||
{
|
||||
type : 'value',
|
||||
name : 'bar',
|
||||
axisLabel : {
|
||||
formatter: '{value} '
|
||||
}
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'bar',
|
||||
type:'bar',
|
||||
data:${jsonReport},
|
||||
itemStyle : { normal: {label : {show: true, position: 'right'}}},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
// 为echarts对象加载数据
|
||||
myChart.setOption(option);
|
||||
|
||||
|
||||
var optionPie = {
|
||||
title : {
|
||||
text: 'Browser',
|
||||
subtext: '',
|
||||
x:'center'
|
||||
},
|
||||
tooltip : {
|
||||
trigger: 'item',
|
||||
formatter: "{a} <br/>{b} : {c} ({d}%)"
|
||||
},
|
||||
legend: {
|
||||
orient : 'vertical',
|
||||
x : 'left',
|
||||
data:${categoryPieReport}
|
||||
},
|
||||
toolbox: {
|
||||
show : true,
|
||||
feature : {
|
||||
mark : {show: false},
|
||||
dataView : {show: false, readOnly: true},
|
||||
magicType : {
|
||||
show: true,
|
||||
type: ['pie', 'funnel'],
|
||||
option: {
|
||||
funnel: {
|
||||
x: '25%',
|
||||
width: '50%',
|
||||
funnelAlign: 'left',
|
||||
max: 1548
|
||||
}
|
||||
}
|
||||
},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
series : [
|
||||
{
|
||||
name:' Percentage',
|
||||
type:'pie',
|
||||
radius : '75%',
|
||||
center: ['50%', '60%'],
|
||||
data:${pieReport}
|
||||
}
|
||||
]
|
||||
};
|
||||
myChartPie.setOption(optionPie);
|
||||
</script>
|
||||
</div>
|
||||
@ -1,99 +0,0 @@
|
||||
|
||||
<script type="text/javascript" src="<@base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
|
||||
<div id="tool_box">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px">
|
||||
<@locale code="common.text.date"/>:
|
||||
</td>
|
||||
<td width="375px">
|
||||
<form id="report_search_form" action="<@base/>/report/login/day">
|
||||
<input class="datepicker" name="reportDate" type="text" style ="width:150px" value="${reportDate}" >
|
||||
<input class="button primary" id="reportSearchBtn" type="submit" size="50" value="<@locale code="button.text.search"/>">
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mainwrap" id="mainChart" style="height:450px"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// 基于准备好的dom,初始化echarts图表
|
||||
var myChart = echarts.init(document.getElementById('mainChart'),'macarons');
|
||||
|
||||
option = {
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
toolbox: {
|
||||
show : true,
|
||||
feature : {
|
||||
mark : {show: false},
|
||||
dataView : {show: false, readOnly: false},
|
||||
magicType: {show: true, type: ['line', 'bar']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
legend: {
|
||||
data:['bar','line']
|
||||
},
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : ['0','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23']
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value',
|
||||
name : 'bar',
|
||||
axisLabel : {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'value',
|
||||
name : 'line',
|
||||
axisLabel : {
|
||||
formatter: '{value} '
|
||||
}
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'bar',
|
||||
type:'bar',
|
||||
data:${dayReportArray},
|
||||
itemStyle : { normal: {label : {show: true, position: 'top'}}},
|
||||
},
|
||||
{
|
||||
name:'line',
|
||||
type:'line',
|
||||
yAxisIndex: 1,
|
||||
data:${dayReportArray}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
// 为echarts对象加载数据
|
||||
myChart.setOption(option);
|
||||
</script>
|
||||
</div>
|
||||
@ -1,99 +0,0 @@
|
||||
|
||||
<script type="text/javascript" src="<@base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
|
||||
<div id="tool_box">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px">
|
||||
<@locale code="common.text.date"/>:
|
||||
</td>
|
||||
<td width="375px">
|
||||
<form id="report_search_form" action="<@base/>/report/login/month">
|
||||
<input class="datepicker" name="reportDate" type="text" style ="width:150px" value="${reportDate}" >
|
||||
<input class="button primary" id="reportSearchBtn" type="submit" size="50" value="<@locale code="button.text.search"/>">
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mainwrap" id="mainChart" style="height:450px"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// 基于准备好的dom,初始化echarts图表
|
||||
var myChart = echarts.init(document.getElementById('mainChart'),'macarons');
|
||||
|
||||
option = {
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
toolbox: {
|
||||
show : true,
|
||||
feature : {
|
||||
mark : {show: false},
|
||||
dataView : {show: false, readOnly: false},
|
||||
magicType: {show: true, type: ['line', 'bar']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
legend: {
|
||||
data:['bar','line']
|
||||
},
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : ['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31']
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value',
|
||||
name : 'bar',
|
||||
axisLabel : {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'value',
|
||||
name : 'line',
|
||||
axisLabel : {
|
||||
formatter: '{value} '
|
||||
}
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'bar',
|
||||
type:'bar',
|
||||
data:${jsonMonthReport},
|
||||
itemStyle : { normal: {label : {show: true, position: 'top'}}},
|
||||
},
|
||||
{
|
||||
name:'line',
|
||||
type:'line',
|
||||
yAxisIndex: 1,
|
||||
data:${jsonMonthReport}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
// 为echarts对象加载数据
|
||||
myChart.setOption(option);
|
||||
</script>
|
||||
</div>
|
||||
@ -1,100 +0,0 @@
|
||||
|
||||
<script type="text/javascript" src="<@base/>/jquery/echarts-2.2.1/echarts-all.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
<div>
|
||||
|
||||
<div id="tool_box">
|
||||
<table class="datatable">
|
||||
<tr>
|
||||
<td width="120px">
|
||||
<@locale code="common.text.year"/>:
|
||||
</td>
|
||||
<td width="375px">
|
||||
<form id="report_search_form" action="<@base/>/report/login/year">
|
||||
<input name="reportDate" type="text" style ="width:150px" value="${reportDate}" >
|
||||
<input class="button primary" id="reportSearchBtn" type="submit" size="50" value="<@locale code="button.text.search"/>">
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="mainwrap" id="mainChart" style="height:450px"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// 基于准备好的dom,初始化echarts图表
|
||||
var myChart = echarts.init(document.getElementById('mainChart'),'macarons');
|
||||
|
||||
option = {
|
||||
tooltip : {
|
||||
trigger: 'axis'
|
||||
},
|
||||
toolbox: {
|
||||
show : true,
|
||||
feature : {
|
||||
mark : {show: false},
|
||||
dataView : {show: false, readOnly: false},
|
||||
magicType: {show: true, type: ['line', 'bar']},
|
||||
restore : {show: true},
|
||||
saveAsImage : {show: true}
|
||||
}
|
||||
},
|
||||
calculable : true,
|
||||
legend: {
|
||||
data:['bar','line']
|
||||
},
|
||||
xAxis : [
|
||||
{
|
||||
type : 'category',
|
||||
data : ['1','2','3','4','5','6','7','8','9','10','11','12']
|
||||
}
|
||||
],
|
||||
yAxis : [
|
||||
{
|
||||
type : 'value',
|
||||
name : 'bar',
|
||||
axisLabel : {
|
||||
formatter: '{value} '
|
||||
}
|
||||
},
|
||||
{
|
||||
type : 'value',
|
||||
name : 'line',
|
||||
axisLabel : {
|
||||
formatter: '{value} '
|
||||
}
|
||||
}
|
||||
],
|
||||
series : [
|
||||
{
|
||||
name:'bar',
|
||||
type:'bar',
|
||||
data:${jsonMonthReport},
|
||||
itemStyle : { normal: {label : {show: true, position: 'top'}}},
|
||||
|
||||
},
|
||||
{
|
||||
name:'line',
|
||||
type:'line',
|
||||
yAxisIndex: 1,
|
||||
data:${jsonMonthReport}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
|
||||
// 为echarts对象加载数据
|
||||
myChart.setOption(option);
|
||||
</script>
|
||||
</div>
|
||||
@ -1,57 +1,57 @@
|
||||
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
|
||||
<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
|
||||
|
||||
<table width="100%">
|
||||
<tr>
|
||||
<td>
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<style type="text/css">
|
||||
.table th, .table td {
|
||||
padding: .2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<form id="actionForm" method="post" type="label" autoclose="true" action="<@base/>/users/changePassword">
|
||||
|
||||
<table class="datatable" >
|
||||
<table class="table table-bordered" >
|
||||
<tbody>
|
||||
<tr>
|
||||
<th><@locale code="userinfo.displayName" /> :</th>
|
||||
<td>
|
||||
<input readonly type="hidden" id="id" name="id" class="required" title="" value="${model.id}"/>
|
||||
<input readonly type="text" id="displayName" name="displayName" class="required" title="" value="${model.displayName}"/>
|
||||
<input readonly type="text" id="displayName" name="displayName" class="form-control" title="" value="${model.displayName}"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><@locale code="userinfo.username" /> :</th>
|
||||
<td>
|
||||
<input readonly type="text" id="username" name="username" class="required" title="" value="${model.username}"/>
|
||||
<input readonly type="text" id="username" name="username" class="form-control" title="" value="${model.username}"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><@locale code="login.password.newPassword" />:</th>
|
||||
<td>
|
||||
<input type="password" id="password" name="password" class="required" title="" value=""/>
|
||||
<b class="orange">*</b>
|
||||
<label for="oldPassword"></label>
|
||||
<input type="password" id="password" name="password" class="form-control" title="" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><@locale code="login.password.confirmPassword" />:</th>
|
||||
<td nowrap>
|
||||
<input type="password" id="confirmPassword" name="confirmPassword" class="{ required: true, equalTo: '#newPassword' }" title="" value=""/>
|
||||
<b class="orange">*</b>
|
||||
<label for="confirmPassword"></label>
|
||||
<input type="password" id="confirmPassword" name="confirmPassword" class="form-control" title="" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" class="center">
|
||||
<input id="_method" type="hidden" name="_method" value="post"/>
|
||||
<input class="button" style="width:100px" type="button" id="submitBtn" value="<@locale code="button.text.save" />"/>
|
||||
<input class="button btn btn-primary mr-3" style="width:100px" type="button" id="submitBtn" value="<@locale code="button.text.save" />"/>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@ -6,8 +6,12 @@
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
$(function(){
|
||||
$("#departmentId").val($.cookie("select_org_id"));
|
||||
$("#department").val($.cookie("select_org_name"));
|
||||
|
||||
$("#picture").on("click",function(){
|
||||
$("#pictureFile").click();
|
||||
|
||||
});
|
||||
});
|
||||
//-->
|
||||
@ -24,7 +28,7 @@
|
||||
<form
|
||||
method="post"
|
||||
type="alert"
|
||||
action="<@base/>/users/add"
|
||||
action="<@base/>/userinfo/add"
|
||||
autoclose="true"
|
||||
enctype="multipart/form-data">
|
||||
<div class="" style="width:100%;">
|
||||
@ -492,7 +496,7 @@
|
||||
<div >
|
||||
<div >
|
||||
<input id="_method" type="hidden" name="_method" value="post"/>
|
||||
<input id="submitBtn" class="button btn btn-primary mr-3" type="button" value="<@locale code="button.text.save" />"/>
|
||||
<input id="submitBtn" class="button btn btn-primary mr-3" type="submit" value="<@locale code="button.text.save" />"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<form
|
||||
method="post"
|
||||
type="alert"
|
||||
action="<@base/>/users/update"
|
||||
action="<@base/>/userinfo/update"
|
||||
autoclose="true"
|
||||
enctype="multipart/form-data">
|
||||
<div class="" style="width:100%;">
|
||||
@ -492,7 +492,7 @@
|
||||
<div >
|
||||
<div >
|
||||
<input id="_method" type="hidden" name="_method" value="post"/>
|
||||
<input id="submitBtn" class="button btn btn-primary mr-3" type="button" value="<@locale code="button.text.save" />"/>
|
||||
<input id="submitBtn" class="button btn btn-primary mr-3" type="submit" value="<@locale code="button.text.save" />"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -0,0 +1,201 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<style type="text/css">
|
||||
.table th, .table td {
|
||||
padding: .2rem;
|
||||
vertical-align: middle;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="text/javascript">
|
||||
function genderFormatter(value, row, index){
|
||||
if(value==1){
|
||||
return '<@locale code="userinfo.gender.female" />';
|
||||
}else{
|
||||
return '<@locale code="userinfo.gender.male" />';
|
||||
}
|
||||
};
|
||||
|
||||
function onClick(event, treeId, treeNode) {
|
||||
$("#deptId").val(treeNode.id);
|
||||
$("#list").setGridParam({ postData: { deptId: treeNode.id} });
|
||||
$("#list").trigger('reloadGrid', [{page:1}]);
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#winClose").on("click",function(){
|
||||
var seldata=$.dataGridSelRowsData("#datagrid");
|
||||
console.log(seldata[0].id+" - "+seldata[0].fullName);
|
||||
$(".username", window.parent.document).val(seldata[0].username);
|
||||
$(".displayName", window.parent.document).val(seldata[0].displayName);
|
||||
$(".uid", window.parent.document).val(seldata[0].id);
|
||||
$.closeWindow();
|
||||
});
|
||||
|
||||
var treeSettings={
|
||||
element : "orgsTree",
|
||||
rootId : "1",
|
||||
checkbox : null,
|
||||
onClick : onClick,
|
||||
onDblClick : null,
|
||||
url : "<@base/>/orgs/tree"
|
||||
};
|
||||
|
||||
function singlePath(newNode) {
|
||||
if (newNode === curExpandNode) return;
|
||||
if (curExpandNode && curExpandNode.open==true) {
|
||||
var zTree = $.fn.zTree.getZTreeObj(treeSettings.element);
|
||||
if (newNode.parentTId === curExpandNode.parentTId) {
|
||||
zTree.expandNode(curExpandNode, false);
|
||||
} else {
|
||||
var newParents = [];
|
||||
while (newNode) {
|
||||
newNode = newNode.getParentNode();
|
||||
if (newNode === curExpandNode) {
|
||||
newParents = null;
|
||||
break;
|
||||
} else if (newNode) {
|
||||
newParents.push(newNode);
|
||||
}
|
||||
}
|
||||
if (newParents!=null) {
|
||||
var oldNode = curExpandNode;
|
||||
var oldParents = [];
|
||||
while (oldNode) {
|
||||
oldNode = oldNode.getParentNode();
|
||||
if (oldNode) {
|
||||
oldParents.push(oldNode);
|
||||
}
|
||||
}
|
||||
if (newParents.length>0) {
|
||||
for (var i = Math.min(newParents.length, oldParents.length)-1; i>=0; i--) {
|
||||
if (newParents[i] !== oldParents[i]) {
|
||||
zTree.expandNode(oldParents[i], false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
zTree.expandNode(oldParents[oldParents.length-1], false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
curExpandNode = newNode;
|
||||
};
|
||||
|
||||
|
||||
function beforeExpand(treeId, treeNode) {
|
||||
var pNode = curExpandNode ? curExpandNode.getParentNode():null;
|
||||
var treeNodeP = treeNode.parentTId ? treeNode.getParentNode():null;
|
||||
var zTree = $.fn.zTree.getZTreeObj(""+treeSettings.element);
|
||||
for(var i=0, l=!treeNodeP ? 0:treeNodeP.children.length; i<l; i++ ) {
|
||||
if (treeNode !== treeNodeP.children[i]) {
|
||||
zTree.expandNode(treeNodeP.children[i], false);
|
||||
}
|
||||
}
|
||||
while (pNode) {
|
||||
if (pNode === treeNode) {
|
||||
break;
|
||||
}
|
||||
pNode = pNode.getParentNode();
|
||||
}
|
||||
if (!pNode) {
|
||||
singlePath(treeNode);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$.fn.zTree.init(
|
||||
$("#"+treeSettings.element), //element
|
||||
{//json object
|
||||
check : {
|
||||
enable : treeSettings.checkbox
|
||||
},
|
||||
async : {
|
||||
enable : true,
|
||||
url : treeSettings.url,
|
||||
autoParam : ["id", "name=n", "level=lv"],
|
||||
otherParam : {"otherParam":"zTreeAsyncTest",id:treeSettings.rootId},
|
||||
dataFilter : function (treeId, parentNode, childNodes) {
|
||||
if (!childNodes) return null;
|
||||
for (var i=0, l=childNodes.length; i<l; i++) {
|
||||
childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
|
||||
}
|
||||
return childNodes;
|
||||
}
|
||||
},
|
||||
data : {
|
||||
simpleData : {
|
||||
enable : true
|
||||
}
|
||||
},
|
||||
callback: {
|
||||
onClick : treeSettings.onClick,
|
||||
onDblClick : treeSettings.onDblClick,
|
||||
beforeAsync : function(treeId, treeNode){
|
||||
$.loading();
|
||||
},
|
||||
onAsyncSuccess : function(event, treeId, treeNode, msg){
|
||||
$.unloading();
|
||||
},
|
||||
//beforeExpand : beforeExpand,
|
||||
onExpand : function onExpand(event, treeId, treeNode) {
|
||||
curExpandNode = treeNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
);//end tree
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<input class="button" id="winClose" type="button" value="winClose">
|
||||
</div>
|
||||
<!-- content -->
|
||||
<table class="datatable" width="100%" >
|
||||
<tr>
|
||||
<td valign="top" class="td_1" style="vertical-align: top;">
|
||||
<div id="orgsTree" class="ztree"></div>
|
||||
|
||||
</td>
|
||||
<td valign="top" class="td_1" style="vertical-align: top;">
|
||||
<table data-url="<@base/>/userinfo/grid"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false"><@locale code="userinfo.id"/></th>
|
||||
<th data-field="username"><@locale code="userinfo.username"/></th>
|
||||
<th data-field="displayName"><@locale code="userinfo.displayName"/></th>
|
||||
<th data-field="employeeNumber"><@locale code="userinfo.employeeNumber"/></th>
|
||||
<th data-field="organization"><@locale code="userinfo.organization"/></th>
|
||||
<th data-field="department"><@locale code="userinfo.department"/></th>
|
||||
<th data-field="jobTitle"><@locale code="userinfo.jobTitle"/></th>
|
||||
<th data-field="mobile" data-visible="false"><@locale code="userinfo.mobile"/></th>
|
||||
<th data-field="email" data-visible="false"><@locale code="userinfo.email"/></th>
|
||||
<th data-field="gender" data-formatter="genderFormatter" ><@locale code="userinfo.gender"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@ -4,17 +4,144 @@
|
||||
<#include "../layout/header.ftl"/>
|
||||
<#include "../layout/common.cssjs.ftl"/>
|
||||
<script type="text/javascript">
|
||||
function onSelectRow(id){
|
||||
$("#changepwdBtn").attr("wurl","<@base/>/users/forwardChangePassword/"+$.gridRowData("#list",id).id);
|
||||
}
|
||||
|
||||
function genderFormatter(value, options, rData){
|
||||
if(value==1){
|
||||
return '<@locale code="userinfo.gender.female" />';
|
||||
}else{
|
||||
return '<@locale code="userinfo.gender.male" />';
|
||||
}
|
||||
function genderFormatter(value, row, index){
|
||||
if(value==1){
|
||||
return '<@locale code="userinfo.gender.female" />';
|
||||
}else{
|
||||
return '<@locale code="userinfo.gender.male" />';
|
||||
}
|
||||
};
|
||||
|
||||
function onClick (event, treeId, treeNode) {
|
||||
$("#departmentId").val(treeNode.data.id)
|
||||
$.cookie("select_org_id", treeNode.data.id, { path: '/' });
|
||||
$.cookie("select_org_name", treeNode.data.name,{ path: '/' });
|
||||
$("#searchBtn").click();
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
|
||||
var treeSettings={
|
||||
element : "orgsTree",
|
||||
rootId : "1",
|
||||
checkbox : null,
|
||||
onClick : onClick,
|
||||
onDblClick : null,
|
||||
url : "<@base/>/orgs/tree"
|
||||
};
|
||||
|
||||
function singlePath(newNode) {
|
||||
if (newNode === curExpandNode) return;
|
||||
if (curExpandNode && curExpandNode.open==true) {
|
||||
var zTree = $.fn.zTree.getZTreeObj(treeSettings.element);
|
||||
if (newNode.parentTId === curExpandNode.parentTId) {
|
||||
zTree.expandNode(curExpandNode, false);
|
||||
} else {
|
||||
var newParents = [];
|
||||
while (newNode) {
|
||||
newNode = newNode.getParentNode();
|
||||
if (newNode === curExpandNode) {
|
||||
newParents = null;
|
||||
break;
|
||||
} else if (newNode) {
|
||||
newParents.push(newNode);
|
||||
}
|
||||
}
|
||||
if (newParents!=null) {
|
||||
var oldNode = curExpandNode;
|
||||
var oldParents = [];
|
||||
while (oldNode) {
|
||||
oldNode = oldNode.getParentNode();
|
||||
if (oldNode) {
|
||||
oldParents.push(oldNode);
|
||||
}
|
||||
}
|
||||
if (newParents.length>0) {
|
||||
for (var i = Math.min(newParents.length, oldParents.length)-1; i>=0; i--) {
|
||||
if (newParents[i] !== oldParents[i]) {
|
||||
zTree.expandNode(oldParents[i], false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
zTree.expandNode(oldParents[oldParents.length-1], false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
curExpandNode = newNode;
|
||||
};
|
||||
|
||||
|
||||
function beforeExpand(treeId, treeNode) {
|
||||
var pNode = curExpandNode ? curExpandNode.getParentNode():null;
|
||||
var treeNodeP = treeNode.parentTId ? treeNode.getParentNode():null;
|
||||
var zTree = $.fn.zTree.getZTreeObj(""+treeSettings.element);
|
||||
for(var i=0, l=!treeNodeP ? 0:treeNodeP.children.length; i<l; i++ ) {
|
||||
if (treeNode !== treeNodeP.children[i]) {
|
||||
zTree.expandNode(treeNodeP.children[i], false);
|
||||
}
|
||||
}
|
||||
while (pNode) {
|
||||
if (pNode === treeNode) {
|
||||
break;
|
||||
}
|
||||
pNode = pNode.getParentNode();
|
||||
}
|
||||
if (!pNode) {
|
||||
singlePath(treeNode);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
$.fn.zTree.init(
|
||||
$("#"+treeSettings.element), //element
|
||||
{//json object
|
||||
check : {
|
||||
enable : treeSettings.checkbox
|
||||
},
|
||||
async : {
|
||||
enable : true,
|
||||
url : treeSettings.url,
|
||||
autoParam : ["id", "name=n", "level=lv"],
|
||||
otherParam : {"otherParam":"zTreeAsyncTest",id:treeSettings.rootId},
|
||||
dataFilter : function (treeId, parentNode, childNodes) {
|
||||
if (!childNodes) return null;
|
||||
for (var i=0, l=childNodes.length; i<l; i++) {
|
||||
childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');
|
||||
}
|
||||
return childNodes;
|
||||
}
|
||||
},
|
||||
data : {
|
||||
simpleData : {
|
||||
enable : true
|
||||
}
|
||||
},
|
||||
callback: {
|
||||
onClick : treeSettings.onClick,
|
||||
onDblClick : treeSettings.onDblClick,
|
||||
beforeAsync : function(treeId, treeNode){
|
||||
$.loading();
|
||||
},
|
||||
onAsyncSuccess : function(event, treeId, treeNode, msg){
|
||||
$.unloading();
|
||||
},
|
||||
//beforeExpand : beforeExpand,
|
||||
onExpand : function onExpand(event, treeId, treeNode) {
|
||||
curExpandNode = treeNode;
|
||||
}
|
||||
}
|
||||
}
|
||||
);//end tree
|
||||
|
||||
$("#changepwdBtn").on("click",function(){
|
||||
$("#changepwdBtnHidden").attr("wurl","<@base/>/userinfo/forwardChangePassword/"+$.dataGridSelRowsData("#datagrid")[0].id);
|
||||
$("#changepwdBtnHidden").click();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
@ -59,14 +186,18 @@
|
||||
</td>
|
||||
<td width="375px">
|
||||
<form id="basic_search_form">
|
||||
<input class="form-control" id="departmentId" name="departmentId" type="hidden">
|
||||
<input class="form-control" name="username" type="text" style ="width:150px;float:left;">
|
||||
|
||||
|
||||
<input class="button btn btn-primary mr-3" id="searchBtn" type="button" size="50" value="<@locale code="button.text.search"/>">
|
||||
<input class="button btn btn-secondary" id="advancedSearchExpandBtn" type="button" size="50" value="<@locale code="button.text.expandsearch"/>" expandValue="<@locale code="button.text.expandsearch"/>" collapseValue="<@locale code="button.text.collapsesearch"/>">
|
||||
</form>
|
||||
</td>
|
||||
<td colspan="2">
|
||||
<div id="tool_box_right">
|
||||
<input class="button btn btn-warning mr-3 window" id="changepwdBtn" type="button" value="<@locale code="login.password.changepassword"/>"
|
||||
<input class="button btn btn-warning mr-3" id="changepwdBtn" type="button" value="<@locale code="login.password.changepassword"/>" />
|
||||
<input class="button btn btn-warning mr-3 window" id="changepwdBtnHidden" type="hidden" value="<@locale code="login.password.changepassword"/>"
|
||||
wurl="<@base/>/userinfo/forwardChangePassword" wwidth="600px" wheight="250px" />
|
||||
|
||||
<input class="button btn btn-success mr-3" id="addBtn" type="button" value="<@locale code="button.text.add"/>"
|
||||
@ -104,52 +235,48 @@
|
||||
<input class="form-control" type="text" id="employeeNumber" name="employeeNumber" title="" value=""/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="120px"><@locale code="userinfo.department"/></td>
|
||||
<td width="360px">
|
||||
<input class="form-control" type="text" style="display:none;" id="departmentId" name="departmentId" title="" value=""/>
|
||||
<input class="form-control" style="width:70%;;float:left;" type="text" id="department" name="department" title="" value=""/>
|
||||
<input class="window button btn btn-secondary mr-3 " type="button" size="50" value="<@locale code="button.text.select"/>" title="department" wurl="/orgs/orgsSelect/deptId/department" wwidth="300" wheight="400" />
|
||||
</td>
|
||||
<td width="120px"><@locale code="userinfo.userType"/></td>
|
||||
<td width="360px">
|
||||
<input class="form-control" class="userTypeId" name="userType" type="text" style="display:none;" >
|
||||
<input class="form-control" class="userTypeName" name="userTypeName" type="text" style="float:left;" >
|
||||
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<table data-url="<@base/>/userinfo/grid"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false"><@locale code="userinfo.id"/></th>
|
||||
<th data-field="id"><@locale code="apps.icon"/></th>
|
||||
<th data-field="icon"><@locale code="apps.icon"/></th>
|
||||
<th data-field="username"><@locale code="userinfo.username"/></th>
|
||||
<th data-field="displayName"><@locale code="userinfo.displayName"/></th>
|
||||
<th data-field="employeeNumber"><@locale code="userinfo.employeeNumber"/></th>
|
||||
<th data-field="organization"><@locale code="userinfo.organization"/></th>
|
||||
<th data-field="department"><@locale code="userinfo.department"/></th>
|
||||
<th data-field="jobTitle"><@locale code="userinfo.jobTitle"/></th>
|
||||
<th data-field="mobile"><@locale code="userinfo.mobile"/></th>
|
||||
<th data-field="email"><@locale code="userinfo.email"/></th>
|
||||
<th data-field="gender"><@locale code="userinfo.gender"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!-- content -->
|
||||
<table class="datatable" width="100%" >
|
||||
<tr>
|
||||
<td valign="top" class="td_1" style="vertical-align: top;">
|
||||
<div id="orgsTree" class="ztree"></div>
|
||||
|
||||
</td>
|
||||
<td valign="top" class="td_1" style="vertical-align: top;">
|
||||
<table data-url="<@base/>/userinfo/grid"
|
||||
id="datagrid"
|
||||
data-toggle="table"
|
||||
data-classes="table table-bordered table-hover table-striped"
|
||||
data-click-to-select="true"
|
||||
data-pagination="true"
|
||||
data-total-field="records"
|
||||
data-page-list="[10, 25, 50, 100]"
|
||||
data-search="false"
|
||||
data-locale="zh-CN"
|
||||
data-query-params="dataGridQueryParams"
|
||||
data-query-params-type="pageSize"
|
||||
data-side-pagination="server">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-checkbox="true"></th>
|
||||
<th data-sortable="true" data-field="id" data-visible="false"><@locale code="userinfo.id"/></th>
|
||||
<th data-field="username"><@locale code="userinfo.username"/></th>
|
||||
<th data-field="displayName"><@locale code="userinfo.displayName"/></th>
|
||||
<th data-field="employeeNumber"><@locale code="userinfo.employeeNumber"/></th>
|
||||
<th data-field="organization"><@locale code="userinfo.organization"/></th>
|
||||
<th data-field="department"><@locale code="userinfo.department"/></th>
|
||||
<th data-field="jobTitle"><@locale code="userinfo.jobTitle"/></th>
|
||||
<th data-field="mobile" data-visible="false"><@locale code="userinfo.mobile"/></th>
|
||||
<th data-field="email" data-visible="false"><@locale code="userinfo.email"/></th>
|
||||
<th data-field="gender" data-formatter="genderFormatter" ><@locale code="userinfo.gender"/></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
@ -1,50 +0,0 @@
|
||||
<%@ page contentType="text/html; charset=UTF-8" import="java.util.Map,java.util.LinkedHashMap" %>
|
||||
<%@ page import="org.maxkey.web.*"%>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ taglib prefix="s" uri="http://www.connsec.com/tags" %>
|
||||
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
function onClick(event, treeId, treeNode) {
|
||||
$("#deptId").val(treeNode.id);
|
||||
$("#list").setGridParam({ postData: { deptId: treeNode.id} });
|
||||
$("#list").trigger('reloadGrid', [{page:1}]);
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
$("#winClose").on("click",function(){
|
||||
var selData= $("#list").getRowData($("#list").jqGrid("getGridParam", "selarrrow")[0]+"");
|
||||
$("#${username}", window.parent.document).val(selData["fullName"]);
|
||||
$("#${uid}", window.parent.document).val(selData["id"]);
|
||||
$.closeWindow();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<div>
|
||||
<input class="button" id="winClose" type="button" value="winClose">
|
||||
</div>
|
||||
<!-- content -->
|
||||
<table border="1" cellpadding="0" cellspacing="0" width="100%" class="th_atleft">
|
||||
<tr>
|
||||
<td valign="top" class="td_1" style="vertical-align: top;">
|
||||
<s:Tree rootId="<%=WebContext.getSystemNavRootId()%>" url="/orgs/tree" id="tree" onClick="onClick"/>
|
||||
</td>
|
||||
<td valign="top" class="td_1" style="vertical-align: top;">
|
||||
<s:Grid id="list" url="/users/grid" multiselect="true" resize="false">
|
||||
<s:Column width="0" field="id" title="id" hidden="true"/>
|
||||
<s:Column width="100" field="name" title="userinfo.name"/>
|
||||
<s:Column width="100" field="department" title="userinfo.department"/>
|
||||
<s:Column width="100" field="username" title="userinfo.username"/>
|
||||
<s:Column width="100" field="fullName" title="userinfo.fullname"/>
|
||||
<s:Column width="100" field="email" title="userinfo.email" />
|
||||
<s:Column width="0" field="createdBy" title="common.text.createdby" hidden="true"/>
|
||||
<s:Column width="0" field="createdDate" title="common.text.createddate" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedBy" title="common.text.modifiedby" hidden="true"/>
|
||||
<s:Column width="0" field="modifiedDate" title="common.text.modifieddate" hidden="true"/>
|
||||
</s:Grid>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
Loading…
x
Reference in New Issue
Block a user