js+css实现pc端可拖拽员工排班管理系统代码
代码语言:html
所属分类:其他
代码描述:js+css实现pc端可拖拽员工排班管理系统代码
代码标签: js css pc端 拖拽 员工 排班 管理 系统 代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>员工排班系统</title>
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/all.6.0.css">
<style>
:root {
--primary-color: #4361ee;
--primary-light: #4895ef;
--secondary-color: #3f37c9;
--accent-color: #4cc9f0;
--success-color: #4ade80;
--warning-color: #fbbf24;
--danger-color: #f87171;
--light-color: #f8f9fa;
--dark-color: #212529;
--gray-color: #6c757d;
--border-radius: 12px;
--box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1),0 4px 6px -2px rgba(0,0,0,0.05);
--transition: all .3s cubic-bezier(0.25,0.8,0.25,1)
}
* {
box-sizing: border-box;
margin: 0;
padding: 0
}
body {
font-family: 'Noto Sans SC',sans-serif;
background-color: #f1f5f9;
color: var(--dark-color);
line-height: 1.6;
padding: 20px
}
.container {
max-width: 1400px;
margin: 0 auto;
background-color: white;
border-radius: var(--border-radius);
box-shadow: var(--box-shadow);
overflow: hidden
}
header {
background: linear-gradient(135deg,var(--primary-color),var(--secondary-color));
color: white;
padding: 25px 30px;
position: relative;
overflow: hidden
}
header::before {
content: "";
position: absolute;
top: -50px;
right: -50px;
width: 200px;
height: 200px;
background: rgba(255,255,255,0.1);
border-radius: 50%
}
header::after {
content: "";
position: absolute;
bottom: -80px;
right: -30px;
width: 300px;
height: 300px;
background: rgba(255,255,255,0.05);
border-radius: 50%
}
h1 {
font-weight: 700;
font-size: 28px;
margin-bottom: 5px;
position: relative;
z-index: 1
}
.header-subtitle {
font-weight: 300;
opacity: .9;
font-size: 16px;
position: relative;
z-index: 1
}
.controls {
display: flex;
justify-content: space-between;
align-items: center;
padding: 20px 30px;
background-color: white;
border-bottom: 1px solid rgba(0,0,0,0.05)
}
.date-navigation {
display: flex;
align-items: center;
gap: 10px
}
.btn {
padding: 10px 20px;
border-radius: 50px;
border: 0;
font-weight: 500;
cursor: pointer;
transition: var(--transition);
display: inline-flex;
align-items: center;
gap: 8px
}
.btn i {
font-size: 14px
}
.btn-primary {
background-color: var(--primary-color);
color: white
}
.btn-primary:hover {
background-color: var(--secondary-color);
transform: translateY(-2px);
box-shadow: 0 4px 6px rgba(0,0,0,0.1)
}
.btn-outline {
background-color: transparent;
border: 1px solid var(--gray-color);
color: var(--gray-color)
}
.btn-outline:hover {
border-color: var(--primary-color);
color: var(--primary-color)
}
.btn-circle {
width: 40px;
height: 40px;
border-radius: 50%;
padding: 0;
justify-content: center;
background-color: white;
border: 1px solid #e2e8f0;
color: var(--gray-color)
}
.btn-circle:hover {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-color)
}
.current-week {
font-weight: 500;
min-width: 250px;
text-align: center;
font-size: 16px;
color: var(--dark-color)
}
.schedule-container {
display: flex;
min-height: 600px
}
.employee-list {
width: 250px;
border-right: 1px solid #e2e8f0;
padding: 20px;
background-color: #f8fafc
}
.employee-list h3 {
font-size: 18px;
margin-bottom: 20px;
color: var(--dark-color);
display: flex;
align-items: center;
gap: 10px
}
.employee-list h3 i {
color: var(--primary-color)
}
.employee-item {
padding: 15px;
margin-bottom: 10px;
background-color: white;
border-radius: var(--border-radius);
cursor: pointer;
transition: var(--transition);
border-left: 4px solid var(--primary-color);
box-shadow: 0 1px 3px rgba(0,0,0,0.05);
display: flex;
align-items: center;
gap: 10px
}
.employee-item:hover {
transform: translateX(5px);
box-shadow: 0 4px 6px rgba(0,0,0,0.1)
}
.employee-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
background-color: var(--primary-light);
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 500
}
.employee-info {
flex: 1
}
.employee-name {
font-weight: 500;
margin-bottom: 2px
}
.employee-position {
font-size: 12px;
color: var(--gray-color)
}
.schedule-grid {
flex: 1;
overflow-x: auto
}
.schedule-header {
display: grid;
grid-template-columns: repeat(7,1fr);
background-color: white;
color: var(--dark-color);
text-align: center;
font-weight: 500;
border-bottom: 1px solid #e2e8f0
}
.schedule-header div {
padding: 15px 10px;
border-right: 1px solid #e2e8f0;
transition: var(--transition)
}
.schedule-header div:hover {
background-color: #f8fafc
}
.schedule-header div:last-child {
border-right: 0
}
.day-name {
font-size: 16px;
margin-bottom: 5px
}
.day-date {
font-size: 14px;
color: var(--gray-color)
}
.schedule-body {
display: grid;
grid-template-columns: repeat(7,1fr);
background-color: #f8fafc
}
.day-column {
min-height: 500px;
border-right: 1px solid #e2e8f0;
padding: 10px;
transition: var(--transition);
position: relative
}
.day-column:hover {
background-color: rgba(255,255,255,0.7)
}
.day-column:last-child {
border-right: 0
}
.day-column.today {
background-color: rgba(67,97,238,0.05)
}
.day-column.today::after {
content: "今天";
position: absolute;
top: 10px;
right: 10px;
background-color: var(--primary-color);
color: white;
font-size: 12px;
padding: 2px 8px;
border-radius: 10px
}
.shift-slot {
background-color: white;
border-radius: var(--border-radius);
padding: 12px;
margin-bottom: 10px;
cursor: pointer;
transition: var(--transition);
box-shadow: 0 1px 2px rgba(0,0,0,0.05);
border-left: 4px solid var(--primary-color)
}
.shift-slot:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px rgba(0,0,0,0.1)
}
.shift-morning {
border-left-color: var(--success-color)
}
.shift-evening {
border-left-color: var(--warning-color)
}
.shift-night {
border-left-color: var(--secondary-color)
}
.shift-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 8px
}
.shift-type {
font-weight: 500;
font-size: 14px;
color: var(--gray-color)
}
.shift-time {
font-size: 12px;
background-color: #f1f5f9;
padding: 2px 6px;
border-radius: 4px;
color: var(--gray-color)
}
.shift-employee {
display: flex;
align-items: center;
.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0