/* 或者针对特定按钮 */ .swal2-confirm:hover { background-color: #d33 !important; /* 保持与正常状态相同 */ } .swal2-cancel:hover { background-color: #3085d6 !important; /* 保持与正常状态相同 */ } * { box-sizing: border-box; } body { font-family: Arial, sans-serif; margin: 0; padding: 20px; min-width: 1200px; overflow-x: auto; } .container { display: flex; flex-direction: column; height: 95vh; gap: 20px; } .summary-section { border: 1px solid #ddd; padding: 15px; border-radius: 5px; background-color: #f9f9f9; } .summary-table { width: 100%; border-collapse: collapse; } .summary-table th, .summary-table td { border: 1px solid #ddd; padding: 12px; text-align: center; } .summary-table th { background-color: #f2f2f2; } .summary-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; } .device-section { flex: 1; height: 100px; /* 固定高度 */ overflow: auto; border: 1px solid #ddd; border-radius: 5px; } .device-table { height: 50px; /* 容器高度 */ overflow-y: auto; /* 垂直滚动条 */ width: 100%; border-collapse: collapse; } .device-table th, .device-table td { border: 1px solid #ddd; padding: 8px; text-align: center; white-space: nowrap; } .device-table th { background-color: #f2f2f2; position: sticky; top: 0; } .status-section { border: 1px solid #ddd; padding: 15px; border-radius: 5px; background-color: #f9f9f9; } .status-boxes { display: flex; flex-wrap: wrap; gap: 15px; } .status-box { border: 1px solid #ddd; padding: 15px; min-width: 150px; text-align: center; background-color: white; border-radius: 5px; flex: 1; } .status-active { color: #4CAF50; font-weight: bold; } .status-inactive { color: #f44336; font-weight: bold; } .left-buttons { display: flex; gap: 10px; } .right-buttons { display: flex; gap: 10px; } .button-container { /*display: flex;*/ /*justify-content: center;*/ /*gap: 15px;*/ /*margin-top: 20px;*/ margin-bottom: 10px; display: flex; justify-content: space-between; /* 左右分开 */ align-items: center; padding: 15px; background-color: #f5f5f5; border-radius: 8px; } .btn { padding: 8px 16px; background-color: #4CAF50; color: white; border: none; border-radius: 4px; cursor: pointer; font-weight: bold; } .btn-energy { background-color: #2196F3; } .btn-close{ background-color: rgb(101, 107, 139); } .btn-threshold { background-color: #ff9800; } .btn-delay { background-color: #9c27b0; } .scrollable-table { flex: 1; overflow-y: auto; } .button-footer { display: flex; justify-content: center; gap: 15px; padding: 15px; background-color: #f9f9f9; border-top: 1px solid #ddd; } .table-container { display: flex; flex-direction: column; height: 80vh; /* 视口高度百分比 */ max-height: 500px; border: 1px solid #ddd; border-radius: 5px; min-width: 1000px; /* 最小宽度防止压缩 */ } .selectStyle{ width: 200px; height: 40px; border-radius: 4px } /* 重置样式 */ * { margin: 0; padding: 0; box-sizing: border-box; } .tab-container { width: 100%; height: 100%; margin: 0 auto; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); overflow: hidden; } .tab-header { display: flex; background-color: #f1f1f1; border-bottom: 1px solid #ddd; } .tab-btn { border-radius: 10px; padding: 12px 20px; background: none; border: none; cursor: pointer; font-size: 16px; transition: all 0.3s; position: relative; } .tab-btn:hover { background-color: #ddd; } .tab-btn.active { background-color: #4CAF50; color: white; } .tab-content { height: 100%; padding: 20px; display: none; } .tab-content.active { display: block; animation: fadeIn 0.5s; } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } .tab-iframe { width: 100%; height: 100%; border: none; } html, body { height: 100%; font-family: 'Arial', sans-serif; } .modal-content { background: white; padding: 20px; border-radius: 8px; max-width: 500px; width: 80%; max-height: 80vh; overflow-y: auto; } .form-group { margin-bottom: 15px; } .form-group label { display: block; margin-bottom: 5px; font-weight: bold; } .form-group input[type="text"], .form-group input[type="date"], .form-group select, .form-group textarea { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; } .form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; } .btn-on { background-color: #4CAF50; color: white; } .btn-off { background-color: #f44336; color: white; } .btn-all { background-color: #2196F3; color: white; } .btn-energy { background-color: #2196F3; } .btn-close{ background-color: rgb(101, 107, 139); } .btn-threshold { background-color: #ff9800; } .btn-delay { background-color: #9c27b0; } .modal-overlay2 { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 1000; } .upload-container { padding: 25px; } .upload-area { border: 2px dashed #cbd5e1; padding: 40px; text-align: center; background: #f8fafc; cursor: pointer; } .file-input { display: none; } .files-list { margin-top: 30px; } .files-list h3 { color: #334155; margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #e2e8f0; } .file-item { display: flex; align-items: center; padding: 15px; background: #f8fafc; border-radius: 8px; margin-bottom: 10px; transition: all 0.3s ease; } .file-info { flex-grow: 1; } .file-action-btn { width: 36px; height: 36px; border-radius: 50%; display: flex; cursor: pointer; } .progress-bar { height: 6px; background: #e2e8f0; border-radius: 3px; margin-top: 8px; overflow: hidden; } .modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 999; } .radio-group, .checkbox-group { display: flex; flex-wrap: wrap; gap: 10px; } .radio-group label, .checkbox-group label { display: flex; align-items: center; gap: 5px; font-weight: normal; } button[type="submit"] { background: #4CAF50; color: white; } button[type="submit"]:disabled { background: #ccc; } select.custom-select { padding: 12px; border: 1px solid #ddd; border-radius: 6px; background-color: white; font-size: 16px; color: #333; appearance: none; -webkit-appearance: none; background-image: url('data:image/svg+xml;utf8,'); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; } /* 尝试设置option样式(效果有限) */ select.custom-select option { height: 40px; /* 可能在某些浏览器中有效 */ padding: 12px; /* 可能在某些浏览器中有效 */ font-size: 16px; /* 通常有效 */ line-height: 2; /* 可能有效 */ } thead { position: sticky; /* 固定表头 */ top: 0; /* 固定在容器顶部 */ z-index: 10; /* 确保表头在内容之上 */ } .divAll{ width: 100%; height: 100%; margin: 0 auto; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgb(0 0 0 / 10%); overflow: hidden; }