.subdevices-page { padding: 0; background: #f5f5f5; min-height: 100vh; } /* 页面头部 */ .page-header { display: flex; align-items: center; padding: 20rpx 30rpx; background: #fff; border-bottom: 1rpx solid #e8e8e8; } .header-left { display: flex; align-items: center; flex: 1; } .back-btn { width: 80rpx; height: 80rpx; display: flex; align-items: center; justify-content: center; margin-right: 20rpx; } .device-info { flex: 1; } .device-name { font-size: 32rpx; font-weight: bold; color: #333; margin-bottom: 8rpx; } .device-meta { font-size: 24rpx; color: #666; } .subdevice-count { color: #0052d9; font-weight: 500; } /* 加载和错误状态 */ .loading-container, .error-container, .empty-container { padding: 100rpx 30rpx; display: flex; flex-direction: column; align-items: center; justify-content: center; } /* 子设备列表 */ .subdevices-list { padding: 20rpx 30rpx; } .subdevice-card { background: #fff; border-radius: 12rpx; padding: 24rpx; margin-bottom: 16rpx; box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05); } .card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16rpx; } .subdevice-info { flex: 1; } .subdevice-name { font-size: 30rpx; font-weight: 500; color: #333; margin-bottom: 8rpx; } .subdevice-meta { display: flex; align-items: center; gap: 20rpx; font-size: 24rpx; color: #666; } .subdevice-id { color: #999; } .subdevice-status { display: flex; align-items: center; } .status-badge { font-size: 24rpx; padding: 2rpx 8rpx; border-radius: 4rpx; display: inline-block; font-weight: 500; margin-left: 8rpx; } .status-0 { color: #06a56c; background-color: #e8f6f1; } .status-1 { color: #1890ff; background-color: #e6f7ff; } .status-2 { color: #fa8c16; background-color: #fff7e6; } .usage-info { text-align: center; padding: 12rpx; background: #f0f2f5; border-radius: 8rpx; min-width: 100rpx; } .usage-count { display: block; font-size: 28rpx; font-weight: bold; color: #0052d9; } .usage-label { font-size: 22rpx; color: #666; } .subdevice-desc { font-size: 26rpx; color: #666; margin-bottom: 16rpx; padding: 12rpx; background: #f8f9fa; border-radius: 6rpx; line-height: 1.4; } .card-actions { display: flex; flex-wrap: wrap; gap: 12rpx; } .card-actions .t-button { flex: 1; min-width: 120rpx; font-size: 24rpx; height: 60rpx; line-height: 60rpx; } /* 状态选择器 */ .status-options { display: flex; flex-direction: column; gap: 16rpx; padding: 20rpx 0; } .status-option { display: flex; align-items: center; padding: 24rpx 32rpx; border-radius: 8rpx; background-color: #f7f8fa; border: 2rpx solid transparent; transition: all 0.3s ease; cursor: pointer; position: relative; } .status-option.selected { background-color: #eef4ff; border-color: #0052d9; } .status-option:active { background-color: #e7e9eb; } .status-label { margin-left: 16rpx; font-size: 28rpx; color: #333; flex: 1; } .status-dot { width: 16rpx; height: 16rpx; border-radius: 50%; display: inline-block; flex-shrink: 0; } .status-check { position: absolute; right: 32rpx; color: #0052d9; font-size: 32rpx; font-weight: bold; } /* 自定义弹窗样式 */ .dialog-mask { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; z-index: 9999; } .dialog-container { width: 600rpx; background-color: #fff; border-radius: 16rpx; overflow: hidden; animation: slideUp 0.3s ease-out; } @keyframes slideUp { from { transform: translateY(100rpx); opacity: 0; } to { transform: translateY(0); opacity: 1; } } .dialog-header { display: flex; align-items: center; justify-content: space-between; padding: 30rpx; border-bottom: 1rpx solid #f0f0f0; } .dialog-title { font-size: 32rpx; font-weight: 600; color: #333; } .dialog-close { font-size: 40rpx; color: #999; width: 60rpx; height: 60rpx; display: flex; align-items: center; justify-content: center; border-radius: 50%; } .dialog-close:active { background-color: #f5f5f5; } .dialog-body { padding: 30rpx; max-height: 600rpx; overflow-y: auto; } .dialog-footer { display: flex; border-top: 1rpx solid #f0f0f0; } .dialog-btn { flex: 1; height: 100rpx; border: none; border-radius: 0; font-size: 28rpx; background-color: #fff; } .dialog-btn:active { opacity: 0.8; } .cancel-btn { color: #666; border-right: 1rpx solid #f0f0f0; } .confirm-btn { color: #0052d9; font-weight: 500; } /* 弹窗内容区域 */ .dialog-content { padding: 20rpx; } .status-current { font-size: 26rpx; color: #666; margin-bottom: 20rpx; padding: 16rpx; background-color: #f8f9fa; border-radius: 6rpx; text-align: center; }