update
This commit is contained in:
parent
1eaa603d00
commit
ab7dc6fe77
@ -9,9 +9,7 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import org.apache.commons.lang3.CharEncoding;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import com.pudonghot.ambition.crm.common.Constants;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import me.chyxion.tigon.exception.InvalidParamException;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
|
||||
@ -142,34 +140,4 @@ public abstract class AbstractBaseController {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param os
|
||||
* @param deviceType
|
||||
* @return
|
||||
*/
|
||||
protected String getPlatformByOsAndDeviceType(String os, String deviceType) {
|
||||
String platform = null;
|
||||
if (Constants.PHONE.equalsIgnoreCase(deviceType) &&
|
||||
Constants.Android.equalsIgnoreCase(os)) {
|
||||
platform = Constants.AndroidPhone;
|
||||
}
|
||||
else if (Constants.PHONE.equalsIgnoreCase(deviceType) &&
|
||||
Constants.iOS.equalsIgnoreCase(os)) {
|
||||
platform = Constants.iPhone;
|
||||
}
|
||||
else if (Constants.PAD.equalsIgnoreCase(deviceType) &&
|
||||
Constants.Android.equalsIgnoreCase(os)) {
|
||||
platform = Constants.AndroidPad;
|
||||
}
|
||||
else if (Constants.PAD.equalsIgnoreCase(deviceType) &&
|
||||
Constants.iOS.equalsIgnoreCase(os)) {
|
||||
platform = Constants.iPad;
|
||||
}
|
||||
else {
|
||||
throw new InvalidParamException(
|
||||
"Unknown Request Device Type [{}] OS [{}]", deviceType, os) ;
|
||||
}
|
||||
return platform;
|
||||
}
|
||||
}
|
||||
|
@ -65,8 +65,10 @@ public class UserController
|
||||
*/
|
||||
@Override
|
||||
protected String[] searchCols() {
|
||||
return new String[] {User.NAME,
|
||||
User.LOGIN_ID,
|
||||
return new String[] {
|
||||
User.NAME,
|
||||
User.ACCOUNT,
|
||||
User.EMPLOYEE_ID,
|
||||
User.MOBILE,
|
||||
User.EMAIL,
|
||||
User.NOTE};
|
||||
|
@ -49,7 +49,7 @@ public class UserServiceSupport
|
||||
public ViewModel<User> loginFind(String loginId) {
|
||||
log.info("Find User By [{}].", loginId);
|
||||
User user = null;
|
||||
for (String field : new String[] {User.LOGIN_ID, User.MOBILE, User.EMAIL}) {
|
||||
for (String field : new String[] {User.ACCOUNT, User.EMPLOYEE_ID}) {
|
||||
user = mapper.find(new Search(field, loginId).eq(User.ENABLED, true));
|
||||
if (user != null) {
|
||||
log.info("Found User [{}] By [{}].", user, field);
|
||||
|
@ -1,3 +1,4 @@
|
||||
/auth/login=anon
|
||||
/=anon
|
||||
/**=user
|
||||
/codegen=anon
|
||||
#/**=user
|
||||
|
@ -1,14 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.mapper;
|
||||
|
||||
import me.chyxion.tigon.mybatis.BaseMapper;
|
||||
import com.pudonghot.ambition.crm.model.Permission;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:27 PM
|
||||
*/
|
||||
public interface PermissionMapper extends BaseMapper<String, Permission> {
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.mapper;
|
||||
|
||||
import me.chyxion.tigon.mybatis.BaseMapper;
|
||||
import com.pudonghot.ambition.crm.model.Role;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:23 PM
|
||||
*/
|
||||
public interface RoleMapper extends BaseMapper<String, Role> {
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.mapper;
|
||||
|
||||
import me.chyxion.tigon.mybatis.BaseMapper;
|
||||
import com.pudonghot.ambition.crm.model.RolePermission;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:19 PM
|
||||
*/
|
||||
public interface RolePermissionMapper extends BaseMapper<String, RolePermission> {
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.mapper;
|
||||
|
||||
import me.chyxion.tigon.mybatis.BaseMapper;
|
||||
import com.pudonghot.ambition.crm.model.UserRole;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:10 PM
|
||||
*/
|
||||
public interface UserRoleMapper extends BaseMapper<String, UserRole> {
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:27 PM
|
||||
*/
|
||||
-->
|
||||
<!DOCTYPE mapper PUBLIC
|
||||
"-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.pudonghot.ambition.crm.mapper.PermissionMapper">
|
||||
</mapper>
|
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:23 PM
|
||||
*/
|
||||
-->
|
||||
<!DOCTYPE mapper PUBLIC
|
||||
"-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.pudonghot.ambition.crm.mapper.RoleMapper">
|
||||
</mapper>
|
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:19 PM
|
||||
*/
|
||||
-->
|
||||
<!DOCTYPE mapper PUBLIC
|
||||
"-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.pudonghot.ambition.crm.mapper.RolePermissionMapper">
|
||||
</mapper>
|
@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:10 PM
|
||||
*/
|
||||
-->
|
||||
<!DOCTYPE mapper PUBLIC
|
||||
"-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.pudonghot.ambition.crm.mapper.UserRoleMapper">
|
||||
</mapper>
|
@ -1,63 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.mapper;
|
||||
|
||||
import org.junit.Test;
|
||||
import java.util.Date;
|
||||
import org.junit.Assert;
|
||||
import org.junit.runner.RunWith;
|
||||
import com.pudonghot.ambition.crm.model.Permission;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:27 PM
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration("classpath*:spring/spring-*.xml")
|
||||
public class PermissionMapperTest extends AbstractTransactionalJUnit4SpringContextTests {
|
||||
@Autowired
|
||||
private PermissionMapper mapper;
|
||||
|
||||
@Test
|
||||
public void mapperTest() {
|
||||
// String id = String.valueOf(new Date().getTime());
|
||||
// init model
|
||||
Permission m = new Permission();
|
||||
String id = "id";
|
||||
m.setId(id);
|
||||
m.setDateCreated(new Date());
|
||||
m.setName("s");
|
||||
m.setPermission("s");
|
||||
mapper.insert(m);
|
||||
Assert.assertTrue(mapper.list(null).size() > 0);
|
||||
/*
|
||||
// Your Test Logics
|
||||
Permission m1 = mapper.find(id);
|
||||
// asserts
|
||||
Assert.assertEquals(id, m1.getId());
|
||||
Assert.assertEquals("s", m.getName());
|
||||
Assert.assertEquals("s", m.getPermission());
|
||||
// update
|
||||
m.setDateUpdated(new Date());
|
||||
m.setName("S");
|
||||
m.setPermission("S");
|
||||
mapper.update(m);
|
||||
m1 = mapper.find(id);
|
||||
// asserts
|
||||
Assert.assertEquals(id, m1.getId());
|
||||
Assert.assertNotNull(m1.getDateUpdated());
|
||||
Assert.assertEquals("S", m.getName());
|
||||
Assert.assertEquals("S", m.getPermission());
|
||||
// list
|
||||
Assert.assertTrue(mapper.list(null).size() > 0);
|
||||
// delete
|
||||
mapper.delete(id);
|
||||
m1 = mapper.find(id);
|
||||
Assert.assertNull(m1);
|
||||
*/
|
||||
}
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.mapper;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import java.util.Date;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import com.pudonghot.ambition.crm.mapper.RoleMapper;
|
||||
import com.pudonghot.ambition.crm.model.Role;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:23 PM
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration("classpath*:spring/spring-*.xml")
|
||||
public class RoleMapperTest extends AbstractTransactionalJUnit4SpringContextTests {
|
||||
@Autowired
|
||||
private RoleMapper mapper;
|
||||
|
||||
@Test
|
||||
public void mapperTest() {
|
||||
// String id = String.valueOf(new Date().getTime());
|
||||
// init model
|
||||
Role m = new Role();
|
||||
String id = "id";
|
||||
m.setId(id);
|
||||
m.setDateCreated(new Date());
|
||||
m.setName("s");
|
||||
mapper.insert(m);
|
||||
Assert.assertTrue(mapper.list(null).size() > 0);
|
||||
/*
|
||||
// Your Test Logics
|
||||
Role m1 = mapper.find(id);
|
||||
// asserts
|
||||
Assert.assertEquals(id, m1.getId());
|
||||
Assert.assertEquals("s", m.getName());
|
||||
// update
|
||||
m.setDateUpdated(new Date());
|
||||
m.setName("S");
|
||||
mapper.update(m);
|
||||
m1 = mapper.find(id);
|
||||
// asserts
|
||||
Assert.assertEquals(id, m1.getId());
|
||||
Assert.assertNotNull(m1.getDateUpdated());
|
||||
Assert.assertEquals("S", m.getName());
|
||||
// list
|
||||
Assert.assertTrue(mapper.list(null).size() > 0);
|
||||
// delete
|
||||
mapper.delete(id);
|
||||
m1 = mapper.find(id);
|
||||
Assert.assertNull(m1);
|
||||
*/
|
||||
}
|
||||
}
|
@ -1,64 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.mapper;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import java.util.Date;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import com.pudonghot.ambition.crm.mapper.RolePermissionMapper;
|
||||
import com.pudonghot.ambition.crm.model.RolePermission;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:19 PM
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration("classpath*:spring/spring-*.xml")
|
||||
public class RolePermissionMapperTest extends AbstractTransactionalJUnit4SpringContextTests {
|
||||
@Autowired
|
||||
private RolePermissionMapper mapper;
|
||||
|
||||
@Test
|
||||
public void mapperTest() {
|
||||
// String id = String.valueOf(new Date().getTime());
|
||||
// init model
|
||||
RolePermission m = new RolePermission();
|
||||
String id = "id";
|
||||
m.setId(id);
|
||||
m.setDateCreated(new Date());
|
||||
m.setRoleId("s");
|
||||
m.setPermissionId("s");
|
||||
mapper.insert(m);
|
||||
Assert.assertTrue(mapper.list(null).size() > 0);
|
||||
/*
|
||||
// Your Test Logics
|
||||
RolePermission m1 = mapper.find(id);
|
||||
// asserts
|
||||
Assert.assertEquals(id, m1.getId());
|
||||
Assert.assertEquals("s", m.getRoleId());
|
||||
Assert.assertEquals("s", m.getPermissionId());
|
||||
// update
|
||||
m.setDateUpdated(new Date());
|
||||
m.setRoleId("S");
|
||||
m.setPermissionId("S");
|
||||
mapper.update(m);
|
||||
m1 = mapper.find(id);
|
||||
// asserts
|
||||
Assert.assertEquals(id, m1.getId());
|
||||
Assert.assertNotNull(m1.getDateUpdated());
|
||||
Assert.assertEquals("S", m.getRoleId());
|
||||
Assert.assertEquals("S", m.getPermissionId());
|
||||
// list
|
||||
Assert.assertTrue(mapper.list(null).size() > 0);
|
||||
// delete
|
||||
mapper.delete(id);
|
||||
m1 = mapper.find(id);
|
||||
Assert.assertNull(m1);
|
||||
*/
|
||||
}
|
||||
}
|
@ -31,7 +31,7 @@ public class UserMapperTest extends AbstractTransactionalJUnit4SpringContextTest
|
||||
String id = "id";
|
||||
m.setId(id);
|
||||
m.setDateCreated(new Date());
|
||||
m.setLoginId("s");
|
||||
m.setAccount("s");
|
||||
m.setPassword("s");
|
||||
m.setMobile("s");
|
||||
m.setEmail("s");
|
||||
|
@ -1,64 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.mapper;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
import java.util.Date;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import com.pudonghot.ambition.crm.mapper.UserRoleMapper;
|
||||
import com.pudonghot.ambition.crm.model.UserRole;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:55:10 PM
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration("classpath*:spring/spring-*.xml")
|
||||
public class UserRoleMapperTest extends AbstractTransactionalJUnit4SpringContextTests {
|
||||
@Autowired
|
||||
private UserRoleMapper mapper;
|
||||
|
||||
@Test
|
||||
public void mapperTest() {
|
||||
// String id = String.valueOf(new Date().getTime());
|
||||
// init model
|
||||
UserRole m = new UserRole();
|
||||
String id = "id";
|
||||
m.setId(id);
|
||||
m.setDateCreated(new Date());
|
||||
m.setUserId("s");
|
||||
m.setRoleId("s");
|
||||
mapper.insert(m);
|
||||
Assert.assertTrue(mapper.list(null).size() > 0);
|
||||
/*
|
||||
// Your Test Logics
|
||||
UserRole m1 = mapper.find(id);
|
||||
// asserts
|
||||
Assert.assertEquals(id, m1.getId());
|
||||
Assert.assertEquals("s", m.getUserId());
|
||||
Assert.assertEquals("s", m.getRoleId());
|
||||
// update
|
||||
m.setDateUpdated(new Date());
|
||||
m.setUserId("S");
|
||||
m.setRoleId("S");
|
||||
mapper.update(m);
|
||||
m1 = mapper.find(id);
|
||||
// asserts
|
||||
Assert.assertEquals(id, m1.getId());
|
||||
Assert.assertNotNull(m1.getDateUpdated());
|
||||
Assert.assertEquals("S", m.getUserId());
|
||||
Assert.assertEquals("S", m.getRoleId());
|
||||
// list
|
||||
Assert.assertTrue(mapper.list(null).size() > 0);
|
||||
// delete
|
||||
mapper.delete(id);
|
||||
m1 = mapper.find(id);
|
||||
Assert.assertNull(m1);
|
||||
*/
|
||||
}
|
||||
}
|
@ -6,16 +6,5 @@ package com.pudonghot.ambition.crm.common;
|
||||
* Mar 10, 2017 19:26:24
|
||||
*/
|
||||
public interface Constants {
|
||||
String PHONE = "PHONE";
|
||||
String PAD = "PAD";
|
||||
String Android = "Android";
|
||||
String iOS = "iOS";
|
||||
String AndroidPhone = "AndroidPhone";
|
||||
String AndroidPad = "AndroidPad";
|
||||
String iPhone = "iPhone";
|
||||
String iPad = "iPad";
|
||||
String GENDER_M = "M";
|
||||
String GENDER_F = "F";
|
||||
String GENDER_REGEXP = "^M|F$";
|
||||
String PLATFORM_REGEXP = "^iPhone|iPad|AndroidPhone|AndroidPad$";
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ package com.pudonghot.ambition.crm.form.create;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import me.chyxion.tigon.form.FC2;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import org.hibernate.validator.constraints.Email;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
@ -24,7 +23,7 @@ public class UserFormForCreate extends FC2<String> {
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 36)
|
||||
private String loginId;
|
||||
private String account;
|
||||
@NotBlank
|
||||
@Length(max = 36)
|
||||
private String employeeId;
|
||||
@ -34,16 +33,15 @@ public class UserFormForCreate extends FC2<String> {
|
||||
@NotBlank
|
||||
@Length(max = 36)
|
||||
private String name;
|
||||
@Length(max = 36)
|
||||
private String enName;
|
||||
@NotBlank
|
||||
@Pattern(regexp = GENDER_REGEXP)
|
||||
private String gender;
|
||||
@NotBlank
|
||||
@Length(max = 16)
|
||||
private String mobile;
|
||||
@Email
|
||||
@NotBlank
|
||||
@Length(max = 64)
|
||||
private String email;
|
||||
@NotNull
|
||||
private Boolean admin;
|
||||
private boolean admin;
|
||||
}
|
||||
|
@ -5,6 +5,7 @@ import lombok.Setter;
|
||||
import me.chyxion.tigon.form.FU2;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Pattern;
|
||||
import me.chyxion.tigon.format.annotation.Trim;
|
||||
import org.hibernate.validator.constraints.Email;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
import org.hibernate.validator.constraints.NotBlank;
|
||||
@ -23,26 +24,34 @@ import static com.pudonghot.ambition.crm.common.Constants.GENDER_REGEXP;
|
||||
public class UserFormForUpdate extends FU2<String, String> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Trim
|
||||
@NotBlank
|
||||
@Length(max = 36)
|
||||
private String name;
|
||||
@Trim
|
||||
@EmptyToNull
|
||||
@Length(max = 36)
|
||||
private String enName;
|
||||
@Trim
|
||||
@NotBlank
|
||||
@Length(max = 36)
|
||||
private String employeeId;
|
||||
@Trim
|
||||
@NotBlank
|
||||
@Pattern(regexp = GENDER_REGEXP)
|
||||
private String gender;
|
||||
@EmptyToNull
|
||||
@Length(max = 36)
|
||||
protected String password;
|
||||
@Trim
|
||||
@NotBlank
|
||||
// @Pattern(regexp = MOBILE_REGEXP)
|
||||
@Length(max = 16)
|
||||
private String mobile;
|
||||
@Trim
|
||||
@Email
|
||||
@NotBlank
|
||||
@Length(max = 128)
|
||||
private String email;
|
||||
@NotNull
|
||||
private Boolean admin;
|
||||
private boolean admin;
|
||||
}
|
||||
|
@ -1,36 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import me.chyxion.tigon.mybatis.Table;
|
||||
import me.chyxion.tigon.model.M3;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:44:24 PM
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Table("crm_contact")
|
||||
public class Contact extends M3<String, String> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// Column Names
|
||||
public static final String MOBILE = "mobile";
|
||||
public static final String TELPHONE = "telphone";
|
||||
public static final String EMAIL = "email";
|
||||
public static final String NAME = "name";
|
||||
public static final String GENDER = "gender";
|
||||
public static final String ADDRESS = "address";
|
||||
|
||||
// Properties
|
||||
private String mobile;
|
||||
private String telphone;
|
||||
private String email;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String address;
|
||||
|
||||
}
|
@ -9,7 +9,7 @@ import me.chyxion.tigon.model.M3;
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:44:19 PM
|
||||
* Jun 19, 2017 10:25:29 PM
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@ -18,19 +18,23 @@ public class Customer extends M3<String, String> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// Column Names
|
||||
public static final String MOBILE = "mobile";
|
||||
public static final String TELPHONE = "telphone";
|
||||
public static final String EMAIL = "email";
|
||||
public static final String SALESPERSON = "salesperson";
|
||||
public static final String NAME = "name";
|
||||
public static final String GENDER = "gender";
|
||||
public static final String ADDRESS = "address";
|
||||
public static final String COUNTRY_CODE = "country_code";
|
||||
public static final String STATE = "state";
|
||||
public static final String CITY = "city";
|
||||
public static final String MS = "ms";
|
||||
public static final String REGION = "region";
|
||||
public static final String LEVEL = "level";
|
||||
|
||||
// Properties
|
||||
private String mobile;
|
||||
private String telphone;
|
||||
private String email;
|
||||
private String salesperson;
|
||||
private String name;
|
||||
private String gender;
|
||||
private String address;
|
||||
private String countryCode;
|
||||
private String state;
|
||||
private String city;
|
||||
private String ms;
|
||||
private String region;
|
||||
private String level;
|
||||
|
||||
}
|
||||
|
@ -1,28 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import me.chyxion.tigon.mybatis.Table;
|
||||
import me.chyxion.tigon.model.M3;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:45:38 PM
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Table("crm_permission")
|
||||
public class Permission extends M3<String, String> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// Column Names
|
||||
public static final String NAME = "name";
|
||||
public static final String PERMISSION = "permission";
|
||||
|
||||
// Properties
|
||||
private String name;
|
||||
private String permission;
|
||||
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import me.chyxion.tigon.mybatis.Table;
|
||||
import me.chyxion.tigon.model.M3;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:44:01 PM
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Table("crm_role")
|
||||
public class Role extends M3<String, String> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// Column Names
|
||||
public static final String NAME = "name";
|
||||
|
||||
// Properties
|
||||
private String name;
|
||||
|
||||
}
|
@ -1,28 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import me.chyxion.tigon.mybatis.Table;
|
||||
import me.chyxion.tigon.model.M3;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 8:45:31 PM
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Table("crm_role_permission")
|
||||
public class RolePermission extends M3<String, String> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// Column Names
|
||||
public static final String ROLE_ID = "role_id";
|
||||
public static final String PERMISSION_ID = "permission_id";
|
||||
|
||||
// Properties
|
||||
private String roleId;
|
||||
private String permissionId;
|
||||
|
||||
}
|
@ -20,7 +20,7 @@ public class User extends M3<String, String> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// Column Names
|
||||
public static final String LOGIN_ID = "login_id";
|
||||
public static final String ACCOUNT = "account";
|
||||
public static final String EMPLOYEE_ID = "employee_id";
|
||||
public static final String PASSWORD = "password";
|
||||
public static final String MOBILE = "mobile";
|
||||
@ -30,7 +30,7 @@ public class User extends M3<String, String> {
|
||||
public static final String ADMIN = "admin";
|
||||
|
||||
// Properties
|
||||
private String loginId;
|
||||
private String account;
|
||||
private String employeeId;
|
||||
@NotUpdateWhenNull
|
||||
@JSONField(serialize = false)
|
||||
@ -38,6 +38,7 @@ public class User extends M3<String, String> {
|
||||
private String mobile;
|
||||
private String email;
|
||||
private String name;
|
||||
private String enName;
|
||||
private String gender;
|
||||
private boolean admin;
|
||||
}
|
||||
|
@ -1,28 +0,0 @@
|
||||
package com.pudonghot.ambition.crm.model;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import me.chyxion.tigon.mybatis.Table;
|
||||
import me.chyxion.tigon.model.M3;
|
||||
|
||||
/**
|
||||
* @version 0.0.1
|
||||
* @author Auto Generated <br>
|
||||
* Tech Support <a href="mailto:chyxion@163.com">Shaun Chyxion</a><br>
|
||||
* Jun 7, 2017 9:00:27 PM
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
@Table("crm_user_role")
|
||||
public class UserRole extends M3<String, String> {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
// Column Names
|
||||
public static final String USER_ID = "user_id";
|
||||
public static final String ROLE_ID = "role_id";
|
||||
|
||||
// Properties
|
||||
private String userId;
|
||||
private String roleId;
|
||||
|
||||
}
|
@ -117,4 +117,6 @@ Install JQuery HotKeys
|
||||
Install Bootstrap WYSIWYG
|
||||
bower install bootstrap-wysiwyg
|
||||
|
||||
bower install bootstrap-treeview
|
||||
bower install bootstrap-treeview
|
||||
|
||||
ember install ember-radio-button
|
||||
|
@ -1,5 +1,26 @@
|
||||
import Ember from 'ember';
|
||||
import BaseComponentMixin from '../mixins/components/base-component';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
classNames: ['breadcrumbs']
|
||||
export default Ember.Component.extend(BaseComponentMixin, {
|
||||
// breadcrumbs: Ember.computed.alias('route.breadcrumbs'),
|
||||
breadcrumbs: Ember.computed('route', function() {
|
||||
let me = this;
|
||||
let breadcrumbs = this.get('route.breadcrumbs');
|
||||
if (!breadcrumbs) {
|
||||
let routeName = me.get('routeName');
|
||||
if (/\.index$/.test(routeName)) {
|
||||
let route = me.getRoute(routeName.replace(/\.index$/, ''));
|
||||
if (route) {
|
||||
breadcrumbs = route.get('breadcrumbs');
|
||||
}
|
||||
}
|
||||
}
|
||||
Ember.Logger.info('Breadcrumbs: ', breadcrumbs);
|
||||
return breadcrumbs;
|
||||
}),
|
||||
tabName: 'ul',
|
||||
classNames: ['breadcrumb'],
|
||||
didInsertElement() {
|
||||
console.log('breadcrumbs: ', this);
|
||||
}
|
||||
});
|
||||
|
@ -1,5 +1,5 @@
|
||||
import Ember from 'ember';
|
||||
|
||||
export default Ember.Component.extend({
|
||||
classNames: ['page-content']
|
||||
classNames: ['widget-box']
|
||||
});
|
||||
|
@ -2,7 +2,7 @@ import Ember from 'ember';
|
||||
import BaseComponent from './base-component';
|
||||
|
||||
export default BaseComponent.extend({
|
||||
classNames: ['form-actions', 'center', 'no-margin-bottom'],
|
||||
classNames: ['wizard-actions'],
|
||||
type: 'create',
|
||||
form: true,
|
||||
didReceiveAttrs() {
|
||||
|
@ -2,5 +2,5 @@ import Ember from 'ember';
|
||||
import BaseFormInput from './base-form-input';
|
||||
|
||||
export default BaseFormInput.extend({
|
||||
classNames: ['inline']
|
||||
classNames: ['help-block', 'col-xs-12', 'col-sm-reset', 'inline']
|
||||
});
|
||||
|
@ -12,7 +12,7 @@ export default BaseFormInput.extend({
|
||||
let me = this;
|
||||
let isFile = me.get('type') === 'file';
|
||||
!me.get('inputClass') &&
|
||||
me.set('inputClass', isFile ? 'col-xs-3' : 'col-xs-4');
|
||||
me.set('inputClass', isFile ? 'col-xs-3' : 'col-xs-12 col-sm-5');
|
||||
let image = me.get('image');
|
||||
if (isFile && image) {
|
||||
me.set('imageUrl', me.get('model.' + image));
|
||||
|
@ -5,6 +5,7 @@ export function initialize(app) {
|
||||
app.inject('route', 'message', 'service:message');
|
||||
app.inject('route', 'dialog', 'service:dialog');
|
||||
app.inject('route', 'router', 'router:main');
|
||||
|
||||
// controller
|
||||
app.inject('controller', 'ajax', 'service:ajax');
|
||||
app.inject('controller', 'store', 'service:store');
|
||||
|
@ -2,7 +2,11 @@ import Ember from 'ember';
|
||||
import BaseRoute from '../base';
|
||||
|
||||
export default BaseRoute.extend({
|
||||
breadcrumbs: [{route: 'user.list', params: 1, text: '用户列表'}, {text: '创建用户'}],
|
||||
model() {
|
||||
return {};
|
||||
return {
|
||||
gender: 'M',
|
||||
enabled: true
|
||||
};
|
||||
}
|
||||
});
|
||||
|
@ -2,6 +2,7 @@ import Ember from 'ember';
|
||||
import BaseListRoute from './../base-list';
|
||||
|
||||
export default BaseListRoute.extend({
|
||||
breadcrumbs: [{text: '用户列表'}],
|
||||
actions: {
|
||||
sort(col) {
|
||||
Ember.Logger.info('sort: ', col);
|
||||
|
@ -4,13 +4,35 @@ import BaseService from '../service';
|
||||
export default BaseService.extend({
|
||||
modelName: 'User',
|
||||
createConstraints: {
|
||||
mobile: {
|
||||
account: {
|
||||
presence: true,
|
||||
length: {
|
||||
minimum: 1,
|
||||
maximum: 36
|
||||
}
|
||||
},
|
||||
employeeId: {
|
||||
presence: true,
|
||||
length: {
|
||||
minimum: 1,
|
||||
maximum: 36
|
||||
}
|
||||
},
|
||||
name: {
|
||||
presence: true,
|
||||
length: {
|
||||
minimum: 1,
|
||||
maximum: 16
|
||||
}
|
||||
},
|
||||
enName: {
|
||||
length: {
|
||||
maximum: 36
|
||||
}
|
||||
},
|
||||
email: {
|
||||
email: true
|
||||
},
|
||||
password: {
|
||||
presence: true,
|
||||
length: {
|
||||
@ -19,6 +41,7 @@ export default BaseService.extend({
|
||||
}
|
||||
},
|
||||
confirmPassword: {
|
||||
presence: true,
|
||||
equality: 'password'
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,19 @@
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<i class="ace-icon fa fa-home home-icon"></i>
|
||||
<a href="#/">首页</a>
|
||||
</li>
|
||||
{{yield}}
|
||||
</ul>
|
||||
<li>
|
||||
<i class="ace-icon fa fa-home home-icon"></i>
|
||||
<a href="#/">首页</a>
|
||||
</li>
|
||||
{{log breadcrumbs}}
|
||||
{{#each breadcrumbs as |breadcrumb|}}
|
||||
<li>
|
||||
{{#if breadcrumb.icon}}
|
||||
<i class="ace-icon fa {{breadcrumb.icon}}"></i>
|
||||
{{/if}}
|
||||
{{#if breadcrumb.route}}
|
||||
{{#link-to breadcrumb.route breadcrumb.params}}
|
||||
{{breadcrumb.text}}
|
||||
{{/link-to}}
|
||||
{{else}}
|
||||
{{breadcrumb.text}}
|
||||
{{/if}}
|
||||
</li>
|
||||
{{/each}}
|
@ -1,13 +1,7 @@
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="widget-box">
|
||||
<div class="widget-body">
|
||||
<div class="widget-main no-padding-left no-padding-right">
|
||||
<form class="form-horizontal" role="form">
|
||||
{{yield}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="widget-body">
|
||||
<div class="widget-main">
|
||||
<form class="form-horizontal">
|
||||
{{yield}}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,9 +1,9 @@
|
||||
<button class="btn btn-sm btn-fail" {{action 'goback'}}>
|
||||
<i class="ace-icon fa fa-arrow-left icon-on-left bigger-110"></i>
|
||||
<button class="btn btn-prev" {{action 'goback'}}>
|
||||
<i class="ace-icon fa fa-arrow-left"></i>
|
||||
返回
|
||||
</button>
|
||||
<span style="width: 4px"></span>
|
||||
<button class="btn btn-sm btn-success" {{action 'save'}}>
|
||||
|
||||
<button class="btn btn-success btn-next" {{action 'save'}}>
|
||||
提交
|
||||
<i class="ace-icon fa fa-arrow-right icon-on-right bigger-110"></i>
|
||||
<i class="ace-icon fa fa-arrow-right icon-on-right"></i>
|
||||
</button>
|
||||
|
@ -1,3 +1,3 @@
|
||||
{{#each (get errors name) as |msg|}}
|
||||
<div class="help-block col-xs-12 col-sm-reset inline"> {{msg}} </div>
|
||||
{{/each}}
|
||||
{{msg}}
|
||||
{{/each}}
|
||||
|
@ -1,5 +1,8 @@
|
||||
<label class="col-xs-3 control-label no-padding-right"> {{label}} </label>
|
||||
<label for="{{name}}" class="col-xs-12 col-sm-3 col-md-3 control-label no-padding-right"> {{label}} </label>
|
||||
|
||||
<div class="{{inputClass}}">
|
||||
<!-- <div class="col-xs-12 col-sm-5"> -->
|
||||
|
||||
{{#if hasBlock}}
|
||||
{{yield}}
|
||||
{{else}}
|
||||
@ -12,7 +15,7 @@
|
||||
class='form-control'
|
||||
placeholder=(if placeholder placeholder label)}}
|
||||
{{else}}
|
||||
{{input class='col-xs-12'
|
||||
{{input class='col-xs-12 width-100'
|
||||
type=type
|
||||
readonly=readonly
|
||||
name=name
|
||||
@ -26,4 +29,4 @@
|
||||
{{image-previews previews=imageUrl}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{form-input-errors-msg name=name}}
|
||||
{{form-input-errors-msg name=name}}
|
||||
|
@ -2,26 +2,25 @@
|
||||
<div id="sidebar" class="sidebar responsive">
|
||||
<div class="sidebar-shortcuts" id="sidebar-shortcuts">
|
||||
|
||||
{{!--<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
|
||||
<div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
|
||||
<button class="btn btn-success">
|
||||
<i class="ace-icon fa fa-signal"></i>
|
||||
</button>
|
||||
|
||||
<button class="btn btn-info">
|
||||
<i class="ace-icon fa fa-pencil"></i>
|
||||
</button>
|
||||
|
||||
<!-- #section:basics/sidebar.layout.shortcuts -->
|
||||
<button class="btn btn-warning">
|
||||
{{#link-to 'user.list' 1 class='btn btn-warning'}}
|
||||
<i class="ace-icon fa fa-users"></i>
|
||||
</button>
|
||||
{{/link-to}}
|
||||
|
||||
{{#link-to 'user.list' 1 class='btn btn-info'}}
|
||||
<i class="ace-icon fa fa-address-book-o"></i>
|
||||
{{/link-to}}
|
||||
|
||||
<button class="btn btn-danger">
|
||||
<i class="ace-icon fa fa-cogs"></i>
|
||||
</button>
|
||||
|
||||
<!-- /section:basics/sidebar.layout.shortcuts -->
|
||||
</div>--}}
|
||||
</div>
|
||||
|
||||
{{!--<div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
|
||||
<span class="btn btn-success"></span>
|
||||
@ -117,11 +116,10 @@
|
||||
</li>
|
||||
</ul><!-- /.nav-list -->
|
||||
</li>
|
||||
<!-- end -->
|
||||
|
||||
<li class="">
|
||||
<a href="#" class="dropdown-toggle">
|
||||
<i class="menu-icon fa fa-desktop"></i>
|
||||
<i class="menu-icon fa fa-address-book-o"></i>
|
||||
<span class="menu-text">
|
||||
客户管理
|
||||
</span>
|
||||
@ -131,457 +129,74 @@
|
||||
<b class="arrow"></b>
|
||||
|
||||
<ul class="submenu">
|
||||
<li class="">
|
||||
<a href="#" class="dropdown-toggle">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
客户列表
|
||||
<b class="arrow fa fa-angle-down"></b>
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
|
||||
<ul class="submenu">
|
||||
<li class="">
|
||||
<a href="top-menu.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Top Menu
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="two-menu-1.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Two Menus 1
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="two-menu-2.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Two Menus 2
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="mobile-menu-1.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Default Mobile Menu
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="mobile-menu-2.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Mobile Menu 2
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="mobile-menu-3.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Mobile Menu 3
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="typography.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Typography
|
||||
</a>
|
||||
|
||||
<li>
|
||||
{{#link-to 'user.list' 1}}
|
||||
<i class="menu-icon fa fa-list blue"></i>
|
||||
<span class="menu-text"> 客户列表 </span>
|
||||
{{/link-to}}
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="elements.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Elements
|
||||
</a>
|
||||
|
||||
<li>
|
||||
{{#link-to 'user.create'}}
|
||||
<i class="menu-icon fa fa-user blue"></i>
|
||||
<span class="menu-text"> 创建用户 </span>
|
||||
{{/link-to}}
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="buttons.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Buttons & Icons
|
||||
</a>
|
||||
|
||||
<li>
|
||||
{{#link-to 'api-group.list' 1}}
|
||||
<i class="menu-icon fa fa-plug light-orange"></i>
|
||||
<span class="menu-text"> API 管理 </span>
|
||||
{{/link-to}}
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="content-slider.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Content Sliders
|
||||
</a>
|
||||
|
||||
<li>
|
||||
{{#link-to 'splash.list' 1}}
|
||||
<i class="menu-icon fa fa-file-image-o purple"></i>
|
||||
<span class="menu-text"> 启动图管理 </span>
|
||||
{{/link-to}}
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="treeview.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Treeview
|
||||
</a>
|
||||
|
||||
<li>
|
||||
{{#link-to 'app-config.list' 1}}
|
||||
<i class="menu-icon fa fa-bars pink2"></i>
|
||||
<span class="menu-text"> App配置管理 </span>
|
||||
{{/link-to}}
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="jquery-ui.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
jQuery UI
|
||||
</a>
|
||||
|
||||
<li>
|
||||
{{#link-to 'theme.list' 1}}
|
||||
<i class="menu-icon fa fa-suitcase orange2"></i>
|
||||
<span class="menu-text"> 主题包管理 </span>
|
||||
{{/link-to}}
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="nestable-list.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Nestable Lists
|
||||
</a>
|
||||
|
||||
<li>
|
||||
{{#link-to 'admin.list' 1}}
|
||||
<i class="menu-icon fa fa-user blue"></i>
|
||||
<span class="menu-text"> 管理员管理 </span>
|
||||
{{/link-to}}
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="#" class="dropdown-toggle">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
|
||||
Three Level Menu
|
||||
<b class="arrow fa fa-angle-down"></b>
|
||||
</a>
|
||||
|
||||
<li>
|
||||
{{#link-to 'user.list' 1}}
|
||||
<i class="menu-icon fa fa-user blue"></i>
|
||||
<span class="menu-text"> 用户管理 </span>
|
||||
{{/link-to}}
|
||||
<b class="arrow"></b>
|
||||
|
||||
<ul class="submenu">
|
||||
<li class="">
|
||||
<a href="#">
|
||||
<i class="menu-icon fa fa-leaf green"></i>
|
||||
Item #1
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="#" class="dropdown-toggle">
|
||||
<i class="menu-icon fa fa-pencil orange"></i>
|
||||
|
||||
4th level
|
||||
<b class="arrow fa fa-angle-down"></b>
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
|
||||
<ul class="submenu">
|
||||
<li class="">
|
||||
<a href="#">
|
||||
<i class="menu-icon fa fa-plus purple"></i>
|
||||
Add Product
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="#">
|
||||
<i class="menu-icon fa fa-eye pink"></i>
|
||||
View Products
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<li>
|
||||
{{#link-to 'cloud.list' 1}}
|
||||
<i class="menu-icon fa fa-cloud"></i>
|
||||
<span class="menu-text"> 云端管理 </span>
|
||||
{{/link-to}}
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
</ul><!-- /.nav-list -->
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="#" class="dropdown-toggle">
|
||||
<i class="menu-icon fa fa-list"></i>
|
||||
<span class="menu-text"> Tables </span>
|
||||
|
||||
<b class="arrow fa fa-angle-down"></b>
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
|
||||
<ul class="submenu">
|
||||
<li class="">
|
||||
<a href="tables.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Simple & Dynamic
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="jqgrid.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
jqGrid plugin
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="#" class="dropdown-toggle">
|
||||
<i class="menu-icon fa fa-pencil-square-o"></i>
|
||||
<span class="menu-text"> Forms </span>
|
||||
|
||||
<b class="arrow fa fa-angle-down"></b>
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
|
||||
<ul class="submenu">
|
||||
<li class="">
|
||||
<a href="form-elements.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Form Elements
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="form-elements-2.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Form Elements 2
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="form-wizard.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Wizard & Validation
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="wysiwyg.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Wysiwyg & Markdown
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="dropzone.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Dropzone File Upload
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="widgets.html">
|
||||
<i class="menu-icon fa fa-list-alt"></i>
|
||||
<span class="menu-text"> Widgets </span>
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="calendar.html">
|
||||
<i class="menu-icon fa fa-calendar"></i>
|
||||
|
||||
<span class="menu-text">
|
||||
Calendar
|
||||
|
||||
<!-- #section:basics/sidebar.layout.badge -->
|
||||
<span class="badge badge-transparent tooltip-error" title="2 Important Events">
|
||||
<i class="ace-icon fa fa-exclamation-triangle red bigger-130"></i>
|
||||
</span>
|
||||
|
||||
<!-- /section:basics/sidebar.layout.badge -->
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="gallery.html">
|
||||
<i class="menu-icon fa fa-picture-o"></i>
|
||||
<span class="menu-text"> Gallery </span>
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="#" class="dropdown-toggle">
|
||||
<i class="menu-icon fa fa-tag"></i>
|
||||
<span class="menu-text"> More Pages </span>
|
||||
|
||||
<b class="arrow fa fa-angle-down"></b>
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
|
||||
<ul class="submenu">
|
||||
<li class="">
|
||||
<a href="profile.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
User Profile
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="inbox.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Inbox
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="pricing.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Pricing Tables
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="invoice.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Invoice
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="timeline.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Timeline
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="email.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Email Templates
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="login.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Login & Register
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li class="active open">
|
||||
<a href="#" class="dropdown-toggle">
|
||||
<i class="menu-icon fa fa-file-o"></i>
|
||||
|
||||
<span class="menu-text">
|
||||
Other Pages
|
||||
|
||||
<!-- #section:basics/sidebar.layout.badge -->
|
||||
<span class="badge badge-primary">5</span>
|
||||
|
||||
<!-- /section:basics/sidebar.layout.badge -->
|
||||
</span>
|
||||
|
||||
<b class="arrow fa fa-angle-down"></b>
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
|
||||
<ul class="submenu">
|
||||
<li class="">
|
||||
<a href="faq.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
FAQ
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="error-404.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Error 404
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="error-500.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Error 500
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="">
|
||||
<a href="grid.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Grid
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
|
||||
<li class="active">
|
||||
<a href="blank.html">
|
||||
<i class="menu-icon fa fa-caret-right"></i>
|
||||
Blank Page
|
||||
</a>
|
||||
|
||||
<b class="arrow"></b>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<!-- end -->
|
||||
</ul><!-- /.nav-list -->
|
||||
|
||||
<!-- #section:basics/sidebar.layout.minimize -->
|
||||
@ -595,28 +210,20 @@
|
||||
<div class="main-content-inner">
|
||||
<!-- #section:basics/content.breadcrumbs -->
|
||||
<div class="breadcrumbs" id="breadcrumbs">
|
||||
<ul class="breadcrumb">
|
||||
<li>
|
||||
<i class="ace-icon fa fa-home home-icon"></i>
|
||||
<a href="#">Home</a>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a href="#">Other Pages</a>
|
||||
</li>
|
||||
<li class="active">Blank Page</li>
|
||||
</ul><!-- /.breadcrumb -->
|
||||
{{breadcrumbs-bar}}
|
||||
|
||||
<!-- #section:basics/content.searchbox -->
|
||||
<div class="nav-search" id="nav-search">
|
||||
{{!--<div class="nav-search" id="nav-search">
|
||||
<form class="form-search">
|
||||
<span class="input-icon">
|
||||
<input type="text" placeholder="Search ..." class="nav-search-input" id="nav-search-input" autocomplete="off" />
|
||||
<i class="ace-icon fa fa-search nav-search-icon"></i>
|
||||
</span>
|
||||
</form>
|
||||
</div><!-- /.nav-search -->
|
||||
</div>
|
||||
--}}
|
||||
|
||||
<!-- /.nav-search -->
|
||||
<!-- /section:basics/content.searchbox -->
|
||||
</div>
|
||||
|
||||
|
@ -1,18 +1,22 @@
|
||||
{{#main-content}}
|
||||
{{#breadcrumbs-bar}}
|
||||
<li>
|
||||
{{#link-to 'user.list' 1}}
|
||||
用户列表
|
||||
{{/link-to}}
|
||||
</li>
|
||||
<li class="active">新建用户</li>
|
||||
{{/breadcrumbs-bar}}
|
||||
{{#form-content}}
|
||||
{{form-input name='mobile' label='手机号'}}
|
||||
{{form-input type='password' name='password' label='登录密码'}}
|
||||
{{form-input type='password' name='confirmPassword' label='重复密码'}}
|
||||
{{form-input-checkbox}}
|
||||
{{form-input name='note' label='备注'}}
|
||||
{{form-footer-buttons}}
|
||||
{{/form-content}}
|
||||
{{/main-content}}
|
||||
{{#form-content}}
|
||||
{{form-input name='account' label='用户名'}}
|
||||
{{form-input name='employeeId' label='工号'}}
|
||||
{{form-input name='name' label='姓名'}}
|
||||
{{form-input name='enName' label='英文名'}}
|
||||
{{#form-input-select label='性别' name='gender' as |xs|}}
|
||||
{{#xs.option value='M'}}男{{/xs.option}}
|
||||
{{#xs.option value='F'}}女{{/xs.option}}
|
||||
{{/form-input-select}}
|
||||
{{form-input name='mobile' label='手机号'}}
|
||||
{{form-input name='email' label='邮箱'}}
|
||||
|
||||
{{form-input type='password' name='password' label='登录密码'}}
|
||||
{{form-input type='password' name='confirmPassword' label='重复密码'}}
|
||||
|
||||
{{form-input-checkbox label='管理员' name='admin'}}
|
||||
{{form-input-enabled}}
|
||||
{{form-input name='note' label='备注'}}
|
||||
<hr />
|
||||
{{form-footer-buttons}}
|
||||
{{/form-content}}
|
||||
|
||||
|
@ -39,6 +39,7 @@
|
||||
"ember-export-application-global": "^1.0.5",
|
||||
"ember-load-initializers": "^0.5.1",
|
||||
"ember-moment": "6.1.0",
|
||||
"ember-radio-button": "1.1.1",
|
||||
"ember-resolver": "^2.0.3",
|
||||
"ember-route-action-helper": "2.0.3",
|
||||
"ember-truth-helpers": "1.1.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user