Commit 604096b5 authored by liboyang's avatar liboyang

新增页面

parent 792d505b
...@@ -237,7 +237,6 @@ public class AdminApi { ...@@ -237,7 +237,6 @@ public class AdminApi {
String str = "0"; String str = "0";
SysPermission sysPermission = new SysPermission(); SysPermission sysPermission = new SysPermission();
sysPermission.setName(jsonObject.getString("name")); sysPermission.setName(jsonObject.getString("name"));
sysPermission.setResource_type(jsonObject.getString("resourceType"));
sysPermission.setUrl(jsonObject.getString("url")); sysPermission.setUrl(jsonObject.getString("url"));
sysPermission.setPermission(jsonObject.getString("permission")); sysPermission.setPermission(jsonObject.getString("permission"));
// sysPermission.setParent_id(Long.parseLong(jsonObject.getString("parentId"))); // sysPermission.setParent_id(Long.parseLong(jsonObject.getString("parentId")));
...@@ -335,6 +334,7 @@ public class AdminApi { ...@@ -335,6 +334,7 @@ public class AdminApi {
SysRole sysRole = new SysRole(); SysRole sysRole = new SysRole();
sysRole.setRole(jsonObject.getString("role")); sysRole.setRole(jsonObject.getString("role"));
sysRole.setDescription(jsonObject.getString("description")); sysRole.setDescription(jsonObject.getString("description"));
sysRole.setProcess(Integer.parseInt(jsonObject.getString("process")));
String permissionIds = jsonObject.getString("permissionIds"); String permissionIds = jsonObject.getString("permissionIds");
JSONArray jsonArray = JSONArray.fromObject(permissionIds); JSONArray jsonArray = JSONArray.fromObject(permissionIds);
...@@ -402,19 +402,11 @@ public class AdminApi { ...@@ -402,19 +402,11 @@ public class AdminApi {
JSONObject jsonObject = JSONObject.fromObject(jsonStr); JSONObject jsonObject = JSONObject.fromObject(jsonStr);
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
boolean flag = false; boolean flag = false;
// String str = "0";
SysPermission sysPermission = new SysPermission(); SysPermission sysPermission = new SysPermission();
sysPermission.setId(Integer.parseInt(jsonObject.getString("id"))); sysPermission.setId(Integer.parseInt(jsonObject.getString("id")));
sysPermission.setName(jsonObject.getString("name")); sysPermission.setName(jsonObject.getString("name"));
sysPermission.setResource_type(jsonObject.getString("resourceType"));
sysPermission.setUrl(jsonObject.getString("url")); sysPermission.setUrl(jsonObject.getString("url"));
sysPermission.setPermission(jsonObject.getString("permission")); sysPermission.setPermission(jsonObject.getString("permission"));
// sysPermission.setParent_id(Long.parseLong(parentId));
// if(parentId.equals(str)){
// sysPermission.setParent_ids(parentId+"/");
// }else{
// sysPermission.setParent_ids(str+"/"+parentId);
// }
System.out.println(sysPermission); System.out.println(sysPermission);
flag = sysPermissionService.updatePermission(sysPermission); flag = sysPermissionService.updatePermission(sysPermission);
if (flag) { if (flag) {
...@@ -426,4 +418,4 @@ public class AdminApi { ...@@ -426,4 +418,4 @@ public class AdminApi {
return map; return map;
} }
} }
...@@ -5,7 +5,7 @@ import java.io.Serializable; ...@@ -5,7 +5,7 @@ import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
* @author zhangyusheng * @author liboyang
*/ */
@Entity @Entity
@Table(name="SYS_PERMISSION") @Table(name="SYS_PERMISSION")
...@@ -20,10 +20,7 @@ public class SysPermission implements Serializable { ...@@ -20,10 +20,7 @@ public class SysPermission implements Serializable {
* 名称. * 名称.
*/ */
private String name; private String name;
/**
* 资源类型
*/
private String resource_type;
/** /**
* 资源路径. * 资源路径.
*/ */
...@@ -33,19 +30,6 @@ public class SysPermission implements Serializable { ...@@ -33,19 +30,6 @@ public class SysPermission implements Serializable {
*/ */
private String permission; private String permission;
/**
* 父编号
*/
private Long parent_id;
/**
* 父编号列表
*/
private String parent_ids;
private byte available = 0; private byte available = 0;
@ManyToMany @ManyToMany
@JoinTable(name="SysRolePermission",joinColumns={@JoinColumn(name="permissionId")},inverseJoinColumns={@JoinColumn(name="roleId")}) @JoinTable(name="SysRolePermission",joinColumns={@JoinColumn(name="permissionId")},inverseJoinColumns={@JoinColumn(name="roleId")})
...@@ -67,22 +51,6 @@ public class SysPermission implements Serializable { ...@@ -67,22 +51,6 @@ public class SysPermission implements Serializable {
this.name = name; this.name = name;
} }
public String getResource_type() {
return resource_type;
}
public void setResource_type(String resource_type) {
this.resource_type = resource_type;
}
public String getParent_ids() {
return parent_ids;
}
public void setParent_ids(String parent_ids) {
this.parent_ids = parent_ids;
}
public String getUrl() { public String getUrl() {
return url; return url;
} }
...@@ -99,16 +67,6 @@ public class SysPermission implements Serializable { ...@@ -99,16 +67,6 @@ public class SysPermission implements Serializable {
this.permission = permission; this.permission = permission;
} }
public Long getParent_id() {
return parent_id;
}
public void setParent_id(Long parent_id) {
this.parent_id = parent_id;
}
public byte getAvailable() { public byte getAvailable() {
return available; return available;
} }
......
...@@ -4,7 +4,7 @@ import javax.persistence.*; ...@@ -4,7 +4,7 @@ import javax.persistence.*;
import java.util.List; import java.util.List;
/** /**
* @author zhangyusheng * @author liboyang
*/ */
@Entity @Entity
@Table(name="SYS_ROLE") @Table(name="SYS_ROLE")
...@@ -17,7 +17,7 @@ public class SysRole { ...@@ -17,7 +17,7 @@ public class SysRole {
private Integer id; private Integer id;
/** /**
* 角色标识程序中判断使用,如"admin",这个是唯一的: * 角色标识程序中判断使用,如"admin",这个是唯一的:
*/ */
private String role; private String role;
/** /**
* 角色描述,UI界面显示使用 * 角色描述,UI界面显示使用
...@@ -28,6 +28,8 @@ public class SysRole { ...@@ -28,6 +28,8 @@ public class SysRole {
*/ */
private byte available = 0; private byte available = 0;
private Integer process;
/** /**
* 角色 -- 权限关系:多对多关系; * 角色 -- 权限关系:多对多关系;
*/ */
...@@ -37,13 +39,13 @@ public class SysRole { ...@@ -37,13 +39,13 @@ public class SysRole {
/** /**
* 用户 - 角色关系定义; * 用户 - 角色关系定义;
*/ */
@ManyToMany @ManyToMany
@JoinTable(name="SysUserRole",joinColumns={@JoinColumn(name="roleId")},inverseJoinColumns={@JoinColumn(name="userId")}) @JoinTable(name="SysUserRole",joinColumns={@JoinColumn(name="roleId")},inverseJoinColumns={@JoinColumn(name="userId")})
/** /**
* 一个角色对应多个用户 * 一个角色对应多个用户
*/ */
private List<UserInfo> userInfos; private List<UserInfo> userInfos;
...@@ -94,4 +96,12 @@ public class SysRole { ...@@ -94,4 +96,12 @@ public class SysRole {
public void setUserInfos(List<UserInfo> userInfos) { public void setUserInfos(List<UserInfo> userInfos) {
this.userInfos = userInfos; this.userInfos = userInfos;
} }
public Integer getProcess() {
return process;
}
public void setProcess(Integer process) {
this.process = process;
}
} }
\ No newline at end of file
...@@ -5,7 +5,7 @@ import java.io.Serializable; ...@@ -5,7 +5,7 @@ import java.io.Serializable;
import java.util.List; import java.util.List;
/** /**
* @author zhangyusheng * @author liboyang
*/ */
@Entity @Entity
@Table(name="USER_INFO") @Table(name="USER_INFO")
...@@ -19,7 +19,6 @@ public class UserInfo implements Serializable { ...@@ -19,7 +19,6 @@ public class UserInfo implements Serializable {
private String password; private String password;
private String salt; private String salt;
private byte state; private byte state;
private String workshop;
@ManyToMany(fetch= FetchType.EAGER) @ManyToMany(fetch= FetchType.EAGER)
@JoinTable(name = "SysUserRole", joinColumns = { @JoinColumn(name = "userId") }, inverseJoinColumns ={@JoinColumn(name = "roleId") }) @JoinTable(name = "SysUserRole", joinColumns = { @JoinColumn(name = "userId") }, inverseJoinColumns ={@JoinColumn(name = "roleId") })
private List<SysRole> roleList; private List<SysRole> roleList;
...@@ -80,11 +79,4 @@ public class UserInfo implements Serializable { ...@@ -80,11 +79,4 @@ public class UserInfo implements Serializable {
this.roleList = roleList; this.roleList = roleList;
} }
public String getWorkshop() {
return workshop;
}
public void setWorkshop(String workshop) {
this.workshop = workshop;
}
} }
\ No newline at end of file
...@@ -2,8 +2,10 @@ package com.yxproject.start.mapper; ...@@ -2,8 +2,10 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.SysPermission; import com.yxproject.start.entity.SysPermission;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author Administrator * @author Administrator
...@@ -14,8 +16,8 @@ public interface SysPermissionMapper{ ...@@ -14,8 +16,8 @@ public interface SysPermissionMapper{
* 新增权限 * 新增权限
* @param sysPermission * @param sysPermission
*/ */
@Insert("INSERT INTO sys_permission (id,available,name,parent_id,parent_ids,permission,resource_type,url)\n" + @Insert("INSERT INTO sys_permission (id,available,name,permission,url)\n" +
"VALUES (PERMISSION_seq.nextval,0,#{name},'0','0/',#{permission},#{resource_type},#{url})") "VALUES (PERMISSION_seq.nextval,0,#{name},#{permission},#{url})")
public void addPermissionByMap(SysPermission sysPermission); public void addPermissionByMap(SysPermission sysPermission);
/** /**
...@@ -74,7 +76,7 @@ public interface SysPermissionMapper{ ...@@ -74,7 +76,7 @@ public interface SysPermissionMapper{
* 修改权限信息 * 修改权限信息
* @param sysPermission * @param sysPermission
*/ */
@Update("update SYS_PERMISSION SET NAME=#{name},resource_type=#{resource_type},url=#{url}," + @Update("update SYS_PERMISSION SET NAME=#{name},url=#{url}," +
"permission=#{permission} where id=#{id}") "permission=#{permission} where id=#{id}")
public void updatePermission(SysPermission sysPermission); public void updatePermission(SysPermission sysPermission);
} }
...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper; ...@@ -2,6 +2,7 @@ package com.yxproject.start.mapper;
import com.yxproject.start.entity.SysRole; import com.yxproject.start.entity.SysRole;
import org.apache.ibatis.annotations.*; import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import java.util.List; import java.util.List;
...@@ -14,8 +15,8 @@ public interface SysRoleMapper { ...@@ -14,8 +15,8 @@ public interface SysRoleMapper {
* 添加角色 * 添加角色
* @param sysRole * @param sysRole
*/ */
@Insert("INSERT INTO SYS_ROLE(ID,AVAILABLE,DESCRIPTION,ROLE)\n" + @Insert("INSERT INTO SYS_ROLE(ID,AVAILABLE,DESCRIPTION,ROLE,PROCESS)\n" +
"VALUES(PERMISSION_seq.nextval,0,#{description},#{role})") "VALUES(PERMISSION_seq.nextval,0,#{description},#{role},#{process})")
@Options(useGeneratedKeys = true, keyProperty = "id",keyColumn = "id") @Options(useGeneratedKeys = true, keyProperty = "id",keyColumn = "id")
public void addRoleByMap(SysRole sysRole); public void addRoleByMap(SysRole sysRole);
...@@ -36,6 +37,7 @@ public interface SysRoleMapper { ...@@ -36,6 +37,7 @@ public interface SysRoleMapper {
@Result(property = "role",column = "role"), @Result(property = "role",column = "role"),
@Result(property = "description",column = "description"), @Result(property = "description",column = "description"),
@Result(property = "available",column = "available"), @Result(property = "available",column = "available"),
@Result(property = "process",column = "process"),
@Result(property = "permissions",javaType = List.class,column ="id", @Result(property = "permissions",javaType = List.class,column ="id",
many = @Many(select = "com.yxproject.start.mapper.SysPermissionMapper.selectPermissionByRoleId"))}) many = @Many(select = "com.yxproject.start.mapper.SysPermissionMapper.selectPermissionByRoleId"))})
public List<SysRole> selectAllRole(); public List<SysRole> selectAllRole();
...@@ -65,6 +67,7 @@ public interface SysRoleMapper { ...@@ -65,6 +67,7 @@ public interface SysRoleMapper {
@Result(property = "role",column = "role"), @Result(property = "role",column = "role"),
@Result(property = "description",column = "description"), @Result(property = "description",column = "description"),
@Result(property = "available",column = "available"), @Result(property = "available",column = "available"),
@Result(property = "process",column = "process"),
@Result(property = "permissions",javaType = List.class,column ="id", @Result(property = "permissions",javaType = List.class,column ="id",
many = @Many(select = "com.yxproject.start.mapper.SysPermissionMapper.selectPermissionByRoleId"))}) many = @Many(select = "com.yxproject.start.mapper.SysPermissionMapper.selectPermissionByRoleId"))})
List<SysRole> selectRoleAndPermissionByUserId(@Param("userId") Integer userId); List<SysRole> selectRoleAndPermissionByUserId(@Param("userId") Integer userId);
...@@ -102,6 +105,7 @@ public interface SysRoleMapper { ...@@ -102,6 +105,7 @@ public interface SysRoleMapper {
@Result(property = "role",column = "role"), @Result(property = "role",column = "role"),
@Result(property = "description",column = "description"), @Result(property = "description",column = "description"),
@Result(property = "available",column = "available"), @Result(property = "available",column = "available"),
@Result(property = "process",column = "process"),
@Result(property = "permissions",javaType = List.class,column ="id", @Result(property = "permissions",javaType = List.class,column ="id",
many = @Many(select = "com.yxproject.start.mapper.SysPermissionMapper.selectPermissionByRoleId"))}) many = @Many(select = "com.yxproject.start.mapper.SysPermissionMapper.selectPermissionByRoleId"))})
public SysRole selectRoleByRoleId(@Param("roleId") Integer roleId); public SysRole selectRoleByRoleId(@Param("roleId") Integer roleId);
......
...@@ -88,7 +88,130 @@ ...@@ -88,7 +88,130 @@
<a class="sidebar-toggle" data-toggle="push-menu" role="button"> <a class="sidebar-toggle" data-toggle="push-menu" role="button">
<span class="sr-only">Toggle navigation</span> <span class="sr-only">Toggle navigation</span>
</a> </a>
<div style="text-align: right;font-size:1.8em;line-height: 50px;color: #fff;font-family:'黑体';padding-right: 20px;">北京制证辅助平台</div> <div class="pull-right" style="font-size:1.8em;line-height: 50px;color: #fff;font-family:'黑体';padding:0 20px;cursor: pointer;">北京制证辅助平台</div>
<div class="navbar-custom-menu">
<ul class="nav navbar-nav">
<!-- Messages: style can be found in dropdown.less-->
<li class="dropdown messages-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-envelope-o"></i>
<span class="label label-success">4</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 4 messages</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li><!-- start message -->
<a href="#">
<div class="pull-left">
<img src="dist/img/user2-160x160.jpg" class="img-circle" alt="User Image">
</div>
<h4>
Support Team
<small><i class="fa fa-clock-o"></i> 5 mins</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<!-- end message -->
<li>
<a href="#">
<div class="pull-left">
<img src="dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
</div>
<h4>
AdminLTE Design Team
<small><i class="fa fa-clock-o"></i> 2 hours</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="dist/img/user4-128x128.jpg" class="img-circle" alt="User Image">
</div>
<h4>
Developers
<small><i class="fa fa-clock-o"></i> Today</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="dist/img/user3-128x128.jpg" class="img-circle" alt="User Image">
</div>
<h4>
Sales Department
<small><i class="fa fa-clock-o"></i> Yesterday</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
<li>
<a href="#">
<div class="pull-left">
<img src="dist/img/user4-128x128.jpg" class="img-circle" alt="User Image">
</div>
<h4>
Reviewers
<small><i class="fa fa-clock-o"></i> 2 days</small>
</h4>
<p>Why not buy a new awesome theme?</p>
</a>
</li>
</ul>
</li>
<li class="footer"><a href="#">See All Messages</a></li>
</ul>
</li>
<!-- Notifications: style can be found in dropdown.less -->
<li class="dropdown notifications-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
<i class="fa fa-bell-o"></i>
<span class="label label-warning">10</span>
</a>
<ul class="dropdown-menu">
<li class="header">You have 10 notifications</li>
<li>
<!-- inner menu: contains the actual data -->
<ul class="menu">
<li>
<a href="#">
<i class="fa fa-users text-aqua"></i> 5 new members joined today
</a>
</li>
<li>
<a href="#">
<i class="fa fa-warning text-yellow"></i> Very long description here that may not fit into the
page and may cause design problems
</a>
</li>
<li>
<a href="#">
<i class="fa fa-users text-red"></i> 5 new members joined
</a>
</li>
<li>
<a href="#">
<i class="fa fa-shopping-cart text-green"></i> 25 sales made
</a>
</li>
<li>
<a href="#">
<i class="fa fa-user text-red"></i> You changed your username
</a>
</li>
</ul>
</li>
<li class="footer"><a href="#">View all</a></li>
</ul>
</li>
</ul>
</div>
</nav> </nav>
</header> </header>
<aside class="main-sidebar"> <aside class="main-sidebar">
...@@ -110,116 +233,11 @@ ...@@ -110,116 +233,11 @@
<li class="header"> <li class="header">
导航 导航
</li> </li>
<li ng-class="{true: 'active', false: ''}[tab =='/xmlAndSearch']" ng-click="getFocus('/xmlAndSearch')">
<a href="#!/xmlAndSearch">
<i class="fa fa-file-code-o"></i>
<span>制证包管理</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/excelAndSearch']" ng-click="getFocus('/excelAndSearch')">
<a href="#!/excelAndSearch">
<i class="fa fa-file-excel-o"></i>
<span>格口文件管理</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/cardProdPackage']" ng-click="getFocus('/cardProdPackage')">
<a href="#!/cardProdPackage">
<i class="fa fa-folder"></i>
<span>制证信息打包</span>
</a>
</li>
<li class="treeview" ng-class="{true: 'active', false: ''}[tab =='/cardProdUpdate']" ng-click="getFocus('/cardProdUpdate')">
<a href="#">
<i class="fa fa-cog"></i> <span>系统管理</span>
<span class="pull-right-container">
<i class="fa fa-angle-left pull-right"></i>
</span>
</a>
<ul class="treeview-menu">
<li><a href="#!/analysisLog"><i class="fa fa-circle-o"></i> 解析日志</a></li>
<li><a href="#!/packageLog"><i class="fa fa-circle-o"></i> 新包日志</a></li>
<li><a href="#!/cardProdUpdate"><i class="fa fa-circle-o"></i> 制证信息管理</a></li>
</ul>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/searchCardMsg']" ng-click="getFocus('/searchCardMsg')">
<a href="#!/searchCardMsg">
<i class="fa fa-files-o"></i>
<span>邮政快递单打印</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/uploadExcelAndSearch']" ng-click="getFocus('/uploadExcelAndSearch')">
<a href="#!/uploadExcelAndSearch">
<i class="fa fa-table"></i>
<span>邮政信息查询</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/createTaskList']" ng-click="getFocus('/createTaskList')">
<a href="#!/createTaskList">
<i class="fa fa-dashboard"></i>
<span>任务单创建</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/dispatchTask']" ng-click="getFocus('/dispatchTask')">
<a href="#!/dispatchTask">
<i class="fa fa-dashboard"></i>
<span>任务单下发</span>
</a>
</li>
<li ng-repeat="menu in menuList" ng-class="{true: 'active', false: ''}[tab =='{{menu.url}}']" ng-click="getFocus('{{menu.url}}')">
<li ng-class="{true: 'active', false: ''}[tab =='/taskListPrint']" ng-click="getFocus('/taskListPrint')"> <a href="#!{{menu.url}}">
<a href="#!/taskListPrint"> <i class="fa fa-file-code-o"></i>
<i class="fa fa-dashboard"></i> <span ng-bind="menu.name"></span>
<span>膜打印任务单</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/taskListPreLocating']" ng-click="getFocus('/taskListPreLocating')">
<a href="#!/taskListPreLocating">
<i class="fa fa-dashboard"></i>
<span>预定位任务单</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/taskListQualityCheck']" ng-click="getFocus('/taskListQualityCheck')">
<a href="#!/taskListQualityCheck">
<i class="fa fa-dashboard"></i>
<span>质检任务单</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/taskListSorting']" ng-click="getFocus('/taskListSorting')">
<a href="#!/taskListSorting">
<i class="fa fa-dashboard"></i>
<span>分拣任务单</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/tagPrint']" ng-click="getFocus('/tagPrint')">
<a href="#!/tagPrint">
<i class="fa fa-dashboard"></i>
<span>打印封条</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/receitp']" ng-click="getFocus('/receitp')">
<a href="#!/receitp">
<i class="fa fa-file-text-o"></i>
<span>交接单</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/addFailed']" ng-click="getFocus('/addFailed')">
<a href="#!/addFailed">
<i class="fa fa-plus"></i>
<span>添加废证</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/addRest']" ng-click="getFocus('/addRest')">
<a href="#!/addRest">
<i class="fa fa-plus"></i>
<span>添加余证</span>
</a>
</li>
<li ng-class="{true: 'active', false: ''}[tab =='/historyBack']" ng-click="getFocus('/historyBack')">
<a href="#!/historyBack">
<i class="fa fa-plus"></i>
<span>历史回迁证</span>
</a> </a>
</li> </li>
<li> <li>
......
...@@ -24,9 +24,9 @@ angular.module('AvatarCheck', [ ...@@ -24,9 +24,9 @@ angular.module('AvatarCheck', [
'AvatarCheck.packageLog', 'AvatarCheck.packageLog',
'AvatarCheck.tagPrint', 'AvatarCheck.tagPrint',
'tm.pagination' 'tm.pagination'
]).config(['$locationProvider', '$routeProvider', 'localStorageServiceProvider', '$qProvider', function ($locationProvider, $routeProvider, localStorageServiceProvider, $qProvider) { ]).config(['$locationProvider', '$routeProvider', 'localStorageServiceProvider', '$qProvider',function ($locationProvider, $routeProvider, localStorageServiceProvider, $qProvider) {
$locationProvider.hashPrefix('!'); $locationProvider.hashPrefix('!');
$routeProvider.otherwise({redirectTo: '/xmlAndSearch'}); $routeProvider.otherwise({redirectTo: '/createTaskList'});
localStorageServiceProvider.setPrefix('AvatarCheck') localStorageServiceProvider.setPrefix('AvatarCheck')
$qProvider.errorOnUnhandledRejections(false) $qProvider.errorOnUnhandledRejections(false)
}]) }])
...@@ -37,15 +37,21 @@ angular.module('AvatarCheck', [ ...@@ -37,15 +37,21 @@ angular.module('AvatarCheck', [
$rootScope.loginData = localStorageService.get('loginData') $rootScope.loginData = localStorageService.get('loginData')
if($rootScope.loginData == null){ if($rootScope.loginData == null){
$rootScope.loginData = {userid:'用户未登录', login:false}; $rootScope.loginData = {userid:'用户未登录', login:false};
} }
if($rootScope.loginData.login == false){ if($rootScope.loginData.login == false){
$location.path("/login"); $location.path("/login");
} }
if($rootScope.loginData.login == true){
$rootScope.menuList = $rootScope.loginData.roleList[0].permissions;
console.log($scope.menuList)
}
$rootScope.tab = '/xmlAndSearch';
if ($location.path() == "/excelAndSearch") { if ($location.path() == "/excelAndSearch") {
$rootScope.tab = '/excelAndSearch'; $rootScope.tab = '/excelAndSearch';
} }
...@@ -118,7 +124,6 @@ angular.module('AvatarCheck', [ ...@@ -118,7 +124,6 @@ angular.module('AvatarCheck', [
} }
console.log($rootScope.tab) console.log($rootScope.tab)
$scope.getFocus = function (index) { $scope.getFocus = function (index) {
if(index=='/tagPrint'){ if(index=='/tagPrint'){
......
...@@ -24,19 +24,19 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -24,19 +24,19 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm
$('#datepicker1').datetimepicker({ $('#datepicker1').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒 minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN', language: 'zh-CN',
format: 'yyyy-mm-dd', format: 'yyyyMMdd',
todayBtn: 1, todayBtn: 1,
autoclose: 1 autoclose: 1
}); });
$('#datepicker2').datetimepicker({ $('#datepicker2').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒 minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN', language: 'zh-CN',
format: 'yyyy-mm-dd', format: 'yyyyMMdd',
todayBtn: 1, todayBtn: 1,
autoclose: 1 autoclose: 1
}); });
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd"); $scope.choseDate = $filter("date")(new Date(), "yyyyMMdd");
$scope.paginationConf = { $scope.paginationConf = {
currentPage: 1, currentPage: 1,
...@@ -46,6 +46,7 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -46,6 +46,7 @@ angular.module('AvatarCheck.excelAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.paginationConf.totalItems = 50; $scope.paginationConf.totalItems = 50;
$scope.uploadExcel = function () { $scope.uploadExcel = function () {
console.log($("#datepicker1").val())
var fd = new FormData(); var fd = new FormData();
var files = document.querySelector('input#id_file_photo_for_check').files; var files = document.querySelector('input#id_file_photo_for_check').files;
fd.append("formStartTime",$("#datepicker1").val()); fd.append("formStartTime",$("#datepicker1").val());
......
...@@ -28,6 +28,38 @@ angular.module('AvatarCheck.login', ['ngRoute', 'AvatarCheck.http']) ...@@ -28,6 +28,38 @@ angular.module('AvatarCheck.login', ['ngRoute', 'AvatarCheck.http'])
} }
} }
var whereToGo = function(process){
switch (process){
case 1:
$location.path("/createTaskList");
$rootScope.tab = '/createTaskList';
break;
case 2:
$location.path("/taskListPrint");
$rootScope.tab = '/taskListPrint';
break;
case 3:
$location.path("/taskListPreLocating");
$rootScope.tab = '/taskListPreLocating';
break;
case 4:
$location.path("/taskListSorting");
$rootScope.tab = '/taskListSorting';
break;
case 5:
$location.path("/taskListQualityCheck");
$rootScope.tab = '/taskListQualityCheck';
break;
case 6:
$location.path("/receitp");
$rootScope.tab = '/receitp';
break;
case 7:
$location.path("/excelAndSearch");
$rootScope.tab = '/excelAndSearch';
break;
}
}
$scope.user = {}; $scope.user = {};
$scope.doLogin = function(){ $scope.doLogin = function(){
...@@ -41,7 +73,9 @@ angular.module('AvatarCheck.login', ['ngRoute', 'AvatarCheck.http']) ...@@ -41,7 +73,9 @@ angular.module('AvatarCheck.login', ['ngRoute', 'AvatarCheck.http'])
$rootScope.loginData = resp.data.user; $rootScope.loginData = resp.data.user;
$rootScope.loginData.login =true; $rootScope.loginData.login =true;
localStorageService.set('loginData', resp.data.user); localStorageService.set('loginData', resp.data.user);
$location.path('/xmlAndSearch') $rootScope.menuList = $rootScope.loginData.roleList[0].permissions;
console.log($scope.menuList)
whereToGo($rootScope.loginData.roleList[0].process)
if(userAgent.indexOf('.NET')!=-1){ if(userAgent.indexOf('.NET')!=-1){
window.location.reload(); window.location.reload();
}else{ }else{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment