| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463 |
- <!DOCTYPE html>
- <html lang="zh-CN" class="iframe-content">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>设备管理列表 - 爱智农</title>
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css">
- <link rel="stylesheet" href="https://at.alicdn.com/t/font_3114978_qe0b39no76.css">
- <link rel="stylesheet" href="../assets/css/global.css">
- <style>
- :root {
- --primary: #4CAF50;
- --primary-dark: #388E3C;
- --primary-light: #A5D6A7;
- --primary-bg: #F1F8E9;
- --success: #4CAF50;
- --warning: #FFC107;
- --danger: #F44336;
- --info: #2196F3;
- --disabled: #9E9E9E;
- --border: #E0E0E0;
- --text-primary: #212121;
- --text-secondary: #757575;
- --radius: 8px;
- }
-
- body {
- font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
- background-color: #f5f7f9;
- color: var(--text-primary);
- margin: 0;
- padding: 0;
- height: auto; overflow-y: auto; overflow-x: hidden;
- min-height: 100%;
- overflow-y: auto;
- overflow-x: hidden;
- padding-top: 15px; /* 添加顶部填充以确保内容不被系统元素遮挡 */
- }
-
- /* 内容页面框架 */
- #content-frame {
- width: 100%;
- height: 100%;
- border: none;
- overflow: hidden;
- margin-top: 0; /* 移除顶部外边距 */
- padding-top: 0; /* 移除顶部内边距 */
- }
-
- /* 移除白色圆形按钮 */
- .circle-btn,
- .floating-button,
- .round-button,
- button[class*='circle'],
- div[class*='circle'],
- [class*='float-btn'],
- body > div:not(#app),
- body > button {
- display: none !important;
- visibility: hidden !important;
- opacity: 0 !important;
- position: absolute !important;
- top: -9999px !important;
- left: -9999px !important;
- z-index: -9999 !important;
- pointer-events: none !important;
- }
-
- .page-container {
- padding: 20px;
- position: relative;
- min-height: 100vh; width: 100%; max-width: 100%; box-sizing: border-box;
- width: 100%;
- max-width: 100%;
- box-sizing: border-box;
- padding-top: 40px; /* 增加顶部内边距,给按钮腾出空间 */
- }
-
- /* 防止重复菜单 */
- body > div:not(.page-container):not(.modal-container),
- iframe#sidebar,
- div.system-menu,
- [id^="system-menu"],
- [class^="system-menu"],
- #admin-sidebar,
- .menu-popup,
- .user-avatar-circle {
- display: none !important;
- width: 0 !important;
- height: 0 !important;
- opacity: 0 !important;
- position: absolute !important;
- top: -9999px !important;
- left: -9999px !important;
- z-index: -9999 !important;
- pointer-events: none !important;
- }
-
- /* 防止右侧白圈和浮动元素 */
- .circle-btn,
- .floating-circle,
- .round-button,
- .scroll-top-btn,
- [class*="round"],
- [class*="circle"],
- .help-btn,
- .chat-btn,
- body > .btn,
- body > button,
- body > div:not(.page-container):not(.modal-container) {
- display: none !important;
- visibility: hidden !important;
- opacity: 0 !important;
- pointer-events: none !important;
- }
-
- /* 页面标题和操作按钮容器 */
- .page-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: 20px;
- padding-bottom: 16px;
- border-bottom: 1px solid #e0e0e0;
- padding-top: 10px;
- position: relative;
- z-index: 10;
- }
-
- /* 添加新增按钮的特定样式 */
- .button-container {
- position: relative;
- z-index: 20;
- }
-
- #addDeviceBtn,
- #importBtn,
- #exportBtn {
- position: relative;
- z-index: 5;
- height: 38px;
- visibility: visible !important;
- opacity: 1 !important;
- display: inline-flex !important;
- }
-
- .card {
- background-color: white;
- border-radius: 8px;
- box-shadow: 0 2px 8px rgba(0,0,0,0.05);
- }
-
- .table-container {
- overflow-x: auto;
- }
-
- table {
- width: 100%;
- border-collapse: collapse;
- }
-
- th {
- background-color: #f9fafb;
- padding: 12px 16px;
- text-align: left;
- font-weight: 500;
- color: #6b7280;
- border-bottom: 1px solid #e5e7eb;
- }
-
- td {
- padding: 12px 16px;
- border-bottom: 1px solid #e5e7eb;
- }
-
- tr:hover {
- background-color: #f9fafb;
- }
-
- .btn {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- padding: 8px 16px;
- border-radius: 4px;
- font-weight: 500;
- cursor: pointer;
- transition: all 0.2s;
- }
-
- .btn-primary {
- background-color: #4CAF50;
- color: white;
- }
-
- .btn-primary:hover {
- background-color: #388E3C;
- }
-
- .btn-default {
- background-color: white;
- border: 1px solid #d1d5db;
- color: #374151;
- }
-
- .btn-default:hover {
- background-color: #f9fafb;
- }
-
- .btn-danger {
- background-color: #ef4444;
- color: white;
- }
-
- .btn-danger:hover {
- background-color: #dc2626;
- }
-
- .btn-sm {
- padding: 4px 8px;
- font-size: 12px;
- }
-
- .btn-icon {
- margin-right: 4px;
- }
-
- .search-box {
- display: flex;
- gap: 8px;
- }
-
- .input {
- padding: 8px 12px;
- border: 1px solid #d1d5db;
- border-radius: 4px;
- flex-grow: 1;
- }
-
- .input:focus {
- outline: none;
- border-color: #4CAF50;
- box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
- }
-
- .select {
- padding: 8px 12px;
- border: 1px solid #d1d5db;
- border-radius: 4px;
- background-color: white;
- }
-
- .modal-overlay {
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- background-color: rgba(0, 0, 0, 0.5);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 50;
- display: none;
- }
-
- .modal {
- background-color: white;
- border-radius: 8px;
- width: 100%;
- max-width: 600px;
- box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
- }
-
- .modal-header {
- padding: 16px 24px;
- border-bottom: 1px solid #e5e7eb;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
-
- .modal-title {
- font-size: 18px;
- font-weight: 500;
- }
-
- .modal-close {
- cursor: pointer;
- font-size: 20px;
- }
-
- .modal-body {
- padding: 24px;
- }
-
- .modal-footer {
- padding: 16px 24px;
- border-top: 1px solid #e5e7eb;
- display: flex;
- justify-content: flex-end;
- gap: 8px;
- }
-
- .form-group {
- margin-bottom: 16px;
- }
-
- .form-label {
- display: block;
- margin-bottom: 4px;
- font-weight: 500;
- }
-
- .form-input {
- width: 100%;
- padding: 8px 12px;
- border: 1px solid #d1d5db;
- border-radius: 4px;
- }
-
- .form-input:focus {
- outline: none;
- border-color: #4CAF50;
- box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
- }
-
- .badge {
- display: inline-block;
- padding: 2px 8px;
- border-radius: 9999px;
- font-size: 12px;
- font-weight: 500;
- }
-
- .badge-success {
- background-color: #d1fae5;
- color: #065f46;
- }
-
- .badge-warning {
- background-color: #fef3c7;
- color: #92400e;
- }
-
- .badge-danger {
- background-color: #fee2e2;
- color: #b91c1c;
- }
-
- .pagination {
- display: flex;
- align-items: center;
- justify-content: flex-end;
- gap: 4px;
- }
-
- .pagination-item {
- display: inline-flex;
- align-items: center;
- justify-content: center;
- width: 32px;
- height: 32px;
- border-radius: 4px;
- cursor: pointer;
- transition: all 0.2s;
- }
-
- .pagination-item:hover {
- background-color: #f3f4f6;
- }
-
- .pagination-item.active {
- background-color: #4CAF50;
- color: white;
- }
-
- .pagination-item.disabled {
- color: #9ca3af;
- cursor: not-allowed;
- }
-
- .grid-2 {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 16px;
- }
- </style>
- </head>
- <body>
- <div class="page-container responsive-container">
- <div class="flex justify-between items-center mb-6 page-header">
- <h1 class="text-2xl font-bold">设备管理列表</h1>
-
- <div class="flex gap-2 button-container">
- <button class="btn btn-primary" id="addDeviceBtn">
- <i class="iconfont icon-plus btn-icon"></i>
- 新增设备
- </button>
- <button class="btn btn-default" id="importBtn">
- <i class="iconfont icon-import btn-icon"></i>
- 导入
- </button>
- <button class="btn btn-default" id="exportBtn">
- <i class="iconfont icon-export btn-icon"></i>
- 导出
- </button>
- </div>
- </div>
-
- <div class="card p-6 mb-6">
- <div class="flex flex-wrap gap-4">
- <div class="search-box flex-grow">
- <input type="text" class="input" placeholder="请输入设备名称/编号/位置">
- <button class="btn btn-primary">
- <i class="iconfont icon-search btn-icon"></i>
- 搜索
- </button>
- <button class="btn btn-default">
- <i class="iconfont icon-reload btn-icon"></i>
- 重置
- </button>
- </div>
-
- <div class="flex gap-2">
- <select class="select">
- <option value="">所有设备类型</option>
- <option value="sensor">传感器</option>
- <option value="camera">摄像头</option>
- <option value="controller">控制器</option>
- <option value="weather">气象设备</option>
- </select>
-
- <select class="select">
- <option value="">所有状态</option>
- <option value="1">在线</option>
- <option value="0">离线</option>
- <option value="2">维护中</option>
- </select>
- </div>
- </div>
- </div>
-
- <!-- 设备表单弹窗 -->
- <div class="modal-overlay" id="deviceModal">
- // ... existing code ...
- </div>
- </div>
-
- <script>
- // 监听iframe加载完成
- document.getElementById('content-frame').onload = function() {
- // 确保iframe高度铺满
- this.style.height = window.innerHeight + 'px';
- };
-
- // 页面大小变化时调整iframe大小
- window.addEventListener('resize', function() {
- document.getElementById('content-frame').style.height = window.innerHeight + 'px';
- });
- </script>
- </body>
- </html>
|