This commit is contained in:
2025-08-08 10:38:10 +08:00
commit c7dc4d6c02
114 changed files with 11010 additions and 0 deletions
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

+121
View File
@@ -0,0 +1,121 @@
.quick-links {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: 16px;
margin: 20px 0;
list-style: none;
padding: 0;
}
.quick-link-item {
background: white;
border-radius: 12px;
transition: all 0.3s ease;
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
overflow: hidden;
}
.quick-link-item:hover {
transform: translateY(-4px);
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.quick-link {
display: block;
padding: 16px 20px;
color: #2c3e50;
text-decoration: none;
position: relative;
background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}
.quick-link:hover {
color: #1a73e8;
}
.quick-link::after {
content: '→';
position: absolute;
right: 20px;
opacity: 0;
transform: translateX(-10px);
transition: all 0.3s ease;
}
.quick-link:hover::after {
opacity: 1;
transform: translateX(0);
}
.about-container {
max-width: 800px;
margin: 30px auto;
padding: 40px;
background: #fff;
border-radius: 16px;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.about-header {
text-align: center;
margin-bottom: 40px;
}
.about-header h1 {
color: #2c3e50;
font-size: 2.2em;
margin-bottom: 15px;
font-weight: 600;
}
.about-content {
line-height: 1.8;
}
.about-section {
margin-bottom: 35px;
}
.about-section h2 {
color: #34495e;
font-size: 1.5em;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #eee;
}
.feature-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
margin: 20px 0;
}
.feature-item {
background: #f8f9fa;
padding: 20px;
border-radius: 12px;
transition: transform 0.2s;
}
.feature-item:hover {
transform: translateY(-5px);
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.dev-info {
background: #f8f9fa;
padding: 25px;
border-radius: 12px;
margin-top: 30px;
}
.dev-info p {
margin: 10px 0;
}
.footer {
margin-top: 40px;
text-align: center;
color: #7f8c8d;
font-size: 0.9em;
}
+7
View File
File diff suppressed because one or more lines are too long
+315
View File
@@ -0,0 +1,315 @@
/* 仪表盘容器 */
.dashboard_container {
padding: 20px;
background: #f8f9fa;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
/* 仪表盘标题 */
.dashboard_title {
font-size: 24px;
font-weight: 600;
color: #333;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 1px solid #e9ecef;
}
/* 仪表盘区块 */
.dashboard_section {
margin-bottom: 30px;
background: white;
border-radius: 8px;
padding: 20px;
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
/* 区块标题 */
.section_title {
font-size: 18px;
font-weight: 600;
color: #333;
margin-bottom: 20px;
display: flex;
align-items: center;
}
/* 图表容器 */
.chart_container {
display: flex;
flex-wrap: wrap;
gap: 20px;
margin-bottom: 20px;
}
/* 图表包装器 */
.chart_wrapper {
flex: 1;
min-width: 300px;
height: 300px;
background: white;
border-radius: 8px;
padding: 15px;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
/* 卡片网格布局 */
.card_grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 20px;
}
/* 仪表盘卡片 */
.dashboard_card {
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 8px rgba(0,0,0,0.08);
transition: transform 0.2s, box-shadow 0.2s;
}
.dashboard_card:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
/* 卡片头部 */
.card_header {
padding: 15px;
background: #f8f9fa;
border-bottom: 1px solid #e9ecef;
}
/* 卡片标题 */
.card_title {
font-size: 16px;
font-weight: 600;
color: #333;
margin: 0;
}
/* 卡片内容 */
.card_content {
padding: 15px;
}
/* 进度条容器 */
.progress_container {
height: 24px;
background: #e9ecef;
border-radius: 12px;
margin-bottom: 15px;
overflow: hidden;
}
/* 进度条 */
.progress_bar {
height: 100%;
background: linear-gradient(90deg, #0061f2 0%, #00a3ff 100%);
border-radius: 12px;
display: flex;
align-items: center;
justify-content: center;
transition: width 0.5s ease;
min-width: 30px;
}
/* 进度条文本 */
.progress_text {
color: white;
font-weight: 600;
font-size: 14px;
}
/* 统计详情 */
.stats_details {
display: flex;
justify-content: space-between;
}
/* 统计项 */
.stats_item {
display: flex;
flex-direction: column;
align-items: center;
}
/* 统计标签 */
.stats_label {
font-size: 12px;
color: #6c757d;
margin-bottom: 5px;
}
/* 统计值 */
.stats_value {
font-size: 16px;
font-weight: 600;
color: #333;
}
/* 表格容器 */
.table_container {
overflow-x: auto;
margin-top: 10px;
}
/* 仪表盘表格 */
.dashboard_table {
width: 100%;
border-collapse: collapse;
}
.dashboard_table th,
.dashboard_table td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #e9ecef;
}
.dashboard_table th {
background: #f8f9fa;
font-weight: 600;
color: #495057;
}
.dashboard_table tr:hover {
background: #f8f9fa;
}
/* 支局单元格 */
.branch_cell {
font-weight: 600;
background: #f8f9fa;
}
/* 状态标签 */
.status_badge {
display: inline-block;
padding: 4px 8px;
border-radius: 4px;
font-size: 12px;
font-weight: 600;
}
.status_badge.good {
background: #d4edda;
color: #155724;
}
.status_badge.normal {
background: #fff3cd;
color: #856404;
}
.status_badge.bad {
background: #f8d7da;
color: #721c24;
}
/* 手风琴容器 */
.accordion_container {
margin-top: 10px;
}
/* 手风琴项 */
.accordion_item {
margin-bottom: 10px;
border: 1px solid #e9ecef;
border-radius: 8px;
overflow: hidden;
}
/* 手风琴头部 */
.accordion_header {
padding: 15px;
background: #f8f9fa;
display: flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
transition: background 0.2s;
}
.accordion_header:hover {
background: #e9ecef;
}
/* 手风琴标题 */
.accordion_title {
font-size: 16px;
font-weight: 600;
color: #333;
}
/* 手风琴摘要 */
.accordion_summary {
display: flex;
align-items: center;
gap: 15px;
}
/* 手风琴图标 */
.accordion_icon {
font-size: 12px;
color: #6c757d;
transition: transform 0.2s;
}
/* 手风琴内容 */
.accordion_content {
max-height: 0;
overflow: hidden;
transition: max-height 0.3s ease;
}
/* 详情表格 */
.detail_table {
width: 100%;
border-collapse: collapse;
}
.detail_table th,
.detail_table td {
padding: 10px 15px;
text-align: left;
border-bottom: 1px solid #e9ecef;
}
.detail_table th {
background: #f8f9fa;
font-weight: 600;
color: #495057;
}
.detail_table tr:hover {
background: #f8f9fa;
}
/* 响应式调整 */
@media (max-width: 768px) {
.card_grid {
grid-template-columns: 1fr;
}
.dashboard_table {
min-width: 600px;
}
.accordion_summary {
flex-direction: column;
align-items: flex-start;
gap: 5px;
}
.chart_wrapper {
min-width: 100%;
height: 250px;
}
.chart_container {
flex-direction: column;
}
}
+475
View File
@@ -0,0 +1,475 @@
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
}
.modal-content {
background-color: white;
margin: 15% auto;
padding: 20px;
width: 300px;
text-align: center;
}
.modal-buttons {
margin-top: 15px;
}
.modal-buttons button {
margin: 0 10px;
padding: 5px 15px;
}
/* 备注编辑样式 */
.remark-display {
cursor: pointer;
color: #666;
transition: color 0.2s;
min-height: 20px;
display: inline-block;
min-width: 80px;
}
.remark-display:hover {
color: #007bff;
}
.remark-input {
padding: 4px 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
min-width: 120px;
transition: border-color 0.2s;
}
.remark-input:focus {
outline: none;
border-color: #007bff;
}
/* 模态框基础样式 */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1000;
backdrop-filter: blur(5px);
}
.modal-content {
position: relative;
background-color: #fff;
margin: 15vh auto;
padding: 25px;
width: 90%;
max-width: 500px;
border-radius: 12px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
animation: modalSlideIn 0.3s ease-out;
}
@keyframes modalSlideIn {
from {
transform: translateY(-30px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.modal-content h3 {
margin: 0 0 20px 0;
color: #333;
font-size: 1.5em;
font-weight: 600;
}
.modal-content p {
margin: 15px 0;
color: #666;
line-height: 1.5;
}
.modal-buttons {
display: flex;
justify-content: flex-end;
gap: 10px;
margin-top: 25px;
}
.modal-buttons button {
padding: 8px 20px;
border: none;
border-radius: 6px;
font-size: 14px;
cursor: pointer;
transition: all 0.2s ease;
}
.modal-buttons button:first-child {
background-color: #4CAF50;
color: white;
}
.modal-buttons button:last-child {
background-color: #f5f5f5;
color: #333;
}
.modal-buttons button:hover {
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* 验证码模态框特殊样式 */
#captchaModal .modal-content {
text-align: center;
}
#captchaImage {
margin: 15px 0;
border-radius: 4px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
#captchaInput {
width: 200px;
padding: 8px 12px;
margin: 15px 0;
border: 2px solid #eee;
border-radius: 6px;
font-size: 16px;
text-align: center;
transition: border-color 0.2s ease;
}
#captchaInput:focus {
outline: none;
border-color: #4CAF50;
}
/* 结果显示样式 */
#updatedCount {
font-weight: bold;
color: #4CAF50;
}
#resultMessage {
padding: 15px;
background-color: #f8f9fa;
border-radius: 8px;
text-align: center;
}
.dispatch_filter_group {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
flex-wrap: nowrap;
gap: 10px;
}
.dispatch_search_form {
display: flex;
align-items: center;
gap: 12px;
flex-wrap: nowrap;
max-width: 1000px;
width: 100%;
}
.dispatch_action_group {
display: flex;
gap: 10px;
}
.dispatch_action_bar {
display: flex;
gap: 12px;
justify-content: center;
align-items: center;
width: 100%;
}
.dispatch_btn {
min-width: 100px;
padding: 8px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
white-space: nowrap;
}
.dispatch_btn_primary {
background-color: #007bff;
color: white;
}
.dispatch_btn_primary:hover {
background-color: #5677fc;
}
.dispatch_btn_secondary_qx {
background-color: #607d8b;
color: white;
}
.dispatch_btn_secondary_qx:hover {
background-color: #b0bec5;
}
.dispatch_btn_secondary_fx {
background-color: #9e9e9e;
color: white;
}
.dispatch_btn_secondary_fx:hover {
background-color: #e0e0e0;
}
.dispatch_btn_secondary_bj {
background-color: #ff5722;
color: white;
}
.dispatch_btn_secondary_bj:hover {
background-color: #ff8a65;
}
.dispatch_btn_secondary_sxt {
background-color: #259b24;
color: white;
}
.dispatch_btn_secondary_sxt:hover {
background-color: #72d572;
}
.dispatch_filter {
position: sticky;
top: 0;
background-color: #f8f9fa;
padding: 15px;
border-radius: 4px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
margin-bottom: 10px;
z-index: 2;
display: flex;
justify-content: center;
}
.dispatch_search {
flex: 1;
min-width: 150px;
max-width: 250px;
padding: 8px 15px;
border: 1px solid #ddd;
border-radius: 4px;
}
.dispatch_btn {
padding: 8px 16px;
border: none;
border-radius: 4px;
cursor: pointer;
transition: all 0.3s ease;
}
.dispatch_btn_secondary {
background: #6c757d;
color: white;
margin-left: 10px;
}
.dispatch_btn_secondary:hover {
background: #545b62;
}
.dispatch_table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
position: relative;
z-index: 1;
}
.dispatch_table th {
background: #f8f9fa;
padding: 12px;
text-align: left;
font-weight: 600;
color: #495057;
border-bottom: 2px solid #dee2e6;
}
.dispatch_table td {
padding: 12px;
border-bottom: 1px solid #dee2e6;
color: #495057;
}
.dispatch_table tr:hover {
background-color: #f5f5f5;
}
.dispatch_checkbox {
width: 18px;
height: 18px;
cursor: pointer;
}
.dispatch_pagination {
margin-top: 10px;
text-align: center;
clear: both;
position: relative;
z-index: 3;
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
}
/* 移动端适配 */
@media (max-width: 991.98px) {
.dispatch_search_form {
flex-direction: column;
gap: 12px;
width: 100%;
}
.dispatch_action_group {
width: 100%;
}
.dispatch_search_form .dispatch_btn,
.dispatch_action_group .dispatch_btn {
flex: 1;
}
.dispatch_search {
width: 100%;
max-width: 100%;
margin: 0;
}
.dispatch_filter {
position: static; /* 移除固定定位 */
display: flex;
flex-direction: column;
gap: 12px;
padding: 12px;
}
.dispatch_filter form {
display: flex;
flex-direction: column;
gap: 10px;
}
.dispatch_filter_group {
flex-direction: column;
gap: 15px;
}
.dispatch_search {
width: 100%;
margin: 0;
}
.dispatch_action_bar {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
width: 100%;
}
.dispatch_btn {
min-width: unset;
width: 100%;
padding: 12px 15px;
font-size: 14px;
margin: 0;
display: flex;
align-items: center;
justify-content: center;
}
.dispatch_btn_primary {
grid-column: 1 / -1;
}
.dispatch_table {
display: block;
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}
.dispatch_table th,
.dispatch_table td {
min-width: 120px;
padding: 8px;
}
.dispatch_table th:first-child,
.dispatch_table td:first-child {
position: sticky;
left: 0;
background: white;
z-index: 1;
min-width: 60px;
}
.dispatch_checkbox {
width: 20px;
height: 20px;
}
.dispatch_pagination {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
gap: 10px;
flex-wrap: nowrap;
margin-top: 15px;
}
.dispatch_page_link {
white-space: nowrap;
padding: 8px 15px;
margin: 0;
}
.dispatch_page_info {
width: 100%;
text-align: center;
margin: 10px 0;
}
}
+400
View File
@@ -0,0 +1,400 @@
/* 筛选区域样式 */
.receive_filter {
margin: 20px 0;
padding: 20px;
background: #fff;
border-radius: 10px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
.filter_form {
display: flex;
align-items: center;
gap: 15px;
flex-wrap: wrap;
}
.filter_select {
padding: 8px 12px;
border: 1px solid #e2e8f0;
border-radius: 6px;
font-size: 14px;
background: white;
min-width: 150px;
outline: none;
transition: border-color 0.3s;
}
.filter_select:focus {
border-color: #4f46e5;
}
/* 统计卡片样式 */
.receive_stats {
margin: 20px 0;
padding: 20px;
background: #fff;
border-radius: 10px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}
.stats_item {
display: flex;
align-items: center;
margin-bottom: 20px;
padding: 15px;
background: linear-gradient(135deg, #6366f1, #4f46e5);
border-radius: 8px;
color: white;
}
.stats_label {
font-size: 1.1em;
opacity: 0.9;
}
.stats_value {
font-size: 1.8em;
font-weight: bold;
margin-left: auto;
}
.stats_branches {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 15px;
margin-top: 20px;
}
.stats_branches_row {
display: flex;
flex-wrap: wrap;
gap: 10px;
margin: 15px 0;
}
.branch_stat {
background: #f8fafc;
padding: 8px 15px;
border-radius: 6px;
border: 2px solid #e2e8f0;
transition: all 0.2s;
text-decoration: none;
color: inherit;
display: flex;
align-items: center;
gap: 8px;
}
.branch_stat:hover {
background: #f1f5f9;
transform: translateY(-1px);
}
.branch_stat.active {
background: #7eb6ff3b;
color: white;
border-color: #2563eb;
}
.branch_name {
font-size: 0.9em;
}
.branch_count {
font-weight: bold;
color: currentColor;
}
.branch_stat:hover {
transform: translateY(-2px);
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.branch_name {
color: #64748b;
font-size: 0.9em;
}
.branch_count {
display: block;
color: #1e293b;
font-size: 1.2em;
font-weight: bold;
margin-top: 5px;
}
.receive_actions {
display: flex;
gap: 12px;
margin-top: 15px;
}
.receive_btn {
padding: 8px 16px;
border: none;
border-radius: 6px;
cursor: pointer;
transition: all 0.3s ease;
font-size: 14px;
font-weight: 500;
}
.receive_btn_warning {
background-color: #ff9800;
color: white;
}
.receive_btn_warning:hover {
background-color: #ffc772;
color: white;
}
.receive_btn_secondary {
background-color: #008cff;
color: white;
text-decoration: none;
text-align: center;
}
.receive_btn_secondary:hover {
background-color: #43abff;
text-decoration: none;
color: white;
}
.receive_btn_primary {
background-color: #4CAF50;
color: white;
}
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 1000;
backdrop-filter: blur(5px);
}
.modal-content {
background-color: #fff;
margin: 15vh auto;
padding: 25px;
width: 90%;
max-width: 400px;
border-radius: 12px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
animation: modalSlideIn 0.3s ease-out;
}
.modal-body {
display: flex;
flex-direction: column;
align-items: center;
gap: 15px;
margin: 20px 0;
}
.modal-icon {
width: 48px;
height: 48px;
border-radius: 50%;
background-position: center;
background-repeat: no-repeat;
background-size: 24px;
}
.modal-icon.warning {
background-color: #fff3e0;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ff5722' d='M12 2L1 21h22M12 6l7.53 13H4.47M11 10v4h2v-4m-2 6v2h2v-2'/%3E%3C/svg%3E");
}
.modal-icon.info {
background-color: #e8f5e9;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234CAF50' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}
.modal-buttons {
display: flex;
justify-content: flex-end;
gap: 12px;
margin-top: 20px;
}
@keyframes modalSlideIn {
from {
transform: translateY(-30px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
/* 分页样式 */
.receive_pagination {
margin: 25px 0;
display: flex;
justify-content: center;
align-items: center;
gap: 15px;
}
.page_link {
padding: 8px 16px;
background: #f1f5f9;
border-radius: 6px;
text-decoration: none;
color: #475569;
transition: all 0.3s;
}
.page_link:hover {
background: #e2e8f0;
color: #1e293b;
}
.per_page_select {
padding: 8px;
border-radius: 6px;
border: 1px solid #e2e8f0;
outline: none;
}
.receive_card {
background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
border-radius: 12px;
padding: 16px;
margin-bottom: 16px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
transition: transform 0.2s, box-shadow 0.2s;
text-decoration: none;
color: inherit;
border: 1px solid #e9ecef;
}
.receive_card:hover {
transform: translateY(-2px);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.receive_card_header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
padding-bottom: 8px;
border-bottom: 1px solid #e9ecef;
}
.receive_card_title {
font-weight: 600;
color: #2c3e50;
}
.receive_card_duration {
color: #6c757d;
font-size: 0.9em;
}
.receive_card_content {
display: grid;
gap: 8px;
}
.receive_card_item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 0;
}
.receive_card_label {
color: #6c757d;
font-size: 0.9em;
}
.receive_card_value {
color: #2c3e50;
font-weight: 500;
}
.receive_card_value[data-device-type="摄像头"] {
background-color: #e3f2fd;
color: #1976d2;
padding: 4px 8px;
border-radius: 4px;
}
.receive_card_value[data-device-type="紫色"] {
background-color: #f3e5f5;
color: #7b1fa2;
padding: 4px 8px;
border-radius: 4px;
}
.receive_card_value[data-device-type="绿色"] {
background-color: #e8f5e9;
color: #388e3c;
padding: 4px 8px;
border-radius: 4px;
}
.receive_card_value[data-device-type="一键报警"] {
background-color: #fff3e0;
color: #f57c00;
padding: 4px 8px;
border-radius: 4px;
}
.receive_card_value[data-device-type="灰色"] {
background-color: #f5f5f5;
color: #616161;
padding: 4px 8px;
border-radius: 4px;
}
/* 移动端适配 */
@media (max-width: 768px) {
.receive_actions {
flex-direction: column;
width: 100%;
}
.receive_btn {
width: 100%;
padding: 12px 16px;
}
.modal-content {
margin: 10vh auto;
padding: 20px;
}
.receive_card {
background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
padding: 20px;
}
.receive_card_header {
margin-bottom: 16px;
}
.receive_card_title {
font-size: 1.1em;
}
.receive_card_content {
gap: 12px;
}
.receive_card_item {
padding: 6px 0;
}
}
+46
View File
@@ -0,0 +1,46 @@
.form_tips {
background-color: #f8f9fa;
padding: 15px;
border-radius: 4px;
margin-bottom: 20px;
}
.form_tips ul {
margin: 10px 0 0 20px;
padding: 0;
}
.form_tips li {
margin-bottom: 5px;
color: #666;
}
.required {
color: #dc3545;
margin-left: 3px;
}
.detail_form input::placeholder,
.detail_form textarea::placeholder {
color: #999;
font-size: 13px;
}
.detail_form select {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
color: #333;
}
.detail_form select option:first-child {
color: #999;
}
.detail_form input[type="tel"] {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
}
+268
View File
@@ -0,0 +1,268 @@
/* 容器样式 */
.statistics_container {
padding: 20px;
max-width: 1200px;
margin: 0 auto;
}
.statistics_section {
margin-bottom: 30px;
}
/* 标题和按钮样式 */
.statistics_title {
display: flex;
align-items: center;
gap: 15px;
margin-bottom: 20px;
font-size: 1.5em;
color: #1e293b;
}
/* 统一按钮基础样式 */
.button_base {
padding: 8px 16px;
border: none;
border-radius: 6px;
font-size: 0.9em;
cursor: pointer;
text-decoration: none;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
height: 36px;
}
.export_button {
float: right;
padding: 6px 12px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
text-decoration: none;
font-size: 14px;
}
.export_button:hover {
background-color: #45a049;
color: #fff;
}
.incentive_button {
float: right;
padding: 6px 12px;
background-color: #dc2626;
color: white;
border: none;
border-radius: 4px;
text-decoration: none;
font-size: 14px;
}
.incentive_button:hover {
background-color: #b91c1c;
color: #fff;
}
/* 卡片样式 */
.statistics_card {
background: white;
border-radius: 10px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.statistics_card h3 {
margin: 0 0 15px 0;
color: #334155;
font-size: 1.2em;
}
/* 网格布局 */
.statistics_grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 20px;
}
.statistics_item {
display: flex;
flex-direction: column;
gap: 8px;
}
.statistics_label {
color: #64748b;
font-size: 0.9em;
}
.statistics_value {
color: #1e293b;
font-size: 1.5em;
font-weight: bold;
}
/* 总计奖励样式 */
.total_reward {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid #e2e8f0;
}
/* 表格样式 */
.handler_stats_table {
overflow-x: auto;
}
.handler_stats_table table {
width: 100%;
border-collapse: collapse;
margin-top: 10px;
}
.handler_stats_table th,
.handler_stats_table td {
padding: 12px;
text-align: center;
border-bottom: 1px solid #e2e8f0;
}
.handler_stats_table th {
background-color: #f8fafc;
color: #475569;
font-weight: 600;
}
.handler_stats_table tr:hover {
background-color: #f8fafc;
}
/* 统计页面样式 */
.statistics_container {
padding: 20px;
max-width: 1200px;
margin: 0 auto;
}
.statistics_section {
margin-bottom: 30px;
}
.statistics_title {
color: #333;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #eee;
}
.statistics_card {
background: white;
border-radius: 8px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.statistics_card h3 {
color: #666;
margin-bottom: 15px;
font-size: 1.1em;
}
.statistics_grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 15px;
}
.statistics_item {
display: flex;
flex-direction: column;
align-items: center;
padding: 15px;
background: #f8f9fa;
border-radius: 6px;
}
.statistics_label {
color: #666;
font-size: 0.9em;
margin-bottom: 5px;
}
.statistics_value {
color: #2c3e50;
font-size: 1.5em;
font-weight: bold;
}
/* 响应式设计 */
@media (max-width: 768px) {
.statistics_grid {
grid-template-columns: 1fr;
}
.statistics_card {
padding: 15px;
}
.statistics_value {
font-size: 1.2em;
}
}
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.5);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
}
.modal-content {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
width: 300px;
}
.month-picker-form {
display: flex;
flex-direction: column;
gap: 15px;
margin-top: 15px;
}
.month-input {
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 16px;
}
.modal-buttons {
display: flex;
gap: 10px;
justify-content: flex-end;
}
.cancel_button {
padding: 8px 16px;
border: none;
border-radius: 4px;
background-color: #6c757d;
color: white;
cursor: pointer;
}
.cancel_button:hover {
background-color: #5a6268;
}
+978
View File
@@ -0,0 +1,978 @@
.per_page_select {
padding: 6px 10px;
width: auto;
border: 1px solid #ddd;
border-radius: 4px;
background-color: white;
color: #495057;
font-size: 14px;
cursor: pointer;
}
.per_page_select:focus {
border-color: #007bff;
outline: none;
}
.dispatch_page_link {
display: inline-block;
padding: 8px 16px;
margin: 0 5px;
border-radius: 4px;
background: white;
color: #007bff;
text-decoration: none;
transition: all 0.3s ease;
}
.dispatch_page_link:hover {
background: #007bff;
color: white;
}
.dispatch_page_info {
display: inline-block;
padding: 8px 16px;
color: #6c757d;
}
/* 导航栏样式 */
.nav_container {
background: linear-gradient(135deg, #0061f2 0%, #00a3ff 100%);
padding: 0.5rem 1rem;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.nav_brand {
font-size: 1.5rem;
font-weight: 600;
color: white !important;
text-decoration: none;
transition: opacity 0.3s;
}
.nav_brand:hover {
opacity: 0.9;
}
.nav_toggler {
border: none !important;
padding: 0.5rem;
border-radius: 4px;
background-color: rgba(255,255,255,0.1) !important;
}
.nav_toggler_icon {
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
.nav_menu {
margin-left: 1rem;
}
/* 导航栏样式 */
.nav_link {
color: rgba(255,255,255,0.9) !important;
padding: 0.5rem 1rem !important;
border-radius: 4px;
transition: all 0.3s;
position: relative;
font-weight: 500;
display: block; /* 确保按钮独占一行 */
text-decoration: none !important; /* 移除默认下划线 */
}
.nav_link:hover {
color: white !important;
background: rgba(255,255,255,0.1);
}
.nav_link.active {
background: rgba(255,255,255,0.2);
color: white !important;
}
/* 接单平台样式 */
.receive_container {
padding: 20px;
background: #f8f9fa;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.receive_filter {
background: white;
padding: 15px 20px;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
margin-bottom: 20px;
}
.receive_select {
padding: 8px 15px;
border: 1px solid #ddd;
border-radius: 4px;
margin-right: 10px;
min-width: 130px;
}
.receive_table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.receive_table th {
background: #f8f9fa;
padding: 12px;
text-align: left;
font-weight: 600;
color: #495057;
border-bottom: 2px solid #dee2e6;
}
.receive_table td {
padding: 12px;
border-bottom: 1px solid #dee2e6;
color: #495057;
}
.receive_table tr:hover {
background-color: #f5f5f5;
}
.receive_action {
color: #007bff;
text-decoration: none;
padding: 4px 8px;
border-radius: 4px;
transition: all 0.3s;
}
.receive_action:hover {
background: #007bff;
color: white;
}
.card_container {
display: none;
}
/* 移动端卡片样式 */
@media (max-width: 991.98px) {
.receive_table {
display: none;
}
.card_container {
display: flex;
flex-direction: column;
gap: 15px;
}
.receive_card {
background: white;
border-radius: 8px;
padding: 15px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
position: relative;
text-decoration: none;
color: inherit;
transition: all 0.3s ease;
}
.receive_card:active {
transform: scale(0.98);
}
.receive_card:hover {
box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.receive_card_header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 2px solid #eee;
}
.receive_card_title {
font-weight: 600;
color: #333;
}
.receive_card_content {
display: flex;
flex-direction: column;
gap: 8px;
}
.receive_card_item {
display: flex;
justify-content: space-between;
align-items: center;
}
.receive_card_label {
color: #666;
font-size: 0.9em;
}
.receive_card_value {
color: #333;
font-weight: 500;
}
.receive_card_duration {
position: absolute;
top: 15px;
right: 15px;
color: #666;
font-size: 0.85em;
}
}
/* 登录页面样式 */
.login_container {
min-height: calc(100vh - 100px);
display: flex;
align-items: center;
justify-content: center;
padding: 20px;
}
.login_box {
background: white;
padding: 40px;
border-radius: 10px;
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
width: 100%;
max-width: 400px;
text-align: center;
}
.login_title {
color: #333;
font-size: 28px;
margin-bottom: 10px;
}
.login_subtitle {
color: #666;
font-size: 16px;
margin-bottom: 30px;
}
.login_form {
text-align: left;
}
.login_input_group {
margin-bottom: 25px;
}
.login_label {
display: block;
color: #555;
margin-bottom: 8px;
font-size: 14px;
}
.login_input {
width: 100%;
padding: 12px 15px;
border: 1px solid #ddd;
border-radius: 6px;
font-size: 16px;
transition: all 0.3s;
}
.login_input:focus {
border-color: #007bff;
box-shadow: 0 0 0 2px rgba(0,123,255,0.2);
outline: none;
}
.login_button {
width: 100%;
padding: 12px;
background: linear-gradient(135deg, #0061f2 0%, #00a3ff 100%);
color: white;
border: none;
border-radius: 6px;
font-size: 16px;
font-weight: 500;
cursor: pointer;
transition: all 0.3s;
}
.login_button:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0,97,242,0.2);
}
.login_button:active {
transform: translateY(0);
}
/* 移动端适配 */
@media (max-width: 991.98px) {
.login_box {
padding: 30px 20px;
}
}
@media screen and (max-width: 768px) {
.receive_select {
width: 140px;
}
.receive_filter form {
flex-wrap: nowrap;
}
}
/* 历史工单列表页面样式 */
.history_container {
padding: 20px;
background: #f8f9fa;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.history_title {
color: #333;
font-size: 24px;
margin-bottom: 20px;
padding-bottom: 10px;
border-bottom: 2px solid #eee;
}
.history_table {
width: 100%;
border-collapse: separate;
border-spacing: 0;
background: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.history_table th {
background: #f8f9fa;
padding: 12px;
text-align: left;
font-weight: 600;
color: #495057;
border-bottom: 2px solid #dee2e6;
}
.history_table td {
padding: 12px;
border-bottom: 1px solid #dee2e6;
color: #495057;
}
.history_table tr:hover {
background-color: #f5f5f5;
}
.history_link {
color: #007bff;
text-decoration: none;
transition: all 0.3s;
}
.history_link:hover {
color: #0056b3;
text-decoration: underline;
}
.history_pagination {
margin-top: 20px;
text-align: center;
}
.history_page_link {
display: inline-block;
padding: 8px 16px;
margin: 0 5px;
border-radius: 4px;
background: white;
color: #007bff;
text-decoration: none;
transition: all 0.3s ease;
}
.history_page_link:hover {
background: #007bff;
color: white;
}
.history_page_info {
display: inline-block;
padding: 8px 16px;
color: #6c757d;
}
/* 历史工单详情页面样式 */
.history_detail_container {
padding: 20px;
max-width: 1200px;
margin: 0 auto;
}
.detail_photos {
margin-top: 20px;
padding-top: 20px;
border-top: 1px solid #eee;
}
.photo_grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 20px;
margin-top: 15px;
}
.photo_item {
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.photo_item img {
width: 100%;
height: 200px;
object-fit: cover;
transition: transform 0.3s ease;
}
.photo_item img:hover {
transform: scale(1.05);
}
/* 移动端适配 */
@media (max-width: 991.98px) {
.history_container {
padding: 10px;
}
.history_table {
display: none;
}
.history_card {
background: white;
border-radius: 8px;
padding: 15px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
text-decoration: none;
color: inherit;
transition: all 0.3s ease;
}
.history_card:hover {
transform: translateX(5px);
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.history_card_header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
padding-bottom: 10px;
border-bottom: 1px solid #eee;
}
.history_card_title {
font-weight: 600;
color: #333;
}
.history_card_content {
display: flex;
flex-direction: column;
gap: 8px;
}
.history_card_item {
display: flex;
justify-content: space-between;
align-items: center;
}
.history_card_label {
color: #666;
font-size: 0.9em;
}
.history_card_value {
color: #333;
font-weight: 500;
}
.photo_grid {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.photo_item img {
height: 150px;
}
.manual-card {
border-left: 4px solid #ff9800; /* 手工申报工单使用橙色边框 */
}
.system-card {
border-left: 4px solid #2196f3; /* 系统派单工单使用蓝色边框 */
}
}
/* 历史工单详情页样式更新 */
.detail_header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 30px;
padding-bottom: 15px;
border-bottom: 2px solid #eee;
}
.detail_title {
font-size: 22px;
color: #2c3e50;
margin: 0;
}
.detail_status {
padding: 4px 10px;
background: #28a745;
color: white;
border-radius: 12px;
font-size: 14px;
}
.detail_section {
margin-bottom: 30px;
padding: 20px;
background: #f8f9fa;
border-radius: 8px;
}
.section_title {
font-size: 18px;
color: #2c3e50;
margin-bottom: 20px;
font-weight: 500;
}
.detail_grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 20px;
}
.detail_item {
display: flex;
flex-direction: column;
gap: 8px;
}
.detail_label {
color: #6c757d;
font-size: 14px;
}
.detail_value {
color: #2c3e50;
font-weight: 500;
}
.detail_value.highlight {
color: #007bff;
}
.detail_value.badge {
display: inline-block;
padding: 6px 12px;
background: #e9ecef;
border-radius: 6px;
font-size: 15px;
}
.detail_description {
background: white;
padding: 20px;
border-radius: 8px;
margin-top: 10px;
}
.detail_remark {
margin-top: 20px;
padding: 15px;
background: #fff3cd;
border-radius: 8px;
}
.detail_remark h5 {
color: #856404;
margin-bottom: 10px;
font-size: 16px;
}
.photo_grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
gap: 20px;
margin-top: 15px;
}
.photo_item {
position: relative;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
cursor: pointer;
}
.photo_item img {
width: 100%;
height: 200px;
object-fit: cover;
transition: transform 0.3s ease;
}
.photo_item:hover img {
transform: scale(1.05);
}
/* 模态框样式 */
.modal {
display: none;
position: fixed;
z-index: 1000;
padding-top: 50px;
left: 0;
top: 0;
width: 100%;
height: 100%;
background-color: rgba(0,0,0,0.9);
}
.modal_content {
margin: auto;
display: block;
max-width: 90%;
max-height: 90vh;
}
.modal_close {
position: absolute;
right: 35px;
top: 15px;
color: #f1f1f1;
font-size: 40px;
font-weight: bold;
cursor: pointer;
}
/* 移动端适配 */
@media (max-width: 768px) {
.detail_grid {
grid-template-columns: 1fr;
}
.detail_section {
padding: 15px;
}
.photo_grid {
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.photo_item img {
height: 150px;
}
}
/* 历史工单搜索框样式 */
.history_search {
margin: 20px 0;
}
.history_search_form {
display: flex;
gap: 10px;
max-width: 600px;
}
.history_search_input {
flex: 1;
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
.history_search_input:focus {
outline: none;
border-color: #007bff;
box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}
.history_search_button {
padding: 8px 16px;
background: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.3s;
}
.history_search_button:hover {
background: #0056b3;
}
/* 移动端适配 */
@media screen and (max-width: 768px) {
.history_search_form {
flex-direction: column;
gap: 8px;
}
}
/* 手工故障单样式 */
.manual_container {
max-width: 800px;
margin: 0 auto;
padding: 20px;
}
.manual_title {
margin-bottom: 30px;
color: #333;
text-align: center;
}
.manual_form {
background: white;
padding: 30px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.manual_form .form-group {
margin-bottom: 20px;
}
.manual_form label {
display: block;
margin-bottom: 8px;
color: #555;
}
.manual_form input,
.manual_form select,
.manual_form textarea {
width: 100%;
padding: 8px 12px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
.manual_form textarea {
height: 100px;
resize: vertical;
}
.manual_submit {
width: 100%;
padding: 12px;
background: #007bff;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s;
}
.manual_submit:hover {
background: #0056b3;
}
@media screen and (max-width: 768px) {
.manual_form {
padding: 20px;
}
}
.receive_detail_container {
padding: 20px;
max-width: 1200px;
margin: 0 auto;
}
.detail_card {
background: white;
border-radius: 8px;
padding: 20px;
margin-bottom: 20px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
/* 工单信息卡片样式 */
.detail_card:first-child {
background: #f8f9fa;
border-left: 4px solid #007bff;
}
/* 处理信息卡片样式 */
.detail_card:last-child {
background: white;
border-left: 4px solid #28a745;
}
.detail_grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 10px; /* 减小行距 */
}
.detail_item {
padding: 5px 10px; /* 减小内边距 */
}
.detail_label {
color: #666;
font-size: 0.9em;
margin-right: 8px;
display: inline-block;
width: 80px; /* 固定标签宽度,使值对齐 */
}
.detail_value {
color: #333;
font-weight: 500;
}
.detail_form {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 20px;
}
.form-group {
margin-bottom: 15px;
}
.form-group label {
display: block;
margin-bottom: 5px;
color: #666;
}
.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
font-size: 14px;
}
.form-group textarea {
height: 100px;
resize: vertical;
}
.detail_file_input {
padding: 8px;
border: 1px dashed #ddd;
border-radius: 4px;
width: 100%;
}
.detail_actions {
grid-column: 1 / -1;
display: flex;
gap: 10px;
justify-content: flex-end;
margin-top: 20px;
}
.detail_btn {
padding: 8px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 14px;
text-decoration: none;
display: inline-flex;
align-items: center;
justify-content: center;
}
.detail_btn_primary {
background: #007bff;
color: white;
}
.detail_btn_secondary {
background: #6c757d;
color: white;
}
.detail_btn:hover {
opacity: 0.9;
}
.login_error {
color: #dc3545;
background-color: #f8d7da;
border: 1px solid #f5c6cb;
border-radius: 4px;
padding: 10px;
margin-bottom: 15px;
font-size: 14px;
text-align: center;
}
@media (max-width: 768px) {
.detail_form {
grid-template-columns: 1fr;
}
.detail_grid {
grid-template-columns: 1fr;
}
}
.detail_btn_danger {
background: #dc3545;
color: white;
}
.detail_btn_danger:hover {
background: #c82333;
}
.total_reward {
background: #e3f2fd;
}
.total_reward .statistics_value {
color: #1976d2;
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

+7
View File
File diff suppressed because one or more lines are too long
+271
View File
@@ -0,0 +1,271 @@
function handleSelectAll() {
const checkboxes = document.querySelectorAll('input[name="device_ids"]');
const selectAllButton = document.getElementById('selectAllBtn');
const hasSelected = Array.from(checkboxes).some(checkbox => checkbox.checked);
const newState = !hasSelected;
checkboxes.forEach(checkbox => {
checkbox.checked = newState;
});
selectAllButton.textContent = newState ? '清空' : '全选';
}
function handleInvertSelect() {
const checkboxes = document.querySelectorAll('input[name="device_ids"]');
checkboxes.forEach(checkbox => {
checkbox.checked = !checkbox.checked;
});
updateSelectAllButtonText();
}
function updateSelectAllButtonText() {
const checkboxes = document.querySelectorAll('input[name="device_ids"]');
const selectAllButton = document.getElementById('selectAllBtn');
const hasSelected = Array.from(checkboxes).some(checkbox => checkbox.checked);
selectAllButton.textContent = hasSelected ? '清空' : '全选';
}
function changePerPage(value) {
const currentUrl = new URL(window.location.href);
currentUrl.searchParams.set('per_page', value);
currentUrl.searchParams.set('page', '1');
window.location.href = currentUrl.toString();
}
async function handleSync(type) {
if (type === 'camera') {
try {
const response = await fetch('/get_captcha', {
method: 'GET'
});
if (response.ok) {
const blob = await response.blob();
document.getElementById('captchaImage').src = URL.createObjectURL(blob);
document.getElementById('captchaModal').style.display = 'block';
} else {
alert('获取验证码失败,请重试');
}
} catch (error) {
console.error('获取验证码失败:', error);
alert('获取验证码失败,请重试');
}
} else if (type === 'alarm') {
// 显示确认模态框
document.getElementById('alarmConfirmModal').style.display = 'block';
}
}
// 添加关闭确认模态框的函数
function closeAlarmConfirmModal() {
document.getElementById('alarmConfirmModal').style.display = 'none';
}
// 添加确认同步的函数
async function confirmAlarmSync() {
try {
// 关闭确认模态框
closeAlarmConfirmModal();
// 显示加载提示
document.getElementById('resultMessage').textContent = '正在同步数据,请稍候...';
document.getElementById('resultModal').style.display = 'block';
const response = await fetch('/sync_offline_devices', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
if (data.success) {
document.getElementById('resultMessage').textContent =
`同步成功!已为 ${data.count} 个离线设备创建工单。`;
} else {
document.getElementById('resultMessage').textContent = '同步失败:' + data.message;
}
document.getElementById('resultModal').style.display = 'block';
} catch (error) {
console.error('同步失败:', error);
document.getElementById('resultMessage').textContent = '同步失败,请重试';
document.getElementById('resultModal').style.display = 'block';
}
}
async function submitCaptcha() {
const captcha = document.getElementById('captchaInput').value;
if (!captcha) {
alert('请输入验证码');
return;
}
try {
const response = await fetch('/sync_camera_step1', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ captcha: captcha })
});
const data = await response.json();
if (data.success) {
document.getElementById('captchaModal').style.display = 'none';
// 更新模态框中的数量
document.getElementById('updatedCount').textContent = data.updated_count || 0;
document.getElementById('confirmModal').style.display = 'block';
} else {
if (data.message === 'INVALID_CAPTCHA') {
alert('验证码错误,请重新输入');
handleSync('camera');
} else {
alert('同步失败:' + data.message);
}
}
} catch (error) {
console.error('同步失败:', error);
alert('同步失败,请重试');
}
}
async function handleDispatch(isCamera = false) {
try {
// 不立即关闭确认模态框,而是先更新其内容
const confirmModal = document.getElementById('confirmModal');
const modalContent = confirmModal.querySelector('.modal-content');
modalContent.innerHTML = `
<h3>正在处理</h3>
<p>正在为选中设备创建工单,请稍候...</p>
<div class="loading-spinner"></div>
`;
let response;
if (isCamera) {
// 如果是摄像头同步,调用第二步接口
response = await fetch('/sync_camera_step2', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
});
} else {
// 普通派单
response = await fetch('/dispatch', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
});
}
const result = await response.json();
// 处理完成后,平滑过渡到结果模态框
document.getElementById('confirmModal').style.display = 'none';
document.getElementById('resultMessage').textContent = `派单成功!已为 ${result.count} 个设备创建工单。`;
document.getElementById('resultModal').style.display = 'block';
} catch (error) {
console.error('派单失败:', error);
document.getElementById('resultMessage').textContent = '派单失败,请重试';
document.getElementById('resultModal').style.display = 'block';
}
}
function cancelDispatch() {
document.getElementById('confirmModal').style.display = 'none';
window.location.reload();
}
function closeCaptchaModal() {
document.getElementById('captchaModal').style.display = 'none';
document.getElementById('captchaInput').value = '';
}
// 备注编辑功能
function editRemark(deviceId, spanElement) {
const inputElement = spanElement.nextElementSibling;
spanElement.style.display = 'none';
inputElement.style.display = 'inline-block';
inputElement.focus();
}
async function saveRemark(deviceId, inputElement) {
const newRemark = inputElement.value.trim();
const spanElement = inputElement.previousElementSibling;
try {
const response = await fetch('/update_device_remark', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
device_id: deviceId,
remark: newRemark
})
});
const data = await response.json();
if (data.success) {
spanElement.textContent = newRemark || '点击添加备注';
spanElement.style.display = 'inline-block';
inputElement.style.display = 'none';
} else {
alert('保存失败:' + data.message);
inputElement.focus();
}
} catch (error) {
console.error('保存备注失败:', error);
alert('保存失败,请重试');
inputElement.focus();
}
}
document.addEventListener('DOMContentLoaded', function() {
// 监听复选框的变化
document.addEventListener('change', function(e) {
if (e.target.matches('input[name="device_ids"]')) {
updateSelectAllButtonText();
}
});
// 添加表单提交前的检查
document.getElementById('dispatchForm').addEventListener('submit', async function(e) {
e.preventDefault();
const selectedDevices = Array.from(document.querySelectorAll('input[name="device_ids"]:checked'))
.map(checkbox => checkbox.value);
if (selectedDevices.length === 0) {
alert('请至少选择一个设备');
return;
}
try {
const response = await fetch('/check_existing_orders', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({ device_ids: selectedDevices })
});
const data = await response.json();
if (data.existing_devices.length > 0) {
alert(`以下设备已有在途工单,请勿重复派单:\n${data.existing_devices.join('\n')}`);
return;
}
this.submit();
} catch (error) {
console.error('检查失败:', error);
alert('检查在途工单失败,请重试');
}
});
});
+53
View File
@@ -0,0 +1,53 @@
function changePerPage(value) {
const currentUrl = new URL(window.location.href);
currentUrl.searchParams.set('per_page', value);
currentUrl.searchParams.set('page', '1');
window.location.href = currentUrl.toString();
}
function recallAllOrders() {
document.getElementById('confirmModal').style.display = 'block';
}
function closeModal() {
document.getElementById('confirmModal').style.display = 'none';
}
async function confirmRecall() {
try {
// 关闭确认模态框
closeModal();
const response = await fetch('/recall_all_orders', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
}
});
const data = await response.json();
if (data.success) {
document.getElementById('resultMessage').textContent = `成功追回 ${data.count} 个工单`;
document.getElementById('resultModal').style.display = 'block';
} else {
document.getElementById('resultMessage').textContent = '追回失败:' + data.message;
document.getElementById('resultModal').style.display = 'block';
}
} catch (error) {
document.getElementById('resultMessage').textContent = '操作失败,请重试';
document.getElementById('resultModal').style.display = 'block';
}
}
function closeResultModal() {
document.getElementById('resultModal').style.display = 'none';
window.location.reload();
}
// 添加点击模态框外部关闭功能
window.onclick = function(event) {
const modal = document.getElementById('confirmModal');
if (event.target == modal) {
closeModal();
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 176 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 204 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 KiB