当前位置: 移动技术网 > IT编程>开发语言>PHP > Laravel + Vue + Element 考勤应用 - 人力资源系统

Laravel + Vue + Element 考勤应用 - 人力资源系统

2019年10月31日  | 移动技术网IT编程  | 我要评论

项目地址 bee

介绍


bee 是人力资源系统中的考勤应用,主要功能用于员工申请假单。bee具有较高的性能、扩展性等,其中包括前后端分离、插拔式的规则验证(验证器)、数据过滤(装饰器)、消息队列等,后端在laravel 的mvc模式上,又添加了services、repositories层,明确每个类的职责,使用passport 的密码模式获取接口数据。

技术栈


  • 服务器:linux(centos 7)、nginx
  • 前端:element、vue、vue-router、vuex、webpack、v-calendar
  • 资源:elephant
  • 后端:laravel
  • 缓存:redis
    其他的就是一些基本工具了,比如node、npm(cnpm)、composer、git等

演示

1. 登录

1

2. 申请

2

3. 编辑

3

4. 审批

4

5. 搜索

5

安装


1. 下载
git clone git@github.com:sexyphoenix/bee.git 
2. laravel
composer install
chmod -r 777 storage
php artisan key:generate
3. 上传文件夹
mkdir -p uploads/bee
chmod -r 777 uploads
4. 配置.env
cp .env.example .env
app_url=http://localhost
asset_url=http://localhost

db_connection=mysql
db_host=127.0.0.1
db_port=3306
db_database=homestead
db_username=homestead
db_password=secret

redis_host=127.0.0.1
redis_password=null
redis_port=6379
5. 数据库
php artisan migrate
6. passport
php artisan passport:keys
php artisan passport:client --password --name='bee'  //name 自定义
7. 开启消息队列
php artisan queue:work bee --queue=apply --sleep=3 --tries=3 & > /dev/null
8. nginx
server {
    listen 80;
    server_name dev.bee.goods; // 自定义
    index  index.htm index.php;

    location / {
        rewrite ^/(.*)$ /index.php/$1 last;
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ /uploads/ {
       root "/var/www/bee"; // 自定义
    }

    location ~ \.(html|gif|jpg|jpeg|css|js|eot|svg|ttf|woff|woff2|png)$ {
      root "/var/www/bee/public"; // 自定义
    }

    location ~ (.+\.php)(.*)$ {

        root /var/www/bee/public; // 自定义
        fastcgi_split_path_info ^(.+\.php)(.+)$;
        fastcgi_pass unix:/var/run/php-fpm/php7-fpm.sock;  // 自定义
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param script_filename $document_root$fastcgi_script_name;
        fastcgi_param path_info $fastcgi_path_info;

        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
     }
}
9. 前端
cnpm install //cnpm淘宝的

export const api_domain = 'http://xxx/beeapi'  //resources\js\config\bee.js 文件中修改域名
npm run dev
10. 导入基本数据(database\sql\bee.sql)

最后,注意配置域名到host。

打开 http://xxx/bee#/
账号:zhangxiaofan@qq.com 密码:123456

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网