提交 744cfdf0 编写于 作者: 江南一点雨

SpringBoot+Vue实现权限管理

上级 7f69b41a
target/
!.mvn/wrapper/maven-wrapper.jar
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
nbproject/private/
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
\ No newline at end of file
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.2/apache-maven-3.5.2-bin.zip
#!/bin/sh
# ----------------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Maven2 Start Up Batch script
#
# Required ENV vars:
# ------------------
# JAVA_HOME - location of a JDK home dir
#
# Optional ENV vars
# -----------------
# M2_HOME - location of maven2's installed home dir
# MAVEN_OPTS - parameters passed to the Java VM when running Maven
# e.g. to debug Maven itself, use
# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
# ----------------------------------------------------------------------------
if [ -z "$MAVEN_SKIP_RC" ] ; then
if [ -f /etc/mavenrc ] ; then
. /etc/mavenrc
fi
if [ -f "$HOME/.mavenrc" ] ; then
. "$HOME/.mavenrc"
fi
fi
# OS specific support. $var _must_ be set to either true or false.
cygwin=false;
darwin=false;
mingw=false
case "`uname`" in
CYGWIN*) cygwin=true ;;
MINGW*) mingw=true;;
Darwin*) darwin=true
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
if [ -z "$JAVA_HOME" ]; then
if [ -x "/usr/libexec/java_home" ]; then
export JAVA_HOME="`/usr/libexec/java_home`"
else
export JAVA_HOME="/Library/Java/Home"
fi
fi
;;
esac
if [ -z "$JAVA_HOME" ] ; then
if [ -r /etc/gentoo-release ] ; then
JAVA_HOME=`java-config --jre-home`
fi
fi
if [ -z "$M2_HOME" ] ; then
## resolve links - $0 may be a link to maven's home
PRG="$0"
# need this for relative symlinks
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG="`dirname "$PRG"`/$link"
fi
done
saveddir=`pwd`
M2_HOME=`dirname "$PRG"`/..
# make it fully qualified
M2_HOME=`cd "$M2_HOME" && pwd`
cd "$saveddir"
# echo Using m2 at $M2_HOME
fi
# For Cygwin, ensure paths are in UNIX format before anything is touched
if $cygwin ; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --unix "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
fi
# For Migwn, ensure paths are in UNIX format before anything is touched
if $mingw ; then
[ -n "$M2_HOME" ] &&
M2_HOME="`(cd "$M2_HOME"; pwd)`"
[ -n "$JAVA_HOME" ] &&
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
# TODO classpath?
fi
if [ -z "$JAVA_HOME" ]; then
javaExecutable="`which javac`"
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
# readlink(1) is not available as standard on Solaris 10.
readLink=`which readlink`
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
if $darwin ; then
javaHome="`dirname \"$javaExecutable\"`"
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
else
javaExecutable="`readlink -f \"$javaExecutable\"`"
fi
javaHome="`dirname \"$javaExecutable\"`"
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
JAVA_HOME="$javaHome"
export JAVA_HOME
fi
fi
fi
if [ -z "$JAVACMD" ] ; then
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
else
JAVACMD="`which java`"
fi
fi
if [ ! -x "$JAVACMD" ] ; then
echo "Error: JAVA_HOME is not defined correctly." >&2
echo " We cannot execute $JAVACMD" >&2
exit 1
fi
if [ -z "$JAVA_HOME" ] ; then
echo "Warning: JAVA_HOME environment variable is not set."
fi
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
# traverses directory structure from process work directory to filesystem root
# first directory with .mvn subdirectory is considered project base directory
find_maven_basedir() {
if [ -z "$1" ]
then
echo "Path not specified to find_maven_basedir"
return 1
fi
basedir="$1"
wdir="$1"
while [ "$wdir" != '/' ] ; do
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
if [ -d "${wdir}" ]; then
wdir=`cd "$wdir/.."; pwd`
fi
# end of workaround
done
echo "${basedir}"
}
# concatenates all lines of a file
concat_lines() {
if [ -f "$1" ]; then
echo "$(tr -s '\n' ' ' < "$1")"
fi
}
BASE_DIR=`find_maven_basedir "$(pwd)"`
if [ -z "$BASE_DIR" ]; then
exit 1;
fi
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
echo $MAVEN_PROJECTBASEDIR
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
[ -n "$M2_HOME" ] &&
M2_HOME=`cygpath --path --windows "$M2_HOME"`
[ -n "$JAVA_HOME" ] &&
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
[ -n "$CLASSPATH" ] &&
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
fi
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------
@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre
@setlocal
set ERROR_CODE=0
@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal
@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome
echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init
echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error
@REM ==== END VALIDATION ====
:init
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir
:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir
:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"
:endDetectBaseDir
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
:endReadAdditionalConfig
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
if ERRORLEVEL 1 goto error
goto end
:error
set ERROR_CODE=1
:end
@endlocal & set ERROR_CODE=%ERROR_CODE%
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
exit /B %ERROR_CODE%
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.sang</groupId>
<artifactId>hrserver</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>hrserver</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.9.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.29</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
</resource>
</resources>
</build>
</project>
package org.sang;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class HrserverApplication {
public static void main(String[] args) {
SpringApplication.run(HrserverApplication.class, args);
}
}
package org.sang.bean;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* Created by sang on 2017/12/28.
*/
public class Hr implements UserDetails {
private Long id;
private String name;
private String phone;
private String telephone;
private String address;
private boolean enabled;
private String username;
private String password;
private String remark;
private List<Role> roles;
private String userface;
public String getUserface() {
return userface;
}
public void setUserface(String userface) {
this.userface = userface;
}
public List<Role> getRoles() {
return roles;
}
public void setRoles(List<Role> roles) {
this.roles = roles;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
@Override
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
public String getUsername() {
return username;
}
@JsonIgnore
@Override
public boolean isAccountNonExpired() {
return true;
}
@JsonIgnore
@Override
public boolean isAccountNonLocked() {
return true;
}
@JsonIgnore
@Override
public boolean isCredentialsNonExpired() {
return true;
}
public void setUsername(String username) {
this.username = username;
}
@JsonIgnore
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
List<GrantedAuthority> authorities = new ArrayList<>();
for (Role role : roles) {
authorities.add(new SimpleGrantedAuthority(role.getName()));
}
return authorities;
}
@JsonIgnore
@Override
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
}
\ No newline at end of file
package org.sang.bean;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.List;
/**
* Created by sang on 2017/12/28.
*/
public class Menu {
private Long id;
private String url;
private String path;
private Object component;
private String name;
private String iconCls;
private Long parentId;
private List<Role> roles;
private List<Menu> children;
private MenuMeta meta;
public MenuMeta getMeta() {
return meta;
}
public void setMeta(MenuMeta meta) {
this.meta = meta;
}
public List<Menu> getChildren() {
return children;
}
public void setChildren(List<Menu> children) {
this.children = children;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
@JsonIgnore
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getPath() {
return path;
}
public void setPath(String path) {
this.path = path;
}
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public Object getComponent() {
return component;
}
public void setComponent(Object component) {
this.component = component;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIconCls() {
return iconCls;
}
public void setIconCls(String iconCls) {
this.iconCls = iconCls;
}
@JsonIgnore
public Long getParentId() {
return parentId;
}
public void setParentId(Long parentId) {
this.parentId = parentId;
}
@JsonIgnore
public List<Role> getRoles() {
return roles;
}
public void setRoles(List<Role> roles) {
this.roles = roles;
}
}
package org.sang.bean;
/**
* Created by sang on 2017/12/30.
*/
public class MenuMeta {
private boolean keepAlive;
private boolean requireAuth;
public boolean isKeepAlive() {
return keepAlive;
}
public void setKeepAlive(boolean keepAlive) {
this.keepAlive = keepAlive;
}
public boolean isRequireAuth() {
return requireAuth;
}
public void setRequireAuth(boolean requireAuth) {
this.requireAuth = requireAuth;
}
}
package org.sang.bean;
/**
* Created by sang on 2017/12/29.
*/
public class RespBean {
private String status;
private String msg;
public RespBean() {
}
public RespBean(String status, String msg) {
this.status = status;
this.msg = msg;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
}
package org.sang.bean;
/**
* Created by sang on 2017/12/28.
*/
public class Role {
private Long id;
private String name;
private String nameZh;
public String getNameZh() {
return nameZh;
}
public void setNameZh(String nameZh) {
this.nameZh = nameZh;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
package org.sang.common;
import org.sang.bean.Hr;
import org.springframework.security.core.context.SecurityContextHolder;
/**
* Created by sang on 2017/12/30.
*/
public class HrUtils {
public static Hr getCurrentHr() {
return (Hr) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
}
}
package org.sang.config;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.stereotype.Component;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
/**
* Created by sang on 2017/12/29.
*/
@Component
public class AuthenticationAccessDeniedHandler implements AccessDeniedHandler {
@Override
public void handle(HttpServletRequest httpServletRequest, HttpServletResponse resp, AccessDeniedException e) throws IOException, ServletException {
resp.setStatus(HttpServletResponse.SC_FORBIDDEN);
resp.setContentType("application/json;charset=UTF-8");
PrintWriter out = resp.getWriter();
out.write("{\"status\":\"error\",\"msg\":\"权限不足,请联系管理员!\"}");
out.flush();
out.close();
}
}
package org.sang.config;
import org.springframework.security.access.AccessDecisionManager;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.authentication.AnonymousAuthenticationToken;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.stereotype.Component;
import java.util.Collection;
import java.util.Iterator;
/**
* Created by sang on 2017/12/28.
*/
@Component
public class UrlAccessDecisionManager implements AccessDecisionManager {
@Override
public void decide(Authentication authentication, Object o, Collection<ConfigAttribute> collection) throws AccessDeniedException, AuthenticationException {
Iterator<ConfigAttribute> iterator = collection.iterator();
while (iterator.hasNext()) {
ConfigAttribute ca = iterator.next();
//当前请求需要的权限
String needRole = ca.getAttribute();
if ("ROLE_LOGIN".equals(needRole)) {
if (authentication instanceof AnonymousAuthenticationToken) {
throw new BadCredentialsException("未登录");
} else
return;
}
//当前用户所具有的权限
Collection<? extends GrantedAuthority> authorities = authentication.getAuthorities();
for (GrantedAuthority authority : authorities) {
if (authority.getAuthority().equals(needRole)) {
return;
}
}
}
throw new AccessDeniedException("权限不足!");
}
@Override
public boolean supports(ConfigAttribute configAttribute) {
return true;
}
@Override
public boolean supports(Class<?> aClass) {
return true;
}
}
\ No newline at end of file
package org.sang.config;
import org.sang.bean.Menu;
import org.sang.bean.Role;
import org.sang.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.ConfigAttribute;
import org.springframework.security.access.SecurityConfig;
import org.springframework.security.web.FilterInvocation;
import org.springframework.security.web.access.intercept.FilterInvocationSecurityMetadataSource;
import org.springframework.stereotype.Component;
import org.springframework.util.AntPathMatcher;
import java.util.Collection;
import java.util.List;
/**
* Created by sang on 2017/12/28.
*/
@Component
public class UrlFilterInvocationSecurityMetadataSource implements FilterInvocationSecurityMetadataSource {
@Autowired
MenuService menuService;
AntPathMatcher antPathMatcher = new AntPathMatcher();
@Override
public Collection<ConfigAttribute> getAttributes(Object o) throws IllegalArgumentException {
//获取请求地址
String requestUrl = ((FilterInvocation) o).getRequestUrl();
if ("/login_p".equals(requestUrl)) {
return null;
}
List<Menu> allMenu = menuService.getAllMenu();
for (Menu menu : allMenu) {
if (antPathMatcher.match(menu.getUrl(), requestUrl)&&menu.getRoles().size()>0) {
List<Role> roles = menu.getRoles();
int size = roles.size();
String[] values = new String[size];
for (int i = 0; i < size; i++) {
values[i] = roles.get(i).getName();
}
return SecurityConfig.createList(values);
}
}
//没有匹配上的资源,都是登录访问
return SecurityConfig.createList("ROLE_LOGIN");
}
@Override
public Collection<ConfigAttribute> getAllConfigAttributes() {
return null;
}
@Override
public boolean supports(Class<?> aClass) {
return FilterInvocation.class.isAssignableFrom(aClass);
}
}
package org.sang.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
* Created by sang on 2018/1/2.
*/
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
// @Bean
// public CustomExceptionResolver customExceptionResolver() {
// return new CustomExceptionResolver();
// }
}
package org.sang.config;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.sang.common.HrUtils;
import org.sang.service.HrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.BadCredentialsException;
import org.springframework.security.authentication.DisabledException;
import org.springframework.security.config.annotation.ObjectPostProcessor;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.web.access.intercept.FilterSecurityInterceptor;
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
/**
* Created by sang on 2017/12/28.
*/
@Configuration
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
HrService hrService;
@Autowired
UrlFilterInvocationSecurityMetadataSource urlFilterInvocationSecurityMetadataSource;
@Autowired
UrlAccessDecisionManager urlAccessDecisionManager;
@Autowired
AuthenticationAccessDeniedHandler authenticationAccessDeniedHandler;
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.userDetailsService(hrService).passwordEncoder(new BCryptPasswordEncoder());
}
@Override
public void configure(WebSecurity web) throws Exception {
web.ignoring().antMatchers("/index.html", "/static/**");
}
@Override
protected void configure(HttpSecurity http) throws Exception {
http.authorizeRequests()
.withObjectPostProcessor(new ObjectPostProcessor<FilterSecurityInterceptor>() {
@Override
public <O extends FilterSecurityInterceptor> O postProcess(O o) {
o.setSecurityMetadataSource(urlFilterInvocationSecurityMetadataSource);
o.setAccessDecisionManager(urlAccessDecisionManager);
return o;
}
}).and().formLogin().loginPage("/login_p").loginProcessingUrl("/login").usernameParameter("username").passwordParameter("password").permitAll().failureHandler(new AuthenticationFailureHandler() {
@Override
public void onAuthenticationFailure(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException {
httpServletResponse.setContentType("application/json;charset=utf-8");
PrintWriter out = httpServletResponse.getWriter();
StringBuffer sb = new StringBuffer();
sb.append("{\"status\":\"error\",\"msg\":\"");
if (e instanceof UsernameNotFoundException || e instanceof BadCredentialsException) {
sb.append("用户名或密码输入错误,登录失败!");
} else if (e instanceof DisabledException) {
sb.append("账户被禁用,登录失败,请联系管理员!");
} else {
sb.append("登录失败!");
}
sb.append("\"}");
out.write(sb.toString());
out.flush();
out.close();
}
}).successHandler(new AuthenticationSuccessHandler() {
@Override
public void onAuthenticationSuccess(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, Authentication authentication) throws IOException, ServletException {
httpServletResponse.setContentType("application/json;charset=utf-8");
PrintWriter out = httpServletResponse.getWriter();
ObjectMapper objectMapper = new ObjectMapper();
String s = "{\"status\":\"success\",\"msg\":" + objectMapper.writeValueAsString(HrUtils.getCurrentHr()) + "}";
out.write(s);
out.flush();
out.close();
}
}).and().logout().permitAll().and().csrf().disable().exceptionHandling().accessDeniedHandler(authenticationAccessDeniedHandler);
}
}
\ No newline at end of file
package org.sang.controller;
import org.sang.bean.Hr;
import org.sang.bean.Menu;
import org.sang.common.HrUtils;
import org.sang.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* 这是一个只要登录就能访问的Controller
* 主要用来获取一些配置信息
*/
@RestController
@RequestMapping("/config")
public class ConfigController {
@Autowired
MenuService menuService;
@RequestMapping("/sysmenu")
public List<Menu> sysmenu() {
return menuService.getMenusByHrId();
}
@RequestMapping("/hr")
public Hr currentUser() {
return HrUtils.getCurrentHr();
}
}
package org.sang.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Created by sang on 2017/12/29.
*/
@RestController
@RequestMapping("/employee")
public class EmployeeController {
@RequestMapping("/basic")
public String basic() {
return "basic";
}
@RequestMapping("/")
public String hello() {
return "Hello";
}
}
package org.sang.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* Created by sang on 2017/12/29.
*/
@RestController
@RequestMapping("/personnel")
public class PersonnelController {
@RequestMapping("/")
public String hello() {
return "hello";
}
@RequestMapping("/emp/hello")
public String helloEmp() {
return "hello emp";
}
}
package org.sang.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.PrintWriter;
/**
* Created by sang on 2017/12/29.
*/
@RestController
public class RegLoginController {
@RequestMapping("/login_p")
public void login(HttpServletResponse resp) throws IOException {
resp.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
resp.setContentType("application/json;charset=UTF-8");
PrintWriter out = resp.getWriter();
out.write("{\"status\":\"error\",\"msg\":\"尚未登录,请登录!\"}");
out.flush();
out.close();
// return new RespBean("error", "尚未登录,请登录!");
}
}
package org.sang.controller;
import org.sang.bean.Menu;
import org.sang.bean.RespBean;
import org.sang.bean.Role;
import org.sang.service.MenuRoleService;
import org.sang.service.MenuService;
import org.sang.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by sang on 2017/12/29.
*/
@RestController
@RequestMapping("/system/basic")
public class SystemBasicController {
@Autowired
RoleService roleService;
@Autowired
MenuService menuService;
@Autowired
MenuRoleService menuRoleService;
@RequestMapping(value = "/role/{rid}", method = RequestMethod.DELETE)
public RespBean deleteRole(@PathVariable Long rid) {
if (roleService.deleteRoleById(rid) == 1) {
return new RespBean("success", "删除成功!");
}
return new RespBean("error", "删除失败!");
}
@RequestMapping(value = "/addRole", method = RequestMethod.POST)
public RespBean addNewRole(String role, String roleZh) {
if (roleService.addNewRole(role, roleZh) == 1) {
return new RespBean("success", "添加成功!");
}
return new RespBean("error", "添加失败!");
}
@RequestMapping(value = "/menuTree/{rid}", method = RequestMethod.GET)
public Map<String, Object> menuTree(@PathVariable Long rid) {
Map<String, Object> map = new HashMap<>();
List<Menu> menus = menuService.menuTree();
map.put("menus", menus);
List<Long> selMids = menuService.getMenusByRid(rid);
map.put("mids", selMids);
return map;
}
@RequestMapping(value = "/updateMenuRole", method = RequestMethod.PUT)
public RespBean updateMenuRole(Long rid, Long[] mids) {
if (menuRoleService.updateMenuRole(rid, mids) == mids.length) {
return new RespBean("success", "更新成功!");
}
return new RespBean("error", "更新失败!");
}
@RequestMapping("/roles")
public List<Role> allRoles() {
return roleService.roles();
}
}
package org.sang.controller;
import org.sang.bean.Hr;
import org.sang.bean.RespBean;
import org.sang.service.HrService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* Created by sang on 2018/1/2.
*/
@RestController
@RequestMapping("/system/hr")
public class SystemHrController {
@Autowired
HrService hrService;
@RequestMapping("/id/{hrId}")
public Hr getHrById(@PathVariable Long hrId) {
return hrService.getHrById(hrId);
}
@RequestMapping(value = "/{hrId}", method = RequestMethod.DELETE)
public RespBean deleteHr(@PathVariable Long hrId) {
if (hrService.deleteHr(hrId) == 1) {
return new RespBean("success", "删除成功!");
}
return new RespBean("error", "删除失败!");
}
@RequestMapping(value = "/", method = RequestMethod.PUT)
public RespBean updateHr(Hr hr) {
if (hrService.updateHr(hr) == 1) {
return new RespBean("success", "更新成功!");
}
return new RespBean("error", "更新失败!");
}
@RequestMapping(value = "/roles", method = RequestMethod.PUT)
public RespBean updateHrRoles(Long hrId, Long[] rids) {
if (hrService.updateHrRoles(hrId, rids) == rids.length) {
return new RespBean("success", "更新成功!");
}
return new RespBean("error", "更新失败!");
}
@RequestMapping("/{keywords}")
public List<Hr> getHrsByKeywords(@PathVariable(required = false) String keywords) {
List<Hr> hrs = hrService.getHrsByKeywords(keywords);
return hrs;
}
@RequestMapping(value = "/hr/reg", method = RequestMethod.POST)
public RespBean hrReg(String username, String password) {
int i = hrService.hrReg(username, password);
if (i == 1) {
return new RespBean("success", "注册成功!");
} else if (i == -1) {
return new RespBean("error", "用户名重复,注册失败!");
}
return new RespBean("error", "注册失败!");
}
}
package org.sang.exception;
import org.springframework.dao.DataIntegrityViolationException;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.view.json.MappingJackson2JsonView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
/**
* Created by sang on 2018/1/2.
*/
@Component
public class CustomExceptionResolver implements HandlerExceptionResolver {
@Override
public ModelAndView resolveException(HttpServletRequest httpServletRequest, HttpServletResponse response, Object o, Exception e) {
ModelAndView mv = new ModelAndView(new MappingJackson2JsonView());
Map<String, String> map = new HashMap<>();
map.put("status", "error");
if (e instanceof DataIntegrityViolationException) {
map.put("msg", "该角色尚有关联的资源或用户,删除失败!");
}else{
map.put("msg", "操作失败!");
}
mv.addAllObjects(map);
return mv;
}
}
package org.sang.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.sang.bean.Hr;
import org.sang.bean.Role;
import java.util.List;
/**
* Created by sang on 2017/12/28.
*/
@Mapper
public interface HrMapper {
Hr loadUserByUsername(String username);
List<Role> getRolesByHrId(Long id);
int hrReg(@Param("username") String username, @Param("password") String password);
List<Hr> getHrsByKeywords(@Param("keywords") String keywords);
int updateHr(Hr hr);
int deleteRoleByHrId(Long hrId);
int addRolesForHr(@Param("hrId") Long hrId, @Param("rids") Long[] rids);
Hr getHrById(Long hrId);
int deleteHr(Long hrId);
}
<?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.sang.mapper.HrMapper">
<resultMap id="BaseResultMap" type="org.sang.bean.Hr">
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="phone" property="phone"/>
<result column="telephone" property="telephone"/>
<result column="address" property="address"/>
<result column="enabled" property="enabled"/>
<result column="username" property="username"/>
<result column="password" property="password"/>
<result column="userface" property="userface"/>
<result column="remark" property="remark"/>
</resultMap>
<resultMap id="lazyLoadRoles" type="org.sang.bean.Hr" extends="BaseResultMap">
<collection property="roles" ofType="org.sang.bean.Role" select="org.sang.mapper.HrMapper.getRolesByHrId"
column="id"></collection>
</resultMap>
<resultMap id="eagerLoadRoles" type="org.sang.bean.Hr" extends="BaseResultMap">
<collection property="roles" ofType="org.sang.bean.Role">
<id property="id" column="rid"/>
<result property="name" column="rname"/>
<result property="nameZh" column="rnameZh"/>
</collection>
</resultMap>
<select id="loadUserByUsername" resultMap="lazyLoadRoles">
select * from hr WHERE username=#{username};
</select>
<select id="getRolesByHrId" resultType="org.sang.bean.Role">
SELECT r.* FROM hr_role h,role r where h.rid=r.id AND h.hrid=#{id}
</select>
<insert id="hrReg">
INSERT INTO hr set username=#{username},password=#{password}
</insert>
<select id="getHrsByKeywords" resultMap="eagerLoadRoles">
select h.*,`r`.`id` AS `rid`,`r`.`name` AS `rname`,`r`.`nameZh` AS `rnameZh` from ((`hr` `h` left join `hr_role`
`h_r` on ((`h`.`id` = `h_r`.`hrid`))) left join `role` `r` on ((`h_r`.`rid` = `r`.`id`))) where h.`id` not
in(select h_r.`hrid` from hr_role h_r,role r where h_r.`rid`=r.`id` and r.`nameZh`='系统管理员')
<if test="keywords!='all' and keywords!=''">
and h.`name` like concat('%',#{keywords},'%')
</if>
order by h.`id` limit 10
</select>
<select id="getHrById" resultMap="eagerLoadRoles">
select h.*,`r`.`id` AS `rid`,`r`.`name` AS `rname`,`r`.`nameZh` AS `rnameZh` from ((`hr` `h` left join `hr_role`
`h_r` on ((`h`.`id` = `h_r`.`hrid`))) left join `role` `r` on ((`h_r`.`rid` = `r`.`id`))) where h.`id`=#{hrId}
</select>
<update id="updateHr" parameterType="org.sang.bean.Hr">
update hr
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=CHAR},
</if>
<if test="telephone != null">
telephone = #{telephone,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="enabled != null">
enabled = #{enabled,jdbcType=BIT},
</if>
<if test="username != null">
username = #{username,jdbcType=VARCHAR},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="userface != null">
userface = #{userface,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id}
</update>
<delete id="deleteRoleByHrId" parameterType="Long">
DELETE FROM hr_role where hrid=#{hrId}
</delete>
<insert id="addRolesForHr">
INSERT INTO hr_role(hrid,rid) VALUES
<foreach collection="rids" separator="," item="rid">
(#{hrId},#{rid})
</foreach>
</insert>
<delete id="deleteHr" parameterType="Long">
DELETE FROM hr WHERE id=#{hrId}
</delete>
</mapper>
\ No newline at end of file
package org.sang.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.sang.bean.Menu;
import java.util.List;
/**
* Created by sang on 2017/12/28.
*/
@Mapper
public interface MenuMapper {
List<Menu> getAllMenu();
List<Menu> getMenusByHrId(Long hrId);
List<Menu> menuTree();
List<Long> getMenusByRid(Long rid);
}
<?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.sang.mapper.MenuMapper">
<resultMap id="BaseResultMap" type="org.sang.bean.Menu">
<id column="id" property="id" jdbcType="INTEGER"/>
<result column="url" property="url" jdbcType="VARCHAR"/>
<result column="path" property="path" jdbcType="VARCHAR"/>
<result column="component" property="component" javaType="java.lang.Object"/>
<result column="name" property="name" jdbcType="VARCHAR"/>
<result column="iconCls" property="iconCls" jdbcType="VARCHAR"/>
<result column="keepAlive" property="keepAlive" jdbcType="BIT"/>
<result column="parentId" property="parentId" jdbcType="INTEGER"/>
<association property="meta" javaType="org.sang.bean.MenuMeta">
<result column="keepAlive" property="keepAlive"/>
<result column="requireAuth" property="requireAuth"/>
</association>
<collection property="roles" ofType="org.sang.bean.Role">
<id column="rid" property="id"/>
<result column="rname" property="name"/>
<result column="rnamezh" property="nameZh"/>
</collection>
<collection property="children" ofType="org.sang.bean.Menu">
<id column="id2" property="id"/>
<result column="path2" property="path" jdbcType="VARCHAR"/>
<result column="component2" property="component" jdbcType="VARCHAR"/>
<result column="name2" property="name" jdbcType="VARCHAR"/>
<result column="iconCls2" property="iconCls" jdbcType="VARCHAR"/>
<association property="meta" javaType="org.sang.bean.MenuMeta">
<result column="keepAlive2" property="keepAlive"/>
<result column="requireAuth2" property="requireAuth"/>
</association>
<collection property="children" ofType="org.sang.bean.Menu">
<id column="id3" property="id"/>
<result column="name3" property="name" jdbcType="VARCHAR"/>
</collection>
</collection>
</resultMap>
<select id="getAllMenu" resultMap="BaseResultMap">
select m.*,r.`id` as rid,r.`name` as rname,r.`nameZh` as rnamezh from menu m left join menu_role mr on m.`id`=mr.`mid` left join role r on mr.`rid`=r.`id` order by m.`id` desc
</select>
<select id="getMenusByHrId" parameterType="Long" resultMap="BaseResultMap">
select m1.`id`,m1.`path`,m1.`component`,m1.`iconCls`,m1.`name`,m1.`requireAuth`,m2.`component` as component2,m2.`iconCls` as iconCls2,m2.`keepAlive` as keepAlive2,m2.`name` as name2,m2.`path` as path2,m2.`requireAuth` as requireAuth2 from menu m1,menu m2 where m1.`id`=m2.`parentId` and m1.`id`!=1 and m2.`id` in(select mr.`mid` from hr_role h_r,menu_role mr where h_r.`rid`=mr.`rid` and h_r.`hrid`=#{hrId}) order by m1.`id`,m2.`id`
</select>
<select id="menuTree" resultMap="BaseResultMap">
select m1.`id`,m1.`name`,m2.`id` as id2,m2.`name` as name2,m3.`id` as id3,m3.`name` as name3 from menu m1,menu m2,menu m3 where m1.`id`=m2.`parentId` and m2.`id`=m3.`parentId`
</select>
<select id="getMenusByRid" resultType="Long">
SELECT mid from menu_role WHERE rid=#{rid}
</select>
</mapper>
\ No newline at end of file
package org.sang.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* Created by sang on 2018/1/2.
*/
@Mapper
public interface MenuRoleMapper {
int deleteMenuByRid(@Param("rid") Long rid);
int addMenu(@Param("rid") Long rid, @Param("mids") Long[] mids);
}
<?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.sang.mapper.MenuRoleMapper">
<delete id="deleteMenuByRid" parameterType="long">
DELETE FROM menu_role WHERE rid=#{rid}
</delete>
<insert id="addMenu">
INSERT INTO menu_role(mid,rid) VALUES
<foreach collection="mids" item="mid" separator=",">
(#{mid},#{rid})
</foreach>
</insert>
</mapper>
\ No newline at end of file
package org.sang.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.sang.bean.Role;
import java.util.List;
/**
* Created by sang on 2018/1/1.
*/
@Mapper
public interface RoleMapper {
List<Role> roles();
int addNewRole(@Param("role") String role, @Param("roleZh") String roleZh);
int deleteRoleById(Long rid);
}
<?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.sang.mapper.RoleMapper">
<select id="roles" resultType="org.sang.bean.Role">
SELECT * FROM role where id!=6;
</select>
<insert id="addNewRole">
INSERT INTO role set name=#{role},nameZh=#{roleZh}
</insert>
<delete id="deleteRoleById" parameterType="Long">
DELETE FROM role WHERE id=#{rid}
</delete>
</mapper>
\ No newline at end of file
package org.sang.mapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* Created by sang on 2017/12/29.
*/
@Mapper
public interface SystemMapper {
}
package org.sang.service;
import org.sang.bean.Hr;
import org.sang.mapper.HrMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* Created by sang on 2017/12/28.
*/
@Service
@Transactional
public class HrService implements UserDetailsService {
@Autowired
HrMapper hrMapper;
@Override
public UserDetails loadUserByUsername(String s) throws UsernameNotFoundException {
Hr hr = hrMapper.loadUserByUsername(s);
if (hr == null) {
throw new UsernameNotFoundException("用户名不对");
}
return hr;
}
public int hrReg(String username, String password) {
//如果用户名存在,返回错误
if (hrMapper.loadUserByUsername(username) != null) {
return -1;
}
BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
String encode = encoder.encode(password);
return hrMapper.hrReg(username, encode);
}
public List<Hr> getHrsByKeywords(String keywords) {
return hrMapper.getHrsByKeywords(keywords);
}
public int updateHr(Hr hr) {
return hrMapper.updateHr(hr);
}
public int updateHrRoles(Long hrId, Long[] rids) {
int i = hrMapper.deleteRoleByHrId(hrId);
return hrMapper.addRolesForHr(hrId, rids);
}
public Hr getHrById(Long hrId) {
return hrMapper.getHrById(hrId);
}
public int deleteHr(Long hrId) {
return hrMapper.deleteHr(hrId);
}
}
package org.sang.service;
import org.apache.ibatis.annotations.Param;
import org.sang.mapper.MenuRoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* Created by sang on 2018/1/2.
*/
@Service
@Transactional
public class MenuRoleService {
@Autowired
MenuRoleMapper menuRoleMapper;
public int updateMenuRole(Long rid, Long[] mids) {
menuRoleMapper.deleteMenuByRid(rid);
if (mids.length == 0) {
return 0;
}
return menuRoleMapper.addMenu(rid, mids);
}
}
package org.sang.service;
import org.sang.bean.Menu;
import org.sang.common.HrUtils;
import org.sang.mapper.MenuMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* Created by sang on 2017/12/28.
*/
@Service
@Transactional
public class MenuService {
@Autowired
MenuMapper menuMapper;
public List<Menu> getAllMenu(){
return menuMapper.getAllMenu();
}
public List<Menu> getMenusByHrId() {
return menuMapper.getMenusByHrId(HrUtils.getCurrentHr().getId());
}
public List<Menu> menuTree() {
return menuMapper.menuTree();
}
public List<Long> getMenusByRid(Long rid) {
return menuMapper.getMenusByRid(rid);
}
}
package org.sang.service;
import org.sang.bean.Role;
import org.sang.mapper.RoleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* Created by sang on 2018/1/1.
*/
@Service
@Transactional
public class RoleService {
@Autowired
RoleMapper roleMapper;
public List<Role> roles() {
return roleMapper.roles();
}
public int addNewRole(String role, String roleZh) {
if (!role.startsWith("ROLE_")) {
role = "ROLE_" + role;
}
return roleMapper.addNewRole(role, roleZh);
}
public int deleteRoleById(Long rid) {
return roleMapper.deleteRoleById(rid);
}
}
package org.sang.service;
import org.sang.mapper.SystemMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* Created by sang on 2017/12/29.
*/
@Service
@Transactional
public class SystemService {
@Autowired
SystemMapper systemMapper;
}
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/vhr?useUnicode=true&characterEncoding=UTF-8
spring.datasource.username=guest
spring.datasource.password=guest
mybatis.config-location=classpath:/mybatis-config.xml
server.port=8082
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting name="logImpl" value="STDOUT_LOGGING" />
</settings>
</configuration>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>微人事</title><link href=/static/css/app.fec469afe22b3b0945a10fd85f086c68.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.89248ccd3135d8ab6974.js></script><script type=text/javascript src=/static/js/vendor.59f7a0d2e440c37c0dac.js></script><script type=text/javascript src=/static/js/app.6fbbafe4595d1e44d075.js></script></body></html>
\ No newline at end of file
webpackJsonp([0],{"+sH/":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("基本资料")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},"2eoi":function(e,t,n){var s={"./Home.vue":"lO7g","./Login.vue":"xJsL","./emp/EmpAdv.vue":"ABUp","./emp/EmpBasic.vue":"+sH/","./personnel/PerEc.vue":"GZY3","./personnel/PerEmp.vue":"XGB5","./personnel/PerMv.vue":"F1RE","./personnel/PerSalary.vue":"nSLl","./personnel/PerTrain.vue":"K5YU","./salary/SalMonth.vue":"R27X","./salary/SalSearch.vue":"mNON","./salary/SalSob.vue":"VnTu","./salary/SalSobCfg.vue":"YbFX","./salary/SalTable.vue":"tQt2","./statistics/StaAll.vue":"4/RD","./statistics/StaPers.vue":"97Ts","./statistics/StaRecord.vue":"Tlrr","./statistics/StaScore.vue":"r3HF","./system/MenuRole.vue":"Bg5L","./system/SysBasic.vue":"fc7a","./system/SysCfg.vue":"ubks","./system/SysData.vue":"UK/j","./system/SysHr.vue":"ewEk","./system/SysInit.vue":"agXO","./system/SysLog.vue":"ZDkW"};function l(e){return n(i(e))}function i(e){var t=s[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}l.keys=function(){return Object.keys(s)},l.resolve=i,e.exports=l,l.id="2eoi"},"4/RD":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 综合信息统计\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},"97Ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 人事信息统计\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},ABUp:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("高级资料")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},Bg5L:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=n("oAV5"),l={mounted:function(){this.loading=!0,this.initRoles()},methods:{deleteRole:function(e,t){var n=this;this.$confirm("删除角色["+t+"], 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){n.loading=!0,n.deleteRequest("/system/basic/role/"+e).then(function(e){if(e&&200==e.status){var t=e.data;n.$message({type:t.status,message:t.msg}),n.initRoles()}else n.loading=!1})}).catch(function(){n.$message({type:"info",message:"已取消删除"})})},addNewRole:function(){if(Object(s.b)(this.newRole,this.newRoleZh)){this.loading=!0;var e=this;this.postRequest("/system/basic/addRole",{role:this.newRole,roleZh:this.newRoleZh}).then(function(t){if(t&&200==t.status){var n=t.data;e.$message({type:n.status,message:n.msg}),e.initRoles(),e.newRole="",e.newRoleZh=""}else e.loading=!1})}},updateRoleMenu:function(e){var t=this.$refs.tree[e].getCheckedKeys(!0),n=this;this.putRequest("/system/basic/updateMenuRole",{rid:this.activeColItem,mids:t}).then(function(e){if(e&&200==e.status){var t=e.data;n.$message({type:t.status,message:t.msg}),n.activeColItem=-1}})},collapseChange:function(e){if(""!=e){var t=this;this.getRequest("/system/basic/menuTree/"+e).then(function(e){if(e&&200==e.status){var n=e.data;t.treeData=n.menus,t.checkedKeys=n.mids}})}},handleCheckChange:function(e,t,n){},initRoles:function(){var e=this;this.getRequest("/system/basic/roles").then(function(t){e.loading=!1,t&&200==t.status&&(e.roles=t.data,e.activeColItem=-1)})},cancelUpdateRoleMenu:function(){this.activeColItem=-1}},data:function(){return{props:{label:"name",children:"children"},newRole:"",newRoleZh:"",roles:[],treeData:[],checkedKeys:[],loading:!1,activeColItem:-1}}},i={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{"text-align":"left"}},[n("el-input",{staticStyle:{width:"250px"},attrs:{placeholder:"请输入角色英文名称...",size:"mini"},model:{value:e.newRole,callback:function(t){e.newRole=t},expression:"newRole"}},[n("template",{slot:"prepend"},[e._v("ROLE_")])],2),e._v(" "),n("el-input",{staticStyle:{width:"250px"},attrs:{placeholder:"请输入角色中文名称...",size:"mini"},model:{value:e.newRoleZh,callback:function(t){e.newRoleZh=t},expression:"newRoleZh"}}),e._v(" "),n("el-button",{staticStyle:{"margin-left":"5px"},attrs:{type:"primary",size:"mini"},on:{click:e.addNewRole}},[e._v("添加角色")])],1),e._v(" "),n("div",{staticStyle:{"margin-top":"10px","text-align":"left"}},[n("el-collapse",{staticStyle:{width:"500px"},attrs:{accordion:""},on:{change:e.collapseChange},model:{value:e.activeColItem,callback:function(t){e.activeColItem=t},expression:"activeColItem"}},e._l(e.roles,function(t,s){return n("el-collapse-item",{key:t.name,attrs:{title:t.nameZh,name:t.id}},[n("el-card",{staticClass:"box-card"},[n("div",{attrs:{slot:"header"},slot:"header"},[n("span",[e._v("可访问的资源")]),e._v(" "),n("el-button",{staticStyle:{color:"#f6061b",margin:"0px",float:"right",padding:"3px 0",width:"15px",height:"15px"},attrs:{type:"text",icon:"el-icon-delete"},on:{click:function(n){e.deleteRole(t.id,t.nameZh)}}})],1),e._v(" "),n("div",[n("el-tree",{key:t.id,ref:"tree",refInFor:!0,attrs:{props:e.props,data:e.treeData,"default-checked-keys":e.checkedKeys,"node-key":"id","show-checkbox":"","highlight-current":""},on:{"check-change":e.handleCheckChange}})],1),e._v(" "),n("div",{staticStyle:{display:"flex","justify-content":"flex-end","margin-right":"10px"}},[n("el-button",{attrs:{size:"mini"},on:{click:e.cancelUpdateRoleMenu}},[e._v("取消修改")]),e._v(" "),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){e.updateRoleMenu(s)}}},[e._v("确认修改")])],1)])],1)}))],1)])},staticRenderFns:[]},a=n("VU/8")(l,i,!1,null,null,null);t.default=a.exports},F1RE:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("员工调动")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},GZY3:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("员工奖惩")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},K5YU:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("员工培训")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},NQUc:function(e,t){},R27X:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 月末处理\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},Tlrr:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 人事记录统计\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},"UK/j":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 备份恢复数据库\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},VnTu:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 工资账套管理\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},XGB5:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("员工资料")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},YbFX:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 员工账套设置\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},ZDkW:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 操作日志管理\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},agXO:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 初始化数据库\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},ewEk:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={data:function(){return{keywords:"",fullloading:!1,hrs:[],cardLoading:[],eploading:[],allRoles:[],moreBtnState:!1,selRoles:[],selRolesBak:[]}},mounted:function(){this.initCards(),this.loadAllRoles()},methods:{searchClick:function(){this.initCards(),this.loadAllRoles()},updateHrRoles:function(e,t){this.moreBtnState=!1;var n=this;if(this.selRolesBak.length==this.selRoles.length){for(var s=0;s<this.selRoles.length;s++)for(var l=0;l<this.selRolesBak.length;l++)if(this.selRoles[s]==this.selRolesBak[l]){this.selRolesBak.splice(l,1);break}if(0==this.selRolesBak.length)return}this.eploading.splice(t,1,!0),this.putRequest("/system/hr/roles",{hrId:e,rids:this.selRoles}).then(function(s){if(n.eploading.splice(t,1,!1),s&&200==s.status){var l=s.data;n.$message({type:l.status,message:l.msg}),"success"==l.status&&n.refreshHr(e,t)}})},refreshHr:function(e,t){var n=this;n.cardLoading.splice(t,1,!0),this.putRequest("/system/hr/id/"+e).then(function(e){n.cardLoading.splice(t,1,!1),n.hrs.splice(t,1,e.data)})},loadSelRoles:function(e,t){var n=this;this.moreBtnState=!0,this.selRoles=[],this.selRolesBak=[],e.forEach(function(e){n.selRoles.push(e.id),n.selRolesBak.push(e.id)})},loadAllRoles:function(){var e=this;this.getRequest("/system/basic/roles").then(function(t){e.fullloading=!1,t&&200==t.status&&(e.allRoles=t.data)})},switchChange:function(e,t,n){var s=this;s.cardLoading.splice(n,1,!0),this.putRequest("/system/hr/",{enabled:e,id:t}).then(function(e){if(s.cardLoading.splice(n,1,!1),e&&200==e.status){var l=e.data;s.$message({type:l.status,message:l.msg}),"error"==l.status&&s.refreshHr(t,n)}else s.refreshHr(t,n)})},initCards:function(){this.fullloading=!0;var e,t=this;e=""===this.keywords?"all":this.keywords,this.getRequest("/system/hr/"+e).then(function(e){if(e&&200==e.status){t.hrs=e.data;var n=e.data.length;t.cardLoading=Array.apply(null,Array(n)).map(function(e,t){return!1}),t.eploading=Array.apply(null,Array(n)).map(function(e,t){return!1})}})},deleteHr:function(e){var t=this;this.fullloading=!0,this.deleteRequest("/system/hr/"+e).then(function(e){if(t.fullloading=!1,e&&200==e.status){var n=e.data;t.$message({type:n.status,message:n.msg}),"success"==n.status&&(t.initCards(),t.loadAllRoles())}})}}},l={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{directives:[{name:"loading",rawName:"v-loading",value:e.fullloading,expression:"fullloading"}],staticStyle:{"margin-top":"10px"}},[n("div",{staticStyle:{"margin-bottom":"10px",display:"flex","justify-content":"center","align-items":"center"}},[n("el-input",{staticStyle:{width:"400px","margin-right":"10px"},attrs:{placeholder:"默认展示部分用户,可以通过用户名搜索更多用户...","prefix-icon":"el-icon-search",size:"small"},model:{value:e.keywords,callback:function(t){e.keywords=t},expression:"keywords"}}),e._v(" "),n("el-button",{attrs:{size:"small",type:"primary",icon:"el-icon-search"},on:{click:e.searchClick}},[e._v("搜索")])],1),e._v(" "),n("div",{staticStyle:{display:"flex","justify-content":"space-around","flex-wrap":"wrap","text-align":"left"}},e._l(e.hrs,function(t,s){return n("el-card",{directives:[{name:"loading",rawName:"v-loading",value:e.cardLoading[s],expression:"cardLoading[index]"}],key:t.id,staticStyle:{width:"350px","margin-bottom":"20px"}},[n("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[n("span",[e._v(e._s(t.name))]),e._v(" "),n("el-button",{staticStyle:{color:"#f6061b",margin:"0px",float:"right",padding:"3px 0",width:"15px",height:"15px"},attrs:{type:"text",icon:"el-icon-delete"},on:{click:function(n){e.deleteHr(t.id)}}})],1),e._v(" "),n("div",[n("div",{staticStyle:{width:"100%",display:"flex","justify-content":"center"}},[n("img",{staticStyle:{width:"70px",height:"70px","border-radius":"70px"},attrs:{src:t.userface,alt:"item.name"}})]),e._v(" "),n("div",{staticStyle:{"margin-top":"20px"}},[n("div",[n("span",{staticClass:"user-info"},[e._v("用户名:"+e._s(t.name))])]),e._v(" "),n("div",[n("span",{staticClass:"user-info"},[e._v("手机号码:"+e._s(t.phone))])]),e._v(" "),n("div",[n("span",{staticClass:"user-info"},[e._v("电话号码:"+e._s(t.telephone))])]),e._v(" "),n("div",[n("span",{staticClass:"user-info"},[e._v("地址:"+e._s(t.address))])]),e._v(" "),n("div",{staticClass:"user-info",staticStyle:{display:"flex","align-items":"center","margin-bottom":"3px"}},[e._v("\n 用户状态:\n "),n("el-switch",{key:t.id,staticStyle:{display:"inline","margin-left":"5px"},attrs:{"active-color":"#13ce66","inactive-color":"#aaaaaa","active-text":"启用","inactive-text":"禁用"},on:{change:function(n){e.switchChange(t.enabled,t.id,s)}},model:{value:t.enabled,callback:function(n){e.$set(t,"enabled",n)},expression:"item.enabled"}})],1),e._v(" "),n("div",{staticClass:"user-info"},[e._v("\n 用户角色:\n "),e._l(t.roles,function(t){return n("el-tag",{key:t.id,staticStyle:{"margin-right":"5px"},attrs:{type:"success",size:"mini","disable-transitions":!1}},[e._v(e._s(t.nameZh)+"\n ")])}),e._v(" "),n("el-popover",{directives:[{name:"loading",rawName:"v-loading",value:e.eploading[s],expression:"eploading[index]"}],key:t.id,attrs:{placement:"right",title:"角色列表",width:"200",trigger:"click"},on:{hide:function(n){e.updateHrRoles(t.id,s)}}},[n("el-select",{attrs:{multiple:"",placeholder:"请选择角色"},model:{value:e.selRoles,callback:function(t){e.selRoles=t},expression:"selRoles"}},e._l(e.allRoles,function(e){return n("el-option",{key:e.id,attrs:{label:e.nameZh,value:e.id}})})),e._v(" "),n("el-button",{staticStyle:{color:"#09c0f6","padding-top":"0px"},attrs:{slot:"reference",type:"text",icon:"el-icon-more",disabled:e.moreBtnState},on:{click:function(n){e.loadSelRoles(t.roles,s)}},slot:"reference"})],1)],2),e._v(" "),n("div",[n("span",{staticClass:"user-info"},[e._v("备注:"+e._s(t.remark))])])])])])}))])},staticRenderFns:[]};var i=n("VU/8")(s,l,!1,function(e){n("NQUc")},null,null);t.default=i.exports},fc7a:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={data:function(){return{defaultTab:"depMana"}},methods:{},components:{"menu-role":n("Bg5L").default}},l={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticStyle:{"margin-top":"10px"}},[n("el-tabs",{attrs:{type:"card"},model:{value:e.defaultTab,callback:function(t){e.defaultTab=t},expression:"defaultTab"}},[n("el-tab-pane",{attrs:{label:"部门管理",name:"depMana"}},[e._v("部门管理")]),e._v(" "),n("el-tab-pane",{attrs:{label:"职位管理",name:"positionMana"}},[e._v("职位管理")]),e._v(" "),n("el-tab-pane",{attrs:{label:"职称管理",name:"jobTitleMana"}},[e._v("职称管理")]),e._v(" "),n("el-tab-pane",{attrs:{label:"奖惩规则",name:"ecCfg"}},[e._v("奖惩规则")]),e._v(" "),n("el-tab-pane",{attrs:{label:"权限组",name:"menuRole"}},[n("menu-role")],1)],1)],1)},staticRenderFns:[]},i=n("VU/8")(s,l,!1,null,null,null);t.default=i.exports},mNON:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 工资表查询\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},nSLl:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("员工调薪")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},r3HF:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 员工积分统计\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},tQt2:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 工资表管理\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports},ubks:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 系统管理\n ")])])}]},l=n("VU/8")(null,s,!1,null,null,null);t.default=l.exports}});
//# sourceMappingURL=0.8b42c0bf82833d03d7ae.js.map
\ No newline at end of file
webpackJsonp([1],{Bg5L:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=s("oAV5"),a={mounted:function(){this.loading=!0,this.initRoles()},methods:{deleteRole:function(e,t){var s=this;this.$confirm("删除角色["+t+"], 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){s.loading=!0,s.deleteRequest("/system/basic/role/"+e).then(function(e){if(e&&200==e.status){var t=e.data;s.$message({type:t.status,message:t.msg}),s.initRoles()}else s.loading=!1})}).catch(function(){s.$message({type:"info",message:"已取消删除"})})},addNewRole:function(){if(Object(n.b)(this.newRole,this.newRoleZh)){this.loading=!0;var e=this;this.postRequest("/system/basic/addRole",{role:this.newRole,roleZh:this.newRoleZh}).then(function(t){if(t&&200==t.status){var s=t.data;e.$message({type:s.status,message:s.msg}),e.initRoles(),e.newRole="",e.newRoleZh=""}else e.loading=!1})}},updateRoleMenu:function(e){var t=this.$refs.tree[e].getCheckedKeys(!0),s=this;this.putRequest("/system/basic/updateMenuRole",{rid:this.activeColItem,mids:t}).then(function(e){if(e&&200==e.status){var t=e.data;s.$message({type:t.status,message:t.msg}),s.activeColItem=-1}})},collapseChange:function(e){if(""!=e){var t=this;this.getRequest("/system/basic/menuTree/"+e).then(function(e){if(e&&200==e.status){var s=e.data;t.treeData=s.menus,t.checkedKeys=s.mids}})}},handleCheckChange:function(e,t,s){},initRoles:function(){var e=this;this.getRequest("/system/basic/roles").then(function(t){e.loading=!1,t&&200==t.status&&(e.roles=t.data,e.activeColItem=-1)})},cancelUpdateRoleMenu:function(){this.activeColItem=-1}},data:function(){return{props:{label:"name",children:"children"},newRole:"",newRoleZh:"",roles:[],treeData:[],checkedKeys:[],loading:!1,activeColItem:-1}}},i={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",[s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{"text-align":"left"}},[s("el-input",{staticStyle:{width:"250px"},attrs:{placeholder:"请输入角色英文名称...",size:"mini"},model:{value:e.newRole,callback:function(t){e.newRole=t},expression:"newRole"}},[s("template",{slot:"prepend"},[e._v("ROLE_")])],2),e._v(" "),s("el-input",{staticStyle:{width:"250px"},attrs:{placeholder:"请输入角色中文名称...",size:"mini"},model:{value:e.newRoleZh,callback:function(t){e.newRoleZh=t},expression:"newRoleZh"}}),e._v(" "),s("el-button",{staticStyle:{"margin-left":"5px"},attrs:{type:"primary",size:"mini"},on:{click:e.addNewRole}},[e._v("添加角色")])],1),e._v(" "),s("div",{staticStyle:{"margin-top":"10px","text-align":"left"}},[s("el-collapse",{staticStyle:{width:"500px"},attrs:{accordion:""},on:{change:e.collapseChange},model:{value:e.activeColItem,callback:function(t){e.activeColItem=t},expression:"activeColItem"}},e._l(e.roles,function(t,n){return s("el-collapse-item",{key:t.name,attrs:{title:t.nameZh,name:t.id}},[s("el-card",{staticClass:"box-card"},[s("div",{attrs:{slot:"header"},slot:"header"},[s("span",[e._v("可访问的资源")]),e._v(" "),s("el-button",{staticStyle:{color:"#f6061b",margin:"0px",float:"right",padding:"3px 0",width:"15px",height:"15px"},attrs:{type:"text",icon:"el-icon-delete"},on:{click:function(s){e.deleteRole(t.id,t.nameZh)}}})],1),e._v(" "),s("div",[s("el-tree",{key:t.id,ref:"tree",refInFor:!0,attrs:{props:e.props,data:e.treeData,"default-checked-keys":e.checkedKeys,"node-key":"id","show-checkbox":"","highlight-current":""},on:{"check-change":e.handleCheckChange}})],1),e._v(" "),s("div",{staticStyle:{display:"flex","justify-content":"flex-end","margin-right":"10px"}},[s("el-button",{attrs:{size:"mini"},on:{click:e.cancelUpdateRoleMenu}},[e._v("取消修改")]),e._v(" "),s("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(t){e.updateRoleMenu(n)}}},[e._v("确认修改")])],1)])],1)}))],1)])},staticRenderFns:[]},l=s("VU/8")(a,i,!1,null,null,null);t.default=l.exports},LJAE:function(e,t,s){var n={"./MenuRole.vue":"Bg5L","./SysBasic.vue":"fc7a","./SysCfg.vue":"ubks","./SysData.vue":"UK/j","./SysHr.vue":"ewEk","./SysInit.vue":"agXO","./SysLog.vue":"ZDkW"};function a(e){return s(i(e))}function i(e){var t=n[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}a.keys=function(){return Object.keys(n)},a.resolve=i,e.exports=a,a.id="LJAE"},NQUc:function(e,t){},"UK/j":function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 备份恢复数据库\n ")])])}]},a=s("VU/8")(null,n,!1,null,null,null);t.default=a.exports},ZDkW:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 操作日志管理\n ")])])}]},a=s("VU/8")(null,n,!1,null,null,null);t.default=a.exports},agXO:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 初始化数据库\n ")])])}]},a=s("VU/8")(null,n,!1,null,null,null);t.default=a.exports},ewEk:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={data:function(){return{keywords:"",fullloading:!1,hrs:[],cardLoading:[],eploading:[],allRoles:[],moreBtnState:!1,selRoles:[],selRolesBak:[]}},mounted:function(){this.initCards(),this.loadAllRoles()},methods:{searchClick:function(){this.initCards(),this.loadAllRoles()},updateHrRoles:function(e,t){this.moreBtnState=!1;var s=this;if(this.selRolesBak.length==this.selRoles.length){for(var n=0;n<this.selRoles.length;n++)for(var a=0;a<this.selRolesBak.length;a++)if(this.selRoles[n]==this.selRolesBak[a]){this.selRolesBak.splice(a,1);break}if(0==this.selRolesBak.length)return}this.eploading.splice(t,1,!0),this.putRequest("/system/hr/roles",{hrId:e,rids:this.selRoles}).then(function(n){if(s.eploading.splice(t,1,!1),n&&200==n.status){var a=n.data;s.$message({type:a.status,message:a.msg}),"success"==a.status&&s.refreshHr(e,t)}})},refreshHr:function(e,t){var s=this;s.cardLoading.splice(t,1,!0),this.putRequest("/system/hr/id/"+e).then(function(e){s.cardLoading.splice(t,1,!1),s.hrs.splice(t,1,e.data)})},loadSelRoles:function(e,t){var s=this;this.moreBtnState=!0,this.selRoles=[],this.selRolesBak=[],e.forEach(function(e){s.selRoles.push(e.id),s.selRolesBak.push(e.id)})},loadAllRoles:function(){var e=this;this.getRequest("/system/basic/roles").then(function(t){e.fullloading=!1,t&&200==t.status&&(e.allRoles=t.data)})},switchChange:function(e,t,s){var n=this;n.cardLoading.splice(s,1,!0),this.putRequest("/system/hr/",{enabled:e,id:t}).then(function(e){if(n.cardLoading.splice(s,1,!1),e&&200==e.status){var a=e.data;n.$message({type:a.status,message:a.msg}),"error"==a.status&&n.refreshHr(t,s)}else n.refreshHr(t,s)})},initCards:function(){this.fullloading=!0;var e,t=this;e=""===this.keywords?"all":this.keywords,this.getRequest("/system/hr/"+e).then(function(e){if(e&&200==e.status){t.hrs=e.data;var s=e.data.length;t.cardLoading=Array.apply(null,Array(s)).map(function(e,t){return!1}),t.eploading=Array.apply(null,Array(s)).map(function(e,t){return!1})}})},deleteHr:function(e){var t=this;this.fullloading=!0,this.deleteRequest("/system/hr/"+e).then(function(e){if(t.fullloading=!1,e&&200==e.status){var s=e.data;t.$message({type:s.status,message:s.msg}),"success"==s.status&&(t.initCards(),t.loadAllRoles())}})}}},a={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.fullloading,expression:"fullloading"}],staticStyle:{"margin-top":"10px"}},[s("div",{staticStyle:{"margin-bottom":"10px",display:"flex","justify-content":"center","align-items":"center"}},[s("el-input",{staticStyle:{width:"400px","margin-right":"10px"},attrs:{placeholder:"默认展示部分用户,可以通过用户名搜索更多用户...","prefix-icon":"el-icon-search",size:"small"},model:{value:e.keywords,callback:function(t){e.keywords=t},expression:"keywords"}}),e._v(" "),s("el-button",{attrs:{size:"small",type:"primary",icon:"el-icon-search"},on:{click:e.searchClick}},[e._v("搜索")])],1),e._v(" "),s("div",{staticStyle:{display:"flex","justify-content":"space-around","flex-wrap":"wrap","text-align":"left"}},e._l(e.hrs,function(t,n){return s("el-card",{directives:[{name:"loading",rawName:"v-loading",value:e.cardLoading[n],expression:"cardLoading[index]"}],key:t.id,staticStyle:{width:"350px","margin-bottom":"20px"}},[s("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[s("span",[e._v(e._s(t.name))]),e._v(" "),s("el-button",{staticStyle:{color:"#f6061b",margin:"0px",float:"right",padding:"3px 0",width:"15px",height:"15px"},attrs:{type:"text",icon:"el-icon-delete"},on:{click:function(s){e.deleteHr(t.id)}}})],1),e._v(" "),s("div",[s("div",{staticStyle:{width:"100%",display:"flex","justify-content":"center"}},[s("img",{staticStyle:{width:"70px",height:"70px","border-radius":"70px"},attrs:{src:t.userface,alt:"item.name"}})]),e._v(" "),s("div",{staticStyle:{"margin-top":"20px"}},[s("div",[s("span",{staticClass:"user-info"},[e._v("用户名:"+e._s(t.name))])]),e._v(" "),s("div",[s("span",{staticClass:"user-info"},[e._v("手机号码:"+e._s(t.phone))])]),e._v(" "),s("div",[s("span",{staticClass:"user-info"},[e._v("电话号码:"+e._s(t.telephone))])]),e._v(" "),s("div",[s("span",{staticClass:"user-info"},[e._v("地址:"+e._s(t.address))])]),e._v(" "),s("div",{staticClass:"user-info",staticStyle:{display:"flex","align-items":"center","margin-bottom":"3px"}},[e._v("\n 用户状态:\n "),s("el-switch",{key:t.id,staticStyle:{display:"inline","margin-left":"5px"},attrs:{"active-color":"#13ce66","inactive-color":"#aaaaaa","active-text":"启用","inactive-text":"禁用"},on:{change:function(s){e.switchChange(t.enabled,t.id,n)}},model:{value:t.enabled,callback:function(s){e.$set(t,"enabled",s)},expression:"item.enabled"}})],1),e._v(" "),s("div",{staticClass:"user-info"},[e._v("\n 用户角色:\n "),e._l(t.roles,function(t){return s("el-tag",{key:t.id,staticStyle:{"margin-right":"5px"},attrs:{type:"success",size:"mini","disable-transitions":!1}},[e._v(e._s(t.nameZh)+"\n ")])}),e._v(" "),s("el-popover",{directives:[{name:"loading",rawName:"v-loading",value:e.eploading[n],expression:"eploading[index]"}],key:t.id,attrs:{placement:"right",title:"角色列表",width:"200",trigger:"click"},on:{hide:function(s){e.updateHrRoles(t.id,n)}}},[s("el-select",{attrs:{multiple:"",placeholder:"请选择角色"},model:{value:e.selRoles,callback:function(t){e.selRoles=t},expression:"selRoles"}},e._l(e.allRoles,function(e){return s("el-option",{key:e.id,attrs:{label:e.nameZh,value:e.id}})})),e._v(" "),s("el-button",{staticStyle:{color:"#09c0f6","padding-top":"0px"},attrs:{slot:"reference",type:"text",icon:"el-icon-more",disabled:e.moreBtnState},on:{click:function(s){e.loadSelRoles(t.roles,n)}},slot:"reference"})],1)],2),e._v(" "),s("div",[s("span",{staticClass:"user-info"},[e._v("备注:"+e._s(t.remark))])])])])])}))])},staticRenderFns:[]};var i=s("VU/8")(n,a,!1,function(e){s("NQUc")},null,null);t.default=i.exports},fc7a:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={data:function(){return{defaultTab:"depMana"}},methods:{},components:{"menu-role":s("Bg5L").default}},a={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticStyle:{"margin-top":"10px"}},[s("el-tabs",{attrs:{type:"card"},model:{value:e.defaultTab,callback:function(t){e.defaultTab=t},expression:"defaultTab"}},[s("el-tab-pane",{attrs:{label:"部门管理",name:"depMana"}},[e._v("部门管理")]),e._v(" "),s("el-tab-pane",{attrs:{label:"职位管理",name:"positionMana"}},[e._v("职位管理")]),e._v(" "),s("el-tab-pane",{attrs:{label:"职称管理",name:"jobTitleMana"}},[e._v("职称管理")]),e._v(" "),s("el-tab-pane",{attrs:{label:"奖惩规则",name:"ecCfg"}},[e._v("奖惩规则")]),e._v(" "),s("el-tab-pane",{attrs:{label:"权限组",name:"menuRole"}},[s("menu-role")],1)],1)],1)},staticRenderFns:[]},i=s("VU/8")(n,a,!1,null,null,null);t.default=i.exports},ubks:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 系统管理\n ")])])}]},a=s("VU/8")(null,n,!1,null,null,null);t.default=a.exports}});
//# sourceMappingURL=1.8f568a99a42c381bf44f.js.map
\ No newline at end of file
webpackJsonp([2],{"9Acn":function(e,t,n){var r={"./SalMonth.vue":"R27X","./SalSearch.vue":"mNON","./SalSob.vue":"VnTu","./SalSobCfg.vue":"YbFX","./SalTable.vue":"tQt2"};function l(e){return n(u(e))}function u(e){var t=r[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}l.keys=function(){return Object.keys(r)},l.resolve=u,e.exports=l,l.id="9Acn"},R27X:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 月末处理\n ")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},VnTu:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 工资账套管理\n ")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},YbFX:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 员工账套设置\n ")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},mNON:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 工资表查询\n ")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},tQt2:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 工资表管理\n ")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports}});
//# sourceMappingURL=2.9ff52b878e2c6af33db4.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./src/components/salary ^\\.\\/.*\\.vue$","webpack:///./src/components/salary/SalMonth.vue?d421","webpack:///./src/components/salary/SalMonth.vue","webpack:///./src/components/salary/SalSob.vue?27a8","webpack:///./src/components/salary/SalSob.vue","webpack:///./src/components/salary/SalSobCfg.vue?8772","webpack:///./src/components/salary/SalSobCfg.vue","webpack:///./src/components/salary/SalSearch.vue?d55b","webpack:///./src/components/salary/SalSearch.vue","webpack:///./src/components/salary/SalTable.vue?5b30","webpack:///./src/components/salary/SalTable.vue"],"names":["map","./SalMonth.vue","./SalSearch.vue","./SalSob.vue","./SalSobCfg.vue","./SalTable.vue","webpackContext","req","__webpack_require__","webpackContextResolve","id","Error","keys","Object","resolve","module","exports","SalMonth","render","this","$createElement","_self","_c","_m","staticRenderFns","_h","_v","Component","normalizeComponent","__webpack_exports__","SalSob","SalSobCfg","SalSearch","SalTable"],"mappings":"yCAAA,IAAAA,GACAC,iBAAA,OACAC,kBAAA,OACAC,eAAA,OACAC,kBAAA,OACAC,iBAAA,QAEA,SAAAC,EAAAC,GACA,OAAAC,EAAAC,EAAAF,IAEA,SAAAE,EAAAF,GACA,IAAAG,EAAAV,EAAAO,GACA,KAAAG,EAAA,GACA,UAAAC,MAAA,uBAAAJ,EAAA,MACA,OAAAG,EAEAJ,EAAAM,KAAA,WACA,OAAAC,OAAAD,KAAAZ,IAEAM,EAAAQ,QAAAL,EACAM,EAAAC,QAAAV,EACAA,EAAAI,GAAA,2FCrBA,IAGAO,GADiBC,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,yBCYnGC,EAbAnB,EAAA,OAaAoB,CAXA,KAaAX,GATA,EAEA,KAEA,KAEA,MAUAY,EAAA,QAAAF,EAAA,4FCtBA,IAGAG,GADiBZ,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,2BCYnGC,EAbAnB,EAAA,OAaAoB,CAXA,KAaAE,GATA,EAEA,KAEA,KAEA,MAUAD,EAAA,QAAAF,EAAA,4FCtBA,IAGAI,GADiBb,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,2BCYnGC,EAbAnB,EAAA,OAaAoB,CAXA,KAaAG,GATA,EAEA,KAEA,KAEA,MAUAF,EAAA,QAAAF,EAAA,4FCtBA,IAGAK,GADiBd,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,0BCYnGC,EAbAnB,EAAA,OAaAoB,CAXA,KAaAI,GATA,EAEA,KAEA,KAEA,MAUAH,EAAA,QAAAF,EAAA,4FCtBA,IAGAM,GADiBf,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,0BCYnGC,EAbAnB,EAAA,OAaAoB,CAXA,KAaAK,GATA,EAEA,KAEA,KAEA,MAUAJ,EAAA,QAAAF,EAAA","file":"static/js/2.9ff52b878e2c6af33db4.js","sourcesContent":["var map = {\n\t\"./SalMonth.vue\": \"R27X\",\n\t\"./SalSearch.vue\": \"mNON\",\n\t\"./SalSob.vue\": \"VnTu\",\n\t\"./SalSobCfg.vue\": \"YbFX\",\n\t\"./SalTable.vue\": \"tQt2\"\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"9Acn\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/salary ^\\.\\/.*\\.vue$\n// module id = 9Acn\n// module chunks = 2","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"\\n 月末处理\\n \")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-6d58fafa\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/salary/SalMonth.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-6d58fafa\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./SalMonth.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/salary/SalMonth.vue\n// module id = null\n// module chunks = ","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"\\n 工资账套管理\\n \")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-bbbcd8f8\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/salary/SalSob.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-bbbcd8f8\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./SalSob.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/salary/SalSob.vue\n// module id = null\n// module chunks = ","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"\\n 员工账套设置\\n \")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-7781ce86\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/salary/SalSobCfg.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-7781ce86\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./SalSobCfg.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/salary/SalSobCfg.vue\n// module id = null\n// module chunks = ","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"\\n 工资表查询\\n \")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-42897b3a\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/salary/SalSearch.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-42897b3a\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./SalSearch.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/salary/SalSearch.vue\n// module id = null\n// module chunks = ","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"\\n 工资表管理\\n \")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-6b3058a9\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/salary/SalTable.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-6b3058a9\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./SalTable.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/salary/SalTable.vue\n// module id = null\n// module chunks = "],"sourceRoot":""}
\ No newline at end of file
webpackJsonp([3],{F1RE:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("员工调动")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},GZY3:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("员工奖惩")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},K5YU:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("员工培训")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},XGB5:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("员工资料")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},nSLl:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("员工调薪")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},sALK:function(e,t,n){var r={"./PerEc.vue":"GZY3","./PerEmp.vue":"XGB5","./PerMv.vue":"F1RE","./PerSalary.vue":"nSLl","./PerTrain.vue":"K5YU"};function l(e){return n(u(e))}function u(e){var t=r[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}l.keys=function(){return Object.keys(r)},l.resolve=u,e.exports=l,l.id="sALK"}});
//# sourceMappingURL=3.f2af1e5f79c4750ed876.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./src/components/personnel/PerMv.vue?f940","webpack:///./src/components/personnel/PerMv.vue","webpack:///./src/components/personnel/PerEc.vue?c628","webpack:///./src/components/personnel/PerEc.vue","webpack:///./src/components/personnel/PerTrain.vue?eac2","webpack:///./src/components/personnel/PerTrain.vue","webpack:///./src/components/personnel/PerEmp.vue?7bbb","webpack:///./src/components/personnel/PerEmp.vue","webpack:///./src/components/personnel/PerSalary.vue?b5b2","webpack:///./src/components/personnel/PerSalary.vue","webpack:///./src/components/personnel ^\\.\\/.*\\.vue$"],"names":["PerMv","render","this","$createElement","_self","_c","_m","staticRenderFns","_h","_v","Component","__webpack_require__","normalizeComponent","__webpack_exports__","PerEc","PerTrain","PerEmp","PerSalary","map","./PerEc.vue","./PerEmp.vue","./PerMv.vue","./PerSalary.vue","./PerTrain.vue","webpackContext","req","webpackContextResolve","id","Error","keys","Object","resolve","module","exports"],"mappings":"qGAAA,IAGAA,GADiBC,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,eCYnGC,EAbAC,EAAA,OAaAC,CAXA,KAaAZ,GATA,EAEA,KAEA,KAEA,MAUAa,EAAA,QAAAH,EAAA,4FCtBA,IAGAI,GADiBb,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,eCYnGC,EAbAC,EAAA,OAaAC,CAXA,KAaAE,GATA,EAEA,KAEA,KAEA,MAUAD,EAAA,QAAAH,EAAA,4FCtBA,IAGAK,GADiBd,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,eCYnGC,EAbAC,EAAA,OAaAC,CAXA,KAaAG,GATA,EAEA,KAEA,KAEA,MAUAF,EAAA,QAAAH,EAAA,4FCtBA,IAGAM,GADiBf,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,eCYnGC,EAbAC,EAAA,OAaAC,CAXA,KAaAI,GATA,EAEA,KAEA,KAEA,MAUAH,EAAA,QAAAH,EAAA,4FCtBA,IAGAO,GADiBhB,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,eCYnGC,EAbAC,EAAA,OAaAC,CAXA,KAaAK,GATA,EAEA,KAEA,KAEA,MAUAJ,EAAA,QAAAH,EAAA,8BCtBA,IAAAQ,GACAC,cAAA,OACAC,eAAA,OACAC,cAAA,OACAC,kBAAA,OACAC,iBAAA,QAEA,SAAAC,EAAAC,GACA,OAAAd,EAAAe,EAAAD,IAEA,SAAAC,EAAAD,GACA,IAAAE,EAAAT,EAAAO,GACA,KAAAE,EAAA,GACA,UAAAC,MAAA,uBAAAH,EAAA,MACA,OAAAE,EAEAH,EAAAK,KAAA,WACA,OAAAC,OAAAD,KAAAX,IAEAM,EAAAO,QAAAL,EACAM,EAAAC,QAAAT,EACAA,EAAAG,GAAA","file":"static/js/3.f2af1e5f79c4750ed876.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"员工调动\")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-175c2ded\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/personnel/PerMv.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-175c2ded\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./PerMv.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/personnel/PerMv.vue\n// module id = null\n// module chunks = ","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"员工奖惩\")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-5608984a\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/personnel/PerEc.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-5608984a\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./PerEc.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/personnel/PerEc.vue\n// module id = null\n// module chunks = ","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"员工培训\")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-7bb4c8f1\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/personnel/PerTrain.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-7bb4c8f1\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./PerTrain.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/personnel/PerTrain.vue\n// module id = null\n// module chunks = ","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"员工资料\")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-13b0e1d0\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/personnel/PerEmp.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-13b0e1d0\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./PerEmp.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/personnel/PerEmp.vue\n// module id = null\n// module chunks = ","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"员工调薪\")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-e3ecec2c\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/personnel/PerSalary.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-e3ecec2c\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./PerSalary.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/personnel/PerSalary.vue\n// module id = null\n// module chunks = ","var map = {\n\t\"./PerEc.vue\": \"GZY3\",\n\t\"./PerEmp.vue\": \"XGB5\",\n\t\"./PerMv.vue\": \"F1RE\",\n\t\"./PerSalary.vue\": \"nSLl\",\n\t\"./PerTrain.vue\": \"K5YU\"\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"sALK\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/personnel ^\\.\\/.*\\.vue$\n// module id = sALK\n// module chunks = 3"],"sourceRoot":""}
\ No newline at end of file
webpackJsonp([4],{"4/RD":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 综合信息统计\n ")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},"97Ts":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 人事信息统计\n ")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},Tlrr:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 人事记录统计\n ")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports},nCU1:function(e,t,n){var r={"./StaAll.vue":"4/RD","./StaPers.vue":"97Ts","./StaRecord.vue":"Tlrr","./StaScore.vue":"r3HF"};function l(e){return n(s(e))}function s(e){var t=r[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}l.keys=function(){return Object.keys(r)},l.resolve=s,e.exports=l,l.id="nCU1"},r3HF:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("\n 员工积分统计\n ")])])}]},l=n("VU/8")(null,r,!1,null,null,null);t.default=l.exports}});
//# sourceMappingURL=4.b25d67ddc90d6ac44980.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./src/components/statistics/StaAll.vue?62f2","webpack:///./src/components/statistics/StaAll.vue","webpack:///./src/components/statistics/StaPers.vue?b85e","webpack:///./src/components/statistics/StaPers.vue","webpack:///./src/components/statistics/StaRecord.vue?8998","webpack:///./src/components/statistics/StaRecord.vue","webpack:///./src/components/statistics ^\\.\\/.*\\.vue$","webpack:///./src/components/statistics/StaScore.vue?f081","webpack:///./src/components/statistics/StaScore.vue"],"names":["StaAll","render","this","$createElement","_self","_c","_m","staticRenderFns","_h","_v","Component","__webpack_require__","normalizeComponent","__webpack_exports__","StaPers","StaRecord","map","./StaAll.vue","./StaPers.vue","./StaRecord.vue","./StaScore.vue","webpackContext","req","webpackContextResolve","id","Error","keys","Object","resolve","module","exports","StaScore"],"mappings":"uGAAA,IAGAA,GADiBC,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,2BCYnGC,EAbAC,EAAA,OAaAC,CAXA,KAaAZ,GATA,EAEA,KAEA,KAEA,MAUAa,EAAA,QAAAH,EAAA,8FCtBA,IAGAI,GADiBb,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,2BCYnGC,EAbAC,EAAA,OAaAC,CAXA,KAaAE,GATA,EAEA,KAEA,KAEA,MAUAD,EAAA,QAAAH,EAAA,4FCtBA,IAGAK,GADiBd,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,2BCYnGC,EAbAC,EAAA,OAaAC,CAXA,KAaAG,GATA,EAEA,KAEA,KAEA,MAUAF,EAAA,QAAAH,EAAA,8BCtBA,IAAAM,GACAC,eAAA,OACAC,gBAAA,OACAC,kBAAA,OACAC,iBAAA,QAEA,SAAAC,EAAAC,GACA,OAAAX,EAAAY,EAAAD,IAEA,SAAAC,EAAAD,GACA,IAAAE,EAAAR,EAAAM,GACA,KAAAE,EAAA,GACA,UAAAC,MAAA,uBAAAH,EAAA,MACA,OAAAE,EAEAH,EAAAK,KAAA,WACA,OAAAC,OAAAD,KAAAV,IAEAK,EAAAO,QAAAL,EACAM,EAAAC,QAAAT,EACAA,EAAAG,GAAA,2FCpBA,IAGAO,GADiB9B,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,2BCYnGC,EAbAC,EAAA,OAaAC,CAXA,KAaAmB,GATA,EAEA,KAEA,KAEA,MAUAlB,EAAA,QAAAH,EAAA","file":"static/js/4.b25d67ddc90d6ac44980.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"\\n 综合信息统计\\n \")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-11e8a90b\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/statistics/StaAll.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-11e8a90b\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./StaAll.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/statistics/StaAll.vue\n// module id = null\n// module chunks = ","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"\\n 人事信息统计\\n \")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-2d0aaf3d\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/statistics/StaPers.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-2d0aaf3d\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./StaPers.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/statistics/StaPers.vue\n// module id = null\n// module chunks = ","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"\\n 人事记录统计\\n \")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-1c0bf4b9\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/statistics/StaRecord.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-1c0bf4b9\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./StaRecord.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/statistics/StaRecord.vue\n// module id = null\n// module chunks = ","var map = {\n\t\"./StaAll.vue\": \"4/RD\",\n\t\"./StaPers.vue\": \"97Ts\",\n\t\"./StaRecord.vue\": \"Tlrr\",\n\t\"./StaScore.vue\": \"r3HF\"\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"nCU1\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/statistics ^\\.\\/.*\\.vue$\n// module id = nCU1\n// module chunks = 4","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"\\n 员工积分统计\\n \")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-428f9284\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/statistics/StaScore.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-428f9284\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./StaScore.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/statistics/StaScore.vue\n// module id = null\n// module chunks = "],"sourceRoot":""}
\ No newline at end of file
webpackJsonp([5],{"+sH/":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("基本资料")])])}]},s=n("VU/8")(null,r,!1,null,null,null);t.default=s.exports},"8cST":function(e,t,n){var r={"./EmpAdv.vue":"ABUp","./EmpBasic.vue":"+sH/"};function s(e){return n(u(e))}function u(e){var t=r[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}s.keys=function(){return Object.keys(r)},s.resolve=u,e.exports=s,s.id="8cST"},ABUp:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){this.$createElement;this._self._c;return this._m(0)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",[t("h1",[this._v("高级资料")])])}]},s=n("VU/8")(null,r,!1,null,null,null);t.default=s.exports}});
//# sourceMappingURL=5.b020f2109c9d08ebc495.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///./src/components/emp/EmpBasic.vue?1455","webpack:///./src/components/emp/EmpBasic.vue","webpack:///./src/components/emp ^\\.\\/.*\\.vue$","webpack:///./src/components/emp/EmpAdv.vue?0cc6","webpack:///./src/components/emp/EmpAdv.vue"],"names":["EmpBasic","render","this","$createElement","_self","_c","_m","staticRenderFns","_h","_v","Component","__webpack_require__","normalizeComponent","__webpack_exports__","map","./EmpAdv.vue","./EmpBasic.vue","webpackContext","req","webpackContextResolve","id","Error","keys","Object","resolve","module","exports","EmpAdv"],"mappings":"uGAAA,IAGAA,GADiBC,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,eCYnGC,EAbAC,EAAA,OAaAC,CAXA,KAaAZ,GATA,EAEA,KAEA,KAEA,MAUAa,EAAA,QAAAH,EAAA,gCCtBA,IAAAI,GACAC,eAAA,OACAC,iBAAA,QAEA,SAAAC,EAAAC,GACA,OAAAP,EAAAQ,EAAAD,IAEA,SAAAC,EAAAD,GACA,IAAAE,EAAAN,EAAAI,GACA,KAAAE,EAAA,GACA,UAAAC,MAAA,uBAAAH,EAAA,MACA,OAAAE,EAEAH,EAAAK,KAAA,WACA,OAAAC,OAAAD,KAAAR,IAEAG,EAAAO,QAAAL,EACAM,EAAAC,QAAAT,EACAA,EAAAG,GAAA,2FClBA,IAGAO,GADiB1B,OAFjB,WAA0BC,KAAaC,eAAbD,KAAuCE,MAAAC,GAAwB,OAA/DH,KAA+DI,GAAA,IAExEC,iBADjB,WAAoC,IAAaC,EAAbN,KAAaC,eAA0BE,EAAvCH,KAAuCE,MAAAC,IAAAG,EAAwB,OAAAH,EAAA,OAAAA,EAAA,MAA/DH,KAA+DO,GAAA,eCYnGC,EAbAC,EAAA,OAaAC,CAXA,KAaAe,GATA,EAEA,KAEA,KAEA,MAUAd,EAAA,QAAAH,EAAA","file":"static/js/5.b020f2109c9d08ebc495.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"基本资料\")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-64193e78\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/emp/EmpBasic.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-64193e78\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./EmpBasic.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/emp/EmpBasic.vue\n// module id = null\n// module chunks = ","var map = {\n\t\"./EmpAdv.vue\": \"ABUp\",\n\t\"./EmpBasic.vue\": \"+sH/\"\n};\nfunction webpackContext(req) {\n\treturn __webpack_require__(webpackContextResolve(req));\n};\nfunction webpackContextResolve(req) {\n\tvar id = map[req];\n\tif(!(id + 1)) // check for number or string\n\t\tthrow new Error(\"Cannot find module '\" + req + \"'.\");\n\treturn id;\n};\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"8cST\";\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/emp ^\\.\\/.*\\.vue$\n// module id = 8cST\n// module chunks = 5","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _vm._m(0)}\nvar staticRenderFns = [function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('h1',[_vm._v(\"高级资料\")])])}]\nvar esExports = { render: render, staticRenderFns: staticRenderFns }\nexport default esExports\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./node_modules/vue-loader/lib/template-compiler?{\"id\":\"data-v-fa7f25d4\",\"hasScoped\":false,\"transformToRequire\":{\"video\":[\"src\",\"poster\"],\"source\":\"src\",\"img\":\"src\",\"image\":\"xlink:href\"},\"buble\":{\"transforms\":{}}}!./node_modules/vue-loader/lib/selector.js?type=template&index=0!./src/components/emp/EmpAdv.vue\n// module id = null\n// module chunks = ","var normalizeComponent = require(\"!../../../node_modules/vue-loader/lib/component-normalizer\")\n/* script */\nvar __vue_script__ = null\n/* template */\nimport __vue_template__ from \"!!../../../node_modules/vue-loader/lib/template-compiler/index?{\\\"id\\\":\\\"data-v-fa7f25d4\\\",\\\"hasScoped\\\":false,\\\"transformToRequire\\\":{\\\"video\\\":[\\\"src\\\",\\\"poster\\\"],\\\"source\\\":\\\"src\\\",\\\"img\\\":\\\"src\\\",\\\"image\\\":\\\"xlink:href\\\"},\\\"buble\\\":{\\\"transforms\\\":{}}}!../../../node_modules/vue-loader/lib/selector?type=template&index=0!./EmpAdv.vue\"\n/* template functional */\nvar __vue_template_functional__ = false\n/* styles */\nvar __vue_styles__ = null\n/* scopeId */\nvar __vue_scopeId__ = null\n/* moduleIdentifier (server only) */\nvar __vue_module_identifier__ = null\nvar Component = normalizeComponent(\n __vue_script__,\n __vue_template__,\n __vue_template_functional__,\n __vue_styles__,\n __vue_scopeId__,\n __vue_module_identifier__\n)\n\nexport default Component.exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/components/emp/EmpAdv.vue\n// module id = null\n// module chunks = "],"sourceRoot":""}
\ No newline at end of file
webpackJsonp([7],{Ad1w:function(e,t){},NHnr:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n("7+uW"),o={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{attrs:{id:"app"}},[t("router-view")],1)},staticRenderFns:[]};var a=n("VU/8")({name:"app"},o,!1,function(e){n("Ad1w")},null,null).exports,s=n("/ocq"),i=n("xJsL"),u=n("lO7g");r.default.use(s.a);var l=new s.a({routes:[{path:"/",name:"Login",component:i.default,hidden:!0},{path:"/home",name:"主页",component:u.default,hidden:!0,meta:{requireAuth:!0}}]}),c=n("zL8q"),d=n.n(c),p=(n("tvR6"),n("mvHQ")),m=n.n(p),f=n("NYxO");r.default.use(f.a);var h=new f.a.Store({state:{user:{name:null==window.localStorage.getItem("user")?"未登录":JSON.parse(window.localStorage.getItem("user")).name,userface:null==window.localStorage.getItem("user")?"":JSON.parse(window.localStorage.getItem("user")).userface},routes:[]},mutations:{initMenu:function(e,t){e.routes=t},login:function(e,t){e.user=t,window.localStorage.setItem("user",m()(t))},logout:function(e){window.localStorage.removeItem("user"),e.routes=[]}},actions:{}}),v=n("VsUZ"),g=n("oAV5");r.default.config.productionTip=!1,r.default.use(d.a),r.default.prototype.getRequest=v.b,r.default.prototype.postRequest=v.c,r.default.prototype.deleteRequest=v.a,r.default.prototype.putRequest=v.d,l.beforeEach(function(e,t,n){if("Login"!=e.name){"未登录"==h.state.user.name?e.meta.requireAuth||null==e.name?n({path:"/",query:{redirect:e.path}}):n():(Object(g.a)(l,h),n())}else n()}),new r.default({el:"#app",router:l,store:h,template:"<App/>",components:{App:a}})},Nrxs:function(e,t){},VsUZ:function(e,t,n){"use strict";n.d(t,"c",function(){return u}),n.d(t,"d",function(){return l}),n.d(t,"a",function(){return c}),n.d(t,"b",function(){return d});var r=n("//Fk"),o=n.n(r),a=n("mtWM"),s=n.n(a),i=n("zL8q");n.n(i);s.a.interceptors.request.use(function(e){return e},function(e){return i.Message.error({message:"请求超时!"}),o.a.resolve(e)}),s.a.interceptors.response.use(function(e){if(!e.status||200!=e.status||"error"!=e.data.status)return e;i.Message.error({message:e.data.msg})},function(e){return 504==e.response.status||404==e.response.status?i.Message.error({message:"服务器被吃了⊙﹏⊙∥"}):403==e.response.status?i.Message.error({message:"权限不足,请联系管理员!"}):i.Message.error({message:"未知错误!"}),o.a.resolve(e)});var u=function(e,t){return s()({method:"post",url:""+e,data:t,transformRequest:[function(e){var t="";for(var n in e)t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n])+"&";return t}],headers:{"Content-Type":"application/x-www-form-urlencoded"}})},l=function(e,t){return s()({method:"put",url:""+e,data:t,transformRequest:[function(e){var t="";for(var n in e)t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n])+"&";return t}],headers:{"Content-Type":"application/x-www-form-urlencoded"}})},c=function(e){return s()({method:"delete",url:""+e})},d=function(e){return s()({method:"get",url:""+e})}},lO7g:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("el-container",{staticClass:"home-container"},[n("el-header",{staticClass:"home-header"},[n("span",{staticClass:"home_title"},[e._v("微人事")]),e._v(" "),n("div",{staticStyle:{display:"flex","align-items":"center","margin-right":"7px"}},[n("el-dropdown",{on:{command:e.handleCommand}},[n("span",{staticClass:"el-dropdown-link home_userinfo",staticStyle:{display:"flex","align-items":"center"}},[e._v("\n "+e._s(e.user.name)+"\n "),n("i",[""!=e.user.userface?n("img",{staticStyle:{width:"40px",height:"40px","margin-right":"5px","margin-left":"5px","border-radius":"40px"},attrs:{src:e.user.userface}}):e._e()])]),e._v(" "),n("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[n("el-dropdown-item",[e._v("个人中心")]),e._v(" "),n("el-dropdown-item",[e._v("设置")]),e._v(" "),n("el-dropdown-item",{attrs:{command:"logout",divided:""}},[e._v("注销")])],1)],1)],1)]),e._v(" "),n("el-container",[n("el-aside",{staticClass:"home-aside",attrs:{width:"180px"}},[n("div",{staticStyle:{display:"flex","justify-content":"flex-start",width:"180px","text-align":"left"}},[n("el-menu",{staticStyle:{background:"#ececec",width:"180px"},attrs:{"unique-opened":"",router:""}},[e._l(this.routes,function(t,r){return t.hidden?e._e():[n("el-submenu",{key:r,attrs:{index:r+""}},[n("template",{slot:"title"},[n("i",{class:t.iconCls,staticStyle:{color:"#20a0ff",width:"14px"}}),e._v(" "),n("span",{attrs:{slot:"title"},slot:"title"},[e._v(e._s(t.name))])]),e._v(" "),e._l(t.children,function(t){return n("el-menu-item",{key:t.path,staticStyle:{"padding-left":"30px","padding-right":"0px","margin-left":"0px",width:"170px","text-align":"left"},attrs:{width:"180px",index:t.path}},[e._v(e._s(t.name)+"\n ")])})],2)]})],2)],1)]),e._v(" "),n("el-container",[n("el-main",[n("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},[n("el-breadcrumb-item",{attrs:{to:{path:"/home"}}},[e._v("首页")]),e._v(" "),n("el-breadcrumb-item",{domProps:{textContent:e._s(this.$router.currentRoute.name)}})],1),e._v(" "),n("keep-alive",[this.$route.meta.keepAlive?n("router-view"):e._e()],1),e._v(" "),this.$route.meta.keepAlive?e._e():n("router-view")],1)],1)],1)],1)],1)},staticRenderFns:[]};var o=n("VU/8")({mounted:function(){var e=this;this.$alert("为了确保所有的小伙伴都能看到完整的数据演示,数据库只开放了查询权限和部分字段的更新权限,其他权限都不具备,完整权限的演示需要大家在自己本地部署后,换一个正常的数据库用户后即可查看,这点请大家悉知!","友情提示",{confirmButtonText:"确定",callback:function(t){e.$notify({title:"重要重要!",type:"warning",message:"小伙伴们需要注意的是,目前只有权限管理模块完工了,因此这个项目中你无法看到所有的功能,除了权限管理相关的模块。权限管理相关的模块主要有两个,分别是 [系统管理->基础信息设置->权限组] 可以管理角色和资源的关系, [系统管理->操作员管理] 可以管理用户和角色的关系。",duration:0})}})},methods:{handleCommand:function(e){var t=this;"logout"==e&&this.$confirm("注销登录, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.getRequest("/logout"),t.$store.commit("logout"),t.$router.replace({path:"/"})}).catch(function(){t.$message({type:"info",message:"取消"})})}},data:function(){return{}},computed:{user:function(){return this.$store.state.user},routes:function(){return this.$store.state.routes}}},r,!1,function(e){n("Nrxs")},null,null);t.default=o.exports},oAV5:function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return s});var r=n("VsUZ"),o=n("zL8q"),a=(n.n(o),function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=0;r<t.length;r++){var a=t[r];if(null==a||""==a||void 0==a)return o.Message.warning({message:"数据不能为空!"}),!1}return!0}),s=function(e,t){t.state.routes.length>0||Object(r.b)("/config/sysmenu").then(function(n){if(n&&200==n.status){var r=i(n.data);e.addRoutes(r),t.commit("initMenu",r)}})},i=function e(t){var r=[];return t.forEach(function(t){var o=t.path,a=t.component,s=t.name,i=t.meta,u=t.iconCls,l=t.children;l&&l instanceof Array&&(l=e(l));var c={path:o,component:function(e){a.startsWith("Home")?n.e(0).then(function(){var t=[n("2eoi")("./"+a+".vue")];e.apply(null,t)}.bind(this)).catch(n.oe):a.startsWith("Emp")?n.e(5).then(function(){var t=[n("8cST")("./"+a+".vue")];e.apply(null,t)}.bind(this)).catch(n.oe):a.startsWith("Per")?n.e(3).then(function(){var t=[n("sALK")("./"+a+".vue")];e.apply(null,t)}.bind(this)).catch(n.oe):a.startsWith("Sal")?n.e(2).then(function(){var t=[n("9Acn")("./"+a+".vue")];e.apply(null,t)}.bind(this)).catch(n.oe):a.startsWith("Sta")?n.e(4).then(function(){var t=[n("nCU1")("./"+a+".vue")];e.apply(null,t)}.bind(this)).catch(n.oe):a.startsWith("Sys")&&n.e(1).then(function(){var t=[n("LJAE")("./"+a+".vue")];e.apply(null,t)}.bind(this)).catch(n.oe)},name:s,iconCls:u,meta:i,children:l};r.push(c)}),r}},oWFQ:function(e,t){},tvR6:function(e,t){},xJsL:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r={data:function(){return{rules:{account:[{required:!0,message:"请输入用户名",trigger:"blur"}],checkPass:[{required:!0,message:"请输入密码",trigger:"blur"}]},checked:!0,loginForm:{username:"admin",password:"123"},loading:!1}},methods:{submitClick:function(){var e=this;this.loading=!0,this.postRequest("/login",{username:this.loginForm.username,password:this.loginForm.password}).then(function(t){if(e.loading=!1,t&&200==t.status){var n=t.data;e.$store.commit("login",n.msg);var r=e.$route.query.redirect;e.$router.replace({path:"/"==r||void 0==r?"/home":r})}})}}},o={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("el-form",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"login-container",attrs:{rules:e.rules,"label-position":"left","label-width":"0px"}},[n("h3",{staticClass:"login_title"},[e._v("系统登录")]),e._v(" "),n("el-form-item",{attrs:{prop:"account"}},[n("el-input",{attrs:{type:"text","auto-complete":"off",placeholder:"账号"},model:{value:e.loginForm.username,callback:function(t){e.$set(e.loginForm,"username",t)},expression:"loginForm.username"}})],1),e._v(" "),n("el-form-item",{attrs:{prop:"checkPass"}},[n("el-input",{attrs:{type:"password","auto-complete":"off",placeholder:"密码"},model:{value:e.loginForm.password,callback:function(t){e.$set(e.loginForm,"password",t)},expression:"loginForm.password"}})],1),e._v(" "),n("el-checkbox",{staticClass:"login_remember",attrs:{"label-position":"left"},model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}},[e._v("记住密码")]),e._v(" "),n("el-form-item",{staticStyle:{width:"100%"}},[n("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},nativeOn:{click:function(t){t.preventDefault(),e.submitClick(t)}}},[e._v("登录")])],1)],1)},staticRenderFns:[]};var a=n("VU/8")(r,o,!1,function(e){n("oWFQ")},null,null);t.default=a.exports}},["NHnr"]);
//# sourceMappingURL=app.6fbbafe4595d1e44d075.js.map
\ No newline at end of file
!function(e){var n=window.webpackJsonp;window.webpackJsonp=function(r,c,a){for(var f,i,u,d=0,s=[];d<r.length;d++)i=r[d],t[i]&&s.push(t[i][0]),t[i]=0;for(f in c)Object.prototype.hasOwnProperty.call(c,f)&&(e[f]=c[f]);for(n&&n(r,c,a);s.length;)s.shift()();if(a)for(d=0;d<a.length;d++)u=o(o.s=a[d]);return u};var r={},t={8:0};function o(n){if(r[n])return r[n].exports;var t=r[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,o),t.l=!0,t.exports}o.e=function(e){var n=t[e];if(0===n)return new Promise(function(e){e()});if(n)return n[2];var r=new Promise(function(r,o){n=t[e]=[r,o]});n[2]=r;var c=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.charset="utf-8",a.async=!0,a.timeout=12e4,o.nc&&a.setAttribute("nonce",o.nc),a.src=o.p+"static/js/"+e+"."+{0:"8b42c0bf82833d03d7ae",1:"8f568a99a42c381bf44f",2:"9ff52b878e2c6af33db4",3:"f2af1e5f79c4750ed876",4:"b25d67ddc90d6ac44980",5:"b020f2109c9d08ebc495",6:"59f7a0d2e440c37c0dac",7:"6fbbafe4595d1e44d075"}[e]+".js";var f=setTimeout(i,12e4);a.onerror=a.onload=i;function i(){a.onerror=a.onload=null,clearTimeout(f);var n=t[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),t[e]=void 0)}return c.appendChild(a),r},o.m=e,o.c=r,o.d=function(e,n,r){o.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},o.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(n,"a",n),n},o.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},o.p="/",o.oe=function(e){throw console.error(e),e}}([]);
//# sourceMappingURL=manifest.89248ccd3135d8ab6974.js.map
\ No newline at end of file
{"version":3,"sources":["webpack:///webpack/bootstrap 3dcfe729e6053738eae4"],"names":["parentJsonpFunction","window","chunkIds","moreModules","executeModules","moduleId","chunkId","result","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","shift","__webpack_require__","s","installedModules","8","exports","module","l","e","installedChunkData","Promise","resolve","promise","reject","head","document","getElementsByTagName","script","createElement","type","charset","async","timeout","nc","setAttribute","src","p","0","1","2","3","4","5","6","7","setTimeout","onScriptComplete","onerror","onload","clearTimeout","chunk","Error","undefined","appendChild","m","c","d","name","getter","o","defineProperty","configurable","enumerable","get","n","__esModule","object","property","oe","err","console","error"],"mappings":"aACA,IAAAA,EAAAC,OAAA,aACAA,OAAA,sBAAAC,EAAAC,EAAAC,GAIA,IADA,IAAAC,EAAAC,EAAAC,EAAAC,EAAA,EAAAC,KACQD,EAAAN,EAAAQ,OAAoBF,IAC5BF,EAAAJ,EAAAM,GACAG,EAAAL,IACAG,EAAAG,KAAAD,EAAAL,GAAA,IAEAK,EAAAL,GAAA,EAEA,IAAAD,KAAAF,EACAU,OAAAC,UAAAC,eAAAC,KAAAb,EAAAE,KACAY,EAAAZ,GAAAF,EAAAE,IAIA,IADAL,KAAAE,EAAAC,EAAAC,GACAK,EAAAC,QACAD,EAAAS,OAAAT,GAEA,GAAAL,EACA,IAAAI,EAAA,EAAYA,EAAAJ,EAAAM,OAA2BF,IACvCD,EAAAY,IAAAC,EAAAhB,EAAAI,IAGA,OAAAD,GAIA,IAAAc,KAGAV,GACAW,EAAA,GAIA,SAAAH,EAAAd,GAGA,GAAAgB,EAAAhB,GACA,OAAAgB,EAAAhB,GAAAkB,QAGA,IAAAC,EAAAH,EAAAhB,IACAG,EAAAH,EACAoB,GAAA,EACAF,YAUA,OANAN,EAAAZ,GAAAW,KAAAQ,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAA,SAAApB,GACA,IAAAqB,EAAAhB,EAAAL,GACA,OAAAqB,EACA,WAAAC,QAAA,SAAAC,GAA0CA,MAI1C,GAAAF,EACA,OAAAA,EAAA,GAIA,IAAAG,EAAA,IAAAF,QAAA,SAAAC,EAAAE,GACAJ,EAAAhB,EAAAL,IAAAuB,EAAAE,KAEAJ,EAAA,GAAAG,EAGA,IAAAE,EAAAC,SAAAC,qBAAA,WACAC,EAAAF,SAAAG,cAAA,UACAD,EAAAE,KAAA,kBACAF,EAAAG,QAAA,QACAH,EAAAI,OAAA,EACAJ,EAAAK,QAAA,KAEArB,EAAAsB,IACAN,EAAAO,aAAA,QAAAvB,EAAAsB,IAEAN,EAAAQ,IAAAxB,EAAAyB,EAAA,aAAAtC,EAAA,KAAwEuC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,uBAAAC,EAAA,wBAAwN9C,GAAA,MAChS,IAAAkC,EAAAa,WAAAC,EAAA,MACAnB,EAAAoB,QAAApB,EAAAqB,OAAAF,EACA,SAAAA,IAEAnB,EAAAoB,QAAApB,EAAAqB,OAAA,KACAC,aAAAjB,GACA,IAAAkB,EAAA/C,EAAAL,GACA,IAAAoD,IACAA,GACAA,EAAA,OAAAC,MAAA,iBAAArD,EAAA,aAEAK,EAAAL,QAAAsD,GAKA,OAFA5B,EAAA6B,YAAA1B,GAEAL,GAIAX,EAAA2C,EAAA7C,EAGAE,EAAA4C,EAAA1C,EAGAF,EAAA6C,EAAA,SAAAzC,EAAA0C,EAAAC,GACA/C,EAAAgD,EAAA5C,EAAA0C,IACApD,OAAAuD,eAAA7C,EAAA0C,GACAI,cAAA,EACAC,YAAA,EACAC,IAAAL,KAMA/C,EAAAqD,EAAA,SAAAhD,GACA,IAAA0C,EAAA1C,KAAAiD,WACA,WAA2B,OAAAjD,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAA6C,EAAAE,EAAA,IAAAA,GACAA,GAIA/C,EAAAgD,EAAA,SAAAO,EAAAC,GAAsD,OAAA9D,OAAAC,UAAAC,eAAAC,KAAA0D,EAAAC,IAGtDxD,EAAAyB,EAAA,IAGAzB,EAAAyD,GAAA,SAAAC,GAA8D,MAApBC,QAAAC,MAAAF,GAAoBA","file":"static/js/manifest.89248ccd3135d8ab6974.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tvar parentJsonpFunction = window[\"webpackJsonp\"];\n \twindow[\"webpackJsonp\"] = function webpackJsonpCallback(chunkIds, moreModules, executeModules) {\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [], result;\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules, executeModules);\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n \t\tif(executeModules) {\n \t\t\tfor(i=0; i < executeModules.length; i++) {\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = executeModules[i]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t};\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// objects to store loaded and loading chunks\n \tvar installedChunks = {\n \t\t8: 0\n \t};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData === 0) {\n \t\t\treturn new Promise(function(resolve) { resolve(); });\n \t\t}\n\n \t\t// a Promise means \"currently loading\".\n \t\tif(installedChunkData) {\n \t\t\treturn installedChunkData[2];\n \t\t}\n\n \t\t// setup Promise in chunk cache\n \t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t});\n \t\tinstalledChunkData[2] = promise;\n\n \t\t// start chunk loading\n \t\tvar head = document.getElementsByTagName('head')[0];\n \t\tvar script = document.createElement('script');\n \t\tscript.type = 'text/javascript';\n \t\tscript.charset = 'utf-8';\n \t\tscript.async = true;\n \t\tscript.timeout = 120000;\n\n \t\tif (__webpack_require__.nc) {\n \t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t}\n \t\tscript.src = __webpack_require__.p + \"static/js/\" + chunkId + \".\" + {\"0\":\"8b42c0bf82833d03d7ae\",\"1\":\"8f568a99a42c381bf44f\",\"2\":\"9ff52b878e2c6af33db4\",\"3\":\"f2af1e5f79c4750ed876\",\"4\":\"b25d67ddc90d6ac44980\",\"5\":\"b020f2109c9d08ebc495\",\"6\":\"59f7a0d2e440c37c0dac\",\"7\":\"6fbbafe4595d1e44d075\"}[chunkId] + \".js\";\n \t\tvar timeout = setTimeout(onScriptComplete, 120000);\n \t\tscript.onerror = script.onload = onScriptComplete;\n \t\tfunction onScriptComplete() {\n \t\t\t// avoid mem leaks in IE.\n \t\t\tscript.onerror = script.onload = null;\n \t\t\tclearTimeout(timeout);\n \t\t\tvar chunk = installedChunks[chunkId];\n \t\t\tif(chunk !== 0) {\n \t\t\t\tif(chunk) {\n \t\t\t\t\tchunk[1](new Error('Loading chunk ' + chunkId + ' failed.'));\n \t\t\t\t}\n \t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t}\n \t\t};\n \t\thead.appendChild(script);\n\n \t\treturn promise;\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 3dcfe729e6053738eae4"],"sourceRoot":""}
\ No newline at end of file
此差异已折叠。
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins": ["transform-vue-jsx", "transform-runtime"]
}
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
.DS_Store
node_modules/
/dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
// to edit target browsers: use "browserslist" field in package.json
"postcss-import": {},
"autoprefixer": {}
}
}
# vuehr
> A Vue.js project
## Build Setup
``` bash
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# build for production and view the bundle analyzer report
npm run build --report
```
For a detailed explanation on how things work, check out the [guide](http://vuejs-templates.github.io/webpack/) and [docs for vue-loader](http://vuejs.github.io/vue-loader).
'use strict'
require('./check-versions')()
process.env.NODE_ENV = 'production'
const ora = require('ora')
const rm = require('rimraf')
const path = require('path')
const chalk = require('chalk')
const webpack = require('webpack')
const config = require('../config')
const webpackConfig = require('./webpack.prod.conf')
const spinner = ora('building for production...')
spinner.start()
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
if (err) throw err
webpack(webpackConfig, (err, stats) => {
spinner.stop()
if (err) throw err
process.stdout.write(stats.toString({
colors: true,
modules: false,
children: false, // if you are using ts-loader, setting this to true will make tyescript errors show up during build
chunks: false,
chunkModules: false
}) + '\n\n')
if (stats.hasErrors()) {
console.log(chalk.red(' Build failed with errors.\n'))
process.exit(1)
}
console.log(chalk.cyan(' Build complete.\n'))
console.log(chalk.yellow(
' Tip: built files are meant to be served over an HTTP server.\n' +
' Opening index.html over file:// won\'t work.\n'
))
})
})
'use strict'
const chalk = require('chalk')
const semver = require('semver')
const packageConfig = require('../package.json')
const shell = require('shelljs')
function exec (cmd) {
return require('child_process').execSync(cmd).toString().trim()
}
const versionRequirements = [
{
name: 'node',
currentVersion: semver.clean(process.version),
versionRequirement: packageConfig.engines.node
}
]
if (shell.which('npm')) {
versionRequirements.push({
name: 'npm',
currentVersion: exec('npm --version'),
versionRequirement: packageConfig.engines.npm
})
}
module.exports = function () {
const warnings = []
for (let i = 0; i < versionRequirements.length; i++) {
const mod = versionRequirements[i]
if (!semver.satisfies(mod.currentVersion, mod.versionRequirement)) {
warnings.push(mod.name + ': ' +
chalk.red(mod.currentVersion) + ' should be ' +
chalk.green(mod.versionRequirement)
)
}
}
if (warnings.length) {
console.log('')
console.log(chalk.yellow('To use this template, you must update following to modules:'))
console.log()
for (let i = 0; i < warnings.length; i++) {
const warning = warnings[i]
console.log(' ' + warning)
}
console.log()
process.exit(1)
}
}
'use strict'
const path = require('path')
const config = require('../config')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const packageConfig = require('../package.json')
exports.assetsPath = function (_path) {
const assetsSubDirectory = process.env.NODE_ENV === 'production'
? config.build.assetsSubDirectory
: config.dev.assetsSubDirectory
return path.posix.join(assetsSubDirectory, _path)
}
exports.cssLoaders = function (options) {
options = options || {}
const cssLoader = {
loader: 'css-loader',
options: {
sourceMap: options.sourceMap
}
}
const postcssLoader = {
loader: 'postcss-loader',
options: {
sourceMap: options.sourceMap
}
}
// generate loader string to be used with extract text plugin
function generateLoaders (loader, loaderOptions) {
const loaders = options.usePostCSS ? [cssLoader, postcssLoader] : [cssLoader]
if (loader) {
loaders.push({
loader: loader + '-loader',
options: Object.assign({}, loaderOptions, {
sourceMap: options.sourceMap
})
})
}
// Extract CSS when that option is specified
// (which is the case during production build)
if (options.extract) {
return ExtractTextPlugin.extract({
use: loaders,
fallback: 'vue-style-loader'
})
} else {
return ['vue-style-loader'].concat(loaders)
}
}
// https://vue-loader.vuejs.org/en/configurations/extract-css.html
return {
css: generateLoaders(),
postcss: generateLoaders(),
less: generateLoaders('less'),
sass: generateLoaders('sass', { indentedSyntax: true }),
scss: generateLoaders('sass'),
stylus: generateLoaders('stylus'),
styl: generateLoaders('stylus')
}
}
// Generate loaders for standalone style files (outside of .vue)
exports.styleLoaders = function (options) {
const output = []
const loaders = exports.cssLoaders(options)
for (const extension in loaders) {
const loader = loaders[extension]
output.push({
test: new RegExp('\\.' + extension + '$'),
use: loader
})
}
return output
}
exports.createNotifierCallback = () => {
const notifier = require('node-notifier')
return (severity, errors) => {
if (severity !== 'error') return
const error = errors[0]
const filename = error.file && error.file.split('!').pop()
notifier.notify({
title: packageConfig.name,
message: severity + ': ' + error.name,
subtitle: filename || '',
icon: path.join(__dirname, 'logo.png')
})
}
}
'use strict'
const utils = require('./utils')
const config = require('../config')
const isProduction = process.env.NODE_ENV === 'production'
const sourceMapEnabled = isProduction
? config.build.productionSourceMap
: config.dev.cssSourceMap
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction
}),
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}
'use strict'
const path = require('path')
const utils = require('./utils')
const config = require('../config')
const vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
module.exports = {
context: path.resolve(__dirname, '../'),
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
filename: '[name].js',
publicPath: process.env.NODE_ENV === 'production'
? config.build.assetsPublicPath
: config.dev.assetsPublicPath
},
resolve: {
extensions: ['.js', '.vue', '.json'],
alias: {
'vue$': 'vue/dist/vue.esm.js',
'@': resolve('src'),
}
},
module: {
rules: [
{
test: /\.vue$/,
loader: 'vue-loader',
options: vueLoaderConfig
},
{
test: /\.js$/,
loader: 'babel-loader',
include: [resolve('src'), resolve('test')]
},
{
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('img/[name].[hash:7].[ext]')
}
},
{
test: /\.(mp4|webm|ogg|mp3|wav|flac|aac)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('media/[name].[hash:7].[ext]')
}
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000,
name: utils.assetsPath('fonts/[name].[hash:7].[ext]')
}
}
]
},
node: {
// prevent webpack from injecting useless setImmediate polyfill because Vue
// source contains it (although only uses it if it's native).
setImmediate: false,
// prevent webpack from injecting mocks to Node native modules
// that does not make sense for the client
dgram: 'empty',
fs: 'empty',
net: 'empty',
tls: 'empty',
child_process: 'empty'
}
}
'use strict'
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const FriendlyErrorsPlugin = require('friendly-errors-webpack-plugin')
const portfinder = require('portfinder')
const HOST = process.env.HOST
const PORT = process.env.PORT && Number(process.env.PORT)
const devWebpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({ sourceMap: config.dev.cssSourceMap, usePostCSS: true })
},
// cheap-module-eval-source-map is faster for development
devtool: config.dev.devtool,
// these devServer options should be customized in /config/index.js
devServer: {
clientLogLevel: 'warning',
historyApiFallback: true,
hot: true,
compress: true,
host: HOST || config.dev.host,
port: PORT || config.dev.port,
open: config.dev.autoOpenBrowser,
overlay: config.dev.errorOverlay
? { warnings: false, errors: true }
: false,
publicPath: config.dev.assetsPublicPath,
proxy: config.dev.proxyTable,
quiet: true, // necessary for FriendlyErrorsPlugin
watchOptions: {
poll: config.dev.poll,
}
},
plugins: [
new webpack.DefinePlugin({
'process.env': require('../config/dev.env')
}),
new webpack.HotModuleReplacementPlugin(),
new webpack.NamedModulesPlugin(), // HMR shows correct file names in console on update.
new webpack.NoEmitOnErrorsPlugin(),
// https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: 'index.html',
template: 'index.html',
inject: true
}),
]
})
module.exports = new Promise((resolve, reject) => {
portfinder.basePort = process.env.PORT || config.dev.port
portfinder.getPort((err, port) => {
if (err) {
reject(err)
} else {
// publish the new Port, necessary for e2e tests
process.env.PORT = port
// add port to devServer config
devWebpackConfig.devServer.port = port
// Add FriendlyErrorsPlugin
devWebpackConfig.plugins.push(new FriendlyErrorsPlugin({
compilationSuccessInfo: {
messages: [`Your application is running here: http://${devWebpackConfig.devServer.host}:${port}`],
},
onErrors: config.dev.notifyOnErrors
? utils.createNotifierCallback()
: undefined
}))
resolve(devWebpackConfig)
}
})
})
'use strict'
const path = require('path')
const utils = require('./utils')
const webpack = require('webpack')
const config = require('../config')
const merge = require('webpack-merge')
const baseWebpackConfig = require('./webpack.base.conf')
const CopyWebpackPlugin = require('copy-webpack-plugin')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const OptimizeCSSPlugin = require('optimize-css-assets-webpack-plugin')
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const env = require('../config/prod.env')
const webpackConfig = merge(baseWebpackConfig, {
module: {
rules: utils.styleLoaders({
sourceMap: config.build.productionSourceMap,
extract: true,
usePostCSS: true
})
},
devtool: config.build.productionSourceMap ? config.build.devtool : false,
output: {
path: config.build.assetsRoot,
filename: utils.assetsPath('js/[name].[chunkhash].js'),
chunkFilename: utils.assetsPath('js/[id].[chunkhash].js')
},
plugins: [
// http://vuejs.github.io/vue-loader/en/workflow/production.html
new webpack.DefinePlugin({
'process.env': env
}),
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false
}
},
sourceMap: config.build.productionSourceMap,
parallel: true
}),
// extract css into its own file
new ExtractTextPlugin({
filename: utils.assetsPath('css/[name].[contenthash].css'),
// Setting the following option to `false` will not extract CSS from codesplit chunks.
// Their CSS will instead be inserted dynamically with style-loader when the codesplit chunk has been loaded by webpack.
// It's currently set to `true` because we are seeing that sourcemaps are included in the codesplit bundle as well when it's `false`,
// increasing file size: https://github.com/vuejs-templates/webpack/issues/1110
allChunks: true,
}),
// Compress extracted CSS. We are using this plugin so that possible
// duplicated CSS from different components can be deduped.
new OptimizeCSSPlugin({
cssProcessorOptions: config.build.productionSourceMap
? { safe: true, map: { inline: false } }
: { safe: true }
}),
// generate dist index.html with correct asset hash for caching.
// you can customize output by editing /index.html
// see https://github.com/ampedandwired/html-webpack-plugin
new HtmlWebpackPlugin({
filename: config.build.index,
template: 'index.html',
inject: true,
minify: {
removeComments: true,
collapseWhitespace: true,
removeAttributeQuotes: true
// more options:
// https://github.com/kangax/html-minifier#options-quick-reference
},
// necessary to consistently work with multiple chunks via CommonsChunkPlugin
chunksSortMode: 'dependency'
}),
// keep module.id stable when vender modules does not change
new webpack.HashedModuleIdsPlugin(),
// enable scope hoisting
new webpack.optimize.ModuleConcatenationPlugin(),
// split vendor js into its own file
new webpack.optimize.CommonsChunkPlugin({
name: 'vendor',
minChunks (module) {
// any required modules inside node_modules are extracted to vendor
return (
module.resource &&
/\.js$/.test(module.resource) &&
module.resource.indexOf(
path.join(__dirname, '../node_modules')
) === 0
)
}
}),
// extract webpack runtime and module manifest to its own file in order to
// prevent vendor hash from being updated whenever app bundle is updated
new webpack.optimize.CommonsChunkPlugin({
name: 'manifest',
minChunks: Infinity
}),
// This instance extracts shared chunks from code splitted chunks and bundles them
// in a separate chunk, similar to the vendor chunk
// see: https://webpack.js.org/plugins/commons-chunk-plugin/#extra-async-commons-chunk
new webpack.optimize.CommonsChunkPlugin({
name: 'app',
async: 'vendor-async',
children: true,
minChunks: 3
}),
// copy custom static assets
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.build.assetsSubDirectory,
ignore: ['.*']
}
])
]
})
if (config.build.productionGzip) {
const CompressionWebpackPlugin = require('compression-webpack-plugin')
webpackConfig.plugins.push(
new CompressionWebpackPlugin({
asset: '[path].gz[query]',
algorithm: 'gzip',
test: new RegExp(
'\\.(' +
config.build.productionGzipExtensions.join('|') +
')$'
),
threshold: 10240,
minRatio: 0.8
})
)
}
if (config.build.bundleAnalyzerReport) {
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin
webpackConfig.plugins.push(new BundleAnalyzerPlugin())
}
module.exports = webpackConfig
'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"'
})
'use strict'
// Template version: 1.2.7
// see http://vuejs-templates.github.io/webpack for documentation.
const path = require('path')
module.exports = {
dev: {
// Paths
assetsSubDirectory: 'static',
assetsPublicPath: '/',
proxyTable: {
'/': {
target: 'http://localhost:8082',
changeOrigin: true,
pathRewrite: {
'^/': ''
}
}
},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8080, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions-
/**
* Source Maps
*/
// https://webpack.js.org/configuration/devtool/#development
devtool: 'eval-source-map',
// If you have problems debugging vue-files in devtools,
// set this to false - it *may* help
// https://vue-loader.vuejs.org/en/options.html#cachebusting
cacheBusting: true,
// CSS Sourcemaps off by default because relative paths are "buggy"
// with this option, according to the CSS-Loader README
// (https://github.com/webpack/css-loader#sourcemaps)
// In our experience, they generally work as expected,
// just be aware of this issue when enabling this option.
cssSourceMap: false,
},
build: {
// Template for index.html
index: path.resolve(__dirname, '../dist/index.html'),
// Paths
assetsRoot: path.resolve(__dirname, '../dist'),
assetsSubDirectory: 'static',
assetsPublicPath: '/',
/**
* Source Maps
*/
productionSourceMap: true,
// https://webpack.js.org/configuration/devtool/#production
devtool: '#source-map',
// Gzip off by default as many popular static hosts such as
// Surge or Netlify already gzip all static assets for you.
// Before setting to `true`, make sure to:
// npm install --save-dev compression-webpack-plugin
productionGzip: false,
productionGzipExtensions: ['js', 'css'],
// Run the build command with an extra argument to
// View the bundle analyzer report after build finishes:
// `npm run build --report`
// Set to `true` or `false` to always turn it on or off
bundleAnalyzerReport: process.env.npm_config_report
}
}
'use strict'
module.exports = {
NODE_ENV: '"production"'
}
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
<template>
<div>
<h1>高级资料</h1>
</div>
</template>
此差异已折叠。
此差异已折叠。
此差异已折叠。
<template>
<div>
<h1>员工调动</h1>
</div>
</template>
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
<template>
<div>
<h1>
员工账套设置
</h1>
</div>
</template>
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册